Skip to content

Commit

Permalink
[ICD] Implements initial version of the Client Monitoring Cluster (#2…
Browse files Browse the repository at this point in the history
…4284)

* Initial implementation of the CM cluster

* Update function calls

* Add Yaml tests for cluster

* remove unwanted changes

* generated files

* Address review comments

* restyler

* zap regen error

* add cm table source file to cmake build

* fix android build

* add CM to descriptor cluster test

* fix esp build

* fix CI nit

* fix typo
  • Loading branch information
mkardous-silabs authored and pull[bot] committed Jul 27, 2023
1 parent 36d12ba commit 2218564
Show file tree
Hide file tree
Showing 62 changed files with 5,835 additions and 156 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3548,6 +3548,37 @@ server cluster ElectricalMeasurement = 2820 {
readonly attribute int16u clusterRevision = 65533;
}

server cluster ClientMonitoring = 4166 {
fabric_scoped struct MonitoringRegistration {
node_id clientNodeId = 1;
int64u ICid = 2;
fabric_idx fabricIndex = 254;
}

readonly attribute int32u idleModeInterval = 0;
readonly attribute int32u activeModeInterval = 1;
readonly attribute int16u activeModeThreshold = 2;
readonly attribute MonitoringRegistration expectedClients[] = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct RegisterClientMonitoringRequest {
node_id clientNodeId = 0;
INT64U ICid = 1;
}

request struct UnregisterClientMonitoringRequest {
node_id clientNodeId = 0;
INT64U ICid = 1;
}

command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): DefaultSuccess = 0;
command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 1;
}

server cluster UnitTesting = 4294048773 {
enum SimpleEnum : ENUM8 {
kUnspecified = 0;
Expand Down Expand Up @@ -4213,6 +4244,18 @@ endpoint 0 {
ram attribute clusterRevision default = 3;
}

server cluster ClientMonitoring {
ram attribute idleModeInterval default = 0x12C;
ram attribute activeModeInterval default = 0x12C;
ram attribute activeModeThreshold default = 0xFA0;
callback attribute expectedClients;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster FaultInjection {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
Expand Down
217 changes: 216 additions & 1 deletion examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -8054,6 +8054,220 @@
}
]
},
{
"name": "Client Monitoring",
"code": 4166,
"mfgCode": null,
"define": "CLIENT_MONITORING_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
{
"name": "RegisterClientMonitoring",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "UnregisterClientMonitoring",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
}
],
"attributes": [
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "client",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "client",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Client Monitoring",
"code": 4166,
"mfgCode": null,
"define": "CLIENT_MONITORING_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
{
"name": "IdleModeInterval",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x12C",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActiveModeInterval",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x12C",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActiveModeThreshold",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFA0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ExpectedClients",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Unit Testing",
"code": 4294048773,
Expand Down Expand Up @@ -24740,5 +24954,6 @@
"endpointVersion": 1,
"deviceIdentifier": 61442
}
]
],
"log": []
}
1 change: 1 addition & 0 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/client-monitoring-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server"
Expand Down
Loading

0 comments on commit 2218564

Please sign in to comment.