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 classEnumeratedDataType.Builder<T extends EnumeratedDataType.Builder<T>>
-
Field Summary
Fields Modifier and Type Field Description protected HashMap<Long,ValueEnumeration>enumerationprotected List<ValueEnumeration>enumerationListprotected 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 protectedEnumeratedDataType(EnumeratedDataType t)performs a shallow copy of this object into t
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcalibrate(long raw)StringconvertType(Object value)Converts to the canonical (boxed) java representation of this type.ValueEnumerationenumValue(Long key)ValueEnumerationenumValue(String label)StringgetInitialValue()Get the initial value if anyStringgetTypeAsString()String which represents the type.List<ValueEnumeration>getValueEnumerationList()List<ValueEnumerationRange>getValueEnumerationRangeList()Yamcs.Value.TypegetValueType()Return the expected Value type of an engineering value conforming to this XTCE data typebooleanhasLabel(String label)protected voidsetInitialValue(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:
setInitialValuein classBaseDataType
-
getInitialValue
public String getInitialValue()
Description copied from interface:DataTypeGet 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:DataTypeConverts to the canonical (boxed) java representation of this type.For example, if
valueis 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:DataTypeReturn the expected Value type of an engineering value conforming to this XTCE data type- Returns:
-
-