Package org.yamcs.xtce
Class EnumeratedDataType
- java.lang.Object
-
- org.yamcs.xtce.NameDescription
-
- org.yamcs.xtce.BaseDataType
-
- org.yamcs.xtce.EnumeratedDataType
-
- All Implemented Interfaces:
Serializable
,DataType
- Direct Known Subclasses:
EnumeratedArgumentType
,EnumeratedParameterType
public class EnumeratedDataType extends BaseDataType
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnumeratedDataType.Builder<T extends EnumeratedDataType.Builder<T>>
-
Field Summary
Fields Modifier and Type Field Description protected HashMap<Long,ValueEnumeration>
enumeration
protected List<ValueEnumeration>
enumerationList
protected List<ValueEnumerationRange>
ranges
-
Fields inherited from class org.yamcs.xtce.BaseDataType
encoding
-
Fields inherited from class org.yamcs.xtce.NameDescription
ancillaryData, name, PATH_SEPARATOR, qualifiedName, xtceAliasSet
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnumeratedDataType(EnumeratedDataType t)
performs a shallow copy of this object into t
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
calibrate(long raw)
String
convertType(Object value)
Converts to the canonical (boxed) java representation of this type.ValueEnumeration
enumValue(Long key)
ValueEnumeration
enumValue(String label)
String
getInitialValue()
Get the initial value if anyString
getTypeAsString()
String which represents the type.List<ValueEnumeration>
getValueEnumerationList()
List<ValueEnumerationRange>
getValueEnumerationRangeList()
Yamcs.Value.Type
getValueType()
Return the expected Value type of an engineering value conforming to this XTCE data typeboolean
hasLabel(String label)
protected void
setInitialValue(Object initialValue)
-
Methods inherited from class org.yamcs.xtce.BaseDataType
getEncoding, getUnitSet, parseStringForRawValue, setInitialValue, setUnitSet, toString
-
Methods inherited from class org.yamcs.xtce.NameDescription
addAlias, addAliases, addAncillaryData, getAlias, getAliasSet, getAncillaryData, getLongDescription, getName, getName, getOpsName, getQualifiedName, getShortDescription, getSubsystemName, getSubsystemName, qualifiedName, setAliasSet, setAncillaryData, setLongDescription, setName, setQualifiedName, setShortDescription
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.xtce.DataType
getLongDescription, getName, getQualifiedName, getShortDescription
-
-
-
-
Field Detail
-
enumeration
protected HashMap<Long,ValueEnumeration> enumeration
-
enumerationList
protected List<ValueEnumeration> enumerationList
-
ranges
protected List<ValueEnumerationRange> ranges
-
-
Constructor Detail
-
EnumeratedDataType
protected EnumeratedDataType(EnumeratedDataType t)
performs a shallow copy of this object into t- Parameters:
t
-
-
-
Method Detail
-
setInitialValue
protected void setInitialValue(Object initialValue)
- Specified by:
setInitialValue
in classBaseDataType
-
getInitialValue
public String getInitialValue()
Description copied from interface:DataType
Get the initial value if any- Returns:
-
enumValue
public ValueEnumeration enumValue(Long key)
-
enumValue
public ValueEnumeration enumValue(String label)
-
calibrate
public String calibrate(long raw)
-
hasLabel
public boolean hasLabel(String label)
-
getValueEnumerationList
public List<ValueEnumeration> getValueEnumerationList()
-
getValueEnumerationRangeList
public List<ValueEnumerationRange> getValueEnumerationRangeList()
-
convertType
public String convertType(Object value)
Description copied from interface:DataType
Converts to the canonical (boxed) java representation of this type.For example, if
value
is aString
, an integer-like DataType should parse the String value, and return an Integer result.- Parameters:
value
- value to be converted, use boxed primitive values.- Returns:
- The preferred java object representation
-
getValueType
public Yamcs.Value.Type getValueType()
Description copied from interface:DataType
Return the expected Value type of an engineering value conforming to this XTCE data type- Returns:
-
-