Class ArrayDataType

    • Constructor Detail

      • ArrayDataType

        public ArrayDataType​(String name,
                             int numberOfDimensions)
    • Method Detail

      • getElementType

        public DataType getElementType()
        returns the type of the elements of the array
        Returns:
        - the type of the elements of the array
      • getNumberOfDimensions

        public int getNumberOfDimensions()
      • 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
        Specified by:
        getValueType in interface DataType
        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.
        Specified by:
        getTypeAsString in interface DataType
        Returns:
      • getSize

        public List<IntegerValue> getSize()
        Return the dimension list (defined as from XTCE 1.2). The list here is not really used except for populating the ArrayParameterEntry.dim at the MDB load.
        Returns:
      • isFixedSize

        public boolean isFixedSize()
        Returns:
        true if all dimensions are of fixed size
      • getDimension

        public IntegerValue getDimension​(int n)
        Get the size of the nth dimension
      • getFixedSize

        public int[] getFixedSize()
        If isFixedSize() returns true, this method can be used to get the array flat size
        Returns:
      • convertType

        public Object[] convertType​(Object value)
        Parse an initial value specified as an json array. Each element of the array has to be itself an array until reaching the getNumberOfDimensions()

        The return is an java array (Object[]). For multi dimensional arrays each Object it itself an Object[] and so on to reach the number of dimensions,

        The final Object is of type as returned by the element type DataType.convertType(Object)

        Specified by:
        convertType in interface DataType
        Parameters:
        value - value to be converted, use boxed primitive values.
        Returns:
        The preferred java object representation
      • parseStringForRawValue

        public Object parseStringForRawValue​(String stringValue)
        Description copied from interface: DataType
        parses the string into a java object according to the parameter encoding
        Specified by:
        parseStringForRawValue in interface DataType
        Returns:
        a 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
        Returns:
      • getInitialValue

        public Object[] getInitialValue()
        Description copied from interface: DataType
        Get the initial value if any
        Specified by:
        getInitialValue in interface DataType
        Returns: