Class Int8Value
- java.lang.Object
-
- com.smartgridready.communicator.common.api.values.Value
-
- com.smartgridready.communicator.common.api.values.NumberValue<java.lang.Byte>
-
- com.smartgridready.communicator.common.api.values.Int8Value
-
public class Int8Value extends NumberValue<java.lang.Byte>
Implements an SGr value containing a 8-bit signed 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.Int8Value[]asArray()Gets the value as array.static Int8Valueof(byte value)Creates a new instance from byte.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.Byte>- Parameters:
value- a double value
-
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
-
-