Class FloatDoublewordElement
- 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.AbstractDoubleWordElement<FloatDoublewordElement,java.lang.Float>
-
- io.openems.edge.bridge.modbus.api.element.FloatDoublewordElement
-
- All Implemented Interfaces:
ModbusElement<java.lang.Float>
,ModbusRegisterElement<java.lang.Float>
public class FloatDoublewordElement extends AbstractDoubleWordElement<FloatDoublewordElement,java.lang.Float>
A FloatDoublewordElement represents a Float value according to IEEE-754 in anAbstractDoubleWordElement
.
-
-
Field Summary
-
Fields inherited from class io.openems.edge.bridge.modbus.api.element.AbstractModbusElement
abstractTask, onSetNextWriteCallbacks
-
-
Constructor Summary
Constructors Constructor Description FloatDoublewordElement(int address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Float
fromByteBuffer(java.nio.ByteBuffer buff)
Converts a 4-byte ByteBuffer to the the current OpenemsType.protected FloatDoublewordElement
self()
Gets an instance of the correct subclass of myself.protected java.nio.ByteBuffer
toByteBuffer(java.nio.ByteBuffer buff, java.lang.Float value)
Converts the current OpenemsType to a 4-byte ByteBuffer.-
Methods inherited from class io.openems.edge.bridge.modbus.api.element.AbstractDoubleWordElement
_setInputRegisters, _setNextWriteValue, getLength, wordOrder
-
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
-
-
-
-
Method Detail
-
self
protected FloatDoublewordElement self()
Description copied from class:AbstractDoubleWordElement
Gets an instance of the correct subclass of myself.- Specified by:
self
in classAbstractDoubleWordElement<FloatDoublewordElement,java.lang.Float>
- Returns:
- myself
-
fromByteBuffer
protected java.lang.Float fromByteBuffer(java.nio.ByteBuffer buff)
Description copied from class:AbstractDoubleWordElement
Converts a 4-byte ByteBuffer to the the current OpenemsType.- Specified by:
fromByteBuffer
in classAbstractDoubleWordElement<FloatDoublewordElement,java.lang.Float>
- Parameters:
buff
- the ByteBuffer- Returns:
- an instance of the given OpenemsType
-
toByteBuffer
protected java.nio.ByteBuffer toByteBuffer(java.nio.ByteBuffer buff, java.lang.Float value)
Description copied from class:AbstractDoubleWordElement
Converts the current OpenemsType to a 4-byte ByteBuffer.- Specified by:
toByteBuffer
in classAbstractDoubleWordElement<FloatDoublewordElement,java.lang.Float>
- Parameters:
buff
- the target ByteBuffervalue
- an instance of the given OpenemsType- Returns:
- the ByteBuffer
-
-