@@ -1555,6 +1555,62 @@ static esp_err_t esp_matter_command_callback_close(const ConcreteCommandPath &co
15551555 return ESP_OK;
15561556}
15571557
1558+ static esp_err_t esp_matter_command_callback_set_utc_time (const ConcreteCommandPath &command_path, TLVReader &tlv_data,
1559+ void *opaque_ptr)
1560+ {
1561+ chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::DecodableType command_data;
1562+ CHIP_ERROR error = Decode (tlv_data, command_data);
1563+ if (error == CHIP_NO_ERROR) {
1564+ emberAfTimeSynchronizationClusterSetUTCTimeCallback ((CommandHandler *)opaque_ptr, command_path, command_data);
1565+ }
1566+ return ESP_OK;
1567+ }
1568+
1569+ static esp_err_t esp_matter_command_callback_set_trusted_time_source (const ConcreteCommandPath &command_path,
1570+ TLVReader &tlv_data, void *opaque_ptr)
1571+ {
1572+ chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::DecodableType command_data;
1573+ CHIP_ERROR error = Decode (tlv_data, command_data);
1574+ if (error == CHIP_NO_ERROR) {
1575+ emberAfTimeSynchronizationClusterSetTrustedTimeSourceCallback ((CommandHandler *)opaque_ptr, command_path,
1576+ command_data);
1577+ }
1578+ return ESP_OK;
1579+ }
1580+
1581+ static esp_err_t esp_matter_command_callback_set_time_zone (const ConcreteCommandPath &command_path, TLVReader &tlv_data,
1582+ void *opaque_ptr)
1583+ {
1584+ chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::DecodableType command_data;
1585+ CHIP_ERROR error = Decode (tlv_data, command_data);
1586+ if (error == CHIP_NO_ERROR) {
1587+ emberAfTimeSynchronizationClusterSetTimeZoneCallback ((CommandHandler *)opaque_ptr, command_path, command_data);
1588+ }
1589+ return ESP_OK;
1590+ }
1591+
1592+ static esp_err_t esp_matter_command_callback_set_dst_offset (const ConcreteCommandPath &command_path, TLVReader &tlv_data,
1593+ void *opaque_ptr)
1594+ {
1595+ chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::DecodableType command_data;
1596+ CHIP_ERROR error = Decode (tlv_data, command_data);
1597+ if (error == CHIP_NO_ERROR) {
1598+ emberAfTimeSynchronizationClusterSetDSTOffsetCallback ((CommandHandler *)opaque_ptr, command_path, command_data);
1599+ }
1600+ return ESP_OK;
1601+ }
1602+
1603+ static esp_err_t esp_matter_command_callback_set_default_ntp (const ConcreteCommandPath &command_path, TLVReader &tlv_data,
1604+ void *opaque_ptr)
1605+ {
1606+ chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::DecodableType command_data;
1607+ CHIP_ERROR error = Decode (tlv_data, command_data);
1608+ if (error == CHIP_NO_ERROR) {
1609+ emberAfTimeSynchronizationClusterSetDefaultNTPCallback ((CommandHandler *)opaque_ptr, command_path, command_data);
1610+ }
1611+ return ESP_OK;
1612+ }
1613+
15581614namespace esp_matter {
15591615namespace cluster {
15601616
@@ -3451,6 +3507,53 @@ command_t *create_reverse_open_commissioning_window(cluster_t *cluster)
34513507} /* command */
34523508} /* commissioner_control */
34533509
3510+ namespace time_synchronization {
3511+ namespace command {
3512+ constexpr const command_entry_t accepted_command_list[] = {
3513+ {TimeSynchronization::Commands::SetUTCTime::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_set_utc_time},
3514+ };
3515+
3516+ constexpr const command_entry_t generated_command_list[] = {};
3517+
3518+ command_t *create_set_utc_time (cluster_t *cluster)
3519+ {
3520+ return esp_matter::command::create (cluster, TimeSynchronization::Commands::SetUTCTime::Id, COMMAND_FLAG_ACCEPTED,
3521+ esp_matter_command_callback_set_utc_time);
3522+ }
3523+
3524+ command_t *create_set_trusted_time_source (cluster_t *cluster)
3525+ {
3526+ return esp_matter::command::create (cluster, TimeSynchronization::Commands::SetTrustedTimeSource::Id,
3527+ COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_set_trusted_time_source);
3528+ }
3529+
3530+ command_t *create_set_time_zone (cluster_t *cluster)
3531+ {
3532+ return esp_matter::command::create (cluster, TimeSynchronization::Commands::SetTimeZone::Id, COMMAND_FLAG_ACCEPTED,
3533+ esp_matter_command_callback_set_time_zone);
3534+ }
3535+
3536+ command_t *create_set_time_zone_response (cluster_t *cluster)
3537+ {
3538+ return esp_matter::command::create (cluster, TimeSynchronization::Commands::SetTimeZoneResponse::Id,
3539+ COMMAND_FLAG_GENERATED, nullptr );
3540+ }
3541+
3542+ command_t *create_set_dst_offset (cluster_t *cluster)
3543+ {
3544+ return esp_matter::command::create (cluster, TimeSynchronization::Commands::SetDSTOffset::Id,
3545+ COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_set_dst_offset);
3546+ }
3547+
3548+ command_t *create_set_default_ntp (cluster_t *cluster)
3549+ {
3550+ return esp_matter::command::create (cluster, TimeSynchronization::Commands::SetDefaultNTP::Id,
3551+ COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_set_default_ntp);
3552+ }
3553+
3554+ } /* command */
3555+ } /* time_synchronization */
3556+
34543557} /* cluster */
34553558} /* esp_matter */
34563559
@@ -3499,6 +3602,7 @@ constexpr const cluster_command_t cluster_command_table[] = {
34993602 {ThreadNetworkDirectory::Id, GET_COMMAND_COUNT_LIST (cluster::thread_network_directory)},
35003603 {WaterHeaterManagement::Id, GET_COMMAND_COUNT_LIST (cluster::water_heater_management)},
35013604 {CommissionerControl::Id, GET_COMMAND_COUNT_LIST (cluster::commissioner_control)},
3605+ {TimeSynchronization::Id, GET_COMMAND_COUNT_LIST (cluster::time_synchronization)},
35023606};
35033607
35043608#if defined(CONFIG_ESP_MATTER_ENABLE_MATTER_SERVER) && defined(CONFIG_ESP_MATTER_ENABLE_DATA_MODEL)
0 commit comments