Class Int8UValue
- java.lang.Object
-
- com.smartgridready.communicator.common.api.values.Value
-
- com.smartgridready.communicator.common.api.values.NumberValue<java.lang.Short>
-
- com.smartgridready.communicator.common.api.values.Int8UValue
-
public class Int8UValue extends NumberValue<java.lang.Short>
Implements an SGr value containing a 8-bit unsigned integer value.
-
-
Field Summary
-
Fields inherited from class com.smartgridready.communicator.common.api.values.NumberValue
value
-
Fields inherited from class com.smartgridready.communicator.common.api.values.Value
UNSIGNED_LONG_MASK
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabsValue()Sets the instance's value to its absolute value, if possible.Int8UValue[]asArray()Gets the value as array.static Int8UValueof(short value)Creates a new instance from short.voidroundToInt()Rounds the instance's value to the nearest integer, if possible.protected voidsetValue(double value)Updates the numeric value.-
Methods inherited from class com.smartgridready.communicator.common.api.values.NumberValue
equals, getBitmap, getBoolean, getDateTime, getEnum, getFloat32, getFloat64, getInt16, getInt16U, getInt32, getInt32U, getInt64, getInt64U, getInt8, getInt8U, getJson, getString, hashCode, scaleDown, scaleUp, toString
-
Methods inherited from class com.smartgridready.communicator.common.api.values.Value
enumToOrdinalValue, fromDiscreteInput, fromModbusRegister, fromString, getJson, toModbusDiscreteVal, toModbusRegister
-
-
-
-
Method Detail
-
setValue
protected void setValue(double value)
Description copied from class:NumberValueUpdates the numeric value.- Specified by:
setValuein classNumberValue<java.lang.Short>- Parameters:
value- a double value
-
asArray
public Int8UValue[] asArray()
Description copied from class:ValueGets the value as array.
-
absValue
public void absValue()
Description copied from class:ValueSets the instance's value to its absolute value, if possible.
-
roundToInt
public void roundToInt()
Description copied from class:ValueRounds the instance's value to the nearest integer, if possible.- Specified by:
roundToIntin classValue
-
of
public static Int8UValue of(short value)
Creates a new instance from short.- Parameters:
value- the short value- Returns:
- an instance of
Int8UValue
-
-