java.lang.Object
org.yamcs.xtce.NameDescription
org.yamcs.xtce.ArrayDataType
- All Implemented Interfaces:
Serializable,DataType
- Direct Known Subclasses:
ArrayArgumentType,ArrayParameterType
An array of values of the type referenced in
type and have the number of array dimensions as specified in
numberOfDimensions- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classArrayDataType.Builder<T extends ArrayDataType.Builder<T>> -
Field Summary
Fields inherited from class org.yamcs.xtce.NameDescription
ancillaryData, name, PATH_SEPARATOR, qualifiedName, xtceAliasSet -
Constructor Summary
ConstructorsConstructorDescriptionArrayDataType(String name, int numberOfDimensions) ArrayDataType(ArrayDataType.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionObject[]convertType(Object value) Parse an initial value specified as an json array.getDimension(int n) Get the size of the nth dimensionreturns the type of the elements of the arrayint[]IfisFixedSize()returns true, this method can be used to get the array flat sizeObject[]Get the initial value if anyintgetSize()Return the dimension list (defined as from XTCE 1.2).String which represents the type.org.yamcs.protobuf.Yamcs.Value.TypeReturn the expected Value type of an engineering value conforming to this XTCE data typebooleanparseStringForRawValue(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
-
ArrayDataType
-
ArrayDataType
-
ArrayDataType
-
-
Method Details
-
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 org.yamcs.protobuf.Yamcs.Value.Type 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:
-
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:
-
getSize
Return the dimension list (defined as from XTCE 1.2). The list here is not really used except for populating theArrayParameterEntry.dimat the MDB load.- Returns:
-
isFixedSize
public boolean isFixedSize()- Returns:
- true if all dimensions are of fixed size
-
getDimension
Get the size of the nth dimension -
getFixedSize
public int[] getFixedSize()IfisFixedSize()returns true, this method can be used to get the array flat size- Returns:
-
convertType
Parse an initial value specified as an json array. Each element of the array has to be itself an array until reaching thegetNumberOfDimensions()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:
convertTypein interfaceDataType- Parameters:
value- value to be converted, use boxed primitive values.- Returns:
- The preferred java object representation
-
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
-
toString
Description copied from interface:DataTypeConverts a value to a string. -
getInitialValue
Description copied from interface:DataTypeGet the initial value if any- Specified by:
getInitialValuein interfaceDataType- Returns:
-