Interface PollingProtocolAdapter
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptionintintvoidpoll(@NotNull PollingInput pollingInput, @NotNull PollingOutput pollingOutput) This method gets invoked by the HiveMQ Edge adapter framework to collect data points from the plc.Methods inherited from interface com.hivemq.adapter.sdk.api.ProtocolAdapter
createTagSchema, destroy, discoverValues, getId, getProtocolAdapterInformation, start, stop
-
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 datapollingOutput- 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.
-