Class AbstractOpenemsModbusComponent.ChannelMapper<ELEMENT extends ModbusElement>
java.lang.Object
io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent.ChannelMapper<ELEMENT>
- Enclosing class:
AbstractOpenemsModbusComponent
public class AbstractOpenemsModbusComponent.ChannelMapper<ELEMENT extends ModbusElement>
extends Object
Maps an Element to one or more ModbusChannels using converters, that convert
the value forward and backwards.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theAbstractOpenemsModbusComponent.ChannelMapper
.m
(ChannelId channelId, ElementToChannelConverter converter) Maps the given element 1-to-1 to the Channel identified by channelId.m
(ChannelId channelId, ElementToChannelConverter converter, ChannelMetaInfo channelMetaInfo) Maps the given element 1-to-1 to the Channel identified by channelId.m
(ChannelId channelId, Function<Object, Object> elementToChannel, Function<Object, Object> channelToElement) Maps the given element to the Channel identified by channelId, applying the given @link{ElementToChannelConverter}.
-
Constructor Details
-
ChannelMapper
-
-
Method Details
-
m
public AbstractOpenemsModbusComponent.ChannelMapper<ELEMENT> m(ChannelId channelId, ElementToChannelConverter converter) Maps the given element 1-to-1 to the Channel identified by channelId.- Parameters:
channelId
- the Channel-IDconverter
- theElementToChannelConverter
- Returns:
- the element parameter
-
m
public AbstractOpenemsModbusComponent.ChannelMapper<ELEMENT> m(ChannelId channelId, ElementToChannelConverter converter, ChannelMetaInfo channelMetaInfo) Maps the given element 1-to-1 to the Channel identified by channelId.- Parameters:
channelId
- the Channel-IDconverter
- theElementToChannelConverter
channelMetaInfo
- an object that holds meta information about the Channel- Returns:
- the element parameter
-
m
public AbstractOpenemsModbusComponent.ChannelMapper<ELEMENT> m(ChannelId channelId, Function<Object, Object> elementToChannel, Function<Object, Object> channelToElement) Maps the given element to the Channel identified by channelId, applying the given @link{ElementToChannelConverter}. -
build
Builds theAbstractOpenemsModbusComponent.ChannelMapper
.- Returns:
- the
AbstractOpenemsModbusComponent.ChannelMapper
-