Package org.scictrl.csshell
Class MetaDataImpl
java.lang.Object
org.scictrl.csshell.MetaDataImpl
- All Implemented Interfaces:
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
-
Field Summary
Fields inherited from interface org.scictrl.csshell.MetaData
ALARM_MAX, ALARM_MIN, DATA_TYPE, DESCRIPTION, DISPLAY_MAX, DISPLAY_MIN, FORMAT, MAXIMUM, MINIMUM, PRECISION, READ_ACCESS, SEQUENCE_LENGTH, STATE_VALUES, STATES, UNITS, WARN_MAX, WARN_MIN, WRITE_ACCESS
-
Constructor Summary
ConstructorDescriptionMetaDataImpl
(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) Constructor for MetaDataImpl.MetaDataImpl
(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) Constructor for MetaDataImpl. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetaData
createUninitializedMetaData.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.double
getAlarmMax.double
getAlarmMin.Returns the datatype of the channel.Returns the description of the channel.double
getDisplayMax.double
getDisplayMin.Return the display format for the numerical values.Returns the host name of the channel that this meta data belongs to.double
getMaximum.double
getMinimum.getName()
Returns the name of the channel.int
getPrecision.Class
<?> getRemoteDataType.int
Returns the sequence lengthgetState
(int index) Convenience routine for getting the state.String[]
Obtains the states.getStateValue
(int index) Convenience routine for getting a state value.Object[]
Obtains the enumeration values.getUnits()
getUnits.double
getWarnMax.double
getWarnMin.boolean
Returns the access type.boolean
isValid()
Returnstrue
if contains valid data.boolean
Returns the access type.
-
Constructor Details
-
MetaDataImpl
public MetaDataImpl(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) Constructor for MetaDataImpl.
- Parameters:
name
- aString
objectdescription
- aString
objectminimum
- aNumber
objectmaximum
- aNumber
objectdisplayMin
- aNumber
objectdisplayMax
- aNumber
objectwarningMin
- aNumber
objectwarningMax
- aNumber
objectalarmMin
- aNumber
objectalarmMax
- aNumber
objectenumDescriptions
- an array ofString
objectsenumValues
- an array ofObject
objectsformat
- aString
objectunits
- aString
objectsequenceLength
- aInteger
objectprecision
- aInteger
objectdataType
- aDataType
objectremoteDataType
- aClass
objectreadAccess
- aBoolean
objectwriteAccess
- aBoolean
objecthostname
- aString
objectvalid
- a boolean
-
MetaDataImpl
public MetaDataImpl(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) Constructor for MetaDataImpl.
- Parameters:
name
- aString
objectdescription
- aString
objectminimum
- aNumber
objectmaximum
- aNumber
objectdisplayMin
- aNumber
objectdisplayMax
- aNumber
objectwarningMin
- aNumber
objectwarningMax
- aNumber
objectalarmMin
- aNumber
objectalarmMax
- aNumber
objectenumDescriptions
- an array ofString
objectsenumValues
- an array ofObject
objectsformat
- aString
objectunits
- aString
objectsequenceLength
- aInteger
objectprecision
- aInteger
objectdataType
- aDataType
objectremoteDataType
- aClass
objectreadAccess
- aBoolean
objectwriteAccess
- aBoolean
objecthostname
- aString
object
-
-
Method Details
-
isReadAccess
public boolean isReadAccess()Returns the access type.- Specified by:
isReadAccess
in interfaceMetaData
- Returns:
- the access type
-
isWriteAccess
public boolean isWriteAccess()Returns the access type.- Specified by:
isWriteAccess
in interfaceMetaData
- Returns:
- the access type
-
isValid
public boolean isValid()Returnstrue
if contains valid data. -
getAlarmMax
public double getAlarmMax()getAlarmMax.
- Specified by:
getAlarmMax
in interfaceMetaData
- Returns:
- High alarm limit
-
getAlarmMin
public double getAlarmMin()getAlarmMin.
- Specified by:
getAlarmMin
in interfaceMetaData
- Returns:
- Low alarm limit
-
getDataType
Returns the datatype of the channel. This method returns one of the string inDataType
.- Specified by:
getDataType
in interfaceMetaData
- Returns:
- the datatype
-
getRemoteDataType
getRemoteDataType.
- Specified by:
getRemoteDataType
in interfaceMetaData
- Returns:
- a
Class
object
-
getDescription
Returns the description of the channel.- Specified by:
getDescription
in interfaceMetaData
- Returns:
- the description
-
getDisplayMax
public double getDisplayMax()getDisplayMax.
- Specified by:
getDisplayMax
in interfaceMetaData
- Returns:
- Suggested upper display limit
-
getDisplayMin
public double getDisplayMin()getDisplayMin.
- Specified by:
getDisplayMin
in interfaceMetaData
- Returns:
- Suggested lower display limit
-
getState
Convenience routine for getting the state. -
getStates
Obtains the states.The array element
i
represents enum numberi
. -
getStateValue
Convenience routine for getting a state value.- Specified by:
getStateValue
in interfaceMetaData
- Parameters:
index
- a int- Returns:
- a
Object
object
-
getStateValues
Obtains the enumeration values.The array element
i
represents enum numberi
.- Specified by:
getStateValues
in interfaceMetaData
- Returns:
- an array of
Object
objects
-
getFormat
Return the display format for the numerical values. -
getHostname
Returns the host name of the channel that this meta data belongs to.- Specified by:
getHostname
in interfaceMetaData
- Returns:
- the host name
-
getName
Returns the name of the channel. -
getPrecision
public int getPrecision()getPrecision.
- Specified by:
getPrecision
in interfaceMetaData
- Returns:
- Suggested display precision (fractional digits)
-
getUnits
getUnits.
-
getWarnMax
public double getWarnMax()getWarnMax.
- Specified by:
getWarnMax
in interfaceMetaData
- Returns:
- High warning limit
-
getWarnMin
public double getWarnMin()getWarnMin.
- Specified by:
getWarnMin
in interfaceMetaData
- Returns:
- Low warning limit
-
getMaximum
public double getMaximum()getMaximum.
- Specified by:
getMaximum
in interfaceMetaData
- Returns:
- Suggested upper control limit
-
getMinimum
public double getMinimum()getMinimum.
- Specified by:
getMinimum
in interfaceMetaData
- Returns:
- Suggested lower control limit
-
getSequenceLength
public int getSequenceLength()Returns the sequence length- Specified by:
getSequenceLength
in interfaceMetaData
- Returns:
- the sequence length
-
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
- aString
objectdescription
- aString
objectminimum
- aNumber
objectmaximum
- aNumber
objectdisplayMin
- aNumber
objectdisplayMax
- aNumber
objectwarningMin
- aNumber
objectwarningMax
- aNumber
objectalarmMin
- aNumber
objectalarmMax
- aNumber
objectenumDescriptions
- an array ofString
objectsenumValues
- an array ofObject
objectsformat
- aString
objectunits
- aString
objectsequenceLength
- aInteger
objectprecision
- aInteger
objectdataType
- aDataType
objectremoteDataType
- aClass
objectreadAccess
- aBoolean
objectwriteAccess
- aBoolean
objecthostname
- aString
objectvalid
- aBoolean
object- Returns:
- a
MetaData
object
-