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 Details
-
Value
public Value()
-
-
Method Details
-
getType
public abstract org.yamcs.protobuf.Yamcs.Value.Type 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.
-