bacnet-objects 0.15.0

BACnet object model: traits, database, and standard object types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::*;

#[test]
fn database_revision_is_set_through_the_device_authority() {
    let mut device: Box<dyn BACnetObject> = Box::new(make_device());

    device
        .device_authority_internal()
        .expect("the Device has an authority")
        .set_database_revision(42);

    assert_eq!(
        device
            .read_property(PropertyIdentifier::DATABASE_REVISION, None)
            .unwrap(),
        PropertyValue::Unsigned(42)
    );
}