pub struct ServerConfig {Show 17 fields
pub interface: Ipv4Addr,
pub port: u16,
pub broadcast_address: Ipv4Addr,
pub max_apdu_length: u32,
pub segmentation_supported: Segmentation,
pub vendor_id: u16,
pub cov_retry_timeout_ms: u64,
pub on_time_sync: Option<Arc<dyn Fn(TimeSyncData) + Send + Sync>>,
pub life_safety_operation_authorizer: Option<LifeSafetyOperationAuthorizer>,
pub audit_notification_sink: Option<ObjectIdentifier>,
pub audit_notification_authorizer: Option<AuditNotificationAuthorizer>,
pub unconfirmed_audit_notification_authorizer: Option<UnconfirmedAuditNotificationAuthorizer>,
pub dcc_password: Option<String>,
pub reinit_password: Option<String>,
pub enable_fault_detection: bool,
pub enable_event_enrollment: bool,
pub event_enrollment_interval_secs: u64,
}Expand description
Server configuration.
Fields§
§interface: Ipv4AddrLocal interface to bind.
port: u16UDP port (default 0xBAC0 = 47808).
broadcast_address: Ipv4AddrDirected broadcast address.
max_apdu_length: u32Maximum APDU length accepted.
segmentation_supported: SegmentationSegmentation support level.
Enforced, not just advertised: the dispatch loop reassembles inbound
segmented requests only under BOTH/RECEIVE and transmits
segmented responses only under BOTH/TRANSMIT (Clauses 5.4.5.1 and
5.4.5.3); anything else draws a SEGMENTATION_NOT_SUPPORTED Abort. The
default is NONE, so a default-configured server refuses segmented
traffic in both directions — set this to what the device should
actually honor.
vendor_id: u16Vendor identifier.
cov_retry_timeout_ms: u64Timeout in ms before retrying a failed confirmed COV notification send (default 3000ms).
on_time_sync: Option<Arc<dyn Fn(TimeSyncData) + Send + Sync>>Optional observer invoked after a time-synchronization request is accepted.
Optional LifeSafetyOperation authorization policy.
Absence is fail-closed: requests receive SERVICES / SERVICE_REQUEST_DENIED before object mutation.
audit_notification_sink: Option<ObjectIdentifier>Exactly one explicitly configured Audit Log notification sink.
Absence is fail-closed; the server never selects a sink by database iteration order.
Optional fast, nonblocking ConfirmedAuditNotification authorizer.
Absence, false, or a panic denies the request before mutation.
Optional fast, nonblocking UnconfirmedAuditNotification authorizer.
Absence, false, or a panic silently denies the request before mutation.
dcc_password: Option<String>Optional password required for DeviceCommunicationControl.
reinit_password: Option<String>Optional password required for ReinitializeDevice.
enable_fault_detection: boolEnable periodic fault detection / reliability evaluation. When true, the server invokes every object’s opt-in, object-owned reliability evaluation hook every 10 seconds. Stock objects currently inherit the no-op default.
This governs reliability evaluation only. Event Enrollment evaluation
is configured separately via enable_event_enrollment.
enable_event_enrollment: boolEnable periodic Event Enrollment evaluation (default true).
When true, the server re-reads the property each Event Enrollment object
names in its Object_Property_Reference and applies the configured event
algorithm. Startup: the task is spawned by start
and its first pass runs immediately, then once per interval. Shutdown:
stop aborts it and awaits the abort.
This switch governs the evaluation task; it is not the per-object
Event_Detection_Enable property of ASHRAE 135-2020 Clause 13.2.2.1.
Setting it false stops evaluation without performing the reset that
clause requires of a disabled detector (Event_State to NORMAL, with the
corresponding timestamp and acknowledgment state), so a device carrying
active enrollments will hold whatever state it last detected.
Evaluation is a no-op on databases holding no Event Enrollment objects, so the default is on.
Successful enabled transitions commit Event_State,
Acked_Transitions, and Event_Time_Stamps atomically and are then
routed through the shared EventNotification sender. Event Enrollment
message text remains intentionally absent, and exact event-specific
notification values are deferred to the payload projection work.
event_enrollment_interval_secs: u64Interval in seconds between Event Enrollment evaluation passes (default 10).
This is a sampling cadence with no basis in ASHRAE 135-2020, which
prescribes no evaluation frequency and leaves acquisition of a monitored
value a local matter (Clause 12.12). It is not the Time_Delay of an
event algorithm, which is how long a condition must persist before a
transition is indicated (Clause 13.3) — a coarse interval delays
detection and can miss a condition that both appears and clears between
two passes.
A value of 0 is clamped to one second. Ignored when
enable_event_enrollment is false.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more