1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::address_space::{base::Base, node::Node};
#[derive(Debug)]
pub struct Object {
base: Base,
}
node_impl!(Object);
impl Object {
pub fn new(node_id: &NodeId, browse_name: &str, display_name: &str, description: &str) -> Object {
let attributes = vec![
(AttributeId::EventNotifier, Variant::Byte(0))
];
Object {
base: Base::new(NodeClass::Object, node_id, browse_name, display_name, description, attributes),
}
}
pub fn event_notifier(&self) -> bool {
find_attribute_value_mandatory!(&self.base, EventNotifier, Boolean)
}
}