Skip to content

Commit 745f28d

Browse files
committed
[Realtek] Update zap files
1 parent 34ef8a6 commit 745f28d

12 files changed

+3811
-6412
lines changed

examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_11.matter

+79-475
Large diffs are not rendered by default.

examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_11.zap

+1,944-3,422
Large diffs are not rendered by default.

examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_2.matter

+53-147
Large diffs are not rendered by default.

examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_2.zap

+704-579
Large diffs are not rendered by default.

examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_8.matter

+70-261
Large diffs are not rendered by default.

examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_8.zap

+849-1,484
Large diffs are not rendered by default.

examples/light-switch-app/realtek_bee/main/AppTask.cpp

+95-5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "BindingHandler.h"
2525
#include "Globals.h"
2626

27+
#include <DeviceInfoProviderImpl.h>
2728
#include <app-common/zap-generated/attributes/Accessors.h>
2829
#include <app/TestEventTriggerDelegate.h>
2930
#include <app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerHandler.h>
@@ -32,14 +33,11 @@
3233
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
3334
#include <app/server/Dnssd.h>
3435
#include <app/server/Server.h>
35-
#include <data-model-providers/codegen/Instance.h>
36-
36+
#include <app/util/attribute-storage.h>
3737
#include <credentials/DeviceAttestationCredsProvider.h>
3838
#include <credentials/examples/DeviceAttestationCredsExample.h>
39-
39+
#include <data-model-providers/codegen/Instance.h>
4040
#include <inet/EndPointStateOpenThread.h>
41-
42-
#include <DeviceInfoProviderImpl.h>
4341
#include <setup_payload/OnboardingCodesUtil.h>
4442
#include <setup_payload/QRCodeSetupPayloadGenerator.h>
4543
#include <setup_payload/SetupPayload.h>
@@ -62,6 +60,7 @@ using namespace ::chip::app;
6260
using namespace ::chip::TLV;
6361
using namespace ::chip::Credentials;
6462
using namespace ::chip::DeviceLayer;
63+
using namespace app::Clusters::Descriptor::Structs;
6564

6665
#include <platform/CHIPDeviceLayer.h>
6766

@@ -79,6 +78,62 @@ using namespace ::chip::DeviceLayer;
7978

8079
namespace {
8180

81+
#if (CONFIG_1_TO_2_ZAP || CONFIG_1_TO_8_ZAP || CONFIG_1_TO_12_ZAP)
82+
83+
// Switches Namespace: 0x43, tag 0x08 (Custom)
84+
constexpr const uint8_t kNamespaceSwitches = 0x43;
85+
constexpr const uint8_t kTagCustom = 0x08;
86+
87+
const SemanticTagStruct::Type switch1TagList[] = { { .namespaceID = kNamespaceSwitches,
88+
.tag = kTagCustom,
89+
.label = chip::Optional<chip::app::DataModel::Nullable<chip::CharSpan>>(
90+
{ chip::app::DataModel::MakeNullable(chip::CharSpan("Switch1", 7)) }) } };
91+
const SemanticTagStruct::Type switch2TagList[] = { { .namespaceID = kNamespaceSwitches,
92+
.tag = kTagCustom,
93+
.label = Optional<DataModel::Nullable<CharSpan>>(
94+
DataModel::MakeNullable(CharSpan("Switch2", 7))) } };
95+
const SemanticTagStruct::Type switch3TagList[] = { { .namespaceID = kNamespaceSwitches,
96+
.tag = kTagCustom,
97+
.label = Optional<DataModel::Nullable<CharSpan>>(
98+
DataModel::MakeNullable(CharSpan("Switch3", 7))) } };
99+
const SemanticTagStruct::Type switch4TagList[] = { { .namespaceID = kNamespaceSwitches,
100+
.tag = kTagCustom,
101+
.label = Optional<DataModel::Nullable<CharSpan>>(
102+
DataModel::MakeNullable(CharSpan("Switch4", 7))) } };
103+
const SemanticTagStruct::Type switch5TagList[] = { { .namespaceID = kNamespaceSwitches,
104+
.tag = kTagCustom,
105+
.label = Optional<DataModel::Nullable<CharSpan>>(
106+
DataModel::MakeNullable(CharSpan("Switch5", 7))) } };
107+
const SemanticTagStruct::Type switch6TagList[] = { { .namespaceID = kNamespaceSwitches,
108+
.tag = kTagCustom,
109+
.label = Optional<DataModel::Nullable<CharSpan>>(
110+
DataModel::MakeNullable(CharSpan("Switch6", 7))) } };
111+
const SemanticTagStruct::Type switch7TagList[] = { { .namespaceID = kNamespaceSwitches,
112+
.tag = kTagCustom,
113+
.label = Optional<DataModel::Nullable<CharSpan>>(
114+
DataModel::MakeNullable(CharSpan("Switch7", 7))) } };
115+
const SemanticTagStruct::Type switch8TagList[] = { { .namespaceID = kNamespaceSwitches,
116+
.tag = kTagCustom,
117+
.label = Optional<DataModel::Nullable<CharSpan>>(
118+
DataModel::MakeNullable(CharSpan("Switch8", 7))) } };
119+
const SemanticTagStruct::Type switch9TagList[] = { { .namespaceID = kNamespaceSwitches,
120+
.tag = kTagCustom,
121+
.label = Optional<DataModel::Nullable<CharSpan>>(
122+
DataModel::MakeNullable(CharSpan("Switch9", 7))) } };
123+
const SemanticTagStruct::Type switch11TagList[] = { { .namespaceID = kNamespaceSwitches,
124+
.tag = kTagCustom,
125+
.label = Optional<DataModel::Nullable<CharSpan>>(
126+
DataModel::MakeNullable(CharSpan("Switch11", 8))) } };
127+
const SemanticTagStruct::Type switch12TagList[] = { { .namespaceID = kNamespaceSwitches,
128+
.tag = kTagCustom,
129+
.label = Optional<DataModel::Nullable<CharSpan>>(
130+
DataModel::MakeNullable(CharSpan("Switch12", 8))) } };
131+
const SemanticTagStruct::Type switch13TagList[] = { { .namespaceID = kNamespaceSwitches,
132+
.tag = kTagCustom,
133+
.label = Optional<DataModel::Nullable<CharSpan>>(
134+
DataModel::MakeNullable(CharSpan("Switch13", 8))) } };
135+
#endif
136+
82137
static DeviceCallbacks EchoCallbacks;
83138

84139
TaskHandle_t sAppTaskHandle;
@@ -231,6 +286,8 @@ void AppTask::InitServer(intptr_t arg)
231286

232287
chip::Server::GetInstance().Init(initParams);
233288

289+
InitTag();
290+
234291
ConfigurationMgr().LogDeviceConfig();
235292
PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE));
236293
}
@@ -493,3 +550,36 @@ void AppTask::DispatchEvent(AppEvent * aEvent)
493550
* Update cluster status after application level changes
494551
*/
495552
void AppTask::UpdateClusterState(void) {}
553+
554+
void AppTask::InitTag()
555+
{
556+
#if CONFIG_DEFAULT_ZAP
557+
#elif CONFIG_1_TO_2_ZAP
558+
SetTagList(1, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch1TagList));
559+
SetTagList(2, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch2TagList));
560+
SetTagList(3, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch3TagList));
561+
#elif CONFIG_1_TO_8_ZAP
562+
SetTagList(1, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch1TagList));
563+
SetTagList(2, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch2TagList));
564+
SetTagList(3, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch3TagList));
565+
SetTagList(4, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch4TagList));
566+
SetTagList(5, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch5TagList));
567+
SetTagList(6, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch6TagList));
568+
SetTagList(7, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch7TagList));
569+
SetTagList(8, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch8TagList));
570+
SetTagList(9, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch9TagList));
571+
#elif CONFIG_1_TO_11_ZAP
572+
SetTagList(1, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch1TagList));
573+
SetTagList(2, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch2TagList));
574+
SetTagList(3, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch3TagList));
575+
SetTagList(4, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch4TagList));
576+
SetTagList(5, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch5TagList));
577+
SetTagList(6, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch6TagList));
578+
SetTagList(7, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch7TagList));
579+
SetTagList(8, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch8TagList));
580+
SetTagList(9, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch9TagList));
581+
SetTagList(11, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch11TagList));
582+
SetTagList(12, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch12TagList));
583+
SetTagList(13, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(switch13TagList));
584+
#endif
585+
}

examples/light-switch-app/realtek_bee/main/include/AppTask.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class AppTask
5151
friend AppTask & GetAppTask(void);
5252

5353
static void InitServer(intptr_t arg);
54-
54+
static void InitTag();
5555
// static void ActionInitiated(LightingManager::Action_t aAction);
5656
// static void ActionCompleted(LightingManager::Action_t aAction);
5757

examples/light-switch-app/realtek_bee/main/include/CHIPProjectConfig.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,17 @@
165165
#define CONFIG_DEFAULT_ZAP 1
166166
#endif
167167

168-
// You must copy light-switch-app-1_to_2 to example/light-switch-app/light-switch-common
168+
// You must modidy chip_main.cmake : ZAP_FILE ${matter_example_path}/data_model/light-switch-app-1_to_2.zap
169169
#ifndef CONFIG_1_TO_2_ZAP
170170
#define CONFIG_1_TO_2_ZAP 0
171171
#endif
172172

173-
// You must copy light-switch-app-1_to_8 to example/light-switch-app/light-switch-common
173+
// You must modidy chip_main.cmake : ZAP_FILE ${matter_example_path}/data_model/light-switch-app-1_to_8.zap
174174
#ifndef CONFIG_1_TO_8_ZAP
175175
#define CONFIG_1_TO_8_ZAP 0
176176
#endif
177177

178-
// You must copy light-switch-app-1_to_11 to example/light-switch-app/light-switch-common
178+
// You must modidy chip_main.cmake : ZAP_FILE ${matter_example_path}/data_model/light-switch-app-1_to_12.zap
179179
#ifndef CONFIG_1_TO_11_ZAP
180180
#define CONFIG_1_TO_11_ZAP 0
181181
#define MATTER_BINDING_TABLE_SIZE 20

examples/lighting-app/realtek_bee/data_model/lighting-app.matter

-2
Original file line numberDiff line numberDiff line change
@@ -2855,7 +2855,6 @@ endpoint 0 {
28552855
ram attribute clusterRevision default = 1;
28562856

28572857
handle command RetrieveLogsRequest;
2858-
handle command RetrieveLogsResponse;
28592858
}
28602859

28612860
server cluster GeneralDiagnostics {
@@ -3178,7 +3177,6 @@ endpoint 1 {
31783177
handle command GetSceneMembership;
31793178
handle command GetSceneMembershipResponse;
31803179
handle command CopyScene;
3181-
handle command CopySceneResponse;
31823180
}
31833181

31843182
server cluster ColorControl {

examples/lighting-app/realtek_bee/data_model/lighting-app.zap

+12-32
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"fileFormat": 2,
3-
"featureLevel": 106,
3+
"featureLevel": 103,
44
"creator": "zap",
55
"keyValuePairs": [
66
{
@@ -19,18 +19,18 @@
1919
"package": [
2020
{
2121
"pathRelativity": "relativeToZap",
22-
"path": "../../../../src/app/zap-templates/zcl/zcl.json",
23-
"type": "zcl-properties",
22+
"path": "../../../../src/app/zap-templates/app-templates.json",
23+
"type": "gen-templates-json",
2424
"category": "matter",
25-
"version": 1,
26-
"description": "Matter SDK ZCL data"
25+
"version": "chip-v1"
2726
},
2827
{
2928
"pathRelativity": "relativeToZap",
30-
"path": "../../../../src/app/zap-templates/app-templates.json",
31-
"type": "gen-templates-json",
29+
"path": "../../../../src/app/zap-templates/zcl/zcl.json",
30+
"type": "zcl-properties",
3231
"category": "matter",
33-
"version": "chip-v1"
32+
"version": 1,
33+
"description": "Matter SDK ZCL data"
3434
}
3535
],
3636
"endpointTypes": [
@@ -41,16 +41,14 @@
4141
"code": 22,
4242
"profileId": 259,
4343
"label": "MA-rootdevice",
44-
"name": "MA-rootdevice",
45-
"deviceTypeOrder": 0
44+
"name": "MA-rootdevice"
4645
},
4746
"deviceTypes": [
4847
{
4948
"code": 22,
5049
"profileId": 259,
5150
"label": "MA-rootdevice",
52-
"name": "MA-rootdevice",
53-
"deviceTypeOrder": 0
51+
"name": "MA-rootdevice"
5452
}
5553
],
5654
"deviceVersions": [
@@ -1508,14 +1506,6 @@
15081506
"source": "client",
15091507
"isIncoming": 1,
15101508
"isEnabled": 1
1511-
},
1512-
{
1513-
"name": "RetrieveLogsResponse",
1514-
"code": 1,
1515-
"mfgCode": null,
1516-
"source": "server",
1517-
"isIncoming": 0,
1518-
"isEnabled": 1
15191509
}
15201510
],
15211511
"attributes": [
@@ -4166,16 +4156,14 @@
41664156
"code": 257,
41674157
"profileId": 259,
41684158
"label": "MA-dimmablelight",
4169-
"name": "MA-dimmablelight",
4170-
"deviceTypeOrder": 0
4159+
"name": "MA-dimmablelight"
41714160
},
41724161
"deviceTypes": [
41734162
{
41744163
"code": 257,
41754164
"profileId": 259,
41764165
"label": "MA-dimmablelight",
4177-
"name": "MA-dimmablelight",
4178-
"deviceTypeOrder": 0
4166+
"name": "MA-dimmablelight"
41794167
}
41804168
],
41814169
"deviceVersions": [
@@ -5102,14 +5090,6 @@
51025090
"source": "client",
51035091
"isIncoming": 1,
51045092
"isEnabled": 1
5105-
},
5106-
{
5107-
"name": "CopySceneResponse",
5108-
"code": 64,
5109-
"mfgCode": null,
5110-
"source": "server",
5111-
"isIncoming": 0,
5112-
"isEnabled": 1
51135093
}
51145094
],
51155095
"attributes": [

scripts/build/testdata/all_targets_linux_x64.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,loc
2020
nrf-native-sim-tests
2121
nuttx-x64-light
2222
qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage]
23-
realtek-rtl8777g-{light,light-switch,lock,window}
23+
realtek-rtl8777g-{lighting,light-switch,lock,window}
2424
stm32-stm32wb5mm-dk-light
2525
tizen-arm-{all-clusters,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-coverage][-with-ui]
2626
telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tl3218x,tl7218x,tl7218x_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb][-compress-lzma][-thread-analyzer]

0 commit comments

Comments
 (0)