Skip to content

Commit

Permalink
uic: zpc: UIC-3406: Fixes Notification CC CTT testing issues
Browse files Browse the repository at this point in the history
(cherry picked from commit 457ec469fce4472bbca29dc1513b3f8e51c352c2)
Forwarded: #11
Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
  • Loading branch information
su-shanka authored and rzr committed Feb 5, 2025
1 parent e4aab0d commit ef497b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static constexpr uint8_t PUSH_REPORT_STATUS_ENABLED = 0xFF;
static constexpr uint8_t PULL_REPORT_STATUS_NOT_EMPTY = 0x00;
static constexpr uint8_t PULL_REPORT_STATUS_EMPTY = 0xFE;

static constexpr uint32_t PULL_NODE_PROBE_INTERVAL = 10800; //in sec (3h * 60m * 60s)
static constexpr uint32_t PULL_NODE_PROBE_INTERVAL = 10800000; //in msec (3h * 60m * 60s * 1000ms)

enum class mode_discovery_state_t : uint8_t {
PUSH_MODE_DETECTED = 0x00,
Expand Down Expand Up @@ -214,9 +214,15 @@ void zwave_command_class_notification_pull_push_discovery(
zwave_command_class_agi_test_perform_discovery(groupings_node);
return;
}
attribute_resolver_set_resolution_listener(
groupings_node,
zwave_command_class_agi_test_perform_discovery);
if (groupings_node.is_valid()) {
attribute_resolver_set_resolution_listener(
groupings_node,
zwave_command_class_agi_test_perform_discovery);
}
else
{
sl_log_warning(LOG_TAG, "supported grouping not yet available");
}

discovery_state = mode_discovery_state_t::AGI_TEST_PENDING;
return;
Expand Down Expand Up @@ -418,7 +424,7 @@ static sl_status_t zwave_command_class_notification_report_cmd_handler(
sending_node_unid,
connection_info->remote.endpoint_id);
auto mode_node = ep_node.child_by_type(ATTRIBUTE(MODE));
uint8_t mode;
uint8_t mode = PUSH_MODE;

if (discovery_state == mode_discovery_state_t::NOTIFICATION_TEST_PENDING) {

Expand Down Expand Up @@ -993,7 +999,7 @@ static sl_status_t zwave_command_class_notification_control_handler(
void zwave_command_class_notification_on_version_attribute_update(
attribute_store_node_t updated_node, attribute_store_change_t change)
{
if (change == ATTRIBUTE_DELETED) {
if (change == ATTRIBUTE_DELETED || change == ATTRIBUTE_CREATED) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,7 @@ void test_zwave_command_class_notification_trigger_probe()
attribute_store_set_node_attribute_value_ExpectAndReturn(end_device3_probe_node, REPORTED_ATTRIBUTE, 0, 0, SL_STATUS_OK);

//zwave_command_class_notification_trigger_probe();
contiki_test_helper_run(10800);
contiki_test_helper_run(10800000);
}

void test_zwave_command_class_notification_pull_mode_empty_queue_report()
Expand Down

0 comments on commit ef497b1

Please sign in to comment.