Class ModbusRecordConstant
java.lang.Object
io.openems.edge.common.modbusslave.ModbusRecord
io.openems.edge.common.modbusslave.ModbusRecordConstant
- Direct Known Subclasses:
ModbusRecordFloat32
,ModbusRecordFloat64
,ModbusRecordString16
,ModbusRecordUint16
,ModbusRecordUint32
-
Constructor Summary
ConstructorDescriptionModbusRecordConstant
(int offset, String name, ModbusType type, byte[] value) -
Method Summary
Modifier and TypeMethodDescriptionGets theAccessMode
.getName()
Gets the name.byte[]
getValue()
byte[]
getValue
(OpenemsComponent component) Gets the value.toString()
void
writeValue
(int index, byte byte1, byte byte2) Sets the write value.Methods inherited from class io.openems.edge.common.modbusslave.ModbusRecord
getComponentId, getOffset, getType, getUnit, getValueDescription, setComponentId
-
Constructor Details
-
ModbusRecordConstant
-
-
Method Details
-
toString
-
getValue
public byte[] getValue() -
getValue
Description copied from class:ModbusRecord
Gets the value.- Specified by:
getValue
in classModbusRecord
- Parameters:
component
- the actualOpenemsComponent
- Returns:
- the value as byte array
-
writeValue
public void writeValue(int index, byte byte1, byte byte2) Description copied from class:ModbusRecord
Sets the write value.- Specified by:
writeValue
in classModbusRecord
- Parameters:
index
- the buffer indexbyte1
- the first bytebyte2
- the second byte
-
getName
Description copied from class:ModbusRecord
Gets the name.- Specified by:
getName
in classModbusRecord
- Returns:
- the name
-
getAccessMode
Description copied from class:ModbusRecord
Gets theAccessMode
.- Specified by:
getAccessMode
in classModbusRecord
- Returns:
- the
AccessMode
-