Class SunSpecPoint.PointImpl
- java.lang.Object
-
- io.openems.edge.bridge.modbus.sunspec.SunSpecPoint.PointImpl
-
- Enclosing interface:
- SunSpecPoint
public static class SunSpecPoint.PointImpl extends java.lang.Object
The internal PointImpl object for easier handling in Enums.
-
-
Field Summary
Fields Modifier and Type Field Description AccessMode
accessMode
SunSChannelId<?>
channelId
java.lang.String
description
java.lang.String
label
boolean
mandatory
java.lang.String
notes
OptionsEnum[]
options
java.util.Optional<java.lang.String>
scaleFactor
SunSpecPoint.PointType
type
Unit
unit
-
Constructor Summary
Constructors Constructor Description PointImpl(java.lang.String channelId, java.lang.String label, java.lang.String description, java.lang.String notes, SunSpecPoint.PointType type, boolean mandatory, AccessMode accessMode, Unit unit, java.lang.String scaleFactor, OptionsEnum[] options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractModbusElement<?>
generateModbusElement(java.lang.Integer startAddress)
Generates a Modbus Element for the given point + startAddress.OpenemsType
getMatchingOpenemsType(boolean hasScaleFactor)
Gets theOpenemsType
that matches this SunSpec-Type.
-
-
-
Field Detail
-
label
public final java.lang.String label
-
description
public final java.lang.String description
-
notes
public final java.lang.String notes
-
type
public final SunSpecPoint.PointType type
-
mandatory
public final boolean mandatory
-
accessMode
public final AccessMode accessMode
-
unit
public final Unit unit
-
channelId
public final SunSChannelId<?> channelId
-
scaleFactor
public final java.util.Optional<java.lang.String> scaleFactor
-
options
public final OptionsEnum[] options
-
-
Constructor Detail
-
PointImpl
public PointImpl(java.lang.String channelId, java.lang.String label, java.lang.String description, java.lang.String notes, SunSpecPoint.PointType type, boolean mandatory, AccessMode accessMode, Unit unit, java.lang.String scaleFactor, OptionsEnum[] options)
-
-
Method Detail
-
generateModbusElement
public final AbstractModbusElement<?> generateModbusElement(java.lang.Integer startAddress)
Generates a Modbus Element for the given point + startAddress.- Parameters:
startAddress
- the startAddress of the Point- Returns:
- a new Modbus Element
-
getMatchingOpenemsType
public final OpenemsType getMatchingOpenemsType(boolean hasScaleFactor)
Gets theOpenemsType
that matches this SunSpec-Type.- Parameters:
hasScaleFactor
- true if this Point has a ScaleFactor. If true, a floating point type is applied to avoid rounding errors.- Returns:
- the
OpenemsType
-
-