Skip to main content

Module server

Module server 

Source
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§

AtomicReadFileBudget
Positive local limits, independent of peer APDU size and segmentation.
AtomicWriteFileBudget
Positive payload limits independent of peer APDU size and segmentation.
AuditReportersConfig
A bounded set of target READ/WRITE/CREATE/DELETE Reporters sharing one Device recipient.
BACnetServer
BACnet server with APDU dispatch and service handling.
BipServerBuilder
BIP-specific builder that constructs BipTransport from interface/port/broadcast fields.
ClockConfig
Validated civil-time settings for the bundled server clock.
DccDisableRateLimit
Optional global authorization budget for DISABLE_INITIATION, not ingress protection. Use Some(Default::default()) to enable; server configuration defaults to None.
DccOutcomeCounters
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.
DccSourceRestriction
Validated static exact-source restriction. An empty list denies every source.
DeviceBinding
One explicitly configured unicast route to a Device object.
DiscoveryCounters
Operational counters for discovery requests and responses.
DiscoveryPolicy
Configuration policy for discovery rate limiting and duplicate suppression.
EventNotificationCounters
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 after stop(). 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.
GetAlarmSummaryBudget
Positive local limits for a complete GetAlarmSummary response.
GetEnrollmentSummaryBudget
Positive limits on total database objects and complete logical ACK bytes.
GetEventInformationBudget
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.
LocalAuthorizationResult
Complete evaluation and the event records installed by one local attempt.
ReadPropertyMultipleBudget
Local ReadPropertyMultiple planning and encoded service-ACK limits.
ReadRangeBudget
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.
ReinitializeContext
The ReinitializeDevice request a ReinitializeHandler is asked to carry out, and who sent it.
RequestAdmissionCounters
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.
RequestAdmissionPolicy
Global and logical-peer top-level handler limits with a strict recovery reserve. Defaults are provisional owner policy, not benchmark-derived values.
ScServerBuildersc-tls
SC-specific server builder.
ServerBuilder
Generic builder for BACnetServer with a pre-built transport. The transport type defaults to AnyTransport, as BACnetServer’s does.
ServerConfig
Server configuration.
TimeSyncData
Data from a TimeSynchronization request.
TimeSyncPolicy
Default-allow inbound TimeSynchronization / UTCTimeSynchronization policy.
TimeSyncRateLimit
Opt-in token bucket for accepted local and UTC time-sync requests combined.
TimeSyncSourceRestriction
Validated exact-source allowlist. A configured empty list denies everyone. None in TimeSyncPolicy leaves sources unrestricted.

Enums§

CovAckResult
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).
TimeSyncSource
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§

ReinitializeHandler
Carries out a ReinitializeDevice request (Clause 16.4) on a full server or an endpoint session.