submodule-update: Update connectedhomeip submodule to 7e69c66bb for matter 1.1 TE1

This commit is contained in:
WanqQixiang
2023-01-31 17:14:57 +08:00
parent e5d7cac516
commit 30edd36b52
28 changed files with 111 additions and 715 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ git clone --recursive https://github.com/espressif/esp-matter.git
## Supported ESP-IDF and connectedhomeip versions
- This SDK currently works with [tag v1.0.0.2](https://github.com/espressif/connectedhomeip/tree/v1.0.0.2) of connectedhomeip.
- This SDK currently works with matter 1.1 TE1 [commit 7e69c66b](https://github.com/espressif/connectedhomeip/tree/7e69c66b) of connectedhomeip.
- For Wi-Fi devices (ESP32, ESP32-C3, ESP32-S3), ESP-IDF [v4.4.3 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.3) is required.
- For Thread devices (ESP32-H2) and Zigbee Bridge example, ESP-IDF release/v5.0 branch at [commit 20949d44](https://github.com/espressif/esp-idf/tree/20949d44) should be used.
+1 -1
View File
@@ -71,7 +71,7 @@ set(INCLUDE_DIRS_LIST "."
"${MATTER_SDK_PATH}/src"
"${ZAP_GENERATED_PATH}/../")
set(REQUIRES_LIST chip bt esp_matter_console nvs_flash app_update esp_secure_cert_mgr esp32_mbedtls esp_system route_hook)
set(REQUIRES_LIST chip bt esp_matter_console nvs_flash app_update esp_secure_cert_mgr esp32_mbedtls esp_system)
if ("${IDF_TARGET}" STREQUAL "esp32h2")
list(APPEND REQUIRES_LIST openthread esp_matter_openthread)
@@ -276,7 +276,7 @@ namespace attribute {
attribute_t *create_default_ota_providers(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::Id,
return esp_matter::attribute::create(cluster, OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id,
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE,
esp_matter_array(value, length, count));
}
@@ -638,13 +638,13 @@ attribute_t *create_mesh_local_prefix(cluster_t *cluster, uint8_t *value, uint16
attribute_t *create_neighbor_table(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::NeighborTableList::Id,
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::NeighborTable::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_array(value, length, count));
}
attribute_t *create_route_table(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RouteTableList::Id,
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RouteTable::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_array(value, length, count));
}
@@ -706,19 +706,19 @@ attribute_t *create_active_network_faults(cluster_t *cluster, uint8_t *value, ui
} /* attribute */
} /* diagnostics_network_thread */
namespace bridged_device_basic {
namespace bridged_device_basic_information {
namespace attribute {
attribute_t *create_bridged_device_basic_node_label(cluster_t *cluster, char *value, uint16_t length)
attribute_t *create_node_label(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, BridgedDeviceBasic::Attributes::NodeLabel::Id,
return esp_matter::attribute::create(cluster, BridgedDeviceBasicInformation::Attributes::NodeLabel::Id,
ATTRIBUTE_FLAG_NONVOLATILE | ATTRIBUTE_FLAG_WRITABLE,
esp_matter_char_str(value, length));
}
attribute_t *create_reachable(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, BridgedDeviceBasic::Attributes::Reachable::Id, ATTRIBUTE_FLAG_NONE,
return esp_matter::attribute::create(cluster, BridgedDeviceBasicInformation::Attributes::Reachable::Id, ATTRIBUTE_FLAG_NONE,
esp_matter_bool(value));
}
+3 -3
View File
@@ -207,12 +207,12 @@ attribute_t *create_active_network_faults(cluster_t *cluster, uint8_t *value, ui
} /* attribute */
} /* diagnostics_network_thread */
namespace bridged_device_basic {
namespace bridged_device_basic_information {
namespace attribute {
attribute_t *create_bridged_device_basic_node_label(cluster_t *cluster, char *value, uint16_t length);
attribute_t *create_node_label(cluster_t *cluster, char *value, uint16_t length);
attribute_t *create_reachable(cluster_t *cluster, bool value);
} /* attribute */
} /* bridged_device_basic */
} /* bridged_device_basic_information */
namespace user_label {
namespace attribute {
+3 -3
View File
@@ -50,7 +50,7 @@ esp_err_t set_command_callback(command_callback_t callback, group_command_callba
return ESP_OK;
}
void esp_matter_connection_success_callback(void *context, ExchangeManager &exchangeMgr, SessionHandle &sessionHandle)
void esp_matter_connection_success_callback(void *context, ExchangeManager &exchangeMgr, const SessionHandle &sessionHandle)
{
command_handle_t *cmd_handle = static_cast<command_handle_t *>(context);
if (!cmd_handle) {
@@ -802,7 +802,7 @@ esp_err_t send_move_to_color_temperature(peer_device_t *remote_device, uint16_t
uint8_t option_mask, uint8_t option_override)
{
ColorControl::Commands::MoveToColorTemperature::Type command_data;
command_data.colorTemperature = color_temperature_mireds;
command_data.colorTemperatureMireds = color_temperature_mireds;
command_data.transitionTime = transition_time;
command_data.optionsMask = option_mask;
command_data.optionsOverride = option_override;
@@ -818,7 +818,7 @@ esp_err_t group_send_move_to_color_temperature(uint8_t fabric_index, uint16_t gr
uint8_t option_mask, uint8_t option_override)
{
ColorControl::Commands::MoveToColorTemperature::Type command_data;
command_data.colorTemperature = color_temperature_mireds;
command_data.colorTemperatureMireds = color_temperature_mireds;
command_data.transitionTime = transition_time;
command_data.optionsMask = option_mask;
command_data.optionsOverride = option_override;
+3 -3
View File
@@ -768,13 +768,13 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
}
} /* time_synchronization */
namespace bridged_device_basic {
namespace bridged_device_basic_information {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, BridgedDeviceBasic::Id, flags);
cluster_t *cluster = cluster::create(endpoint, BridgedDeviceBasicInformation::Id, flags);
if (!cluster) {
ESP_LOGE(TAG, "Could not create cluster");
return NULL;
@@ -800,7 +800,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
return cluster;
}
} /* bridged_device_basic */
} /* bridged_device_basic_information */
namespace user_label {
const function_generic_t *function_list = NULL;
+2 -2
View File
@@ -169,7 +169,7 @@ typedef struct config {
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* time_synchronization */
namespace bridged_device_basic {
namespace bridged_device_basic_information {
typedef struct config {
uint16_t cluster_revision;
bool reachable;
@@ -177,7 +177,7 @@ typedef struct config {
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* bridged_device_basic */
} /* bridged_device_basic_information */
namespace user_label {
typedef struct config {
+3 -3
View File
@@ -401,10 +401,10 @@ static esp_err_t esp_matter_command_callback_notify_update_applied(const Concret
static esp_err_t esp_matter_command_callback_announce_ota_provider(const ConcreteCommandPath &command_path,
TLVReader &tlv_data, void *opaque_ptr)
{
chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType command_data;
chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback((CommandHandler *)opaque_ptr, command_path,
emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback((CommandHandler *)opaque_ptr, command_path,
command_data);
}
return ESP_OK;
@@ -1672,7 +1672,7 @@ namespace command {
command_t *create_announce_ota_provider(cluster_t *cluster)
{
return esp_matter::command::create(cluster, OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Id,
return esp_matter::command::create(cluster, OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id,
COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_announce_ota_provider);
}
+1 -3
View File
@@ -41,7 +41,6 @@
#include <esp_matter_openthread.h>
#endif
#include <esp_matter_ota.h>
#include <esp_route_hook.h>
#include <esp_matter_dac_provider.h>
using chip::CommandId;
@@ -779,7 +778,7 @@ static void esp_matter_chip_init_task(intptr_t context)
// Record start up event in basic information cluster.
PlatformMgr().HandleServerStarted();
// Record boot reason evnet in general diagnostics cluster.
chip::app::Clusters::GeneralDiagnostics::BootReasonType bootReason;
chip::app::Clusters::GeneralDiagnostics::BootReasonEnum bootReason;
if (GetDiagnosticDataProvider().GetBootReason(bootReason) == CHIP_NO_ERROR) {
chip::app::Clusters::GeneralDiagnosticsServer::Instance().OnDeviceReboot(bootReason);
}
@@ -802,7 +801,6 @@ static void device_callback_internal(const ChipDeviceEvent * event, intptr_t arg
if (event->InterfaceIpAddressChanged.Type == chip::DeviceLayer::InterfaceIpChangeType::kIpV6_Assigned ||
event->InterfaceIpAddressChanged.Type == chip::DeviceLayer::InterfaceIpChangeType::kIpV4_Assigned) {
chip::app::DnssdServer::Instance().StartServer();
esp_route_hook_init(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"));
}
#endif
if (event->InterfaceIpAddressChanged.Type == chip::DeviceLayer::InterfaceIpChangeType::kIpV6_Assigned) {
@@ -563,7 +563,7 @@ endpoint_t *add(endpoint_t *endpoint, config_t *config)
add_device_type(endpoint, get_device_type_id(), get_device_type_version());
descriptor::create(endpoint, CLUSTER_FLAG_SERVER);
bridged_device_basic::create(endpoint, &(config->bridged_device_basic), CLUSTER_FLAG_SERVER);
bridged_device_basic_information::create(endpoint, &(config->bridged_device_basic_information), CLUSTER_FLAG_SERVER);
return endpoint;
}
+1 -1
View File
@@ -268,7 +268,7 @@ endpoint_t *add(endpoint_t *endpoint);
namespace bridged_node {
typedef struct config {
cluster::bridged_device_basic::config_t bridged_device_basic;
cluster::bridged_device_basic_information::config_t bridged_device_basic_information;
} config_t;
uint32_t get_device_type_id();
@@ -33,601 +33,462 @@ namespace Controller {
class DLL_EXPORT IdentifyCluster : public ClusterBase
{
public:
IdentifyCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Identify::Id, endpoint)
{}
IdentifyCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~IdentifyCluster() {}
};
class DLL_EXPORT GroupsCluster : public ClusterBase
{
public:
GroupsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Groups::Id, endpoint)
{}
GroupsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~GroupsCluster() {}
};
class DLL_EXPORT ScenesCluster : public ClusterBase
{
public:
ScenesCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Scenes::Id, endpoint)
{}
ScenesCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ScenesCluster() {}
};
class DLL_EXPORT OnOffCluster : public ClusterBase
{
public:
OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::OnOff::Id, endpoint)
{}
OnOffCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~OnOffCluster() {}
};
class DLL_EXPORT OnOffSwitchConfigurationCluster : public ClusterBase
{
public:
OnOffSwitchConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::OnOffSwitchConfiguration::Id, endpoint)
{}
OnOffSwitchConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~OnOffSwitchConfigurationCluster() {}
};
class DLL_EXPORT LevelControlCluster : public ClusterBase
{
public:
LevelControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::LevelControl::Id, endpoint)
{}
LevelControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~LevelControlCluster() {}
};
class DLL_EXPORT BinaryInputBasicCluster : public ClusterBase
{
public:
BinaryInputBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::BinaryInputBasic::Id, endpoint)
{}
BinaryInputBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~BinaryInputBasicCluster() {}
};
class DLL_EXPORT DescriptorCluster : public ClusterBase
{
public:
DescriptorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Descriptor::Id, endpoint)
{}
DescriptorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~DescriptorCluster() {}
};
class DLL_EXPORT BindingCluster : public ClusterBase
{
public:
BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint)
{}
BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~BindingCluster() {}
};
class DLL_EXPORT AccessControlCluster : public ClusterBase
{
public:
AccessControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::AccessControl::Id, endpoint)
{}
AccessControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~AccessControlCluster() {}
};
class DLL_EXPORT ActionsCluster : public ClusterBase
{
public:
ActionsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Actions::Id, endpoint)
{}
ActionsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ActionsCluster() {}
};
class DLL_EXPORT BasicInformationCluster : public ClusterBase
{
public:
BasicInformationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::BasicInformation::Id, endpoint)
{}
BasicInformationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~BasicInformationCluster() {}
};
class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase
{
public:
OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateProvider::Id, endpoint)
{}
OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~OtaSoftwareUpdateProviderCluster() {}
};
class DLL_EXPORT OtaSoftwareUpdateRequestorCluster : public ClusterBase
{
public:
OtaSoftwareUpdateRequestorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::OtaSoftwareUpdateRequestor::Id, endpoint)
{}
OtaSoftwareUpdateRequestorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~OtaSoftwareUpdateRequestorCluster() {}
};
class DLL_EXPORT LocalizationConfigurationCluster : public ClusterBase
{
public:
LocalizationConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::LocalizationConfiguration::Id, endpoint)
{}
LocalizationConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~LocalizationConfigurationCluster() {}
};
class DLL_EXPORT TimeFormatLocalizationCluster : public ClusterBase
{
public:
TimeFormatLocalizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::TimeFormatLocalization::Id, endpoint)
{}
TimeFormatLocalizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~TimeFormatLocalizationCluster() {}
};
class DLL_EXPORT UnitLocalizationCluster : public ClusterBase
{
public:
UnitLocalizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::UnitLocalization::Id, endpoint)
{}
UnitLocalizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~UnitLocalizationCluster() {}
};
class DLL_EXPORT PowerSourceConfigurationCluster : public ClusterBase
{
public:
PowerSourceConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::PowerSourceConfiguration::Id, endpoint)
{}
PowerSourceConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~PowerSourceConfigurationCluster() {}
};
class DLL_EXPORT PowerSourceCluster : public ClusterBase
{
public:
PowerSourceCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::PowerSource::Id, endpoint)
{}
PowerSourceCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~PowerSourceCluster() {}
};
class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase
{
public:
GeneralCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::GeneralCommissioning::Id, endpoint)
{}
GeneralCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~GeneralCommissioningCluster() {}
};
class DLL_EXPORT NetworkCommissioningCluster : public ClusterBase
{
public:
NetworkCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::NetworkCommissioning::Id, endpoint)
{}
NetworkCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~NetworkCommissioningCluster() {}
};
class DLL_EXPORT DiagnosticLogsCluster : public ClusterBase
{
public:
DiagnosticLogsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::DiagnosticLogs::Id, endpoint)
{}
DiagnosticLogsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~DiagnosticLogsCluster() {}
};
class DLL_EXPORT GeneralDiagnosticsCluster : public ClusterBase
{
public:
GeneralDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::GeneralDiagnostics::Id, endpoint)
{}
GeneralDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~GeneralDiagnosticsCluster() {}
};
class DLL_EXPORT SoftwareDiagnosticsCluster : public ClusterBase
{
public:
SoftwareDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::SoftwareDiagnostics::Id, endpoint)
{}
SoftwareDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~SoftwareDiagnosticsCluster() {}
};
class DLL_EXPORT ThreadNetworkDiagnosticsCluster : public ClusterBase
{
public:
ThreadNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::ThreadNetworkDiagnostics::Id, endpoint)
{}
ThreadNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ThreadNetworkDiagnosticsCluster() {}
};
class DLL_EXPORT WiFiNetworkDiagnosticsCluster : public ClusterBase
{
public:
WiFiNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::WiFiNetworkDiagnostics::Id, endpoint)
{}
WiFiNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~WiFiNetworkDiagnosticsCluster() {}
};
class DLL_EXPORT EthernetNetworkDiagnosticsCluster : public ClusterBase
{
public:
EthernetNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::EthernetNetworkDiagnostics::Id, endpoint)
{}
EthernetNetworkDiagnosticsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~EthernetNetworkDiagnosticsCluster() {}
};
class DLL_EXPORT BridgedDeviceBasicCluster : public ClusterBase
class DLL_EXPORT BridgedDeviceBasicInformationCluster : public ClusterBase
{
public:
BridgedDeviceBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::BridgedDeviceBasic::Id, endpoint)
{}
~BridgedDeviceBasicCluster() {}
BridgedDeviceBasicInformationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~BridgedDeviceBasicInformationCluster() {}
};
class DLL_EXPORT SwitchCluster : public ClusterBase
{
public:
SwitchCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Switch::Id, endpoint)
{}
SwitchCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~SwitchCluster() {}
};
class DLL_EXPORT AdministratorCommissioningCluster : public ClusterBase
{
public:
AdministratorCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::AdministratorCommissioning::Id, endpoint)
{}
AdministratorCommissioningCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~AdministratorCommissioningCluster() {}
};
class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase
{
public:
OperationalCredentialsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::OperationalCredentials::Id, endpoint)
{}
OperationalCredentialsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~OperationalCredentialsCluster() {}
};
class DLL_EXPORT GroupKeyManagementCluster : public ClusterBase
{
public:
GroupKeyManagementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::GroupKeyManagement::Id, endpoint)
{}
GroupKeyManagementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~GroupKeyManagementCluster() {}
};
class DLL_EXPORT FixedLabelCluster : public ClusterBase
{
public:
FixedLabelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::FixedLabel::Id, endpoint)
{}
FixedLabelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~FixedLabelCluster() {}
};
class DLL_EXPORT UserLabelCluster : public ClusterBase
{
public:
UserLabelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::UserLabel::Id, endpoint)
{}
UserLabelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~UserLabelCluster() {}
};
class DLL_EXPORT BooleanStateCluster : public ClusterBase
{
public:
BooleanStateCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::BooleanState::Id, endpoint)
{}
BooleanStateCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~BooleanStateCluster() {}
};
class DLL_EXPORT ModeSelectCluster : public ClusterBase
{
public:
ModeSelectCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::ModeSelect::Id, endpoint)
{}
ModeSelectCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ModeSelectCluster() {}
};
class DLL_EXPORT DoorLockCluster : public ClusterBase
{
public:
DoorLockCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::DoorLock::Id, endpoint)
{}
DoorLockCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~DoorLockCluster() {}
};
class DLL_EXPORT WindowCoveringCluster : public ClusterBase
{
public:
WindowCoveringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::WindowCovering::Id, endpoint)
{}
WindowCoveringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~WindowCoveringCluster() {}
};
class DLL_EXPORT BarrierControlCluster : public ClusterBase
{
public:
BarrierControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::BarrierControl::Id, endpoint)
{}
BarrierControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~BarrierControlCluster() {}
};
class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase
{
public:
PumpConfigurationAndControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::PumpConfigurationAndControl::Id, endpoint)
{}
PumpConfigurationAndControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~PumpConfigurationAndControlCluster() {}
};
class DLL_EXPORT ThermostatCluster : public ClusterBase
{
public:
ThermostatCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Thermostat::Id, endpoint)
{}
ThermostatCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ThermostatCluster() {}
};
class DLL_EXPORT FanControlCluster : public ClusterBase
{
public:
FanControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::FanControl::Id, endpoint)
{}
FanControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~FanControlCluster() {}
};
class DLL_EXPORT ThermostatUserInterfaceConfigurationCluster : public ClusterBase
{
public:
ThermostatUserInterfaceConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::ThermostatUserInterfaceConfiguration::Id, endpoint)
{}
ThermostatUserInterfaceConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ThermostatUserInterfaceConfigurationCluster() {}
};
class DLL_EXPORT ColorControlCluster : public ClusterBase
{
public:
ColorControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::ColorControl::Id, endpoint)
{}
ColorControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ColorControlCluster() {}
};
class DLL_EXPORT BallastConfigurationCluster : public ClusterBase
{
public:
BallastConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::BallastConfiguration::Id, endpoint)
{}
BallastConfigurationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~BallastConfigurationCluster() {}
};
class DLL_EXPORT IlluminanceMeasurementCluster : public ClusterBase
{
public:
IlluminanceMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::IlluminanceMeasurement::Id, endpoint)
{}
IlluminanceMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~IlluminanceMeasurementCluster() {}
};
class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase
{
public:
TemperatureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::TemperatureMeasurement::Id, endpoint)
{}
TemperatureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~TemperatureMeasurementCluster() {}
};
class DLL_EXPORT PressureMeasurementCluster : public ClusterBase
{
public:
PressureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::PressureMeasurement::Id, endpoint)
{}
PressureMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~PressureMeasurementCluster() {}
};
class DLL_EXPORT FlowMeasurementCluster : public ClusterBase
{
public:
FlowMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::FlowMeasurement::Id, endpoint)
{}
FlowMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~FlowMeasurementCluster() {}
};
class DLL_EXPORT RelativeHumidityMeasurementCluster : public ClusterBase
{
public:
RelativeHumidityMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::RelativeHumidityMeasurement::Id, endpoint)
{}
RelativeHumidityMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~RelativeHumidityMeasurementCluster() {}
};
class DLL_EXPORT OccupancySensingCluster : public ClusterBase
{
public:
OccupancySensingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::OccupancySensing::Id, endpoint)
{}
OccupancySensingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~OccupancySensingCluster() {}
};
class DLL_EXPORT WakeOnLanCluster : public ClusterBase
{
public:
WakeOnLanCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::WakeOnLan::Id, endpoint)
{}
WakeOnLanCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~WakeOnLanCluster() {}
};
class DLL_EXPORT ChannelCluster : public ClusterBase
{
public:
ChannelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::Channel::Id, endpoint)
{}
ChannelCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ChannelCluster() {}
};
class DLL_EXPORT TargetNavigatorCluster : public ClusterBase
{
public:
TargetNavigatorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::TargetNavigator::Id, endpoint)
{}
TargetNavigatorCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~TargetNavigatorCluster() {}
};
class DLL_EXPORT MediaPlaybackCluster : public ClusterBase
{
public:
MediaPlaybackCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::MediaPlayback::Id, endpoint)
{}
MediaPlaybackCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~MediaPlaybackCluster() {}
};
class DLL_EXPORT MediaInputCluster : public ClusterBase
{
public:
MediaInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::MediaInput::Id, endpoint)
{}
MediaInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~MediaInputCluster() {}
};
class DLL_EXPORT LowPowerCluster : public ClusterBase
{
public:
LowPowerCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::LowPower::Id, endpoint)
{}
LowPowerCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~LowPowerCluster() {}
};
class DLL_EXPORT KeypadInputCluster : public ClusterBase
{
public:
KeypadInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::KeypadInput::Id, endpoint)
{}
KeypadInputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~KeypadInputCluster() {}
};
class DLL_EXPORT ContentLauncherCluster : public ClusterBase
{
public:
ContentLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::ContentLauncher::Id, endpoint)
{}
ContentLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ContentLauncherCluster() {}
};
class DLL_EXPORT AudioOutputCluster : public ClusterBase
{
public:
AudioOutputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::AudioOutput::Id, endpoint)
{}
AudioOutputCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~AudioOutputCluster() {}
};
class DLL_EXPORT ApplicationLauncherCluster : public ClusterBase
{
public:
ApplicationLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::ApplicationLauncher::Id, endpoint)
{}
ApplicationLauncherCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ApplicationLauncherCluster() {}
};
class DLL_EXPORT ApplicationBasicCluster : public ClusterBase
{
public:
ApplicationBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::ApplicationBasic::Id, endpoint)
{}
ApplicationBasicCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ApplicationBasicCluster() {}
};
class DLL_EXPORT AccountLoginCluster : public ClusterBase
{
public:
AccountLoginCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::AccountLogin::Id, endpoint)
{}
AccountLoginCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~AccountLoginCluster() {}
};
class DLL_EXPORT ElectricalMeasurementCluster : public ClusterBase
{
public:
ElectricalMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::ElectricalMeasurement::Id, endpoint)
{}
ElectricalMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ElectricalMeasurementCluster() {}
};
class DLL_EXPORT ClientMonitoringCluster : public ClusterBase
{
public:
ClientMonitoringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~ClientMonitoringCluster() {}
};
class DLL_EXPORT UnitTestingCluster : public ClusterBase
{
public:
UnitTestingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) :
ClusterBase(exchangeManager, session, app::Clusters::UnitTesting::Id, endpoint)
{}
UnitTestingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
~UnitTestingCluster() {}
};
@@ -18,7 +18,7 @@
// THIS FILE IS GENERATED BY ZAP
#include <app-common/zap-generated/callback.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <lib/support/Span.h>
#include <protocols/interaction_model/Constants.h>
-8
View File
@@ -1,8 +0,0 @@
if (NOT CONFIG_OPENTHREAD_ENABLED)
set(src_dirs src)
endif()
idf_component_register(SRC_DIRS ${src_dirs}
INCLUDE_DIRS include
PRIV_INCLUDE_DIRS private_include
REQUIRES lwip esp_netif)
@@ -1,18 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_err.h"
#include "esp_netif.h"
#ifdef __cplusplus
extern "C" {
#endif
esp_err_t esp_route_hook_init(esp_netif_t *netif);
#ifdef __cplusplus
}
#endif
@@ -1,80 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_err.h"
#include "lwip/ip6_addr.h"
#include "lwip/netif.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Route table entry
*
*/
typedef struct {
ip6_addr_t prefix;
uint8_t prefix_length;
ip6_addr_t gateway;
int8_t preference;
uint32_t lifetime_seconds;
struct netif *netif;
} esp_route_entry_t;
/**
* @brief Adds an entry to the route table
*
* @param[in] route_entry The route entry to be added
*
* @return
* - The pointer to the added route entry on success
* - NULL on failure
*
*/
esp_route_entry_t *esp_route_table_add_route_entry(const esp_route_entry_t *route_entry);
/**
* @brief Removes an entry from the route table
*
* @param[in] route_entry The route entry to be removed
*
* @return
* - ESP_OK
* - ESP_ERR_INVALID_ARG The provided route_entry is not in the route table.
*
*/
esp_err_t esp_route_table_remove_route_entry(esp_route_entry_t *route_entry);
/**
* @brief The lwIP ip6 route hook, called by the lwIP function ip6_route when sending packets.
*
* @param[in] src The source address
* @param[in] dest The destination address
*
* @return
* - The target interface when route found
* - NULL when route not found
*
*/
struct netif *lwip_hook_ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest);
/**
* @brief The lwIP gateway hook, called by the lwIP when deciding next hop.
*
* @param[in] netif The output network interface
* @param[in] dest The destination address
*
* @return
* - The gateway address when route found
* - NULL when route not found
*
*/
const ip6_addr_t *lwip_hook_nd6_get_gw(struct netif *netif, const ip6_addr_t *dest);
#ifdef __cplusplus
}
#endif
-191
View File
@@ -1,191 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_route_hook.h"
#include <stdint.h>
#include <string.h>
#include "esp_check.h"
#include "esp_err.h"
#include "esp_netif.h"
#include "esp_route_table.h"
#include "lwip/icmp6.h"
#include "lwip/mld6.h"
#include "lwip/netif.h"
#include "lwip/prot/icmp6.h"
#include "lwip/prot/ip6.h"
#include "lwip/prot/nd6.h"
#include "lwip/raw.h"
#define HOPLIM_MAX 255
#define PIO_FLAG_ON_LINK (1 << 7)
#define PIO_FLAG_AUTO_CONFIG (1 << 6)
#define TAG "ROUTE_HOOK"
typedef struct esp_route_hook_t {
struct netif *netif;
struct raw_pcb *pcb;
struct esp_route_hook_t *next;
} esp_route_hook_t;
PACK_STRUCT_BEGIN
struct rio_header_t {
PACK_STRUCT_FLD_8(u8_t type);
PACK_STRUCT_FLD_8(u8_t length);
PACK_STRUCT_FLD_8(u8_t prefix_length);
PACK_STRUCT_FLD_8(u8_t preference);
PACK_STRUCT_FIELD(u32_t route_lifetime);
} PACK_STRUCT_STRUCT;
PACK_STRUCT_END
typedef struct rio_header_t rio_header_t;
static esp_route_hook_t *s_hooks;
static bool is_self_address(struct netif *netif, const ip6_addr_t *addr)
{
for (size_t i = 0; i < LWIP_ARRAYSIZE(netif->ip6_addr); i++) {
if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) &&
memcmp(addr->addr, netif_ip6_addr(netif, i)->addr, sizeof(addr->addr)) == 0) {
return true;
}
}
return false;
}
static void ra_recv_handler(struct netif *netif, const uint8_t *icmp_payload, uint16_t payload_len,
const ip6_addr_t *src_addr)
{
if (payload_len < sizeof(struct ra_header)) {
return;
}
icmp_payload += sizeof(struct ra_header);
payload_len -= sizeof(struct ra_header);
while (payload_len >= 2) {
uint8_t opt_type = icmp_payload[0];
uint8_t opt_len = icmp_payload[1] << 3;
if (opt_type == ND6_OPTION_TYPE_ROUTE_INFO && opt_len >= sizeof(rio_header_t) &&
!is_self_address(netif, src_addr) && payload_len >= opt_len) {
rio_header_t rio_header;
memcpy(&rio_header, icmp_payload, sizeof(rio_header));
// skip if prefix is longer than IPv6 address.
if (rio_header.prefix_length > 128) {
break;
}
uint8_t prefix_len_bytes = (rio_header.prefix_length + 7) / 8;
int8_t preference = -2 * ((rio_header.preference >> 4) & 1) + (((rio_header.preference) >> 3) & 1);
const uint8_t *rio_data = &icmp_payload[sizeof(rio_header_t)];
uint8_t rio_data_len = opt_len - sizeof(rio_header_t);
ESP_LOGI(TAG, "Received RIO");
if (rio_data_len >= prefix_len_bytes) {
ip6_addr_t prefix;
esp_route_entry_t route;
memset(&prefix, 0, sizeof(prefix));
memcpy(&prefix.addr, rio_data, prefix_len_bytes);
route.netif = netif;
route.gateway = *src_addr;
route.prefix_length = rio_header.prefix_length;
route.prefix = prefix;
route.preference = preference;
route.lifetime_seconds = lwip_ntohl(rio_header.route_lifetime);
ESP_LOGI(TAG, "prefix %s lifetime %u\n", ip6addr_ntoa(&prefix), route.lifetime_seconds);
if (esp_route_table_add_route_entry(&route) == NULL) {
ESP_LOGI(TAG, "Failed to add route table entry\n");
}
}
}
icmp_payload += opt_len;
payload_len -= opt_len;
}
}
static uint8_t icmp6_raw_recv_handler(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr)
{
uint8_t *icmp_payload = NULL;
uint16_t icmp_payload_len;
struct ip6_hdr *ip6_header = (struct ip6_hdr *)p->payload;
struct icmp6_hdr *icmp6_header;
ip6_addr_t src;
ip6_addr_t dest;
esp_route_hook_t *hook = (esp_route_hook_t *)arg;
memcpy(src.addr, ip6_header->src.addr, sizeof(src.addr));
memcpy(dest.addr, ip6_header->dest.addr, sizeof(dest.addr));
#if LWIP_IPV6_SCOPES
src.zone = 0;
#endif
if (p->tot_len != p->len) {
ESP_LOGW(TAG, "Ignore segmented ICMP packet");
return 0;
}
if (p->tot_len <= sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr)) {
ESP_LOGW(TAG, "Ignore invalid ICMP packet");
return 0;
}
if (!ip6_addr_islinklocal(&dest) && !ip6_addr_isallnodes_linklocal(&dest) &&
!ip6_addr_isallrouters_linklocal(&dest)) {
return 0;
}
icmp_payload_len = p->tot_len - sizeof(struct ip6_hdr);
icmp_payload = p->payload + sizeof(struct ip6_hdr);
icmp6_header = (struct icmp6_hdr *)icmp_payload;
if (icmp6_header->type == ICMP6_TYPE_RA) {
ra_recv_handler(hook->netif, icmp_payload, icmp_payload_len, &src);
}
return 0;
}
esp_err_t esp_route_hook_init(esp_netif_t *netif)
{
struct netif *lwip_netif;
ip_addr_t router_group = IPADDR6_INIT_HOST(0xFF020000, 0, 0, 0x02);
esp_route_hook_t *hook = NULL;
esp_err_t ret = ESP_OK;
ESP_RETURN_ON_FALSE(netif != NULL, ESP_ERR_INVALID_ARG, TAG, "Invalid network interface");
lwip_netif = netif_get_by_index(esp_netif_get_netif_impl_index(netif));
ESP_RETURN_ON_FALSE(lwip_netif != NULL, ESP_ERR_INVALID_ARG, TAG, "Invalid network interface");
for (esp_route_hook_t *iter = s_hooks; iter != NULL; iter++) {
if (iter->netif == lwip_netif) {
ESP_LOGI(TAG, "Hook already installed on netif, skip...");
return ESP_OK;
}
}
hook = (esp_route_hook_t *)malloc(sizeof(esp_route_hook_t));
ESP_RETURN_ON_FALSE(hook != NULL, ESP_ERR_NO_MEM, TAG, "Cannot allocate hook");
ESP_GOTO_ON_FALSE(mld6_joingroup_netif(lwip_netif, ip_2_ip6(&router_group)) == ESP_OK, ESP_FAIL, exit, TAG,
"Failed to join multicast group");
hook->netif = lwip_netif;
hook->pcb = raw_new_ip_type(IPADDR_TYPE_V6, IP6_NEXTH_ICMP6);
hook->pcb->flags |= RAW_FLAGS_MULTICAST_LOOP;
hook->pcb->chksum_reqd = 1;
// The ICMPv6 header checksum offset
hook->pcb->chksum_offset = 2;
raw_bind_netif(hook->pcb, lwip_netif);
raw_recv(hook->pcb, icmp6_raw_recv_handler, hook);
hook->next = s_hooks;
s_hooks = hook;
exit:
if (ret != ESP_OK && hook != NULL) {
free(hook);
}
return ret;
}
-158
View File
@@ -1,158 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_route_table.h"
#include <string.h>
#include "esp_err.h"
#include "esp_log.h"
#include "lwip/ip6_addr.h"
#include "lwip/netif.h"
#include "lwip/timeouts.h"
#define MAX_RIO_ROUTE 20
#define TAG "ROUTE_HOOK"
static esp_route_entry_t s_route_entries[MAX_RIO_ROUTE];
static esp_route_entry_t *find_route_entry(const esp_route_entry_t *route_entry)
{
for (size_t i = 0; i < LWIP_ARRAYSIZE(s_route_entries); i++) {
if (s_route_entries[i].netif == NULL) {
break;
}
if (s_route_entries[i].netif == route_entry->netif &&
s_route_entries[i].prefix_length == route_entry->prefix_length &&
memcmp(s_route_entries[i].gateway.addr, route_entry->gateway.addr, sizeof(route_entry->gateway.addr)) ==
0 &&
memcmp(s_route_entries[i].prefix.addr, route_entry->prefix.addr, route_entry->prefix_length / 8) == 0) {
return &s_route_entries[i];
}
}
return NULL;
}
static esp_route_entry_t *find_empty_route_entry(void)
{
for (size_t i = 0; i < LWIP_ARRAYSIZE(s_route_entries); i++) {
if (s_route_entries[i].netif == NULL) {
return &s_route_entries[i];
}
}
return NULL;
}
static void route_timeout_handler(void *arg)
{
esp_route_entry_t *route = (esp_route_entry_t *)arg;
esp_route_table_remove_route_entry(route);
}
esp_route_entry_t *esp_route_table_add_route_entry(const esp_route_entry_t *route_entry)
{
if (route_entry == NULL) {
return NULL;
}
esp_route_entry_t *entry = find_route_entry(route_entry);
if (entry == NULL) {
entry = find_empty_route_entry();
if (entry == NULL) {
return NULL;
}
entry->netif = route_entry->netif;
entry->gateway = route_entry->gateway;
ip6_addr_assign_zone(&entry->gateway, IP6_UNICAST, entry->netif);
entry->prefix = route_entry->prefix;
entry->prefix_length = route_entry->prefix_length;
} else {
sys_untimeout(route_timeout_handler, entry);
}
entry->preference = route_entry->preference;
entry->lifetime_seconds = route_entry->lifetime_seconds;
if (entry->lifetime_seconds != UINT32_MAX) {
sys_timeout(entry->lifetime_seconds * 1000, route_timeout_handler, entry);
}
return entry;
}
esp_err_t esp_route_table_remove_route_entry(esp_route_entry_t *route_entry)
{
if (route_entry < &s_route_entries[0] || route_entry > &s_route_entries[LWIP_ARRAYSIZE(s_route_entries)]) {
return ESP_ERR_INVALID_ARG;
}
route_entry->netif = NULL;
for (esp_route_entry_t *moved = route_entry; moved < &s_route_entries[LWIP_ARRAYSIZE(s_route_entries) - 1];
moved++) {
*moved = *(moved + 1);
if (moved->netif == NULL) {
break;
}
}
return ESP_OK;
}
static inline bool is_better_route(const esp_route_entry_t *lhs, const esp_route_entry_t *rhs)
{
if (rhs == NULL) {
return true;
}
if (lhs == NULL) {
return false;
}
return (lhs->prefix_length > rhs->prefix_length) ||
(lhs->prefix_length == rhs->prefix_length && lhs->preference > rhs->preference);
}
static inline bool route_match(const esp_route_entry_t *route, const ip6_addr_t *dest)
{
return memcmp(dest, route->prefix.addr, route->prefix_length / 8) == 0;
}
struct netif *lwip_hook_ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest)
{
esp_route_entry_t *route = NULL;
for (size_t i = 0; i < LWIP_ARRAYSIZE(s_route_entries); i++) {
if (s_route_entries[i].netif == NULL) {
break;
}
if (route_match(&s_route_entries[i], dest) && is_better_route(&s_route_entries[i], route)) {
route = &s_route_entries[i];
}
}
if (route) {
return route->netif;
} else {
return NULL;
}
}
const ip6_addr_t *lwip_hook_nd6_get_gw(struct netif *netif, const ip6_addr_t *dest)
{
esp_route_entry_t *route = NULL;
for (size_t i = 0; i < LWIP_ARRAYSIZE(s_route_entries); i++) {
if (s_route_entries[i].netif == NULL) {
break;
}
if (s_route_entries[i].netif == netif && route_match(&s_route_entries[i], dest) &&
is_better_route(&s_route_entries[i], route)) {
route = &s_route_entries[i];
}
}
if (route) {
return &route->gateway;
} else {
return NULL;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
set(PRIV_REQUIRES_LIST device esp_matter route_hook app_bridge)
set(PRIV_REQUIRES_LIST device esp_matter app_bridge)
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
+1 -1
View File
@@ -1,4 +1,4 @@
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console esp_matter_controller route_hook app_reset)
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console esp_matter_controller app_reset)
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
-1
View File
@@ -15,7 +15,6 @@
#include <esp_matter_console.h>
#include <esp_matter_controller_console.h>
#include <esp_matter_ota.h>
#include <esp_route_hook.h>
#include <app_reset.h>
+1 -1
View File
@@ -1,4 +1,4 @@
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console route_hook app_reset)
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console app_reset)
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
+1 -1
View File
@@ -1,4 +1,4 @@
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console route_hook app_reset)
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console app_reset)
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
+2 -9
View File
@@ -98,7 +98,7 @@ extern "C" void app_main()
node::config_t node_config;
node_t *node = node::create(&node_config, app_attribute_update_cb, app_identification_cb);
color_temperature_light::config_t light_config;
extended_color_light::config_t light_config;
light_config.on_off.on_off = DEFAULT_POWER;
light_config.on_off.lighting.start_up_on_off = nullptr;
light_config.level_control.current_level = DEFAULT_BRIGHTNESS;
@@ -106,7 +106,7 @@ extern "C" void app_main()
light_config.color_control.color_mode = EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE;
light_config.color_control.enhanced_color_mode = EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE;
light_config.color_control.color_temperature.startup_color_temperature_mireds = nullptr;
endpoint_t *endpoint = color_temperature_light::create(node, &light_config, ENDPOINT_FLAG_NONE, light_handle);
endpoint_t *endpoint = extended_color_light::create(node, &light_config, ENDPOINT_FLAG_NONE, light_handle);
/* These node and endpoint handles can be used to create/add other endpoints and clusters. */
if (!node || !endpoint) {
@@ -116,13 +116,6 @@ extern "C" void app_main()
light_endpoint_id = endpoint::get_id(endpoint);
ESP_LOGI(TAG, "Light created with endpoint_id %d", light_endpoint_id);
/* Add additional features to the node */
cluster_t *cluster = cluster::get(endpoint, ColorControl::Id);
cluster::color_control::feature::hue_saturation::config_t hue_saturation_config;
hue_saturation_config.current_hue = DEFAULT_HUE;
hue_saturation_config.current_saturation = DEFAULT_SATURATION;
cluster::color_control::feature::hue_saturation::add(cluster, &hue_saturation_config);
/* Matter start */
err = esp_matter::start(app_event_cb);
if (err != ESP_OK) {
+1 -1
View File
@@ -1,4 +1,4 @@
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console route_hook app_reset)
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console app_reset)
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
+1 -1
View File
@@ -1,4 +1,4 @@
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console route_hook app_reset)
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console app_reset)
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
+1 -1
View File
@@ -1,4 +1,4 @@
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console route_hook app_bridge
set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console app_bridge
esp-zboss-lib)
idf_component_register(SRC_DIRS "."