Interface PollingProtocolAdapter

All Superinterfaces:
ProtocolAdapter

public interface PollingProtocolAdapter extends ProtocolAdapter
This interface is used for protocol adapters which implement polling algorithms from PLC endpoints. The scheduling is done by the adapter framework in HiveMQ Edge.
  • Method Details

    • poll

      void poll(@NotNull @NotNull PollingInput pollingInput, @NotNull @NotNull PollingOutput pollingOutput)
      This method gets invoked by the HiveMQ Edge adapter framework to collect data points from the plc.
      Parameters:
      pollingInput - input object containing information what and how to poll the data
      pollingOutput - output object to add data for this poll and to signalize edge polling is done or failed.
    • getPollingIntervalMillis

      int getPollingIntervalMillis()
      Returns:
      an integer representing the milliseconds between starts of polls
    • getMaxPollingErrorsBeforeRemoval

      int getMaxPollingErrorsBeforeRemoval()
      Returns:
      an integer representing a upper limit of consecutive errors during a poll. If this limit is exceeded, the polling will not be scheduled for this adapter anymore and the adapter gets stopped.