Package org.yamcs.xtce
Class ArrayDataType
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 class
ArrayDataType.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 anyint
getSize()
Return the dimension list (defined as from XTCE 1.2).String which represents the type.Return the expected Value type of an engineering value conforming to this XTCE data typeboolean
parseStringForRawValue
(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, setShortDescription
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
Description copied from interface:DataType
Return the expected Value type of an engineering value conforming to this XTCE data type- Specified by:
getValueType
in interfaceDataType
- Returns:
-
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 interfaceDataType
- Returns:
-
getSize
Return the dimension list (defined as from XTCE 1.2). The list here is not really used except for populating theArrayParameterEntry.dim
at 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:
convertType
in interfaceDataType
- Parameters:
value
- value to be converted, use boxed primitive values.- Returns:
- The preferred java object representation
-
parseStringForRawValue
Description copied from interface:DataType
parses the string into a java object according to the parameter encoding- Specified by:
parseStringForRawValue
in interfaceDataType
- Returns:
- a java object representation
-
toString
Description copied from interface:DataType
Converts a value to a string. -
getInitialValue
Description copied from interface:DataType
Get the initial value if any- Specified by:
getInitialValue
in interfaceDataType
- Returns:
-