Expand description
BACnetServer: builder, APDU dispatch, and lifecycle management.
The server wraps a NetworkLayer behind Arc (shared with the dispatch task),
owns an ObjectDatabase via Arc<RwLock>, and spawns a dispatch task that
routes incoming APDUs to service handlers.
Re-exports§
pub use crate::cov::CovCounters;pub use crate::cov::CovPolicy;pub use audit_reporter::AuditReportersConfig;
Structs§
- Atomic
Read File Budget - Positive local limits, independent of peer APDU size and segmentation.
- Atomic
Write File Budget - Positive payload limits independent of peer APDU size and segmentation.
- Audit
Reporters Config - A bounded set of target READ/WRITE/CREATE/DELETE Reporters sharing one Device recipient.
- BACnet
Server - BACnet server with APDU dispatch and service handling.
- BipServer
Builder - BIP-specific builder that constructs
BipTransportfrom interface/port/broadcast fields. - Clock
Config - Validated civil-time settings for the bundled server clock.
- DccDisable
Rate Limit - Optional global authorization budget for DISABLE_INITIATION, not ingress protection.
Use
Some(Default::default())to enable; server configuration defaults to None. - DccOutcome
Counters - Lifetime totals for completed, admitted DCC handlers, saturating at
u64::MAX. New servers start at zero. Fields are independently sampled, not an atomic aggregate. These are local operational telemetry, not a durable audit log. - DccSource
Restriction - Validated static exact-source restriction. An empty list denies every source.
- Device
Binding - One explicitly configured unicast route to a Device object.
- Discovery
Counters - Operational counters for discovery requests and responses.
- Discovery
Policy - Configuration policy for discovery rate limiting and duplicate suppression.
- Event
Notification Counters - Lifetime totals of event notifications that were not delivered, each
saturating at
u64::MAX. A new server starts at zero, and the totals stay readable afterstop(). Fields are sampled independently, not as one atomic aggregate. Each refusal also logs a warning (the forwarding cap’s at most once a minute); these totals are the running signal, not an audit log. - GetAlarm
Summary Budget - Positive local limits for a complete GetAlarmSummary response.
- GetEnrollment
Summary Budget - Positive limits on total database objects and complete logical ACK bytes.
- GetEvent
Information Budget - Positive local limits; callback allocations, CPU and RSS are not bounded. Every remaining object’s strict projection is validated on admitted requests.
- IAmBroadcaster
- Cloneable handle for unsolicited I-Am announcements while its server runs.
- Local
Authorization Result - Complete evaluation and the event records installed by one local attempt.
- Read
Property Multiple Budget - Local ReadPropertyMultiple planning and encoded service-ACK limits.
- Read
Range Budget - Positive limits on returned items and the complete logical service ACK. APDU/NPDU envelopes are excluded. Unsegmented peers may further reduce bytes. Full property reads, identity retrieval/selection, and one trial item encoding remain outside these limits.
- Reinitialize
Context - The ReinitializeDevice request a
ReinitializeHandleris asked to carry out, and who sent it. - Request
Admission Counters - Independently sampled counters for one server lifetime, not an atomic aggregate. Admitted totals count registrations, not successful responses. Active counts include registered futures not yet polled and exclude completed unreaped tasks.
- Request
Admission Policy - Global and logical-peer top-level handler limits with a strict recovery reserve. Defaults are provisional owner policy, not benchmark-derived values.
- ScServer
Builder sc-tls - SC-specific server builder.
- Server
Builder - Generic builder for BACnetServer with a pre-built transport. The
transport type defaults to
AnyTransport, asBACnetServer’s does. - Server
Config - Server configuration.
- Time
Sync Data - Data from a TimeSynchronization request.
- Time
Sync Policy - Default-allow inbound TimeSynchronization / UTCTimeSynchronization policy.
- Time
Sync Rate Limit - Opt-in token bucket for accepted local and UTC time-sync requests combined.
- Time
Sync Source Restriction - Validated exact-source allowlist. A configured empty list denies everyone.
NoneinTimeSyncPolicyleaves sources unrestricted.
Enums§
- CovAck
Result - Result of a confirmed request from the receiving device’s side.
- DccPolicy
- Local DeviceCommunicationControl authorization, not source authentication.
- DccSource
- Exact claimed DCC source, not an authenticated principal (including SC VMAC).
- DccState
- The communication state DeviceCommunicationControl has put the server in (Clause 16.1).
- Time
Sync Source - Exact claimed time-sync source, not an authenticated principal.
Constants§
- MAX_
FORWARDED_ DESTINATIONS - The most destinations one notification is forwarded to, across every
Notification Forwarder in this device that takes it: as many as one
forwarder’s full Recipient_List and Subscribed_Recipients name, so no
single forwarder is cut short. It bounds how far one received notification
can multiply. Only copies that would be sent count: a destination the
loop rules refuse, whose route is skipped, or whose copy is too large is
not. Destinations naming this device’s own Device object, which hand the
notification on within the device, do not count either. The destinations
past the cap count in
EventNotificationCounters::forwarding_cap_dropped. - RECEIVED_
EVENT_ LOG_ RATE - The records one source may add to the Event Logs that collect received notifications in each one-second window.
- RECEIVED_
EVENT_ LOG_ SOURCES - The sources that hold an allowance of their own at a time; any other source shares one more.
Functions§
- drop_
database_ off_ runtime - Let go of a handle on an object database without parking an async runtime’s worker thread (#1513).
Type Aliases§
- Reinitialize
Handler - Carries out a ReinitializeDevice request (Clause 16.4) on a full server or an endpoint session.