Class MetaDataImpl

java.lang.Object
org.scictrl.csshell.MetaDataImpl
All Implemented Interfaces:
MetaData

public final class MetaDataImpl extends Object implements MetaData
MetaDataImpl is a default implementation of the MetaData interface, which receives all data through a constructor and returns it through the interface methods.
Author:
igor@scictrl.com
  • Constructor Details

  • Method Details

    • isReadAccess

      public boolean isReadAccess()
      Returns the access type.
      Specified by:
      isReadAccess in interface MetaData
      Returns:
      the access type
    • isWriteAccess

      public boolean isWriteAccess()
      Returns the access type.
      Specified by:
      isWriteAccess in interface MetaData
      Returns:
      the access type
    • isValid

      public boolean isValid()
      Returns true if contains valid data.
      Specified by:
      isValid in interface MetaData
      Returns:
      true if contained data is valid
    • getAlarmMax

      public double getAlarmMax()

      getAlarmMax.

      Specified by:
      getAlarmMax in interface MetaData
      Returns:
      High alarm limit
    • getAlarmMin

      public double getAlarmMin()

      getAlarmMin.

      Specified by:
      getAlarmMin in interface MetaData
      Returns:
      Low alarm limit
    • getDataType

      public DataType getDataType()
      Returns the datatype of the channel. This method returns one of the string in DataType.
      Specified by:
      getDataType in interface MetaData
      Returns:
      the datatype
    • getRemoteDataType

      public Class<?> getRemoteDataType()

      getRemoteDataType.

      Specified by:
      getRemoteDataType in interface MetaData
      Returns:
      a Class object
    • getDescription

      public String getDescription()
      Returns the description of the channel.
      Specified by:
      getDescription in interface MetaData
      Returns:
      the description
    • getDisplayMax

      public double getDisplayMax()

      getDisplayMax.

      Specified by:
      getDisplayMax in interface MetaData
      Returns:
      Suggested upper display limit
    • getDisplayMin

      public double getDisplayMin()

      getDisplayMin.

      Specified by:
      getDisplayMin in interface MetaData
      Returns:
      Suggested lower display limit
    • getState

      public String getState(int index)
      Convenience routine for getting the state.
      Specified by:
      getState in interface MetaData
      Parameters:
      index - a int
      Returns:
      a String object
    • getStates

      public String[] getStates()
      Obtains the states.

      The array element i represents enum number i.

      Specified by:
      getStates in interface MetaData
      Returns:
      an array of String objects
    • getStateValue

      public Object getStateValue(int index)
      Convenience routine for getting a state value.
      Specified by:
      getStateValue in interface MetaData
      Parameters:
      index - a int
      Returns:
      a Object object
    • getStateValues

      public Object[] getStateValues()
      Obtains the enumeration values.

      The array element i represents enum number i.

      Specified by:
      getStateValues in interface MetaData
      Returns:
      an array of Object objects
    • getFormat

      public String getFormat()
      Return the display format for the numerical values.
      Specified by:
      getFormat in interface MetaData
      Returns:
      the display format
    • getHostname

      public String getHostname()
      Returns the host name of the channel that this meta data belongs to.
      Specified by:
      getHostname in interface MetaData
      Returns:
      the host name
    • getName

      public String getName()
      Returns the name of the channel.
      Specified by:
      getName in interface MetaData
      Returns:
      the name of the channel
    • getPrecision

      public int getPrecision()

      getPrecision.

      Specified by:
      getPrecision in interface MetaData
      Returns:
      Suggested display precision (fractional digits)
    • getUnits

      public String getUnits()

      getUnits.

      Specified by:
      getUnits in interface MetaData
      Returns:
      The engineering units string
    • getWarnMax

      public double getWarnMax()

      getWarnMax.

      Specified by:
      getWarnMax in interface MetaData
      Returns:
      High warning limit
    • getWarnMin

      public double getWarnMin()

      getWarnMin.

      Specified by:
      getWarnMin in interface MetaData
      Returns:
      Low warning limit
    • getMaximum

      public double getMaximum()

      getMaximum.

      Specified by:
      getMaximum in interface MetaData
      Returns:
      Suggested upper control limit
    • getMinimum

      public double getMinimum()

      getMinimum.

      Specified by:
      getMinimum in interface MetaData
      Returns:
      Suggested lower control limit
    • getSequenceLength

      public int getSequenceLength()
      Returns the sequence length
      Specified by:
      getSequenceLength in interface MetaData
      Returns:
      the sequence length
    • createUninitializedMetaData

      public static MetaData createUninitializedMetaData()

      createUninitializedMetaData.

      Returns:
      a MetaData object
    • deriveMetaData

      public MetaData deriveMetaData(String name, String description, Number minimum, Number maximum, Number displayMin, Number displayMax, Number warningMin, Number warningMax, Number alarmMin, Number alarmMax, String[] enumDescriptions, Object[] enumValues, String format, String units, Integer sequenceLength, Integer precision, DataType dataType, Class<?> remoteDataType, Boolean readAccess, Boolean writeAccess, String hostname, Boolean valid)

      deriveMetaData.

      Parameters:
      name - a String object
      description - a String object
      minimum - a Number object
      maximum - a Number object
      displayMin - a Number object
      displayMax - a Number object
      warningMin - a Number object
      warningMax - a Number object
      alarmMin - a Number object
      alarmMax - a Number object
      enumDescriptions - an array of String objects
      enumValues - an array of Object objects
      format - a String object
      units - a String object
      sequenceLength - a Integer object
      precision - a Integer object
      dataType - a DataType object
      remoteDataType - a Class object
      readAccess - a Boolean object
      writeAccess - a Boolean object
      hostname - a String object
      valid - a Boolean object
      Returns:
      a MetaData object