Package org.yamcs.parameter
Class Value
java.lang.Object
org.yamcs.parameter.Value
- Direct Known Subclasses:
AggregateValue
,ArrayValue
,BinaryValue
,BooleanValue
,DoubleValue
,EnumeratedValue
,FloatValue
,SInt32Value
,SInt64Value
,StringValue
,TimestampValue
,UInt32Value
,UInt64Value
Union like class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
boolean
double
float
int
long
long
abstract Yamcs.Value.Type
getType()
int
long
double
toDouble()
return the value as a double.long
toLong()
-
Constructor Details
-
Value
public Value()
-
-
Method Details
-
getType
-
getUint32Value
public int getUint32Value() -
getSint32Value
public int getSint32Value() -
getUint64Value
public long getUint64Value() -
getSint64Value
public long getSint64Value() -
getBinaryValue
public byte[] getBinaryValue() -
getStringValue
-
getFloatValue
public float getFloatValue() -
getDoubleValue
public double getDoubleValue() -
getBooleanValue
public boolean getBooleanValue() -
getTimestampValue
public long getTimestampValue() -
toLong
public long toLong()- Returns:
- the value as signed long
- Throws:
UnsupportedOperationException
- if the value cannot be converted - for example if a double value is encountered or an unsigned 64 bits integer greater thanLong.MAX_VALUE
-
toDouble
public double toDouble()return the value as a double. Precision will be lost when converting large integer numbers.- Throws:
UnsupportedOperationException
- for non numeric values.
-