Package org.yamcs.xtce
Class AggregateDataType
java.lang.Object
org.yamcs.xtce.NameDescription
org.yamcs.xtce.AggregateDataType
- All Implemented Interfaces:
Serializable,DataType
- Direct Known Subclasses:
AggregateArgumentType,AggregateParameterType
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAggregateDataType.Builder<T extends AggregateDataType.Builder<T>> -
Field Summary
Fields inherited from class org.yamcs.xtce.NameDescription
ancillaryData, name, PATH_SEPARATOR, qualifiedName, xtceAliasSet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertType(Object value) Parse the initial value as a JSON string.Get the initial value if anygetMember(int idx) Returns a member on the given name.Returns a member in a hierarchical aggregate.String which represents the type.Return the expected Value type of an engineering value conforming to this XTCE data typeintparseStringForRawValue(String stringValue) parses the string into a java object according to the parameter encodingConverts a value to a string.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, setShortDescriptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.yamcs.xtce.DataType
getLongDescription, getName, getQualifiedName, getShortDescription
-
Constructor Details
-
AggregateDataType
-
AggregateDataType
-
-
Method Details
-
getTypeAsString
Description copied from interface:DataTypeString which represents the type. This string will be presented to the users of the system.- Specified by:
getTypeAsStringin interfaceDataType- Returns:
-
getMember
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
-
getValueType
Description copied from interface:DataTypeReturn the expected Value type of an engineering value conforming to this XTCE data type- Specified by:
getValueTypein interfaceDataType- Returns:
-
getMember
Returns a member in a hierarchical aggregate. It is equivalent with a chained call ofgetMember(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 anIllegalArgumentExceptionwill be thrown.- Returns:
- the member obtained by traversing the path or null if not such member exist.
-
getMemberNames
- Returns:
- the (unique) object encoding the member names
-
numMembers
public int numMembers() -
getMember
-
convertType
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.
Since Yamcs 5.11.9, it does not enforce that all members are present. This is because some values may be deduced from array lengths
- Specified by:
convertTypein interfaceDataType- 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
Description copied from interface:DataTypeparses the string into a java object according to the parameter encoding- Specified by:
parseStringForRawValuein interfaceDataType- Returns:
- a java object representation
-
getInitialValue
Description copied from interface:DataTypeGet the initial value if any- Specified by:
getInitialValuein interfaceDataType- Returns:
-
toString
Description copied from interface:DataTypeConverts a value to a string.
-