Expand description
KNX primitives for the public KNXyz Rust crates.
This crate exposes address types, shared error types, selected KNXnet/IP
header primitives, and std-gated protocol helper surfaces. It is not a
commissioning tool and does not perform device programming, application
download, Secure commissioning, or project-file write-back.
The types here are validated primitives - sealed fields, checked constructors, invariants enforced at the boundary - as opposed to the catalogue tier’s open data records, which state declarations with public fields and enforce nothing.
§Feature boundaries
- Default features enable
std. stdgates the cEMI types, the APCI type, theencodemethods on the KNXnet/IP primitives, andstd::error::ErrorforKnxError. Everything this crate allocates sits behind that gate, and it allocates throughstd::vec::Vec.--no-default-featuresleaves the address types,KnxErrorandResult, and the KNXnet/IP primitives less theirencodemethods - their constructors, accessors, anddecodeare theno_stdsurface. That surface is compile-checked without default features on a hosted target; it is not exercised on bare-metal hardware.allocis not a feature of this crate. The allocating APIs are reached throughstd.
Structs§
- Cemi
Frame - A cEMI L_Data frame around 1 group telegram: what the frame is, the 2 control field octets, the telegram itself, and any additional-info block.
- Connection
Header - The header a frame on an established connection carries ahead of its payload: which channel it belongs to, and where it sits in that channel’s sequence.
- Group
Address - Where a telegram is addressed: 16 bits naming a group, not a device.
- Group
Telegram - A single group service, addressed and carrying its data: the device it came from, the group it is addressed to, the service, and the payload in the form it travels in.
- Hpai
- A Host Protocol Address Information block: the endpoint a peer is asked to send to, as the sender states it.
- Individual
Address - A device’s own address: 4 bits of area, 4 bits of line, and 8 bits of device, held as the 2 octets a frame carries.
- KnxNet
IpHeader - The header every KNXnet/IP frame opens with: its own length, the protocol version, the service the frame is, and the length of the whole frame.
- Tunnelling
Crd - The Connection Response Data a tunnelling CONNECT_RESPONSE carries.
- TwoLevel
Group Address Display - A
GroupAddresswritten as main/sub, for installations that address in 2 levels.
Enums§
- Apci
- Only group-value services are modeled; all other APCI codes decode as
InvalidFrame(intentional scope limit). - Cemi
Message Code - What a cEMI frame is, as its first octet states.
- Confirm
Status - What a server reports about a frame it confirmed.
- Group
Payload - The transmitted form of a group telegram’s data.
- Host
Protocol - The transport an endpoint speaks, as the host protocol octet of an HPAI names it.
- KnxError
- Why this crate refused.
- Service
Type - The KNXnet/IP services this crate speaks: a chosen subset of the registry, not the complete set.
Constants§
- HEADER_
LENGTH - The length of the KNXnet/IP header itself, in octets. The header states this in its own first octet, so a frame that opens with anything else is not a header this crate reads.
- PROTOCOL_
VERSION_ 1_ 0 - The protocol version octet for KNXnet/IP 1.0, the only version this crate speaks: the major version in the high nibble, the minor in the low one.