pub struct BACnetServer<T: TransportPort> { /* private fields */ }Expand description
BACnet server with APDU dispatch and service handling.
Implementations§
Source§impl<T: TransportPort + 'static> BACnetServer<T>
impl<T: TransportPort + 'static> BACnetServer<T>
Sourcepub async fn start(
config: ServerConfig,
db: ObjectDatabase,
transport: T,
) -> Result<Self, Error>
pub async fn start( config: ServerConfig, db: ObjectDatabase, transport: T, ) -> Result<Self, Error>
Start with the default system-UTC Device clock.
Sourcepub async fn start_with_clock(
config: ServerConfig,
db: ObjectDatabase,
transport: T,
clock_config: ClockConfig,
) -> Result<Self, Error>
pub async fn start_with_clock( config: ServerConfig, db: ObjectDatabase, transport: T, clock_config: ClockConfig, ) -> Result<Self, Error>
Start with a validated Device clock configuration.
Sourcepub async fn start_clockless(
config: ServerConfig,
db: ObjectDatabase,
transport: T,
) -> Result<Self, Error>
pub async fn start_clockless( config: ServerConfig, db: ObjectDatabase, transport: T, ) -> Result<Self, Error>
Start without a Device wall clock or time-synchronization execution.
Source§impl<T: TransportPort + 'static> BACnetServer<T>
impl<T: TransportPort + 'static> BACnetServer<T>
Sourcepub fn database(&self) -> &Arc<RwLock<ObjectDatabase>> ⓘ
pub fn database(&self) -> &Arc<RwLock<ObjectDatabase>> ⓘ
Get a reference to the shared object database.
Sourcepub fn i_am_broadcaster(&self) -> IAmBroadcaster<T>
pub fn i_am_broadcaster(&self) -> IAmBroadcaster<T>
Create a cloneable handle for unsolicited I-Am announcements.
Sourcepub fn comm_state(&self) -> u8
pub fn comm_state(&self) -> u8
Get the communication state per DeviceCommunicationControl.
Returns 0 (Enable), 1 (Disable), or 2 (DisableInitiation).
Sourcepub async fn generate_pics(&self, pics_config: &PicsConfig) -> Pics
pub async fn generate_pics(&self, pics_config: &PicsConfig) -> Pics
Generate a PICS document from the current object database and server configuration.
The caller must supply a [PicsConfig] for fields not available from the server
(vendor name, model, firmware revision, etc.).
Sourcepub async fn broadcast_i_am(&self) -> Result<(), Error>
pub async fn broadcast_i_am(&self) -> Result<(), Error>
Broadcast an I-Am for this server’s Device object using the bound transport socket.
Source§impl<T: TransportPort + 'static> BACnetServer<T>
impl<T: TransportPort + 'static> BACnetServer<T>
Sourcepub async fn set_life_safety_operation_expected_local(
&self,
oid: &ObjectIdentifier,
operation: LifeSafetyOperation,
) -> Result<(), Error>
pub async fn set_life_safety_operation_expected_local( &self, oid: &ObjectIdentifier, operation: LifeSafetyOperation, ) -> Result<(), Error>
Arm or rearm a Life Safety object from trusted local application logic.
This uses the object-internal state channel under the database write
lock. Network WriteProperty and WritePropertyMultiple remain unable to
forge Operation_Expected. After the lock is released, an actual
Operation_Expected readback change uses the exact Life Safety COV path;
rearming to the current value emits no notification.
Sourcepub async fn write_local(
&self,
oid: &ObjectIdentifier,
property: PropertyIdentifier,
array_index: Option<u32>,
value: PropertyValue,
priority: Option<u8>,
) -> Result<(), Error>
pub async fn write_local( &self, oid: &ObjectIdentifier, property: PropertyIdentifier, array_index: Option<u32>, value: PropertyValue, priority: Option<u8>, ) -> Result<(), Error>
Write a property on a local object and fire the same post-write COV
and event notifications that a network WriteProperty does.
This is the server-owned local-mutation entry point: it performs the
write under the database lock — routing OBJECT_NAME through the name
uniqueness check and index refresh, exactly like the network handler —
then releases the lock and runs the COV/event trigger path so a
subscription observes a local mutation just as it would a network one.
Low-level object setters deliberately bypass this notification owner.
Sourcepub async fn set_present_value_local(
&self,
oid: &ObjectIdentifier,
value: PropertyValue,
) -> Result<(), Error>
pub async fn set_present_value_local( &self, oid: &ObjectIdentifier, value: PropertyValue, ) -> Result<(), Error>
Supply a supported Input’s logical Present_Value from Rust application code.
Analog Input, Binary Input, and Multi-state Input opt in. Binary values are logical INACTIVE/ACTIVE states after Polarity, not raw physical states. The update runs the existing post-write intrinsic-event and COV processing after the database lock is released; configured delays and distribution policy still determine when notifications are delivered.
Applications are denied while Out_Of_Service is TRUE to protect a
client’s simulation value. That ownership rule is local policy, not a
Standard mandate. Other object families fail closed; use
BACnetServer::write_local for ordinary network-equivalent writes and
commandable objects. Python exposure is tracked separately in #503.
Source§impl<T: TransportPort + 'static> BACnetServer<T>
impl<T: TransportPort + 'static> BACnetServer<T>
Source§impl BACnetServer<BipTransport>
impl BACnetServer<BipTransport>
Sourcepub fn bip_builder() -> BipServerBuilder
pub fn bip_builder() -> BipServerBuilder
Create a BIP-specific builder with interface/port/broadcast fields.
Sourcepub fn builder() -> BipServerBuilder
pub fn builder() -> BipServerBuilder
Create a BIP-specific builder (alias for backward compatibility).