Package org.yamcs.xtce
Class BinaryDataType
java.lang.Object
org.yamcs.xtce.NameDescription
org.yamcs.xtce.BaseDataType
org.yamcs.xtce.BinaryDataType
- All Implemented Interfaces:
Serializable,DataType
- Direct Known Subclasses:
BinaryArgumentType,BinaryParameterType
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBinaryDataType.Builder<T extends BinaryDataType.Builder<T>> -
Field Summary
Fields inherited from class org.yamcs.xtce.BaseDataType
encodingFields inherited from class org.yamcs.xtce.NameDescription
ancillaryData, name, PATH_SEPARATOR, qualifiedName, xtceAliasSet -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedBinaryDataType(BinaryDataType.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarrayToHexString(byte[] b) byte[]convertType(Object value) parse the hexadecimal stringValue into byte[]byte[]Get the initial value if anyString which represents the type.Return the expected Value type of an engineering value conforming to this XTCE data typestatic byte[]Converts a hex string into a byte array.protected voidsetInitialValue(Object initialValue) voidsetSizeRangeInBytes(IntegerRange sizeRangeInBytes) toString()Converts a value to a string.Methods inherited from class org.yamcs.xtce.BaseDataType
getEncoding, getUnitSet, parseStringForRawValue, setInitialValue, setUnitSetMethods 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, wait, wait, waitMethods inherited from interface org.yamcs.xtce.DataType
getLongDescription, getName, getQualifiedName, getShortDescription
-
Constructor Details
-
BinaryDataType
-
BinaryDataType
-
-
Method Details
-
setInitialValue
- Specified by:
setInitialValuein classBaseDataType
-
getInitialValue
public byte[] getInitialValue()Description copied from interface:DataTypeGet the initial value if any- Returns:
-
getSizeRangeInBytes
-
setSizeRangeInBytes
-
toString
-
convertType
parse the hexadecimal stringValue into byte[]- Parameters:
value- value to be converted, use boxed primitive values.- Returns:
- The preferred java object representation
-
toString
Description copied from interface:DataTypeConverts a value to a string.- Specified by:
toStringin interfaceDataType- Overrides:
toStringin classBaseDataType- Returns:
-
hexStringToArray
Converts a hex string into a byte array. If the string has an odd number of hex digits, a 0 is prepended in front. if the string contains something else than 0-9, a-f, a NumberFormatException is thrown from Integer.parseInt with radix 16- Parameters:
s-- Returns:
- byte array resulted from parsing the string
-
arrayToHexString
-
getValueType
Description copied from interface:DataTypeReturn the expected Value type of an engineering value conforming to this XTCE data type- Returns:
-
getTypeAsString
Description copied from interface:DataTypeString which represents the type. This string will be presented to the users of the system.- Returns:
-