Expand description
Generated protobuf schema types (spec §27), compiled by build.rs from the
vendored proto/moddef/v1/*.proto via protox + prost-build. Under std,
pbjson-generated serde impls give protojson-semantics JSON (and, via
document, YAML) for every message.
Maps use BTreeMap (btree_map=.), which keeps the types alloc-only and
binary encoding deterministic — conformance tests compare byte-for-byte
with Go-produced .moddef goldens.
Modules§
- value_
type - Nested message and enum types in
ValueType.
Structs§
- Array
Type - §8.1 / §14.1 ARRAY logical type. Either a fixed
lengthor a runtimecount_ref(a register holding the live element count). - Availability
- §17.1 Conditional point/block presence.
- BitField
- §13 Named bit field within a register (boolean / small enum). value_type may reference an enum. This is the legacy/simple form; see RegisterField (§13.1).
- Clamp
- Composed
Mapping - §14 Mantissa/exponent composed value: value = mantissa * base^exponent.
baseMUST NOT be zero (MDE406). - Date
Time Spec - §8.5 Date/time value encoding spec.
- Device
Profile - §16 A device model, family, or reusable abstract device.
- Device
Variant - §18 Firmware/hardware/regional/option variant of a base profile.
- Discovery
- EnumRef
- Enum
Type - §12 Enum type definition (reusable, referenced by points/fields).
- Enum
Value - FlagSet
- §13.2 Set of independently-true boolean flags (bit index -> flag name).
- Import
- §19 Import of an external ModDef document or package.
- Mapping
- §9, §14, §14.1 Physical location and encoding of a point’s raw data.
- Measurand
Alias - §24 Maps an external naming system (e.g. OCPP) to a measurand tuple.
- Measurand
Definition - §9.2 / §22 A named measurand definition (typically from a stdlib package).
- Measurand
Ref - §22 / §25 Reference to a measurand from a point. Either resolve
measurand_idor supply an inline semantic tuple (or both, with the tuple as override). - ModDef
Document - §6 A complete ModDef document.
- NaValue
- §8.4 Unavailable / sentinel value (post-decode, pre-scale raw pattern).
- Point
- §5.3 A user-visible data point exposed by a device.
- Point
Override - Point
Ref - Reference to another point within the same device profile.
- Rational
- §10.1 Rational scale/offset. denominator MUST NOT be zero (MDE405). Zero is {0, 1}. See spec/adr/0003.
- Register
Block - §17 A group of related points over a contiguous (or discovered) range.
- Register
Field - §13.1 Typed sub-field over a register window (its own type/scale/unit).
- Scale
Ref - §10.4 Register-referenced (dynamic) scaling.
- Selector
Case - Selector
Ref - §10.5 Value/scale/unit selected by another register.
- String
Encoding - §15 String encoding details. Register length comes from Mapping.length_words.
- Struct
Field - Struct
Ref - Struct
Type - §8.1 STRUCT logical type definition.
- Transform
- §10.2 Value transform pipeline: value = raw * scale + offset, then clamp.
Exactly one of
scaleandscale_refmay be set. - Value
Type - §8 Logical value type. JSON/YAML: tagged object keyed by the oneof field name, e.g. {primitive: DECIMAL} or {enum_ref: {type_id: “…”}}. See ADR-0001.
- Write
Constraints - Write
Encoding - §11.5 Distinct write-side encoding.
- Write
Semantics - §11.2/§11.3/§11.4 Write semantics for writable / command points.
Enums§
- Access
Mode - §11.1 Access modes.
- Accumulation
- §22.6 Accumulation kind.
- Address
Space - §7 Address spaces. 0-based offsets within each space.
- Aggregation
- §22.4 Aggregation across phases / time.
- Byte
Order - §9.1 Byte order within a 16-bit word. Default when omitted: BIG_ENDIAN (spec/adr/0004).
- Charset
- §15 String charset / padding / termination.
- Composed
Kind - §14 Kind of composed (multi-register) value.
- Date
Time Encoding - §8.5 Date/time value encoding.
- Direction
- §22.2 Flow direction for directional quantities.
- Discovery
Kind - §7.3 Dynamic / discovered addressing for a register block.
- Measurement
Location - §22.5 Where the measurement is taken.
- Padding
- Phase
Ref - §22.3 Phase / reference. Wire form mirrors OCPP (L1-N, L1-L2, …).
- Primitive
Type - §8.1 Logical/primitive types exposed to clients.
- Scale
Mode - §10.4 Mode for register-referenced (dynamic) scaling.
- Storage
Type - §8.2 Physical storage types.
- Termination
- Transport
- §16 Supported Modbus transports for a device profile.
- Word
Order - §9.2 Word order for multi-word values. Default when omitted: WORD_BIG_ENDIAN.
- Write
Behavior - §11.3 Write behavior for writable / command points.