java.lang.Object
org.yamcs.mdb.ParameterTypeUtils
Contains various static methods to help work with XTCE
ParameterType-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckEngValueAssignment(org.yamcs.xtce.Parameter p, Value engValue) Checks that a value can be assigned to a parameter as engineering value.static voidcheckEngValueAssignment(org.yamcs.xtce.ParameterType ptype, Value engValue) static ValuegetEngFloatValue(org.yamcs.xtce.FloatParameterType ptype, Object value) static ValuegetEngIntegerValue(org.yamcs.xtce.IntegerParameterType ptype, Object value) static ValuegetEngValue(org.yamcs.xtce.ParameterType ptype, Object value) Returns a Value corresponding to the java object and the parameter type or null if the parameter cannot be converted Note that the operation may involve some casting and loss of precision (e.g. from long to int or double to float)static ValueparseString(org.yamcs.xtce.DataType type, String paramValue)
-
Constructor Details
-
ParameterTypeUtils
public ParameterTypeUtils()
-
-
Method Details
-
checkEngValueAssignment
Checks that a value can be assigned to a parameter as engineering value. Otherwise throws an IllegalArgumentException- Parameters:
p-engValue-
-
checkEngValueAssignment
-
parseString
-
getEngValue
Returns a Value corresponding to the java object and the parameter type or null if the parameter cannot be converted Note that the operation may involve some casting and loss of precision (e.g. from long to int or double to float)- Parameters:
ptype-value-- Returns:
-
getEngIntegerValue
-
getEngFloatValue
-