moddef.command module

Command (multi-step register procedure) helpers, spec §11.7.

The executor itself is Device.run_command in device.py; this module holds the pure pieces: poll-condition evaluation, single-PDU chunking caps, and the synthetic points that let command params and raw trigger/poll values reuse the shared codec.

moddef.command.condition_met(c: Condition, raw: int) bool[source]

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

moddef.command.param_point(cp: CommandParam) Point[source]

Synthetic point carrying a CommandParam’s wire mapping for the codec.

moddef.command.raw_int(p: Point, regs: Sequence[int]) int[source]

Decode a point’s raw (pre-transform) integer, sign-extended per storage.

moddef.command.raw_point(p: Point) Point[source]

Storage/mapping-only copy of a point: trigger writes and poll reads are raw register values (§11.7), bypassing transform and value_type.