Class AbstractDataNotification

Direct Known Subclasses:
AggregatedDataNotification, ResendDataNotification, TimestampedDataNotification

public abstract class AbstractDataNotification extends JsonrpcNotification
Represents a JSON-RPC Notification for timestamped or aggregated data sent from Edge to Backend.
   "jsonrpc": "2.0",
   "method": "timestampedData | aggregatedData",
   "params": {
     [timestamp: epoch in milliseconds]: {
       [channelAddress]: T
  • Constructor Details

    • AbstractDataNotification

      protected AbstractDataNotification(String method,<Long,String,> data)
  • Method Details

    • parseParams

      protected static<Long,String,> parseParams( params) throws OpenemsError.OpenemsNamedException
    • add

      public void add(long timestamp, Map<String,> data)
      Add timestamped data.
      timestamp - the timestamp epoch in milliseconds
      data - a map of Channel-Address to JsonElement value
    • add

      public void add(long timestamp, String address, value)
      Add a timestamped value.
      timestamp - the timestamp epoch in milliseconds
      address - the Channel-Address
      value - the JsonElement value
    • getParams

      public getParams()
      Description copied from class: AbstractJsonrpcRequest
      Gets the params JsonObject of the JsonrpcRequest.
      Specified by:
      getParams in class AbstractJsonrpcRequest
      the params as JsonObject
    • getData

      public<Long,String,> getData()