moddef.codec.decode module¶
Point decoder (spec §8–§15). Faithful port of go/codec/decode.go and moddef-ts decode.ts, including §10.5 selector_ref case application with fallback to the point’s own transform.
- moddef.codec.decode.decode_all(points: Iterable[Point], regs_by_id: Mapping[str, Sequence[int]]) dict[str, float | int | bool | str | bytes | list[str] | dict[str, int] | datetime | Unavailable][source]¶
Decode several points, resolving refs among them first.
- moddef.codec.decode.decode_point(p: Point, regs: Sequence[int], ctx: Mapping[str, int] | None = None) float | int | bool | str | bytes | list[str] | dict[str, int] | datetime | Unavailable[source]¶
Decode the registers for a point into a typed value.
- moddef.codec.decode.decode_point_raw(p: Point, regs: Sequence[int]) tuple[int, int][source]¶
Pre-scale integer view for callers that need exactness: (raw, bits).