PollingEngine

class PollingEngine(manufacturer: String, outputCapacity: Int = DEFAULT_OUTPUT_CAPACITY)(source)

Synchronous polling state owned by the session module. The driver supplies monotonic time and writes.

Constructors

Link copied to clipboard
constructor(manufacturer: String, outputCapacity: Int = DEFAULT_OUTPUT_CAPACITY)

Types

Link copied to clipboard
sealed interface Output

Functions

Link copied to clipboard
fun isQueued(token: Long): Boolean
Link copied to clipboard
fun onAccepted(token: Long, now: Long)

Called at transport acceptance, never at encoding or queue insertion.

Link copied to clipboard
fun onFailed(token: Long, now: Long, unsupported: Boolean = false)
Link copied to clipboard
fun onResponse(now: Long, matches: (ProtocolQuerySpec) -> Boolean)
Link copied to clipboard
Link copied to clipboard
fun reset()
Link copied to clipboard
fun start(plan: ProtocolPollingPlan, now: Long)
Link copied to clipboard
fun tick(plan: ProtocolPollingPlan, now: Long)

Reconciles model-dependent periodic queries, then advances retry/response deadlines.