@@ -588,65 +588,58 @@ attribute_t *create_max_group_keys_per_fabric(cluster_t *cluster, uint16_t value
588
588
589
589
namespace icd_management {
590
590
namespace attribute {
591
- attribute_t *create_idle_mode_duration (cluster_t *cluster, uint32_t value, uint32_t min, uint32_t max )
591
+ attribute_t *create_idle_mode_duration (cluster_t *cluster, uint32_t value)
592
592
{
593
- attribute_t *attribute = esp_matter::attribute::create (cluster, IcdManagement::Attributes::IdleModeDuration::Id,
594
- ATTRIBUTE_FLAG_NONE, esp_matter_uint32 (value));
595
- if (!attribute) {
596
- ESP_LOGE (TAG, " Could not create attribute" );
597
- return NULL ;
598
- }
599
- esp_matter::attribute::add_bounds (attribute, esp_matter_uint32 (min), esp_matter_uint32 (max));
600
- return attribute;
593
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::IdleModeDuration::Id,
594
+ ATTRIBUTE_FLAG_NONE, esp_matter_uint32 (value));
601
595
}
602
596
603
- attribute_t *create_active_mode_duration (cluster_t *cluster, uint32_t value, uint32_t min )
597
+ attribute_t *create_active_mode_duration (cluster_t *cluster, uint32_t value)
604
598
{
605
- attribute_t *attribute = esp_matter::attribute::create (cluster, IcdManagement::Attributes::ActiveModeDuration::Id,
606
- ATTRIBUTE_FLAG_NONE, esp_matter_uint32 (value));
607
- if (!attribute) {
608
- ESP_LOGE (TAG, " Could not create attribute" );
609
- return NULL ;
610
- }
611
- esp_matter::attribute::add_bounds (attribute, esp_matter_uint32 (min), esp_matter_uint32 (UINT32_MAX));
612
- return attribute;
599
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::ActiveModeDuration::Id,
600
+ ATTRIBUTE_FLAG_NONE, esp_matter_uint32 (value));
613
601
}
614
602
615
- attribute_t *create_active_mode_threshold (cluster_t *cluster, uint16_t value, uint16_t min )
603
+ attribute_t *create_active_mode_threshold (cluster_t *cluster, uint16_t value)
616
604
{
617
- attribute_t *attribute = esp_matter::attribute::create (cluster, IcdManagement::Attributes::ActiveModeThreshold::Id,
618
- ATTRIBUTE_FLAG_NONE, esp_matter_uint16 (value));
619
- if (!attribute) {
620
- ESP_LOGE (TAG, " Could not create attribute" );
621
- return NULL ;
622
- }
623
- esp_matter::attribute::add_bounds (attribute, esp_matter_uint16 (min), esp_matter_uint16 (UINT16_MAX));
624
- return attribute;
605
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::ActiveModeThreshold::Id,
606
+ ATTRIBUTE_FLAG_NONE, esp_matter_uint16 (value));
625
607
}
626
608
627
609
attribute_t *create_registered_clients (cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
628
610
{
629
- return esp_matter::attribute::create (cluster, IcdManagement::Attributes::RegisteredClients::Id, ATTRIBUTE_FLAG_NONVOLATILE,
630
- esp_matter_array (value,length, count));
611
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::RegisteredClients::Id,
612
+ ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array (value,length, count));
631
613
}
632
614
633
- attribute_t *create_icd_counter (cluster_t *cluster,uint32_t value)
615
+ attribute_t *create_icd_counter (cluster_t *cluster, uint32_t value)
634
616
{
635
- return esp_matter::attribute::create (cluster, IcdManagement::Attributes::ICDCounter::Id, ATTRIBUTE_FLAG_NONVOLATILE,
636
- esp_matter_uint32 (value));
617
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::ICDCounter::Id,
618
+ ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint32 (value));
637
619
}
638
620
639
- attribute_t *create_clients_supported_per_fabric (cluster_t *cluster, uint16_t value, uint16_t min )
621
+ attribute_t *create_clients_supported_per_fabric (cluster_t *cluster, uint16_t value)
640
622
{
641
- attribute_t *attribute = esp_matter::attribute::create (cluster, IcdManagement::Attributes::ClientsSupportedPerFabric::Id,
642
- ATTRIBUTE_FLAG_NONE, esp_matter_uint16 (value));
643
- if (!attribute) {
644
- ESP_LOGE (TAG, " Could not create attribute" );
645
- return NULL ;
646
- }
647
- esp_matter::attribute::add_bounds (attribute, esp_matter_uint16 (min), esp_matter_uint16 (UINT16_MAX));
648
- return attribute;
623
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::ClientsSupportedPerFabric::Id,
624
+ ATTRIBUTE_FLAG_NONE, esp_matter_uint16 (value));
625
+ }
649
626
627
+ attribute_t *create_user_active_mode_trigger_hint (cluster_t *cluster, uint32_t value)
628
+ {
629
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::UserActiveModeTriggerHint::Id,
630
+ ATTRIBUTE_FLAG_NONE, esp_matter_bitmap32 (value));
631
+ }
632
+
633
+ attribute_t *create_user_active_mode_trigger_instruction (cluster_t *cluster, char *value, uint16_t length)
634
+ {
635
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id,
636
+ ATTRIBUTE_FLAG_NONE, esp_matter_char_str (value, length));
637
+ }
638
+
639
+ attribute_t *create_operating_mode (cluster_t *cluster, uint8_t value)
640
+ {
641
+ return esp_matter::attribute::create (cluster, IcdManagement::Attributes::OperatingMode::Id,
642
+ ATTRIBUTE_FLAG_NONE, esp_matter_enum8 (value));
650
643
}
651
644
652
645
} /* attribute */
0 commit comments