Skip to content

Commit

Permalink
GH-45: ZPC Poller Fix
Browse files Browse the repository at this point in the history
Forwarded: #45
Bug-SiliconLabs: UIC-2964
Bug-Github: #45
  • Loading branch information
silabs-borisl committed May 3, 2024
1 parent 3b43b68 commit 67577b0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ const ATTRIBUTE_HOME_ID: AttributeTypeId = 0x2;
const ATTRIBUTE_ENDPOINT_ID: AttributeTypeId = 0x4;

//< This represents the Network Status of a node. NodeStateNetworkStatus
const DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS: AttributeTypeId = 0x000D;
const ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL: u8 = 1;
const DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS: AttributeTypeId = 0xfd020001;
// This is reported as a u32 in the attribute store
const ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL: u32 = 0;

struct PollRegister {
poll_map: Option<AttributePollMap>,
Expand Down Expand Up @@ -83,7 +84,7 @@ impl PollRegister {
event.attribute.type_of() == DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS
&& event.event_type == AttributeEventType::ATTRIBUTE_UPDATED
&& event.value_state == AttributeValueState::REPORTED_ATTRIBUTE
&& event.attribute.get_reported::<u8>() == Ok(ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL)
&& event.attribute.get_reported::<u32>() == Ok(ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL)
&& is_in_home_id
}

Expand Down

0 comments on commit 67577b0

Please sign in to comment.