Package org.yamcs.utils
Class ValueUtility
java.lang.Object
org.yamcs.utils.ValueUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
static boolean
static Value
static Value
getBinaryValue
(byte[] x) static Value
getBooleanValue
(boolean b) static Value
getColumnValue
(ColumnDefinition cd, Object v) static Yamcs.Value
getDoubleGbpValue
(double d) static Value
getDoubleValue
(double d) static EnumeratedValue
getEnumeratedValue
(long longValue, String stringValue) static Value
getFloatValue
(float f) static Value
getFloatValue
(int sizeInBits, double v) static Value
getIntValue
(int sizeInBits, boolean signed, long v) static Value
getSint32Value
(int x) static Value
getSint64Value
(long x) static Yamcs.Value
static Value
static Value
getTimestampValue
(long x) static Yamcs.Value
getUint32GbpValue
(int x) static Value
getUint32Value
(int x) static Value
getUint64Value
(long x) static DataType
getYarchType
(Yamcs.Value.Type type) static Object
static Object
static boolean
if the passed on value is float, double or integer invoke the function on the double value and return truestatic boolean
if the passed on value is FLOAT or DOUBLE, invoke the function on the double value and return true if v is of other types return falsestatic boolean
processAsLong
(Value v, LongConsumer c) if the passed on value is INT32, SINT32, INT64 or SINT64, invoke the function on the long value and return true if v is of other types return falsestatic Yamcs.AggregateValue
static Yamcs.Value
-
Constructor Details
-
ValueUtility
public ValueUtility()
-
-
Method Details
-
getUint32Value
-
getSint32Value
-
getUint64Value
-
getSint64Value
-
getStringValue
-
getBinaryValue
-
getTimestampValue
-
getBooleanValue
-
getFloatValue
-
getDoubleValue
-
getDoubleGbpValue
-
getStringGbpValue
-
getUint32GbpValue
-
getColumnValue
-
getYarchValue
-
getYarchValue
-
getYarchType
-
equals
-
compare
-
toGbp
-
toGbp
-
fromGpb
-
processAsLong
if the passed on value is INT32, SINT32, INT64 or SINT64, invoke the function on the long value and return true if v is of other types return false- Parameters:
v
-c
-- Returns:
-
processAsDouble
if the passed on value is float, double or integer invoke the function on the double value and return trueif v is of other types return false
- Parameters:
v
- - the value to be processedc
- - the function to be invoked with the value transformed to a primitive double- Returns:
-
processAsDouble1
if the passed on value is FLOAT or DOUBLE, invoke the function on the double value and return true if v is of other types return false- Parameters:
v
-c
-- Returns:
-
getEnumeratedValue
-
getIntValue
- Parameters:
sizeInBits
-signed
-v
-- Returns:
-
getFloatValue
-