Skip to main content

ServiceHandler

Trait ServiceHandler 

Source
pub trait ServiceHandler:
    Send
    + Sync
    + 'static {
    // Required methods
    fn read_property(
        &self,
        object_id: ObjectId,
        property_id: PropertyId,
        array_index: Option<u32>,
    ) -> Result<ClientDataValue, BacnetServiceError>;
    fn write_property(
        &self,
        object_id: ObjectId,
        property_id: PropertyId,
        array_index: Option<u32>,
        value: ClientDataValue,
        priority: Option<u8>,
    ) -> Result<(), BacnetServiceError>;
}
Expand description

Handler trait that the server calls for each incoming service request.

Required Methods§

Source

fn read_property( &self, object_id: ObjectId, property_id: PropertyId, array_index: Option<u32>, ) -> Result<ClientDataValue, BacnetServiceError>

Called for a ReadProperty confirmed request.

Source

fn write_property( &self, object_id: ObjectId, property_id: PropertyId, array_index: Option<u32>, value: ClientDataValue, priority: Option<u8>, ) -> Result<(), BacnetServiceError>

Called for a WriteProperty confirmed request.

Implementors§