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
public class BinaryDataType extends BaseDataType
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBinaryDataType.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
Constructors Modifier Constructor Description protectedBinaryDataType(BinaryDataType t)protectedBinaryDataType(BinaryDataType.Builder<?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringarrayToHexString(byte[] b)byte[]getInitialValue()Get the initial value if anyIntegerRangegetSizeRangeInBytes()StringgetTypeAsString()String which represents the type.Yamcs.Value.TypegetValueType()Return the expected Value type of an engineering value conforming to this XTCE data typestatic byte[]hexStringToArray(String s)Converts a hex string into a byte array.byte[]parseString(String stringValue)parse the hexadecimal stringValue into byte[]protected voidsetInitialValue(Object initialValue)voidsetSizeRangeInBytes(IntegerRange sizeRangeInBytes)StringtoString()StringtoString(Object v)Converts a value to a string.-
Methods inherited from class org.yamcs.xtce.BaseDataType
getEncoding, getUnitSet, parseStringForRawValue, setInitialValue
-
Methods inherited from class org.yamcs.xtce.NameDescription
addAlias, addAliases, addAncillaryData, getAlias, getAliasSet, getAncillaryData, getLongDescription, getName, getName, getOpsName, getQualifiedName, getShortDescription, getSubsystemName, getSubsystemName, 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, getShortDescription
-
-
-
-
Constructor Detail
-
BinaryDataType
protected BinaryDataType(BinaryDataType.Builder<?> builder)
-
BinaryDataType
protected BinaryDataType(BinaryDataType t)
-
-
Method Detail
-
setInitialValue
protected void setInitialValue(Object initialValue)
- Specified by:
setInitialValuein classBaseDataType
-
getInitialValue
public byte[] getInitialValue()
Description copied from interface:DataTypeGet the initial value if any- Returns:
-
getSizeRangeInBytes
public IntegerRange getSizeRangeInBytes()
-
setSizeRangeInBytes
public void setSizeRangeInBytes(IntegerRange sizeRangeInBytes)
-
parseString
public byte[] parseString(String stringValue)
parse the hexadecimal stringValue into byte[]- Specified by:
parseStringin interfaceDataType- Specified by:
parseStringin classBaseDataType- Returns:
-
toString
public String toString(Object v)
Description copied from interface:DataTypeConverts a value to a string. This should be the reverse ofDataType.parseString(String).- Specified by:
toStringin interfaceDataType- Overrides:
toStringin classBaseDataType- Returns:
-
hexStringToArray
public static byte[] hexStringToArray(String s)
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
public static String arrayToHexString(byte[] b)
-
getValueType
public Yamcs.Value.Type getValueType()
Description copied from interface:DataTypeReturn the expected Value type of an engineering value conforming to this XTCE data type- Returns:
-
-