@@ -3451,6 +3451,72 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_
3451
3451
}
3452
3452
} /* energy_preference */
3453
3453
3454
+ namespace commissioner_control {
3455
+ const function_generic_t *function_list = NULL ;
3456
+ const int function_flags = CLUSTER_FLAG_NONE;
3457
+
3458
+ cluster_t *create (endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
3459
+ {
3460
+ cluster_t *cluster = cluster::create (endpoint, CommissionerControl::Id, flags);
3461
+ if (!cluster) {
3462
+ ESP_LOGE (TAG, " Could not create cluster" );
3463
+ return NULL ;
3464
+ }
3465
+ if (flags & CLUSTER_FLAG_SERVER) {
3466
+ if (config -> delegate != nullptr ) {
3467
+ static const auto delegate_init_cb = CommissionerControlDelegateInitCB;
3468
+ set_delegate_and_init_callback (cluster, delegate_init_cb, config->delegate );
3469
+ }
3470
+ static const auto plugin_server_init_cb = CALL_ONCE (MatterCommissionerControlPluginServerInitCallback);
3471
+ set_plugin_server_init_callback (cluster, plugin_server_init_cb);
3472
+ add_function_list (cluster, function_list, function_flags);
3473
+
3474
+ /* Attributes managed internally */
3475
+ global::attribute::create_feature_map (cluster, 0 );
3476
+
3477
+ /* * Attributes not managed internally **/
3478
+ global::attribute::create_cluster_revision (cluster, cluster_revision);
3479
+ attribute::create_supported_device_categories (cluster, config->supported_device_categories );
3480
+ }
3481
+
3482
+ if (flags & CLUSTER_FLAG_CLIENT) {
3483
+ create_default_binding_cluster (endpoint);
3484
+ }
3485
+
3486
+ event::create_commissioning_request_result (cluster);
3487
+ return cluster;
3488
+ }
3489
+ } /* commissioner_control */
3490
+
3491
+ namespace ecosystem_information {
3492
+ const function_generic_t *function_list = NULL ;
3493
+ const int function_flags = CLUSTER_FLAG_NONE;
3494
+
3495
+ cluster_t *create (endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
3496
+ {
3497
+ cluster_t *cluster = cluster::create (endpoint, EcosystemInformation::Id, flags);
3498
+ if (!cluster) {
3499
+ ESP_LOGE (TAG, " Could not create cluster" );
3500
+ return NULL ;
3501
+ }
3502
+ if (flags & CLUSTER_FLAG_SERVER) {
3503
+ static const auto plugin_server_init_cb = CALL_ONCE (MatterEcosystemInformationPluginServerInitCallback);
3504
+ set_plugin_server_init_callback (cluster, plugin_server_init_cb);
3505
+ add_function_list (cluster, function_list, function_flags);
3506
+
3507
+ /* Attributes managed internally */
3508
+ global::attribute::create_feature_map (cluster, 0 );
3509
+ attribute::create_device_directory (cluster, nullptr , 0 , 0 );
3510
+ attribute::create_location_directory (cluster, nullptr , 0 , 0 );
3511
+
3512
+ /* * Attributes not managed internally **/
3513
+ global::attribute::create_cluster_revision (cluster, cluster_revision);
3514
+ }
3515
+
3516
+ return cluster;
3517
+ }
3518
+ } /* ecosystem_information */
3519
+
3454
3520
// namespace binary_input_basic {
3455
3521
// // ToDo
3456
3522
// } /* binary_input_basic */
0 commit comments