Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CLUSTER_MASK_ and ATTIBUTE_MASK defines to differentiate with … #37618

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <platform/PlatformManager.h>

#include <air-quality-sensor-manager.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <platform/PlatformManager.h>

Expand Down
1 change: 0 additions & 1 deletion examples/all-clusters-app/linux/main-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include <app/clusters/time-synchronization-server/time-synchronization-server.h>
#include <app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <lib/support/CHIPMem.h>
#include <platform/DeviceInstanceInfoProvider.h>
Expand Down
1 change: 0 additions & 1 deletion examples/all-clusters-minimal-app/linux/main-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <app/CommandHandler.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <lib/support/CHIPMem.h>
#include <new>
#include <platform/PlatformManager.h>
Expand Down
8 changes: 4 additions & 4 deletions examples/bridge-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ defined:
definition.

- All attributes defined with these macros will be configured as
`ATTRIBUTE_MASK_EXTERNAL_STORAGE` in the ZCL database and therefore will
rely on the application to maintain storage for the attribute. Consequently,
reads or writes to these attributes must be handled within the application
by the `emberAfExternalAttributeWriteCallback` and
`MATTER_ATTRIBUTE_FLAG_EXTERNAL_STORAGE` in the ZCL database and therefore
will rely on the application to maintain storage for the attribute.
Consequently, reads or writes to these attributes must be handled within the
application by the `emberAfExternalAttributeWriteCallback` and
`emberAfExternalAttributeReadCallback` functions. See the bridge
application's `main.cpp` for an example of this implementation.

Expand Down
8 changes: 4 additions & 4 deletions examples/bridge-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ defined:
definition.

- All attributes defined with these macros will be configured as
`ATTRIBUTE_MASK_EXTERNAL_STORAGE` in the ZCL database and therefore will
rely on the application to maintain storage for the attribute. Consequently,
reads or writes to these attributes must be handled within the application
by the `emberAfExternalAttributeWriteCallback` and
`MATTER_ATTRIBUTE_FLAG_EXTERNAL_STORAGE` in the ZCL database and therefore
will rely on the application to maintain storage for the attribute.
Consequently, reads or writes to these attributes must be handled within the
application by the `emberAfExternalAttributeWriteCallback` and
`emberAfExternalAttributeReadCallback` functions. See the bridge
application's `main.cpp` for an example of this implementation.

Expand Down
8 changes: 4 additions & 4 deletions examples/bridge-app/telink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ defined:
definition.

- All attributes defined with these macros will be configured as
`ATTRIBUTE_MASK_EXTERNAL_STORAGE` in the ZCL database and therefore will
rely on the application to maintain storage for the attribute. Consequently,
reads or writes to these attributes must be handled within the application
by the `emberAfExternalAttributeWriteCallback` and
`MATTER_ATTRIBUTE_FLAG_EXTERNAL_STORAGE` in the ZCL database and therefore
will rely on the application to maintain storage for the attribute.
Consequently, reads or writes to these attributes must be handled within the
application by the `emberAfExternalAttributeWriteCallback` and
`emberAfExternalAttributeReadCallback` functions. See the bridge
application's `main.cpp` for an example of this implementation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#ifdef MATTER_DM_PLUGIN_SWITCH_SERVER
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <platform/PlatformManager.h>

#include "SwitchEventHandler.h"
Expand Down
1 change: 0 additions & 1 deletion examples/chef/common/clusters/switch/SwitchManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <platform/PlatformManager.h>

Expand Down
1 change: 0 additions & 1 deletion examples/chef/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <app-common/zap-generated/callback.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app/server/Dnssd.h>
#include <app/util/att-storage.h>
#include <setup_payload/QRCodeSetupPayloadGenerator.h>

#include "Display.h"
Expand Down
8 changes: 4 additions & 4 deletions examples/fabric-bridge-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ defined:
definition.

- All attributes defined with these macros will be configured as
`ATTRIBUTE_MASK_EXTERNAL_STORAGE` in the ZCL database and therefore will
rely on the application to maintain storage for the attribute. Consequently,
reads or writes to these attributes must be handled within the application
by the `emberAfExternalAttributeWriteCallback` and
`MATTER_ATTRIBUTE_FLAG_EXTERNAL_STORAGE` in the ZCL database and therefore
will rely on the application to maintain storage for the attribute.
Consequently, reads or writes to these attributes must be handled within the
application by the `emberAfExternalAttributeWriteCallback` and
`emberAfExternalAttributeReadCallback` functions. See the bridge
application's `main.cpp` for an example of this implementation.

Expand Down
8 changes: 4 additions & 4 deletions examples/fabric-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ defined:
definition.

- All attributes defined with these macros will be configured as
`ATTRIBUTE_MASK_EXTERNAL_STORAGE` in the ZCL database and therefore will
rely on the application to maintain storage for the attribute. Consequently,
reads or writes to these attributes must be handled within the application
by the `emberAfExternalAttributeWriteCallback` and
`MATTER_ATTRIBUTE_FLAG_EXTERNAL_STORAGE` in the ZCL database and therefore
will rely on the application to maintain storage for the attribute.
Consequently, reads or writes to these attributes must be handled within the
application by the `emberAfExternalAttributeWriteCallback` and
`emberAfExternalAttributeReadCallback` functions. See the bridge
application's `main.cpp` for an example of this implementation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <platform/PlatformManager.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "LightingManager.h"
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app/util/att-storage.h>
#include <stdio.h>

using namespace chip;
Expand Down
1 change: 0 additions & 1 deletion examples/lighting-app/linux/LightingAppCommandDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <platform/PlatformManager.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <app/CommandHandler.h>
#include <app/MessageDef/StatusIB.h>
#include <app/server/Server.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <credentials/GroupDataProvider.h>
#include <lib/support/CodeUtils.h>
Expand Down
3 changes: 1 addition & 2 deletions src/app/clusters/groups-server/groups-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/reporting/reporting.h>
#include <app/util/att-storage.h>
#include <app/util/config.h>
#include <credentials/GroupDataProvider.h>
#include <inttypes.h>
Expand Down Expand Up @@ -339,7 +338,7 @@ bool emberAfGroupsClusterRemoveAllGroupsCallback(app::CommandHandler * commandOb
}
iter->Release();
ScenesManagement::ScenesServer::Instance().GroupWillBeRemoved(fabricIndex, commandPath.mEndpointId,
ZCL_SCENES_GLOBAL_SCENE_GROUP_ID);
ScenesManagement::ScenesServer::kGlobalSceneGroupId);
}
#endif

Expand Down
1 change: 0 additions & 1 deletion src/app/clusters/mode-select-server/mode-select-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <app/CommandHandler.h>
#include <app/ConcreteCommandPath.h>
#include <app/clusters/mode-select-server/supported-modes-manager.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <app/util/config.h>
#include <app/util/odd-sized-integers.h>
Expand Down
9 changes: 5 additions & 4 deletions src/app/clusters/on-off-server/on-off-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,9 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a
if (globalSceneControl)
{
#ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT
ScenesManagement::ScenesServer::Instance().StoreCurrentScene(fabric, endpoint, ZCL_SCENES_GLOBAL_SCENE_GROUP_ID,
ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);
ScenesManagement::ScenesServer::Instance().StoreCurrentScene(fabric, endpoint,
ScenesManagement::ScenesServer::kGlobalSceneGroupId,
ScenesManagement::ScenesServer::kGlobalSceneId);
#endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT
OnOff::Attributes::GlobalSceneControl::Set(endpoint, false);
}
Expand Down Expand Up @@ -723,8 +724,8 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandOb
}

#ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT
ScenesManagement::ScenesServer::Instance().RecallScene(fabric, endpoint, ZCL_SCENES_GLOBAL_SCENE_GROUP_ID,
ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);
ScenesManagement::ScenesServer::Instance().RecallScene(fabric, endpoint, ScenesManagement::ScenesServer::kGlobalSceneGroupId,
ScenesManagement::ScenesServer::kGlobalSceneId);
#endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT

OnOff::Attributes::GlobalSceneControl::Set(endpoint, true);
Expand Down
2 changes: 2 additions & 0 deletions src/app/clusters/scenes-server/scenes-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class ScenesServer : public CommandHandlerInterface, public AttributeAccessInter
MATTER_DM_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT;
static_assert(kScenesServerMaxEndpointCount <= kEmberInvalidEndpointIndex, "Scenes endpoint count error");
static constexpr uint8_t kScenesServerMaxFabricCount = CHIP_CONFIG_MAX_FABRICS;
static constexpr SceneId kGlobalSceneId = 0x00;
static constexpr GroupId kGlobalSceneGroupId = 0x0000;

// FabricSceneInfo
class FabricSceneInfo
Expand Down
7 changes: 3 additions & 4 deletions src/app/dynamic_server/DynamicDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <app/MessageDef/StatusIB.h>
#include <app/WriteHandler.h>
#include <app/data-model/Decode.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <app/util/attribute-table.h>
#include <app/util/endpoint-config-api.h>
Expand Down Expand Up @@ -197,7 +196,7 @@ uint8_t emberAfClusterCount(EndpointId endpoint, bool server)

uint8_t emberAfClusterCountForEndpointType(const EmberAfEndpointType * type, bool server)
{
const EmberAfClusterMask cluster_mask = server ? CLUSTER_MASK_SERVER : CLUSTER_MASK_CLIENT;
const EmberAfClusterMask cluster_mask = server ? MATTER_CLUSTER_FLAG_SERVER : MATTER_CLUSTER_FLAG_CLIENT;

return static_cast<uint8_t>(std::count_if(type->cluster, type->cluster + type->clusterCount,
[=](const EmberAfCluster & cluster) { return (cluster.mask & cluster_mask) != 0; }));
Expand All @@ -210,7 +209,7 @@ Optional<AttributeId> emberAfGetServerAttributeIdByIndex(EndpointId endpoint, Cl

uint8_t emberAfClusterIndex(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask)
{
if (endpoint == kSupportedEndpoint && clusterId == OtaSoftwareUpdateProvider::Id && (mask & CLUSTER_MASK_SERVER))
if (endpoint == kSupportedEndpoint && clusterId == OtaSoftwareUpdateProvider::Id && (mask & MATTER_CLUSTER_FLAG_SERVER))
{
return 0;
}
Expand All @@ -234,7 +233,7 @@ const EmberAfCluster otaProviderCluster{
.attributes = nullptr,
.attributeCount = 0,
.clusterSize = 0,
.mask = CLUSTER_MASK_SERVER,
.mask = MATTER_CLUSTER_FLAG_SERVER,
.functions = nullptr,
.acceptedCommandList = acceptedCommands,
.generatedCommandList = generatedCommands,
Expand Down
Loading
Loading