Package org.yamcs.xtce
Interface DataType
-
- All Known Subinterfaces:
ArgumentType,NumericParameterType,ParameterType
- All Known Implementing Classes:
AbsoluteTimeArgumentType,AbsoluteTimeDataType,AbsoluteTimeParameterType,AggregateArgumentType,AggregateDataType,AggregateParameterType,ArrayArgumentType,ArrayDataType,ArrayParameterType,BaseDataType,BaseTimeDataType,BinaryArgumentType,BinaryDataType,BinaryParameterType,BooleanArgumentType,BooleanDataType,BooleanParameterType,EnumeratedArgumentType,EnumeratedDataType,EnumeratedParameterType,FloatArgumentType,FloatDataType,FloatParameterType,IntegerArgumentType,IntegerDataType,IntegerParameterType,NumericDataType,StringArgumentType,StringDataType,StringParameterType
public interface DataTypeInterface for all XTCE data types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDataType.Builder<T extends DataType.Builder<T>>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectconvertType(Object value)Converts to the canonical (boxed) java representation of this type.ObjectgetInitialValue()Get the initial value if anyStringgetLongDescription()StringgetName()StringgetQualifiedName()StringgetShortDescription()StringgetTypeAsString()String which represents the type.Yamcs.Value.TypegetValueType()Return the expected Value type of an engineering value conforming to this XTCE data typeObjectparseStringForRawValue(String stringValue)parses the string into a java object according to the parameter encodingStringtoString(Object v)Converts a value to a string.
-
-
-
Method Detail
-
getTypeAsString
String getTypeAsString()
String which represents the type. This string will be presented to the users of the system.- Returns:
-
getName
String getName()
- Returns:
- the name of the type
-
convertType
Object convertType(Object value)
Converts to the canonical (boxed) java representation of this type.For example, if
valueis aString, an integer-like DataType should parse the String value, and return an Integer result.- Parameters:
value- value to be converted, use boxed primitive values.- Returns:
- The preferred java object representation
- Throws:
IllegalArgumentException- when the provided value cannot be represented by this type.
-
parseStringForRawValue
Object parseStringForRawValue(String stringValue)
parses the string into a java object according to the parameter encoding- Parameters:
stringValue-- Returns:
- a java object representation
- Throws:
IllegalArgumentException- if the string cannot be parsed
-
getInitialValue
Object getInitialValue()
Get the initial value if any- Returns:
-
getValueType
Yamcs.Value.Type getValueType()
Return the expected Value type of an engineering value conforming to this XTCE data type- Returns:
-
getShortDescription
String getShortDescription()
-
getLongDescription
String getLongDescription()
-
getQualifiedName
String getQualifiedName()
-
-