Class UnsignedWordElement
java.lang.Object
io.openems.edge.bridge.modbus.api.element.AbstractModbusElement<T>
io.openems.edge.bridge.modbus.api.element.AbstractModbusRegisterElement<E,T>
io.openems.edge.bridge.modbus.api.element.AbstractWordElement<UnsignedWordElement,Integer>
io.openems.edge.bridge.modbus.api.element.UnsignedWordElement
- All Implemented Interfaces:
ModbusElement<Integer>
,ModbusRegisterElement<Integer>
- Direct Known Subclasses:
BitsWordElement
An UnsignedWordElement represents an Integer value in an
AbstractWordElement
.-
Field Summary
Fields inherited from class io.openems.edge.bridge.modbus.api.element.AbstractModbusElement
abstractTask, onSetNextWriteCallbacks
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Integer
fromByteBuffer
(ByteBuffer buff) Converts a 2-byte ByteBuffer to the the current OpenemsType.protected UnsignedWordElement
self()
Gets an instance of the correct subclass of myself.protected ByteBuffer
toByteBuffer
(ByteBuffer buff, Object object) Converts the current OpenemsType to a 2-byte ByteBuffer.Methods inherited from class io.openems.edge.bridge.modbus.api.element.AbstractWordElement
_setInputRegisters, _setNextWriteValue, getLength
Methods inherited from class io.openems.edge.bridge.modbus.api.element.AbstractModbusRegisterElement
byteOrder, getByteOrder, getNextWriteValue, setInputRegisters, setNextWriteValueRegisters
Methods inherited from class io.openems.edge.bridge.modbus.api.element.AbstractModbusElement
deactivate, debug, getModbusTask, getStartAddress, getType, invalidate, isDebug, isIgnored, onSetNextWrite, onUpdateCallback, setModbusTask, setValue, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.openems.edge.bridge.modbus.api.element.ModbusElement
deactivate, getStartAddress, getType, invalidate, isIgnored, onSetNextWrite, setModbusTask
Methods inherited from interface io.openems.edge.bridge.modbus.api.element.ModbusRegisterElement
getNextWriteValueAndReset, setNextWriteValue
-
Constructor Details
-
UnsignedWordElement
public UnsignedWordElement(int address)
-
-
Method Details
-
self
Description copied from class:AbstractModbusRegisterElement
Gets an instance of the correct subclass of myself.- Specified by:
self
in classAbstractModbusRegisterElement<UnsignedWordElement,
Integer> - Returns:
- myself
-
fromByteBuffer
Description copied from class:AbstractWordElement
Converts a 2-byte ByteBuffer to the the current OpenemsType.- Specified by:
fromByteBuffer
in classAbstractWordElement<UnsignedWordElement,
Integer> - Parameters:
buff
- the ByteBuffer- Returns:
- an instance of the current OpenemsType
-
toByteBuffer
Description copied from class:AbstractWordElement
Converts the current OpenemsType to a 2-byte ByteBuffer.- Specified by:
toByteBuffer
in classAbstractWordElement<UnsignedWordElement,
Integer> - Parameters:
buff
- the target ByteBufferobject
- the value- Returns:
- the ByteBuffer
-