pub struct SimulatedDevice<D: DataLink> {
pub device_id: ObjectId,
/* private fields */
}Expand description
A simulated BACnet device.
Fields§
§device_id: ObjectIdImplementations§
Source§impl<D: DataLink> SimulatedDevice<D>
impl<D: DataLink> SimulatedDevice<D>
Sourcepub fn new(instance: u32, datalink: D) -> Self
pub fn new(instance: u32, datalink: D) -> Self
Create a new simulated device with the given instance number.
Sourcepub async fn add_object(
&self,
id: ObjectId,
properties: HashMap<PropertyId, ClientDataValue>,
)
pub async fn add_object( &self, id: ObjectId, properties: HashMap<PropertyId, ClientDataValue>, )
Add an object with its properties to the simulated device.
Sourcepub async fn run(&self) -> Result<(), ClientError>
pub async fn run(&self) -> Result<(), ClientError>
Run the device loop, responding to incoming requests until stopped.
Auto Trait Implementations§
impl<D> Freeze for SimulatedDevice<D>where
D: Freeze,
impl<D> !RefUnwindSafe for SimulatedDevice<D>
impl<D> Send for SimulatedDevice<D>
impl<D> Sync for SimulatedDevice<D>
impl<D> Unpin for SimulatedDevice<D>where
D: Unpin,
impl<D> UnsafeUnpin for SimulatedDevice<D>where
D: UnsafeUnpin,
impl<D> !UnwindSafe for SimulatedDevice<D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more