Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / bridge-app / bridge-common / gen / client-command-macro.h-aa80d825
1 /*
2  *
3  *    Copyright (c) 2021 Project CHIP Authors
4  *
5  *    Licensed under the Apache License, Version 2.0 (the "License");
6  *    you may not use this file except in compliance with the License.
7  *    You may obtain a copy of the License at
8  *
9  *        http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *    Unless required by applicable law or agreed to in writing, software
12  *    distributed under the License is distributed on an "AS IS" BASIS,
13  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *    See the License for the specific language governing permissions and
15  *    limitations under the License.
16  */
17
18 // THIS FILE IS GENERATED BY ZAP
19
20 // Prevent multiple inclusion
21 #pragma once
22
23 /** @brief Command description for ReadAttributes
24  *
25  * Command: ReadAttributes
26  * @param attributeIds ATTRIBUTE_ID []
27  * @param attributeIdsLen int
28  */
29 #define emberAfFillCommandGlobalReadAttributes(clusterId, attributeIds, attributeIdsLen)                                           \
30     emberAfFillExternalBuffer(mask, clusterId, ZCL_READ_ATTRIBUTES_COMMAND_ID, "b", attributeIds, attributeIdsLen);
31
32 /** @brief Command description for ReadAttributesResponse
33  *
34  * Command: ReadAttributesResponse
35  * @param readAttributeStatusRecords ReadAttributeStatusRecord []
36  * @param readAttributeStatusRecordsLen int
37  */
38 #define emberAfFillCommandGlobalReadAttributesResponse(clusterId, readAttributeStatusRecords, readAttributeStatusRecordsLen)       \
39     emberAfFillExternalBuffer(mask, clusterId, ZCL_READ_ATTRIBUTES_RESPONSE_COMMAND_ID, "b", readAttributeStatusRecords,           \
40                               readAttributeStatusRecordsLen);
41
42 /** @brief Command description for WriteAttributes
43  *
44  * Command: WriteAttributes
45  * @param writeAttributeRecords WriteAttributeRecord []
46  * @param writeAttributeRecordsLen int
47  */
48 #define emberAfFillCommandGlobalWriteAttributes(clusterId, writeAttributeRecords, writeAttributeRecordsLen)                        \
49     emberAfFillExternalBuffer(mask, clusterId, ZCL_WRITE_ATTRIBUTES_COMMAND_ID, "b", writeAttributeRecords,                        \
50                               writeAttributeRecordsLen);
51
52 /** @brief Command description for WriteAttributesUndivided
53  *
54  * Command: WriteAttributesUndivided
55  * @param writeAttributeRecords WriteAttributeRecord []
56  * @param writeAttributeRecordsLen int
57  */
58 #define emberAfFillCommandGlobalWriteAttributesUndivided(clusterId, writeAttributeRecords, writeAttributeRecordsLen)               \
59     emberAfFillExternalBuffer(mask, clusterId, ZCL_WRITE_ATTRIBUTES_UNDIVIDED_COMMAND_ID, "b", writeAttributeRecords,              \
60                               writeAttributeRecordsLen);
61
62 /** @brief Command description for WriteAttributesResponse
63  *
64  * Command: WriteAttributesResponse
65  * @param writeAttributeStatusRecords WriteAttributeStatusRecord []
66  * @param writeAttributeStatusRecordsLen int
67  */
68 #define emberAfFillCommandGlobalWriteAttributesResponse(clusterId, writeAttributeStatusRecords, writeAttributeStatusRecordsLen)    \
69     emberAfFillExternalBuffer(mask, clusterId, ZCL_WRITE_ATTRIBUTES_RESPONSE_COMMAND_ID, "b", writeAttributeStatusRecords,         \
70                               writeAttributeStatusRecordsLen);
71
72 /** @brief Command description for WriteAttributesNoResponse
73  *
74  * Command: WriteAttributesNoResponse
75  * @param writeAttributeRecords WriteAttributeRecord []
76  * @param writeAttributeRecordsLen int
77  */
78 #define emberAfFillCommandGlobalWriteAttributesNoResponse(clusterId, writeAttributeRecords, writeAttributeRecordsLen)              \
79     emberAfFillExternalBuffer(mask, clusterId, ZCL_WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_ID, "b", writeAttributeRecords,            \
80                               writeAttributeRecordsLen);
81
82 /** @brief Command description for ConfigureReporting
83  *
84  * Command: ConfigureReporting
85  * @param configureReportingRecords ConfigureReportingRecord []
86  * @param configureReportingRecordsLen int
87  */
88 #define emberAfFillCommandGlobalConfigureReporting(clusterId, configureReportingRecords, configureReportingRecordsLen)             \
89     emberAfFillExternalBuffer(mask, clusterId, ZCL_CONFIGURE_REPORTING_COMMAND_ID, "b", configureReportingRecords,                 \
90                               configureReportingRecordsLen);
91
92 /** @brief Command description for ConfigureReportingResponse
93  *
94  * Command: ConfigureReportingResponse
95  * @param configureReportingStatusRecords ConfigureReportingStatusRecord []
96  * @param configureReportingStatusRecordsLen int
97  */
98 #define emberAfFillCommandGlobalConfigureReportingResponse(clusterId, configureReportingStatusRecords,                             \
99                                                            configureReportingStatusRecordsLen)                                     \
100     emberAfFillExternalBuffer(mask, clusterId, ZCL_CONFIGURE_REPORTING_RESPONSE_COMMAND_ID, "b", configureReportingStatusRecords,  \
101                               configureReportingStatusRecordsLen);
102
103 /** @brief Command description for ReadReportingConfiguration
104  *
105  * Command: ReadReportingConfiguration
106  * @param readReportingConfigurationAttributeRecords ReadReportingConfigurationAttributeRecord []
107  * @param readReportingConfigurationAttributeRecordsLen int
108  */
109 #define emberAfFillCommandGlobalReadReportingConfiguration(clusterId, readReportingConfigurationAttributeRecords,                  \
110                                                            readReportingConfigurationAttributeRecordsLen)                          \
111     emberAfFillExternalBuffer(mask, clusterId, ZCL_READ_REPORTING_CONFIGURATION_COMMAND_ID, "b",                                   \
112                               readReportingConfigurationAttributeRecords, readReportingConfigurationAttributeRecordsLen);
113
114 /** @brief Command description for ReadReportingConfigurationResponse
115  *
116  * Command: ReadReportingConfigurationResponse
117  * @param readReportingConfigurationRecords ReadReportingConfigurationRecord []
118  * @param readReportingConfigurationRecordsLen int
119  */
120 #define emberAfFillCommandGlobalReadReportingConfigurationResponse(clusterId, readReportingConfigurationRecords,                   \
121                                                                    readReportingConfigurationRecordsLen)                           \
122     emberAfFillExternalBuffer(mask, clusterId, ZCL_READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_ID, "b",                          \
123                               readReportingConfigurationRecords, readReportingConfigurationRecordsLen);
124
125 /** @brief Command description for ReportAttributes
126  *
127  * Command: ReportAttributes
128  * @param reportAttributeRecords ReportAttributeRecord []
129  * @param reportAttributeRecordsLen int
130  */
131 #define emberAfFillCommandGlobalReportAttributes(clusterId, reportAttributeRecords, reportAttributeRecordsLen)                     \
132     emberAfFillExternalBuffer(mask, clusterId, ZCL_REPORT_ATTRIBUTES_COMMAND_ID, "b", reportAttributeRecords,                      \
133                               reportAttributeRecordsLen);
134
135 /** @brief Command description for DefaultResponse
136  *
137  * Command: DefaultResponse
138  * @param commandId INT8U
139  * @param status Status
140  */
141 #define emberAfFillCommandGlobalDefaultResponse(clusterId, commandId, status)                                                      \
142     emberAfFillExternalBuffer(mask, clusterId, ZCL_DEFAULT_RESPONSE_COMMAND_ID, "uu", commandId, status);
143
144 /** @brief Command description for DiscoverAttributes
145  *
146  * Command: DiscoverAttributes
147  * @param startId ATTRIBUTE_ID
148  * @param maxAttributeIds INT8U
149  */
150 #define emberAfFillCommandGlobalDiscoverAttributes(clusterId, startId, maxAttributeIds)                                            \
151     emberAfFillExternalBuffer(mask, clusterId, ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID, "uu", startId, maxAttributeIds);
152
153 /** @brief Command description for DiscoverAttributesResponse
154  *
155  * Command: DiscoverAttributesResponse
156  * @param discoveryComplete INT8U
157  * @param discoverAttributesInfoRecords DiscoverAttributesInfoRecord []
158  * @param discoverAttributesInfoRecordsLen int
159  */
160 #define emberAfFillCommandGlobalDiscoverAttributesResponse(clusterId, discoveryComplete, discoverAttributesInfoRecords,            \
161                                                            discoverAttributesInfoRecordsLen)                                       \
162     emberAfFillExternalBuffer(mask, clusterId, ZCL_DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_ID, "ub", discoveryComplete,               \
163                               discoverAttributesInfoRecords, discoverAttributesInfoRecordsLen);
164
165 /** @brief Command description for ReadAttributesStructured
166  *
167  * Command: ReadAttributesStructured
168  * @param readStructuredAttributeRecords ReadStructuredAttributeRecord []
169  * @param readStructuredAttributeRecordsLen int
170  */
171 #define emberAfFillCommandGlobalReadAttributesStructured(clusterId, readStructuredAttributeRecords,                                \
172                                                          readStructuredAttributeRecordsLen)                                        \
173     emberAfFillExternalBuffer(mask, clusterId, ZCL_READ_ATTRIBUTES_STRUCTURED_COMMAND_ID, "b", readStructuredAttributeRecords,     \
174                               readStructuredAttributeRecordsLen);
175
176 /** @brief Command description for WriteAttributesStructured
177  *
178  * Command: WriteAttributesStructured
179  * @param writeStructuredAttributeRecords WriteStructuredAttributeRecord []
180  * @param writeStructuredAttributeRecordsLen int
181  */
182 #define emberAfFillCommandGlobalWriteAttributesStructured(clusterId, writeStructuredAttributeRecords,                              \
183                                                           writeStructuredAttributeRecordsLen)                                      \
184     emberAfFillExternalBuffer(mask, clusterId, ZCL_WRITE_ATTRIBUTES_STRUCTURED_COMMAND_ID, "b", writeStructuredAttributeRecords,   \
185                               writeStructuredAttributeRecordsLen);
186
187 /** @brief Command description for WriteAttributesStructuredResponse
188  *
189  * Command: WriteAttributesStructuredResponse
190  * @param writeStructuredAttributeStatusRecords WriteStructuredAttributeStatusRecord []
191  * @param writeStructuredAttributeStatusRecordsLen int
192  */
193 #define emberAfFillCommandGlobalWriteAttributesStructuredResponse(clusterId, writeStructuredAttributeStatusRecords,                \
194                                                                   writeStructuredAttributeStatusRecordsLen)                        \
195     emberAfFillExternalBuffer(mask, clusterId, ZCL_WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_ID, "b",                           \
196                               writeStructuredAttributeStatusRecords, writeStructuredAttributeStatusRecordsLen);
197
198 /** @brief Command description for DiscoverCommandsReceived
199  *
200  * Command: DiscoverCommandsReceived
201  * @param startCommandId INT8U
202  * @param maxCommandIds INT8U
203  */
204 #define emberAfFillCommandGlobalDiscoverCommandsReceived(clusterId, startCommandId, maxCommandIds)                                 \
205     emberAfFillExternalBuffer(mask, clusterId, ZCL_DISCOVER_COMMANDS_RECEIVED_COMMAND_ID, "uu", startCommandId, maxCommandIds);
206
207 /** @brief Command description for DiscoverCommandsReceivedResponse
208  *
209  * Command: DiscoverCommandsReceivedResponse
210  * @param discoveryComplete INT8U
211  * @param commandIds INT8U []
212  * @param commandIdsLen int
213  */
214 #define emberAfFillCommandGlobalDiscoverCommandsReceivedResponse(clusterId, discoveryComplete, commandIds, commandIdsLen)          \
215     emberAfFillExternalBuffer(mask, clusterId, ZCL_DISCOVER_COMMANDS_RECEIVED_RESPONSE_COMMAND_ID, "ub", discoveryComplete,        \
216                               commandIds, commandIdsLen);
217
218 /** @brief Command description for DiscoverCommandsGenerated
219  *
220  * Command: DiscoverCommandsGenerated
221  * @param startCommandId INT8U
222  * @param maxCommandIds INT8U
223  */
224 #define emberAfFillCommandGlobalDiscoverCommandsGenerated(clusterId, startCommandId, maxCommandIds)                                \
225     emberAfFillExternalBuffer(mask, clusterId, ZCL_DISCOVER_COMMANDS_GENERATED_COMMAND_ID, "uu", startCommandId, maxCommandIds);
226
227 /** @brief Command description for DiscoverCommandsGeneratedResponse
228  *
229  * Command: DiscoverCommandsGeneratedResponse
230  * @param discoveryComplete INT8U
231  * @param commandIds INT8U []
232  * @param commandIdsLen int
233  */
234 #define emberAfFillCommandGlobalDiscoverCommandsGeneratedResponse(clusterId, discoveryComplete, commandIds, commandIdsLen)         \
235     emberAfFillExternalBuffer(mask, clusterId, ZCL_DISCOVER_COMMANDS_GENERATED_RESPONSE_COMMAND_ID, "ub", discoveryComplete,       \
236                               commandIds, commandIdsLen);
237
238 /** @brief Command description for DiscoverAttributesExtended
239  *
240  * Command: DiscoverAttributesExtended
241  * @param startId ATTRIBUTE_ID
242  * @param maxAttributeIds INT8U
243  */
244 #define emberAfFillCommandGlobalDiscoverAttributesExtended(clusterId, startId, maxAttributeIds)                                    \
245     emberAfFillExternalBuffer(mask, clusterId, ZCL_DISCOVER_ATTRIBUTES_EXTENDED_COMMAND_ID, "uu", startId, maxAttributeIds);
246
247 /** @brief Command description for DiscoverAttributesExtendedResponse
248  *
249  * Command: DiscoverAttributesExtendedResponse
250  * @param discoveryComplete INT8U
251  * @param extendedDiscoverAttributesInfoRecords ExtendedDiscoverAttributesInfoRecord []
252  * @param extendedDiscoverAttributesInfoRecordsLen int
253  */
254 #define emberAfFillCommandGlobalDiscoverAttributesExtendedResponse(                                                                \
255     clusterId, discoveryComplete, extendedDiscoverAttributesInfoRecords, extendedDiscoverAttributesInfoRecordsLen)                 \
256     emberAfFillExternalBuffer(mask, clusterId, ZCL_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE_COMMAND_ID, "ub", discoveryComplete,      \
257                               extendedDiscoverAttributesInfoRecords, extendedDiscoverAttributesInfoRecordsLen);
258
259 /** @brief Command description for ResetToFactoryDefaults
260  *
261  * Command: ResetToFactoryDefaults
262  */
263 #define emberAfFillCommandBasicClusterResetToFactoryDefaults()                                                                     \
264     emberAfFillExternalBuffer(mask,                                                                                                \
265                                                                                                                                    \
266                               ZCL_RESET_TO_FACTORY_DEFAULTS_COMMAND_ID, "", );
267
268 /** @brief Command description for Identify
269  *
270  * Command: Identify
271  * @param identifyTime INT16U
272  * @param timeout INT16U
273  */
274 #define emberAfFillCommandIdentifyClusterIdentify(identifyTime, timeout)                                                           \
275     emberAfFillExternalBuffer(mask,                                                                                                \
276                                                                                                                                    \
277                               ZCL_IDENTIFY_COMMAND_ID, "uu", identifyTime, timeout);
278
279 /** @brief Command description for IdentifyQuery
280  *
281  * Command: IdentifyQuery
282  */
283 #define emberAfFillCommandIdentifyClusterIdentifyQuery()                                                                           \
284     emberAfFillExternalBuffer(mask,                                                                                                \
285                                                                                                                                    \
286                               ZCL_IDENTIFY_QUERY_COMMAND_ID, "", );
287
288 /** @brief Command description for EZModeInvoke
289  *
290  * Command: EZModeInvoke
291  * @param action BITMAP8
292  */
293 #define emberAfFillCommandIdentifyClusterEZModeInvoke(action)                                                                      \
294     emberAfFillExternalBuffer(mask,                                                                                                \
295                                                                                                                                    \
296                               ZCL_EZ_MODE_INVOKE_COMMAND_ID, "u", action);
297
298 /** @brief Command description for UpdateCommissionState
299  *
300  * Command: UpdateCommissionState
301  * @param action ENUM8
302  * @param commissionStateMask BITMAP8
303  */
304 #define emberAfFillCommandIdentifyClusterUpdateCommissionState(action, commissionStateMask)                                        \
305     emberAfFillExternalBuffer(mask,                                                                                                \
306                                                                                                                                    \
307                               ZCL_UPDATE_COMMISSION_STATE_COMMAND_ID, "uu", action, commissionStateMask);
308
309 /** @brief Command description for TriggerEffect
310  *
311  * Command: TriggerEffect
312  * @param effectId IdentifyEffectIdentifier
313  * @param effectVariant IdentifyEffectVariant
314  */
315 #define emberAfFillCommandIdentifyClusterTriggerEffect(effectId, effectVariant)                                                    \
316     emberAfFillExternalBuffer(mask,                                                                                                \
317                                                                                                                                    \
318                               ZCL_TRIGGER_EFFECT_COMMAND_ID, "uu", effectId, effectVariant);
319
320 /** @brief Command description for AddGroup
321  *
322  * Command: AddGroup
323  * @param groupId INT16U
324  * @param status Status
325  * @param groupName CHAR_STRING
326  * @param groupId INT16U
327  */
328 #define emberAfFillCommandGroupsClusterAddGroup(groupId, status, groupName, groupId)                                               \
329     emberAfFillExternalBuffer(mask,                                                                                                \
330                                                                                                                                    \
331                               ZCL_ADD_GROUP_COMMAND_ID, "uuuu", groupId, status, groupName, groupId);
332
333 /** @brief Command description for ViewGroup
334  *
335  * Command: ViewGroup
336  * @param groupId INT16U
337  * @param status Status
338  * @param groupId INT16U
339  * @param groupName CHAR_STRING
340  */
341 #define emberAfFillCommandGroupsClusterViewGroup(groupId, status, groupId, groupName)                                              \
342     emberAfFillExternalBuffer(mask,                                                                                                \
343                                                                                                                                    \
344                               ZCL_VIEW_GROUP_COMMAND_ID, "uuuu", groupId, status, groupId, groupName);
345
346 /** @brief Command description for GetGroupMembership
347  *
348  * Command: GetGroupMembership
349  * @param groupCount INT8U
350  * @param capacity INT8U
351  * @param groupList INT16U []
352  * @param groupListLen int
353  * @param groupCount INT8U
354  * @param groupList INT16U []
355  * @param groupListLen int
356  */
357 #define emberAfFillCommandGroupsClusterGetGroupMembership(groupCount, capacity, groupList, groupListLen, groupCount, groupList,    \
358                                                           groupListLen)                                                            \
359     emberAfFillExternalBuffer(mask,                                                                                                \
360                                                                                                                                    \
361                               ZCL_GET_GROUP_MEMBERSHIP_COMMAND_ID, "uubub", groupCount, capacity, groupList, groupListLen,         \
362                               groupCount, groupList, groupListLen);
363
364 /** @brief Command description for RemoveGroup
365  *
366  * Command: RemoveGroup
367  * @param groupId INT16U
368  * @param status Status
369  * @param groupId INT16U
370  */
371 #define emberAfFillCommandGroupsClusterRemoveGroup(groupId, status, groupId)                                                       \
372     emberAfFillExternalBuffer(mask,                                                                                                \
373                                                                                                                                    \
374                               ZCL_REMOVE_GROUP_COMMAND_ID, "uuu", groupId, status, groupId);
375
376 /** @brief Command description for RemoveAllGroups
377  *
378  * Command: RemoveAllGroups
379  */
380 #define emberAfFillCommandGroupsClusterRemoveAllGroups()                                                                           \
381     emberAfFillExternalBuffer(mask,                                                                                                \
382                                                                                                                                    \
383                               ZCL_REMOVE_ALL_GROUPS_COMMAND_ID, "", );
384
385 /** @brief Command description for AddGroupIfIdentifying
386  *
387  * Command: AddGroupIfIdentifying
388  * @param groupId INT16U
389  * @param groupName CHAR_STRING
390  */
391 #define emberAfFillCommandGroupsClusterAddGroupIfIdentifying(groupId, groupName)                                                   \
392     emberAfFillExternalBuffer(mask,                                                                                                \
393                                                                                                                                    \
394                               ZCL_ADD_GROUP_IF_IDENTIFYING_COMMAND_ID, "uu", groupId, groupName);
395
396 /** @brief Command description for AddScene
397  *
398  * Command: AddScene
399  * @param groupId INT16U
400  * @param status Status
401  * @param sceneId INT8U
402  * @param groupId INT16U
403  * @param transitionTime INT16U
404  * @param sceneId INT8U
405  * @param sceneName CHAR_STRING
406  * @param extensionFieldSets SceneExtensionFieldSet []
407  * @param extensionFieldSetsLen int
408  */
409 #define emberAfFillCommandScenesClusterAddScene(groupId, status, sceneId, groupId, transitionTime, sceneId, sceneName,             \
410                                                 extensionFieldSets, extensionFieldSetsLen)                                         \
411     emberAfFillExternalBuffer(mask,                                                                                                \
412                                                                                                                                    \
413                               ZCL_ADD_SCENE_COMMAND_ID, "uuuuuuub", groupId, status, sceneId, groupId, transitionTime, sceneId,    \
414                               sceneName, extensionFieldSets, extensionFieldSetsLen);
415
416 /** @brief Command description for ViewScene
417  *
418  * Command: ViewScene
419  * @param groupId INT16U
420  * @param status Status
421  * @param sceneId INT8U
422  * @param groupId INT16U
423  * @param sceneId INT8U
424  * @param transitionTime INT16U
425  * @param sceneName CHAR_STRING
426  * @param extensionFieldSets SceneExtensionFieldSet []
427  * @param extensionFieldSetsLen int
428  */
429 #define emberAfFillCommandScenesClusterViewScene(groupId, status, sceneId, groupId, sceneId, transitionTime, sceneName,            \
430                                                  extensionFieldSets, extensionFieldSetsLen)                                        \
431     emberAfFillExternalBuffer(mask,                                                                                                \
432                                                                                                                                    \
433                               ZCL_VIEW_SCENE_COMMAND_ID, "uuuuuuub", groupId, status, sceneId, groupId, sceneId, transitionTime,   \
434                               sceneName, extensionFieldSets, extensionFieldSetsLen);
435
436 /** @brief Command description for RemoveScene
437  *
438  * Command: RemoveScene
439  * @param groupId INT16U
440  * @param status Status
441  * @param sceneId INT8U
442  * @param groupId INT16U
443  * @param sceneId INT8U
444  */
445 #define emberAfFillCommandScenesClusterRemoveScene(groupId, status, sceneId, groupId, sceneId)                                     \
446     emberAfFillExternalBuffer(mask,                                                                                                \
447                                                                                                                                    \
448                               ZCL_REMOVE_SCENE_COMMAND_ID, "uuuuu", groupId, status, sceneId, groupId, sceneId);
449
450 /** @brief Command description for RemoveAllScenes
451  *
452  * Command: RemoveAllScenes
453  * @param groupId INT16U
454  * @param status Status
455  * @param groupId INT16U
456  */
457 #define emberAfFillCommandScenesClusterRemoveAllScenes(groupId, status, groupId)                                                   \
458     emberAfFillExternalBuffer(mask,                                                                                                \
459                                                                                                                                    \
460                               ZCL_REMOVE_ALL_SCENES_COMMAND_ID, "uuu", groupId, status, groupId);
461
462 /** @brief Command description for StoreScene
463  *
464  * Command: StoreScene
465  * @param groupId INT16U
466  * @param status Status
467  * @param sceneId INT8U
468  * @param groupId INT16U
469  * @param sceneId INT8U
470  */
471 #define emberAfFillCommandScenesClusterStoreScene(groupId, status, sceneId, groupId, sceneId)                                      \
472     emberAfFillExternalBuffer(mask,                                                                                                \
473                                                                                                                                    \
474                               ZCL_STORE_SCENE_COMMAND_ID, "uuuuu", groupId, status, sceneId, groupId, sceneId);
475
476 /** @brief Command description for RecallScene
477  *
478  * Command: RecallScene
479  * @param groupId INT16U
480  * @param sceneId INT8U
481  * @param transitionTime INT16U
482  */
483 #define emberAfFillCommandScenesClusterRecallScene(groupId, sceneId, transitionTime)                                               \
484     emberAfFillExternalBuffer(mask,                                                                                                \
485                                                                                                                                    \
486                               ZCL_RECALL_SCENE_COMMAND_ID, "uuu", groupId, sceneId, transitionTime);
487
488 /** @brief Command description for GetSceneMembership
489  *
490  * Command: GetSceneMembership
491  * @param groupId INT16U
492  * @param status Status
493  * @param capacity INT8U
494  * @param groupId INT16U
495  * @param sceneCount INT8U
496  * @param sceneList INT8U []
497  * @param sceneListLen int
498  */
499 #define emberAfFillCommandScenesClusterGetSceneMembership(groupId, status, capacity, groupId, sceneCount, sceneList, sceneListLen) \
500     emberAfFillExternalBuffer(mask,                                                                                                \
501                                                                                                                                    \
502                               ZCL_GET_SCENE_MEMBERSHIP_COMMAND_ID, "uuuuub", groupId, status, capacity, groupId, sceneCount,       \
503                               sceneList, sceneListLen);
504
505 /** @brief Command description for EnhancedAddScene
506  *
507  * Command: EnhancedAddScene
508  * @param groupId INT16U
509  * @param status Status
510  * @param sceneId INT8U
511  * @param groupId INT16U
512  * @param transitionTime INT16U
513  * @param sceneId INT8U
514  * @param sceneName CHAR_STRING
515  * @param extensionFieldSets SceneExtensionFieldSet []
516  * @param extensionFieldSetsLen int
517  */
518 #define emberAfFillCommandScenesClusterEnhancedAddScene(groupId, status, sceneId, groupId, transitionTime, sceneId, sceneName,     \
519                                                         extensionFieldSets, extensionFieldSetsLen)                                 \
520     emberAfFillExternalBuffer(mask,                                                                                                \
521                                                                                                                                    \
522                               ZCL_ENHANCED_ADD_SCENE_COMMAND_ID, "uuuuuuub", groupId, status, sceneId, groupId, transitionTime,    \
523                               sceneId, sceneName, extensionFieldSets, extensionFieldSetsLen);
524
525 /** @brief Command description for EnhancedViewScene
526  *
527  * Command: EnhancedViewScene
528  * @param groupId INT16U
529  * @param status Status
530  * @param sceneId INT8U
531  * @param groupId INT16U
532  * @param sceneId INT8U
533  * @param transitionTime INT16U
534  * @param sceneName CHAR_STRING
535  * @param extensionFieldSets SceneExtensionFieldSet []
536  * @param extensionFieldSetsLen int
537  */
538 #define emberAfFillCommandScenesClusterEnhancedViewScene(groupId, status, sceneId, groupId, sceneId, transitionTime, sceneName,    \
539                                                          extensionFieldSets, extensionFieldSetsLen)                                \
540     emberAfFillExternalBuffer(mask,                                                                                                \
541                                                                                                                                    \
542                               ZCL_ENHANCED_VIEW_SCENE_COMMAND_ID, "uuuuuuub", groupId, status, sceneId, groupId, sceneId,          \
543                               transitionTime, sceneName, extensionFieldSets, extensionFieldSetsLen);
544
545 /** @brief Command description for CopyScene
546  *
547  * Command: CopyScene
548  * @param mode ScenesCopyMode
549  * @param status Status
550  * @param groupIdFrom INT16U
551  * @param groupIdFrom INT16U
552  * @param sceneIdFrom INT8U
553  * @param sceneIdFrom INT8U
554  * @param groupIdTo INT16U
555  * @param sceneIdTo INT8U
556  */
557 #define emberAfFillCommandScenesClusterCopyScene(mode, status, groupIdFrom, groupIdFrom, sceneIdFrom, sceneIdFrom, groupIdTo,      \
558                                                  sceneIdTo)                                                                        \
559     emberAfFillExternalBuffer(mask,                                                                                                \
560                                                                                                                                    \
561                               ZCL_COPY_SCENE_COMMAND_ID, "uuuuuuuu", mode, status, groupIdFrom, groupIdFrom, sceneIdFrom,          \
562                               sceneIdFrom, groupIdTo, sceneIdTo);
563
564 /** @brief Command description for Off
565  *
566  * Command: Off
567  */
568 #define emberAfFillCommandOn                                                                                                       \
569     /                                                                                                                              \
570         offClusterOff() emberAfFillExternalBuffer(mask,                                                                            \
571                                                                                                                                    \
572                                                   ZCL_OFF_COMMAND_ID, "", );
573
574 /** @brief Command description for On
575  *
576  * Command: On
577  */
578 #define emberAfFillCommandOn                                                                                                       \
579     /                                                                                                                              \
580         offClusterOn() emberAfFillExternalBuffer(mask,                                                                             \
581                                                                                                                                    \
582                                                  ZCL_ON_COMMAND_ID, "", );
583
584 /** @brief Command description for Toggle
585  *
586  * Command: Toggle
587  */
588 #define emberAfFillCommandOn                                                                                                       \
589     /                                                                                                                              \
590         offClusterToggle() emberAfFillExternalBuffer(mask,                                                                         \
591                                                                                                                                    \
592                                                      ZCL_TOGGLE_COMMAND_ID, "", );
593
594 /** @brief Command description for OffWithEffect
595  *
596  * Command: OffWithEffect
597  * @param effectId OnOffEffectIdentifier
598  * @param effectVariant ENUM8
599  */
600 #define emberAfFillCommandOn                                                                                                       \
601     /                                                                                                                              \
602         offClusterOffWithEffect(effectId, effectVariant)                                                                           \
603             emberAfFillExternalBuffer(mask,                                                                                        \
604                                                                                                                                    \
605                                       ZCL_OFF_WITH_EFFECT_COMMAND_ID, "uu", effectId, effectVariant);
606
607 /** @brief Command description for OnWithRecallGlobalScene
608  *
609  * Command: OnWithRecallGlobalScene
610  */
611 #define emberAfFillCommandOn                                                                                                       \
612     /                                                                                                                              \
613         offClusterOnWithRecallGlobalScene() emberAfFillExternalBuffer(mask,                                                        \
614                                                                                                                                    \
615                                                                       ZCL_ON_WITH_RECALL_GLOBAL_SCENE_COMMAND_ID, "", );
616
617 /** @brief Command description for OnWithTimedOff
618  *
619  * Command: OnWithTimedOff
620  * @param onOffControl OnOffControl
621  * @param onTime INT16U
622  * @param offWaitTime INT16U
623  */
624 #define emberAfFillCommandOn                                                                                                       \
625     /                                                                                                                              \
626         offClusterOnWithTimedOff(onOffControl, onTime, offWaitTime)                                                                \
627             emberAfFillExternalBuffer(mask,                                                                                        \
628                                                                                                                                    \
629                                       ZCL_ON_WITH_TIMED_OFF_COMMAND_ID, "uuu", onOffControl, onTime, offWaitTime);
630
631 /** @brief Command description for MoveToLevel
632  *
633  * Command: MoveToLevel
634  * @param level INT8U
635  * @param transitionTime INT16U
636  * @param optionMask BITMAP8
637  * @param optionOverride BITMAP8
638  */
639 #define emberAfFillCommandLevel                                                                                                    \
640     ControlClusterMoveToLevel(level, transitionTime, optionMask, optionOverride)                                                   \
641         emberAfFillExternalBuffer(mask,                                                                                            \
642                                                                                                                                    \
643                                   ZCL_MOVE_TO_LEVEL_COMMAND_ID, "uuuu", level, transitionTime, optionMask, optionOverride);
644
645 /** @brief Command description for Move
646  *
647  * Command: Move
648  * @param moveMode MoveMode
649  * @param rate INT8U
650  * @param optionMask BITMAP8
651  * @param optionOverride BITMAP8
652  */
653 #define emberAfFillCommandLevel                                                                                                    \
654     ControlClusterMove(moveMode, rate, optionMask, optionOverride)                                                                 \
655         emberAfFillExternalBuffer(mask,                                                                                            \
656                                                                                                                                    \
657                                   ZCL_MOVE_COMMAND_ID, "uuuu", moveMode, rate, optionMask, optionOverride);
658
659 /** @brief Command description for Step
660  *
661  * Command: Step
662  * @param stepMode StepMode
663  * @param stepSize INT8U
664  * @param transitionTime INT16U
665  * @param optionMask BITMAP8
666  * @param optionOverride BITMAP8
667  */
668 #define emberAfFillCommandLevel                                                                                                    \
669     ControlClusterStep(stepMode, stepSize, transitionTime, optionMask, optionOverride)                                             \
670         emberAfFillExternalBuffer(mask,                                                                                            \
671                                                                                                                                    \
672                                   ZCL_STEP_COMMAND_ID, "uuuuu", stepMode, stepSize, transitionTime, optionMask, optionOverride);
673
674 /** @brief Command description for Stop
675  *
676  * Command: Stop
677  * @param optionMask BITMAP8
678  * @param optionOverride BITMAP8
679  */
680 #define emberAfFillCommandLevel                                                                                                    \
681     ControlClusterStop(optionMask, optionOverride)                                                                                 \
682         emberAfFillExternalBuffer(mask,                                                                                            \
683                                                                                                                                    \
684                                   ZCL_STOP_COMMAND_ID, "uu", optionMask, optionOverride);
685
686 /** @brief Command description for MoveToLevelWithOnOff
687  *
688  * Command: MoveToLevelWithOnOff
689  * @param level INT8U
690  * @param transitionTime INT16U
691  */
692 #define emberAfFillCommandLevel                                                                                                    \
693     ControlClusterMoveToLevelWithOnOff(level, transitionTime)                                                                      \
694         emberAfFillExternalBuffer(mask,                                                                                            \
695                                                                                                                                    \
696                                   ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID, "uu", level, transitionTime);
697
698 /** @brief Command description for MoveWithOnOff
699  *
700  * Command: MoveWithOnOff
701  * @param moveMode MoveMode
702  * @param rate INT8U
703  */
704 #define emberAfFillCommandLevel                                                                                                    \
705     ControlClusterMoveWithOnOff(moveMode, rate) emberAfFillExternalBuffer(mask,                                                    \
706                                                                                                                                    \
707                                                                           ZCL_MOVE_WITH_ON_OFF_COMMAND_ID, "uu", moveMode, rate);
708
709 /** @brief Command description for StepWithOnOff
710  *
711  * Command: StepWithOnOff
712  * @param stepMode StepMode
713  * @param stepSize INT8U
714  * @param transitionTime INT16U
715  */
716 #define emberAfFillCommandLevel                                                                                                    \
717     ControlClusterStepWithOnOff(stepMode, stepSize, transitionTime)                                                                \
718         emberAfFillExternalBuffer(mask,                                                                                            \
719                                                                                                                                    \
720                                   ZCL_STEP_WITH_ON_OFF_COMMAND_ID, "uuu", stepMode, stepSize, transitionTime);
721
722 /** @brief Command description for StopWithOnOff
723  *
724  * Command: StopWithOnOff
725  */
726 #define emberAfFillCommandLevel                                                                                                    \
727     ControlClusterStopWithOnOff() emberAfFillExternalBuffer(mask,                                                                  \
728                                                                                                                                    \
729                                                             ZCL_STOP_WITH_ON_OFF_COMMAND_ID, "", );
730
731 /** @brief Command description for ResetAlarm
732  *
733  * Command: ResetAlarm
734  * @param alarmCode ENUM8
735  * @param alarmCode ENUM8
736  * @param clusterId CLUSTER_ID
737  * @param clusterId CLUSTER_ID
738  */
739 #define emberAfFillCommandAlarmsClusterResetAlarm(alarmCode, alarmCode, clusterId, clusterId)                                      \
740     emberAfFillExternalBuffer(mask,                                                                                                \
741                                                                                                                                    \
742                               ZCL_RESET_ALARM_COMMAND_ID, "uuuu", alarmCode, alarmCode, clusterId, clusterId);
743
744 /** @brief Command description for ResetAllAlarms
745  *
746  * Command: ResetAllAlarms
747  * @param status Status
748  * @param alarmCode ENUM8
749  * @param clusterId CLUSTER_ID
750  * @param timeStamp INT32U
751  */
752 #define emberAfFillCommandAlarmsClusterResetAllAlarms(status, alarmCode, clusterId, timeStamp)                                     \
753     emberAfFillExternalBuffer(mask,                                                                                                \
754                                                                                                                                    \
755                               ZCL_RESET_ALL_ALARMS_COMMAND_ID, "uuuu", status, alarmCode, clusterId, timeStamp);
756
757 /** @brief Command description for GetAlarm
758  *
759  * Command: GetAlarm
760  */
761 #define emberAfFillCommandAlarmsClusterGetAlarm()                                                                                  \
762     emberAfFillExternalBuffer(mask,                                                                                                \
763                                                                                                                                    \
764                               ZCL_GET_ALARM_COMMAND_ID, "", );
765
766 /** @brief Command description for ResetAlarmLog
767  *
768  * Command: ResetAlarmLog
769  */
770 #define emberAfFillCommandAlarmsClusterResetAlarmLog()                                                                             \
771     emberAfFillExternalBuffer(mask,                                                                                                \
772                                                                                                                                    \
773                               ZCL_RESET_ALARM_LOG_COMMAND_ID, "", );
774
775 /** @brief Command description for SetAbsoluteLocation
776  *
777  * Command: SetAbsoluteLocation
778  * @param coordinate1 INT16S
779  * @param status Status
780  * @param coordinate2 INT16S
781  * @param power INT16S
782  * @param coordinate3 INT16S
783  * @param pathLossExponent INT16U
784  * @param power INT16S
785  * @param calculationPeriod INT16U
786  * @param pathLossExponent INT16U
787  * @param numberRssiMeasurements INT8U
788  * @param reportingPeriod INT16U
789  */
790 #define emberAfFillCommandRSSI                                                                                                     \
791     LocationClusterSetAbsoluteLocation(coordinate1, status, coordinate2, power, coordinate3, pathLossExponent, power,              \
792                                        calculationPeriod, pathLossExponent, numberRssiMeasurements, reportingPeriod)               \
793         emberAfFillExternalBuffer(mask,                                                                                            \
794                                                                                                                                    \
795                                   ZCL_SET_ABSOLUTE_LOCATION_COMMAND_ID, "uuuuuuuuuuu", coordinate1, status, coordinate2, power,    \
796                                   coordinate3, pathLossExponent, power, calculationPeriod, pathLossExponent,                       \
797                                   numberRssiMeasurements, reportingPeriod);
798
799 /** @brief Command description for SetDeviceConfiguration
800  *
801  * Command: SetDeviceConfiguration
802  * @param power INT16S
803  * @param status Status
804  * @param pathLossExponent INT16U
805  * @param locationType LocationType
806  * @param calculationPeriod INT16U
807  * @param coordinate1 INT16S
808  * @param numberRssiMeasurements INT8U
809  * @param coordinate2 INT16S
810  * @param reportingPeriod INT16U
811  * @param coordinate3 INT16S
812  * @param power INT16S
813  * @param pathLossExponent INT16U
814  * @param locationMethod LocationMethod
815  * @param qualityMeasure INT8U
816  * @param locationAge INT16U
817  */
818 #define emberAfFillCommandRSSI                                                                                                     \
819     LocationClusterSetDeviceConfiguration(power, status, pathLossExponent, locationType, calculationPeriod, coordinate1,           \
820                                           numberRssiMeasurements, coordinate2, reportingPeriod, coordinate3, power,                \
821                                           pathLossExponent, locationMethod, qualityMeasure, locationAge)                           \
822         emberAfFillExternalBuffer(mask,                                                                                            \
823                                                                                                                                    \
824                                   ZCL_SET_DEVICE_CONFIGURATION_COMMAND_ID, "uuuuuuuuuuuuuuu", power, status, pathLossExponent,     \
825                                   locationType, calculationPeriod, coordinate1, numberRssiMeasurements, coordinate2,               \
826                                   reportingPeriod, coordinate3, power, pathLossExponent, locationMethod, qualityMeasure,           \
827                                   locationAge);
828
829 /** @brief Command description for GetDeviceConfiguration
830  *
831  * Command: GetDeviceConfiguration
832  * @param targetAddress IEEE_ADDRESS
833  * @param locationType LocationType
834  * @param coordinate1 INT16S
835  * @param coordinate2 INT16S
836  * @param coordinate3 INT16S
837  * @param power INT16S
838  * @param pathLossExponent INT16U
839  * @param locationMethod LocationMethod
840  * @param qualityMeasure INT8U
841  * @param locationAge INT16U
842  */
843 #define emberAfFillCommandRSSI                                                                                                     \
844     LocationClusterGetDeviceConfiguration(targetAddress, locationType, coordinate1, coordinate2, coordinate3, power,               \
845                                           pathLossExponent, locationMethod, qualityMeasure, locationAge)                           \
846         emberAfFillExternalBuffer(mask,                                                                                            \
847                                                                                                                                    \
848                                   ZCL_GET_DEVICE_CONFIGURATION_COMMAND_ID, "uuuuuuuuuu", targetAddress, locationType, coordinate1, \
849                                   coordinate2, coordinate3, power, pathLossExponent, locationMethod, qualityMeasure, locationAge);
850
851 /** @brief Command description for GetLocationData
852  *
853  * Command: GetLocationData
854  * @param flags GetLocationDataFlags
855  * @param locationType LocationType
856  * @param numberResponses INT8U
857  * @param coordinate1 INT16S
858  * @param targetAddress IEEE_ADDRESS
859  * @param coordinate2 INT16S
860  * @param coordinate3 INT16S
861  * @param qualityMeasure INT8U
862  * @param locationAge INT16U
863  */
864 #define emberAfFillCommandRSSI                                                                                                     \
865     LocationClusterGetLocationData(flags, locationType, numberResponses, coordinate1, targetAddress, coordinate2, coordinate3,     \
866                                    qualityMeasure, locationAge)                                                                    \
867         emberAfFillExternalBuffer(mask,                                                                                            \
868                                                                                                                                    \
869                                   ZCL_GET_LOCATION_DATA_COMMAND_ID, "uuuuuuuuu", flags, locationType, numberResponses,             \
870                                   coordinate1, targetAddress, coordinate2, coordinate3, qualityMeasure, locationAge);
871
872 /** @brief Command description for RssiResponse
873  *
874  * Command: RssiResponse
875  * @param replyingDevice IEEE_ADDRESS
876  * @param locationType LocationType
877  * @param coordinate1 INT16S
878  * @param coordinate2 INT16S
879  * @param coordinate3 INT16S
880  * @param rssi INT8S
881  * @param numberRssiMeasurements INT8U
882  */
883 #define emberAfFillCommandRSSI                                                                                                     \
884     LocationClusterRssiResponse(replyingDevice, locationType, coordinate1, coordinate2, coordinate3, rssi, numberRssiMeasurements) \
885         emberAfFillExternalBuffer(mask,                                                                                            \
886                                                                                                                                    \
887                                   ZCL_RSSI_RESPONSE_COMMAND_ID, "uuuuuuu", replyingDevice, locationType, coordinate1, coordinate2, \
888                                   coordinate3, rssi, numberRssiMeasurements);
889
890 /** @brief Command description for RssiRequest
891  *
892  * Command: RssiRequest
893  * @param targetAddress IEEE_ADDRESS
894  * @param numberRssiMeasurements INT8U
895  * @param calculationPeriod INT16U
896  */
897 #define emberAfFillCommandRSSI                                                                                                     \
898     LocationClusterRssiRequest(targetAddress, numberRssiMeasurements, calculationPeriod)                                           \
899         emberAfFillExternalBuffer(mask,                                                                                            \
900                                                                                                                                    \
901                                   ZCL_RSSI_REQUEST_COMMAND_ID, "uuu", targetAddress, numberRssiMeasurements, calculationPeriod);
902
903 /** @brief Command description for AnchorNodeAnnounce
904  *
905  * Command: AnchorNodeAnnounce
906  * @param anchorNodeIeeeAddress IEEE_ADDRESS
907  * @param measuringDevice IEEE_ADDRESS
908  * @param coordinate1 INT16S
909  * @param neighbors INT8U
910  * @param coordinate2 INT16S
911  * @param neighborsInfo NeighborInfo []
912  * @param neighborsInfoLen int
913  * @param coordinate3 INT16S
914  */
915 #define emberAfFillCommandRSSI                                                                                                     \
916     LocationClusterAnchorNodeAnnounce(anchorNodeIeeeAddress, measuringDevice, coordinate1, neighbors, coordinate2, neighborsInfo,  \
917                                       neighborsInfoLen, coordinate3)                                                               \
918         emberAfFillExternalBuffer(mask,                                                                                            \
919                                                                                                                                    \
920                                   ZCL_ANCHOR_NODE_ANNOUNCE_COMMAND_ID, "uuuuubu", anchorNodeIeeeAddress, measuringDevice,          \
921                                   coordinate1, neighbors, coordinate2, neighborsInfo, neighborsInfoLen, coordinate3);
922
923 /** @brief Command description for RequestOwnLocation
924  *
925  * Command: RequestOwnLocation
926  * @param blindNode IEEE_ADDRESS
927  */
928 #define emberAfFillCommandRSSI                                                                                                     \
929     LocationClusterRequestOwnLocation(blindNode) emberAfFillExternalBuffer(mask,                                                   \
930                                                                                                                                    \
931                                                                            ZCL_REQUEST_OWN_LOCATION_COMMAND_ID, "u", blindNode);
932
933 /** @brief Command description for RestartDevice
934  *
935  * Command: RestartDevice
936  * @param options RestartOptions
937  * @param status ENUM8
938  * @param delay INT8U
939  * @param jitter INT8U
940  */
941 #define emberAfFillCommandCommissioningClusterRestartDevice(options, status, delay, jitter)                                        \
942     emberAfFillExternalBuffer(mask,                                                                                                \
943                                                                                                                                    \
944                               ZCL_RESTART_DEVICE_COMMAND_ID, "uuuu", options, status, delay, jitter);
945
946 /** @brief Command description for SaveStartupParameters
947  *
948  * Command: SaveStartupParameters
949  * @param options BITMAP8
950  * @param status ENUM8
951  * @param index INT8U
952  */
953 #define emberAfFillCommandCommissioningClusterSaveStartupParameters(options, status, index)                                        \
954     emberAfFillExternalBuffer(mask,                                                                                                \
955                                                                                                                                    \
956                               ZCL_SAVE_STARTUP_PARAMETERS_COMMAND_ID, "uuu", options, status, index);
957
958 /** @brief Command description for RestoreStartupParameters
959  *
960  * Command: RestoreStartupParameters
961  * @param options BITMAP8
962  * @param status ENUM8
963  * @param index INT8U
964  */
965 #define emberAfFillCommandCommissioningClusterRestoreStartupParameters(options, status, index)                                     \
966     emberAfFillExternalBuffer(mask,                                                                                                \
967                                                                                                                                    \
968                               ZCL_RESTORE_STARTUP_PARAMETERS_COMMAND_ID, "uuu", options, status, index);
969
970 /** @brief Command description for ResetStartupParameters
971  *
972  * Command: ResetStartupParameters
973  * @param options ResetOptions
974  * @param status ENUM8
975  * @param index INT8U
976  */
977 #define emberAfFillCommandCommissioningClusterResetStartupParameters(options, status, index)                                       \
978     emberAfFillExternalBuffer(mask,                                                                                                \
979                                                                                                                                    \
980                               ZCL_RESET_STARTUP_PARAMETERS_COMMAND_ID, "uuu", options, status, index);
981
982 /** @brief Command description for TransferPartitionedFrame
983  *
984  * Command: TransferPartitionedFrame
985  * @param fragmentationOptions BITMAP8
986  * @param ackOptions BITMAP8
987  * @param partitionedIndicatorAndFrame INT8U []
988  * @param partitionedIndicatorAndFrameLen int
989  * @param firstFrameIdAndNackList INT8U []
990  * @param firstFrameIdAndNackListLen int
991  */
992 #define emberAfFillCommandPartitionClusterTransferPartitionedFrame(fragmentationOptions, ackOptions, partitionedIndicatorAndFrame, \
993                                                                    partitionedIndicatorAndFrameLen, firstFrameIdAndNackList,       \
994                                                                    firstFrameIdAndNackListLen)                                     \
995     emberAfFillExternalBuffer(mask,                                                                                                \
996                                                                                                                                    \
997                               ZCL_TRANSFER_PARTITIONED_FRAME_COMMAND_ID, "uubb", fragmentationOptions, ackOptions,                 \
998                               partitionedIndicatorAndFrame, partitionedIndicatorAndFrameLen, firstFrameIdAndNackList,              \
999                               firstFrameIdAndNackListLen);
1000
1001 /** @brief Command description for ReadHandshakeParam
1002  *
1003  * Command: ReadHandshakeParam
1004  * @param partitionedClusterId CLUSTER_ID
1005  * @param partitionedClusterId CLUSTER_ID
1006  * @param attributeList ATTRIBUTE_ID []
1007  * @param attributeListLen int
1008  * @param readAttributeStatusRecords ReadAttributeStatusRecord []
1009  * @param readAttributeStatusRecordsLen int
1010  */
1011 #define emberAfFillCommandPartitionClusterReadHandshakeParam(partitionedClusterId, partitionedClusterId, attributeList,            \
1012                                                              attributeListLen, readAttributeStatusRecords,                         \
1013                                                              readAttributeStatusRecordsLen)                                        \
1014     emberAfFillExternalBuffer(mask,                                                                                                \
1015                                                                                                                                    \
1016                               ZCL_READ_HANDSHAKE_PARAM_COMMAND_ID, "uubb", partitionedClusterId, partitionedClusterId,             \
1017                               attributeList, attributeListLen, readAttributeStatusRecords, readAttributeStatusRecordsLen);
1018
1019 /** @brief Command description for WriteHandshakeParam
1020  *
1021  * Command: WriteHandshakeParam
1022  * @param partitionedClusterId CLUSTER_ID
1023  * @param writeAttributeRecords WriteAttributeRecord []
1024  * @param writeAttributeRecordsLen int
1025  */
1026 #define emberAfFillCommandPartitionClusterWriteHandshakeParam(partitionedClusterId, writeAttributeRecords,                         \
1027                                                               writeAttributeRecordsLen)                                            \
1028     emberAfFillExternalBuffer(mask,                                                                                                \
1029                                                                                                                                    \
1030                               ZCL_WRITE_HANDSHAKE_PARAM_COMMAND_ID, "ub", partitionedClusterId, writeAttributeRecords,             \
1031                               writeAttributeRecordsLen);
1032
1033 /** @brief Command description for ImageNotify
1034  *
1035  * Command: ImageNotify
1036  * @param payloadType ENUM8
1037  * @param queryJitter INT8U
1038  * @param manufacturerId INT16U
1039  * @param imageType INT16U
1040  * @param newFileVersion INT32U
1041  */
1042 #define emberAfFillCommandOver                                                                                                     \
1043     the Air BootloadingClusterImageNotify(payloadType, queryJitter, manufacturerId, imageType, newFileVersion)                     \
1044         emberAfFillExternalBuffer(mask,                                                                                            \
1045                                                                                                                                    \
1046                                   ZCL_IMAGE_NOTIFY_COMMAND_ID, "uuuuu", payloadType, queryJitter, manufacturerId, imageType,       \
1047                                   newFileVersion);
1048
1049 /** @brief Command description for QueryNextImageRequest
1050  *
1051  * Command: QueryNextImageRequest
1052  * @param fieldControl INT8U
1053  * @param manufacturerId INT16U
1054  * @param imageType INT16U
1055  * @param currentFileVersion INT32U
1056  * @param hardwareVersion INT16U
1057  */
1058 #define emberAfFillCommandOver                                                                                                     \
1059     the Air BootloadingClusterQueryNextImageRequest(fieldControl, manufacturerId, imageType, currentFileVersion, hardwareVersion)  \
1060         emberAfFillExternalBuffer(mask,                                                                                            \
1061                                                                                                                                    \
1062                                   ZCL_QUERY_NEXT_IMAGE_REQUEST_COMMAND_ID, "uuuuu", fieldControl, manufacturerId, imageType,       \
1063                                   currentFileVersion, hardwareVersion);
1064
1065 /** @brief Command description for QueryNextImageResponse
1066  *
1067  * Command: QueryNextImageResponse
1068  * @param status Status
1069  * @param manufacturerId INT16U
1070  * @param imageType INT16U
1071  * @param fileVersion INT32U
1072  * @param imageSize INT32U
1073  */
1074 #define emberAfFillCommandOver                                                                                                     \
1075     the Air BootloadingClusterQueryNextImageResponse(status, manufacturerId, imageType, fileVersion, imageSize)                    \
1076         emberAfFillExternalBuffer(mask,                                                                                            \
1077                                                                                                                                    \
1078                                   ZCL_QUERY_NEXT_IMAGE_RESPONSE_COMMAND_ID, "uuuuu", status, manufacturerId, imageType,            \
1079                                   fileVersion, imageSize);
1080
1081 /** @brief Command description for ImageBlockRequest
1082  *
1083  * Command: ImageBlockRequest
1084  * @param fieldControl INT8U
1085  * @param manufacturerId INT16U
1086  * @param imageType INT16U
1087  * @param fileVersion INT32U
1088  * @param fileOffset INT32U
1089  * @param maxDataSize INT8U
1090  * @param requestNodeAddress IEEE_ADDRESS
1091  */
1092 #define emberAfFillCommandOver                                                                                                     \
1093     the Air BootloadingClusterImageBlockRequest(fieldControl, manufacturerId, imageType, fileVersion, fileOffset, maxDataSize,     \
1094                                                 requestNodeAddress)                                                                \
1095         emberAfFillExternalBuffer(mask,                                                                                            \
1096                                                                                                                                    \
1097                                   ZCL_IMAGE_BLOCK_REQUEST_COMMAND_ID, "uuuuuuu", fieldControl, manufacturerId, imageType,          \
1098                                   fileVersion, fileOffset, maxDataSize, requestNodeAddress);
1099
1100 /** @brief Command description for ImagePageRequest
1101  *
1102  * Command: ImagePageRequest
1103  * @param fieldControl INT8U
1104  * @param manufacturerId INT16U
1105  * @param imageType INT16U
1106  * @param fileVersion INT32U
1107  * @param fileOffset INT32U
1108  * @param maxDataSize INT8U
1109  * @param pageSize INT16U
1110  * @param responseSpacing INT16U
1111  * @param requestNodeAddress IEEE_ADDRESS
1112  */
1113 #define emberAfFillCommandOver                                                                                                     \
1114     the Air BootloadingClusterImagePageRequest(fieldControl, manufacturerId, imageType, fileVersion, fileOffset, maxDataSize,      \
1115                                                pageSize, responseSpacing, requestNodeAddress)                                      \
1116         emberAfFillExternalBuffer(mask,                                                                                            \
1117                                                                                                                                    \
1118                                   ZCL_IMAGE_PAGE_REQUEST_COMMAND_ID, "uuuuuuuuu", fieldControl, manufacturerId, imageType,         \
1119                                   fileVersion, fileOffset, maxDataSize, pageSize, responseSpacing, requestNodeAddress);
1120
1121 /** @brief Command description for ImageBlockResponse
1122  *
1123  * Command: ImageBlockResponse
1124  * @param status Status
1125  * @param manufacturerId INT16U
1126  * @param imageType INT16U
1127  * @param fileVersion INT32U
1128  * @param fileOffset INT32U
1129  * @param dataSize INT8U
1130  * @param imageData INT8U []
1131  * @param imageDataLen int
1132  */
1133 #define emberAfFillCommandOver                                                                                                     \
1134     the Air BootloadingClusterImageBlockResponse(status, manufacturerId, imageType, fileVersion, fileOffset, dataSize, imageData,  \
1135                                                  imageDataLen)                                                                     \
1136         emberAfFillExternalBuffer(mask,                                                                                            \
1137                                                                                                                                    \
1138                                   ZCL_IMAGE_BLOCK_RESPONSE_COMMAND_ID, "uuuuuub", status, manufacturerId, imageType, fileVersion,  \
1139                                   fileOffset, dataSize, imageData, imageDataLen);
1140
1141 /** @brief Command description for UpgradeEndRequest
1142  *
1143  * Command: UpgradeEndRequest
1144  * @param status Status
1145  * @param manufacturerId INT16U
1146  * @param imageType INT16U
1147  * @param fileVersion INT32U
1148  */
1149 #define emberAfFillCommandOver                                                                                                     \
1150     the Air BootloadingClusterUpgradeEndRequest(status, manufacturerId, imageType, fileVersion)                                    \
1151         emberAfFillExternalBuffer(mask,                                                                                            \
1152                                                                                                                                    \
1153                                   ZCL_UPGRADE_END_REQUEST_COMMAND_ID, "uuuu", status, manufacturerId, imageType, fileVersion);
1154
1155 /** @brief Command description for UpgradeEndResponse
1156  *
1157  * Command: UpgradeEndResponse
1158  * @param manufacturerId INT16U
1159  * @param imageType INT16U
1160  * @param fileVersion INT32U
1161  * @param currentTime UTC_TIME
1162  * @param upgradeTime UTC_TIME
1163  */
1164 #define emberAfFillCommandOver                                                                                                     \
1165     the Air BootloadingClusterUpgradeEndResponse(manufacturerId, imageType, fileVersion, currentTime, upgradeTime)                 \
1166         emberAfFillExternalBuffer(mask,                                                                                            \
1167                                                                                                                                    \
1168                                   ZCL_UPGRADE_END_RESPONSE_COMMAND_ID, "uuuuu", manufacturerId, imageType, fileVersion,            \
1169                                   currentTime, upgradeTime);
1170
1171 /** @brief Command description for QuerySpecificFileRequest
1172  *
1173  * Command: QuerySpecificFileRequest
1174  * @param requestNodeAddress IEEE_ADDRESS
1175  * @param manufacturerId INT16U
1176  * @param imageType INT16U
1177  * @param fileVersion INT32U
1178  * @param currentZigbeeStackVersion INT16U
1179  */
1180 #define emberAfFillCommandOver                                                                                                     \
1181     the Air BootloadingClusterQuerySpecificFileRequest(requestNodeAddress, manufacturerId, imageType, fileVersion,                 \
1182                                                        currentZigbeeStackVersion)                                                  \
1183         emberAfFillExternalBuffer(mask,                                                                                            \
1184                                                                                                                                    \
1185                                   ZCL_QUERY_SPECIFIC_FILE_REQUEST_COMMAND_ID, "uuuuu", requestNodeAddress, manufacturerId,         \
1186                                   imageType, fileVersion, currentZigbeeStackVersion);
1187
1188 /** @brief Command description for QuerySpecificFileResponse
1189  *
1190  * Command: QuerySpecificFileResponse
1191  * @param status Status
1192  * @param manufacturerId INT16U
1193  * @param imageType INT16U
1194  * @param fileVersion INT32U
1195  * @param imageSize INT32U
1196  */
1197 #define emberAfFillCommandOver                                                                                                     \
1198     the Air BootloadingClusterQuerySpecificFileResponse(status, manufacturerId, imageType, fileVersion, imageSize)                 \
1199         emberAfFillExternalBuffer(mask,                                                                                            \
1200                                                                                                                                    \
1201                                   ZCL_QUERY_SPECIFIC_FILE_RESPONSE_COMMAND_ID, "uuuuu", status, manufacturerId, imageType,         \
1202                                   fileVersion, imageSize);
1203
1204 /** @brief Command description for PowerProfileRequest
1205  *
1206  * Command: PowerProfileRequest
1207  * @param powerProfileId INT8U
1208  * @param totalProfileNum INT8U
1209  * @param powerProfileId INT8U
1210  * @param numOfTransferredPhases INT8U
1211  * @param transferredPhases TransferredPhase []
1212  * @param transferredPhasesLen int
1213  */
1214 #define emberAfFillCommandPower                                                                                                    \
1215     ProfileClusterPowerProfileRequest(powerProfileId, totalProfileNum, powerProfileId, numOfTransferredPhases, transferredPhases,  \
1216                                       transferredPhasesLen)                                                                        \
1217         emberAfFillExternalBuffer(mask,                                                                                            \
1218                                                                                                                                    \
1219                                   ZCL_POWER_PROFILE_REQUEST_COMMAND_ID, "uuuub", powerProfileId, totalProfileNum, powerProfileId,  \
1220                                   numOfTransferredPhases, transferredPhases, transferredPhasesLen);
1221
1222 /** @brief Command description for PowerProfileStateRequest
1223  *
1224  * Command: PowerProfileStateRequest
1225  * @param totalProfileNum INT8U
1226  * @param powerProfileId INT8U
1227  * @param numOfTransferredPhases INT8U
1228  * @param transferredPhases TransferredPhase []
1229  * @param transferredPhasesLen int
1230  */
1231 #define emberAfFillCommandPower                                                                                                    \
1232     ProfileClusterPowerProfileStateRequest(totalProfileNum, powerProfileId, numOfTransferredPhases, transferredPhases,             \
1233                                            transferredPhasesLen)                                                                   \
1234         emberAfFillExternalBuffer(mask,                                                                                            \
1235                                                                                                                                    \
1236                                   ZCL_POWER_PROFILE_STATE_REQUEST_COMMAND_ID, "uuub", totalProfileNum, powerProfileId,             \
1237                                   numOfTransferredPhases, transferredPhases, transferredPhasesLen);
1238
1239 /** @brief Command description for GetPowerProfilePriceResponse
1240  *
1241  * Command: GetPowerProfilePriceResponse
1242  * @param powerProfileId INT8U
1243  * @param powerProfileCount INT8U
1244  * @param currency INT16U
1245  * @param powerProfileRecords PowerProfileRecord []
1246  * @param powerProfileRecordsLen int
1247  * @param price INT32U
1248  * @param priceTrailingDigit INT8U
1249  */
1250 #define emberAfFillCommandPower                                                                                                    \
1251     ProfileClusterGetPowerProfilePriceResponse(powerProfileId, powerProfileCount, currency, powerProfileRecords,                   \
1252                                                powerProfileRecordsLen, price, priceTrailingDigit)                                  \
1253         emberAfFillExternalBuffer(mask,                                                                                            \
1254                                                                                                                                    \
1255                                   ZCL_GET_POWER_PROFILE_PRICE_RESPONSE_COMMAND_ID, "uuubuu", powerProfileId, powerProfileCount,    \
1256                                   currency, powerProfileRecords, powerProfileRecordsLen, price, priceTrailingDigit);
1257
1258 /** @brief Command description for GetOverallSchedulePriceResponse
1259  *
1260  * Command: GetOverallSchedulePriceResponse
1261  * @param currency INT16U
1262  * @param powerProfileId INT8U
1263  * @param price INT32U
1264  * @param priceTrailingDigit INT8U
1265  */
1266 #define emberAfFillCommandPower                                                                                                    \
1267     ProfileClusterGetOverallSchedulePriceResponse(currency, powerProfileId, price, priceTrailingDigit) emberAfFillExternalBuffer(  \
1268         mask,                                                                                                                      \
1269                                                                                                                                    \
1270         ZCL_GET_OVERALL_SCHEDULE_PRICE_RESPONSE_COMMAND_ID, "uuuu", currency, powerProfileId, price, priceTrailingDigit);
1271
1272 /** @brief Command description for EnergyPhasesScheduleNotification
1273  *
1274  * Command: EnergyPhasesScheduleNotification
1275  * @param powerProfileId INT8U
1276  * @param powerProfileCount INT8U
1277  * @param numOfScheduledPhases INT8U
1278  * @param powerProfileRecords PowerProfileRecord []
1279  * @param powerProfileRecordsLen int
1280  * @param scheduledPhases ScheduledPhase []
1281  * @param scheduledPhasesLen int
1282  */
1283 #define emberAfFillCommandPower                                                                                                    \
1284     ProfileClusterEnergyPhasesScheduleNotification(powerProfileId, powerProfileCount, numOfScheduledPhases, powerProfileRecords,   \
1285                                                    powerProfileRecordsLen, scheduledPhases, scheduledPhasesLen)                    \
1286         emberAfFillExternalBuffer(mask,                                                                                            \
1287                                                                                                                                    \
1288                                   ZCL_ENERGY_PHASES_SCHEDULE_NOTIFICATION_COMMAND_ID, "uuubb", powerProfileId, powerProfileCount,  \
1289                                   numOfScheduledPhases, powerProfileRecords, powerProfileRecordsLen, scheduledPhases,              \
1290                                   scheduledPhasesLen);
1291
1292 /** @brief Command description for GetOverallSchedulePrice
1293  *
1294  * Command: GetOverallSchedulePrice
1295  * @param powerProfileId INT8U
1296  * @param numOfScheduledPhases INT8U
1297  * @param scheduledPhases ScheduledPhase []
1298  * @param scheduledPhasesLen int
1299  */
1300 #define emberAfFillCommandPower                                                                                                    \
1301     ProfileClusterGetOverallSchedulePrice(powerProfileId, numOfScheduledPhases, scheduledPhases, scheduledPhasesLen)               \
1302         emberAfFillExternalBuffer(mask,                                                                                            \
1303                                                                                                                                    \
1304                                   ZCL_GET_OVERALL_SCHEDULE_PRICE_COMMAND_ID, "uub", powerProfileId, numOfScheduledPhases,          \
1305                                   scheduledPhases, scheduledPhasesLen);
1306
1307 /** @brief Command description for PowerProfileScheduleConstraintsRequest
1308  *
1309  * Command: PowerProfileScheduleConstraintsRequest
1310  * @param powerProfileId INT8U
1311  * @param powerProfileId INT8U
1312  */
1313 #define emberAfFillCommandPower                                                                                                    \
1314     ProfileClusterPowerProfileScheduleConstraintsRequest(powerProfileId, powerProfileId) emberAfFillExternalBuffer(                \
1315         mask,                                                                                                                      \
1316                                                                                                                                    \
1317         ZCL_POWER_PROFILE_SCHEDULE_CONSTRAINTS_REQUEST_COMMAND_ID, "uu", powerProfileId, powerProfileId);
1318
1319 /** @brief Command description for EnergyPhasesScheduleStateRequest
1320  *
1321  * Command: EnergyPhasesScheduleStateRequest
1322  * @param powerProfileId INT8U
1323  * @param powerProfileId INT8U
1324  * @param numOfScheduledPhases INT8U
1325  * @param scheduledPhases ScheduledPhase []
1326  * @param scheduledPhasesLen int
1327  */
1328 #define emberAfFillCommandPower                                                                                                    \
1329     ProfileClusterEnergyPhasesScheduleStateRequest(powerProfileId, powerProfileId, numOfScheduledPhases, scheduledPhases,          \
1330                                                    scheduledPhasesLen)                                                             \
1331         emberAfFillExternalBuffer(mask,                                                                                            \
1332                                                                                                                                    \
1333                                   ZCL_ENERGY_PHASES_SCHEDULE_STATE_REQUEST_COMMAND_ID, "uuub", powerProfileId, powerProfileId,     \
1334                                   numOfScheduledPhases, scheduledPhases, scheduledPhasesLen);
1335
1336 /** @brief Command description for GetPowerProfilePriceExtendedResponse
1337  *
1338  * Command: GetPowerProfilePriceExtendedResponse
1339  * @param powerProfileId INT8U
1340  * @param powerProfileId INT8U
1341  * @param currency INT16U
1342  * @param numOfScheduledPhases INT8U
1343  * @param price INT32U
1344  * @param scheduledPhases ScheduledPhase []
1345  * @param scheduledPhasesLen int
1346  * @param priceTrailingDigit INT8U
1347  */
1348 #define emberAfFillCommandPower                                                                                                    \
1349     ProfileClusterGetPowerProfilePriceExtendedResponse(powerProfileId, powerProfileId, currency, numOfScheduledPhases, price,      \
1350                                                        scheduledPhases, scheduledPhasesLen, priceTrailingDigit)                    \
1351         emberAfFillExternalBuffer(mask,                                                                                            \
1352                                                                                                                                    \
1353                                   ZCL_GET_POWER_PROFILE_PRICE_EXTENDED_RESPONSE_COMMAND_ID, "uuuuubu", powerProfileId,             \
1354                                   powerProfileId, currency, numOfScheduledPhases, price, scheduledPhases, scheduledPhasesLen,      \
1355                                   priceTrailingDigit);
1356
1357 /** @brief Command description for PowerProfileScheduleConstraintsNotification
1358  *
1359  * Command: PowerProfileScheduleConstraintsNotification
1360  * @param powerProfileId INT8U
1361  * @param startAfter INT16U
1362  * @param stopBefore INT16U
1363  */
1364 #define emberAfFillCommandPower                                                                                                    \
1365     ProfileClusterPowerProfileScheduleConstraintsNotification(powerProfileId, startAfter, stopBefore) emberAfFillExternalBuffer(   \
1366         mask,                                                                                                                      \
1367                                                                                                                                    \
1368         ZCL_POWER_PROFILE_SCHEDULE_CONSTRAINTS_NOTIFICATION_COMMAND_ID, "uuu", powerProfileId, startAfter, stopBefore);
1369
1370 /** @brief Command description for PowerProfileScheduleConstraintsResponse
1371  *
1372  * Command: PowerProfileScheduleConstraintsResponse
1373  * @param powerProfileId INT8U
1374  * @param startAfter INT16U
1375  * @param stopBefore INT16U
1376  */
1377 #define emberAfFillCommandPower                                                                                                    \
1378     ProfileClusterPowerProfileScheduleConstraintsResponse(powerProfileId, startAfter, stopBefore) emberAfFillExternalBuffer(       \
1379         mask,                                                                                                                      \
1380                                                                                                                                    \
1381         ZCL_POWER_PROFILE_SCHEDULE_CONSTRAINTS_RESPONSE_COMMAND_ID, "uuu", powerProfileId, startAfter, stopBefore);
1382
1383 /** @brief Command description for GetPowerProfilePriceExtended
1384  *
1385  * Command: GetPowerProfilePriceExtended
1386  * @param options BITMAP8
1387  * @param powerProfileId INT8U
1388  * @param powerProfileStartTime INT16U
1389  */
1390 #define emberAfFillCommandPower                                                                                                    \
1391     ProfileClusterGetPowerProfilePriceExtended(options, powerProfileId, powerProfileStartTime) emberAfFillExternalBuffer(          \
1392         mask,                                                                                                                      \
1393                                                                                                                                    \
1394         ZCL_GET_POWER_PROFILE_PRICE_EXTENDED_COMMAND_ID, "uuu", options, powerProfileId, powerProfileStartTime);
1395
1396 /** @brief Command description for ExecutionOfACommand
1397  *
1398  * Command: ExecutionOfACommand
1399  * @param commandId CommandIdentification
1400  * @param applianceStatus ApplianceStatus
1401  * @param remoteEnableFlagsAndDeviceStatus2 RemoteEnableFlagsAndDeviceStatus2
1402  * @param applianceStatus2 INT24U
1403  */
1404 #define emberAfFillCommandAppliance                                                                                                \
1405     ControlClusterExecutionOfACommand(commandId, applianceStatus, remoteEnableFlagsAndDeviceStatus2, applianceStatus2)             \
1406         emberAfFillExternalBuffer(mask,                                                                                            \
1407                                                                                                                                    \
1408                                   ZCL_EXECUTION_OF_A_COMMAND_COMMAND_ID, "uuuu", commandId, applianceStatus,                       \
1409                                   remoteEnableFlagsAndDeviceStatus2, applianceStatus2);
1410
1411 /** @brief Command description for SignalState
1412  *
1413  * Command: SignalState
1414  * @param applianceStatus ApplianceStatus
1415  * @param remoteEnableFlagsAndDeviceStatus2 RemoteEnableFlagsAndDeviceStatus2
1416  * @param applianceStatus2 INT24U
1417  */
1418 #define emberAfFillCommandAppliance                                                                                                \
1419     ControlClusterSignalState(applianceStatus, remoteEnableFlagsAndDeviceStatus2, applianceStatus2) emberAfFillExternalBuffer(     \
1420         mask,                                                                                                                      \
1421                                                                                                                                    \
1422         ZCL_SIGNAL_STATE_COMMAND_ID, "uuu", applianceStatus, remoteEnableFlagsAndDeviceStatus2, applianceStatus2);
1423
1424 /** @brief Command description for WriteFunctions
1425  *
1426  * Command: WriteFunctions
1427  * @param functionId INT16U
1428  * @param functionDataType ENUM8
1429  * @param functionData INT8U []
1430  * @param functionDataLen int
1431  */
1432 #define emberAfFillCommandAppliance                                                                                                \
1433     ControlClusterWriteFunctions(functionId, functionDataType, functionData, functionDataLen) emberAfFillExternalBuffer(           \
1434         mask,                                                                                                                      \
1435                                                                                                                                    \
1436         ZCL_WRITE_FUNCTIONS_COMMAND_ID, "uub", functionId, functionDataType, functionData, functionDataLen);
1437
1438 /** @brief Command description for OverloadPauseResume
1439  *
1440  * Command: OverloadPauseResume
1441  */
1442 #define emberAfFillCommandAppliance                                                                                                \
1443     ControlClusterOverloadPauseResume() emberAfFillExternalBuffer(mask,                                                            \
1444                                                                                                                                    \
1445                                                                   ZCL_OVERLOAD_PAUSE_RESUME_COMMAND_ID, "", );
1446
1447 /** @brief Command description for OverloadPause
1448  *
1449  * Command: OverloadPause
1450  */
1451 #define emberAfFillCommandAppliance                                                                                                \
1452     ControlClusterOverloadPause() emberAfFillExternalBuffer(mask,                                                                  \
1453                                                                                                                                    \
1454                                                             ZCL_OVERLOAD_PAUSE_COMMAND_ID, "", );
1455
1456 /** @brief Command description for OverloadWarning
1457  *
1458  * Command: OverloadWarning
1459  * @param warningEvent WarningEvent
1460  */
1461 #define emberAfFillCommandAppliance                                                                                                \
1462     ControlClusterOverloadWarning(warningEvent) emberAfFillExternalBuffer(mask,                                                    \
1463                                                                                                                                    \
1464                                                                           ZCL_OVERLOAD_WARNING_COMMAND_ID, "u", warningEvent);
1465
1466 /** @brief Command description for CheckIn
1467  *
1468  * Command: CheckIn
1469  * @param startFastPolling BOOLEAN
1470  * @param fastPollTimeout INT16U
1471  */
1472 #define emberAfFillCommandPoll                                                                                                     \
1473     ControlClusterCheckIn(startFastPolling, fastPollTimeout)                                                                       \
1474         emberAfFillExternalBuffer(mask,                                                                                            \
1475                                                                                                                                    \
1476                                   ZCL_CHECK_IN_COMMAND_ID, "uu", startFastPolling, fastPollTimeout);
1477
1478 /** @brief Command description for FastPollStop
1479  *
1480  * Command: FastPollStop
1481  */
1482 #define emberAfFillCommandPoll                                                                                                     \
1483     ControlClusterFastPollStop() emberAfFillExternalBuffer(mask,                                                                   \
1484                                                                                                                                    \
1485                                                            ZCL_FAST_POLL_STOP_COMMAND_ID, "", );
1486
1487 /** @brief Command description for SetLongPollInterval
1488  *
1489  * Command: SetLongPollInterval
1490  * @param newLongPollInterval INT32U
1491  */
1492 #define emberAfFillCommandPoll                                                                                                     \
1493     ControlClusterSetLongPollInterval(newLongPollInterval)                                                                         \
1494         emberAfFillExternalBuffer(mask,                                                                                            \
1495                                                                                                                                    \
1496                                   ZCL_SET_LONG_POLL_INTERVAL_COMMAND_ID, "u", newLongPollInterval);
1497
1498 /** @brief Command description for SetShortPollInterval
1499  *
1500  * Command: SetShortPollInterval
1501  * @param newShortPollInterval INT16U
1502  */
1503 #define emberAfFillCommandPoll                                                                                                     \
1504     ControlClusterSetShortPollInterval(newShortPollInterval)                                                                       \
1505         emberAfFillExternalBuffer(mask,                                                                                            \
1506                                                                                                                                    \
1507                                   ZCL_SET_SHORT_POLL_INTERVAL_COMMAND_ID, "u", newShortPollInterval);
1508
1509 /** @brief Command description for GpNotification
1510  *
1511  * Command: GpNotification
1512  * @param options GpNotificationOption
1513  * @param options GpNotificationResponseOption
1514  * @param gpdSrcId INT32U
1515  * @param gpdSrcId INT32U
1516  * @param gpdIeee IEEE_ADDRESS
1517  * @param gpdIeee IEEE_ADDRESS
1518  * @param gpdEndpoint INT8U
1519  * @param endpoint INT8U
1520  * @param gpdSecurityFrameCounter INT32U
1521  * @param gpdSecurityFrameCounter INT32U
1522  * @param gpdCommandId INT8U
1523  * @param gpdCommandPayload OCTET_STRING
1524  * @param gppShortAddress INT16U
1525  * @param gppDistance INT8U
1526  */
1527 #define emberAfFillCommandGreen                                                                                                    \
1528     PowerClusterGpNotification(options, options, gpdSrcId, gpdSrcId, gpdIeee, gpdIeee, gpdEndpoint, endpoint,                      \
1529                                gpdSecurityFrameCounter, gpdSecurityFrameCounter, gpdCommandId, gpdCommandPayload, gppShortAddress, \
1530                                gppDistance)                                                                                        \
1531         emberAfFillExternalBuffer(mask,                                                                                            \
1532                                                                                                                                    \
1533                                   ZCL_GP_NOTIFICATION_COMMAND_ID, "uuuuuuuuuuuuuu", options, options, gpdSrcId, gpdSrcId, gpdIeee, \
1534                                   gpdIeee, gpdEndpoint, endpoint, gpdSecurityFrameCounter, gpdSecurityFrameCounter, gpdCommandId,  \
1535                                   gpdCommandPayload, gppShortAddress, gppDistance);
1536
1537 /** @brief Command description for GpPairingSearch
1538  *
1539  * Command: GpPairingSearch
1540  * @param options GpPairingSearchOption
1541  * @param options GpPairingOption
1542  * @param gpdSrcId INT32U
1543  * @param gpdSrcId INT32U
1544  * @param gpdIeee IEEE_ADDRESS
1545  * @param gpdIeee IEEE_ADDRESS
1546  * @param endpoint INT8U
1547  * @param endpoint INT8U
1548  * @param sinkIeeeAddress IEEE_ADDRESS
1549  * @param sinkNwkAddress INT16U
1550  * @param sinkGroupId INT16U
1551  * @param deviceId GpDeviceId
1552  * @param gpdSecurityFrameCounter INT32U
1553  * @param gpdKey SECURITY_KEY
1554  * @param assignedAlias INT16U
1555  * @param groupcastRadius INT8U
1556  */
1557 #define emberAfFillCommandGreen                                                                                                    \
1558     PowerClusterGpPairingSearch(options, options, gpdSrcId, gpdSrcId, gpdIeee, gpdIeee, endpoint, endpoint, sinkIeeeAddress,       \
1559                                 sinkNwkAddress, sinkGroupId, deviceId, gpdSecurityFrameCounter, gpdKey, assignedAlias,             \
1560                                 groupcastRadius)                                                                                   \
1561         emberAfFillExternalBuffer(mask,                                                                                            \
1562                                                                                                                                    \
1563                                   ZCL_GP_PAIRING_SEARCH_COMMAND_ID, "uuuuuuuuuuuuuuuu", options, options, gpdSrcId, gpdSrcId,      \
1564                                   gpdIeee, gpdIeee, endpoint, endpoint, sinkIeeeAddress, sinkNwkAddress, sinkGroupId, deviceId,    \
1565                                   gpdSecurityFrameCounter, gpdKey, assignedAlias, groupcastRadius);
1566
1567 /** @brief Command description for GpProxyCommissioningMode
1568  *
1569  * Command: GpProxyCommissioningMode
1570  * @param options GpProxyCommissioningModeOption
1571  * @param commissioningWindow INT16U
1572  * @param channel INT8U
1573  */
1574 #define emberAfFillCommandGreen                                                                                                    \
1575     PowerClusterGpProxyCommissioningMode(options, commissioningWindow, channel)                                                    \
1576         emberAfFillExternalBuffer(mask,                                                                                            \
1577                                                                                                                                    \
1578                                   ZCL_GP_PROXY_COMMISSIONING_MODE_COMMAND_ID, "uuu", options, commissioningWindow, channel);
1579
1580 /** @brief Command description for GpTunnelingStop
1581  *
1582  * Command: GpTunnelingStop
1583  * @param options GpTunnelingStopOption
1584  * @param gpdSrcId INT32U
1585  * @param gpdIeee IEEE_ADDRESS
1586  * @param endpoint INT8U
1587  * @param gpdSecurityFrameCounter INT32U
1588  * @param gppShortAddress INT16U
1589  * @param gppDistance INT8S
1590  */
1591 #define emberAfFillCommandGreen                                                                                                    \
1592     PowerClusterGpTunnelingStop(options, gpdSrcId, gpdIeee, endpoint, gpdSecurityFrameCounter, gppShortAddress, gppDistance)       \
1593         emberAfFillExternalBuffer(mask,                                                                                            \
1594                                                                                                                                    \
1595                                   ZCL_GP_TUNNELING_STOP_COMMAND_ID, "uuuuuuu", options, gpdSrcId, gpdIeee, endpoint,               \
1596                                   gpdSecurityFrameCounter, gppShortAddress, gppDistance);
1597
1598 /** @brief Command description for GpCommissioningNotification
1599  *
1600  * Command: GpCommissioningNotification
1601  * @param options GpCommissioningNotificationOption
1602  * @param gpdSrcId INT32U
1603  * @param gpdIeee IEEE_ADDRESS
1604  * @param endpoint INT8U
1605  * @param gpdSecurityFrameCounter INT32U
1606  * @param gpdCommandId INT8U
1607  * @param gpdCommandPayload OCTET_STRING
1608  * @param gppShortAddress INT16U
1609  * @param gppLink INT8U
1610  * @param mic INT32U
1611  */
1612 #define emberAfFillCommandGreen                                                                                                    \
1613     PowerClusterGpCommissioningNotification(options, gpdSrcId, gpdIeee, endpoint, gpdSecurityFrameCounter, gpdCommandId,           \
1614                                             gpdCommandPayload, gppShortAddress, gppLink, mic)                                      \
1615         emberAfFillExternalBuffer(mask,                                                                                            \
1616                                                                                                                                    \
1617                                   ZCL_GP_COMMISSIONING_NOTIFICATION_COMMAND_ID, "uuuuuuuuuu", options, gpdSrcId, gpdIeee,          \
1618                                   endpoint, gpdSecurityFrameCounter, gpdCommandId, gpdCommandPayload, gppShortAddress, gppLink,    \
1619                                   mic);
1620
1621 /** @brief Command description for GpSinkCommissioningMode
1622  *
1623  * Command: GpSinkCommissioningMode
1624  * @param options GpSinkCommissioningModeOptions
1625  * @param gpmAddrForSecurity INT16U
1626  * @param gpmAddrForPairing INT16U
1627  * @param sinkEndpoint INT8U
1628  */
1629 #define emberAfFillCommandGreen                                                                                                    \
1630     PowerClusterGpSinkCommissioningMode(options, gpmAddrForSecurity, gpmAddrForPairing, sinkEndpoint) emberAfFillExternalBuffer(   \
1631         mask,                                                                                                                      \
1632                                                                                                                                    \
1633         ZCL_GP_SINK_COMMISSIONING_MODE_COMMAND_ID, "uuuu", options, gpmAddrForSecurity, gpmAddrForPairing, sinkEndpoint);
1634
1635 /** @brief Command description for GpResponse
1636  *
1637  * Command: GpResponse
1638  * @param options GpResponseOption
1639  * @param tempMasterShortAddress INT16U
1640  * @param tempMasterTxChannel BITMAP8
1641  * @param gpdSrcId INT32U
1642  * @param gpdIeee IEEE_ADDRESS
1643  * @param endpoint INT8U
1644  * @param gpdCommandId INT8U
1645  * @param gpdCommandPayload OCTET_STRING
1646  */
1647 #define emberAfFillCommandGreen                                                                                                    \
1648     PowerClusterGpResponse(options, tempMasterShortAddress, tempMasterTxChannel, gpdSrcId, gpdIeee, endpoint, gpdCommandId,        \
1649                            gpdCommandPayload)                                                                                      \
1650         emberAfFillExternalBuffer(mask,                                                                                            \
1651                                                                                                                                    \
1652                                   ZCL_GP_RESPONSE_COMMAND_ID, "uuuuuuuu", options, tempMasterShortAddress, tempMasterTxChannel,    \
1653                                   gpdSrcId, gpdIeee, endpoint, gpdCommandId, gpdCommandPayload);
1654
1655 /** @brief Command description for GpTranslationTableUpdate
1656  *
1657  * Command: GpTranslationTableUpdate
1658  * @param options GpTranslationTableUpdateOption
1659  * @param gpdSrcId INT32U
1660  * @param gpdIeee IEEE_ADDRESS
1661  * @param endpoint INT8U
1662  * @param translations GpTranslationTableUpdateTranslation []
1663  * @param translationsLen int
1664  */
1665 #define emberAfFillCommandGreen                                                                                                    \
1666     PowerClusterGpTranslationTableUpdate(options, gpdSrcId, gpdIeee, endpoint, translations, translationsLen)                      \
1667         emberAfFillExternalBuffer(mask,                                                                                            \
1668                                                                                                                                    \
1669                                   ZCL_GP_TRANSLATION_TABLE_UPDATE_COMMAND_ID, "uuuub", options, gpdSrcId, gpdIeee, endpoint,       \
1670                                   translations, translationsLen);
1671
1672 /** @brief Command description for GpTranslationTableRequest
1673  *
1674  * Command: GpTranslationTableRequest
1675  * @param startIndex INT8U
1676  * @param status GpTranslationTableResponseStatus
1677  * @param options GpTranslationTableResponseOption
1678  * @param totalNumberOfEntries INT8U
1679  * @param startIndex INT8U
1680  * @param entriesCount INT8U
1681  * @param translationTableList INT8U []
1682  * @param translationTableListLen int
1683  */
1684 #define emberAfFillCommandGreen                                                                                                    \
1685     PowerClusterGpTranslationTableRequest(startIndex, status, options, totalNumberOfEntries, startIndex, entriesCount,             \
1686                                           translationTableList, translationTableListLen)                                           \
1687         emberAfFillExternalBuffer(mask,                                                                                            \
1688                                                                                                                                    \
1689                                   ZCL_GP_TRANSLATION_TABLE_REQUEST_COMMAND_ID, "uuuuuub", startIndex, status, options,             \
1690                                   totalNumberOfEntries, startIndex, entriesCount, translationTableList, translationTableListLen);
1691
1692 /** @brief Command description for GpPairingConfiguration
1693  *
1694  * Command: GpPairingConfiguration
1695  * @param actions GpPairingConfigurationActions
1696  * @param options GpPairingConfigurationOption
1697  * @param gpdSrcId INT32U
1698  * @param gpdIeee IEEE_ADDRESS
1699  * @param endpoint INT8U
1700  * @param deviceId INT8U
1701  * @param groupListCount INT8U
1702  * @param groupList GpPairingConfigurationGroupList []
1703  * @param groupListLen int
1704  * @param gpdAssignedAlias INT16U
1705  * @param groupcastRadius INT8U
1706  * @param securityOptions INT8U
1707  * @param gpdSecurityFrameCounter INT32U
1708  * @param gpdSecurityKey SECURITY_KEY
1709  * @param numberOfPairedEndpoints INT8U
1710  * @param pairedEndpoints INT8U []
1711  * @param pairedEndpointsLen int
1712  * @param applicationInformation GpApplicationInformation
1713  * @param manufacturerId INT16U
1714  * @param modeId INT16U
1715  * @param numberOfGpdCommands INT8U
1716  * @param gpdCommandIdList INT8U []
1717  * @param gpdCommandIdListLen int
1718  * @param clusterIdListCount INT8U
1719  * @param clusterListServer INT16U []
1720  * @param clusterListServerLen int
1721  * @param clusterListClient INT16U []
1722  * @param clusterListClientLen int
1723  * @param switchInformationLength INT8U
1724  * @param switchConfiguration INT8U
1725  * @param currentContactStatus INT8U
1726  * @param totalNumberOfReports INT8U
1727  * @param numberOfReports INT8U
1728  * @param reportDescriptor INT8U []
1729  * @param reportDescriptorLen int
1730  */
1731 #define emberAfFillCommandGreen                                                                                                    \
1732     PowerClusterGpPairingConfiguration(                                                                                            \
1733         actions, options, gpdSrcId, gpdIeee, endpoint, deviceId, groupListCount, groupList, groupListLen, gpdAssignedAlias,        \
1734         groupcastRadius, securityOptions, gpdSecurityFrameCounter, gpdSecurityKey, numberOfPairedEndpoints, pairedEndpoints,       \
1735         pairedEndpointsLen, applicationInformation, manufacturerId, modeId, numberOfGpdCommands, gpdCommandIdList,                 \
1736         gpdCommandIdListLen, clusterIdListCount, clusterListServer, clusterListServerLen, clusterListClient, clusterListClientLen, \
1737         switchInformationLength, switchConfiguration, currentContactStatus, totalNumberOfReports, numberOfReports,                 \
1738         reportDescriptor, reportDescriptorLen)                                                                                     \
1739         emberAfFillExternalBuffer(mask,                                                                                            \
1740                                                                                                                                    \
1741                                   ZCL_GP_PAIRING_CONFIGURATION_COMMAND_ID, "uuuuuuubuuuuuubuuuububbuuuuub", actions, options,      \
1742                                   gpdSrcId, gpdIeee, endpoint, deviceId, groupListCount, groupList, groupListLen,                  \
1743                                   gpdAssignedAlias, groupcastRadius, securityOptions, gpdSecurityFrameCounter, gpdSecurityKey,     \
1744                                   numberOfPairedEndpoints, pairedEndpoints, pairedEndpointsLen, applicationInformation,            \
1745                                   manufacturerId, modeId, numberOfGpdCommands, gpdCommandIdList, gpdCommandIdListLen,              \
1746                                   clusterIdListCount, clusterListServer, clusterListServerLen, clusterListClient,                  \
1747                                   clusterListClientLen, switchInformationLength, switchConfiguration, currentContactStatus,        \
1748                                   totalNumberOfReports, numberOfReports, reportDescriptor, reportDescriptorLen);
1749
1750 /** @brief Command description for GpSinkTableRequest
1751  *
1752  * Command: GpSinkTableRequest
1753  * @param options GpSinkTableRequestOptions
1754  * @param status ENUM8
1755  * @param gpdSrcId INT32U
1756  * @param totalNumberofNonEmptySinkTableEntries INT8U
1757  * @param gpdIeee INT64U
1758  * @param startIndex INT8U
1759  * @param endpoint INT8U
1760  * @param sinkTableEntriesCount INT8U
1761  * @param index INT8U
1762  * @param sinkTableEntries INT8U []
1763  * @param sinkTableEntriesLen int
1764  */
1765 #define emberAfFillCommandGreen                                                                                                    \
1766     PowerClusterGpSinkTableRequest(options, status, gpdSrcId, totalNumberofNonEmptySinkTableEntries, gpdIeee, startIndex,          \
1767                                    endpoint, sinkTableEntriesCount, index, sinkTableEntries, sinkTableEntriesLen)                  \
1768         emberAfFillExternalBuffer(mask,                                                                                            \
1769                                                                                                                                    \
1770                                   ZCL_GP_SINK_TABLE_REQUEST_COMMAND_ID, "uuuuuuuuub", options, status, gpdSrcId,                   \
1771                                   totalNumberofNonEmptySinkTableEntries, gpdIeee, startIndex, endpoint, sinkTableEntriesCount,     \
1772                                   index, sinkTableEntries, sinkTableEntriesLen);
1773
1774 /** @brief Command description for GpProxyTableResponse
1775  *
1776  * Command: GpProxyTableResponse
1777  * @param status GpProxyTableResponseStatus
1778  * @param options GpProxyTableRequestOptions
1779  * @param totalNumberOfNonEmptyProxyTableEntries INT8U
1780  * @param gpdSrcId INT32U
1781  * @param startIndex INT8U
1782  * @param gpdIeee INT64U
1783  * @param entriesCount INT8U
1784  * @param endpoint INT8U
1785  * @param proxyTableEntries INT8U []
1786  * @param proxyTableEntriesLen int
1787  * @param index INT8U
1788  */
1789 #define emberAfFillCommandGreen                                                                                                    \
1790     PowerClusterGpProxyTableResponse(status, options, totalNumberOfNonEmptyProxyTableEntries, gpdSrcId, startIndex, gpdIeee,       \
1791                                      entriesCount, endpoint, proxyTableEntries, proxyTableEntriesLen, index)                       \
1792         emberAfFillExternalBuffer(mask,                                                                                            \
1793                                                                                                                                    \
1794                                   ZCL_GP_PROXY_TABLE_RESPONSE_COMMAND_ID, "uuuuuuuubu", status, options,                           \
1795                                   totalNumberOfNonEmptyProxyTableEntries, gpdSrcId, startIndex, gpdIeee, entriesCount, endpoint,   \
1796                                   proxyTableEntries, proxyTableEntriesLen, index);
1797
1798 /** @brief Command description for LockDoor
1799  *
1800  * Command: LockDoor
1801  * @param PIN CHAR_STRING
1802  * @param status INT8U
1803  */
1804 #define emberAfFillCommandDoor                                                                                                     \
1805     LockClusterLockDoor(PIN, status) emberAfFillExternalBuffer(mask,                                                               \
1806                                                                                                                                    \
1807                                                                ZCL_LOCK_DOOR_COMMAND_ID, "uu", PIN, status);
1808
1809 /** @brief Command description for UnlockDoor
1810  *
1811  * Command: UnlockDoor
1812  * @param PIN CHAR_STRING
1813  * @param status INT8U
1814  */
1815 #define emberAfFillCommandDoor                                                                                                     \
1816     LockClusterUnlockDoor(PIN, status) emberAfFillExternalBuffer(mask,                                                             \
1817                                                                                                                                    \
1818                                                                  ZCL_UNLOCK_DOOR_COMMAND_ID, "uu", PIN, status);
1819
1820 /** @brief Command description for Toggle
1821  *
1822  * Command: Toggle
1823  * @param pin CHAR_STRING
1824  * @param status INT8U
1825  */
1826 #define emberAfFillCommandDoor                                                                                                     \
1827     LockClusterToggle(pin, status) emberAfFillExternalBuffer(mask,                                                                 \
1828                                                                                                                                    \
1829                                                              ZCL_TOGGLE_COMMAND_ID, "uu", pin, status);
1830
1831 /** @brief Command description for UnlockWithTimeout
1832  *
1833  * Command: UnlockWithTimeout
1834  * @param timeoutInSeconds INT16U
1835  * @param status INT8U
1836  * @param pin CHAR_STRING
1837  */
1838 #define emberAfFillCommandDoor                                                                                                     \
1839     LockClusterUnlockWithTimeout(timeoutInSeconds, status, pin)                                                                    \
1840         emberAfFillExternalBuffer(mask,                                                                                            \
1841                                                                                                                                    \
1842                                   ZCL_UNLOCK_WITH_TIMEOUT_COMMAND_ID, "uuu", timeoutInSeconds, status, pin);
1843
1844 /** @brief Command description for GetLogRecord
1845  *
1846  * Command: GetLogRecord
1847  * @param logIndex INT16U
1848  * @param logEntryId INT16U
1849  * @param timestamp INT32U
1850  * @param eventType ENUM8
1851  * @param source INT8U
1852  * @param eventIdOrAlarmCode INT8U
1853  * @param userId INT16U
1854  * @param pin CHAR_STRING
1855  */
1856 #define emberAfFillCommandDoor                                                                                                     \
1857     LockClusterGetLogRecord(logIndex, logEntryId, timestamp, eventType, source, eventIdOrAlarmCode, userId, pin)                   \
1858         emberAfFillExternalBuffer(mask,                                                                                            \
1859                                                                                                                                    \
1860                                   ZCL_GET_LOG_RECORD_COMMAND_ID, "uuuuuuuu", logIndex, logEntryId, timestamp, eventType, source,   \
1861                                   eventIdOrAlarmCode, userId, pin);
1862
1863 /** @brief Command description for SetPin
1864  *
1865  * Command: SetPin
1866  * @param userId INT16U
1867  * @param status DoorLockSetPinOrIdStatus
1868  * @param userStatus DoorLockUserStatus
1869  * @param userType DoorLockUserType
1870  * @param pin CHAR_STRING
1871  */
1872 #define emberAfFillCommandDoor                                                                                                     \
1873     LockClusterSetPin(userId, status, userStatus, userType, pin)                                                                   \
1874         emberAfFillExternalBuffer(mask,                                                                                            \
1875                                                                                                                                    \
1876                                   ZCL_SET_PIN_COMMAND_ID, "uuuuu", userId, status, userStatus, userType, pin);
1877
1878 /** @brief Command description for GetPin
1879  *
1880  * Command: GetPin
1881  * @param userId INT16U
1882  * @param userId INT16U
1883  * @param userStatus DoorLockUserStatus
1884  * @param userType DoorLockUserType
1885  * @param pin CHAR_STRING
1886  */
1887 #define emberAfFillCommandDoor                                                                                                     \
1888     LockClusterGetPin(userId, userId, userStatus, userType, pin)                                                                   \
1889         emberAfFillExternalBuffer(mask,                                                                                            \
1890                                                                                                                                    \
1891                                   ZCL_GET_PIN_COMMAND_ID, "uuuuu", userId, userId, userStatus, userType, pin);
1892
1893 /** @brief Command description for ClearPin
1894  *
1895  * Command: ClearPin
1896  * @param userId INT16U
1897  * @param status INT8U
1898  */
1899 #define emberAfFillCommandDoor                                                                                                     \
1900     LockClusterClearPin(userId, status) emberAfFillExternalBuffer(mask,                                                            \
1901                                                                                                                                    \
1902                                                                   ZCL_CLEAR_PIN_COMMAND_ID, "uu", userId, status);
1903
1904 /** @brief Command description for ClearAllPins
1905  *
1906  * Command: ClearAllPins
1907  * @param status INT8U
1908  */
1909 #define emberAfFillCommandDoor                                                                                                     \
1910     LockClusterClearAllPins(status) emberAfFillExternalBuffer(mask,                                                                \
1911                                                                                                                                    \
1912                                                               ZCL_CLEAR_ALL_PINS_COMMAND_ID, "u", status);
1913
1914 /** @brief Command description for SetUserStatus
1915  *
1916  * Command: SetUserStatus
1917  * @param userId INT16U
1918  * @param status INT8U
1919  * @param userStatus INT8U
1920  */
1921 #define emberAfFillCommandDoor                                                                                                     \
1922     LockClusterSetUserStatus(userId, status, userStatus)                                                                           \
1923         emberAfFillExternalBuffer(mask,                                                                                            \
1924                                                                                                                                    \
1925                                   ZCL_SET_USER_STATUS_COMMAND_ID, "uuu", userId, status, userStatus);
1926
1927 /** @brief Command description for GetUserStatus
1928  *
1929  * Command: GetUserStatus
1930  * @param userId INT16U
1931  * @param userId INT16U
1932  * @param status INT8U
1933  */
1934 #define emberAfFillCommandDoor                                                                                                     \
1935     LockClusterGetUserStatus(userId, userId, status)                                                                               \
1936         emberAfFillExternalBuffer(mask,                                                                                            \
1937                                                                                                                                    \
1938                                   ZCL_GET_USER_STATUS_COMMAND_ID, "uuu", userId, userId, status);
1939
1940 /** @brief Command description for SetWeekdaySchedule
1941  *
1942  * Command: SetWeekdaySchedule
1943  * @param scheduleId INT8U
1944  * @param status INT8U
1945  * @param userId INT16U
1946  * @param daysMask DoorLockDayOfWeek
1947  * @param startHour INT8U
1948  * @param startMinute INT8U
1949  * @param endHour INT8U
1950  * @param endMinute INT8U
1951  */
1952 #define emberAfFillCommandDoor                                                                                                     \
1953     LockClusterSetWeekdaySchedule(scheduleId, status, userId, daysMask, startHour, startMinute, endHour, endMinute)                \
1954         emberAfFillExternalBuffer(mask,                                                                                            \
1955                                                                                                                                    \
1956                                   ZCL_SET_WEEKDAY_SCHEDULE_COMMAND_ID, "uuuuuuuu", scheduleId, status, userId, daysMask,           \
1957                                   startHour, startMinute, endHour, endMinute);
1958
1959 /** @brief Command description for GetWeekdaySchedule
1960  *
1961  * Command: GetWeekdaySchedule
1962  * @param scheduleId INT8U
1963  * @param scheduleId INT8U
1964  * @param userId INT16U
1965  * @param userId INT16U
1966  * @param status INT8U
1967  * @param daysMask INT8U
1968  * @param startHour INT8U
1969  * @param startMinute INT8U
1970  * @param endHour INT8U
1971  * @param endMinute INT8U
1972  */
1973 #define emberAfFillCommandDoor                                                                                                     \
1974     LockClusterGetWeekdaySchedule(scheduleId, scheduleId, userId, userId, status, daysMask, startHour, startMinute, endHour,       \
1975                                   endMinute)                                                                                       \
1976         emberAfFillExternalBuffer(mask,                                                                                            \
1977                                                                                                                                    \
1978                                   ZCL_GET_WEEKDAY_SCHEDULE_COMMAND_ID, "uuuuuuuuuu", scheduleId, scheduleId, userId, userId,       \
1979                                   status, daysMask, startHour, startMinute, endHour, endMinute);
1980
1981 /** @brief Command description for ClearWeekdaySchedule
1982  *
1983  * Command: ClearWeekdaySchedule
1984  * @param scheduleId INT8U
1985  * @param status INT8U
1986  * @param userId INT16U
1987  */
1988 #define emberAfFillCommandDoor                                                                                                     \
1989     LockClusterClearWeekdaySchedule(scheduleId, status, userId)                                                                    \
1990         emberAfFillExternalBuffer(mask,                                                                                            \
1991                                                                                                                                    \
1992                                   ZCL_CLEAR_WEEKDAY_SCHEDULE_COMMAND_ID, "uuu", scheduleId, status, userId);
1993
1994 /** @brief Command description for SetYeardaySchedule
1995  *
1996  * Command: SetYeardaySchedule
1997  * @param scheduleId INT8U
1998  * @param status INT8U
1999  * @param userId INT16U
2000  * @param localStartTime INT32U
2001  * @param localEndTime INT32U
2002  */
2003 #define emberAfFillCommandDoor                                                                                                     \
2004     LockClusterSetYeardaySchedule(scheduleId, status, userId, localStartTime, localEndTime) emberAfFillExternalBuffer(             \
2005         mask,                                                                                                                      \
2006                                                                                                                                    \
2007         ZCL_SET_YEARDAY_SCHEDULE_COMMAND_ID, "uuuuu", scheduleId, status, userId, localStartTime, localEndTime);
2008
2009 /** @brief Command description for GetYeardaySchedule
2010  *
2011  * Command: GetYeardaySchedule
2012  * @param scheduleId INT8U
2013  * @param scheduleId INT8U
2014  * @param userId INT16U
2015  * @param userId INT16U
2016  * @param status INT8U
2017  * @param localStartTime INT32U
2018  * @param localEndTime INT32U
2019  */
2020 #define emberAfFillCommandDoor                                                                                                     \
2021     LockClusterGetYeardaySchedule(scheduleId, scheduleId, userId, userId, status, localStartTime, localEndTime)                    \
2022         emberAfFillExternalBuffer(mask,                                                                                            \
2023                                                                                                                                    \
2024                                   ZCL_GET_YEARDAY_SCHEDULE_COMMAND_ID, "uuuuuuu", scheduleId, scheduleId, userId, userId, status,  \
2025                                   localStartTime, localEndTime);
2026
2027 /** @brief Command description for ClearYeardaySchedule
2028  *
2029  * Command: ClearYeardaySchedule
2030  * @param scheduleId INT8U
2031  * @param status INT8U
2032  * @param userId INT16U
2033  */
2034 #define emberAfFillCommandDoor                                                                                                     \
2035     LockClusterClearYeardaySchedule(scheduleId, status, userId)                                                                    \
2036         emberAfFillExternalBuffer(mask,                                                                                            \
2037                                                                                                                                    \
2038                                   ZCL_CLEAR_YEARDAY_SCHEDULE_COMMAND_ID, "uuu", scheduleId, status, userId);
2039
2040 /** @brief Command description for SetHolidaySchedule
2041  *
2042  * Command: SetHolidaySchedule
2043  * @param scheduleId INT8U
2044  * @param status INT8U
2045  * @param localStartTime INT32U
2046  * @param localEndTime INT32U
2047  * @param operatingModeDuringHoliday ENUM8
2048  */
2049 #define emberAfFillCommandDoor                                                                                                     \
2050     LockClusterSetHolidaySchedule(scheduleId, status, localStartTime, localEndTime, operatingModeDuringHoliday)                    \
2051         emberAfFillExternalBuffer(mask,                                                                                            \
2052                                                                                                                                    \
2053                                   ZCL_SET_HOLIDAY_SCHEDULE_COMMAND_ID, "uuuuu", scheduleId, status, localStartTime, localEndTime,  \
2054                                   operatingModeDuringHoliday);
2055
2056 /** @brief Command description for GetHolidaySchedule
2057  *
2058  * Command: GetHolidaySchedule
2059  * @param scheduleId INT8U
2060  * @param scheduleId INT8U
2061  * @param status INT8U
2062  * @param localStartTime INT32U
2063  * @param localEndTime INT32U
2064  * @param operatingModeDuringHoliday ENUM8
2065  */
2066 #define emberAfFillCommandDoor                                                                                                     \
2067     LockClusterGetHolidaySchedule(scheduleId, scheduleId, status, localStartTime, localEndTime, operatingModeDuringHoliday)        \
2068         emberAfFillExternalBuffer(mask,                                                                                            \
2069                                                                                                                                    \
2070                                   ZCL_GET_HOLIDAY_SCHEDULE_COMMAND_ID, "uuuuuu", scheduleId, scheduleId, status, localStartTime,   \
2071                                   localEndTime, operatingModeDuringHoliday);
2072
2073 /** @brief Command description for ClearHolidaySchedule
2074  *
2075  * Command: ClearHolidaySchedule
2076  * @param scheduleId INT8U
2077  * @param status INT8U
2078  */
2079 #define emberAfFillCommandDoor                                                                                                     \
2080     LockClusterClearHolidaySchedule(scheduleId, status)                                                                            \
2081         emberAfFillExternalBuffer(mask,                                                                                            \
2082                                                                                                                                    \
2083                                   ZCL_CLEAR_HOLIDAY_SCHEDULE_COMMAND_ID, "uu", scheduleId, status);
2084
2085 /** @brief Command description for SetUserType
2086  *
2087  * Command: SetUserType
2088  * @param userId INT16U
2089  * @param status INT8U
2090  * @param userType DoorLockUserType
2091  */
2092 #define emberAfFillCommandDoor                                                                                                     \
2093     LockClusterSetUserType(userId, status, userType)                                                                               \
2094         emberAfFillExternalBuffer(mask,                                                                                            \
2095                                                                                                                                    \
2096                                   ZCL_SET_USER_TYPE_COMMAND_ID, "uuu", userId, status, userType);
2097
2098 /** @brief Command description for GetUserType
2099  *
2100  * Command: GetUserType
2101  * @param userId INT16U
2102  * @param userId INT16U
2103  * @param userType DoorLockUserType
2104  */
2105 #define emberAfFillCommandDoor                                                                                                     \
2106     LockClusterGetUserType(userId, userId, userType)                                                                               \
2107         emberAfFillExternalBuffer(mask,                                                                                            \
2108                                                                                                                                    \
2109                                   ZCL_GET_USER_TYPE_COMMAND_ID, "uuu", userId, userId, userType);
2110
2111 /** @brief Command description for SetRfid
2112  *
2113  * Command: SetRfid
2114  * @param userId INT16U
2115  * @param status DoorLockSetPinOrIdStatus
2116  * @param userStatus DoorLockUserStatus
2117  * @param userType DoorLockUserType
2118  * @param id CHAR_STRING
2119  */
2120 #define emberAfFillCommandDoor                                                                                                     \
2121     LockClusterSetRfid(userId, status, userStatus, userType, id)                                                                   \
2122         emberAfFillExternalBuffer(mask,                                                                                            \
2123                                                                                                                                    \
2124                                   ZCL_SET_RFID_COMMAND_ID, "uuuuu", userId, status, userStatus, userType, id);
2125
2126 /** @brief Command description for GetRfid
2127  *
2128  * Command: GetRfid
2129  * @param userId INT16U
2130  * @param userId INT16U
2131  * @param userStatus DoorLockUserStatus
2132  * @param userType DoorLockUserType
2133  * @param rfid CHAR_STRING
2134  */
2135 #define emberAfFillCommandDoor                                                                                                     \
2136     LockClusterGetRfid(userId, userId, userStatus, userType, rfid)                                                                 \
2137         emberAfFillExternalBuffer(mask,                                                                                            \
2138                                                                                                                                    \
2139                                   ZCL_GET_RFID_COMMAND_ID, "uuuuu", userId, userId, userStatus, userType, rfid);
2140
2141 /** @brief Command description for ClearRfid
2142  *
2143  * Command: ClearRfid
2144  * @param userId INT16U
2145  * @param status INT8U
2146  */
2147 #define emberAfFillCommandDoor                                                                                                     \
2148     LockClusterClearRfid(userId, status) emberAfFillExternalBuffer(mask,                                                           \
2149                                                                                                                                    \
2150                                                                    ZCL_CLEAR_RFID_COMMAND_ID, "uu", userId, status);
2151
2152 /** @brief Command description for ClearAllRfids
2153  *
2154  * Command: ClearAllRfids
2155  * @param status INT8U
2156  */
2157 #define emberAfFillCommandDoor                                                                                                     \
2158     LockClusterClearAllRfids(status) emberAfFillExternalBuffer(mask,                                                               \
2159                                                                                                                                    \
2160                                                                ZCL_CLEAR_ALL_RFIDS_COMMAND_ID, "u", status);
2161
2162 /** @brief Command description for OperationEventNotification
2163  *
2164  * Command: OperationEventNotification
2165  * @param source INT8U
2166  * @param eventCode DoorLockOperationEventCode
2167  * @param userId INT16U
2168  * @param pin CHAR_STRING
2169  * @param timeStamp INT32U
2170  * @param data CHAR_STRING
2171  */
2172 #define emberAfFillCommandDoor                                                                                                     \
2173     LockClusterOperationEventNotification(source, eventCode, userId, pin, timeStamp, data) emberAfFillExternalBuffer(              \
2174         mask,                                                                                                                      \
2175                                                                                                                                    \
2176         ZCL_OPERATION_EVENT_NOTIFICATION_COMMAND_ID, "uuuuuu", source, eventCode, userId, pin, timeStamp, data);
2177
2178 /** @brief Command description for ProgrammingEventNotification
2179  *
2180  * Command: ProgrammingEventNotification
2181  * @param source INT8U
2182  * @param eventCode DoorLockProgrammingEventCode
2183  * @param userId INT16U
2184  * @param pin CHAR_STRING
2185  * @param userType DoorLockUserType
2186  * @param userStatus DoorLockUserStatus
2187  * @param timeStamp INT32U
2188  * @param data CHAR_STRING
2189  */
2190 #define emberAfFillCommandDoor                                                                                                     \
2191     LockClusterProgrammingEventNotification(source, eventCode, userId, pin, userType, userStatus, timeStamp, data)                 \
2192         emberAfFillExternalBuffer(mask,                                                                                            \
2193                                                                                                                                    \
2194                                   ZCL_PROGRAMMING_EVENT_NOTIFICATION_COMMAND_ID, "uuuuuuuu", source, eventCode, userId, pin,       \
2195                                   userType, userStatus, timeStamp, data);
2196
2197 /** @brief Command description for WindowCoveringUpOpen
2198  *
2199  * Command: WindowCoveringUpOpen
2200  */
2201 #define emberAfFillCommandWindow                                                                                                   \
2202     CoveringClusterWindowCoveringUpOpen() emberAfFillExternalBuffer(mask,                                                          \
2203                                                                                                                                    \
2204                                                                     ZCL_WINDOW_COVERING_UP_OPEN_COMMAND_ID, "", );
2205
2206 /** @brief Command description for WindowCoveringDownClose
2207  *
2208  * Command: WindowCoveringDownClose
2209  */
2210 #define emberAfFillCommandWindow                                                                                                   \
2211     CoveringClusterWindowCoveringDownClose() emberAfFillExternalBuffer(mask,                                                       \
2212                                                                                                                                    \
2213                                                                        ZCL_WINDOW_COVERING_DOWN_CLOSE_COMMAND_ID, "", );
2214
2215 /** @brief Command description for WindowCoveringStop
2216  *
2217  * Command: WindowCoveringStop
2218  */
2219 #define emberAfFillCommandWindow                                                                                                   \
2220     CoveringClusterWindowCoveringStop() emberAfFillExternalBuffer(mask,                                                            \
2221                                                                                                                                    \
2222                                                                   ZCL_WINDOW_COVERING_STOP_COMMAND_ID, "", );
2223
2224 /** @brief Command description for WindowCoveringGoToLiftValue
2225  *
2226  * Command: WindowCoveringGoToLiftValue
2227  * @param liftValue INT16U
2228  */
2229 #define emberAfFillCommandWindow                                                                                                   \
2230     CoveringClusterWindowCoveringGoToLiftValue(liftValue)                                                                          \
2231         emberAfFillExternalBuffer(mask,                                                                                            \
2232                                                                                                                                    \
2233                                   ZCL_WINDOW_COVERING_GO_TO_LIFT_VALUE_COMMAND_ID, "u", liftValue);
2234
2235 /** @brief Command description for WindowCoveringGoToLiftPercentage
2236  *
2237  * Command: WindowCoveringGoToLiftPercentage
2238  * @param percentageLiftValue INT8U
2239  */
2240 #define emberAfFillCommandWindow                                                                                                   \
2241     CoveringClusterWindowCoveringGoToLiftPercentage(percentageLiftValue)                                                           \
2242         emberAfFillExternalBuffer(mask,                                                                                            \
2243                                                                                                                                    \
2244                                   ZCL_WINDOW_COVERING_GO_TO_LIFT_PERCENTAGE_COMMAND_ID, "u", percentageLiftValue);
2245
2246 /** @brief Command description for WindowCoveringGoToTiltValue
2247  *
2248  * Command: WindowCoveringGoToTiltValue
2249  * @param tiltValue INT16U
2250  */
2251 #define emberAfFillCommandWindow                                                                                                   \
2252     CoveringClusterWindowCoveringGoToTiltValue(tiltValue)                                                                          \
2253         emberAfFillExternalBuffer(mask,                                                                                            \
2254                                                                                                                                    \
2255                                   ZCL_WINDOW_COVERING_GO_TO_TILT_VALUE_COMMAND_ID, "u", tiltValue);
2256
2257 /** @brief Command description for WindowCoveringGoToTiltPercentage
2258  *
2259  * Command: WindowCoveringGoToTiltPercentage
2260  * @param percentageTiltValue INT8U
2261  */
2262 #define emberAfFillCommandWindow                                                                                                   \
2263     CoveringClusterWindowCoveringGoToTiltPercentage(percentageTiltValue)                                                           \
2264         emberAfFillExternalBuffer(mask,                                                                                            \
2265                                                                                                                                    \
2266                                   ZCL_WINDOW_COVERING_GO_TO_TILT_PERCENTAGE_COMMAND_ID, "u", percentageTiltValue);
2267
2268 /** @brief Command description for BarrierControlGoToPercent
2269  *
2270  * Command: BarrierControlGoToPercent
2271  * @param percentOpen INT8U
2272  */
2273 #define emberAfFillCommandBarrier                                                                                                  \
2274     ControlClusterBarrierControlGoToPercent(percentOpen)                                                                           \
2275         emberAfFillExternalBuffer(mask,                                                                                            \
2276                                                                                                                                    \
2277                                   ZCL_BARRIER_CONTROL_GO_TO_PERCENT_COMMAND_ID, "u", percentOpen);
2278
2279 /** @brief Command description for BarrierControlStop
2280  *
2281  * Command: BarrierControlStop
2282  */
2283 #define emberAfFillCommandBarrier                                                                                                  \
2284     ControlClusterBarrierControlStop() emberAfFillExternalBuffer(mask,                                                             \
2285                                                                                                                                    \
2286                                                                  ZCL_BARRIER_CONTROL_STOP_COMMAND_ID, "", );
2287
2288 /** @brief Command description for SetpointRaiseLower
2289  *
2290  * Command: SetpointRaiseLower
2291  * @param mode SetpointAdjustMode
2292  * @param numberOfTransitionsForSequence ENUM8
2293  * @param amount INT8S
2294  * @param dayOfWeekForSequence DayOfWeek
2295  * @param modeForSequence ModeForSequence
2296  * @param payload INT8U []
2297  * @param payloadLen int
2298  */
2299 #define emberAfFillCommandThermostatClusterSetpointRaiseLower(mode, numberOfTransitionsForSequence, amount, dayOfWeekForSequence,  \
2300                                                               modeForSequence, payload, payloadLen)                                \
2301     emberAfFillExternalBuffer(mask,                                                                                                \
2302                                                                                                                                    \
2303                               ZCL_SETPOINT_RAISE_LOWER_COMMAND_ID, "uuuuub", mode, numberOfTransitionsForSequence, amount,         \
2304                               dayOfWeekForSequence, modeForSequence, payload, payloadLen);
2305
2306 /** @brief Command description for SetWeeklySchedule
2307  *
2308  * Command: SetWeeklySchedule
2309  * @param numberOfTransitionsForSequence ENUM8
2310  * @param timeOfDay INT16U
2311  * @param dayOfWeekForSequence DayOfWeek
2312  * @param relayStatus BITMAP16
2313  * @param modeForSequence ModeForSequence
2314  * @param localTemperature INT16S
2315  * @param payload INT8U []
2316  * @param payloadLen int
2317  * @param humidityInPercentage INT8U
2318  * @param setpoint INT16S
2319  * @param unreadEntries INT16U
2320  */
2321 #define emberAfFillCommandThermostatClusterSetWeeklySchedule(numberOfTransitionsForSequence, timeOfDay, dayOfWeekForSequence,      \
2322                                                              relayStatus, modeForSequence, localTemperature, payload, payloadLen,  \
2323                                                              humidityInPercentage, setpoint, unreadEntries)                        \
2324     emberAfFillExternalBuffer(mask,                                                                                                \
2325                                                                                                                                    \
2326                               ZCL_SET_WEEKLY_SCHEDULE_COMMAND_ID, "uuuuuubuuu", numberOfTransitionsForSequence, timeOfDay,         \
2327                               dayOfWeekForSequence, relayStatus, modeForSequence, localTemperature, payload, payloadLen,           \
2328                               humidityInPercentage, setpoint, unreadEntries);
2329
2330 /** @brief Command description for GetWeeklySchedule
2331  *
2332  * Command: GetWeeklySchedule
2333  * @param daysToReturn DayOfWeek
2334  * @param modeToReturn ModeForSequence
2335  */
2336 #define emberAfFillCommandThermostatClusterGetWeeklySchedule(daysToReturn, modeToReturn)                                           \
2337     emberAfFillExternalBuffer(mask,                                                                                                \
2338                                                                                                                                    \
2339                               ZCL_GET_WEEKLY_SCHEDULE_COMMAND_ID, "uu", daysToReturn, modeToReturn);
2340
2341 /** @brief Command description for ClearWeeklySchedule
2342  *
2343  * Command: ClearWeeklySchedule
2344  */
2345 #define emberAfFillCommandThermostatClusterClearWeeklySchedule()                                                                   \
2346     emberAfFillExternalBuffer(mask,                                                                                                \
2347                                                                                                                                    \
2348                               ZCL_CLEAR_WEEKLY_SCHEDULE_COMMAND_ID, "", );
2349
2350 /** @brief Command description for GetRelayStatusLog
2351  *
2352  * Command: GetRelayStatusLog
2353  */
2354 #define emberAfFillCommandThermostatClusterGetRelayStatusLog()                                                                     \
2355     emberAfFillExternalBuffer(mask,                                                                                                \
2356                                                                                                                                    \
2357                               ZCL_GET_RELAY_STATUS_LOG_COMMAND_ID, "", );
2358
2359 /** @brief Command description for MoveToHue
2360  *
2361  * Command: MoveToHue
2362  * @param hue INT8U
2363  * @param direction HueDirection
2364  * @param transitionTime INT16U
2365  * @param optionsMask BITMAP8
2366  * @param optionsOverride BITMAP8
2367  */
2368 #define emberAfFillCommandColor                                                                                                    \
2369     ControlClusterMoveToHue(hue, direction, transitionTime, optionsMask, optionsOverride) emberAfFillExternalBuffer(               \
2370         mask,                                                                                                                      \
2371                                                                                                                                    \
2372         ZCL_MOVE_TO_HUE_COMMAND_ID, "uuuuu", hue, direction, transitionTime, optionsMask, optionsOverride);
2373
2374 /** @brief Command description for MoveHue
2375  *
2376  * Command: MoveHue
2377  * @param moveMode HueMoveMode
2378  * @param rate INT8U
2379  * @param optionsMask BITMAP8
2380  * @param optionsOverride BITMAP8
2381  */
2382 #define emberAfFillCommandColor                                                                                                    \
2383     ControlClusterMoveHue(moveMode, rate, optionsMask, optionsOverride)                                                            \
2384         emberAfFillExternalBuffer(mask,                                                                                            \
2385                                                                                                                                    \
2386                                   ZCL_MOVE_HUE_COMMAND_ID, "uuuu", moveMode, rate, optionsMask, optionsOverride);
2387
2388 /** @brief Command description for StepHue
2389  *
2390  * Command: StepHue
2391  * @param stepMode HueStepMode
2392  * @param stepSize INT8U
2393  * @param transitionTime INT8U
2394  * @param optionsMask BITMAP8
2395  * @param optionsOverride BITMAP8
2396  */
2397 #define emberAfFillCommandColor                                                                                                    \
2398     ControlClusterStepHue(stepMode, stepSize, transitionTime, optionsMask, optionsOverride) emberAfFillExternalBuffer(             \
2399         mask,                                                                                                                      \
2400                                                                                                                                    \
2401         ZCL_STEP_HUE_COMMAND_ID, "uuuuu", stepMode, stepSize, transitionTime, optionsMask, optionsOverride);
2402
2403 /** @brief Command description for MoveToSaturation
2404  *
2405  * Command: MoveToSaturation
2406  * @param saturation INT8U
2407  * @param transitionTime INT16U
2408  * @param optionsMask BITMAP8
2409  * @param optionsOverride BITMAP8
2410  */
2411 #define emberAfFillCommandColor                                                                                                    \
2412     ControlClusterMoveToSaturation(saturation, transitionTime, optionsMask, optionsOverride) emberAfFillExternalBuffer(            \
2413         mask,                                                                                                                      \
2414                                                                                                                                    \
2415         ZCL_MOVE_TO_SATURATION_COMMAND_ID, "uuuu", saturation, transitionTime, optionsMask, optionsOverride);
2416
2417 /** @brief Command description for MoveSaturation
2418  *
2419  * Command: MoveSaturation
2420  * @param moveMode SaturationMoveMode
2421  * @param rate INT8U
2422  * @param optionsMask BITMAP8
2423  * @param optionsOverride BITMAP8
2424  */
2425 #define emberAfFillCommandColor                                                                                                    \
2426     ControlClusterMoveSaturation(moveMode, rate, optionsMask, optionsOverride)                                                     \
2427         emberAfFillExternalBuffer(mask,                                                                                            \
2428                                                                                                                                    \
2429                                   ZCL_MOVE_SATURATION_COMMAND_ID, "uuuu", moveMode, rate, optionsMask, optionsOverride);
2430
2431 /** @brief Command description for StepSaturation
2432  *
2433  * Command: StepSaturation
2434  * @param stepMode SaturationStepMode
2435  * @param stepSize INT8U
2436  * @param transitionTime INT8U
2437  * @param optionsMask BITMAP8
2438  * @param optionsOverride BITMAP8
2439  */
2440 #define emberAfFillCommandColor                                                                                                    \
2441     ControlClusterStepSaturation(stepMode, stepSize, transitionTime, optionsMask, optionsOverride) emberAfFillExternalBuffer(      \
2442         mask,                                                                                                                      \
2443                                                                                                                                    \
2444         ZCL_STEP_SATURATION_COMMAND_ID, "uuuuu", stepMode, stepSize, transitionTime, optionsMask, optionsOverride);
2445
2446 /** @brief Command description for MoveToHueAndSaturation
2447  *
2448  * Command: MoveToHueAndSaturation
2449  * @param hue INT8U
2450  * @param saturation INT8U
2451  * @param transitionTime INT16U
2452  * @param optionsMask BITMAP8
2453  * @param optionsOverride BITMAP8
2454  */
2455 #define emberAfFillCommandColor                                                                                                    \
2456     ControlClusterMoveToHueAndSaturation(hue, saturation, transitionTime, optionsMask, optionsOverride) emberAfFillExternalBuffer( \
2457         mask,                                                                                                                      \
2458                                                                                                                                    \
2459         ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID, "uuuuu", hue, saturation, transitionTime, optionsMask, optionsOverride);
2460
2461 /** @brief Command description for MoveToColor
2462  *
2463  * Command: MoveToColor
2464  * @param colorX INT16U
2465  * @param colorY INT16U
2466  * @param transitionTime INT16U
2467  * @param optionsMask BITMAP8
2468  * @param optionsOverride BITMAP8
2469  */
2470 #define emberAfFillCommandColor                                                                                                    \
2471     ControlClusterMoveToColor(colorX, colorY, transitionTime, optionsMask, optionsOverride) emberAfFillExternalBuffer(             \
2472         mask,                                                                                                                      \
2473                                                                                                                                    \
2474         ZCL_MOVE_TO_COLOR_COMMAND_ID, "uuuuu", colorX, colorY, transitionTime, optionsMask, optionsOverride);
2475
2476 /** @brief Command description for MoveColor
2477  *
2478  * Command: MoveColor
2479  * @param rateX INT16S
2480  * @param rateY INT16S
2481  * @param optionsMask BITMAP8
2482  * @param optionsOverride BITMAP8
2483  */
2484 #define emberAfFillCommandColor                                                                                                    \
2485     ControlClusterMoveColor(rateX, rateY, optionsMask, optionsOverride)                                                            \
2486         emberAfFillExternalBuffer(mask,                                                                                            \
2487                                                                                                                                    \
2488                                   ZCL_MOVE_COLOR_COMMAND_ID, "uuuu", rateX, rateY, optionsMask, optionsOverride);
2489
2490 /** @brief Command description for StepColor
2491  *
2492  * Command: StepColor
2493  * @param stepX INT16S
2494  * @param stepY INT16S
2495  * @param transitionTime INT16U
2496  * @param optionsMask BITMAP8
2497  * @param optionsOverride BITMAP8
2498  */
2499 #define emberAfFillCommandColor                                                                                                    \
2500     ControlClusterStepColor(stepX, stepY, transitionTime, optionsMask, optionsOverride)                                            \
2501         emberAfFillExternalBuffer(mask,                                                                                            \
2502                                                                                                                                    \
2503                                   ZCL_STEP_COLOR_COMMAND_ID, "uuuuu", stepX, stepY, transitionTime, optionsMask, optionsOverride);
2504
2505 /** @brief Command description for MoveToColorTemperature
2506  *
2507  * Command: MoveToColorTemperature
2508  * @param colorTemperature INT16U
2509  * @param transitionTime INT16U
2510  * @param optionsMask BITMAP8
2511  * @param optionsOverride BITMAP8
2512  */
2513 #define emberAfFillCommandColor                                                                                                    \
2514     ControlClusterMoveToColorTemperature(colorTemperature, transitionTime, optionsMask, optionsOverride)                           \
2515         emberAfFillExternalBuffer(mask,                                                                                            \
2516                                                                                                                                    \
2517                                   ZCL_MOVE_TO_COLOR_TEMPERATURE_COMMAND_ID, "uuuu", colorTemperature, transitionTime, optionsMask, \
2518                                   optionsOverride);
2519
2520 /** @brief Command description for EnhancedMoveToHue
2521  *
2522  * Command: EnhancedMoveToHue
2523  * @param enhancedHue INT16U
2524  * @param direction HueDirection
2525  * @param transitionTime INT16U
2526  */
2527 #define emberAfFillCommandColor                                                                                                    \
2528     ControlClusterEnhancedMoveToHue(enhancedHue, direction, transitionTime)                                                        \
2529         emberAfFillExternalBuffer(mask,                                                                                            \
2530                                                                                                                                    \
2531                                   ZCL_ENHANCED_MOVE_TO_HUE_COMMAND_ID, "uuu", enhancedHue, direction, transitionTime);
2532
2533 /** @brief Command description for EnhancedMoveHue
2534  *
2535  * Command: EnhancedMoveHue
2536  * @param moveMode HueMoveMode
2537  * @param rate INT16U
2538  */
2539 #define emberAfFillCommandColor                                                                                                    \
2540     ControlClusterEnhancedMoveHue(moveMode, rate)                                                                                  \
2541         emberAfFillExternalBuffer(mask,                                                                                            \
2542                                                                                                                                    \
2543                                   ZCL_ENHANCED_MOVE_HUE_COMMAND_ID, "uu", moveMode, rate);
2544
2545 /** @brief Command description for EnhancedStepHue
2546  *
2547  * Command: EnhancedStepHue
2548  * @param stepMode HueStepMode
2549  * @param stepSize INT16U
2550  * @param transitionTime INT16U
2551  */
2552 #define emberAfFillCommandColor                                                                                                    \
2553     ControlClusterEnhancedStepHue(stepMode, stepSize, transitionTime)                                                              \
2554         emberAfFillExternalBuffer(mask,                                                                                            \
2555                                                                                                                                    \
2556                                   ZCL_ENHANCED_STEP_HUE_COMMAND_ID, "uuu", stepMode, stepSize, transitionTime);
2557
2558 /** @brief Command description for EnhancedMoveToHueAndSaturation
2559  *
2560  * Command: EnhancedMoveToHueAndSaturation
2561  * @param enhancedHue INT16U
2562  * @param saturation INT8U
2563  * @param transitionTime INT16U
2564  */
2565 #define emberAfFillCommandColor                                                                                                    \
2566     ControlClusterEnhancedMoveToHueAndSaturation(enhancedHue, saturation, transitionTime) emberAfFillExternalBuffer(               \
2567         mask,                                                                                                                      \
2568                                                                                                                                    \
2569         ZCL_ENHANCED_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID, "uuu", enhancedHue, saturation, transitionTime);
2570
2571 /** @brief Command description for ColorLoopSet
2572  *
2573  * Command: ColorLoopSet
2574  * @param updateFlags ColorLoopUpdateFlags
2575  * @param action ColorLoopAction
2576  * @param direction ColorLoopDirection
2577  * @param time INT16U
2578  * @param startHue INT16U
2579  */
2580 #define emberAfFillCommandColor                                                                                                    \
2581     ControlClusterColorLoopSet(updateFlags, action, direction, time, startHue)                                                     \
2582         emberAfFillExternalBuffer(mask,                                                                                            \
2583                                                                                                                                    \
2584                                   ZCL_COLOR_LOOP_SET_COMMAND_ID, "uuuuu", updateFlags, action, direction, time, startHue);
2585
2586 /** @brief Command description for StopMoveStep
2587  *
2588  * Command: StopMoveStep
2589  * @param optionsMask BITMAP8
2590  * @param optionsOverride BITMAP8
2591  */
2592 #define emberAfFillCommandColor                                                                                                    \
2593     ControlClusterStopMoveStep(optionsMask, optionsOverride)                                                                       \
2594         emberAfFillExternalBuffer(mask,                                                                                            \
2595                                                                                                                                    \
2596                                   ZCL_STOP_MOVE_STEP_COMMAND_ID, "uu", optionsMask, optionsOverride);
2597
2598 /** @brief Command description for MoveColorTemperature
2599  *
2600  * Command: MoveColorTemperature
2601  * @param moveMode HueMoveMode
2602  * @param rate INT16U
2603  * @param colorTemperatureMinimum INT16U
2604  * @param colorTemperatureMaximum INT16U
2605  * @param optionsMask BITMAP8
2606  * @param optionsOverride BITMAP8
2607  */
2608 #define emberAfFillCommandColor                                                                                                    \
2609     ControlClusterMoveColorTemperature(moveMode, rate, colorTemperatureMinimum, colorTemperatureMaximum, optionsMask,              \
2610                                        optionsOverride)                                                                            \
2611         emberAfFillExternalBuffer(mask,                                                                                            \
2612                                                                                                                                    \
2613                                   ZCL_MOVE_COLOR_TEMPERATURE_COMMAND_ID, "uuuuuu", moveMode, rate, colorTemperatureMinimum,        \
2614                                   colorTemperatureMaximum, optionsMask, optionsOverride);
2615
2616 /** @brief Command description for StepColorTemperature
2617  *
2618  * Command: StepColorTemperature
2619  * @param stepMode HueStepMode
2620  * @param stepSize INT16U
2621  * @param transitionTime INT16U
2622  * @param colorTemperatureMinimum INT16U
2623  * @param colorTemperatureMaximum INT16U
2624  * @param optionsMask BITMAP8
2625  * @param optionsOverride BITMAP8
2626  */
2627 #define emberAfFillCommandColor                                                                                                    \
2628     ControlClusterStepColorTemperature(stepMode, stepSize, transitionTime, colorTemperatureMinimum, colorTemperatureMaximum,       \
2629                                        optionsMask, optionsOverride)                                                               \
2630         emberAfFillExternalBuffer(mask,                                                                                            \
2631                                                                                                                                    \
2632                                   ZCL_STEP_COLOR_TEMPERATURE_COMMAND_ID, "uuuuuuu", stepMode, stepSize, transitionTime,            \
2633                                   colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, optionsOverride);
2634
2635 /** @brief Command description for ZoneEnrollResponse
2636  *
2637  * Command: ZoneEnrollResponse
2638  * @param enrollResponseCode IasEnrollResponseCode
2639  * @param zoneStatus IasZoneStatus
2640  * @param zoneId INT8U
2641  * @param extendedStatus BITMAP8
2642  * @param zoneId INT8U
2643  * @param delay INT16U
2644  */
2645 #define emberAfFillCommandIAS                                                                                                      \
2646     ZoneClusterZoneEnrollResponse(enrollResponseCode, zoneStatus, zoneId, extendedStatus, zoneId, delay)                           \
2647         emberAfFillExternalBuffer(mask,                                                                                            \
2648                                                                                                                                    \
2649                                   ZCL_ZONE_ENROLL_RESPONSE_COMMAND_ID, "uuuuuu", enrollResponseCode, zoneStatus, zoneId,           \
2650                                   extendedStatus, zoneId, delay);
2651
2652 /** @brief Command description for InitiateNormalOperationMode
2653  *
2654  * Command: InitiateNormalOperationMode
2655  * @param zoneType IasZoneType
2656  * @param manufacturerCode INT16U
2657  */
2658 #define emberAfFillCommandIAS                                                                                                      \
2659     ZoneClusterInitiateNormalOperationMode(zoneType, manufacturerCode)                                                             \
2660         emberAfFillExternalBuffer(mask,                                                                                            \
2661                                                                                                                                    \
2662                                   ZCL_INITIATE_NORMAL_OPERATION_MODE_COMMAND_ID, "uu", zoneType, manufacturerCode);
2663
2664 /** @brief Command description for InitiateNormalOperationModeResponse
2665  *
2666  * Command: InitiateNormalOperationModeResponse
2667  * @param testModeDuration INT8U
2668  * @param currentZoneSensitivityLevel INT8U
2669  */
2670 #define emberAfFillCommandIAS                                                                                                      \
2671     ZoneClusterInitiateNormalOperationModeResponse(testModeDuration, currentZoneSensitivityLevel) emberAfFillExternalBuffer(       \
2672         mask,                                                                                                                      \
2673                                                                                                                                    \
2674         ZCL_INITIATE_NORMAL_OPERATION_MODE_RESPONSE_COMMAND_ID, "uu", testModeDuration, currentZoneSensitivityLevel);
2675
2676 /** @brief Command description for InitiateTestModeResponse
2677  *
2678  * Command: InitiateTestModeResponse
2679  */
2680 #define emberAfFillCommandIAS                                                                                                      \
2681     ZoneClusterInitiateTestModeResponse() emberAfFillExternalBuffer(mask,                                                          \
2682                                                                                                                                    \
2683                                                                     ZCL_INITIATE_TEST_MODE_RESPONSE_COMMAND_ID, "", );
2684
2685 /** @brief Command description for Arm
2686  *
2687  * Command: Arm
2688  * @param armMode IasAceArmMode
2689  * @param armNotification IasAceArmNotification
2690  * @param armDisarmCode CHAR_STRING
2691  * @param zoneId INT8U
2692  */
2693 #define emberAfFillCommandIAS                                                                                                      \
2694     ACEClusterArm(armMode, armNotification, armDisarmCode, zoneId)                                                                 \
2695         emberAfFillExternalBuffer(mask,                                                                                            \
2696                                                                                                                                    \
2697                                   ZCL_ARM_COMMAND_ID, "uuuu", armMode, armNotification, armDisarmCode, zoneId);
2698
2699 /** @brief Command description for Bypass
2700  *
2701  * Command: Bypass
2702  * @param numberOfZones INT8U
2703  * @param section0 BITMAP16
2704  * @param zoneIds INT8U []
2705  * @param zoneIdsLen int
2706  * @param section1 BITMAP16
2707  * @param armDisarmCode CHAR_STRING
2708  * @param section2 BITMAP16
2709  * @param section3 BITMAP16
2710  * @param section4 BITMAP16
2711  * @param section5 BITMAP16
2712  * @param section6 BITMAP16
2713  * @param section7 BITMAP16
2714  * @param section8 BITMAP16
2715  * @param section9 BITMAP16
2716  * @param section10 BITMAP16
2717  * @param section11 BITMAP16
2718  * @param section12 BITMAP16
2719  * @param section13 BITMAP16
2720  * @param section14 BITMAP16
2721  * @param section15 BITMAP16
2722  */
2723 #define emberAfFillCommandIAS                                                                                                      \
2724     ACEClusterBypass(numberOfZones, section0, zoneIds, zoneIdsLen, section1, armDisarmCode, section2, section3, section4,          \
2725                      section5, section6, section7, section8, section9, section10, section11, section12, section13, section14,      \
2726                      section15)                                                                                                    \
2727         emberAfFillExternalBuffer(mask,                                                                                            \
2728                                                                                                                                    \
2729                                   ZCL_BYPASS_COMMAND_ID, "uubuuuuuuuuuuuuuuuu", numberOfZones, section0, zoneIds, zoneIdsLen,      \
2730                                   section1, armDisarmCode, section2, section3, section4, section5, section6, section7, section8,   \
2731                                   section9, section10, section11, section12, section13, section14, section15);
2732
2733 /** @brief Command description for Emergency
2734  *
2735  * Command: Emergency
2736  * @param zoneId INT8U
2737  * @param zoneType IasZoneType
2738  * @param ieeeAddress IEEE_ADDRESS
2739  * @param zoneLabel CHAR_STRING
2740  */
2741 #define emberAfFillCommandIAS                                                                                                      \
2742     ACEClusterEmergency(zoneId, zoneType, ieeeAddress, zoneLabel)                                                                  \
2743         emberAfFillExternalBuffer(mask,                                                                                            \
2744                                                                                                                                    \
2745                                   ZCL_EMERGENCY_COMMAND_ID, "uuuu", zoneId, zoneType, ieeeAddress, zoneLabel);
2746
2747 /** @brief Command description for Fire
2748  *
2749  * Command: Fire
2750  * @param zoneId INT8U
2751  * @param zoneStatus ENUM16
2752  * @param audibleNotification IasAceAudibleNotification
2753  * @param zoneLabel CHAR_STRING
2754  */
2755 #define emberAfFillCommandIAS                                                                                                      \
2756     ACEClusterFire(zoneId, zoneStatus, audibleNotification, zoneLabel)                                                             \
2757         emberAfFillExternalBuffer(mask,                                                                                            \
2758                                                                                                                                    \
2759                                   ZCL_FIRE_COMMAND_ID, "uuuu", zoneId, zoneStatus, audibleNotification, zoneLabel);
2760
2761 /** @brief Command description for Panic
2762  *
2763  * Command: Panic
2764  * @param panelStatus IasAcePanelStatus
2765  * @param secondsRemaining INT8U
2766  * @param audibleNotification IasAceAudibleNotification
2767  * @param alarmStatus IasAceAlarmStatus
2768  */
2769 #define emberAfFillCommandIAS                                                                                                      \
2770     ACEClusterPanic(panelStatus, secondsRemaining, audibleNotification, alarmStatus)                                               \
2771         emberAfFillExternalBuffer(mask,                                                                                            \
2772                                                                                                                                    \
2773                                   ZCL_PANIC_COMMAND_ID, "uuuu", panelStatus, secondsRemaining, audibleNotification, alarmStatus);
2774
2775 /** @brief Command description for GetZoneIdMap
2776  *
2777  * Command: GetZoneIdMap
2778  * @param panelStatus IasAcePanelStatus
2779  * @param secondsRemaining INT8U
2780  * @param audibleNotification IasAceAudibleNotification
2781  * @param alarmStatus IasAceAlarmStatus
2782  */
2783 #define emberAfFillCommandIAS                                                                                                      \
2784     ACEClusterGetZoneIdMap(panelStatus, secondsRemaining, audibleNotification, alarmStatus) emberAfFillExternalBuffer(             \
2785         mask,                                                                                                                      \
2786                                                                                                                                    \
2787         ZCL_GET_ZONE_ID_MAP_COMMAND_ID, "uuuu", panelStatus, secondsRemaining, audibleNotification, alarmStatus);
2788
2789 /** @brief Command description for GetZoneInformation
2790  *
2791  * Command: GetZoneInformation
2792  * @param zoneId INT8U
2793  * @param numberOfZones INT8U
2794  * @param zoneIds INT8U []
2795  * @param zoneIdsLen int
2796  */
2797 #define emberAfFillCommandIAS                                                                                                      \
2798     ACEClusterGetZoneInformation(zoneId, numberOfZones, zoneIds, zoneIdsLen)                                                       \
2799         emberAfFillExternalBuffer(mask,                                                                                            \
2800                                                                                                                                    \
2801                                   ZCL_GET_ZONE_INFORMATION_COMMAND_ID, "uub", zoneId, numberOfZones, zoneIds, zoneIdsLen);
2802
2803 /** @brief Command description for GetPanelStatus
2804  *
2805  * Command: GetPanelStatus
2806  * @param numberOfZones INT8U
2807  * @param bypassResult IasAceBypassResult []
2808  * @param bypassResultLen int
2809  */
2810 #define emberAfFillCommandIAS                                                                                                      \
2811     ACEClusterGetPanelStatus(numberOfZones, bypassResult, bypassResultLen)                                                         \
2812         emberAfFillExternalBuffer(mask,                                                                                            \
2813                                                                                                                                    \
2814                                   ZCL_GET_PANEL_STATUS_COMMAND_ID, "ub", numberOfZones, bypassResult, bypassResultLen);
2815
2816 /** @brief Command description for GetBypassedZoneList
2817  *
2818  * Command: GetBypassedZoneList
2819  * @param zoneStatusComplete BOOLEAN
2820  * @param numberOfZones INT8U
2821  * @param zoneStatusResult IasAceZoneStatusResult []
2822  * @param zoneStatusResultLen int
2823  */
2824 #define emberAfFillCommandIAS                                                                                                      \
2825     ACEClusterGetBypassedZoneList(zoneStatusComplete, numberOfZones, zoneStatusResult, zoneStatusResultLen)                        \
2826         emberAfFillExternalBuffer(mask,                                                                                            \
2827                                                                                                                                    \
2828                                   ZCL_GET_BYPASSED_ZONE_LIST_COMMAND_ID, "uub", zoneStatusComplete, numberOfZones,                 \
2829                                   zoneStatusResult, zoneStatusResultLen);
2830
2831 /** @brief Command description for GetZoneStatus
2832  *
2833  * Command: GetZoneStatus
2834  * @param startingZoneId INT8U
2835  * @param maxNumberOfZoneIds INT8U
2836  * @param zoneStatusMaskFlag BOOLEAN
2837  * @param zoneStatusMask BITMAP16
2838  */
2839 #define emberAfFillCommandIAS                                                                                                      \
2840     ACEClusterGetZoneStatus(startingZoneId, maxNumberOfZoneIds, zoneStatusMaskFlag, zoneStatusMask) emberAfFillExternalBuffer(     \
2841         mask,                                                                                                                      \
2842                                                                                                                                    \
2843         ZCL_GET_ZONE_STATUS_COMMAND_ID, "uuuu", startingZoneId, maxNumberOfZoneIds, zoneStatusMaskFlag, zoneStatusMask);
2844
2845 /** @brief Command description for StartWarning
2846  *
2847  * Command: StartWarning
2848  * @param warningInfo WarningInfo
2849  * @param warningDuration INT16U
2850  * @param strobeDutyCycle INT8U
2851  * @param strobeLevel ENUM8
2852  */
2853 #define emberAfFillCommandIAS                                                                                                      \
2854     WDClusterStartWarning(warningInfo, warningDuration, strobeDutyCycle, strobeLevel) emberAfFillExternalBuffer(                   \
2855         mask,                                                                                                                      \
2856                                                                                                                                    \
2857         ZCL_START_WARNING_COMMAND_ID, "uuuu", warningInfo, warningDuration, strobeDutyCycle, strobeLevel);
2858
2859 /** @brief Command description for Squawk
2860  *
2861  * Command: Squawk
2862  * @param squawkInfo SquawkInfo
2863  */
2864 #define emberAfFillCommandIAS                                                                                                      \
2865     WDClusterSquawk(squawkInfo) emberAfFillExternalBuffer(mask,                                                                    \
2866                                                                                                                                    \
2867                                                           ZCL_SQUAWK_COMMAND_ID, "u", squawkInfo);
2868
2869 /** @brief Command description for MatchProtocolAddress
2870  *
2871  * Command: MatchProtocolAddress
2872  * @param protocolAddress OCTET_STRING
2873  * @param deviceIeeeAddress IEEE_ADDRESS
2874  * @param protocolAddress OCTET_STRING
2875  */
2876 #define emberAfFillCommandGeneric                                                                                                  \
2877     TunnelClusterMatchProtocolAddress(protocolAddress, deviceIeeeAddress, protocolAddress) emberAfFillExternalBuffer(              \
2878         mask,                                                                                                                      \
2879                                                                                                                                    \
2880         ZCL_MATCH_PROTOCOL_ADDRESS_COMMAND_ID, "uuu", protocolAddress, deviceIeeeAddress, protocolAddress);
2881
2882 /** @brief Command description for AdvertiseProtocolAddress
2883  *
2884  * Command: AdvertiseProtocolAddress
2885  * @param protocolAddress OCTET_STRING
2886  */
2887 #define emberAfFillCommandGeneric                                                                                                  \
2888     TunnelClusterAdvertiseProtocolAddress(protocolAddress)                                                                         \
2889         emberAfFillExternalBuffer(mask,                                                                                            \
2890                                                                                                                                    \
2891                                   ZCL_ADVERTISE_PROTOCOL_ADDRESS_COMMAND_ID, "u", protocolAddress);
2892
2893 /** @brief Command description for TransferNpdu
2894  *
2895  * Command: TransferNpdu
2896  * @param npdu DATA8 []
2897  * @param npduLen int
2898  */
2899 #define emberAfFillCommandBACnet                                                                                                   \
2900     Protocol TunnelClusterTransferNpdu(npdu, npduLen) emberAfFillExternalBuffer(mask,                                              \
2901                                                                                                                                    \
2902                                                                                 ZCL_TRANSFER_NPDU_COMMAND_ID, "b", npdu, npduLen);
2903
2904 /** @brief Command description for TransferAPDU
2905  *
2906  * Command: TransferAPDU
2907  * @param apdu OCTET_STRING
2908  */
2909 #define emberAfFillCommand11073                                                                                                    \
2910     Protocol TunnelClusterTransferAPDU(apdu) emberAfFillExternalBuffer(mask,                                                       \
2911                                                                                                                                    \
2912                                                                        ZCL_TRANSFER_APDU_COMMAND_ID, "u", apdu);
2913
2914 /** @brief Command description for ConnectRequest
2915  *
2916  * Command: ConnectRequest
2917  * @param connectControl 11073ConnectRequestConnectControl
2918  * @param idleTimeout INT16U
2919  * @param managerTarget IEEE_ADDRESS
2920  * @param managerEndpoint INT8U
2921  */
2922 #define emberAfFillCommand11073                                                                                                    \
2923     Protocol TunnelClusterConnectRequest(connectControl, idleTimeout, managerTarget, managerEndpoint) emberAfFillExternalBuffer(   \
2924         mask,                                                                                                                      \
2925                                                                                                                                    \
2926         ZCL_CONNECT_REQUEST_COMMAND_ID, "uuuu", connectControl, idleTimeout, managerTarget, managerEndpoint);
2927
2928 /** @brief Command description for DisconnectRequest
2929  *
2930  * Command: DisconnectRequest
2931  * @param managerIEEEAddress IEEE_ADDRESS
2932  */
2933 #define emberAfFillCommand11073                                                                                                    \
2934     Protocol TunnelClusterDisconnectRequest(managerIEEEAddress)                                                                    \
2935         emberAfFillExternalBuffer(mask,                                                                                            \
2936                                                                                                                                    \
2937                                   ZCL_DISCONNECT_REQUEST_COMMAND_ID, "u", managerIEEEAddress);
2938
2939 /** @brief Command description for ConnectStatusNotification
2940  *
2941  * Command: ConnectStatusNotification
2942  * @param connectStatus 11073TunnelConnectionStatus
2943  */
2944 #define emberAfFillCommand11073                                                                                                    \
2945     Protocol TunnelClusterConnectStatusNotification(connectStatus)                                                                 \
2946         emberAfFillExternalBuffer(mask,                                                                                            \
2947                                                                                                                                    \
2948                                   ZCL_CONNECT_STATUS_NOTIFICATION_COMMAND_ID, "u", connectStatus);
2949
2950 /** @brief Command description for TransferApdu
2951  *
2952  * Command: TransferApdu
2953  * @param apdu OCTET_STRING
2954  */
2955 #define emberAfFillCommandISO                                                                                                      \
2956     7816 Protocol TunnelClusterTransferApdu(apdu) emberAfFillExternalBuffer(mask,                                                  \
2957                                                                                                                                    \
2958                                                                             ZCL_TRANSFER_APDU_COMMAND_ID, "u", apdu);
2959
2960 /** @brief Command description for InsertSmartCard
2961  *
2962  * Command: InsertSmartCard
2963  */
2964 #define emberAfFillCommandISO                                                                                                      \
2965     7816 Protocol TunnelClusterInsertSmartCard() emberAfFillExternalBuffer(mask,                                                   \
2966                                                                                                                                    \
2967                                                                            ZCL_INSERT_SMART_CARD_COMMAND_ID, "", );
2968
2969 /** @brief Command description for ExtractSmartCard
2970  *
2971  * Command: ExtractSmartCard
2972  */
2973 #define emberAfFillCommandISO                                                                                                      \
2974     7816 Protocol TunnelClusterExtractSmartCard() emberAfFillExternalBuffer(mask,                                                  \
2975                                                                                                                                    \
2976                                                                             ZCL_EXTRACT_SMART_CARD_COMMAND_ID, "", );
2977
2978 /** @brief Command description for PublishPrice
2979  *
2980  * Command: PublishPrice
2981  * @param providerId INT32U
2982  * @param commandOptions AmiCommandOptions
2983  * @param rateLabel OCTET_STRING
2984  * @param issuerEventId INT32U
2985  * @param currentTime UTC_TIME
2986  * @param unitOfMeasure AmiUnitOfMeasure
2987  * @param currency INT16U
2988  * @param priceTrailingDigitAndPriceTier PriceTrailingDigitAndPriceTier
2989  * @param numberOfPriceTiersAndRegisterTier PriceNumberOfPriceTiersAndRegisterTier
2990  * @param startTime UTC_TIME
2991  * @param durationInMinutes INT16U
2992  * @param price INT32U
2993  * @param priceRatio INT8U
2994  * @param generationPrice INT32U
2995  * @param generationPriceRatio INT8U
2996  * @param alternateCostDelivered INT32U
2997  * @param alternateCostUnit AlternateCostUnit
2998  * @param alternateCostTrailingDigit AlternateCostTrailingDigit
2999  * @param numberOfBlockThresholds INT8U
3000  * @param priceControl PriceControlMask
3001  * @param numberOfGenerationTiers INT8U
3002  * @param generationTier GenerationTier
3003  * @param extendedNumberOfPriceTiers ExtendedNumberOfPriceTiers
3004  * @param extendedPriceTier ExtendedPriceTier
3005  * @param extendedRegisterTier ExtendedRegisterTier
3006  */
3007 #define emberAfFillCommandPriceClusterPublishPrice(                                                                                \
3008     providerId, commandOptions, rateLabel, issuerEventId, currentTime, unitOfMeasure, currency, priceTrailingDigitAndPriceTier,    \
3009     numberOfPriceTiersAndRegisterTier, startTime, durationInMinutes, price, priceRatio, generationPrice, generationPriceRatio,     \
3010     alternateCostDelivered, alternateCostUnit, alternateCostTrailingDigit, numberOfBlockThresholds, priceControl,                  \
3011     numberOfGenerationTiers, generationTier, extendedNumberOfPriceTiers, extendedPriceTier, extendedRegisterTier)                  \
3012     emberAfFillExternalBuffer(mask,                                                                                                \
3013                                                                                                                                    \
3014                               ZCL_PUBLISH_PRICE_COMMAND_ID, "uuuuuuuuuuuuuuuuuuuuuuuuu", providerId, commandOptions, rateLabel,    \
3015                               issuerEventId, currentTime, unitOfMeasure, currency, priceTrailingDigitAndPriceTier,                 \
3016                               numberOfPriceTiersAndRegisterTier, startTime, durationInMinutes, price, priceRatio, generationPrice, \
3017                               generationPriceRatio, alternateCostDelivered, alternateCostUnit, alternateCostTrailingDigit,         \
3018                               numberOfBlockThresholds, priceControl, numberOfGenerationTiers, generationTier,                      \
3019                               extendedNumberOfPriceTiers, extendedPriceTier, extendedRegisterTier);
3020
3021 /** @brief Command description for PublishBlockPeriod
3022  *
3023  * Command: PublishBlockPeriod
3024  * @param providerId INT32U
3025  * @param startTime UTC_TIME
3026  * @param issuerEventId INT32U
3027  * @param numberOfEvents INT8U
3028  * @param blockPeriodStartTime UTC_TIME
3029  * @param blockPeriodDuration INT24U
3030  * @param numberOfPriceTiersAndNumberOfBlockThresholds BITMAP8
3031  * @param blockPeriodControl BlockPeriodControl
3032  * @param blockPeriodDurationType BlockPeriodDurationType
3033  * @param tariffType TariffType
3034  * @param tariffResolutionPeriod TariffResolutionPeriod
3035  */
3036 #define emberAfFillCommandPriceClusterPublishBlockPeriod(                                                                          \
3037     providerId, startTime, issuerEventId, numberOfEvents, blockPeriodStartTime, blockPeriodDuration,                               \
3038     numberOfPriceTiersAndNumberOfBlockThresholds, blockPeriodControl, blockPeriodDurationType, tariffType, tariffResolutionPeriod) \
3039     emberAfFillExternalBuffer(mask,                                                                                                \
3040                                                                                                                                    \
3041                               ZCL_PUBLISH_BLOCK_PERIOD_COMMAND_ID, "uuuuuuuuuuu", providerId, startTime, issuerEventId,            \
3042                               numberOfEvents, blockPeriodStartTime, blockPeriodDuration,                                           \
3043                               numberOfPriceTiersAndNumberOfBlockThresholds, blockPeriodControl, blockPeriodDurationType,           \
3044                               tariffType, tariffResolutionPeriod);
3045
3046 /** @brief Command description for PublishConversionFactor
3047  *
3048  * Command: PublishConversionFactor
3049  * @param issuerEventId INT32U
3050  * @param providerId INT32U
3051  * @param startTime UTC_TIME
3052  * @param issuerEventId INT32U
3053  * @param conversionFactor INT32U
3054  * @param priceAckTime UTC_TIME
3055  * @param conversionFactorTrailingDigit ConversionFactorTrailingDigit
3056  * @param control PriceControlMask
3057  */
3058 #define emberAfFillCommandPriceClusterPublishConversionFactor(                                                                     \
3059     issuerEventId, providerId, startTime, issuerEventId, conversionFactor, priceAckTime, conversionFactorTrailingDigit, control)   \
3060     emberAfFillExternalBuffer(mask,                                                                                                \
3061                                                                                                                                    \
3062                               ZCL_PUBLISH_CONVERSION_FACTOR_COMMAND_ID, "uuuuuuuu", issuerEventId, providerId, startTime,          \
3063                               issuerEventId, conversionFactor, priceAckTime, conversionFactorTrailingDigit, control);
3064
3065 /** @brief Command description for PublishCalorificValue
3066  *
3067  * Command: PublishCalorificValue
3068  * @param issuerEventId INT32U
3069  * @param startTime UTC_TIME
3070  * @param startTime UTC_TIME
3071  * @param numberOfEvents INT8U
3072  * @param calorificValue INT32U
3073  * @param tariffType TariffType
3074  * @param calorificValueUnit CalorificValueUnit
3075  * @param calorificValueTrailingDigit CalorificValueTrailingDigit
3076  */
3077 #define emberAfFillCommandPriceClusterPublishCalorificValue(issuerEventId, startTime, startTime, numberOfEvents, calorificValue,   \
3078                                                             tariffType, calorificValueUnit, calorificValueTrailingDigit)           \
3079     emberAfFillExternalBuffer(mask,                                                                                                \
3080                                                                                                                                    \
3081                               ZCL_PUBLISH_CALORIFIC_VALUE_COMMAND_ID, "uuuuuuuu", issuerEventId, startTime, startTime,             \
3082                               numberOfEvents, calorificValue, tariffType, calorificValueUnit, calorificValueTrailingDigit);
3083
3084 /** @brief Command description for PublishTariffInformation
3085  *
3086  * Command: PublishTariffInformation
3087  * @param providerId INT32U
3088  * @param earliestStartTime UTC_TIME
3089  * @param issuerEventId INT32U
3090  * @param minIssuerEventId INT32U
3091  * @param issuerTariffId INT32U
3092  * @param numberOfCommands INT8U
3093  * @param startTime UTC_TIME
3094  * @param tariffTypeChargingScheme TariffTypeChargingScheme
3095  * @param tariffLabel OCTET_STRING
3096  * @param numberOfPriceTiersInUse INT8U
3097  * @param numberOfBlockThresholdsInUse INT8U
3098  * @param unitOfMeasure AmiUnitOfMeasure
3099  * @param currency INT16U
3100  * @param priceTrailingDigit PriceTrailingDigit
3101  * @param standingCharge INT32U
3102  * @param tierBlockMode TierBlockMode
3103  * @param blockThresholdMultiplier INT24U
3104  * @param blockThresholdDivisor INT24U
3105  */
3106 #define emberAfFillCommandPriceClusterPublishTariffInformation(                                                                    \
3107     providerId, earliestStartTime, issuerEventId, minIssuerEventId, issuerTariffId, numberOfCommands, startTime,                   \
3108     tariffTypeChargingScheme, tariffLabel, numberOfPriceTiersInUse, numberOfBlockThresholdsInUse, unitOfMeasure, currency,         \
3109     priceTrailingDigit, standingCharge, tierBlockMode, blockThresholdMultiplier, blockThresholdDivisor)                            \
3110     emberAfFillExternalBuffer(mask,                                                                                                \
3111                                                                                                                                    \
3112                               ZCL_PUBLISH_TARIFF_INFORMATION_COMMAND_ID, "uuuuuuuuuuuuuuuuuu", providerId, earliestStartTime,      \
3113                               issuerEventId, minIssuerEventId, issuerTariffId, numberOfCommands, startTime,                        \
3114                               tariffTypeChargingScheme, tariffLabel, numberOfPriceTiersInUse, numberOfBlockThresholdsInUse,        \
3115                               unitOfMeasure, currency, priceTrailingDigit, standingCharge, tierBlockMode,                          \
3116                               blockThresholdMultiplier, blockThresholdDivisor);
3117
3118 /** @brief Command description for PublishPriceMatrix
3119  *
3120  * Command: PublishPriceMatrix
3121  * @param providerId INT32U
3122  * @param earliestStartTime UTC_TIME
3123  * @param issuerEventId INT32U
3124  * @param minIssuerEventId INT32U
3125  * @param startTime UTC_TIME
3126  * @param numberOfCommands INT8U
3127  * @param issuerTariffId INT32U
3128  * @param commandIndex INT8U
3129  * @param numberOfCommands INT8U
3130  * @param subPayloadControl PriceMatrixSubPayloadControl
3131  * @param payload PriceMatrixSubPayload []
3132  * @param payloadLen int
3133  */
3134 #define emberAfFillCommandPriceClusterPublishPriceMatrix(providerId, earliestStartTime, issuerEventId, minIssuerEventId,           \
3135                                                          startTime, numberOfCommands, issuerTariffId, commandIndex,                \
3136                                                          numberOfCommands, subPayloadControl, payload, payloadLen)                 \
3137     emberAfFillExternalBuffer(mask,                                                                                                \
3138                                                                                                                                    \
3139                               ZCL_PUBLISH_PRICE_MATRIX_COMMAND_ID, "uuuuuuuuuub", providerId, earliestStartTime, issuerEventId,    \
3140                               minIssuerEventId, startTime, numberOfCommands, issuerTariffId, commandIndex, numberOfCommands,       \
3141                               subPayloadControl, payload, payloadLen);
3142
3143 /** @brief Command description for PublishBlockThresholds
3144  *
3145  * Command: PublishBlockThresholds
3146  * @param providerId INT32U
3147  * @param earliestStartTime UTC_TIME
3148  * @param issuerEventId INT32U
3149  * @param minIssuerEventId INT32U
3150  * @param startTime UTC_TIME
3151  * @param numberOfCommands INT8U
3152  * @param issuerTariffId INT32U
3153  * @param tariffType TariffType
3154  * @param commandIndex INT8U
3155  * @param numberOfCommands INT8U
3156  * @param subPayloadControl BlockThresholdSubPayloadControl
3157  * @param payload BlockThresholdSubPayload []
3158  * @param payloadLen int
3159  */
3160 #define emberAfFillCommandPriceClusterPublishBlockThresholds(                                                                      \
3161     providerId, earliestStartTime, issuerEventId, minIssuerEventId, startTime, numberOfCommands, issuerTariffId, tariffType,       \
3162     commandIndex, numberOfCommands, subPayloadControl, payload, payloadLen)                                                        \
3163     emberAfFillExternalBuffer(mask,                                                                                                \
3164                                                                                                                                    \
3165                               ZCL_PUBLISH_BLOCK_THRESHOLDS_COMMAND_ID, "uuuuuuuuuuub", providerId, earliestStartTime,              \
3166                               issuerEventId, minIssuerEventId, startTime, numberOfCommands, issuerTariffId, tariffType,            \
3167                               commandIndex, numberOfCommands, subPayloadControl, payload, payloadLen);
3168
3169 /** @brief Command description for PublishCO2Value
3170  *
3171  * Command: PublishCO2Value
3172  * @param providerId INT32U
3173  * @param issuerTariffId INT32U
3174  * @param issuerEventId INT32U
3175  * @param startTime UTC_TIME
3176  * @param tariffType TariffType
3177  * @param cO2Value INT32U
3178  * @param cO2ValueUnit CO2Unit
3179  * @param cO2ValueTrailingDigit CO2TrailingDigit
3180  */
3181 #define emberAfFillCommandPriceClusterPublishCO2Value(providerId, issuerTariffId, issuerEventId, startTime, tariffType, cO2Value,  \
3182                                                       cO2ValueUnit, cO2ValueTrailingDigit)                                         \
3183     emberAfFillExternalBuffer(mask,                                                                                                \
3184                                                                                                                                    \
3185                               ZCL_PUBLISH_CO2_VALUE_COMMAND_ID, "uuuuuuuu", providerId, issuerTariffId, issuerEventId, startTime,  \
3186                               tariffType, cO2Value, cO2ValueUnit, cO2ValueTrailingDigit);
3187
3188 /** @brief Command description for PublishTierLabels
3189  *
3190  * Command: PublishTierLabels
3191  * @param providerId INT32U
3192  * @param issuerTariffId INT32U
3193  * @param issuerEventId INT32U
3194  * @param issuerTariffId INT32U
3195  * @param commandIndex INT8U
3196  * @param numberOfCommands INT8U
3197  * @param numberOfLabels INT8U
3198  * @param tierLabelsPayload INT8U []
3199  * @param tierLabelsPayloadLen int
3200  */
3201 #define emberAfFillCommandPriceClusterPublishTierLabels(providerId, issuerTariffId, issuerEventId, issuerTariffId, commandIndex,   \
3202                                                         numberOfCommands, numberOfLabels, tierLabelsPayload, tierLabelsPayloadLen) \
3203     emberAfFillExternalBuffer(mask,                                                                                                \
3204                                                                                                                                    \
3205                               ZCL_PUBLISH_TIER_LABELS_COMMAND_ID, "uuuuuuub", providerId, issuerTariffId, issuerEventId,           \
3206                               issuerTariffId, commandIndex, numberOfCommands, numberOfLabels, tierLabelsPayload,                   \
3207                               tierLabelsPayloadLen);
3208
3209 /** @brief Command description for PublishBillingPeriod
3210  *
3211  * Command: PublishBillingPeriod
3212  * @param providerId INT32U
3213  * @param earliestStartTime UTC_TIME
3214  * @param issuerEventId INT32U
3215  * @param minIssuerEventId INT32U
3216  * @param billingPeriodStartTime UTC_TIME
3217  * @param numberOfCommands INT8U
3218  * @param billingPeriodDuration BillingPeriodDuration
3219  * @param tariffType TariffType
3220  * @param billingPeriodDurationType BillingPeriodDurationType
3221  * @param tariffType TariffType
3222  */
3223 #define emberAfFillCommandPriceClusterPublishBillingPeriod(providerId, earliestStartTime, issuerEventId, minIssuerEventId,         \
3224                                                            billingPeriodStartTime, numberOfCommands, billingPeriodDuration,        \
3225                                                            tariffType, billingPeriodDurationType, tariffType)                      \
3226     emberAfFillExternalBuffer(mask,                                                                                                \
3227                                                                                                                                    \
3228                               ZCL_PUBLISH_BILLING_PERIOD_COMMAND_ID, "uuuuuuuuuu", providerId, earliestStartTime, issuerEventId,   \
3229                               minIssuerEventId, billingPeriodStartTime, numberOfCommands, billingPeriodDuration, tariffType,       \
3230                               billingPeriodDurationType, tariffType);
3231
3232 /** @brief Command description for PublishConsolidatedBill
3233  *
3234  * Command: PublishConsolidatedBill
3235  * @param providerId INT32U
3236  * @param issuerTariffId INT32U
3237  * @param issuerEventId INT32U
3238  * @param billingPeriodStartTime UTC_TIME
3239  * @param billingPeriodDuration BillingPeriodDuration
3240  * @param billingPeriodDurationType BillingPeriodDurationType
3241  * @param tariffType TariffType
3242  * @param consolidatedBill INT32U
3243  * @param currency INT16U
3244  * @param billTrailingDigit BillTrailingDigit
3245  */
3246 #define emberAfFillCommandPriceClusterPublishConsolidatedBill(providerId, issuerTariffId, issuerEventId, billingPeriodStartTime,   \
3247                                                               billingPeriodDuration, billingPeriodDurationType, tariffType,        \
3248                                                               consolidatedBill, currency, billTrailingDigit)                       \
3249     emberAfFillExternalBuffer(mask,                                                                                                \
3250                                                                                                                                    \
3251                               ZCL_PUBLISH_CONSOLIDATED_BILL_COMMAND_ID, "uuuuuuuuuu", providerId, issuerTariffId, issuerEventId,   \
3252                               billingPeriodStartTime, billingPeriodDuration, billingPeriodDurationType, tariffType,                \
3253                               consolidatedBill, currency, billTrailingDigit);
3254
3255 /** @brief Command description for PublishCppEvent
3256  *
3257  * Command: PublishCppEvent
3258  * @param providerId INT32U
3259  * @param earliestStartTime UTC_TIME
3260  * @param issuerEventId INT32U
3261  * @param minIssuerEventId INT32U
3262  * @param startTime UTC_TIME
3263  * @param numberOfCommands INT8U
3264  * @param durationInMinutes INT16U
3265  * @param tariffType TariffType
3266  * @param tariffType TariffType
3267  * @param cppPriceTier CppPriceTier
3268  * @param cppAuth PublishCppEventCppAuth
3269  */
3270 #define emberAfFillCommandPriceClusterPublishCppEvent(providerId, earliestStartTime, issuerEventId, minIssuerEventId, startTime,   \
3271                                                       numberOfCommands, durationInMinutes, tariffType, tariffType, cppPriceTier,   \
3272                                                       cppAuth)                                                                     \
3273     emberAfFillExternalBuffer(mask,                                                                                                \
3274                                                                                                                                    \
3275                               ZCL_PUBLISH_CPP_EVENT_COMMAND_ID, "uuuuuuuuuuu", providerId, earliestStartTime, issuerEventId,       \
3276                               minIssuerEventId, startTime, numberOfCommands, durationInMinutes, tariffType, tariffType,            \
3277                               cppPriceTier, cppAuth);
3278
3279 /** @brief Command description for PublishCreditPayment
3280  *
3281  * Command: PublishCreditPayment
3282  * @param providerId INT32U
3283  * @param earliestStartTime UTC_TIME
3284  * @param issuerEventId INT32U
3285  * @param minIssuerEventId INT32U
3286  * @param creditPaymentDueDate UTC_TIME
3287  * @param numberOfCommands INT8U
3288  * @param creditPaymentOverDueAmount INT32U
3289  * @param tariffType TariffType
3290  * @param creditPaymentStatus CreditPaymentStatus
3291  * @param creditPayment INT32U
3292  * @param creditPaymentDate UTC_TIME
3293  * @param creditPaymentRef OCTET_STRING
3294  */
3295 #define emberAfFillCommandPriceClusterPublishCreditPayment(                                                                        \
3296     providerId, earliestStartTime, issuerEventId, minIssuerEventId, creditPaymentDueDate, numberOfCommands,                        \
3297     creditPaymentOverDueAmount, tariffType, creditPaymentStatus, creditPayment, creditPaymentDate, creditPaymentRef)               \
3298     emberAfFillExternalBuffer(mask,                                                                                                \
3299                                                                                                                                    \
3300                               ZCL_PUBLISH_CREDIT_PAYMENT_COMMAND_ID, "uuuuuuuuuuuu", providerId, earliestStartTime, issuerEventId, \
3301                               minIssuerEventId, creditPaymentDueDate, numberOfCommands, creditPaymentOverDueAmount, tariffType,    \
3302                               creditPaymentStatus, creditPayment, creditPaymentDate, creditPaymentRef);
3303
3304 /** @brief Command description for PublishCurrencyConversion
3305  *
3306  * Command: PublishCurrencyConversion
3307  * @param providerId INT32U
3308  * @param issuerEventId INT32U
3309  * @param issuerEventId INT32U
3310  * @param cppAuth CppEventResponseCppAuth
3311  * @param startTime UTC_TIME
3312  * @param oldCurrency INT16U
3313  * @param newCurrency INT16U
3314  * @param conversionFactor INT32U
3315  * @param conversionFactorTrailingDigit ConversionFactorTrailingDigit
3316  * @param currencyChangeControlFlags CurrencyChangeControl
3317  */
3318 #define emberAfFillCommandPriceClusterPublishCurrencyConversion(providerId, issuerEventId, issuerEventId, cppAuth, startTime,      \
3319                                                                 oldCurrency, newCurrency, conversionFactor,                        \
3320                                                                 conversionFactorTrailingDigit, currencyChangeControlFlags)         \
3321     emberAfFillExternalBuffer(mask,                                                                                                \
3322                                                                                                                                    \
3323                               ZCL_PUBLISH_CURRENCY_CONVERSION_COMMAND_ID, "uuuuuuuuuu", providerId, issuerEventId, issuerEventId,  \
3324                               cppAuth, startTime, oldCurrency, newCurrency, conversionFactor, conversionFactorTrailingDigit,       \
3325                               currencyChangeControlFlags);
3326
3327 /** @brief Command description for CancelTariff
3328  *
3329  * Command: CancelTariff
3330  * @param providerId INT32U
3331  * @param latestEndTime UTC_TIME
3332  * @param issuerTariffId INT32U
3333  * @param numberOfRecords INT8U
3334  * @param tariffType TariffType
3335  */
3336 #define emberAfFillCommandPriceClusterCancelTariff(providerId, latestEndTime, issuerTariffId, numberOfRecords, tariffType)         \
3337     emberAfFillExternalBuffer(mask,                                                                                                \
3338                                                                                                                                    \
3339                               ZCL_CANCEL_TARIFF_COMMAND_ID, "uuuuu", providerId, latestEndTime, issuerTariffId, numberOfRecords,   \
3340                               tariffType);
3341
3342 /** @brief Command description for GetCurrencyConversionCommand
3343  *
3344  * Command: GetCurrencyConversionCommand
3345  */
3346 #define emberAfFillCommandPriceClusterGetCurrencyConversionCommand()                                                               \
3347     emberAfFillExternalBuffer(mask,                                                                                                \
3348                                                                                                                                    \
3349                               ZCL_GET_CURRENCY_CONVERSION_COMMAND_COMMAND_ID, "", );
3350
3351 /** @brief Command description for GetTariffCancellation
3352  *
3353  * Command: GetTariffCancellation
3354  */
3355 #define emberAfFillCommandPriceClusterGetTariffCancellation()                                                                      \
3356     emberAfFillExternalBuffer(mask,                                                                                                \
3357                                                                                                                                    \
3358                               ZCL_GET_TARIFF_CANCELLATION_COMMAND_ID, "", );
3359
3360 /** @brief Command description for LoadControlEvent
3361  *
3362  * Command: LoadControlEvent
3363  * @param issuerEventId INT32U
3364  * @param issuerEventId INT32U
3365  * @param deviceClass AmiDeviceClass
3366  * @param eventStatus AmiEventStatus
3367  * @param utilityEnrollmentGroup INT8U
3368  * @param eventStatusTime UTC_TIME
3369  * @param startTime UTC_TIME
3370  * @param criticalityLevelApplied AmiCriticalityLevel
3371  * @param durationInMinutes INT16U
3372  * @param coolingTemperatureSetPointApplied INT16U
3373  * @param criticalityLevel AmiCriticalityLevel
3374  * @param heatingTemperatureSetPointApplied INT16U
3375  * @param coolingTemperatureOffset INT8U
3376  * @param averageLoadAdjustmentPercentageApplied INT8S
3377  * @param heatingTemperatureOffset INT8U
3378  * @param dutyCycleApplied INT8U
3379  * @param coolingTemperatureSetPoint INT16S
3380  * @param eventControl AmiEventControl
3381  * @param heatingTemperatureSetPoint INT16S
3382  * @param signatureType SignatureType
3383  * @param averageLoadAdjustmentPercentage INT8S
3384  * @param signature Signature
3385  * @param dutyCycle INT8U
3386  * @param eventControl AmiEventControl
3387  */
3388 #define emberAfFillCommandDemand                                                                                                   \
3389     Response and Load ControlClusterLoadControlEvent(                                                                              \
3390         issuerEventId, issuerEventId, deviceClass, eventStatus, utilityEnrollmentGroup, eventStatusTime, startTime,                \
3391         criticalityLevelApplied, durationInMinutes, coolingTemperatureSetPointApplied, criticalityLevel,                           \
3392         heatingTemperatureSetPointApplied, coolingTemperatureOffset, averageLoadAdjustmentPercentageApplied,                       \
3393         heatingTemperatureOffset, dutyCycleApplied, coolingTemperatureSetPoint, eventControl, heatingTemperatureSetPoint,          \
3394         signatureType, averageLoadAdjustmentPercentage, signature, dutyCycle, eventControl)                                        \
3395         emberAfFillExternalBuffer(mask,                                                                                            \
3396                                                                                                                                    \
3397                                   ZCL_LOAD_CONTROL_EVENT_COMMAND_ID, "uuuuuuuuuuuuuuuuuuuuuuuu", issuerEventId, issuerEventId,     \
3398                                   deviceClass, eventStatus, utilityEnrollmentGroup, eventStatusTime, startTime,                    \
3399                                   criticalityLevelApplied, durationInMinutes, coolingTemperatureSetPointApplied, criticalityLevel, \
3400                                   heatingTemperatureSetPointApplied, coolingTemperatureOffset,                                     \
3401                                   averageLoadAdjustmentPercentageApplied, heatingTemperatureOffset, dutyCycleApplied,              \
3402                                   coolingTemperatureSetPoint, eventControl, heatingTemperatureSetPoint, signatureType,             \
3403                                   averageLoadAdjustmentPercentage, signature, dutyCycle, eventControl);
3404
3405 /** @brief Command description for CancelLoadControlEvent
3406  *
3407  * Command: CancelLoadControlEvent
3408  * @param issuerEventId INT32U
3409  * @param startTime UTC_TIME
3410  * @param deviceClass AmiDeviceClass
3411  * @param numberOfEvents INT8U
3412  * @param utilityEnrollmentGroup INT8U
3413  * @param issuerEventId INT32U
3414  * @param cancelControl AmiCancelControl
3415  * @param effectiveTime UTC_TIME
3416  */
3417 #define emberAfFillCommandDemand                                                                                                   \
3418     Response and Load ControlClusterCancelLoadControlEvent(issuerEventId, startTime, deviceClass, numberOfEvents,                  \
3419                                                            utilityEnrollmentGroup, issuerEventId, cancelControl, effectiveTime)    \
3420         emberAfFillExternalBuffer(mask,                                                                                            \
3421                                                                                                                                    \
3422                                   ZCL_CANCEL_LOAD_CONTROL_EVENT_COMMAND_ID, "uuuuuuuu", issuerEventId, startTime, deviceClass,     \
3423                                   numberOfEvents, utilityEnrollmentGroup, issuerEventId, cancelControl, effectiveTime);
3424
3425 /** @brief Command description for CancelAllLoadControlEvents
3426  *
3427  * Command: CancelAllLoadControlEvents
3428  * @param cancelControl AmiCancelControl
3429  */
3430 #define emberAfFillCommandDemand                                                                                                   \
3431     Response and Load ControlClusterCancelAllLoadControlEvents(cancelControl)                                                      \
3432         emberAfFillExternalBuffer(mask,                                                                                            \
3433                                                                                                                                    \
3434                                   ZCL_CANCEL_ALL_LOAD_CONTROL_EVENTS_COMMAND_ID, "u", cancelControl);
3435
3436 /** @brief Command description for GetProfileResponse
3437  *
3438  * Command: GetProfileResponse
3439  * @param endTime UTC_TIME
3440  * @param intervalChannel AmiIntervalChannel
3441  * @param status AmiGetProfileStatus
3442  * @param endTime UTC_TIME
3443  * @param profileIntervalPeriod AmiIntervalPeriod
3444  * @param numberOfPeriods INT8U
3445  * @param numberOfPeriodsDelivered INT8U
3446  * @param intervals INT24U []
3447  * @param intervalsLen int
3448  */
3449 #define emberAfFillCommandSimple                                                                                                   \
3450     MeteringClusterGetProfileResponse(endTime, intervalChannel, status, endTime, profileIntervalPeriod, numberOfPeriods,           \
3451                                       numberOfPeriodsDelivered, intervals, intervalsLen)                                           \
3452         emberAfFillExternalBuffer(mask,                                                                                            \
3453                                                                                                                                    \
3454                                   ZCL_GET_PROFILE_RESPONSE_COMMAND_ID, "uuuuuuub", endTime, intervalChannel, status, endTime,      \
3455                                   profileIntervalPeriod, numberOfPeriods, numberOfPeriodsDelivered, intervals, intervalsLen);
3456
3457 /** @brief Command description for RequestMirror
3458  *
3459  * Command: RequestMirror
3460  * @param endpointId INT16U
3461  */
3462 #define emberAfFillCommandSimple                                                                                                   \
3463     MeteringClusterRequestMirror(endpointId) emberAfFillExternalBuffer(mask,                                                       \
3464                                                                                                                                    \
3465                                                                        ZCL_REQUEST_MIRROR_COMMAND_ID, "u", endpointId);
3466
3467 /** @brief Command description for RemoveMirror
3468  *
3469  * Command: RemoveMirror
3470  * @param endpointId INT16U
3471  */
3472 #define emberAfFillCommandSimple                                                                                                   \
3473     MeteringClusterRemoveMirror(endpointId) emberAfFillExternalBuffer(mask,                                                        \
3474                                                                                                                                    \
3475                                                                       ZCL_REMOVE_MIRROR_COMMAND_ID, "u", endpointId);
3476
3477 /** @brief Command description for RequestFastPollModeResponse
3478  *
3479  * Command: RequestFastPollModeResponse
3480  * @param appliedUpdatePeriod INT8U
3481  * @param fastPollUpdatePeriod INT8U
3482  * @param fastPollModeEndtime UTC_TIME
3483  * @param duration INT8U
3484  */
3485 #define emberAfFillCommandSimple                                                                                                   \
3486     MeteringClusterRequestFastPollModeResponse(appliedUpdatePeriod, fastPollUpdatePeriod, fastPollModeEndtime, duration)           \
3487         emberAfFillExternalBuffer(mask,                                                                                            \
3488                                                                                                                                    \
3489                                   ZCL_REQUEST_FAST_POLL_MODE_RESPONSE_COMMAND_ID, "uuuu", appliedUpdatePeriod,                     \
3490                                   fastPollUpdatePeriod, fastPollModeEndtime, duration);
3491
3492 /** @brief Command description for ScheduleSnapshotResponse
3493  *
3494  * Command: ScheduleSnapshotResponse
3495  * @param issuerEventId INT32U
3496  * @param issuerEventId INT32U
3497  * @param snapshotResponsePayload SnapshotResponsePayload []
3498  * @param snapshotResponsePayloadLen int
3499  * @param commandIndex INT8U
3500  * @param commandCount INT8U
3501  * @param snapshotSchedulePayload SnapshotSchedulePayload []
3502  * @param snapshotSchedulePayloadLen int
3503  */
3504 #define emberAfFillCommandSimple                                                                                                   \
3505     MeteringClusterScheduleSnapshotResponse(issuerEventId, issuerEventId, snapshotResponsePayload, snapshotResponsePayloadLen,     \
3506                                             commandIndex, commandCount, snapshotSchedulePayload, snapshotSchedulePayloadLen)       \
3507         emberAfFillExternalBuffer(mask,                                                                                            \
3508                                                                                                                                    \
3509                                   ZCL_SCHEDULE_SNAPSHOT_RESPONSE_COMMAND_ID, "uubuub", issuerEventId, issuerEventId,               \
3510                                   snapshotResponsePayload, snapshotResponsePayloadLen, commandIndex, commandCount,                 \
3511                                   snapshotSchedulePayload, snapshotSchedulePayloadLen);
3512
3513 /** @brief Command description for TakeSnapshotResponse
3514  *
3515  * Command: TakeSnapshotResponse
3516  * @param snapshotId INT32U
3517  * @param snapshotCause SnapshotCause
3518  * @param snapshotConfirmation SnapshotConfirmation
3519  */
3520 #define emberAfFillCommandSimple                                                                                                   \
3521     MeteringClusterTakeSnapshotResponse(snapshotId, snapshotCause, snapshotConfirmation)                                           \
3522         emberAfFillExternalBuffer(mask,                                                                                            \
3523                                                                                                                                    \
3524                                   ZCL_TAKE_SNAPSHOT_RESPONSE_COMMAND_ID, "uuu", snapshotId, snapshotCause, snapshotConfirmation);
3525
3526 /** @brief Command description for PublishSnapshot
3527  *
3528  * Command: PublishSnapshot
3529  * @param snapshotId INT32U
3530  * @param earliestStartTime UTC_TIME
3531  * @param snapshotTime UTC_TIME
3532  * @param latestEndTime UTC_TIME
3533  * @param totalSnapshotsFound INT8U
3534  * @param snapshotOffset INT8U
3535  * @param commandIndex INT8U
3536  * @param snapshotCause SnapshotCause
3537  * @param totalCommands INT8U
3538  * @param snapshotCause SnapshotCause
3539  * @param snapshotPayloadType SnapshotPayloadType
3540  * @param snapshotPayload INT8U []
3541  * @param snapshotPayloadLen int
3542  */
3543 #define emberAfFillCommandSimple                                                                                                   \
3544     MeteringClusterPublishSnapshot(snapshotId, earliestStartTime, snapshotTime, latestEndTime, totalSnapshotsFound,                \
3545                                    snapshotOffset, commandIndex, snapshotCause, totalCommands, snapshotCause, snapshotPayloadType, \
3546                                    snapshotPayload, snapshotPayloadLen)                                                            \
3547         emberAfFillExternalBuffer(mask,                                                                                            \
3548                                                                                                                                    \
3549                                   ZCL_PUBLISH_SNAPSHOT_COMMAND_ID, "uuuuuuuuuuub", snapshotId, earliestStartTime, snapshotTime,    \
3550                                   latestEndTime, totalSnapshotsFound, snapshotOffset, commandIndex, snapshotCause, totalCommands,  \
3551                                   snapshotCause, snapshotPayloadType, snapshotPayload, snapshotPayloadLen);
3552
3553 /** @brief Command description for GetSampledDataResponse
3554  *
3555  * Command: GetSampledDataResponse
3556  * @param sampleId INT16U
3557  * @param issuerEventId INT32U
3558  * @param sampleStartTime UTC_TIME
3559  * @param startSamplingTime UTC_TIME
3560  * @param sampleType SampleType
3561  * @param sampleType SampleType
3562  * @param sampleRequestInterval INT16U
3563  * @param sampleRequestInterval INT16U
3564  * @param numberOfSamples INT16U
3565  * @param maxNumberOfSamples INT16U
3566  * @param samples INT24U []
3567  * @param samplesLen int
3568  */
3569 #define emberAfFillCommandSimple                                                                                                   \
3570     MeteringClusterGetSampledDataResponse(sampleId, issuerEventId, sampleStartTime, startSamplingTime, sampleType, sampleType,     \
3571                                           sampleRequestInterval, sampleRequestInterval, numberOfSamples, maxNumberOfSamples,       \
3572                                           samples, samplesLen)                                                                     \
3573         emberAfFillExternalBuffer(mask,                                                                                            \
3574                                                                                                                                    \
3575                                   ZCL_GET_SAMPLED_DATA_RESPONSE_COMMAND_ID, "uuuuuuuuuub", sampleId, issuerEventId,                \
3576                                   sampleStartTime, startSamplingTime, sampleType, sampleType, sampleRequestInterval,               \
3577                                   sampleRequestInterval, numberOfSamples, maxNumberOfSamples, samples, samplesLen);
3578
3579 /** @brief Command description for ConfigureMirror
3580  *
3581  * Command: ConfigureMirror
3582  * @param issuerEventId INT32U
3583  * @param sampleId INT16U
3584  * @param reportingInterval INT24U
3585  * @param earliestSampleTime UTC_TIME
3586  * @param mirrorNotificationReporting BOOLEAN
3587  * @param sampleType SampleType
3588  * @param notificationScheme INT8U
3589  * @param numberOfSamples INT16U
3590  */
3591 #define emberAfFillCommandSimple                                                                                                   \
3592     MeteringClusterConfigureMirror(issuerEventId, sampleId, reportingInterval, earliestSampleTime, mirrorNotificationReporting,    \
3593                                    sampleType, notificationScheme, numberOfSamples)                                                \
3594         emberAfFillExternalBuffer(mask,                                                                                            \
3595                                                                                                                                    \
3596                                   ZCL_CONFIGURE_MIRROR_COMMAND_ID, "uuuuuuuu", issuerEventId, sampleId, reportingInterval,         \
3597                                   earliestSampleTime, mirrorNotificationReporting, sampleType, notificationScheme,                 \
3598                                   numberOfSamples);
3599
3600 /** @brief Command description for ConfigureNotificationScheme
3601  *
3602  * Command: ConfigureNotificationScheme
3603  * @param issuerEventId INT32U
3604  * @param notificationScheme INT8U
3605  * @param notificationScheme INT8U
3606  * @param notificationFlags BITMAP32 []
3607  * @param notificationFlagsLen int
3608  * @param notificationFlagOrder BITMAP32
3609  */
3610 #define emberAfFillCommandSimple                                                                                                   \
3611     MeteringClusterConfigureNotificationScheme(issuerEventId, notificationScheme, notificationScheme, notificationFlags,           \
3612                                                notificationFlagsLen, notificationFlagOrder)                                        \
3613         emberAfFillExternalBuffer(mask,                                                                                            \
3614                                                                                                                                    \
3615                                   ZCL_CONFIGURE_NOTIFICATION_SCHEME_COMMAND_ID, "uuubu", issuerEventId, notificationScheme,        \
3616                                   notificationScheme, notificationFlags, notificationFlagsLen, notificationFlagOrder);
3617
3618 /** @brief Command description for ConfigureNotificationFlags
3619  *
3620  * Command: ConfigureNotificationFlags
3621  * @param issuerEventId INT32U
3622  * @param providerId INT32U
3623  * @param notificationScheme INT8U
3624  * @param issuerEventId INT32U
3625  * @param notificationFlagAttributeId INT16U
3626  * @param clusterId INT16U
3627  * @param manufacturerCode INT16U
3628  * @param numberOfCommands INT8U
3629  * @param commandIds INT8U []
3630  * @param commandIdsLen int
3631  */
3632 #define emberAfFillCommandSimple                                                                                                   \
3633     MeteringClusterConfigureNotificationFlags(issuerEventId, providerId, notificationScheme, issuerEventId,                        \
3634                                               notificationFlagAttributeId, clusterId, manufacturerCode, numberOfCommands,          \
3635                                               commandIds, commandIdsLen)                                                           \
3636         emberAfFillExternalBuffer(mask,                                                                                            \
3637                                                                                                                                    \
3638                                   ZCL_CONFIGURE_NOTIFICATION_FLAGS_COMMAND_ID, "uuuuuuuub", issuerEventId, providerId,             \
3639                                   notificationScheme, issuerEventId, notificationFlagAttributeId, clusterId, manufacturerCode,     \
3640                                   numberOfCommands, commandIds, commandIdsLen);
3641
3642 /** @brief Command description for GetNotifiedMessage
3643  *
3644  * Command: GetNotifiedMessage
3645  * @param notificationScheme INT8U
3646  * @param providerId INT32U
3647  * @param notificationFlagAttributeId INT16U
3648  * @param issuerEventId INT32U
3649  * @param notificationFlagsN BITMAP32
3650  * @param requestDateTime UTC_TIME
3651  * @param implementationDateTime UTC_TIME
3652  * @param proposedSupplyStatus MeteringSupplyStatus
3653  * @param supplyControlBits SupplyControlBits
3654  */
3655 #define emberAfFillCommandSimple                                                                                                   \
3656     MeteringClusterGetNotifiedMessage(notificationScheme, providerId, notificationFlagAttributeId, issuerEventId,                  \
3657                                       notificationFlagsN, requestDateTime, implementationDateTime, proposedSupplyStatus,           \
3658                                       supplyControlBits)                                                                           \
3659         emberAfFillExternalBuffer(mask,                                                                                            \
3660                                                                                                                                    \
3661                                   ZCL_GET_NOTIFIED_MESSAGE_COMMAND_ID, "uuuuuuuuu", notificationScheme, providerId,                \
3662                                   notificationFlagAttributeId, issuerEventId, notificationFlagsN, requestDateTime,                 \
3663                                   implementationDateTime, proposedSupplyStatus, supplyControlBits);
3664
3665 /** @brief Command description for SupplyStatusResponse
3666  *
3667  * Command: SupplyStatusResponse
3668  * @param providerId INT32U
3669  * @param proposedSupplyStatus ProposedSupplyStatus
3670  * @param issuerEventId INT32U
3671  * @param implementationDateTime UTC_TIME
3672  * @param supplyStatus MeteringSupplyStatus
3673  */
3674 #define emberAfFillCommandSimple                                                                                                   \
3675     MeteringClusterSupplyStatusResponse(providerId, proposedSupplyStatus, issuerEventId, implementationDateTime, supplyStatus)     \
3676         emberAfFillExternalBuffer(mask,                                                                                            \
3677                                                                                                                                    \
3678                                   ZCL_SUPPLY_STATUS_RESPONSE_COMMAND_ID, "uuuuu", providerId, proposedSupplyStatus, issuerEventId, \
3679                                   implementationDateTime, supplyStatus);
3680
3681 /** @brief Command description for StartSamplingResponse
3682  *
3683  * Command: StartSamplingResponse
3684  * @param sampleId INT16U
3685  * @param issuerEventId INT32U
3686  * @param supplyTamperState SupplyStatus
3687  * @param supplyDepletionState SupplyStatus
3688  * @param supplyUncontrolledFlowState SupplyStatus
3689  * @param loadLimitSupplyState SupplyStatus
3690  */
3691 #define emberAfFillCommandSimple                                                                                                   \
3692     MeteringClusterStartSamplingResponse(sampleId, issuerEventId, supplyTamperState, supplyDepletionState,                         \
3693                                          supplyUncontrolledFlowState, loadLimitSupplyState)                                        \
3694         emberAfFillExternalBuffer(mask,                                                                                            \
3695                                                                                                                                    \
3696                                   ZCL_START_SAMPLING_RESPONSE_COMMAND_ID, "uuuuuu", sampleId, issuerEventId, supplyTamperState,    \
3697                                   supplyDepletionState, supplyUncontrolledFlowState, loadLimitSupplyState);
3698
3699 /** @brief Command description for SetUncontrolledFlowThreshold
3700  *
3701  * Command: SetUncontrolledFlowThreshold
3702  * @param providerId INT32U
3703  * @param issuerEventId INT32U
3704  * @param uncontrolledFlowThreshold INT16U
3705  * @param unitOfMeasure AmiUnitOfMeasure
3706  * @param multiplier INT16U
3707  * @param divisor INT16U
3708  * @param stabilisationPeriod INT8U
3709  * @param measurementPeriod INT16U
3710  */
3711 #define emberAfFillCommandSimple                                                                                                   \
3712     MeteringClusterSetUncontrolledFlowThreshold(providerId, issuerEventId, uncontrolledFlowThreshold, unitOfMeasure, multiplier,   \
3713                                                 divisor, stabilisationPeriod, measurementPeriod)                                   \
3714         emberAfFillExternalBuffer(mask,                                                                                            \
3715                                                                                                                                    \
3716                                   ZCL_SET_UNCONTROLLED_FLOW_THRESHOLD_COMMAND_ID, "uuuuuuuu", providerId, issuerEventId,           \
3717                                   uncontrolledFlowThreshold, unitOfMeasure, multiplier, divisor, stabilisationPeriod,              \
3718                                   measurementPeriod);
3719
3720 /** @brief Command description for GetLastMessage
3721  *
3722  * Command: GetLastMessage
3723  * @param messageId INT32U
3724  * @param messageControl MessagingControlMask
3725  * @param startTime UTC_TIME
3726  * @param durationInMinutes INT16U
3727  * @param message CHAR_STRING
3728  * @param optionalExtendedMessageControl MessagingExtendedControlMask
3729  */
3730 #define emberAfFillCommandMessagingClusterGetLastMessage(messageId, messageControl, startTime, durationInMinutes, message,         \
3731                                                          optionalExtendedMessageControl)                                           \
3732     emberAfFillExternalBuffer(mask,                                                                                                \
3733                                                                                                                                    \
3734                               ZCL_GET_LAST_MESSAGE_COMMAND_ID, "uuuuuu", messageId, messageControl, startTime, durationInMinutes,  \
3735                               message, optionalExtendedMessageControl);
3736
3737 /** @brief Command description for CancelMessage
3738  *
3739  * Command: CancelMessage
3740  * @param messageId INT32U
3741  * @param messageId INT32U
3742  * @param messageControl MessagingControlMask
3743  * @param confirmationTime UTC_TIME
3744  * @param messageConfirmationControl BITMAP8
3745  * @param messageResponse OCTET_STRING
3746  */
3747 #define emberAfFillCommandMessagingClusterCancelMessage(messageId, messageId, messageControl, confirmationTime,                    \
3748                                                         messageConfirmationControl, messageResponse)                               \
3749     emberAfFillExternalBuffer(mask,                                                                                                \
3750                                                                                                                                    \
3751                               ZCL_CANCEL_MESSAGE_COMMAND_ID, "uuuuuu", messageId, messageId, messageControl, confirmationTime,     \
3752                               messageConfirmationControl, messageResponse);
3753
3754 /** @brief Command description for DisplayProtectedMessage
3755  *
3756  * Command: DisplayProtectedMessage
3757  * @param messageId INT32U
3758  * @param earliestImplementationTime UTC_TIME
3759  * @param messageControl MessagingControlMask
3760  * @param startTime UTC_TIME
3761  * @param durationInMinutes INT16U
3762  * @param message CHAR_STRING
3763  * @param optionalExtendedMessageControl MessagingExtendedControlMask
3764  */
3765 #define emberAfFillCommandMessagingClusterDisplayProtectedMessage(                                                                 \
3766     messageId, earliestImplementationTime, messageControl, startTime, durationInMinutes, message, optionalExtendedMessageControl)  \
3767     emberAfFillExternalBuffer(mask,                                                                                                \
3768                                                                                                                                    \
3769                               ZCL_DISPLAY_PROTECTED_MESSAGE_COMMAND_ID, "uuuuuuu", messageId, earliestImplementationTime,          \
3770                               messageControl, startTime, durationInMinutes, message, optionalExtendedMessageControl);
3771
3772 /** @brief Command description for CancelAllMessages
3773  *
3774  * Command: CancelAllMessages
3775  * @param implementationDateTime UTC_TIME
3776  */
3777 #define emberAfFillCommandMessagingClusterCancelAllMessages(implementationDateTime)                                                \
3778     emberAfFillExternalBuffer(mask,                                                                                                \
3779                                                                                                                                    \
3780                               ZCL_CANCEL_ALL_MESSAGES_COMMAND_ID, "u", implementationDateTime);
3781
3782 /** @brief Command description for RequestTunnel
3783  *
3784  * Command: RequestTunnel
3785  * @param protocolId INT8U
3786  * @param tunnelId INT16U
3787  * @param manufacturerCode INT16U
3788  * @param tunnelStatus TunnelingTunnelStatus
3789  * @param flowControlSupport BOOLEAN
3790  * @param maximumIncomingTransferSize INT16U
3791  * @param maximumIncomingTransferSize INT16U
3792  */
3793 #define emberAfFillCommandTunnelingClusterRequestTunnel(protocolId, tunnelId, manufacturerCode, tunnelStatus, flowControlSupport,  \
3794                                                         maximumIncomingTransferSize, maximumIncomingTransferSize)                  \
3795     emberAfFillExternalBuffer(mask,                                                                                                \
3796                                                                                                                                    \
3797                               ZCL_REQUEST_TUNNEL_COMMAND_ID, "uuuuuuu", protocolId, tunnelId, manufacturerCode, tunnelStatus,      \
3798                               flowControlSupport, maximumIncomingTransferSize, maximumIncomingTransferSize);
3799
3800 /** @brief Command description for CloseTunnel
3801  *
3802  * Command: CloseTunnel
3803  * @param tunnelId INT16U
3804  * @param tunnelId INT16U
3805  * @param data INT8U []
3806  * @param dataLen int
3807  */
3808 #define emberAfFillCommandTunnelingClusterCloseTunnel(tunnelId, tunnelId, data, dataLen)                                           \
3809     emberAfFillExternalBuffer(mask,                                                                                                \
3810                                                                                                                                    \
3811                               ZCL_CLOSE_TUNNEL_COMMAND_ID, "uub", tunnelId, tunnelId, data, dataLen);
3812
3813 /** @brief Command description for TransferDataClientToServer
3814  *
3815  * Command: TransferDataClientToServer
3816  * @param tunnelId INT16U
3817  * @param tunnelId INT16U
3818  * @param data INT8U []
3819  * @param dataLen int
3820  * @param transferDataStatus TunnelingTransferDataStatus
3821  */
3822 #define emberAfFillCommandTunnelingClusterTransferDataClientToServer(tunnelId, tunnelId, data, dataLen, transferDataStatus)        \
3823     emberAfFillExternalBuffer(mask,                                                                                                \
3824                                                                                                                                    \
3825                               ZCL_TRANSFER_DATA_CLIENT_TO_SERVER_COMMAND_ID, "uubu", tunnelId, tunnelId, data, dataLen,            \
3826                               transferDataStatus);
3827
3828 /** @brief Command description for TransferDataErrorClientToServer
3829  *
3830  * Command: TransferDataErrorClientToServer
3831  * @param tunnelId INT16U
3832  * @param tunnelId INT16U
3833  * @param transferDataStatus TunnelingTransferDataStatus
3834  * @param numberOfBytesLeft INT16U
3835  */
3836 #define emberAfFillCommandTunnelingClusterTransferDataErrorClientToServer(tunnelId, tunnelId, transferDataStatus,                  \
3837                                                                           numberOfBytesLeft)                                       \
3838     emberAfFillExternalBuffer(mask,                                                                                                \
3839                                                                                                                                    \
3840                               ZCL_TRANSFER_DATA_ERROR_CLIENT_TO_SERVER_COMMAND_ID, "uuuu", tunnelId, tunnelId, transferDataStatus, \
3841                               numberOfBytesLeft);
3842
3843 /** @brief Command description for AckTransferDataClientToServer
3844  *
3845  * Command: AckTransferDataClientToServer
3846  * @param tunnelId INT16U
3847  * @param tunnelId INT16U
3848  * @param numberOfBytesLeft INT16U
3849  * @param numberOfOctetsLeft INT16U
3850  */
3851 #define emberAfFillCommandTunnelingClusterAckTransferDataClientToServer(tunnelId, tunnelId, numberOfBytesLeft, numberOfOctetsLeft) \
3852     emberAfFillExternalBuffer(mask,                                                                                                \
3853                                                                                                                                    \
3854                               ZCL_ACK_TRANSFER_DATA_CLIENT_TO_SERVER_COMMAND_ID, "uuuu", tunnelId, tunnelId, numberOfBytesLeft,    \
3855                               numberOfOctetsLeft);
3856
3857 /** @brief Command description for ReadyDataClientToServer
3858  *
3859  * Command: ReadyDataClientToServer
3860  * @param tunnelId INT16U
3861  * @param protocolListComplete BOOLEAN
3862  * @param numberOfOctetsLeft INT16U
3863  * @param protocolCount INT8U
3864  * @param protocolList Protocol []
3865  * @param protocolListLen int
3866  */
3867 #define emberAfFillCommandTunnelingClusterReadyDataClientToServer(tunnelId, protocolListComplete, numberOfOctetsLeft,              \
3868                                                                   protocolCount, protocolList, protocolListLen)                    \
3869     emberAfFillExternalBuffer(mask,                                                                                                \
3870                                                                                                                                    \
3871                               ZCL_READY_DATA_CLIENT_TO_SERVER_COMMAND_ID, "uuuub", tunnelId, protocolListComplete,                 \
3872                               numberOfOctetsLeft, protocolCount, protocolList, protocolListLen);
3873
3874 /** @brief Command description for GetSupportedTunnelProtocols
3875  *
3876  * Command: GetSupportedTunnelProtocols
3877  * @param protocolOffset INT8U
3878  * @param tunnelId INT16U
3879  */
3880 #define emberAfFillCommandTunnelingClusterGetSupportedTunnelProtocols(protocolOffset, tunnelId)                                    \
3881     emberAfFillExternalBuffer(mask,                                                                                                \
3882                                                                                                                                    \
3883                               ZCL_GET_SUPPORTED_TUNNEL_PROTOCOLS_COMMAND_ID, "uu", protocolOffset, tunnelId);
3884
3885 /** @brief Command description for SelectAvailableEmergencyCredit
3886  *
3887  * Command: SelectAvailableEmergencyCredit
3888  * @param commandIssueDateTime UTC_TIME
3889  * @param originatingDevice OriginatingDevice
3890  * @param siteId OCTET_STRING
3891  * @param meterSerialNumber OCTET_STRING
3892  */
3893 #define emberAfFillCommandPrepaymentClusterSelectAvailableEmergencyCredit(commandIssueDateTime, originatingDevice, siteId,         \
3894                                                                           meterSerialNumber)                                       \
3895     emberAfFillExternalBuffer(mask,                                                                                                \
3896                                                                                                                                    \
3897                               ZCL_SELECT_AVAILABLE_EMERGENCY_CREDIT_COMMAND_ID, "uuuu", commandIssueDateTime, originatingDevice,   \
3898                               siteId, meterSerialNumber);
3899
3900 /** @brief Command description for PublishPrepaySnapshot
3901  *
3902  * Command: PublishPrepaySnapshot
3903  * @param snapshotId INT32U
3904  * @param snapshotTime UTC_TIME
3905  * @param totalSnapshotsFound INT8U
3906  * @param commandIndex INT8U
3907  * @param totalNumberOfCommands INT8U
3908  * @param snapshotCause PrepaySnapshotPayloadCause
3909  * @param snapshotPayloadType PrepaySnapshotPayloadType
3910  * @param snapshotPayload INT8U []
3911  * @param snapshotPayloadLen int
3912  */
3913 #define emberAfFillCommandPrepaymentClusterPublishPrepaySnapshot(snapshotId, snapshotTime, totalSnapshotsFound, commandIndex,      \
3914                                                                  totalNumberOfCommands, snapshotCause, snapshotPayloadType,        \
3915                                                                  snapshotPayload, snapshotPayloadLen)                              \
3916     emberAfFillExternalBuffer(mask,                                                                                                \
3917                                                                                                                                    \
3918                               ZCL_PUBLISH_PREPAY_SNAPSHOT_COMMAND_ID, "uuuuuuub", snapshotId, snapshotTime, totalSnapshotsFound,   \
3919                               commandIndex, totalNumberOfCommands, snapshotCause, snapshotPayloadType, snapshotPayload,            \
3920                               snapshotPayloadLen);
3921
3922 /** @brief Command description for ChangeDebt
3923  *
3924  * Command: ChangeDebt
3925  * @param issuerEventId INT32U
3926  * @param friendlyCredit FriendlyCredit
3927  * @param debtLabel OCTET_STRING
3928  * @param friendlyCreditCalendarId INT32U
3929  * @param debtAmount INT32U
3930  * @param emergencyCreditLimit INT32U
3931  * @param debtRecoveryMethod DebtRecoveryMethod
3932  * @param emergencyCreditThreshold INT32U
3933  * @param debtAmountType DebtAmountType
3934  * @param debtRecoveryStartTime UTC_TIME
3935  * @param debtRecoveryCollectionTime INT16U
3936  * @param debtRecoveryFrequency DebtRecoveryFrequency
3937  * @param debtRecoveryAmount INT32U
3938  * @param debtRecoveryBalancePercentage INT16U
3939  */
3940 #define emberAfFillCommandPrepaymentClusterChangeDebt(                                                                             \
3941     issuerEventId, friendlyCredit, debtLabel, friendlyCreditCalendarId, debtAmount, emergencyCreditLimit, debtRecoveryMethod,      \
3942     emergencyCreditThreshold, debtAmountType, debtRecoveryStartTime, debtRecoveryCollectionTime, debtRecoveryFrequency,            \
3943     debtRecoveryAmount, debtRecoveryBalancePercentage)                                                                             \
3944     emberAfFillExternalBuffer(mask,                                                                                                \
3945                                                                                                                                    \
3946                               ZCL_CHANGE_DEBT_COMMAND_ID, "uuuuuuuuuuuuuu", issuerEventId, friendlyCredit, debtLabel,              \
3947                               friendlyCreditCalendarId, debtAmount, emergencyCreditLimit, debtRecoveryMethod,                      \
3948                               emergencyCreditThreshold, debtAmountType, debtRecoveryStartTime, debtRecoveryCollectionTime,         \
3949                               debtRecoveryFrequency, debtRecoveryAmount, debtRecoveryBalancePercentage);
3950
3951 /** @brief Command description for EmergencyCreditSetup
3952  *
3953  * Command: EmergencyCreditSetup
3954  * @param issuerEventId INT32U
3955  * @param resultType ResultType
3956  * @param startTime UTC_TIME
3957  * @param topUpValue INT32U
3958  * @param emergencyCreditLimit INT32U
3959  * @param sourceOfTopUp OriginatingDevice
3960  * @param emergencyCreditThreshold INT32U
3961  * @param creditRemaining INT32U
3962  */
3963 #define emberAfFillCommandPrepaymentClusterEmergencyCreditSetup(issuerEventId, resultType, startTime, topUpValue,                  \
3964                                                                 emergencyCreditLimit, sourceOfTopUp, emergencyCreditThreshold,     \
3965                                                                 creditRemaining)                                                   \
3966     emberAfFillExternalBuffer(mask,                                                                                                \
3967                                                                                                                                    \
3968                               ZCL_EMERGENCY_CREDIT_SETUP_COMMAND_ID, "uuuuuuuu", issuerEventId, resultType, startTime, topUpValue, \
3969                               emergencyCreditLimit, sourceOfTopUp, emergencyCreditThreshold, creditRemaining);
3970
3971 /** @brief Command description for ConsumerTopUp
3972  *
3973  * Command: ConsumerTopUp
3974  * @param originatingDevice OriginatingDevice
3975  * @param topUpCode OCTET_STRING
3976  */
3977 #define emberAfFillCommandPrepaymentClusterConsumerTopUp(originatingDevice, topUpCode)                                             \
3978     emberAfFillExternalBuffer(mask,                                                                                                \
3979                                                                                                                                    \
3980                               ZCL_CONSUMER_TOP_UP_COMMAND_ID, "uu", originatingDevice, topUpCode);
3981
3982 /** @brief Command description for CreditAdjustment
3983  *
3984  * Command: CreditAdjustment
3985  * @param issuerEventId INT32U
3986  * @param commandIndex INT8U
3987  * @param startTime UTC_TIME
3988  * @param totalNumberOfCommands INT8U
3989  * @param creditAdjustmentType CreditAdjustmentType
3990  * @param topUpPayload TopUpPayload []
3991  * @param topUpPayloadLen int
3992  * @param creditAdjustmentValue INT32U
3993  */
3994 #define emberAfFillCommandPrepaymentClusterCreditAdjustment(issuerEventId, commandIndex, startTime, totalNumberOfCommands,         \
3995                                                             creditAdjustmentType, topUpPayload, topUpPayloadLen,                   \
3996                                                             creditAdjustmentValue)                                                 \
3997     emberAfFillExternalBuffer(mask,                                                                                                \
3998                                                                                                                                    \
3999                               ZCL_CREDIT_ADJUSTMENT_COMMAND_ID, "uuuuubu", issuerEventId, commandIndex, startTime,                 \
4000                               totalNumberOfCommands, creditAdjustmentType, topUpPayload, topUpPayloadLen, creditAdjustmentValue);
4001
4002 /** @brief Command description for ChangePaymentMode
4003  *
4004  * Command: ChangePaymentMode
4005  * @param providerId INT32U
4006  * @param commandIndex INT8U
4007  * @param issuerEventId INT32U
4008  * @param totalNumberOfCommands INT8U
4009  * @param implementationDateTime UTC_TIME
4010  * @param debtPayload DebtPayload []
4011  * @param debtPayloadLen int
4012  * @param proposedPaymentControlConfiguration PaymentControlConfiguration
4013  * @param cutOffValue INT32U
4014  */
4015 #define emberAfFillCommandPrepaymentClusterChangePaymentMode(providerId, commandIndex, issuerEventId, totalNumberOfCommands,       \
4016                                                              implementationDateTime, debtPayload, debtPayloadLen,                  \
4017                                                              proposedPaymentControlConfiguration, cutOffValue)                     \
4018     emberAfFillExternalBuffer(mask,                                                                                                \
4019                                                                                                                                    \
4020                               ZCL_CHANGE_PAYMENT_MODE_COMMAND_ID, "uuuuubuu", providerId, commandIndex, issuerEventId,             \
4021                               totalNumberOfCommands, implementationDateTime, debtPayload, debtPayloadLen,                          \
4022                               proposedPaymentControlConfiguration, cutOffValue);
4023
4024 /** @brief Command description for GetPrepaySnapshot
4025  *
4026  * Command: GetPrepaySnapshot
4027  * @param earliestStartTime UTC_TIME
4028  * @param latestEndTime UTC_TIME
4029  * @param snapshotOffset INT8U
4030  * @param snapshotCause PrepaySnapshotPayloadCause
4031  */
4032 #define emberAfFillCommandPrepaymentClusterGetPrepaySnapshot(earliestStartTime, latestEndTime, snapshotOffset, snapshotCause)      \
4033     emberAfFillExternalBuffer(mask,                                                                                                \
4034                                                                                                                                    \
4035                               ZCL_GET_PREPAY_SNAPSHOT_COMMAND_ID, "uuuu", earliestStartTime, latestEndTime, snapshotOffset,        \
4036                               snapshotCause);
4037
4038 /** @brief Command description for GetTopUpLog
4039  *
4040  * Command: GetTopUpLog
4041  * @param latestEndTime UTC_TIME
4042  * @param numberOfRecords INT8U
4043  */
4044 #define emberAfFillCommandPrepaymentClusterGetTopUpLog(latestEndTime, numberOfRecords)                                             \
4045     emberAfFillExternalBuffer(mask,                                                                                                \
4046                                                                                                                                    \
4047                               ZCL_GET_TOP_UP_LOG_COMMAND_ID, "uu", latestEndTime, numberOfRecords);
4048
4049 /** @brief Command description for SetLowCreditWarningLevel
4050  *
4051  * Command: SetLowCreditWarningLevel
4052  * @param lowCreditWarningLevel INT32U
4053  */
4054 #define emberAfFillCommandPrepaymentClusterSetLowCreditWarningLevel(lowCreditWarningLevel)                                         \
4055     emberAfFillExternalBuffer(mask,                                                                                                \
4056                                                                                                                                    \
4057                               ZCL_SET_LOW_CREDIT_WARNING_LEVEL_COMMAND_ID, "u", lowCreditWarningLevel);
4058
4059 /** @brief Command description for GetDebtRepaymentLog
4060  *
4061  * Command: GetDebtRepaymentLog
4062  * @param latestEndTime UTC_TIME
4063  * @param numberOfDebts INT8U
4064  * @param debtType RepaymentDebtType
4065  */
4066 #define emberAfFillCommandPrepaymentClusterGetDebtRepaymentLog(latestEndTime, numberOfDebts, debtType)                             \
4067     emberAfFillExternalBuffer(mask,                                                                                                \
4068                                                                                                                                    \
4069                               ZCL_GET_DEBT_REPAYMENT_LOG_COMMAND_ID, "uuu", latestEndTime, numberOfDebts, debtType);
4070
4071 /** @brief Command description for SetMaximumCreditLimit
4072  *
4073  * Command: SetMaximumCreditLimit
4074  * @param providerId INT32U
4075  * @param issuerEventId INT32U
4076  * @param implementationDateTime UTC_TIME
4077  * @param maximumCreditLevel INT32U
4078  * @param maximumCreditPerTopUp INT32U
4079  */
4080 #define emberAfFillCommandPrepaymentClusterSetMaximumCreditLimit(providerId, issuerEventId, implementationDateTime,                \
4081                                                                  maximumCreditLevel, maximumCreditPerTopUp)                        \
4082     emberAfFillExternalBuffer(mask,                                                                                                \
4083                                                                                                                                    \
4084                               ZCL_SET_MAXIMUM_CREDIT_LIMIT_COMMAND_ID, "uuuuu", providerId, issuerEventId, implementationDateTime, \
4085                               maximumCreditLevel, maximumCreditPerTopUp);
4086
4087 /** @brief Command description for SetOverallDebtCap
4088  *
4089  * Command: SetOverallDebtCap
4090  * @param providerId INT32U
4091  * @param issuerEventId INT32U
4092  * @param implementationDateTime UTC_TIME
4093  * @param overallDebtCap INT32U
4094  */
4095 #define emberAfFillCommandPrepaymentClusterSetOverallDebtCap(providerId, issuerEventId, implementationDateTime, overallDebtCap)    \
4096     emberAfFillExternalBuffer(mask,                                                                                                \
4097                                                                                                                                    \
4098                               ZCL_SET_OVERALL_DEBT_CAP_COMMAND_ID, "uuuu", providerId, issuerEventId, implementationDateTime,      \
4099                               overallDebtCap);
4100
4101 /** @brief Command description for ReportEventStatus
4102  *
4103  * Command: ReportEventStatus
4104  * @param issuerEventId INT32U
4105  * @param issuerEventId INT32U
4106  * @param eventStatus AmiEventStatus
4107  * @param deviceClass AmiDeviceClass
4108  * @param eventStatusTime UTC_TIME
4109  * @param utilityEnrollmentGroup INT8U
4110  * @param criticalityLevelApplied AmiCriticalityLevel
4111  * @param actionRequired INT8U
4112  * @param coolingTemperatureSetPointApplied INT16U
4113  * @param heatingTemperatureSetPointApplied INT16U
4114  * @param averageLoadAdjustmentPercentageApplied INT8S
4115  * @param dutyCycleApplied INT8U
4116  * @param eventControl AmiEventControl
4117  */
4118 #define emberAfFillCommandEnergy                                                                                                   \
4119     ManagementClusterReportEventStatus(issuerEventId, issuerEventId, eventStatus, deviceClass, eventStatusTime,                    \
4120                                        utilityEnrollmentGroup, criticalityLevelApplied, actionRequired,                            \
4121                                        coolingTemperatureSetPointApplied, heatingTemperatureSetPointApplied,                       \
4122                                        averageLoadAdjustmentPercentageApplied, dutyCycleApplied, eventControl)                     \
4123         emberAfFillExternalBuffer(mask,                                                                                            \
4124                                                                                                                                    \
4125                                   ZCL_REPORT_EVENT_STATUS_COMMAND_ID, "uuuuuuuuuuuuu", issuerEventId, issuerEventId, eventStatus,  \
4126                                   deviceClass, eventStatusTime, utilityEnrollmentGroup, criticalityLevelApplied, actionRequired,   \
4127                                   coolingTemperatureSetPointApplied, heatingTemperatureSetPointApplied,                            \
4128                                   averageLoadAdjustmentPercentageApplied, dutyCycleApplied, eventControl);
4129
4130 /** @brief Command description for PublishCalendar
4131  *
4132  * Command: PublishCalendar
4133  * @param providerId INT32U
4134  * @param earliestStartTime UTC_TIME
4135  * @param issuerEventId INT32U
4136  * @param minIssuerEventId INT32U
4137  * @param issuerCalendarId INT32U
4138  * @param numberOfCalendars INT8U
4139  * @param startTime UTC_TIME
4140  * @param calendarType CalendarType
4141  * @param calendarType CalendarType
4142  * @param providerId INT32U
4143  * @param calendarTimeReference CalendarTimeReference
4144  * @param calendarName OCTET_STRING
4145  * @param numberOfSeasons INT8U
4146  * @param numberOfWeekProfiles INT8U
4147  * @param numberOfDayProfiles INT8U
4148  */
4149 #define emberAfFillCommandCalendarClusterPublishCalendar(                                                                          \
4150     providerId, earliestStartTime, issuerEventId, minIssuerEventId, issuerCalendarId, numberOfCalendars, startTime, calendarType,  \
4151     calendarType, providerId, calendarTimeReference, calendarName, numberOfSeasons, numberOfWeekProfiles, numberOfDayProfiles)     \
4152     emberAfFillExternalBuffer(mask,                                                                                                \
4153                                                                                                                                    \
4154                               ZCL_PUBLISH_CALENDAR_COMMAND_ID, "uuuuuuuuuuuuuuu", providerId, earliestStartTime, issuerEventId,    \
4155                               minIssuerEventId, issuerCalendarId, numberOfCalendars, startTime, calendarType, calendarType,        \
4156                               providerId, calendarTimeReference, calendarName, numberOfSeasons, numberOfWeekProfiles,              \
4157                               numberOfDayProfiles);
4158
4159 /** @brief Command description for PublishDayProfile
4160  *
4161  * Command: PublishDayProfile
4162  * @param providerId INT32U
4163  * @param providerId INT32U
4164  * @param issuerEventId INT32U
4165  * @param issuerCalendarId INT32U
4166  * @param issuerCalendarId INT32U
4167  * @param startDayId INT8U
4168  * @param dayId INT8U
4169  * @param numberOfDays INT8U
4170  * @param totalNumberOfScheduleEntries INT8U
4171  * @param commandIndex INT8U
4172  * @param totalNumberOfCommands INT8U
4173  * @param calendarType CalendarType
4174  * @param dayScheduleEntries ScheduleEntry []
4175  * @param dayScheduleEntriesLen int
4176  */
4177 #define emberAfFillCommandCalendarClusterPublishDayProfile(                                                                        \
4178     providerId, providerId, issuerEventId, issuerCalendarId, issuerCalendarId, startDayId, dayId, numberOfDays,                    \
4179     totalNumberOfScheduleEntries, commandIndex, totalNumberOfCommands, calendarType, dayScheduleEntries, dayScheduleEntriesLen)    \
4180     emberAfFillExternalBuffer(mask,                                                                                                \
4181                                                                                                                                    \
4182                               ZCL_PUBLISH_DAY_PROFILE_COMMAND_ID, "uuuuuuuuuuuub", providerId, providerId, issuerEventId,          \
4183                               issuerCalendarId, issuerCalendarId, startDayId, dayId, numberOfDays, totalNumberOfScheduleEntries,   \
4184                               commandIndex, totalNumberOfCommands, calendarType, dayScheduleEntries, dayScheduleEntriesLen);
4185
4186 /** @brief Command description for PublishWeekProfile
4187  *
4188  * Command: PublishWeekProfile
4189  * @param providerId INT32U
4190  * @param providerId INT32U
4191  * @param issuerEventId INT32U
4192  * @param issuerCalendarId INT32U
4193  * @param issuerCalendarId INT32U
4194  * @param startWeekId INT8U
4195  * @param weekId INT8U
4196  * @param numberOfWeeks INT8U
4197  * @param dayIdRefMonday INT8U
4198  * @param dayIdRefTuesday INT8U
4199  * @param dayIdRefWednesday INT8U
4200  * @param dayIdRefThursday INT8U
4201  * @param dayIdRefFriday INT8U
4202  * @param dayIdRefSaturday INT8U
4203  * @param dayIdRefSunday INT8U
4204  */
4205 #define emberAfFillCommandCalendarClusterPublishWeekProfile(                                                                       \
4206     providerId, providerId, issuerEventId, issuerCalendarId, issuerCalendarId, startWeekId, weekId, numberOfWeeks, dayIdRefMonday, \
4207     dayIdRefTuesday, dayIdRefWednesday, dayIdRefThursday, dayIdRefFriday, dayIdRefSaturday, dayIdRefSunday)                        \
4208     emberAfFillExternalBuffer(mask,                                                                                                \
4209                                                                                                                                    \
4210                               ZCL_PUBLISH_WEEK_PROFILE_COMMAND_ID, "uuuuuuuuuuuuuuu", providerId, providerId, issuerEventId,       \
4211                               issuerCalendarId, issuerCalendarId, startWeekId, weekId, numberOfWeeks, dayIdRefMonday,              \
4212                               dayIdRefTuesday, dayIdRefWednesday, dayIdRefThursday, dayIdRefFriday, dayIdRefSaturday,              \
4213                               dayIdRefSunday);
4214
4215 /** @brief Command description for PublishSeasons
4216  *
4217  * Command: PublishSeasons
4218  * @param providerId INT32U
4219  * @param providerId INT32U
4220  * @param issuerEventId INT32U
4221  * @param issuerCalendarId INT32U
4222  * @param issuerCalendarId INT32U
4223  * @param commandIndex INT8U
4224  * @param totalNumberOfCommands INT8U
4225  * @param seasonEntries SeasonEntry []
4226  * @param seasonEntriesLen int
4227  */
4228 #define emberAfFillCommandCalendarClusterPublishSeasons(providerId, providerId, issuerEventId, issuerCalendarId, issuerCalendarId, \
4229                                                         commandIndex, totalNumberOfCommands, seasonEntries, seasonEntriesLen)      \
4230     emberAfFillExternalBuffer(mask,                                                                                                \
4231                                                                                                                                    \
4232                               ZCL_PUBLISH_SEASONS_COMMAND_ID, "uuuuuuub", providerId, providerId, issuerEventId, issuerCalendarId, \
4233                               issuerCalendarId, commandIndex, totalNumberOfCommands, seasonEntries, seasonEntriesLen);
4234
4235 /** @brief Command description for PublishSpecialDays
4236  *
4237  * Command: PublishSpecialDays
4238  * @param providerId INT32U
4239  * @param startTime UTC_TIME
4240  * @param issuerEventId INT32U
4241  * @param numberOfEvents INT8U
4242  * @param issuerCalendarId INT32U
4243  * @param calendarType CalendarType
4244  * @param startTime UTC_TIME
4245  * @param providerId INT32U
4246  * @param calendarType CalendarType
4247  * @param issuerCalendarId INT32U
4248  * @param totalNumberOfSpecialDays INT8U
4249  * @param commandIndex INT8U
4250  * @param totalNumberOfCommands INT8U
4251  * @param specialDayEntries SpecialDay []
4252  * @param specialDayEntriesLen int
4253  */
4254 #define emberAfFillCommandCalendarClusterPublishSpecialDays(                                                                       \
4255     providerId, startTime, issuerEventId, numberOfEvents, issuerCalendarId, calendarType, startTime, providerId, calendarType,     \
4256     issuerCalendarId, totalNumberOfSpecialDays, commandIndex, totalNumberOfCommands, specialDayEntries, specialDayEntriesLen)      \
4257     emberAfFillExternalBuffer(mask,                                                                                                \
4258                                                                                                                                    \
4259                               ZCL_PUBLISH_SPECIAL_DAYS_COMMAND_ID, "uuuuuuuuuuuuub", providerId, startTime, issuerEventId,         \
4260                               numberOfEvents, issuerCalendarId, calendarType, startTime, providerId, calendarType,                 \
4261                               issuerCalendarId, totalNumberOfSpecialDays, commandIndex, totalNumberOfCommands, specialDayEntries,  \
4262                               specialDayEntriesLen);
4263
4264 /** @brief Command description for GetCalendarCancellation
4265  *
4266  * Command: GetCalendarCancellation
4267  * @param providerId INT32U
4268  * @param issuerCalendarId INT32U
4269  * @param calendarType CalendarType
4270  */
4271 #define emberAfFillCommandCalendarClusterGetCalendarCancellation(providerId, issuerCalendarId, calendarType)                       \
4272     emberAfFillExternalBuffer(mask,                                                                                                \
4273                                                                                                                                    \
4274                               ZCL_GET_CALENDAR_CANCELLATION_COMMAND_ID, "uuu", providerId, issuerCalendarId, calendarType);
4275
4276 /** @brief Command description for GetChangeOfTenancy
4277  *
4278  * Command: GetChangeOfTenancy
4279  * @param providerId INT32U
4280  * @param issuerEventId INT32U
4281  * @param tariffType TariffType
4282  * @param implementationDateTime UTC_TIME
4283  * @param proposedTenancyChangeControl ProposedChangeControl
4284  */
4285 #define emberAfFillCommandDevice                                                                                                   \
4286     ManagementClusterGetChangeOfTenancy(providerId, issuerEventId, tariffType, implementationDateTime,                             \
4287                                         proposedTenancyChangeControl)                                                              \
4288         emberAfFillExternalBuffer(mask,                                                                                            \
4289                                                                                                                                    \
4290                                   ZCL_GET_CHANGE_OF_TENANCY_COMMAND_ID, "uuuuu", providerId, issuerEventId, tariffType,            \
4291                                   implementationDateTime, proposedTenancyChangeControl);
4292
4293 /** @brief Command description for GetChangeOfSupplier
4294  *
4295  * Command: GetChangeOfSupplier
4296  * @param currentProviderId INT32U
4297  * @param issuerEventId INT32U
4298  * @param tariffType TariffType
4299  * @param proposedProviderId INT32U
4300  * @param providerChangeImplementationTime UTC_TIME
4301  * @param providerChangeControl ProposedChangeControl
4302  * @param proposedProviderName OCTET_STRING
4303  * @param proposedProviderContactDetails OCTET_STRING
4304  */
4305 #define emberAfFillCommandDevice                                                                                                   \
4306     ManagementClusterGetChangeOfSupplier(currentProviderId, issuerEventId, tariffType, proposedProviderId,                         \
4307                                          providerChangeImplementationTime, providerChangeControl, proposedProviderName,            \
4308                                          proposedProviderContactDetails)                                                           \
4309         emberAfFillExternalBuffer(mask,                                                                                            \
4310                                                                                                                                    \
4311                                   ZCL_GET_CHANGE_OF_SUPPLIER_COMMAND_ID, "uuuuuuuu", currentProviderId, issuerEventId, tariffType, \
4312                                   proposedProviderId, providerChangeImplementationTime, providerChangeControl,                     \
4313                                   proposedProviderName, proposedProviderContactDetails);
4314
4315 /** @brief Command description for RequestNewPassword
4316  *
4317  * Command: RequestNewPassword
4318  * @param passwordType PasswordType
4319  * @param issuerEventId INT32U
4320  * @param implementationDateTime UTC_TIME
4321  * @param durationInMinutes INT16U
4322  * @param passwordType PasswordType
4323  * @param password OCTET_STRING
4324  */
4325 #define emberAfFillCommandDevice                                                                                                   \
4326     ManagementClusterRequestNewPassword(passwordType, issuerEventId, implementationDateTime, durationInMinutes, passwordType,      \
4327                                         password)                                                                                  \
4328         emberAfFillExternalBuffer(mask,                                                                                            \
4329                                                                                                                                    \
4330                                   ZCL_REQUEST_NEW_PASSWORD_COMMAND_ID, "uuuuuu", passwordType, issuerEventId,                      \
4331                                   implementationDateTime, durationInMinutes, passwordType, password);
4332
4333 /** @brief Command description for GetSiteId
4334  *
4335  * Command: GetSiteId
4336  * @param issuerEventId INT32U
4337  * @param siteIdTime UTC_TIME
4338  * @param providerId INT32U
4339  * @param siteId OCTET_STRING
4340  */
4341 #define emberAfFillCommandDevice                                                                                                   \
4342     ManagementClusterGetSiteId(issuerEventId, siteIdTime, providerId, siteId)                                                      \
4343         emberAfFillExternalBuffer(mask,                                                                                            \
4344                                                                                                                                    \
4345                                   ZCL_GET_SITE_ID_COMMAND_ID, "uuuu", issuerEventId, siteIdTime, providerId, siteId);
4346
4347 /** @brief Command description for ReportEventConfiguration
4348  *
4349  * Command: ReportEventConfiguration
4350  * @param commandIndex INT8U
4351  * @param issuerEventId INT32U
4352  * @param totalCommands INT8U
4353  * @param startDateTime UTC_TIME
4354  * @param eventConfigurationPayload EventConfigurationPayload []
4355  * @param eventConfigurationPayloadLen int
4356  * @param eventConfiguration EventConfiguration
4357  * @param configurationControl EventConfigurationControl
4358  * @param eventConfigurationPayload INT8U []
4359  * @param eventConfigurationPayloadLen int
4360  */
4361 #define emberAfFillCommandDevice                                                                                                   \
4362     ManagementClusterReportEventConfiguration(commandIndex, issuerEventId, totalCommands, startDateTime,                           \
4363                                               eventConfigurationPayload, eventConfigurationPayloadLen, eventConfiguration,         \
4364                                               configurationControl, eventConfigurationPayload, eventConfigurationPayloadLen)       \
4365         emberAfFillExternalBuffer(mask,                                                                                            \
4366                                                                                                                                    \
4367                                   ZCL_REPORT_EVENT_CONFIGURATION_COMMAND_ID, "uuuubuub", commandIndex, issuerEventId,              \
4368                                   totalCommands, startDateTime, eventConfigurationPayload, eventConfigurationPayloadLen,           \
4369                                   eventConfiguration, configurationControl, eventConfigurationPayload,                             \
4370                                   eventConfigurationPayloadLen);
4371
4372 /** @brief Command description for GetCIN
4373  *
4374  * Command: GetCIN
4375  * @param eventId INT16U
4376  */
4377 #define emberAfFillCommandDevice                                                                                                   \
4378     ManagementClusterGetCIN(eventId) emberAfFillExternalBuffer(mask,                                                               \
4379                                                                                                                                    \
4380                                                                ZCL_GET_CIN_COMMAND_ID, "u", eventId);
4381
4382 /** @brief Command description for UpdateCIN
4383  *
4384  * Command: UpdateCIN
4385  * @param issuerEventId INT32U
4386  * @param implementationTime UTC_TIME
4387  * @param providerId INT32U
4388  * @param customerIdNumber OCTET_STRING
4389  */
4390 #define emberAfFillCommandDevice                                                                                                   \
4391     ManagementClusterUpdateCIN(issuerEventId, implementationTime, providerId, customerIdNumber) emberAfFillExternalBuffer(         \
4392         mask,                                                                                                                      \
4393                                                                                                                                    \
4394         ZCL_UPDATE_CIN_COMMAND_ID, "uuuu", issuerEventId, implementationTime, providerId, customerIdNumber);
4395
4396 /** @brief Command description for GetEventLog
4397  *
4398  * Command: GetEventLog
4399  * @param eventControlLogId EventControlLogId
4400  * @param logId EventLogId
4401  * @param eventId INT16U
4402  * @param eventId INT16U
4403  * @param startTime UTC_TIME
4404  * @param eventTime UTC_TIME
4405  * @param endTime UTC_TIME
4406  * @param eventControl EventActionControl
4407  * @param numberOfEvents INT8U
4408  * @param eventData OCTET_STRING
4409  * @param eventOffset INT16U
4410  */
4411 #define emberAfFillCommandEventsClusterGetEventLog(eventControlLogId, logId, eventId, eventId, startTime, eventTime, endTime,      \
4412                                                    eventControl, numberOfEvents, eventData, eventOffset)                           \
4413     emberAfFillExternalBuffer(mask,                                                                                                \
4414                                                                                                                                    \
4415                               ZCL_GET_EVENT_LOG_COMMAND_ID, "uuuuuuuuuuu", eventControlLogId, logId, eventId, eventId, startTime,  \
4416                               eventTime, endTime, eventControl, numberOfEvents, eventData, eventOffset);
4417
4418 /** @brief Command description for ClearEventLogRequest
4419  *
4420  * Command: ClearEventLogRequest
4421  * @param logId EventLogId
4422  * @param totalNumberOfEvents INT16U
4423  * @param commandIndex INT8U
4424  * @param totalCommands INT8U
4425  * @param logPayloadControl NumberOfEventsLogPayloadControl
4426  * @param logPayload EventLogPayload []
4427  * @param logPayloadLen int
4428  */
4429 #define emberAfFillCommandEventsClusterClearEventLogRequest(logId, totalNumberOfEvents, commandIndex, totalCommands,               \
4430                                                             logPayloadControl, logPayload, logPayloadLen)                          \
4431     emberAfFillExternalBuffer(mask,                                                                                                \
4432                                                                                                                                    \
4433                               ZCL_CLEAR_EVENT_LOG_REQUEST_COMMAND_ID, "uuuuub", logId, totalNumberOfEvents, commandIndex,          \
4434                               totalCommands, logPayloadControl, logPayload, logPayloadLen);
4435
4436 /** @brief Command description for ClearEventLogResponse
4437  *
4438  * Command: ClearEventLogResponse
4439  * @param clearedEventsLogs ClearedEventsLogs
4440  */
4441 #define emberAfFillCommandEventsClusterClearEventLogResponse(clearedEventsLogs)                                                    \
4442     emberAfFillExternalBuffer(mask,                                                                                                \
4443                                                                                                                                    \
4444                               ZCL_CLEAR_EVENT_LOG_RESPONSE_COMMAND_ID, "u", clearedEventsLogs);
4445
4446 /** @brief Command description for PairingResponse
4447  *
4448  * Command: PairingResponse
4449  * @param pairingInformationVersion INT32U
4450  * @param localPairingInformationVersion INT32U
4451  * @param totalNumberOfDevices INT8U
4452  * @param eui64OfRequestingDevice IEEE_ADDRESS
4453  * @param commandIndex INT8U
4454  * @param totalNumberOfCommands INT8U
4455  * @param eui64s IEEE_ADDRESS []
4456  * @param eui64sLen int
4457  */
4458 #define emberAfFillCommandMDU                                                                                                      \
4459     PairingClusterPairingResponse(pairingInformationVersion, localPairingInformationVersion, totalNumberOfDevices,                 \
4460                                   eui64OfRequestingDevice, commandIndex, totalNumberOfCommands, eui64s, eui64sLen)                 \
4461         emberAfFillExternalBuffer(mask,                                                                                            \
4462                                                                                                                                    \
4463                                   ZCL_PAIRING_RESPONSE_COMMAND_ID, "uuuuuub", pairingInformationVersion,                           \
4464                                   localPairingInformationVersion, totalNumberOfDevices, eui64OfRequestingDevice, commandIndex,     \
4465                                   totalNumberOfCommands, eui64s, eui64sLen);
4466
4467 /** @brief Command description for GetSuspendZclMessagesStatus
4468  *
4469  * Command: GetSuspendZclMessagesStatus
4470  * @param period INT8U
4471  */
4472 #define emberAfFillCommandSub                                                                                                      \
4473     -GHzClusterGetSuspendZclMessagesStatus(period)                                                                                 \
4474         emberAfFillExternalBuffer(mask,                                                                                            \
4475                                                                                                                                    \
4476                                   ZCL_GET_SUSPEND_ZCL_MESSAGES_STATUS_COMMAND_ID, "u", period);
4477
4478 /** @brief Command description for InitiateKeyEstablishmentRequest
4479  *
4480  * Command: InitiateKeyEstablishmentRequest
4481  * @param keyEstablishmentSuite BITMAP16
4482  * @param requestedKeyEstablishmentSuite BITMAP16
4483  * @param ephemeralDataGenerateTime INT8U
4484  * @param ephemeralDataGenerateTime INT8U
4485  * @param confirmKeyGenerateTime INT8U
4486  * @param confirmKeyGenerateTime INT8U
4487  * @param identity Identity
4488  * @param identity Identity
4489  */
4490 #define emberAfFillCommandKey                                                                                                      \
4491     EstablishmentClusterInitiateKeyEstablishmentRequest(keyEstablishmentSuite, requestedKeyEstablishmentSuite,                     \
4492                                                         ephemeralDataGenerateTime, ephemeralDataGenerateTime,                      \
4493                                                         confirmKeyGenerateTime, confirmKeyGenerateTime, identity, identity)        \
4494         emberAfFillExternalBuffer(mask,                                                                                            \
4495                                                                                                                                    \
4496                                   ZCL_INITIATE_KEY_ESTABLISHMENT_REQUEST_COMMAND_ID, "uuuuuuuu", keyEstablishmentSuite,            \
4497                                   requestedKeyEstablishmentSuite, ephemeralDataGenerateTime, ephemeralDataGenerateTime,            \
4498                                   confirmKeyGenerateTime, confirmKeyGenerateTime, identity, identity);
4499
4500 /** @brief Command description for EphemeralDataRequest
4501  *
4502  * Command: EphemeralDataRequest
4503  * @param ephemeralData EphemeralData
4504  * @param ephemeralData EphemeralData
4505  */
4506 #define emberAfFillCommandKey                                                                                                      \
4507     EstablishmentClusterEphemeralDataRequest(ephemeralData, ephemeralData)                                                         \
4508         emberAfFillExternalBuffer(mask,                                                                                            \
4509                                                                                                                                    \
4510                                   ZCL_EPHEMERAL_DATA_REQUEST_COMMAND_ID, "uu", ephemeralData, ephemeralData);
4511
4512 /** @brief Command description for ConfirmKeyDataRequest
4513  *
4514  * Command: ConfirmKeyDataRequest
4515  * @param secureMessageAuthenticationCode Smac
4516  * @param secureMessageAuthenticationCode Smac
4517  */
4518 #define emberAfFillCommandKey                                                                                                      \
4519     EstablishmentClusterConfirmKeyDataRequest(secureMessageAuthenticationCode, secureMessageAuthenticationCode)                    \
4520         emberAfFillExternalBuffer(mask,                                                                                            \
4521                                                                                                                                    \
4522                                   ZCL_CONFIRM_KEY_DATA_REQUEST_COMMAND_ID, "uu", secureMessageAuthenticationCode,                  \
4523                                   secureMessageAuthenticationCode);
4524
4525 /** @brief Command description for TerminateKeyEstablishment
4526  *
4527  * Command: TerminateKeyEstablishment
4528  * @param statusCode AmiKeyEstablishmentStatus
4529  * @param waitTime INT8U
4530  * @param keyEstablishmentSuite BITMAP16
4531  */
4532 #define emberAfFillCommandKey                                                                                                      \
4533     EstablishmentClusterTerminateKeyEstablishment(statusCode, waitTime, keyEstablishmentSuite)                                     \
4534         emberAfFillExternalBuffer(mask,                                                                                            \
4535                                                                                                                                    \
4536                                   ZCL_TERMINATE_KEY_ESTABLISHMENT_COMMAND_ID, "uuu", statusCode, waitTime, keyEstablishmentSuite);
4537
4538 /** @brief Command description for RequestInformation
4539  *
4540  * Command: RequestInformation
4541  * @param inquiryId ENUM8
4542  * @param number INT8U
4543  * @param dataTypeId BITMAP8
4544  * @param buffer INT8U []
4545  * @param bufferLen int
4546  * @param requestInformationPayload INT8U []
4547  * @param requestInformationPayloadLen int
4548  */
4549 #define emberAfFillCommandInformationClusterRequestInformation(inquiryId, number, dataTypeId, buffer, bufferLen,                   \
4550                                                                requestInformationPayload, requestInformationPayloadLen)            \
4551     emberAfFillExternalBuffer(mask,                                                                                                \
4552                                                                                                                                    \
4553                               ZCL_REQUEST_INFORMATION_COMMAND_ID, "uuubb", inquiryId, number, dataTypeId, buffer, bufferLen,       \
4554                               requestInformationPayload, requestInformationPayloadLen);
4555
4556 /** @brief Command description for PushInformationResponse
4557  *
4558  * Command: PushInformationResponse
4559  * @param notificationList Notification []
4560  * @param notificationListLen int
4561  * @param contents INT8U []
4562  * @param contentsLen int
4563  */
4564 #define emberAfFillCommandInformationClusterPushInformationResponse(notificationList, notificationListLen, contents, contentsLen)  \
4565     emberAfFillExternalBuffer(mask,                                                                                                \
4566                                                                                                                                    \
4567                               ZCL_PUSH_INFORMATION_RESPONSE_COMMAND_ID, "bb", notificationList, notificationListLen, contents,     \
4568                               contentsLen);
4569
4570 /** @brief Command description for SendPreference
4571  *
4572  * Command: SendPreference
4573  * @param preferenceType INT16U
4574  * @param statusFeedbackList Status []
4575  * @param statusFeedbackListLen int
4576  * @param preferencePayload INT8U []
4577  * @param preferencePayloadLen int
4578  */
4579 #define emberAfFillCommandInformationClusterSendPreference(preferenceType, statusFeedbackList, statusFeedbackListLen,              \
4580                                                            preferencePayload, preferencePayloadLen)                                \
4581     emberAfFillExternalBuffer(mask,                                                                                                \
4582                                                                                                                                    \
4583                               ZCL_SEND_PREFERENCE_COMMAND_ID, "ubb", preferenceType, statusFeedbackList, statusFeedbackListLen,    \
4584                               preferencePayload, preferencePayloadLen);
4585
4586 /** @brief Command description for ServerRequestPreference
4587  *
4588  * Command: ServerRequestPreference
4589  * @param statusFeedback Status
4590  * @param preferenceType INT16U
4591  * @param preferencePayload INT8U []
4592  * @param preferencePayloadLen int
4593  */
4594 #define emberAfFillCommandInformationClusterServerRequestPreference(statusFeedback, preferenceType, preferencePayload,             \
4595                                                                     preferencePayloadLen)                                          \
4596     emberAfFillExternalBuffer(mask,                                                                                                \
4597                                                                                                                                    \
4598                               ZCL_SERVER_REQUEST_PREFERENCE_COMMAND_ID, "uub", statusFeedback, preferenceType, preferencePayload,  \
4599                               preferencePayloadLen);
4600
4601 /** @brief Command description for Update
4602  *
4603  * Command: Update
4604  * @param accessControl ENUM8
4605  * @param statusFeedbackList Status []
4606  * @param statusFeedbackListLen int
4607  * @param option BITMAP8
4608  * @param contents INT8U []
4609  * @param contentsLen int
4610  */
4611 #define emberAfFillCommandInformationClusterUpdate(accessControl, statusFeedbackList, statusFeedbackListLen, option, contents,     \
4612                                                    contentsLen)                                                                    \
4613     emberAfFillExternalBuffer(mask,                                                                                                \
4614                                                                                                                                    \
4615                               ZCL_UPDATE_COMMAND_ID, "ubub", accessControl, statusFeedbackList, statusFeedbackListLen, option,     \
4616                               contents, contentsLen);
4617
4618 /** @brief Command description for Delete
4619  *
4620  * Command: Delete
4621  * @param deletionOptions BITMAP8
4622  * @param notificationList Notification []
4623  * @param notificationListLen int
4624  * @param contentIds INT16U []
4625  * @param contentIdsLen int
4626  */
4627 #define emberAfFillCommandInformationClusterDelete(deletionOptions, notificationList, notificationListLen, contentIds,             \
4628                                                    contentIdsLen)                                                                  \
4629     emberAfFillExternalBuffer(mask,                                                                                                \
4630                                                                                                                                    \
4631                               ZCL_DELETE_COMMAND_ID, "ubb", deletionOptions, notificationList, notificationListLen, contentIds,    \
4632                               contentIdsLen);
4633
4634 /** @brief Command description for ConfigureNodeDescription
4635  *
4636  * Command: ConfigureNodeDescription
4637  * @param description CHAR_STRING
4638  * @param notificationList Notification []
4639  * @param notificationListLen int
4640  */
4641 #define emberAfFillCommandInformationClusterConfigureNodeDescription(description, notificationList, notificationListLen)           \
4642     emberAfFillExternalBuffer(mask,                                                                                                \
4643                                                                                                                                    \
4644                               ZCL_CONFIGURE_NODE_DESCRIPTION_COMMAND_ID, "ub", description, notificationList,                      \
4645                               notificationListLen);
4646
4647 /** @brief Command description for ConfigureDeliveryEnable
4648  *
4649  * Command: ConfigureDeliveryEnable
4650  * @param enable BOOLEAN
4651  */
4652 #define emberAfFillCommandInformationClusterConfigureDeliveryEnable(enable)                                                        \
4653     emberAfFillExternalBuffer(mask,                                                                                                \
4654                                                                                                                                    \
4655                               ZCL_CONFIGURE_DELIVERY_ENABLE_COMMAND_ID, "u", enable);
4656
4657 /** @brief Command description for ConfigurePushInformationTimer
4658  *
4659  * Command: ConfigurePushInformationTimer
4660  * @param timer INT32U
4661  */
4662 #define emberAfFillCommandInformationClusterConfigurePushInformationTimer(timer)                                                   \
4663     emberAfFillExternalBuffer(mask,                                                                                                \
4664                                                                                                                                    \
4665                               ZCL_CONFIGURE_PUSH_INFORMATION_TIMER_COMMAND_ID, "u", timer);
4666
4667 /** @brief Command description for ConfigureSetRootId
4668  *
4669  * Command: ConfigureSetRootId
4670  * @param rootId INT16U
4671  */
4672 #define emberAfFillCommandInformationClusterConfigureSetRootId(rootId)                                                             \
4673     emberAfFillExternalBuffer(mask,                                                                                                \
4674                                                                                                                                    \
4675                               ZCL_CONFIGURE_SET_ROOT_ID_COMMAND_ID, "u", rootId);
4676
4677 /** @brief Command description for ReadFileRequest
4678  *
4679  * Command: ReadFileRequest
4680  * @param fileIndex INT16U
4681  * @param writeOptions BITMAP8
4682  * @param fileStartPositionAndRequestedOctetCount INT8U []
4683  * @param fileStartPositionAndRequestedOctetCountLen int
4684  * @param fileSize INT8U []
4685  * @param fileSizeLen int
4686  */
4687 #define emberAfFillCommandData                                                                                                     \
4688     SharingClusterReadFileRequest(fileIndex, writeOptions, fileStartPositionAndRequestedOctetCount,                                \
4689                                   fileStartPositionAndRequestedOctetCountLen, fileSize, fileSizeLen)                               \
4690         emberAfFillExternalBuffer(mask,                                                                                            \
4691                                                                                                                                    \
4692                                   ZCL_READ_FILE_REQUEST_COMMAND_ID, "uubb", fileIndex, writeOptions,                               \
4693                                   fileStartPositionAndRequestedOctetCount, fileStartPositionAndRequestedOctetCountLen, fileSize,   \
4694                                   fileSizeLen);
4695
4696 /** @brief Command description for ReadRecordRequest
4697  *
4698  * Command: ReadRecordRequest
4699  * @param fileIndex INT16U
4700  * @param fileIndex INT16U
4701  * @param fileStartRecordAndRequestedRecordCount INT8U []
4702  * @param fileStartRecordAndRequestedRecordCountLen int
4703  * @param fileStartPosition INT32U
4704  * @param octetCount INT32U
4705  */
4706 #define emberAfFillCommandData                                                                                                     \
4707     SharingClusterReadRecordRequest(fileIndex, fileIndex, fileStartRecordAndRequestedRecordCount,                                  \
4708                                     fileStartRecordAndRequestedRecordCountLen, fileStartPosition, octetCount)                      \
4709         emberAfFillExternalBuffer(mask,                                                                                            \
4710                                                                                                                                    \
4711                                   ZCL_READ_RECORD_REQUEST_COMMAND_ID, "uubuu", fileIndex, fileIndex,                               \
4712                                   fileStartRecordAndRequestedRecordCount, fileStartRecordAndRequestedRecordCountLen,               \
4713                                   fileStartPosition, octetCount);
4714
4715 /** @brief Command description for WriteFileResponse
4716  *
4717  * Command: WriteFileResponse
4718  * @param status ENUM8
4719  * @param fileIndex INT16U
4720  * @param fileIndex INT8U []
4721  * @param fileIndexLen int
4722  * @param fileStartRecord INT16U
4723  * @param recordCount INT16U
4724  */
4725 #define emberAfFillCommandData                                                                                                     \
4726     SharingClusterWriteFileResponse(status, fileIndex, fileIndex, fileIndexLen, fileStartRecord, recordCount)                      \
4727         emberAfFillExternalBuffer(mask,                                                                                            \
4728                                                                                                                                    \
4729                                   ZCL_WRITE_FILE_RESPONSE_COMMAND_ID, "uubuu", status, fileIndex, fileIndex, fileIndexLen,         \
4730                                   fileStartRecord, recordCount);
4731
4732 /** @brief Command description for FileTransmission
4733  *
4734  * Command: FileTransmission
4735  * @param transmitOptions BITMAP8
4736  * @param buffer INT8U []
4737  * @param bufferLen int
4738  */
4739 #define emberAfFillCommandData                                                                                                     \
4740     SharingClusterFileTransmission(transmitOptions, buffer, bufferLen)                                                             \
4741         emberAfFillExternalBuffer(mask,                                                                                            \
4742                                                                                                                                    \
4743                                   ZCL_FILE_TRANSMISSION_COMMAND_ID, "ub", transmitOptions, buffer, bufferLen);
4744
4745 /** @brief Command description for RecordTransmission
4746  *
4747  * Command: RecordTransmission
4748  * @param transmitOptions BITMAP8
4749  * @param buffer INT8U []
4750  * @param bufferLen int
4751  */
4752 #define emberAfFillCommandData                                                                                                     \
4753     SharingClusterRecordTransmission(transmitOptions, buffer, bufferLen)                                                           \
4754         emberAfFillExternalBuffer(mask,                                                                                            \
4755                                                                                                                                    \
4756                                   ZCL_RECORD_TRANSMISSION_COMMAND_ID, "ub", transmitOptions, buffer, bufferLen);
4757
4758 /** @brief Command description for SearchGame
4759  *
4760  * Command: SearchGame
4761  * @param specificGame ENUM8
4762  * @param gameId INT16U
4763  * @param gameId INT16U
4764  * @param gameMaster BOOLEAN
4765  * @param listOfGame CHAR_STRING
4766  */
4767 #define emberAfFillCommandGamingClusterSearchGame(specificGame, gameId, gameId, gameMaster, listOfGame)                            \
4768     emberAfFillExternalBuffer(mask,                                                                                                \
4769                                                                                                                                    \
4770                               ZCL_SEARCH_GAME_COMMAND_ID, "uuuuu", specificGame, gameId, gameId, gameMaster, listOfGame);
4771
4772 /** @brief Command description for JoinGame
4773  *
4774  * Command: JoinGame
4775  * @param gameId INT16U
4776  * @param commandId INT8U
4777  * @param joinAsMaster BOOLEAN
4778  * @param status BITMAP8
4779  * @param nameOfGame CHAR_STRING
4780  * @param message CHAR_STRING
4781  */
4782 #define emberAfFillCommandGamingClusterJoinGame(gameId, commandId, joinAsMaster, status, nameOfGame, message)                      \
4783     emberAfFillExternalBuffer(mask,                                                                                                \
4784                                                                                                                                    \
4785                               ZCL_JOIN_GAME_COMMAND_ID, "uuuuuu", gameId, commandId, joinAsMaster, status, nameOfGame, message);
4786
4787 /** @brief Command description for StartGame
4788  *
4789  * Command: StartGame
4790  */
4791 #define emberAfFillCommandGamingClusterStartGame()                                                                                 \
4792     emberAfFillExternalBuffer(mask,                                                                                                \
4793                                                                                                                                    \
4794                               ZCL_START_GAME_COMMAND_ID, "", );
4795
4796 /** @brief Command description for PauseGame
4797  *
4798  * Command: PauseGame
4799  */
4800 #define emberAfFillCommandGamingClusterPauseGame()                                                                                 \
4801     emberAfFillExternalBuffer(mask,                                                                                                \
4802                                                                                                                                    \
4803                               ZCL_PAUSE_GAME_COMMAND_ID, "", );
4804
4805 /** @brief Command description for ResumeGame
4806  *
4807  * Command: ResumeGame
4808  */
4809 #define emberAfFillCommandGamingClusterResumeGame()                                                                                \
4810     emberAfFillExternalBuffer(mask,                                                                                                \
4811                                                                                                                                    \
4812                               ZCL_RESUME_GAME_COMMAND_ID, "", );
4813
4814 /** @brief Command description for QuitGame
4815  *
4816  * Command: QuitGame
4817  */
4818 #define emberAfFillCommandGamingClusterQuitGame()                                                                                  \
4819     emberAfFillExternalBuffer(mask,                                                                                                \
4820                                                                                                                                    \
4821                               ZCL_QUIT_GAME_COMMAND_ID, "", );
4822
4823 /** @brief Command description for EndGame
4824  *
4825  * Command: EndGame
4826  */
4827 #define emberAfFillCommandGamingClusterEndGame()                                                                                   \
4828     emberAfFillExternalBuffer(mask,                                                                                                \
4829                                                                                                                                    \
4830                               ZCL_END_GAME_COMMAND_ID, "", );
4831
4832 /** @brief Command description for StartOver
4833  *
4834  * Command: StartOver
4835  */
4836 #define emberAfFillCommandGamingClusterStartOver()                                                                                 \
4837     emberAfFillExternalBuffer(mask,                                                                                                \
4838                                                                                                                                    \
4839                               ZCL_START_OVER_COMMAND_ID, "", );
4840
4841 /** @brief Command description for ActionControl
4842  *
4843  * Command: ActionControl
4844  * @param actions BITMAP32
4845  */
4846 #define emberAfFillCommandGamingClusterActionControl(actions)                                                                      \
4847     emberAfFillExternalBuffer(mask,                                                                                                \
4848                                                                                                                                    \
4849                               ZCL_ACTION_CONTROL_COMMAND_ID, "u", actions);
4850
4851 /** @brief Command description for DownloadGame
4852  *
4853  * Command: DownloadGame
4854  */
4855 #define emberAfFillCommandGamingClusterDownloadGame()                                                                              \
4856     emberAfFillExternalBuffer(mask,                                                                                                \
4857                                                                                                                                    \
4858                               ZCL_DOWNLOAD_GAME_COMMAND_ID, "", );
4859
4860 /** @brief Command description for PathCreation
4861  *
4862  * Command: PathCreation
4863  * @param originatorAddress DATA16
4864  * @param originatorAddress DATA16
4865  * @param destinationAddress DATA16
4866  * @param destinationAddress DATA16
4867  * @param dataRate INT8U
4868  * @param dataRate INT8U
4869  */
4870 #define emberAfFillCommandData                                                                                                     \
4871     Rate ControlClusterPathCreation(originatorAddress, originatorAddress, destinationAddress, destinationAddress, dataRate,        \
4872                                     dataRate)                                                                                      \
4873         emberAfFillExternalBuffer(mask,                                                                                            \
4874                                                                                                                                    \
4875                                   ZCL_PATH_CREATION_COMMAND_ID, "uuuuuu", originatorAddress, originatorAddress,                    \
4876                                   destinationAddress, destinationAddress, dataRate, dataRate);
4877
4878 /** @brief Command description for DataRateNotification
4879  *
4880  * Command: DataRateNotification
4881  * @param originatorAddress DATA16
4882  * @param destinationAddress DATA16
4883  * @param dataRate INT8U
4884  */
4885 #define emberAfFillCommandData                                                                                                     \
4886     Rate ControlClusterDataRateNotification(originatorAddress, destinationAddress, dataRate)                                       \
4887         emberAfFillExternalBuffer(mask,                                                                                            \
4888                                                                                                                                    \
4889                                   ZCL_DATA_RATE_NOTIFICATION_COMMAND_ID, "uuu", originatorAddress, destinationAddress, dataRate);
4890
4891 /** @brief Command description for PathDeletion
4892  *
4893  * Command: PathDeletion
4894  * @param originatorAddress DATA16
4895  * @param destinationAddress DATA16
4896  */
4897 #define emberAfFillCommandData                                                                                                     \
4898     Rate ControlClusterPathDeletion(originatorAddress, destinationAddress)                                                         \
4899         emberAfFillExternalBuffer(mask,                                                                                            \
4900                                                                                                                                    \
4901                                   ZCL_PATH_DELETION_COMMAND_ID, "uu", originatorAddress, destinationAddress);
4902
4903 /** @brief Command description for EstablishmentRequest
4904  *
4905  * Command: EstablishmentRequest
4906  * @param flag BITMAP8
4907  * @param ackNack ENUM8
4908  * @param codecType ENUM8
4909  * @param codecType ENUM8
4910  * @param sampFreq ENUM8
4911  * @param codecRate ENUM8
4912  * @param serviceType ENUM8
4913  * @param buffer INT8U []
4914  * @param bufferLen int
4915  */
4916 #define emberAfFillCommandVoice                                                                                                    \
4917     over ZigBeeClusterEstablishmentRequest(flag, ackNack, codecType, codecType, sampFreq, codecRate, serviceType, buffer,          \
4918                                            bufferLen)                                                                              \
4919         emberAfFillExternalBuffer(mask,                                                                                            \
4920                                                                                                                                    \
4921                                   ZCL_ESTABLISHMENT_REQUEST_COMMAND_ID, "uuuuuuub", flag, ackNack, codecType, codecType, sampFreq, \
4922                                   codecRate, serviceType, buffer, bufferLen);
4923
4924 /** @brief Command description for VoiceTransmission
4925  *
4926  * Command: VoiceTransmission
4927  * @param voiceData INT8U []
4928  * @param voiceDataLen int
4929  * @param sequenceNumber INT8U
4930  * @param errorFlag ENUM8
4931  */
4932 #define emberAfFillCommandVoice                                                                                                    \
4933     over ZigBeeClusterVoiceTransmission(voiceData, voiceDataLen, sequenceNumber, errorFlag)                                        \
4934         emberAfFillExternalBuffer(mask,                                                                                            \
4935                                                                                                                                    \
4936                                   ZCL_VOICE_TRANSMISSION_COMMAND_ID, "buu", voiceData, voiceDataLen, sequenceNumber, errorFlag);
4937
4938 /** @brief Command description for VoiceTransmissionCompletion
4939  *
4940  * Command: VoiceTransmissionCompletion
4941  * @param controlType ENUM8
4942  */
4943 #define emberAfFillCommandVoice                                                                                                    \
4944     over ZigBeeClusterVoiceTransmissionCompletion(controlType)                                                                     \
4945         emberAfFillExternalBuffer(mask,                                                                                            \
4946                                                                                                                                    \
4947                                   ZCL_VOICE_TRANSMISSION_COMPLETION_COMMAND_ID, "u", controlType);
4948
4949 /** @brief Command description for ControlResponse
4950  *
4951  * Command: ControlResponse
4952  * @param ackNack ENUM8
4953  */
4954 #define emberAfFillCommandVoice                                                                                                    \
4955     over ZigBeeClusterControlResponse(ackNack) emberAfFillExternalBuffer(mask,                                                     \
4956                                                                                                                                    \
4957                                                                          ZCL_CONTROL_RESPONSE_COMMAND_ID, "u", ackNack);
4958
4959 /** @brief Command description for JoinChatRequest
4960  *
4961  * Command: JoinChatRequest
4962  * @param uid INT16U
4963  * @param status ENUM8
4964  * @param nickname CHAR_STRING
4965  * @param cid INT16U
4966  * @param cid INT16U
4967  */
4968 #define emberAfFillCommandChattingClusterJoinChatRequest(uid, status, nickname, cid, cid)                                          \
4969     emberAfFillExternalBuffer(mask,                                                                                                \
4970                                                                                                                                    \
4971                               ZCL_JOIN_CHAT_REQUEST_COMMAND_ID, "uuuuu", uid, status, nickname, cid, cid);
4972
4973 /** @brief Command description for LeaveChatRequest
4974  *
4975  * Command: LeaveChatRequest
4976  * @param cid INT16U
4977  * @param status ENUM8
4978  * @param uid INT16U
4979  * @param cid INT16U
4980  * @param chatParticipantList ChatParticipant []
4981  * @param chatParticipantListLen int
4982  */
4983 #define emberAfFillCommandChattingClusterLeaveChatRequest(cid, status, uid, cid, chatParticipantList, chatParticipantListLen)      \
4984     emberAfFillExternalBuffer(mask,                                                                                                \
4985                                                                                                                                    \
4986                               ZCL_LEAVE_CHAT_REQUEST_COMMAND_ID, "uuuub", cid, status, uid, cid, chatParticipantList,              \
4987                               chatParticipantListLen);
4988
4989 /** @brief Command description for SearchChatRequest
4990  *
4991  * Command: SearchChatRequest
4992  * @param cid INT16U
4993  * @param uid INT16U
4994  * @param nickname CHAR_STRING
4995  */
4996 #define emberAfFillCommandChattingClusterSearchChatRequest(cid, uid, nickname)                                                     \
4997     emberAfFillExternalBuffer(mask,                                                                                                \
4998                                                                                                                                    \
4999                               ZCL_SEARCH_CHAT_REQUEST_COMMAND_ID, "uuu", cid, uid, nickname);
5000
5001 /** @brief Command description for SwitchChairmanResponse
5002  *
5003  * Command: SwitchChairmanResponse
5004  * @param cid INT16U
5005  * @param cid INT16U
5006  * @param uid INT16U
5007  * @param uid INT16U
5008  * @param nickname CHAR_STRING
5009  */
5010 #define emberAfFillCommandChattingClusterSwitchChairmanResponse(cid, cid, uid, uid, nickname)                                      \
5011     emberAfFillExternalBuffer(mask,                                                                                                \
5012                                                                                                                                    \
5013                               ZCL_SWITCH_CHAIRMAN_RESPONSE_COMMAND_ID, "uuuuu", cid, cid, uid, uid, nickname);
5014
5015 /** @brief Command description for StartChatRequest
5016  *
5017  * Command: StartChatRequest
5018  * @param name CHAR_STRING
5019  * @param options BITMAP8
5020  * @param uid INT16U
5021  * @param chatRoomList ChatRoom []
5022  * @param chatRoomListLen int
5023  * @param nickname CHAR_STRING
5024  */
5025 #define emberAfFillCommandChattingClusterStartChatRequest(name, options, uid, chatRoomList, chatRoomListLen, nickname)             \
5026     emberAfFillExternalBuffer(mask,                                                                                                \
5027                                                                                                                                    \
5028                               ZCL_START_CHAT_REQUEST_COMMAND_ID, "uuubu", name, options, uid, chatRoomList, chatRoomListLen,       \
5029                               nickname);
5030
5031 /** @brief Command description for ChatMessage
5032  *
5033  * Command: ChatMessage
5034  * @param destinationUid INT16U
5035  * @param cid INT16U
5036  * @param sourceUid INT16U
5037  * @param cid INT16U
5038  * @param nickname CHAR_STRING
5039  * @param message CHAR_STRING
5040  */
5041 #define emberAfFillCommandChattingClusterChatMessage(destinationUid, cid, sourceUid, cid, nickname, message)                       \
5042     emberAfFillExternalBuffer(mask,                                                                                                \
5043                                                                                                                                    \
5044                               ZCL_CHAT_MESSAGE_COMMAND_ID, "uuuuuu", destinationUid, cid, sourceUid, cid, nickname, message);
5045
5046 /** @brief Command description for GetNodeInformationRequest
5047  *
5048  * Command: GetNodeInformationRequest
5049  * @param cid INT16U
5050  * @param cid INT16U
5051  * @param uid INT16U
5052  * @param nodeInformationList NodeInformation []
5053  * @param nodeInformationListLen int
5054  */
5055 #define emberAfFillCommandChattingClusterGetNodeInformationRequest(cid, cid, uid, nodeInformationList, nodeInformationListLen)     \
5056     emberAfFillExternalBuffer(mask,                                                                                                \
5057                                                                                                                                    \
5058                               ZCL_GET_NODE_INFORMATION_REQUEST_COMMAND_ID, "uuub", cid, cid, uid, nodeInformationList,             \
5059                               nodeInformationListLen);
5060
5061 /** @brief Command description for SwitchChairmanNotification
5062  *
5063  * Command: SwitchChairmanNotification
5064  * @param cid INT16U
5065  * @param uid INT16U
5066  * @param address DATA16
5067  * @param endpoint INT8U
5068  */
5069 #define emberAfFillCommandChattingClusterSwitchChairmanNotification(cid, uid, address, endpoint)                                   \
5070     emberAfFillExternalBuffer(mask,                                                                                                \
5071                                                                                                                                    \
5072                               ZCL_SWITCH_CHAIRMAN_NOTIFICATION_COMMAND_ID, "uuuu", cid, uid, address, endpoint);
5073
5074 /** @brief Command description for GetNodeInformationResponse
5075  *
5076  * Command: GetNodeInformationResponse
5077  * @param status ENUM8
5078  * @param cid INT16U
5079  * @param uid INT16U
5080  * @param addressEndpointAndNickname INT8U []
5081  * @param addressEndpointAndNicknameLen int
5082  */
5083 #define emberAfFillCommandChattingClusterGetNodeInformationResponse(status, cid, uid, addressEndpointAndNickname,                  \
5084                                                                     addressEndpointAndNicknameLen)                                 \
5085     emberAfFillExternalBuffer(mask,                                                                                                \
5086                                                                                                                                    \
5087                               ZCL_GET_NODE_INFORMATION_RESPONSE_COMMAND_ID, "uuub", status, cid, uid, addressEndpointAndNickname,  \
5088                               addressEndpointAndNicknameLen);
5089
5090 /** @brief Command description for BuyRequest
5091  *
5092  * Command: BuyRequest
5093  * @param userId OCTET_STRING
5094  * @param serialNumber OCTET_STRING
5095  * @param userType INT16U
5096  * @param currency INT32U
5097  * @param serviceId INT16U
5098  * @param priceTrailingDigit INT8U
5099  * @param goodId OCTET_STRING
5100  * @param price INT32U
5101  * @param timestamp OCTET_STRING
5102  * @param transId INT16U
5103  * @param transStatus ENUM8
5104  */
5105 #define emberAfFillCommandPaymentClusterBuyRequest(userId, serialNumber, userType, currency, serviceId, priceTrailingDigit,        \
5106                                                    goodId, price, timestamp, transId, transStatus)                                 \
5107     emberAfFillExternalBuffer(mask,                                                                                                \
5108                                                                                                                                    \
5109                               ZCL_BUY_REQUEST_COMMAND_ID, "uuuuuuuuuuu", userId, serialNumber, userType, currency, serviceId,      \
5110                               priceTrailingDigit, goodId, price, timestamp, transId, transStatus);
5111
5112 /** @brief Command description for AcceptPayment
5113  *
5114  * Command: AcceptPayment
5115  * @param userId OCTET_STRING
5116  * @param serialNumber OCTET_STRING
5117  * @param userType INT16U
5118  * @param currency INT32U
5119  * @param serviceId INT16U
5120  * @param priceTrailingDigit INT8U
5121  * @param goodId OCTET_STRING
5122  * @param price INT32U
5123  * @param timestamp OCTET_STRING
5124  */
5125 #define emberAfFillCommandPaymentClusterAcceptPayment(userId, serialNumber, userType, currency, serviceId, priceTrailingDigit,     \
5126                                                       goodId, price, timestamp)                                                    \
5127     emberAfFillExternalBuffer(mask,                                                                                                \
5128                                                                                                                                    \
5129                               ZCL_ACCEPT_PAYMENT_COMMAND_ID, "uuuuuuuuu", userId, serialNumber, userType, currency, serviceId,     \
5130                               priceTrailingDigit, goodId, price, timestamp);
5131
5132 /** @brief Command description for PaymentConfirm
5133  *
5134  * Command: PaymentConfirm
5135  * @param serialNumber OCTET_STRING
5136  * @param serialNumber OCTET_STRING
5137  * @param transId INT16U
5138  * @param status ENUM8
5139  * @param transStatus ENUM8
5140  */
5141 #define emberAfFillCommandPaymentClusterPaymentConfirm(serialNumber, serialNumber, transId, status, transStatus)                   \
5142     emberAfFillExternalBuffer(mask,                                                                                                \
5143                                                                                                                                    \
5144                               ZCL_PAYMENT_CONFIRM_COMMAND_ID, "uuuuu", serialNumber, serialNumber, transId, status, transStatus);
5145
5146 /** @brief Command description for Subscribe
5147  *
5148  * Command: Subscribe
5149  * @param userId OCTET_STRING
5150  * @param userId OCTET_STRING
5151  * @param serviceId INT16U
5152  * @param serviceId INT16U
5153  * @param serviceProviderId INT16U
5154  * @param serviceProviderId INT16U
5155  */
5156 #define emberAfFillCommandBillingClusterSubscribe(userId, userId, serviceId, serviceId, serviceProviderId, serviceProviderId)      \
5157     emberAfFillExternalBuffer(mask,                                                                                                \
5158                                                                                                                                    \
5159                               ZCL_SUBSCRIBE_COMMAND_ID, "uuuuuu", userId, userId, serviceId, serviceId, serviceProviderId,         \
5160                               serviceProviderId);
5161
5162 /** @brief Command description for Unsubscribe
5163  *
5164  * Command: Unsubscribe
5165  * @param userId OCTET_STRING
5166  * @param userId OCTET_STRING
5167  * @param serviceId INT16U
5168  * @param serviceId INT16U
5169  * @param serviceProviderId INT16U
5170  * @param serviceProviderId INT16U
5171  * @param timestamp OCTET_STRING
5172  * @param duration INT16U
5173  */
5174 #define emberAfFillCommandBillingClusterUnsubscribe(userId, userId, serviceId, serviceId, serviceProviderId, serviceProviderId,    \
5175                                                     timestamp, duration)                                                           \
5176     emberAfFillExternalBuffer(mask,                                                                                                \
5177                                                                                                                                    \
5178                               ZCL_UNSUBSCRIBE_COMMAND_ID, "uuuuuuuu", userId, userId, serviceId, serviceId, serviceProviderId,     \
5179                               serviceProviderId, timestamp, duration);
5180
5181 /** @brief Command description for StartBillingSession
5182  *
5183  * Command: StartBillingSession
5184  * @param userId OCTET_STRING
5185  * @param serviceId INT16U
5186  * @param serviceProviderId INT16U
5187  */
5188 #define emberAfFillCommandBillingClusterStartBillingSession(userId, serviceId, serviceProviderId)                                  \
5189     emberAfFillExternalBuffer(mask,                                                                                                \
5190                                                                                                                                    \
5191                               ZCL_START_BILLING_SESSION_COMMAND_ID, "uuu", userId, serviceId, serviceProviderId);
5192
5193 /** @brief Command description for StopBillingSession
5194  *
5195  * Command: StopBillingSession
5196  * @param userId OCTET_STRING
5197  * @param serviceId INT16U
5198  * @param serviceProviderId INT16U
5199  */
5200 #define emberAfFillCommandBillingClusterStopBillingSession(userId, serviceId, serviceProviderId)                                   \
5201     emberAfFillExternalBuffer(mask,                                                                                                \
5202                                                                                                                                    \
5203                               ZCL_STOP_BILLING_SESSION_COMMAND_ID, "uuu", userId, serviceId, serviceProviderId);
5204
5205 /** @brief Command description for BillStatusNotification
5206  *
5207  * Command: BillStatusNotification
5208  * @param userId OCTET_STRING
5209  * @param status ENUM8
5210  */
5211 #define emberAfFillCommandBillingClusterBillStatusNotification(userId, status)                                                     \
5212     emberAfFillExternalBuffer(mask,                                                                                                \
5213                                                                                                                                    \
5214                               ZCL_BILL_STATUS_NOTIFICATION_COMMAND_ID, "uu", userId, status);
5215
5216 /** @brief Command description for SessionKeepAlive
5217  *
5218  * Command: SessionKeepAlive
5219  * @param userId OCTET_STRING
5220  * @param serviceId INT16U
5221  * @param serviceProviderId INT16U
5222  */
5223 #define emberAfFillCommandBillingClusterSessionKeepAlive(userId, serviceId, serviceProviderId)                                     \
5224     emberAfFillExternalBuffer(mask,                                                                                                \
5225                                                                                                                                    \
5226                               ZCL_SESSION_KEEP_ALIVE_COMMAND_ID, "uuu", userId, serviceId, serviceProviderId);
5227
5228 /** @brief Command description for GetAlerts
5229  *
5230  * Command: GetAlerts
5231  * @param alertsCount AlertCount
5232  * @param alertStructures AlertStructure []
5233  * @param alertStructuresLen int
5234  */
5235 #define emberAfFillCommandAppliance                                                                                                \
5236     Events and AlertClusterGetAlerts(alertsCount, alertStructures, alertStructuresLen)                                             \
5237         emberAfFillExternalBuffer(mask,                                                                                            \
5238                                                                                                                                    \
5239                                   ZCL_GET_ALERTS_COMMAND_ID, "ub", alertsCount, alertStructures, alertStructuresLen);
5240
5241 /** @brief Command description for AlertsNotification
5242  *
5243  * Command: AlertsNotification
5244  * @param alertsCount AlertCount
5245  * @param alertStructures AlertStructure []
5246  * @param alertStructuresLen int
5247  */
5248 #define emberAfFillCommandAppliance                                                                                                \
5249     Events and AlertClusterAlertsNotification(alertsCount, alertStructures, alertStructuresLen)                                    \
5250         emberAfFillExternalBuffer(mask,                                                                                            \
5251                                                                                                                                    \
5252                                   ZCL_ALERTS_NOTIFICATION_COMMAND_ID, "ub", alertsCount, alertStructures, alertStructuresLen);
5253
5254 /** @brief Command description for EventsNotification
5255  *
5256  * Command: EventsNotification
5257  * @param eventHeader INT8U
5258  * @param eventId EventIdentification
5259  */
5260 #define emberAfFillCommandAppliance                                                                                                \
5261     Events and AlertClusterEventsNotification(eventHeader, eventId)                                                                \
5262         emberAfFillExternalBuffer(mask,                                                                                            \
5263                                                                                                                                    \
5264                                   ZCL_EVENTS_NOTIFICATION_COMMAND_ID, "uu", eventHeader, eventId);
5265
5266 /** @brief Command description for LogNotification
5267  *
5268  * Command: LogNotification
5269  * @param timeStamp TIME_OF_DAY
5270  * @param logId INT32U
5271  * @param logId INT32U
5272  * @param logLength INT32U
5273  * @param logPayload INT8U []
5274  * @param logPayloadLen int
5275  */
5276 #define emberAfFillCommandAppliance                                                                                                \
5277     StatisticsClusterLogNotification(timeStamp, logId, logId, logLength, logPayload, logPayloadLen) emberAfFillExternalBuffer(     \
5278         mask,                                                                                                                      \
5279                                                                                                                                    \
5280         ZCL_LOG_NOTIFICATION_COMMAND_ID, "uuuub", timeStamp, logId, logId, logLength, logPayload, logPayloadLen);
5281
5282 /** @brief Command description for LogQueueRequest
5283  *
5284  * Command: LogQueueRequest
5285  * @param timeStamp TIME_OF_DAY
5286  * @param logId INT32U
5287  * @param logLength INT32U
5288  * @param logPayload INT8U []
5289  * @param logPayloadLen int
5290  */
5291 #define emberAfFillCommandAppliance                                                                                                \
5292     StatisticsClusterLogQueueRequest(timeStamp, logId, logLength, logPayload, logPayloadLen) emberAfFillExternalBuffer(            \
5293         mask,                                                                                                                      \
5294                                                                                                                                    \
5295         ZCL_LOG_QUEUE_REQUEST_COMMAND_ID, "uuub", timeStamp, logId, logLength, logPayload, logPayloadLen);
5296
5297 /** @brief Command description for LogQueueResponse
5298  *
5299  * Command: LogQueueResponse
5300  * @param logQueueSize INT8U
5301  * @param logIds INT32U []
5302  * @param logIdsLen int
5303  */
5304 #define emberAfFillCommandAppliance                                                                                                \
5305     StatisticsClusterLogQueueResponse(logQueueSize, logIds, logIdsLen)                                                             \
5306         emberAfFillExternalBuffer(mask,                                                                                            \
5307                                                                                                                                    \
5308                                   ZCL_LOG_QUEUE_RESPONSE_COMMAND_ID, "ub", logQueueSize, logIds, logIdsLen);
5309
5310 /** @brief Command description for StatisticsAvailable
5311  *
5312  * Command: StatisticsAvailable
5313  * @param logQueueSize INT8U
5314  * @param logIds INT32U []
5315  * @param logIdsLen int
5316  */
5317 #define emberAfFillCommandAppliance                                                                                                \
5318     StatisticsClusterStatisticsAvailable(logQueueSize, logIds, logIdsLen)                                                          \
5319         emberAfFillExternalBuffer(mask,                                                                                            \
5320                                                                                                                                    \
5321                                   ZCL_STATISTICS_AVAILABLE_COMMAND_ID, "ub", logQueueSize, logIds, logIdsLen);
5322
5323 /** @brief Command description for GetProfileInfoCommand
5324  *
5325  * Command: GetProfileInfoCommand
5326  * @param profileCount INT8U
5327  * @param profileIntervalPeriod ENUM8
5328  * @param maxNumberOfIntervals INT8U
5329  * @param listOfAttributes INT16U []
5330  * @param listOfAttributesLen int
5331  */
5332 #define emberAfFillCommandElectrical                                                                                               \
5333     MeasurementClusterGetProfileInfoCommand(profileCount, profileIntervalPeriod, maxNumberOfIntervals, listOfAttributes,           \
5334                                             listOfAttributesLen)                                                                   \
5335         emberAfFillExternalBuffer(mask,                                                                                            \
5336                                                                                                                                    \
5337                                   ZCL_GET_PROFILE_INFO_COMMAND_COMMAND_ID, "uuub", profileCount, profileIntervalPeriod,            \
5338                                   maxNumberOfIntervals, listOfAttributes, listOfAttributesLen);
5339
5340 /** @brief Command description for GetMeasurementProfileResponseCommand
5341  *
5342  * Command: GetMeasurementProfileResponseCommand
5343  * @param startTime INT32U
5344  * @param attributeId INT16U
5345  * @param status ENUM8
5346  * @param startTime INT32U
5347  * @param profileIntervalPeriod ENUM8
5348  * @param numberOfIntervals ENUM8
5349  * @param numberOfIntervalsDelivered INT8U
5350  * @param attributeId INT16U
5351  * @param intervals INT8U []
5352  * @param intervalsLen int
5353  */
5354 #define emberAfFillCommandElectrical                                                                                               \
5355     MeasurementClusterGetMeasurementProfileResponseCommand(startTime, attributeId, status, startTime, profileIntervalPeriod,       \
5356                                                            numberOfIntervals, numberOfIntervalsDelivered, attributeId, intervals,  \
5357                                                            intervalsLen)                                                           \
5358         emberAfFillExternalBuffer(mask,                                                                                            \
5359                                                                                                                                    \
5360                                   ZCL_GET_MEASUREMENT_PROFILE_RESPONSE_COMMAND_COMMAND_ID, "uuuuuuuub", startTime, attributeId,    \
5361                                   status, startTime, profileIntervalPeriod, numberOfIntervals, numberOfIntervalsDelivered,         \
5362                                   attributeId, intervals, intervalsLen);
5363
5364 /** @brief Command description for ScanRequest
5365  *
5366  * Command: ScanRequest
5367  * @param transaction INT32U
5368  * @param zigbeeInformation ZigbeeInformation
5369  * @param zllInformation ZllInformation
5370  */
5371 #define emberAfFillCommandZLL                                                                                                      \
5372     CommissioningClusterScanRequest(transaction, zigbeeInformation, zllInformation)                                                \
5373         emberAfFillExternalBuffer(mask,                                                                                            \
5374                                                                                                                                    \
5375                                   ZCL_SCAN_REQUEST_COMMAND_ID, "uuu", transaction, zigbeeInformation, zllInformation);
5376
5377 /** @brief Command description for ScanResponse
5378  *
5379  * Command: ScanResponse
5380  * @param transaction INT32U
5381  * @param rssiCorrection INT8U
5382  * @param zigbeeInformation ZigbeeInformation
5383  * @param zllInformation ZllInformation
5384  * @param keyBitmask KeyBitmask
5385  * @param responseId INT32U
5386  * @param extendedPanId IEEE_ADDRESS
5387  * @param networkUpdateId INT8U
5388  * @param logicalChannel INT8U
5389  * @param panId INT16U
5390  * @param networkAddress INT16U
5391  * @param numberOfSubDevices INT8U
5392  * @param totalGroupIds INT8U
5393  * @param endpointId INT8U
5394  * @param profileId INT16U
5395  * @param deviceId INT16U
5396  * @param version INT8U
5397  * @param groupIdCount INT8U
5398  */
5399 #define emberAfFillCommandZLL                                                                                                      \
5400     CommissioningClusterScanResponse(transaction, rssiCorrection, zigbeeInformation, zllInformation, keyBitmask, responseId,       \
5401                                      extendedPanId, networkUpdateId, logicalChannel, panId, networkAddress, numberOfSubDevices,    \
5402                                      totalGroupIds, endpointId, profileId, deviceId, version, groupIdCount)                        \
5403         emberAfFillExternalBuffer(mask,                                                                                            \
5404                                                                                                                                    \
5405                                   ZCL_SCAN_RESPONSE_COMMAND_ID, "uuuuuuuuuuuuuuuuuu", transaction, rssiCorrection,                 \
5406                                   zigbeeInformation, zllInformation, keyBitmask, responseId, extendedPanId, networkUpdateId,       \
5407                                   logicalChannel, panId, networkAddress, numberOfSubDevices, totalGroupIds, endpointId, profileId, \
5408                                   deviceId, version, groupIdCount);
5409
5410 /** @brief Command description for DeviceInformationRequest
5411  *
5412  * Command: DeviceInformationRequest
5413  * @param transaction INT32U
5414  * @param startIndex INT8U
5415  */
5416 #define emberAfFillCommandZLL                                                                                                      \
5417     CommissioningClusterDeviceInformationRequest(transaction, startIndex)                                                          \
5418         emberAfFillExternalBuffer(mask,                                                                                            \
5419                                                                                                                                    \
5420                                   ZCL_DEVICE_INFORMATION_REQUEST_COMMAND_ID, "uu", transaction, startIndex);
5421
5422 /** @brief Command description for DeviceInformationResponse
5423  *
5424  * Command: DeviceInformationResponse
5425  * @param transaction INT32U
5426  * @param numberOfSubDevices INT8U
5427  * @param startIndex INT8U
5428  * @param deviceInformationRecordCount INT8U
5429  * @param deviceInformationRecordList DeviceInformationRecord []
5430  * @param deviceInformationRecordListLen int
5431  */
5432 #define emberAfFillCommandZLL                                                                                                      \
5433     CommissioningClusterDeviceInformationResponse(transaction, numberOfSubDevices, startIndex, deviceInformationRecordCount,       \
5434                                                   deviceInformationRecordList, deviceInformationRecordListLen)                     \
5435         emberAfFillExternalBuffer(mask,                                                                                            \
5436                                                                                                                                    \
5437                                   ZCL_DEVICE_INFORMATION_RESPONSE_COMMAND_ID, "uuuub", transaction, numberOfSubDevices,            \
5438                                   startIndex, deviceInformationRecordCount, deviceInformationRecordList,                           \
5439                                   deviceInformationRecordListLen);
5440
5441 /** @brief Command description for IdentifyRequest
5442  *
5443  * Command: IdentifyRequest
5444  * @param transaction INT32U
5445  * @param identifyDuration INT16U
5446  */
5447 #define emberAfFillCommandZLL CommissioningClusterIdent