bacnet_services/lib.rs
1//! BACnet service request/response encode/decode per ASHRAE 135-2020.
2//!
3//! Each module covers one or more related BACnet services with request/response
4//! structs and encode/decode functions. Service data at constructed boundaries
5//! remains as raw bytes (`Vec<u8>`) — the application layer interprets
6//! property values, not the service codec.
7//!
8//! # Features
9//!
10//! Decoded lists and text are owned, so the codecs need an allocator, and one
11//! of these features to say so:
12//!
13//! - `std` (default): hosted builds.
14//! - `alloc`: `no_std` with a global allocator, for bare-metal targets:
15//! `default-features = false, features = ["alloc"]`. As for
16//! `bacnet-encoding`, `bytes` must build for the target.
17//!
18//! A build with neither fails; that combination is reserved for a future
19//! allocation-free subset.
20
21// Tests always build with std, so feature-off test runs need no imports of
22// their own.
23#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
24
25#[cfg(not(any(feature = "std", feature = "alloc")))]
26compile_error!("bacnet-services needs the `std` or the `alloc` feature");
27
28// `format!` and `vec!` without std's prelude.
29#[macro_use]
30extern crate alloc;
31
32pub mod alarm_event;
33pub mod alarm_summary;
34pub mod audit;
35pub mod common;
36pub mod cov;
37mod cov_decode;
38pub mod cov_multiple;
39pub mod device_mgmt;
40pub mod enrollment_summary;
41pub mod file;
42pub mod life_safety;
43pub mod list_manipulation;
44pub mod object_mgmt;
45pub mod private_transfer;
46pub mod read_property;
47pub mod read_range;
48pub mod rpm;
49pub mod structured_error;
50pub mod text_message;
51pub mod virtual_terminal;
52pub mod who_am_i;
53pub mod who_has;
54pub mod who_is;
55pub mod wpm;
56pub mod write_group;
57pub mod write_property;
58
59#[cfg(test)]
60mod malformed_member_tests;
61#[cfg(test)]
62mod reject_reason_tests;
63#[cfg(test)]
64mod truncated_member_tests;