Class SendChannelValuesWorker
java.lang.Object
io.openems.edge.controller.api.backend.SendChannelValuesWorker
Method
collectData()
is called Synchronously with the Core.Cycle to
collect values of Channels. Sending of values is then delegated to an
asynchronous task.
The logic tries to send changed values once per Cycle and all values once
every SEND_VALUES_OF_ALL_CHANNELS_AFTER_SECONDS
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static com.google.gson.JsonElement
aggregate
(boolean isCumulated, OpenemsType type, Collection<Object> values) aggregateCollector
(boolean isCumulated, OpenemsType type) protected static com.google.gson.JsonElement
aggregateEnumChannel
(Channel<?> channel, LocalDateTime channelStartTime, LocalDateTime endTime) void
Called synchronously on AFTER_PROCESS_IMAGE event.void
Stops theSendChannelValuesWorker
.void
Triggers sending all Channel values once.
-
Constructor Details
-
SendChannelValuesWorker
-
-
Method Details
-
sendValuesOfAllChannelsOnce
public void sendValuesOfAllChannelsOnce()Triggers sending all Channel values once. -
deactivate
public void deactivate()Stops theSendChannelValuesWorker
. -
collectData
public void collectData()Called synchronously on AFTER_PROCESS_IMAGE event. Collects all the data and triggers asynchronous sending. -
aggregateEnumChannel
protected static com.google.gson.JsonElement aggregateEnumChannel(Channel<?> channel, LocalDateTime channelStartTime, LocalDateTime endTime) -
aggregateCollector
protected static Collector<Object,?, aggregateCollectorcom.google.gson.JsonElement> (boolean isCumulated, OpenemsType type) -
aggregate
protected static com.google.gson.JsonElement aggregate(boolean isCumulated, OpenemsType type, Collection<Object> values) throws IllegalArgumentException - Throws:
IllegalArgumentException
-