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§
Sourcefn read_property(
&self,
object_id: ObjectId,
property_id: PropertyId,
array_index: Option<u32>,
) -> Result<ClientDataValue, BacnetServiceError>
fn read_property( &self, object_id: ObjectId, property_id: PropertyId, array_index: Option<u32>, ) -> Result<ClientDataValue, BacnetServiceError>
Called for a ReadProperty confirmed request.
Sourcefn write_property(
&self,
object_id: ObjectId,
property_id: PropertyId,
array_index: Option<u32>,
value: ClientDataValue,
priority: Option<u8>,
) -> Result<(), BacnetServiceError>
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.