Class MyRegister
java.lang.Object
io.openems.edge.controller.api.modbus.MyRegister
- All Implemented Interfaces:
com.ghgande.j2mod.modbus.procimg.InputRegister
,com.ghgande.j2mod.modbus.procimg.Register
Largely copied from
SynchronizedAbstractRegister
.-
Constructor Summary
ConstructorsConstructorDescriptionMyRegister
(int index, byte byte1, byte byte2, Consumer<MyRegister> callback) -
Method Summary
-
Constructor Details
-
MyRegister
-
-
Method Details
-
getIndex
protected int getIndex() -
getByte1
protected byte getByte1() -
getByte2
protected byte getByte2() -
getValue
public int getValue()- Specified by:
getValue
in interfacecom.ghgande.j2mod.modbus.procimg.InputRegister
-
toUnsignedShort
public int toUnsignedShort()- Specified by:
toUnsignedShort
in interfacecom.ghgande.j2mod.modbus.procimg.InputRegister
-
toShort
public short toShort()- Specified by:
toShort
in interfacecom.ghgande.j2mod.modbus.procimg.InputRegister
-
toBytes
public byte[] toBytes()- Specified by:
toBytes
in interfacecom.ghgande.j2mod.modbus.procimg.InputRegister
-
setValue
protected void setValue(byte byte1, byte byte2) -
setValue
public void setValue(int v) - Specified by:
setValue
in interfacecom.ghgande.j2mod.modbus.procimg.Register
-
setValue
public final void setValue(short s) - Specified by:
setValue
in interfacecom.ghgande.j2mod.modbus.procimg.Register
-
setValue
public void setValue(byte[] bytes) - Specified by:
setValue
in interfacecom.ghgande.j2mod.modbus.procimg.Register
-