Class EnumeratedDataType

All Implemented Interfaces:
Serializable, DataType
Direct Known Subclasses:
EnumeratedArgumentType, EnumeratedParameterType

public class EnumeratedDataType extends BaseDataType
See Also:
  • Field Details

  • Constructor Details

    • EnumeratedDataType

      protected EnumeratedDataType(EnumeratedDataType t)
      performs a shallow copy of this object into t
      Parameters:
      t -
  • Method Details

    • setInitialValue

      protected void setInitialValue(Object initialValue)
      Specified by:
      setInitialValue in class BaseDataType
    • 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)
      Returns the enumeration value that maps to the given label or null if it does not exist.

      It does not look through the ranges

    • enumValueRange

      public ValueEnumerationRange enumValueRange(String label)
      Returns the enumeration value range that maps to the given label or null if it does not exist.

      It does not look through the regular enumerations

    • 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 a String, 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:
    • getTypeAsString

      public String getTypeAsString()
      Description copied from interface: DataType
      String which represents the type. This string will be presented to the users of the system.
      Returns: