Skip to content

Commit

Permalink
Modify the generated files for example lighting and lock apps to incl…
Browse files Browse the repository at this point in the history
…ude server init callbacks.

This allows the app to implement
emberAfPluginOnOffClusterServerPostInitCallback to sync up the data
model state with the state of the actual device when the data model
initializes.
  • Loading branch information
bzbarsky-apple committed Oct 9, 2020
1 parent 324f704 commit 612e0d4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
7 changes: 5 additions & 2 deletions examples/lighting-app/lighting-common/gen/endpoint_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@
}

// Cluster function static arrays
#define GENERATED_FUNCTION_ARRAYS
#define GENERATED_FUNCTION_ARRAYS \
const EmberAfGenericClusterFunction emberAfFuncArrayOnOffClusterServer[] = { ( \
EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback };

// Clusters definitions
#define GENERATED_CLUSTERS \
{ \
{ \
0x0006, (EmberAfAttributeMetadata *) &(generatedAttributes[0]), 2, 3, (CLUSTER_MASK_SERVER), NULL, \
0x0006, (EmberAfAttributeMetadata *) &(generatedAttributes[0]), 2, \
3, (CLUSTER_MASK_SERVER | CLUSTER_MASK_INIT_FUNCTION), emberAfFuncArrayOnOffClusterServer, \
}, \
}

Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/lighting-common/gen/gen_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
#define EMBER_CALLBACK_ON_OFF_CLUSTER_OFF
#define EMBER_CALLBACK_ON_OFF_CLUSTER_ON
#define EMBER_CALLBACK_ON_OFF_CLUSTER_TOGGLE
#define EMBER_CALLBACK_ON_OFF_CLUSTER_ON_OFF_CLUSTER_SERVER_INIT
#define EMBER_CALLBACK_ENERGY_SCAN_RESULT
#define EMBER_CALLBACK_SCAN_COMPLETE
#define EMBER_CALLBACK_NETWORK_FOUND
Expand Down
7 changes: 5 additions & 2 deletions examples/lock-app/lock-common/gen/endpoint_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@
}

// Cluster function static arrays
#define GENERATED_FUNCTION_ARRAYS
#define GENERATED_FUNCTION_ARRAYS \
const EmberAfGenericClusterFunction emberAfFuncArrayOnOffClusterServer[] = { ( \
EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback };

// Clusters definitions
#define GENERATED_CLUSTERS \
{ \
{ \
0x0006, (EmberAfAttributeMetadata *) &(generatedAttributes[0]), 2, 3, (CLUSTER_MASK_SERVER), NULL, \
0x0006, (EmberAfAttributeMetadata *) &(generatedAttributes[0]), 2, \
3, (CLUSTER_MASK_SERVER | CLUSTER_MASK_INIT_FUNCTION), emberAfFuncArrayOnOffClusterServer, \
}, \
}

Expand Down
1 change: 1 addition & 0 deletions examples/lock-app/lock-common/gen/gen_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
#define EMBER_CALLBACK_ON_OFF_CLUSTER_OFF
#define EMBER_CALLBACK_ON_OFF_CLUSTER_ON
#define EMBER_CALLBACK_ON_OFF_CLUSTER_TOGGLE
#define EMBER_CALLBACK_ON_OFF_CLUSTER_ON_OFF_CLUSTER_SERVER_INIT
#define EMBER_CALLBACK_ENERGY_SCAN_RESULT
#define EMBER_CALLBACK_SCAN_COMPLETE
#define EMBER_CALLBACK_NETWORK_FOUND
Expand Down

0 comments on commit 612e0d4

Please sign in to comment.