pub struct BasicInformation<'a> {
pub product: &'a Product<'a>,
pub location: &'a Location,
/* private fields */
}Expand description
The Basic Information cluster on endpoint 0.
Holds the fixed Product record by reference and the three mutable attributes in cells,
so the whole cluster is &self-usable from the interaction model without a lock.
Fields§
§product: &'a Product<'a>The F-quality attributes.
location: &'a LocationLocation (§11.1.5.7), shared with General Commissioning.
Implementations§
Source§impl<'a> BasicInformation<'a>
impl<'a> BasicInformation<'a>
Sourcepub fn new(product: &'a Product<'a>, location: &'a Location) -> Self
pub fn new(product: &'a Product<'a>, location: &'a Location) -> Self
The cluster over a product and a location.
Sourcepub fn with_local_config_disabled(self, initial: bool) -> Self
pub fn with_local_config_disabled(self, initial: bool) -> Self
Serves LocalConfigDisabled (§11.1.5.17), starting at initial.
Absent by default: the attribute is optional, and a node that does not have an on-node user interface has nothing to disable.
Sourcepub fn with_reachable(self, initial: bool) -> Self
pub fn with_reachable(self, initial: bool) -> Self
Serves Reachable (§11.1.5.18), starting at initial.
“For a native Node this is implicitly True (and its use is optional). Its main use case is in the derived Bridged Device Basic Information cluster.”
Sourcepub fn node_label(&self) -> String<32>
pub fn node_label(&self) -> String<32>
NodeLabel (§11.1.5.6).
Sourcepub fn set_node_label(&self, label: &str) -> Result<(), Status>
pub fn set_node_label(&self, label: &str) -> Result<(), Status>
Sets NodeLabel, refusing anything longer than the max 32 constraint.
Sourcepub fn set_reachable(&self, reachable: bool) -> bool
pub fn set_reachable(&self, reachable: bool) -> bool
Sets Reachable, and says whether it changed — which is the trigger for the
ReachableChanged event (§11.1.6.4). Does nothing if the attribute is not served.
Sourcepub fn serves_local_config_disabled(&self) -> bool
pub fn serves_local_config_disabled(&self) -> bool
Whether this instance serves LocalConfigDisabled (§11.1.5.17).
Sourcepub fn serves_reachable(&self) -> bool
pub fn serves_reachable(&self) -> bool
Whether this instance serves Reachable (§11.1.5.18).
Trait Implementations§
Source§impl Cluster for BasicInformation<'_>
impl Cluster for BasicInformation<'_>
Source§impl ClusterHandler for BasicInformation<'_>
impl ClusterHandler for BasicInformation<'_>
Source§fn read(
&self,
resolved: &Resolved<'_>,
_ctx: &InteractionContext<'_>,
w: &mut TlvWriter<'_>,
tag: Tag,
) -> Result<(), Status>
fn read( &self, resolved: &Resolved<'_>, _ctx: &InteractionContext<'_>, w: &mut TlvWriter<'_>, tag: Tag, ) -> Result<(), Status>
Source§fn write(
&self,
resolved: &Resolved<'_>,
data: &[u8],
_op: WriteOp,
_ctx: &InteractionContext<'_>,
) -> Result<(), Status>
fn write( &self, resolved: &Resolved<'_>, data: &[u8], _op: WriteOp, _ctx: &InteractionContext<'_>, ) -> Result<(), Status>
data — the encoded TLV element, tag included — into the attribute. Read more