Class BinaryDataType

All Implemented Interfaces:
Serializable, DataType
Direct Known Subclasses:
BinaryArgumentType, BinaryParameterType

public class BinaryDataType extends BaseDataType
See Also:
  • Constructor Details

  • Method Details

    • setInitialValue

      protected void setInitialValue(Object initialValue)
      Specified by:
      setInitialValue in class BaseDataType
    • getInitialValue

      public byte[] getInitialValue()
      Description copied from interface: DataType
      Get the initial value if any
      Returns:
    • getSizeRangeInBytes

      public IntegerRange getSizeRangeInBytes()
    • setSizeRangeInBytes

      public void setSizeRangeInBytes(IntegerRange sizeRangeInBytes)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • convertType

      public byte[] convertType(Object value)
      parse the hexadecimal stringValue into byte[]
      Parameters:
      value - value to be converted, use boxed primitive values.
      Returns:
      The preferred java object representation
    • toString

      public String toString(Object v)
      Description copied from interface: DataType
      Converts a value to a string.
      Specified by:
      toString in interface DataType
      Overrides:
      toString in class BaseDataType
      Returns:
    • hexStringToArray

      public static byte[] hexStringToArray(String s)
      Converts a hex string into a byte array. If the string has an odd number of hex digits, a 0 is prepended in front. if the string contains something else than 0-9, a-f, a NumberFormatException is thrown from Integer.parseInt with radix 16
      Parameters:
      s -
      Returns:
      byte array resulted from parsing the string
    • arrayToHexString

      public static String arrayToHexString(byte[] b)
    • 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: