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

[ICD] Implements initial version of the Client Monitoring Cluster #24284

Merged
merged 14 commits into from
Jan 9, 2023
Merged
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": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -1718,6 +1718,34 @@ client cluster ColorControl = 768 {
command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68;
}

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 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;
}

endpoint 0 {
device type rootdevice = 22, version 1;
binding cluster OtaSoftwareUpdateProvider;
Expand Down Expand Up @@ -1987,6 +2015,15 @@ endpoint 0 {
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster ClientMonitoring {
ram attribute idleModeInterval default = 0x12C;
ram attribute activeModeInterval default = 0x12C;
ram attribute activeModeThreshold default = 0xFA0;
callback attribute expectedClients;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}
}
endpoint 1 {
device type onofflightswitch = 259, version 1;
Expand Down
Loading