pub trait Node: NodeBase {
    fn get_attribute_max_age(
        &self,
        timestamps_to_return: TimestampsToReturn,
        attribute_id: AttributeId,
        index_range: NumericRange,
        data_encoding: &QualifiedName,
        max_age: f64
    ) -> Option<DataValue>; fn set_attribute(
        &mut self,
        attribute_id: AttributeId,
        value: Variant
    ) -> Result<(), StatusCode>; fn get_attribute(
        &self,
        timestamps_to_return: TimestampsToReturn,
        attribute_id: AttributeId,
        index_range: NumericRange,
        data_encoding: &QualifiedName
    ) -> Option<DataValue> { ... } }
Expand description

Implemented by each node type’s to provide a generic way to set or get attributes, e.g. from the Attributes service set. Internal callers could call the setter / getter on the node if they have access to them.

Required methods

Finds the attribute and value. The param max_age is a hint in milliseconds:

  • value 0, server shall attempt to read a new value from the data source
  • value >= i32::max(), sever shall attempt to get a cached value

If there is a getter registered with the node, then the getter will interpret max_age how it sees fit.

Sets the attribute with the new value

Provided methods

Finds the attribute and value.

Implementors