Package io.openems.edge.io.api
Interface AnalogOutput
- All Superinterfaces:
OpenemsComponent
- All Known Subinterfaces:
AnalogVoltageOutput
- All Known Implementing Classes:
DummyAnalogVoltageOutput
,IoFilipowskiMrAo1Impl
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
static final record
Gets the information about the AnalogOutput range, to handle its output values. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Output will be set in Unit.PERCENT, because the power is strongly depending on the controller and its power behavior. -
Method Summary
Modifier and TypeMethodDescriptionGets the set output value of the I/O.default FloatReadChannel
Gets the Channel forAnalogOutput.ChannelId.DEBUG_SET_OUTPUT_PERCENT
.default float
Gets the current set output as factor.default FloatWriteChannel
Gets the Channel forAnalogOutput.ChannelId.SET_OUTPUT_PERCENT
.range()
Range that can be used, limited by the analog IO hardware.Provides a consumer that sets the individual output channel of the implementation.default void
setOutputPercent
(Float value) Sets the output value of the AnalogOutput in %.Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Field Details
-
SET_OUTPUT_ACCURACY
static final int SET_OUTPUT_ACCURACYOutput will be set in Unit.PERCENT, because the power is strongly depending on the controller and its power behavior.- See Also:
-
-
Method Details
-
setOutputChannel
Provides a consumer that sets the individual output channel of the implementation.Accept is called on SetNextWrite of
AnalogOutput.ChannelId.SET_OUTPUT_PERCENT
. The consumed value is already formatted to the current range and precision.Setting the value in a method like setOutputChannel(int output) directly in the implementation would look like it is a common method for other controllers
- Returns:
- consumer, setting the individual output channel
-
range
AnalogOutput.Range range()Range that can be used, limited by the analog IO hardware.E.g. Hardware can be set from 0 to 10V with 0.1V steps.
- Returns:
- maximum range.
-
getSetOutputPercentAsFactor
default float getSetOutputPercentAsFactor()Gets the current set output as factor.- Returns:
- current factor
-
getSetOutputPercentChannel
Gets the Channel forAnalogOutput.ChannelId.SET_OUTPUT_PERCENT
.- Returns:
- the Channel
-
setOutputPercent
Sets the output value of the AnalogOutput in %. SeeAnalogOutput.ChannelId.SET_OUTPUT_PERCENT
.- Parameters:
value
- the next write value- Throws:
OpenemsError.OpenemsNamedException
- on error
-
getDebugSetOutputPercentChannel
Gets the Channel forAnalogOutput.ChannelId.DEBUG_SET_OUTPUT_PERCENT
.- Returns:
- the Channel
-
getDebugSetOutputPercent
Gets the set output value of the I/O. SeeAnalogOutput.ChannelId.DEBUG_SET_OUTPUT_PERCENT
.- Returns:
- the Channel
Value
-