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

Restyle Part 3: feature/air pressure measurement cluster #7255

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c0be967
format endpointClusterWithInit for easier pull requests
May 20, 2021
81bf8ab
add air pressure measurement clsuter definition to zap tool
May 19, 2021
425f476
add support for emberAfAirPressureMeasurementClusterServerInitCallback
May 20, 2021
97a66f4
add air pressure measurement cluster to controller-clusters.zap
May 20, 2021
442c6c1
add impl. for air pressure measurement cluster on the server side
May 19, 2021
d2ff9e1
Add new clusters to zap_cluster_list.py
vivien-apple May 20, 2021
27a13ea
Restyled by clang-format
restyled-commits May 21, 2021
310b630
apply fixes
May 25, 2021
5e1e86b
remove emberAfAirPressureMeasurementClusterServerInitCallback impl.
May 26, 2021
c01614e
fix year in copyright
May 26, 2021
b6daa01
remove unrelated clusters in zap_cluster_list.py
May 26, 2021
d7082b4
remove altitude command
May 27, 2021
14cb669
add air pressure measurement to all-cluster-app.zap
May 28, 2021
2b6f7b9
fix includes in air-pressure-measurement-cluster.cpp
May 28, 2021
7b326ee
expose emberAfAirPressureMeasurementClusterSetAltitudeValue
May 28, 2021
4660f5b
try to fix all-cluster-app/esp32
May 28, 2021
268ca65
another try to fix all-cluster-app/esp32
May 28, 2021
5418e13
move air pressure measurement cluster to endpoint 1
May 31, 2021
eefa01b
disable generation of emberAfAirPressureMeasurementClusterServerInitC…
May 31, 2021
c587937
adapt description in air-pressure-measurment.xml
May 31, 2021
70f5a63
extend value range of min / max of air pressure measurement
May 31, 2021
22af391
regen all
May 31, 2021
fdbb482
Restyled by clang-format
restyled-commits May 31, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 165 additions & 1 deletion 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": 29,
"featureLevel": 35,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -5106,6 +5106,88 @@
}
]
},
{
"name": "Air Pressure Measurement",
"code": 1031,
"mfgCode": null,
"define": "AIR_PRESSURE_MEASUREMENT_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": "Air Pressure Measurement",
"code": 1031,
"mfgCode": null,
"define": "AIR_PRESSURE_MEASUREMENT_CLUSTER",
"side": "server",
"enabled": 0,
"commands": [],
"attributes": [
{
"name": "measured value",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "10132",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "altitude",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"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": "IAS Zone",
"code": 1280,
Expand Down Expand Up @@ -10342,6 +10424,88 @@
}
]
},
{
"name": "Air Pressure Measurement",
"code": 1031,
"mfgCode": null,
"define": "AIR_PRESSURE_MEASUREMENT_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": "Air Pressure Measurement",
"code": 1031,
"mfgCode": null,
"define": "AIR_PRESSURE_MEASUREMENT_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "measured value",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "10132",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "altitude",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"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": "IAS Zone",
"code": 1280,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
using namespace chip;

EmberAfStatus emberAfAccountLoginClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfAirPressureMeasurementClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfApplicationBasicClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfApplicationLauncherClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand * cmd);
Expand Down Expand Up @@ -118,6 +119,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd)
// No commands are enabled for cluster Account Login
result = status(false, true, cmd->mfgSpecific);
break;
case ZCL_AIR_PRESSURE_MEASUREMENT_CLUSTER_ID:
// No commands are enabled for cluster Air Pressure Measurement
result = status(false, true, cmd->mfgSpecific);
break;
case ZCL_APPLICATION_BASIC_CLUSTER_ID:
// No commands are enabled for cluster Application Basic
result = status(false, true, cmd->mfgSpecific);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
case ZCL_ACCOUNT_LOGIN_CLUSTER_ID:
emberAfAccountLoginClusterInitCallback(endpoint);
break;
case ZCL_AIR_PRESSURE_MEASUREMENT_CLUSTER_ID:
emberAfAirPressureMeasurementClusterInitCallback(endpoint);
break;
case ZCL_APPLICATION_BASIC_CLUSTER_ID:
emberAfApplicationBasicClusterInitCallback(endpoint);
break;
Expand Down Expand Up @@ -178,6 +181,11 @@ void __attribute__((weak)) emberAfAccountLoginClusterInitCallback(EndpointId end
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfAirPressureMeasurementClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfApplicationBasicClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
Expand Down
80 changes: 80 additions & 0 deletions examples/all-clusters-app/all-clusters-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ void emberAfClusterInitCallback(chip::EndpointId endpoint, chip::ClusterId clust
*/
void emberAfAccountLoginClusterInitCallback(chip::EndpointId endpoint);

/** @brief Air Pressure Measurement Cluster Init
*
* Cluster Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAfAirPressureMeasurementClusterInitCallback(chip::EndpointId endpoint);

/** @brief Application Basic Cluster Init
*
* Cluster Init
Expand Down Expand Up @@ -480,6 +488,78 @@ EmberAfStatus emberAfAccountLoginClusterServerPreAttributeChangedCallback(chip::
*/
void emberAfAccountLoginClusterServerTickCallback(chip::EndpointId endpoint);

//
// Air Pressure Measurement Cluster server
//

/** @brief Air Pressure Measurement Cluster Server Init
*
* Server Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAfAirPressureMeasurementClusterServerInitCallback(chip::EndpointId endpoint);

/** @brief Air Pressure Measurement Cluster Server Attribute Changed
*
* Server Attribute Changed
*
* @param endpoint Endpoint that is being initialized
* @param attributeId Attribute that changed
*/
void emberAfAirPressureMeasurementClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);

/** @brief Air Pressure Measurement Cluster Server Manufacturer Specific Attribute Changed
*
* Server Manufacturer Specific Attribute Changed
*
* @param endpoint Endpoint that is being initialized
* @param attributeId Attribute that changed
* @param manufacturerCode Manufacturer Code of the attribute that changed
*/
void emberAfAirPressureMeasurementClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
chip::AttributeId attributeId,
uint16_t manufacturerCode);

/** @brief Air Pressure Measurement Cluster Server Message Sent
*
* Server Message Sent
*
* @param type The type of message sent
* @param destination The destination to which the message was sent
* @param apsFrame The APS frame for the message
* @param msgLen The length of the message
* @param message The message that was sent
* @param status The status of the sent message
*/
void emberAfAirPressureMeasurementClusterServerMessageSentCallback(EmberOutgoingMessageType type,
chip::MessageSendDestination destination,
EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
EmberStatus status);

/** @brief Air Pressure Measurement Cluster Server Pre Attribute Changed
*
* server Pre Attribute Changed
*
* @param endpoint Endpoint that is being initialized
* @param attributeId Attribute to be changed
* @param attributeType Attribute type
* @param size Attribute size
* @param value Attribute value
*/
EmberAfStatus emberAfAirPressureMeasurementClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint,
chip::AttributeId attributeId,
EmberAfAttributeType attributeType,
uint16_t size, uint8_t * value);

/** @brief Air Pressure Measurement Cluster Server Tick
*
* server Tick
*
* @param endpoint Endpoint that is being served
*/
void emberAfAirPressureMeasurementClusterServerTickCallback(chip::EndpointId endpoint);

//
// Application Basic Cluster server
//
Expand Down
Loading