Skip to content

Commit 8f32baa

Browse files
samples: matter: Fix Matter Mfg sample
By mistake NordicDevKit cluster was removed. Re-enable it once again. Signed-off-by: Arkadiusz Balys <[email protected]>
1 parent 2cfd7d9 commit 8f32baa

File tree

8 files changed

+817
-286
lines changed

8 files changed

+817
-286
lines changed

samples/matter/manufacturer_specific/src/default_zap/manufacturer_specific.matter

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,9 @@ cluster BasicInformation = 40 {
568568
boolean reachableNewValue = 0;
569569
}
570570

571+
info event RandomNumberChanged = 4 {
572+
}
573+
571574
readonly attribute int16u dataModelRevision = 0;
572575
readonly attribute char_string<32> vendorName = 1;
573576
readonly attribute vendor_id vendorID = 2;
@@ -591,13 +594,16 @@ cluster BasicInformation = 40 {
591594
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
592595
readonly attribute int32u specificationVersion = 21;
593596
readonly attribute int16u maxPathsPerInvoke = 22;
597+
attribute int16u randomNumber = 23;
594598
readonly attribute int32u configurationVersion = 24;
595599
readonly attribute command_id generatedCommandList[] = 65528;
596600
readonly attribute command_id acceptedCommandList[] = 65529;
597601
readonly attribute attrib_id attributeList[] = 65531;
598602
readonly attribute bitmap32 featureMap = 65532;
599603
readonly attribute int16u clusterRevision = 65533;
600604

605+
/** Generate random number */
606+
command GenerateRandom(): DefaultSuccess = 0;
601607
command MfgSpecificPing(): DefaultSuccess = 0;
602608
}
603609

@@ -1436,6 +1442,66 @@ cluster GroupKeyManagement = 63 {
14361442
fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4;
14371443
}
14381444

1445+
/** The NordicDevKit cluster showcases a cluster manufacturer extensions */
1446+
cluster NordicDevKit = 4294048769 {
1447+
revision 1; // NOTE: Default/not specifically set
1448+
1449+
enum LEDActionEnum : enum8 {
1450+
kOff = 0;
1451+
kOn = 1;
1452+
kToggle = 2;
1453+
}
1454+
1455+
info event UserButtonChanged = 4293984256 {
1456+
}
1457+
1458+
readonly attribute command_id generatedCommandList[] = 65528;
1459+
readonly attribute command_id acceptedCommandList[] = 65529;
1460+
readonly attribute attrib_id attributeList[] = 65531;
1461+
readonly attribute bitmap32 featureMap = 65532;
1462+
readonly attribute int16u clusterRevision = 65533;
1463+
attribute char_string<254> devKitName = 4293984256;
1464+
provisional readonly nosubscribe attribute boolean userLED = 4293984257;
1465+
provisional readonly nosubscribe attribute boolean userButton = 4293984258;
1466+
1467+
request struct SetLEDRequest {
1468+
LEDActionEnum action = 0;
1469+
}
1470+
1471+
/** Change LED state */
1472+
command SetLED(SetLEDRequest): DefaultSuccess = 4293984256;
1473+
}
1474+
1475+
/** The NordicDevKit cluster showcases a cluster manufacturer extensions */
1476+
cluster NordicDevKit = 4294048769 {
1477+
revision 1; // NOTE: Default/not specifically set
1478+
1479+
enum LEDActionEnum : enum8 {
1480+
kOff = 0;
1481+
kOn = 1;
1482+
kToggle = 2;
1483+
}
1484+
1485+
info event UserButtonChanged = 4293984256 {
1486+
}
1487+
1488+
readonly attribute command_id generatedCommandList[] = 65528;
1489+
readonly attribute command_id acceptedCommandList[] = 65529;
1490+
readonly attribute attrib_id attributeList[] = 65531;
1491+
readonly attribute bitmap32 featureMap = 65532;
1492+
readonly attribute int16u clusterRevision = 65533;
1493+
attribute char_string<254> devKitName = 4293984256;
1494+
provisional readonly nosubscribe attribute boolean userLED = 4293984257;
1495+
provisional readonly nosubscribe attribute boolean userButton = 4293984258;
1496+
1497+
request struct SetLEDRequest {
1498+
LEDActionEnum action = 0;
1499+
}
1500+
1501+
/** Change LED state */
1502+
command SetLED(SetLEDRequest): DefaultSuccess = 4293984256;
1503+
}
1504+
14391505
endpoint 0 {
14401506
device type ma_rootdevice = 22, version 3;
14411507
device type ma_otarequestor = 18, version 1;
@@ -1471,6 +1537,7 @@ endpoint 0 {
14711537
emits event StartUp;
14721538
emits event ShutDown;
14731539
emits event Leave;
1540+
emits event RandomNumberChanged;
14741541
callback attribute dataModelRevision;
14751542
callback attribute vendorName;
14761543
callback attribute vendorID;
@@ -1488,11 +1555,14 @@ endpoint 0 {
14881555
callback attribute capabilityMinima;
14891556
callback attribute specificationVersion;
14901557
callback attribute maxPathsPerInvoke;
1558+
ram attribute randomNumber default = 0;
14911559
callback attribute generatedCommandList;
14921560
callback attribute acceptedCommandList;
14931561
callback attribute attributeList;
14941562
ram attribute featureMap default = 0;
14951563
ram attribute clusterRevision default = 4;
1564+
1565+
handle command GenerateRandom;
14961566
}
14971567

14981568
server cluster OtaSoftwareUpdateRequestor {
@@ -1644,5 +1714,21 @@ endpoint 0 {
16441714
}
16451715
}
16461716
endpoint 1 {
1717+
device type nordic_dev_kit = 1, version 1;
1718+
1719+
binding cluster NordicDevKit;
1720+
1721+
server cluster NordicDevKit {
1722+
emits event UserButtonChanged;
1723+
callback attribute generatedCommandList;
1724+
callback attribute acceptedCommandList;
1725+
callback attribute attributeList;
1726+
ram attribute featureMap default = 0;
1727+
ram attribute clusterRevision default = 1;
1728+
ram attribute devKitName default = "Nordic Development Kit";
1729+
ram attribute userLED default = false;
1730+
ram attribute userButton default = false;
16471731

1732+
handle command SetLED;
1733+
}
16481734
}

0 commit comments

Comments
 (0)