Package org.yamcs.xtce
Class IntegerDataType
- java.lang.Object
-
- org.yamcs.xtce.NameDescription
-
- org.yamcs.xtce.BaseDataType
-
- org.yamcs.xtce.NumericDataType
-
- org.yamcs.xtce.IntegerDataType
-
- All Implemented Interfaces:
Serializable,DataType
- Direct Known Subclasses:
IntegerArgumentType,IntegerParameterType
public abstract class IntegerDataType extends NumericDataType
Contains an integral value.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIntegerDataType.Builder<T extends IntegerDataType.Builder<T>>
-
Field Summary
Fields Modifier and Type Field Description protected booleansigned-
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 protectedIntegerDataType(IntegerDataType t)protectedIntegerDataType(IntegerDataType.Builder<?> builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LongconvertType(Object value)In case the provided value is a String, it is parsed to a Long Base 10 (decimal) form unless: if preceded by a 0b or 0B, value is in base two (binary form) if preceded by a 0o or 0O, values is in base 8 (octal) form if preceded by a 0x or 0X, value is in base 16 (hex) form. Underscores (_) are allowed in the string and ignored.LonggetInitialValue()Get the initial value if anyintgetSizeInBits()StringgetTypeAsString()String which represents the type.IntegerValidRangegetValidRange()returns the range for the values of this type to be valid or null if there is no range set (meaning that all values are valid)Yamcs.Value.TypegetValueType()Return the expected Value type of an engineering value conforming to this XTCE data typebooleanisSigned()voidsetInitialValue(Long initialValue)protected voidsetInitialValue(Object initialValue)-
Methods inherited from class org.yamcs.xtce.BaseDataType
getEncoding, getUnitSet, parseStringForRawValue, setInitialValue, setUnitSet, toString
-
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 Detail
-
IntegerDataType
protected IntegerDataType(IntegerDataType.Builder<?> builder)
-
IntegerDataType
protected IntegerDataType(IntegerDataType t)
-
-
Method Detail
-
isSigned
public boolean isSigned()
-
getSizeInBits
public int getSizeInBits()
-
setInitialValue
protected void setInitialValue(Object initialValue)
- Specified by:
setInitialValuein classBaseDataType
-
getValidRange
public IntegerValidRange getValidRange()
returns the range for the values of this type to be valid or null if there is no range set (meaning that all values are valid)- Returns:
-
setInitialValue
public void setInitialValue(Long initialValue)
-
getInitialValue
public Long getInitialValue()
Description copied from interface:DataTypeGet the initial value if any- Returns:
-
convertType
public Long convertType(Object value)
In case the provided value is a String, it is parsed to a Long Base 10 (decimal) form unless:- if preceded by a 0b or 0B, value is in base two (binary form)
- if preceded by a 0o or 0O, values is in base 8 (octal) form
- if preceded by a 0x or 0X, value is in base 16 (hex) form.
NumberFormatExceptionif the value cannot be parsed or does not fit within the specified number of bits- Parameters:
value- value to be converted, use boxed primitive values.- Returns:
- The preferred java object representation
-
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:
-
-