Skip to main content

Module command

Module command 

Source
Expand description

Command (multi-step register procedure) support, spec §11.7. The executor itself is crate::device::Device::run_command; this module holds the pure pieces — poll-condition evaluation, the single-PDU write cap, the caller-facing param value type — and the Delay abstraction the poll loop is parameterized over (Transport has no time primitive, and none exists in the alloc-only tier).

Enums§

ParamValue
Caller-supplied value for a command param (numeric, string, or bytes — matching the split encode paths of the codec).

Constants§

DEFAULT_POLL_INTERVAL_MS
Default poll interval when a PollStep omits interval_ms.
MAX_WRITE_WORDS
Modbus single-PDU practical write cap (FC16); larger writes chunk inside the executor. (Reads are chunked by transports per max_read_words.)

Traits§

Delay
Async sleep used by poll steps. std/tokio callers get an impl from moddef-tokio-modbus; embedded callers supply their own (e.g. an embassy timer). Elapsed poll time is accounted by accumulating the requested delays, so no wall clock is required.

Functions§

condition_met
Evaluate a §11.7 poll exit condition against a raw integer.