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

Move declarations from af.h into the corresponding storage/table/... headers #32776

Merged
merged 46 commits into from
Apr 4, 2024
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6dae0bf
move emberAfLocateAttributeMetadata to attribute-storage.h as it is i…
andreilitvin Mar 28, 2024
152cfe2
Move more methods
andreilitvin Mar 28, 2024
5fdee6f
Global endpoints extern should not exist
andreilitvin Mar 28, 2024
65427e9
move more things
andreilitvin Mar 28, 2024
22b3b06
restyle
andreilitvin Mar 28, 2024
cdde329
Move the last bits from af.h into the corresponding headers. Remove a…
andreilitvin Mar 28, 2024
5786bce
Remove all references to af.h
andreilitvin Mar 28, 2024
eb5f3ce
Restyle and zap regen
andreilitvin Mar 28, 2024
4e9edbd
All-clusters now compiles on linux
andreilitvin Mar 28, 2024
f9d7e7d
Fix ota requester compile
andreilitvin Mar 28, 2024
3719a48
Make tests compile
andreilitvin Mar 28, 2024
5e97dd1
Restyle
andreilitvin Mar 28, 2024
33f6c05
Fix lint.yml: af.h does not exist anymore
andreilitvin Mar 28, 2024
8e3e3d9
Fix door lock compile
andreilitvin Mar 28, 2024
672a1cd
Ensure everything using emberAfEndpointEnableDisable includes endpoin…
andreilitvin Mar 28, 2024
6e0ebb6
Fix emberAfContainsServer include needs
andreilitvin Mar 28, 2024
1eae3d8
Include attribute-storage.h whenever kEmberinvalidEndpointIndex is de…
andreilitvin Mar 28, 2024
a3cd6d9
Include attribute-storage.h whenever kEmberinvalidEndpointIndex is used
andreilitvin Mar 28, 2024
310a7ff
Fix linter
andreilitvin Mar 28, 2024
24df9de
Another lint cleanup
andreilitvin Mar 28, 2024
5f0af79
Fix all includes referencing EnabledEndpointsWithServerCluster
andreilitvin Mar 28, 2024
58222f1
Restyle
andreilitvin Mar 28, 2024
114269b
Fix andorid tv compile
andreilitvin Mar 28, 2024
c9c8b62
Fix linter complain: application basic delegate was already stl-bound…
andreilitvin Mar 28, 2024
3a86282
Fix Attributes.h using emberAfWriteAttribute
andreilitvin Mar 28, 2024
6b471fb
Fix dependencies on AccountLogingManager ... needs config to access S…
andreilitvin Mar 28, 2024
19f404f
Add a lot of includes for std::string where std::string is used
andreilitvin Mar 28, 2024
a535544
Fix checkincludes
andreilitvin Mar 28, 2024
fb699b6
Fix one more build
andreilitvin Mar 28, 2024
aeea5aa
Zap regen ... some string adds were in generated code
andreilitvin Mar 28, 2024
b000c86
make android compile: fix dynamic server dependencies on attribute-st…
andreilitvin Mar 28, 2024
16a3e34
Refactor a bit to make gn linter happy
andreilitvin Mar 28, 2024
f07cfed
Restyle
andreilitvin Mar 28, 2024
41e950b
Merge branch 'master' into move_af_h_declarations
andreilitvin Apr 2, 2024
a4e497d
Split out attribute-storage/table into a -detail and non-detail header
andreilitvin Apr 2, 2024
fc42d8e
Restyle
andreilitvin Apr 2, 2024
8ec7256
Fix lint typo
andreilitvin Apr 2, 2024
d792243
Make tv app compile: need dynamic endpoints defines accessible
andreilitvin Apr 2, 2024
c0da2d7
Restyle
andreilitvin Apr 2, 2024
a7c63c0
Remove code from storage-detail
andreilitvin Apr 2, 2024
87dff5f
Fix code again: FIXED_ENDPOINT_COUNT must be defined, so config has t…
andreilitvin Apr 2, 2024
4b65704
More includes to make compile work. At least now boufallolab compiles
andreilitvin Apr 2, 2024
6c070cc
Fix linux builds ... apparently mock attribute storage is a copy & pa…
andreilitvin Apr 2, 2024
6ed465f
Direct include of endpoint_config in attribute-storage.h
andreilitvin Apr 2, 2024
bbad9f3
Minor comment update: alignment and fix typo
andy31415 Apr 3, 2024
0b40196
Some code review comments
andreilitvin Apr 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -100,11 +100,12 @@ jobs:
--known-failure app/reporting/tests/MockReportScheduler.cpp \
--known-failure app/reporting/tests/MockReportScheduler.h \
--known-failure app/TestEventTriggerDelegate.h \
--known-failure app/util/af.h \
--known-failure app/util/attribute-storage.cpp \
--known-failure app/util/attribute-storage.h \
--known-failure app/util/attribute-storage-detail.h \
--known-failure app/util/attribute-table.cpp \
--known-failure app/util/attribute-table.h \
--known-failure app/util/attribute-table-detail.h \
--known-failure app/util/binding-table.cpp \
--known-failure app/util/binding-table.h \
--known-failure app/util/config.h \
@@ -252,7 +253,7 @@ jobs:
- name: Check for use of 'emberAfReadAttribute' instead of the type-safe getters
if: always()
run: |
git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/attribute-table.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0

# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -262,7 +263,7 @@ jobs:
- name: Check for use of 'emberAfWriteAttribute' instead of the type-safe setters
if: always()
run: |
git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0

# Run ruff python linter
- name: Check for errors using ruff Python linter
1 change: 0 additions & 1 deletion examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/server/Dnssd.h>
#include <app/util/af.h>
#include <app/util/basic-types.h>
#include <app/util/util.h>
#include <lib/dnssd/Advertiser.h>
2 changes: 1 addition & 1 deletion examples/air-purifier-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/util/af.h>
#include <app/util/endpoint-config-api.h>
#include <lib/core/ErrorStr.h>
#include <platform/Ameba/AmebaConfig.h>
#include <platform/Ameba/NetworkCommissioningDriver.h>
1 change: 0 additions & 1 deletion examples/air-purifier-app/linux/main.cpp
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/ConcreteAttributePath.h>
#include <app/util/af.h>
#include <lib/support/logging/CHIPLogging.h>

#define AIR_PURIFIER_ENDPOINT 1
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@

#include <limits>
#include <map>
#include <string>

using namespace chip;
using namespace chip::app;
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@
#include <json/json.h>
#include <platform/DiagnosticDataProvider.h>

#include <string>

class AirQualitySensorAttrUpdateHandler
{
public:
3 changes: 2 additions & 1 deletion examples/air-quality-sensor-app/linux/main.cpp
Original file line number Diff line number Diff line change
@@ -20,9 +20,10 @@
#include <AppMain.h>
#include <air-quality-sensor-manager.h>

#include <app/util/af.h>
#include <platform/CHIPDeviceConfig.h>

#include <string>

#if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED
#include <imgui_ui/ui.h>
#include <imgui_ui/windows/qrcode.h>
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
#pragma once

#include <app/clusters/mode-base-server/mode-base-server.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>
#include <utility>
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@

#include <app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-delegate.h>
#include <app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>

Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@

#include <app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h>
#include <app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>

Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
#pragma once

#include <app/clusters/mode-base-server/mode-base-server.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>
#include <utility>
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
#pragma once

#include <app/clusters/mode-base-server/mode-base-server.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>
#include <utility>
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
#pragma once

#include <app/clusters/mode-base-server/mode-base-server.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>
#include <utility>
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
#pragma once

#include <app/clusters/mode-base-server/mode-base-server.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>
#include <utility>
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
#pragma once

#include <app/clusters/mode-select-server/supported-modes-manager.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>

Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
#pragma once

#include <app/clusters/temperature-control-server/supported-temperature-levels-manager.h>
#include <app/util/af.h>
#include <app/util/config.h>

namespace chip {
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
#pragma once

#include <app/clusters/mode-base-server/mode-base-server.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <cstring>
#include <utility>
1 change: 0 additions & 1 deletion examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/server/Dnssd.h>
#include <app/util/af.h>
#include <app/util/basic-types.h>
#include <app/util/util.h>
#include <lib/dnssd/Advertiser.h>
2 changes: 1 addition & 1 deletion examples/all-clusters-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/af.h>
#include <app/util/endpoint-config-api.h>
#include <laundry-dryer-controls-delegate-impl.h>
#include <laundry-washer-controls-delegate-impl.h>
#include <lib/core/ErrorStr.h>
1 change: 1 addition & 0 deletions examples/all-clusters-app/asr/src/AppTask.cpp
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/attribute-storage.h>
#include <app/util/endpoint-config-api.h>
#include <assert.h>
#include <lega_rtos_api.h>
#include <platform/ASR/NetworkCommissioningDriver.h>
1 change: 0 additions & 1 deletion examples/all-clusters-app/asr/src/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/server/Dnssd.h>
#include <app/util/af.h>
#include <app/util/basic-types.h>
#include <app/util/util.h>
#include <lib/dnssd/Advertiser.h>
2 changes: 1 addition & 1 deletion examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp
Original file line number Diff line number Diff line change
@@ -21,10 +21,10 @@
#include "AppConfig.h"
#include "AppEvent.h"
#include <app/server/Server.h>
#include <app/util/af.h>

#include "FreeRTOS.h"
#include "Globals.h"
#include <app/util/endpoint-config-api.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>

Original file line number Diff line number Diff line change
@@ -31,7 +31,6 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/util/af-types.h>
#include <app/util/af.h>
#include <app/util/basic-types.h>

using namespace ::chip;
2 changes: 1 addition & 1 deletion examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp
Original file line number Diff line number Diff line change
@@ -20,10 +20,10 @@
#include "AppConfig.h"
#include "AppEvent.h"
#include <app/server/Server.h>
#include <app/util/af.h>

#include "FreeRTOS.h"
#include "Globals.h"
#include <app/util/endpoint-config-api.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <examples/platform/cc13x4_26x4/CC13X4_26X4DeviceAttestationCreds.h>

Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/util/af-types.h>
#include <app/util/af.h>
#include <app/util/basic-types.h>

using namespace ::chip;
4 changes: 4 additions & 0 deletions examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp
Original file line number Diff line number Diff line change
@@ -22,6 +22,10 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <setup_payload/QRCodeSetupPayloadGenerator.h>

#include <string>
#include <tuple>
#include <vector>

#if CONFIG_HAVE_DISPLAY
using namespace ::chip;
using namespace ::chip::Credentials;
2 changes: 2 additions & 0 deletions examples/all-clusters-app/esp32/main/QRCodeScreen.cpp
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@
#include <platform/CHIPDeviceLayer.h>
#include <setup_payload/QRCodeSetupPayloadGenerator.h>

#include <string>

// TODO need sensible library tag when put in library
extern const char TAG[];

2 changes: 2 additions & 0 deletions examples/all-clusters-app/esp32/main/StatusScreen.cpp
Original file line number Diff line number Diff line change
@@ -45,6 +45,8 @@
#include <app/server/Server.h>
#include <lib/core/DataModelTypes.h>

#include <string>

#define MAX_LENGTH_SMALL_FONT 30

using namespace chip;
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
#include "ScreenManager.h"

#include <cstdint>
#include <string>
#include <vector>

class QRCodeScreen : public Screen
2 changes: 1 addition & 1 deletion examples/all-clusters-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
#include "platform/PlatformManager.h"
#include "shell_extension/launch.h"
#include <app/server/OnboardingCodesUtil.h>
#include <app/util/af.h>
#include <app/util/endpoint-config-api.h>
#include <binding-handler.h>
#include <common/CHIPDeviceManager.h>
#include <common/Esp32AppServer.h>
1 change: 1 addition & 0 deletions examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/attribute-storage.h>
#include <app/util/endpoint-config-api.h>
#include <assert.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@
#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>

#include <air-quality-instance.h>
@@ -35,6 +36,8 @@
#include <oven-operational-state-delegate.h>
#include <rvc-modes.h>

#include <string>

using namespace chip;
using namespace chip::app;
using namespace chip::app::Clusters;
2 changes: 2 additions & 0 deletions examples/all-clusters-app/linux/AllClustersCommandDelegate.h
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@
#include <json/json.h>
#include <platform/DiagnosticDataProvider.h>

#include <string>

class AllClustersAppCommandHandler
{
public:
2 changes: 2 additions & 0 deletions examples/all-clusters-app/linux/AppOptions.cpp
Original file line number Diff line number Diff line change
@@ -21,6 +21,8 @@
#include <app/server/CommissioningWindowManager.h>
#include <app/server/Server.h>

#include <string>

using namespace chip::ArgParser;

using chip::ArgParser::OptionDef;
2 changes: 2 additions & 0 deletions examples/all-clusters-app/linux/AppOptions.h
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@

#include <app/tests/suites/credentials/TestHarnessDACProvider.h>

#include <string>

class AppOptions
{
public:
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@

#include <lib/support/SafeInt.h>

#include <string>

using namespace chip;
using namespace chip::app::Clusters::DiagnosticLogs;

Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@

#include <fstream>
#include <map>
#include <string>

namespace chip {
namespace app {
3 changes: 2 additions & 1 deletion examples/all-clusters-app/linux/main-common.cpp
Original file line number Diff line number Diff line change
@@ -48,7 +48,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/af.h>
#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <lib/support/CHIPMem.h>
@@ -61,6 +60,8 @@
#include <transport/SessionManager.h>
#include <transport/raw/PeerAddress.h>

#include <string>

using namespace chip;
using namespace chip::app;
using namespace chip::DeviceLayer;
1 change: 1 addition & 0 deletions examples/all-clusters-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
#include <app/util/attribute-storage.h>
#include <app/util/endpoint-config-api.h>

#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
1 change: 1 addition & 0 deletions examples/all-clusters-app/nxp/common/main/AppTask.cpp
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@
#include "ICDUtil.h"
#include <app/InteractionModelEngine.h>
#include <app/util/attribute-storage.h>
#include <app/util/endpoint-config-api.h>

using namespace chip;
using namespace chip::app::Clusters;
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/ConcreteAttributePath.h>
#include <app/util/af-types.h>
#include <app/util/af.h>

using namespace ::chip;

Loading