Class SendChannelValuesWorker


public class SendChannelValuesWorker extends Object
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 Details

  • Method Details

    • sendValuesOfAllChannelsOnce

      public void sendValuesOfAllChannelsOnce()
      Triggers sending all Channel values once.
    • deactivate

      public void deactivate()
    • collectData

      public void collectData()
      Called synchronously on AFTER_PROCESS_IMAGE event. Collects all the data and triggers asynchronous sending.
    • aggregateEnumChannel

      protected static aggregateEnumChannel(Channel<?> channel, LocalDateTime channelStartTime, LocalDateTime endTime)
    • aggregateCollector

      protected static Collector<Object,?,> aggregateCollector(boolean isCumulated, OpenemsType type)
    • aggregate

      protected static aggregate(boolean isCumulated, OpenemsType type, Collection<Object> values) throws IllegalArgumentException