java.lang.Object
org.yamcs.utils.ValueUtility
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intstatic booleanstatic ValuefromGpb(org.yamcs.protobuf.Yamcs.Value v) static ValuegetBinaryValue(byte[] x) static ValuegetBooleanValue(boolean b) static ValuegetColumnValue(ColumnDefinition cd, Object v) static org.yamcs.protobuf.Yamcs.ValuegetDoubleGbpValue(double d) static ValuegetDoubleValue(double d) static EnumeratedValuegetEnumeratedValue(long longValue, String stringValue) static ValuegetFloatValue(float f) static ValuegetFloatValue(int sizeInBits, double v) static ValuegetIntValue(int sizeInBits, boolean signed, long v) static ValuegetSint32Value(int x) static ValuegetSint64Value(long x) static org.yamcs.protobuf.Yamcs.Valuestatic Valuestatic ValuegetTimestampValue(long x) static org.yamcs.protobuf.Yamcs.ValuegetUint32GbpValue(int x) static ValuegetUint32Value(int x) static ValuegetUint64Value(long x) static DataTypegetYarchType(org.yamcs.protobuf.Yamcs.Value.Type type) static Objectstatic ObjectgetYarchValue(org.yamcs.protobuf.Yamcs.Value v) static booleanif the passed on value is float, double or integer invoke the function on the double value and return truestatic booleanif 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 booleanprocessAsLong(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 org.yamcs.protobuf.Yamcs.AggregateValuestatic org.yamcs.protobuf.Yamcs.Value
-
Constructor Details
-
ValueUtility
public ValueUtility()
-
-
Method Details
-
getUint32Value
-
getSint32Value
-
getUint64Value
-
getSint64Value
-
getStringValue
-
getBinaryValue
-
getTimestampValue
-
getBooleanValue
-
getFloatValue
-
getDoubleValue
-
getDoubleGbpValue
public static org.yamcs.protobuf.Yamcs.Value getDoubleGbpValue(double d) -
getStringGbpValue
-
getUint32GbpValue
public static org.yamcs.protobuf.Yamcs.Value getUint32GbpValue(int x) -
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
-