Skip to main content

Crate bacnet_types

Crate bacnet_types 

Source
Expand description

BACnet protocol types per ASHRAE 135-2020.

This crate provides the foundational types for the BACnet protocol: enumerations, primitive data types, addresses, and error types.

Its runtime dependencies are bitflags, smallvec and thiserror.

Every enum newtype implements FromStr, accepting any common case style (analog-input, AnalogInput, ANALOG_INPUT, …) for its named constants. The optional serde feature adds Deserialize for enums::ObjectType and enums::PropertyIdentifier on top of it.

§Features

The crate needs an allocator, and one of these features to say so:

  • std (default): hosted builds. Adds the transport I/O error (Error::Transport) and the B/IP port contract (bip_port).
  • alloc: no_std with a global allocator, for bare-metal targets: default-features = false, features = ["alloc"].

A build with neither fails; that combination is reserved for a future allocation-free subset.

Modules§

bip_port
The B/IP operating mode a transport lends the Network Port object.
bitstring
Named BACnet bit-string types (ASHRAE 135-2020 Clause 21).
calendar
Calendar arithmetic and calendar-entry matching.
constructed
BACnet constructed data types per ASHRAE 135-2020.
data_link
The BACnet data links a transport can carry, as named in errors.
enums
BACnet enumeration types per ASHRAE 135-2020.
error
BACnet error types.
network_number
Pure single-link Network Number state and Clause 6.4.20 precedence.
primitives
BACnet primitive data types per ASHRAE 135-2020 Clause 20.2.

Type Aliases§

MacAddr
BACnet MAC address — stack-allocated for typical sizes (≤6 bytes).