Skip to content

Commit

Permalink
Merge 39516dc into 01ee80e
Browse files Browse the repository at this point in the history
  • Loading branch information
tlykkeberg-grundfos authored Jun 18, 2021
2 parents 01ee80e + 39516dc commit 1134392
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,10 @@
const EmberAfGenericClusterFunction chipFuncArrayDoorLockServer[] = { \
(EmberAfGenericClusterFunction) emberAfDoorLockClusterServerAttributeChangedCallback, \
}; \
const EmberAfGenericClusterFunction chipFuncArrayPumpConfigurationAndControlServer[] = { \
(EmberAfGenericClusterFunction) emberAfPumpConfigurationAndControlClusterServerInitCallback, \
(EmberAfGenericClusterFunction) emberAfPumpConfigurationAndControlClusterServerAttributeChangedCallback, \
}; \
const EmberAfGenericClusterFunction chipFuncArrayColorControlServer[] = { \
(EmberAfGenericClusterFunction) emberAfColorControlClusterServerInitCallback, \
}; \
Expand Down Expand Up @@ -2258,7 +2262,12 @@
0x0103, ZAP_ATTRIBUTE_INDEX(178), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \
}, /* Endpoint: 1, Cluster: Barrier Control (server) */ \
{ \
0x0200, ZAP_ATTRIBUTE_INDEX(183), 8, 13, ZAP_CLUSTER_MASK(SERVER), NULL \
0x0200, \
ZAP_ATTRIBUTE_INDEX(183), \
8, \
13, \
ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \
chipFuncArrayPumpConfigurationAndControlServer \
}, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \
{ \
0x0201, ZAP_ATTRIBUTE_INDEX(191), 6, 10, ZAP_CLUSTER_MASK(SERVER), NULL \
Expand Down
2 changes: 1 addition & 1 deletion examples/pump-app/cc13x2x7_26x2x7/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ti_simplelink_executable("pump_app") {
":sysconfig",
"${chip_root}/examples/pump-app/pump-common",
"${chip_root}/src/lib",
"${openthread_root}:libopenthread-cli-ftd",
"${openthread_root}:libopenthread-ftd",
]

include_dirs = [
Expand Down
2 changes: 1 addition & 1 deletion examples/pump-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using namespace ::chip;

void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask,
uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value)
uint16_t manufacturerCode, uint8_t type, uint16_t size, uint8_t * value)
{
if (clusterId != ZCL_ON_OFF_CLUSTER_ID)
{
Expand Down
11 changes: 10 additions & 1 deletion examples/pump-app/pump-common/gen/endpoint_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,10 @@
}; \
const EmberAfGenericClusterFunction chipFuncArrayBasicServer[] = { \
(EmberAfGenericClusterFunction) emberAfBasicClusterServerInitCallback, \
}; \
const EmberAfGenericClusterFunction chipFuncArrayPumpConfigurationAndControlServer[] = { \
(EmberAfGenericClusterFunction) emberAfPumpConfigurationAndControlClusterServerInitCallback, \
(EmberAfGenericClusterFunction) emberAfPumpConfigurationAndControlClusterServerAttributeChangedCallback, \
};

#define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask
Expand Down Expand Up @@ -803,7 +807,12 @@
0x003E, ZAP_ATTRIBUTE_INDEX(98), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \
}, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \
{ \
0x0200, ZAP_ATTRIBUTE_INDEX(100), 8, 13, ZAP_CLUSTER_MASK(SERVER), NULL \
0x0200, \
ZAP_ATTRIBUTE_INDEX(100), \
8, \
13, \
ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \
chipFuncArrayPumpConfigurationAndControlServer \
}, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \
{ \
0x0402, ZAP_ATTRIBUTE_INDEX(108), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \
Expand Down
2 changes: 1 addition & 1 deletion examples/pump-controller-app/cc13x2x7_26x2x7/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ti_simplelink_executable("pump_controller_app") {
":sysconfig",
"${chip_root}/examples/pump-controller-app/pump-controller-common",
"${chip_root}/src/lib",
"${openthread_root}:libopenthread-cli-ftd",
"${openthread_root}:libopenthread-ftd",
]

include_dirs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using namespace ::chip;

void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask,
uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value)
uint16_t manufacturerCode, uint8_t type, uint16_t size, uint8_t * value)
{
if (clusterId != ZCL_ON_OFF_CLUSTER_ID)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ using namespace chip;

void emberAfPumpConfigurationAndControlClusterServerInitCallback(EndpointId endpoint)
{
emberAfDebugPrintln("Initialize PCC Server Cluster [EP:%d]", endpoint);
// TODO
}

void emberAfPumpConfigurationAndControlClusterServerAttributeChangedCallback(EndpointId endpoint, AttributeId attributeId)
{
emberAfDebugPrintln("PCC Server Cluster Attribute changed [EP:%d, ID:0x%x]", endpoint, attributeId);
// TODO
}
8 changes: 5 additions & 3 deletions src/app/zap-templates/templates/app/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ function asChipUnderlyingType(label, type)
// These helpers only works within the endpoint_config iterator

// List of all cluster with generated functions
var endpointClusterWithInit =
[ 'Basic', 'Identify', 'Groups', 'Scenes', 'Occupancy Sensing', 'On/off', 'Level Control', 'Color Control', 'IAS Zone' ];
var endpointClusterWithAttributeChanged = [ 'Identify', 'Door Lock' ];
var endpointClusterWithInit = [
'Basic', 'Identify', 'Groups', 'Scenes', 'Occupancy Sensing', 'On/off', 'Level Control', 'Color Control', 'IAS Zone',
'Pump Configuration and Control'
];
var endpointClusterWithAttributeChanged = [ 'Identify', 'Door Lock', 'Pump Configuration and Control' ];
var endpointClusterWithPreAttribute = [ 'IAS Zone' ];
var endpointClusterWithMessageSent = [ 'IAS Zone' ];

Expand Down

0 comments on commit 1134392

Please sign in to comment.