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 class
BinaryDataType.Builder<T extends BinaryDataType.Builder<T>>
-
Field Summary
Fields inherited from class org.yamcs.xtce.BaseDataType
encoding
Fields inherited from class org.yamcs.xtce.NameDescription
ancillaryData, name, PATH_SEPARATOR, qualifiedName, xtceAliasSet
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
BinaryDataType
(BinaryDataType.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
arrayToHexString
(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 void
setInitialValue
(Object initialValue) void
setSizeRangeInBytes
(IntegerRange sizeRangeInBytes) toString()
Converts a value to a string.Methods inherited from class org.yamcs.xtce.BaseDataType
getEncoding, getUnitSet, parseStringForRawValue, setInitialValue, setUnitSet
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, wait, wait, wait
Methods inherited from interface org.yamcs.xtce.DataType
getLongDescription, getName, getQualifiedName, getShortDescription
-
Constructor Details
-
BinaryDataType
-
BinaryDataType
-
-
Method Details
-
setInitialValue
- Specified by:
setInitialValue
in classBaseDataType
-
getInitialValue
public byte[] getInitialValue()Description copied from interface:DataType
Get 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:DataType
Converts a value to a string.- Specified by:
toString
in interfaceDataType
- Overrides:
toString
in 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:DataType
Return the expected Value type of an engineering value conforming to this XTCE data type- Returns:
-
getTypeAsString
Description copied from interface:DataType
String which represents the type. This string will be presented to the users of the system.- Returns:
-