Class AggregateDataType

java.lang.Object
org.yamcs.xtce.NameDescription
org.yamcs.xtce.AggregateDataType
All Implemented Interfaces:
Serializable, DataType
Direct Known Subclasses:
AggregateArgumentType, AggregateParameterType

public class AggregateDataType extends NameDescription implements DataType
See Also:
  • Constructor Details

  • Method Details

    • 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:
    • getMember

      public Member getMember(String name)
      Returns a member on the given name. If no such member is present return null
      Parameters:
      name - the name of the member to be returned
      Returns:
      the member with the given name
    • getMemberList

      public List<Member> getMemberList()
    • 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:
    • getMember

      public Member getMember(String[] path)
      Returns a member in a hierarchical aggregate. It is equivalent with a chained call of getMember(String):
       getMember(path[0]).getMember(path[1])...getMember(path[n])
       
      assuming that all the elements on the path exist.
      Parameters:
      path - - the path to be traversed. Its length has to be at least 1 - otherwise an IllegalArgumentException will be thrown.
      Returns:
      the member obtained by traversing the path or null if not such member exist.
    • getMemberNames

      public AggregateMemberNames getMemberNames()
      Returns:
      the (unique) object encoding the member names
    • numMembers

      public int numMembers()
    • getMember

      public Member getMember(int idx)
    • convertType

      public Map<String,Object> convertType(Object value)
      Parse the initial value as a JSON string.

      This allows to specify only partially the values, the rest are copied from the member initial value or the type definition (an exception is thrown if there is any member for which the value cannot be determined).

      Specified by:
      convertType in interface DataType
      Parameters:
      value - value to be converted, use boxed primitive values.
      Returns:
      a map containing the values for all members.
      Throws:
      IllegalArgumentException - if the string cannot be parsed or if values cannot be determined for all members
    • parseStringForRawValue

      public Map<String,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
    • getInitialValue

      public Map<String,Object> getInitialValue()
      Description copied from interface: DataType
      Get the initial value if any
      Specified by:
      getInitialValue in interface DataType
      Returns:
    • toString

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