Skip to content

Commit

Permalink
Enable optional Basic Cluster attributes and Pump Configuration And C… (
Browse files Browse the repository at this point in the history
#6371)

* Enable optional Basic Cluster attributes and Pump Configuration And Control cluster into the all-clusters-app

* Add a length for some of the optional attributes of the Basic Cluster since the current implementation expects strings to have a pre-defined length
  • Loading branch information
vivien-apple authored and pull[bot] committed Sep 13, 2021
1 parent 27d32c7 commit 1406649
Show file tree
Hide file tree
Showing 7 changed files with 570 additions and 83 deletions.
276 changes: 272 additions & 4 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 26,
"featureLevel": 29,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -1081,6 +1081,96 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ManufacturingDate",
"code": 11,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "PartNumber",
"code": 12,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ProductURL",
"code": 13,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ProductLabel",
"code": 14,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "SerialNumber",
"code": 15,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "LocalConfigDisabled",
"code": 16,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "cluster revision",
"code": 65533,
Expand Down Expand Up @@ -6213,6 +6303,178 @@
}
]
},
{
"name": "Pump Configuration and Control",
"code": 512,
"mfgCode": null,
"define": "PUMP_CONFIG_CONTROL_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": [
{
"name": "cluster revision",
"code": 65533,
"mfgCode": null,
"side": "client",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0001",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "Pump Configuration and Control",
"code": 512,
"mfgCode": null,
"define": "PUMP_CONFIG_CONTROL_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "max pressure",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "max speed",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "max flow",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "pump status",
"code": 16,
"mfgCode": null,
"side": "server",
"included": 0,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "effective operation mode",
"code": 17,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "effective control mode",
"code": 18,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "capacity",
"code": 19,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "operation mode",
"code": 32,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "cluster revision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0001",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "Thermostat",
"code": 513,
Expand Down Expand Up @@ -10918,21 +11180,27 @@
"endpointTypeIndex": 0,
"profileId": 259,
"endpointId": 0,
"networkId": 0
"networkId": 0,
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "Anonymous Endpoint Type",
"endpointTypeIndex": 1,
"profileId": "0x0103",
"endpointId": 1,
"networkId": 0
"networkId": 0,
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "Anonymous Endpoint Type",
"endpointTypeIndex": 2,
"profileId": "0x0103",
"endpointId": 2,
"networkId": 0
"networkId": 0,
"endpointVersion": null,
"deviceIdentifier": null
}
],
"log": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ EmberAfStatus emberAfOtaSoftwareUpdateClientClusterServerCommandParse(EmberAfClu
EmberAfStatus emberAfOtaSoftwareUpdateServerClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfOperationalCredentialsClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfPumpConfigurationAndControlClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfSwitchClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfTemperatureMeasurementClusterServerCommandParse(EmberAfClusterCommand * cmd);
Expand Down Expand Up @@ -152,6 +153,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd)
case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID:
result = emberAfOperationalCredentialsClusterServerCommandParse(cmd);
break;
case ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID:
// No commands are enabled for cluster Pump Configuration and Control
result = status(false, true, cmd->mfgSpecific);
break;
case ZCL_SCENES_CLUSTER_ID:
result = emberAfScenesClusterServerCommandParse(cmd);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID:
emberAfOperationalCredentialsClusterInitCallback(endpoint);
break;
case ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID:
emberAfPumpConfigurationAndControlClusterInitCallback(endpoint);
break;
case ZCL_SCENES_CLUSTER_ID:
emberAfScenesClusterInitCallback(endpoint);
break;
Expand Down Expand Up @@ -199,6 +202,11 @@ void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(Endp
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfPumpConfigurationAndControlClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfScenesClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
Expand Down
Loading

0 comments on commit 1406649

Please sign in to comment.