From 05c43992b664bd03b55b56f48641e45aee49322f Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Fri, 21 May 2021 14:03:49 +0800 Subject: [PATCH 1/8] gen files --- .../all-clusters-common/gen/callback-stub.cpp | 5 +- .../all-clusters-common/gen/callback.h | 195 +++++++----------- .../bridge-common/gen/callback-stub.cpp | 5 +- .../bridge-app/bridge-common/gen/callback.h | 47 ++--- .../lighting-common/gen/callback-stub.cpp | 5 +- .../lighting-common/gen/callback.h | 53 +++-- .../lock-common/gen/callback-stub.cpp | 5 +- examples/lock-app/lock-common/gen/callback.h | 48 ++--- .../pump-common/gen/callback-stub.cpp | 5 +- examples/pump-app/pump-common/gen/callback.h | 48 ++--- .../gen/callback-stub.cpp | 5 +- .../pump-controller-common/gen/callback.h | 36 ++-- .../esp32/main/gen/callback-stub.cpp | 5 +- .../esp32/main/gen/callback.h | 44 ++-- .../tv-app/tv-common/gen/callback-stub.cpp | 5 +- examples/tv-app/tv-common/gen/callback.h | 101 ++++----- .../window-app/common/gen/callback-stub.cpp | 5 +- examples/window-app/common/gen/callback.h | 22 +- .../data_model/gen/callback-stub.cpp | 5 +- src/controller/data_model/gen/callback.h | 175 +++++++--------- 20 files changed, 343 insertions(+), 476 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp index d06155ed724a8c..eed90ef0240fc8 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp @@ -694,9 +694,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback.h b/examples/all-clusters-app/all-clusters-common/gen/callback.h index 6685d665a2571c..1f6250a2b35cd1 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback.h +++ b/examples/all-clusters-app/all-clusters-common/gen/callback.h @@ -462,9 +462,8 @@ void emberAfAccountLoginClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAccountLoginClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfAccountLoginClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Account Login Cluster Server Pre Attribute Changed * @@ -532,8 +531,7 @@ void emberAfApplicationBasicClusterServerManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfApplicationBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Application Basic Cluster Server Pre Attribute Changed @@ -603,9 +601,9 @@ void emberAfApplicationLauncherClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationLauncherClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfApplicationLauncherClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Application Launcher Cluster Server Pre Attribute Changed * @@ -674,9 +672,8 @@ void emberAfAudioOutputClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAudioOutputClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfAudioOutputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Audio Output Cluster Server Pre Attribute Changed * @@ -744,9 +741,8 @@ void emberAfBarrierControlClusterServerManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBarrierControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfBarrierControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Barrier Control Cluster Server Pre Attribute Changed * @@ -814,8 +810,8 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed * @@ -954,9 +950,8 @@ void emberAfBindingClusterServerManufacturerSpecificAttributeChangedCallback(chi * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBindingClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfBindingClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Binding Cluster Server Pre Attribute Changed * @@ -1095,9 +1090,8 @@ void emberAfColorControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfColorControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfColorControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Color Control Cluster Server Pre Attribute Changed * @@ -1165,9 +1159,8 @@ void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfContentLaunchClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfContentLaunchClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Content Launch Cluster Server Pre Attribute Changed * @@ -1235,9 +1228,8 @@ void emberAfDescriptorClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDescriptorClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfDescriptorClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Descriptor Cluster Server Pre Attribute Changed * @@ -1305,9 +1297,8 @@ void emberAfDoorLockClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDoorLockClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfDoorLockClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Door Lock Cluster Server Pre Attribute Changed * @@ -1376,8 +1367,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1518,9 +1508,9 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Commissioning Cluster Server Pre Attribute Changed * @@ -1589,8 +1579,7 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed @@ -1660,8 +1649,7 @@ void emberAfGroupKeyManagementClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupKeyManagementClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGroupKeyManagementClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Group Key Management Cluster Server Pre Attribute Changed @@ -1731,9 +1719,8 @@ void emberAfGroupsClusterServerManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupsClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfGroupsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Groups Cluster Server Pre Attribute Changed * @@ -1801,9 +1788,8 @@ void emberAfIasZoneClusterServerManufacturerSpecificAttributeChangedCallback(chi * @param message The message that was sent * @param status The status of the sent message */ -void emberAfIasZoneClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfIasZoneClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief IAS Zone Cluster Server Pre Attribute Changed * @@ -1871,9 +1857,8 @@ void emberAfIdentifyClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfIdentifyClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfIdentifyClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Identify Cluster Server Pre Attribute Changed * @@ -1941,9 +1926,8 @@ void emberAfKeypadInputClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfKeypadInputClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfKeypadInputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Keypad Input Cluster Server Pre Attribute Changed * @@ -2011,9 +1995,8 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLevelControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed * @@ -2081,9 +2064,8 @@ void emberAfLowPowerClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLowPowerClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLowPowerClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Low Power Cluster Server Pre Attribute Changed * @@ -2151,9 +2133,8 @@ void emberAfMediaInputClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaInputClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfMediaInputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Input Cluster Server Pre Attribute Changed * @@ -2221,9 +2202,8 @@ void emberAfMediaPlaybackClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaPlaybackClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfMediaPlaybackClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Playback Cluster Server Pre Attribute Changed * @@ -2291,9 +2271,9 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Server Pre Attribute Changed * @@ -2362,8 +2342,7 @@ void emberAfOtaSoftwareUpdateClientClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOtaSoftwareUpdateClientClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOtaSoftwareUpdateClientClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2434,8 +2413,7 @@ void emberAfOtaSoftwareUpdateServerClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOtaSoftwareUpdateServerClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOtaSoftwareUpdateServerClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2506,8 +2484,7 @@ void emberAfOccupancySensingClusterServerManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOccupancySensingClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfOccupancySensingClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Occupancy Sensing Cluster Server Pre Attribute Changed @@ -2576,8 +2553,8 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed * @@ -2645,8 +2622,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2718,8 +2694,7 @@ void emberAfPumpConfigurationAndControlClusterServerManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfPumpConfigurationAndControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfPumpConfigurationAndControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2863,9 +2838,8 @@ void emberAfScenesClusterServerManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfScenesClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfScenesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Scenes Cluster Server Pre Attribute Changed * @@ -2933,9 +2907,9 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Server Pre Attribute Changed * @@ -3004,9 +2978,8 @@ void emberAfSwitchClusterServerManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSwitchClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfSwitchClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Switch Cluster Server Pre Attribute Changed * @@ -3074,9 +3047,8 @@ void emberAfTvChannelClusterServerManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTvChannelClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfTvChannelClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief TV Channel Cluster Server Pre Attribute Changed * @@ -3144,9 +3116,8 @@ void emberAfTargetNavigatorClusterServerManufacturerSpecificAttributeChangedCall * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTargetNavigatorClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfTargetNavigatorClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Target Navigator Cluster Server Pre Attribute Changed * @@ -3215,8 +3186,7 @@ void emberAfTemperatureMeasurementClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTemperatureMeasurementClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3287,9 +3257,8 @@ void emberAfTestClusterClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTestClusterClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfTestClusterClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Test Cluster Cluster Server Pre Attribute Changed * @@ -3357,9 +3326,8 @@ void emberAfThermostatClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThermostatClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfThermostatClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Thermostat Cluster Server Pre Attribute Changed * @@ -3427,8 +3395,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3499,8 +3466,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3571,9 +3537,8 @@ void emberAfWakeOnLanClusterServerManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWakeOnLanClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfWakeOnLanClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Wake on LAN Cluster Server Pre Attribute Changed * @@ -3641,8 +3606,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3713,9 +3677,8 @@ void emberAfWindowCoveringClusterServerManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWindowCoveringClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfWindowCoveringClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Window Covering Cluster Server Pre Attribute Changed * @@ -4623,8 +4586,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/examples/bridge-app/bridge-common/gen/callback-stub.cpp b/examples/bridge-app/bridge-common/gen/callback-stub.cpp index b91341e57524b9..ab5258d69302bd 100644 --- a/examples/bridge-app/bridge-common/gen/callback-stub.cpp +++ b/examples/bridge-app/bridge-common/gen/callback-stub.cpp @@ -430,9 +430,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/bridge-app/bridge-common/gen/callback.h b/examples/bridge-app/bridge-common/gen/callback.h index 01de7ed4992c86..23a399963ae4b7 100644 --- a/examples/bridge-app/bridge-common/gen/callback.h +++ b/examples/bridge-app/bridge-common/gen/callback.h @@ -197,8 +197,8 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed * @@ -337,8 +337,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -479,9 +478,9 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Commissioning Cluster Server Pre Attribute Changed * @@ -550,8 +549,7 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed @@ -621,9 +619,8 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLevelControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed * @@ -691,9 +688,9 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Server Pre Attribute Changed * @@ -761,8 +758,8 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed * @@ -902,9 +899,9 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Server Pre Attribute Changed * @@ -973,8 +970,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1117,8 +1113,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1603,8 +1598,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/examples/lighting-app/lighting-common/gen/callback-stub.cpp b/examples/lighting-app/lighting-common/gen/callback-stub.cpp index 8963ee7cbeb02e..810678fdfd0d5d 100644 --- a/examples/lighting-app/lighting-common/gen/callback-stub.cpp +++ b/examples/lighting-app/lighting-common/gen/callback-stub.cpp @@ -414,9 +414,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/lighting-app/lighting-common/gen/callback.h b/examples/lighting-app/lighting-common/gen/callback.h index 5d05db8dcea6b2..eb115df8d7f608 100644 --- a/examples/lighting-app/lighting-common/gen/callback.h +++ b/examples/lighting-app/lighting-common/gen/callback.h @@ -181,8 +181,8 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed * @@ -251,8 +251,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -323,9 +322,9 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Commissioning Cluster Server Pre Attribute Changed * @@ -394,8 +393,7 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed @@ -465,9 +463,8 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLevelControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed * @@ -535,9 +532,9 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Server Pre Attribute Changed * @@ -605,8 +602,8 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed * @@ -674,8 +671,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -746,9 +742,9 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Server Pre Attribute Changed * @@ -817,8 +813,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -889,8 +884,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -961,8 +955,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1447,8 +1440,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/examples/lock-app/lock-common/gen/callback-stub.cpp b/examples/lock-app/lock-common/gen/callback-stub.cpp index 645fda99c1fb00..f021ed5bce0106 100644 --- a/examples/lock-app/lock-common/gen/callback-stub.cpp +++ b/examples/lock-app/lock-common/gen/callback-stub.cpp @@ -406,9 +406,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/lock-app/lock-common/gen/callback.h b/examples/lock-app/lock-common/gen/callback.h index 03311d91b363af..97e34767a90fba 100644 --- a/examples/lock-app/lock-common/gen/callback.h +++ b/examples/lock-app/lock-common/gen/callback.h @@ -173,8 +173,8 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed * @@ -243,8 +243,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -315,9 +314,9 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Commissioning Cluster Server Pre Attribute Changed * @@ -386,8 +385,7 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed @@ -457,9 +455,9 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Server Pre Attribute Changed * @@ -527,8 +525,8 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed * @@ -596,8 +594,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -668,9 +665,9 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Server Pre Attribute Changed * @@ -739,8 +736,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -811,8 +807,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -883,8 +878,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1316,8 +1310,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/examples/pump-app/pump-common/gen/callback-stub.cpp b/examples/pump-app/pump-common/gen/callback-stub.cpp index b456632343536c..a4de196a9e5d7f 100644 --- a/examples/pump-app/pump-common/gen/callback-stub.cpp +++ b/examples/pump-app/pump-common/gen/callback-stub.cpp @@ -430,9 +430,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/pump-app/pump-common/gen/callback.h b/examples/pump-app/pump-common/gen/callback.h index 64227547dd4320..eb3357a57a4adb 100644 --- a/examples/pump-app/pump-common/gen/callback.h +++ b/examples/pump-app/pump-common/gen/callback.h @@ -197,8 +197,8 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed * @@ -267,8 +267,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -339,9 +338,9 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Commissioning Cluster Server Pre Attribute Changed * @@ -410,8 +409,7 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed @@ -551,9 +549,9 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Server Pre Attribute Changed * @@ -621,8 +619,8 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed * @@ -690,8 +688,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -763,8 +760,7 @@ void emberAfPumpConfigurationAndControlClusterServerManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfPumpConfigurationAndControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfPumpConfigurationAndControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -835,9 +831,9 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Server Pre Attribute Changed * @@ -1050,8 +1046,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1122,8 +1117,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1679,8 +1673,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/examples/pump-controller-app/pump-controller-common/gen/callback-stub.cpp b/examples/pump-controller-app/pump-controller-common/gen/callback-stub.cpp index b456632343536c..a4de196a9e5d7f 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/callback-stub.cpp +++ b/examples/pump-controller-app/pump-controller-common/gen/callback-stub.cpp @@ -430,9 +430,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/pump-controller-app/pump-controller-common/gen/callback.h b/examples/pump-controller-app/pump-controller-common/gen/callback.h index 1c17daed149ada..84b04fe3475085 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/callback.h +++ b/examples/pump-controller-app/pump-controller-common/gen/callback.h @@ -197,8 +197,8 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed * @@ -339,9 +339,9 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Commissioning Cluster Server Pre Attribute Changed * @@ -551,9 +551,9 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Server Pre Attribute Changed * @@ -621,8 +621,8 @@ void emberAfOnOffClusterClientManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOnOffClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Client Pre Attribute Changed * @@ -690,8 +690,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -763,8 +762,7 @@ void emberAfPumpConfigurationAndControlClusterClientManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfPumpConfigurationAndControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfPumpConfigurationAndControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1050,8 +1048,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1122,8 +1119,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1615,8 +1611,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp index b1cac21df17f6d..4cd15fe6443aab 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp @@ -398,9 +398,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback.h b/examples/temperature-measurement-app/esp32/main/gen/callback.h index 0380595193992d..b22ab16f063b92 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback.h +++ b/examples/temperature-measurement-app/esp32/main/gen/callback.h @@ -165,8 +165,8 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed * @@ -235,8 +235,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -307,9 +306,9 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Commissioning Cluster Server Pre Attribute Changed * @@ -378,8 +377,7 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed @@ -449,9 +447,9 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Server Pre Attribute Changed * @@ -520,8 +518,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -592,9 +589,9 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Server Pre Attribute Changed * @@ -663,8 +660,7 @@ void emberAfTemperatureMeasurementClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTemperatureMeasurementClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -735,8 +731,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -807,8 +802,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1222,8 +1216,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/examples/tv-app/tv-common/gen/callback-stub.cpp b/examples/tv-app/tv-common/gen/callback-stub.cpp index 084030c05e0d87..adcc01b86ce437 100644 --- a/examples/tv-app/tv-common/gen/callback-stub.cpp +++ b/examples/tv-app/tv-common/gen/callback-stub.cpp @@ -494,9 +494,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/tv-app/tv-common/gen/callback.h b/examples/tv-app/tv-common/gen/callback.h index 5b6e2170ec7929..0a1b46be900c7a 100644 --- a/examples/tv-app/tv-common/gen/callback.h +++ b/examples/tv-app/tv-common/gen/callback.h @@ -262,9 +262,8 @@ void emberAfAccountLoginClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAccountLoginClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfAccountLoginClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Account Login Cluster Server Pre Attribute Changed * @@ -332,8 +331,7 @@ void emberAfApplicationBasicClusterServerManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfApplicationBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Application Basic Cluster Server Pre Attribute Changed @@ -403,9 +401,9 @@ void emberAfApplicationLauncherClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationLauncherClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfApplicationLauncherClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Application Launcher Cluster Server Pre Attribute Changed * @@ -474,9 +472,8 @@ void emberAfAudioOutputClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAudioOutputClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfAudioOutputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Audio Output Cluster Server Pre Attribute Changed * @@ -544,9 +541,8 @@ void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfContentLaunchClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfContentLaunchClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Content Launch Cluster Server Pre Attribute Changed * @@ -614,9 +610,8 @@ void emberAfDescriptorClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDescriptorClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfDescriptorClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Descriptor Cluster Server Pre Attribute Changed * @@ -685,8 +680,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -757,8 +751,7 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed @@ -828,9 +821,8 @@ void emberAfKeypadInputClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfKeypadInputClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfKeypadInputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Keypad Input Cluster Server Pre Attribute Changed * @@ -898,9 +890,8 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLevelControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed * @@ -968,9 +959,8 @@ void emberAfLowPowerClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLowPowerClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLowPowerClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Low Power Cluster Server Pre Attribute Changed * @@ -1038,9 +1028,8 @@ void emberAfMediaInputClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaInputClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfMediaInputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Input Cluster Server Pre Attribute Changed * @@ -1108,9 +1097,8 @@ void emberAfMediaPlaybackClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaPlaybackClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfMediaPlaybackClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Playback Cluster Server Pre Attribute Changed * @@ -1177,8 +1165,8 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed * @@ -1246,8 +1234,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1318,9 +1305,9 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Server Pre Attribute Changed * @@ -1389,9 +1376,8 @@ void emberAfTvChannelClusterServerManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTvChannelClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfTvChannelClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief TV Channel Cluster Server Pre Attribute Changed * @@ -1459,9 +1445,8 @@ void emberAfTargetNavigatorClusterServerManufacturerSpecificAttributeChangedCall * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTargetNavigatorClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfTargetNavigatorClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Target Navigator Cluster Server Pre Attribute Changed * @@ -1530,8 +1515,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1602,8 +1586,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1674,9 +1657,8 @@ void emberAfWakeOnLanClusterServerManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWakeOnLanClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfWakeOnLanClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Wake on LAN Cluster Server Pre Attribute Changed * @@ -1744,8 +1726,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2151,8 +2132,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/examples/window-app/common/gen/callback-stub.cpp b/examples/window-app/common/gen/callback-stub.cpp index d84f774eaec88b..3387f53fcbe831 100644 --- a/examples/window-app/common/gen/callback-stub.cpp +++ b/examples/window-app/common/gen/callback-stub.cpp @@ -350,9 +350,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/examples/window-app/common/gen/callback.h b/examples/window-app/common/gen/callback.h index 2b5725fd3b3bcd..c24e0118395028 100644 --- a/examples/window-app/common/gen/callback.h +++ b/examples/window-app/common/gen/callback.h @@ -117,8 +117,8 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed * @@ -186,9 +186,9 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Server Pre Attribute Changed * @@ -257,8 +257,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -329,9 +328,8 @@ void emberAfWindowCoveringClusterServerManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWindowCoveringClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfWindowCoveringClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Window Covering Cluster Server Pre Attribute Changed * @@ -714,8 +712,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * diff --git a/src/controller/data_model/gen/callback-stub.cpp b/src/controller/data_model/gen/callback-stub.cpp index b10ba5b241e36f..6f5739b6cc416c 100644 --- a/src/controller/data_model/gen/callback-stub.cpp +++ b/src/controller/data_model/gen/callback-stub.cpp @@ -646,9 +646,8 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) -emberAfMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; } diff --git a/src/controller/data_model/gen/callback.h b/src/controller/data_model/gen/callback.h index 85902a2da3542d..42b6cae0354587 100644 --- a/src/controller/data_model/gen/callback.h +++ b/src/controller/data_model/gen/callback.h @@ -414,9 +414,8 @@ void emberAfAccountLoginClusterClientManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAccountLoginClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfAccountLoginClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Account Login Cluster Client Pre Attribute Changed * @@ -484,8 +483,7 @@ void emberAfApplicationBasicClusterClientManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfApplicationBasicClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Application Basic Cluster Client Pre Attribute Changed @@ -555,9 +553,9 @@ void emberAfApplicationLauncherClusterClientManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationLauncherClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfApplicationLauncherClusterClientMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Application Launcher Cluster Client Pre Attribute Changed * @@ -626,9 +624,8 @@ void emberAfAudioOutputClusterClientManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAudioOutputClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfAudioOutputClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Audio Output Cluster Client Pre Attribute Changed * @@ -696,9 +693,8 @@ void emberAfBarrierControlClusterClientManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBarrierControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfBarrierControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Barrier Control Cluster Client Pre Attribute Changed * @@ -766,8 +762,8 @@ void emberAfBasicClusterClientManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBasicClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Client Pre Attribute Changed * @@ -906,9 +902,8 @@ void emberAfBindingClusterClientManufacturerSpecificAttributeChangedCallback(chi * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBindingClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfBindingClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Binding Cluster Client Pre Attribute Changed * @@ -1047,9 +1042,8 @@ void emberAfColorControlClusterClientManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfColorControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfColorControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Color Control Cluster Client Pre Attribute Changed * @@ -1117,9 +1111,8 @@ void emberAfContentLaunchClusterClientManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfContentLaunchClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfContentLaunchClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Content Launch Cluster Client Pre Attribute Changed * @@ -1187,9 +1180,8 @@ void emberAfDescriptorClusterClientManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDescriptorClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfDescriptorClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Descriptor Cluster Client Pre Attribute Changed * @@ -1257,9 +1249,8 @@ void emberAfDoorLockClusterClientManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDoorLockClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfDoorLockClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Door Lock Cluster Client Pre Attribute Changed * @@ -1328,8 +1319,7 @@ void emberAfEthernetNetworkDiagnosticsClusterClientManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1470,9 +1460,9 @@ void emberAfGeneralCommissioningClusterClientManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralCommissioningClusterClientMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Commissioning Cluster Client Pre Attribute Changed * @@ -1541,8 +1531,7 @@ void emberAfGeneralDiagnosticsClusterClientManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGeneralDiagnosticsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief General Diagnostics Cluster Client Pre Attribute Changed @@ -1612,8 +1601,7 @@ void emberAfGroupKeyManagementClusterClientManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupKeyManagementClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +void emberAfGroupKeyManagementClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Group Key Management Cluster Client Pre Attribute Changed @@ -1683,9 +1671,8 @@ void emberAfGroupsClusterClientManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupsClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfGroupsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Groups Cluster Client Pre Attribute Changed * @@ -1753,9 +1740,8 @@ void emberAfIdentifyClusterClientManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfIdentifyClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfIdentifyClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Identify Cluster Client Pre Attribute Changed * @@ -1823,9 +1809,8 @@ void emberAfKeypadInputClusterClientManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfKeypadInputClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfKeypadInputClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Keypad Input Cluster Client Pre Attribute Changed * @@ -1893,9 +1878,8 @@ void emberAfLevelControlClusterClientManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLevelControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Client Pre Attribute Changed * @@ -1963,9 +1947,8 @@ void emberAfLowPowerClusterClientManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLowPowerClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLowPowerClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Low Power Cluster Client Pre Attribute Changed * @@ -2033,9 +2016,8 @@ void emberAfMediaInputClusterClientManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaInputClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfMediaInputClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Input Cluster Client Pre Attribute Changed * @@ -2103,9 +2085,8 @@ void emberAfMediaPlaybackClusterClientManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaPlaybackClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfMediaPlaybackClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Playback Cluster Client Pre Attribute Changed * @@ -2173,9 +2154,9 @@ void emberAfNetworkCommissioningClusterClientManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfNetworkCommissioningClusterClientMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Network Commissioning Cluster Client Pre Attribute Changed * @@ -2243,8 +2224,8 @@ void emberAfOnOffClusterClientManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOnOffClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Client Pre Attribute Changed * @@ -2312,8 +2293,7 @@ void emberAfOperationalCredentialsClusterClientManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2385,8 +2365,7 @@ void emberAfPumpConfigurationAndControlClusterClientManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfPumpConfigurationAndControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfPumpConfigurationAndControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2530,9 +2509,8 @@ void emberAfScenesClusterClientManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfScenesClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfScenesClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Scenes Cluster Client Pre Attribute Changed * @@ -2600,9 +2578,9 @@ void emberAfSoftwareDiagnosticsClusterClientManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Client Pre Attribute Changed * @@ -2671,9 +2649,8 @@ void emberAfSwitchClusterClientManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSwitchClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfSwitchClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Switch Cluster Client Pre Attribute Changed * @@ -2741,9 +2718,8 @@ void emberAfTvChannelClusterClientManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTvChannelClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfTvChannelClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief TV Channel Cluster Client Pre Attribute Changed * @@ -2811,9 +2787,8 @@ void emberAfTargetNavigatorClusterClientManufacturerSpecificAttributeChangedCall * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTargetNavigatorClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfTargetNavigatorClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Target Navigator Cluster Client Pre Attribute Changed * @@ -2882,8 +2857,7 @@ void emberAfTemperatureMeasurementClusterClientManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTemperatureMeasurementClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2954,9 +2928,8 @@ void emberAfTestClusterClusterClientManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTestClusterClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfTestClusterClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Test Cluster Cluster Client Pre Attribute Changed * @@ -3024,9 +2997,8 @@ void emberAfThermostatClusterClientManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThermostatClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfThermostatClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Thermostat Cluster Client Pre Attribute Changed * @@ -3094,8 +3066,7 @@ void emberAfTrustedRootCertificatesClusterClientManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3166,9 +3137,8 @@ void emberAfWakeOnLanClusterClientManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWakeOnLanClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfWakeOnLanClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Wake on LAN Cluster Client Pre Attribute Changed * @@ -3236,9 +3206,8 @@ void emberAfWindowCoveringClusterClientManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWindowCoveringClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfWindowCoveringClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Window Covering Cluster Client Pre Attribute Changed * @@ -3953,8 +3922,8 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change * From f4879f31b57bca12b5036125fdd2ac011bb7ae23 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Fri, 21 May 2021 14:43:51 +0800 Subject: [PATCH 2/8] Change MessageSendDestination into a type-safe Variant --- .../ias-zone-client/ias-zone-client.cpp | 3 +- .../ias-zone-server/ias-zone-server.cpp | 5 +- .../messaging-client/messaging-client.cpp | 5 +- .../messaging-server/messaging-server.cpp | 6 +- src/app/reporting/reporting.cpp | 10 +- src/app/util/af-main-common.cpp | 94 +++++++-------- src/app/util/af-main.h | 8 +- src/app/util/af-types.h | 111 ++++++++++++++---- src/app/util/af.h | 14 +-- src/app/util/attribute-storage.cpp | 14 +-- src/app/util/attribute-storage.h | 8 +- src/app/util/client-api.cpp | 11 +- src/app/util/types_stub.h | 32 ----- src/app/util/util.cpp | 8 +- .../templates/app/callback-stub-src.zapt | 2 +- .../zap-templates/templates/app/callback.zapt | 4 +- src/lib/support/Variant.h | 41 +++---- 17 files changed, 204 insertions(+), 172 deletions(-) diff --git a/src/app/clusters/ias-zone-client/ias-zone-client.cpp b/src/app/clusters/ias-zone-client/ias-zone-client.cpp index fe17ebdb647ced..ffd0713c132297 100644 --- a/src/app/clusters/ias-zone-client/ias-zone-client.cpp +++ b/src/app/clusters/ias-zone-client/ias-zone-client.cpp @@ -390,7 +390,8 @@ static void removeServer(uint8_t * ieeeAddress) static EmberStatus sendCommand(EmberNodeId destAddress) { emberAfSetCommandEndpoints(myEndpoint, emberAfIasZoneClientKnownServers[currentIndex].endpoint); - EmberStatus status = emberAfSendCommandUnicast(EMBER_OUTGOING_DIRECT, destAddress); + MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingDirect(destAddress)); + EmberStatus status = emberAfSendCommandUnicast(destination); emberAfIasZoneClusterPrintln("Sent IAS Zone Client Command to 0x%2X (%d -> %d) status: 0x%X", destAddress, myEndpoint, emberAfIasZoneClientKnownServers[currentIndex].endpoint, status); if (status != EMBER_SUCCESS) diff --git a/src/app/clusters/ias-zone-server/ias-zone-server.cpp b/src/app/clusters/ias-zone-server/ias-zone-server.cpp index c39e401261d5dc..18358364b85d51 100644 --- a/src/app/clusters/ias-zone-server/ias-zone-server.cpp +++ b/src/app/clusters/ias-zone-server/ias-zone-server.cpp @@ -762,9 +762,8 @@ void emberAfPluginIasZoneServerPrintQueueConfig(void) // destination when the destination is the only router the node is joined to. // In that case, the command will never have been sent, as the device will have // had no router by which to send the command. -void emberAfIasZoneClusterServerMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status) +void emberAfIasZoneClusterServerMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { #if defined(EMBER_AF_PLUGIN_IAS_ZONE_SERVER_ENABLE_QUEUE) uint8_t frameControl; diff --git a/src/app/clusters/messaging-client/messaging-client.cpp b/src/app/clusters/messaging-client/messaging-client.cpp index 504b1168b76580..7aa8ba0d8afe15 100644 --- a/src/app/clusters/messaging-client/messaging-client.cpp +++ b/src/app/clusters/messaging-client/messaging-client.cpp @@ -328,8 +328,9 @@ EmberAfStatus emberAfPluginMessagingClientConfirmMessage(EndpointId endpoint) emberAfGetCurrentTime(), 0x00, ""); // The source and destination are reversed for the confirmation. emberAfSetCommandEndpoints(messageTable[ep].clientEndpoint, esiEntry->endpoint); - status = ((emberAfSendCommandUnicast(EMBER_OUTGOING_DIRECT, nodeId) == EMBER_SUCCESS) ? EMBER_ZCL_STATUS_SUCCESS - : EMBER_ZCL_STATUS_FAILURE); + MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingDirect(nodeId)); + status = + ((emberAfSendCommandUnicast(destination) == EMBER_SUCCESS) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE); } } else diff --git a/src/app/clusters/messaging-server/messaging-server.cpp b/src/app/clusters/messaging-server/messaging-server.cpp index e5ad2086aa59b6..47ebddaf6dfc6a 100644 --- a/src/app/clusters/messaging-server/messaging-server.cpp +++ b/src/app/clusters/messaging-server/messaging-server.cpp @@ -226,7 +226,8 @@ void emberAfPluginMessagingServerDisplayMessage(EmberNodeId nodeId, uint8_t srcE message.startTime, message.durationInMinutes, message.message, message.extendedMessageControl); emberAfSetCommandEndpoints(srcEndpoint, dstEndpoint); emberAfGetCommandApsFrame()->options |= EMBER_APS_OPTION_SOURCE_EUI64; - status = emberAfSendCommandUnicast(EMBER_OUTGOING_DIRECT, nodeId); + MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingDirect(nodeId)); + status = emberAfSendCommandUnicast(destination); if (status != EMBER_SUCCESS) { emberAfMessagingClusterPrintln("Error in display %x", status); @@ -248,7 +249,8 @@ void emberAfPluginMessagingServerCancelMessage(EmberNodeId nodeId, uint8_t srcEn ZCL_CANCEL_MESSAGE_COMMAND_ID, "wu", message.messageId, message.messageControl); emberAfSetCommandEndpoints(srcEndpoint, dstEndpoint); emberAfGetCommandApsFrame()->options |= EMBER_APS_OPTION_SOURCE_EUI64; - status = emberAfSendCommandUnicast(EMBER_OUTGOING_DIRECT, nodeId); + MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingDirect(nodeId)); + status = emberAfSendCommandUnicast(destination); if (status != EMBER_SUCCESS) { emberAfMessagingClusterPrintln("Error in cancel %x", status); diff --git a/src/app/reporting/reporting.cpp b/src/app/reporting/reporting.cpp index fbde4972cde499..d1c92ccd37499e 100644 --- a/src/app/reporting/reporting.cpp +++ b/src/app/reporting/reporting.cpp @@ -73,8 +73,8 @@ static void removeConfigurationAndScheduleTick(uint8_t index); static EmberAfStatus configureReceivedAttribute(const EmberAfClusterCommand * cmd, AttributeId attributeId, uint8_t mask, uint16_t timeout); static void putReportableChangeInResp(const EmberAfPluginReportingEntry * entry, EmberAfAttributeType dataType); -static void retrySendReport(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +static void retrySendReport(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); static uint32_t computeStringHash(uint8_t * data, uint8_t length); EmberEventControl emberAfPluginReportingTickEventControl; @@ -99,13 +99,13 @@ EmberAfStatus emberAfPluginReportingConfiguredCallback(const EmberAfPluginReport return EMBER_ZCL_STATUS_SUCCESS; } -static void retrySendReport(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +static void retrySendReport(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status) { // Retry once, and do so by unicasting without a pointer to this callback if (status != EMBER_SUCCESS) { - emberAfSendUnicast(type, destination, apsFrame, msgLen, message); + emberAfSendUnicast(destination, apsFrame, msgLen, message); } } diff --git a/src/app/util/af-main-common.cpp b/src/app/util/af-main-common.cpp index 6ffd8cd5983822..4220d153643ef3 100644 --- a/src/app/util/af-main-common.cpp +++ b/src/app/util/af-main-common.cpp @@ -202,9 +202,8 @@ void emAfInitializeMessageSentCallbackArray(void) } } -static EmberStatus send(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t messageLength, uint8_t * message, bool broadcast, EmberNodeId alias, uint8_t sequence, - EmberAfMessageSentFunction callback) +static EmberStatus send(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, + bool broadcast, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback) { EmberStatus status; uint8_t index; @@ -268,7 +267,7 @@ static EmberStatus send(EmberOutgoingMessageType type, MessageSendDestination de { EmberAfMessageStruct messageStruct = { - callback, apsFrame, message, destination, messageLength, type, broadcast, + callback, apsFrame, message, destination, messageLength, broadcast, }; // Called prior to fragmentation in case the mesasge does not go out over the // Zigbee radio, and instead goes to some other transport that does not require @@ -285,7 +284,7 @@ static EmberStatus send(EmberOutgoingMessageType type, MessageSendDestination de if (messageLength <= EMBER_AF_MAXIMUM_SEND_PAYLOAD_LENGTH) { - status = emAfSend(type, destination, apsFrame, (uint8_t) messageLength, message, &messageTag, alias, sequence); + status = emAfSend(destination, apsFrame, (uint8_t) messageLength, message, &messageTag, alias, sequence); } else { @@ -297,7 +296,7 @@ static EmberStatus send(EmberOutgoingMessageType type, MessageSendDestination de if ((status != EMBER_SUCCESS) && (callback == emberAfPluginCriticalMessageQueueEnqueueCallback || callback == emAfPluginCriticalMessageQueueRetryCallback)) { - callback(type, destination, apsFrame, messageLength, message, status); + callback(destination, apsFrame, messageLength, message, status); } #endif // EMBER_AF_PLUGIN_CRITICAL_MESSAGE_QUEUE @@ -331,8 +330,9 @@ EmberStatus emberAfSendMulticastWithAliasWithCallback(GroupId multicastId, Ember uint8_t * message, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback) { - apsFrame->groupId = multicastId; - return send(EMBER_OUTGOING_MULTICAST_WITH_ALIAS, MessageSendDestination(multicastId), apsFrame, messageLength, message, + apsFrame->groupId = multicastId; + MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingMulticast(multicastId)); + return send(destination, apsFrame, messageLength, message, true, // broadcast alias, sequence, callback); } @@ -340,8 +340,9 @@ EmberStatus emberAfSendMulticastWithAliasWithCallback(GroupId multicastId, Ember EmberStatus emberAfSendMulticastWithCallback(GroupId multicastId, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback) { - apsFrame->groupId = multicastId; - return send(EMBER_OUTGOING_MULTICAST, MessageSendDestination(multicastId), apsFrame, messageLength, message, + apsFrame->groupId = multicastId; + MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingMulticast(multicastId)); + return send(destination, apsFrame, messageLength, message, true, // broadcast? 0, // alias 0, // sequence @@ -422,13 +423,12 @@ EmberStatus emberAfSendMulticastToBindings(EmberApsFrame * apsFrame, uint16_t me // return emberAfSendBroadcastWithCallback(destination, apsFrame, messageLength, message, NULL); //} -EmberStatus emberAfSendUnicastWithCallback(EmberOutgoingMessageType type, MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, - EmberAfMessageSentFunction callback) +EmberStatus emberAfSendUnicastWithCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, + uint8_t * message, EmberAfMessageSentFunction callback) { // The source endpoint in the APS frame MAY NOT be valid at this point if the // outgoing type is "via binding." - if (type == EMBER_OUTGOING_VIA_BINDING) + if (destination.Is()) { // If using binding, set the endpoints based on those in the binding. The // cluster in the binding is not used because bindings can be used to send @@ -436,7 +436,7 @@ EmberStatus emberAfSendUnicastWithCallback(EmberOutgoingMessageType type, Messag EmberBindingTableEntry binding; // TODO: This cast should go away once // https://github.com/project-chip/connectedhomeip/issues/3584 is fixed. - EmberStatus status = emberGetBinding(destination.mBindingIndex, &binding); + EmberStatus status = emberGetBinding(destination.Get().mBindingIndex, &binding); if (status != EMBER_SUCCESS) { return status; @@ -444,17 +444,17 @@ EmberStatus emberAfSendUnicastWithCallback(EmberOutgoingMessageType type, Messag apsFrame->sourceEndpoint = binding.local; apsFrame->destinationEndpoint = binding.remote; } - return send(type, destination, apsFrame, messageLength, message, + return send(destination, apsFrame, messageLength, message, false, // broadcast? 0, // alias 0, // sequence callback); } -EmberStatus emberAfSendUnicast(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t messageLength, uint8_t * message) +EmberStatus emberAfSendUnicast(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, + uint8_t * message) { - return emberAfSendUnicastWithCallback(type, destination, apsFrame, messageLength, message, NULL); + return emberAfSendUnicastWithCallback(destination, apsFrame, messageLength, message, NULL); } EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, @@ -474,8 +474,9 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame * apsFrame, u if (binding.type == EMBER_UNICAST_BINDING && binding.local == apsFrame->sourceEndpoint && binding.clusterId == apsFrame->clusterId) { - apsFrame->destinationEndpoint = binding.remote; - status = send(EMBER_OUTGOING_VIA_BINDING, MessageSendDestination(i), apsFrame, messageLength, message, + apsFrame->destinationEndpoint = binding.remote; + MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingBinding(i)); + status = send(destination, apsFrame, messageLength, message, false, // broadcast? 0, // alias 0, // sequence @@ -547,7 +548,7 @@ void emAfPrintStatus(const char * task, EmberStatus status) // Functions called by the Serial Command Line Interface (CLI) // ****************************************************************** -static void printMessage(EmberIncomingMessageType type, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * messageContents) +static void printMessage(EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * messageContents) { emberAfAppPrint("Cluster: 0x%2X, %d bytes,", apsFrame->clusterId, messageLength); if (messageLength >= 3) @@ -558,14 +559,14 @@ static void printMessage(EmberIncomingMessageType type, EmberApsFrame * apsFrame emberAfAppPrintln(""); } -void emAfMessageSentHandler(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - EmberStatus status, uint16_t messageLength, uint8_t * messageContents, uint8_t messageTag) +void emAfMessageSentHandler(MessageSendDestination & destination, EmberApsFrame * apsFrame, EmberStatus status, + uint16_t messageLength, uint8_t * messageContents, uint8_t messageTag) { EmberAfMessageSentFunction callback; if (status != EMBER_SUCCESS) { emberAfAppPrint("%ptx %x, ", "ERROR: ", status); - printMessage(type, apsFrame, messageLength, messageContents); + printMessage(apsFrame, messageLength, messageContents); } callback = getMessageSentCallback(messageTag); @@ -576,7 +577,7 @@ void emAfMessageSentHandler(EmberOutgoingMessageType type, MessageSendDestinatio if (messageContents != NULL && messageContents[0] & ZCL_CLUSTER_SPECIFIC_COMMAND) { emberAfClusterMessageSentWithMfgCodeCallback( - type, destination, apsFrame, messageLength, messageContents, status, + destination, apsFrame, messageLength, messageContents, status, // If the manufacturer specific flag is set // get read it as next part of message // else use null code. @@ -587,24 +588,23 @@ void emAfMessageSentHandler(EmberOutgoingMessageType type, MessageSendDestinatio if (callback != NULL) { - (*callback)(type, destination, apsFrame, messageLength, messageContents, status); + (*callback)(destination, apsFrame, messageLength, messageContents, status); } #ifdef EMBER_AF_GENERATED_PLUGIN_MESSAGE_SENT_FUNCTION_CALLS EMBER_AF_GENERATED_PLUGIN_MESSAGE_SENT_FUNCTION_CALLS #endif - emberAfMessageSentCallback(type, destination, apsFrame, messageLength, messageContents, status); + emberAfMessageSentCallback(destination, apsFrame, messageLength, messageContents, status); } #ifdef EMBER_AF_PLUGIN_FRAGMENTATION -void emAfFragmentationMessageSentHandler(EmberOutgoingMessageType type, MessageSendDestination destination, - EmberApsFrame * apsFrame, uint8_t * buffer, uint16_t bufLen, EmberStatus status, - uint8_t messageTag) +void emAfFragmentationMessageSentHandler(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t * buffer, + uint16_t bufLen, EmberStatus status, uint8_t messageTag) { // the fragmented message is no longer in process emberAfDebugPrintln("%pend.", "Fragmentation:"); - emAfMessageSentHandler(type, destination, apsFrame, status, bufLen, buffer, messageTag); + emAfMessageSentHandler(destination, apsFrame, status, bufLen, buffer, messageTag); // EMZIGBEE-4437: setting back the buffers to the original in case someone set // that to something else. @@ -612,8 +612,8 @@ void emAfFragmentationMessageSentHandler(EmberOutgoingMessageType type, MessageS } #endif // EMBER_AF_PLUGIN_FRAGMENTATION -EmberStatus emAfSend(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint8_t messageLength, uint8_t * message, uint8_t * messageTag, EmberNodeId alias, uint8_t sequence) +EmberStatus emAfSend(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t messageLength, uint8_t * message, + uint8_t * messageTag, EmberNodeId alias, uint8_t sequence) { // TODO: There's an impedance mismatch here in a few ways: // 1) The caller expects to get a messageTag out that will identify this @@ -630,11 +630,11 @@ EmberStatus emAfSend(EmberOutgoingMessageType type, MessageSendDestination desti // tracks this. *messageTag = INVALID_MESSAGE_TAG; EmberStatus status = EMBER_SUCCESS; - switch (type) + switch (destination.GetType()) { - case EMBER_OUTGOING_VIA_BINDING: { + case MessageSendDestination::OutGoingBinding::VariantId: { EmberBindingTableEntry binding; - status = emberGetBinding(destination.mBindingIndex, &binding); + status = emberGetBinding(destination.Get().mBindingIndex, &binding); if (status != EMBER_SUCCESS) { break; @@ -647,31 +647,33 @@ EmberStatus emAfSend(EmberOutgoingMessageType type, MessageSendDestination desti status = chipSendUnicast(binding.nodeId, apsFrame, messageLength, message); break; } - case EMBER_OUTGOING_VIA_ADDRESS_TABLE: + case MessageSendDestination::OutGoingAddressTable::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case EMBER_OUTGOING_DIRECT: - status = chipSendUnicast(destination.mNodeId, apsFrame, messageLength, message); + case MessageSendDestination::OutGoingDirect::VariantId: + status = + chipSendUnicast(destination.Get().mNodeId, apsFrame, messageLength, message); break; - case EMBER_OUTGOING_MULTICAST: + case MessageSendDestination::OutGoingMulticast::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case EMBER_OUTGOING_MULTICAST_WITH_ALIAS: + case MessageSendDestination::OutGoingMulticastWithAlias::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case EMBER_OUTGOING_BROADCAST: + case MessageSendDestination::OutGoingBroadcast::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case EMBER_OUTGOING_BROADCAST_WITH_ALIAS: + case MessageSendDestination::OutGoingBroadcastWithAlias::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case EMBER_OUTGOING_VIA_EXCHANGE: - status = chipSendUnicast(destination.mExchangeContext, apsFrame, messageLength, message); + case MessageSendDestination::OutGoingExchange::VariantId: + status = chipSendUnicast(destination.Get().mExchangeContext, apsFrame, + messageLength, message); break; default: status = EMBER_BAD_ARGUMENT; diff --git a/src/app/util/af-main.h b/src/app/util/af-main.h index 777fde0ebe4b90..8d0566b2a60b2d 100644 --- a/src/app/util/af-main.h +++ b/src/app/util/af-main.h @@ -121,10 +121,10 @@ bool emAfProcessZdo(EmberNodeId sender, EmberApsFrame * apsFrame, uint8_t * mess void emAfIncomingMessageHandler(EmberIncomingMessageType type, EmberApsFrame * apsFrame, uint8_t lastHopLqi, int8_t lastHopRssi, uint16_t messageLength, uint8_t * messageContents); -EmberStatus emAfSend(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint8_t messageLength, uint8_t * message, uint8_t * messageTag, EmberNodeId alias, uint8_t sequence); -void emAfMessageSentHandler(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, - EmberStatus status, uint16_t messageLength, uint8_t * messageContents, uint8_t messageTag); +EmberStatus emAfSend(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t messageLength, uint8_t * message, + uint8_t * messageTag, EmberNodeId alias, uint8_t sequence); +void emAfMessageSentHandler(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, EmberStatus status, + uint16_t messageLength, uint8_t * messageContents, uint8_t messageTag); void emAfStackStatusHandler(EmberStatus status); void emAfNetworkInit(void); diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 7df8c212ca8b7d..e9bdb6a7a6f9ce 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -56,6 +56,7 @@ #include // For various types. #include +#include #ifdef EZSP_HOST #include "app/util/ezsp/ezsp-enum.h" @@ -1252,26 +1253,91 @@ typedef void (*EmberAfDefaultResponseFunction)(chip::EndpointId endpoint, chip:: namespace chip { /** - * @brief a type that represents where we are trying to send a message. This - * must always be paired with an EmberOutgoingMessageType that identifies - * which arm of the union is in use. - */ -union MessageSendDestination -{ - explicit constexpr MessageSendDestination(uint8_t aBindingIndex) : mBindingIndex(aBindingIndex) {} - explicit constexpr MessageSendDestination(NodeId aNodeId) : mNodeId(aNodeId) {} - explicit constexpr MessageSendDestination(GroupId aGroupId) : mGroupId(aGroupId) {} - explicit constexpr MessageSendDestination(Messaging::ExchangeContext * aExchangeContext) : mExchangeContext(aExchangeContext) {} - - // Used when the type is EMBER_OUTGOING_VIA_BINDING - uint8_t mBindingIndex; - // Used when the type is EMBER_OUTGOING_DIRECT - NodeId mNodeId; - // Used when the type is EMBER_OUTGOING_MULTICAST or - // EMBER_OUTGOING_MULTICAST_WITH_ALIAS - GroupId mGroupId; - // Used when the type is EMBER_OUTGOING_VIA_EXCHANGE - Messaging::ExchangeContext * mExchangeContext; + * @brief a type that represents where we are trying to send a message. + * The variant type identifies which arm of the union is in use. + */ +class MessageSendDestination +{ +public: + struct OutGoingBinding + { + static constexpr const std::size_t VariantId = 1; + explicit OutGoingBinding(uint8_t bindingIndex) : mBindingIndex(bindingIndex) {} + uint8_t mBindingIndex; + }; + + struct OutGoingAddressTable + { + static constexpr const std::size_t VariantId = 2; + }; + + struct OutGoingDirect + { + static constexpr const std::size_t VariantId = 3; + explicit OutGoingDirect(NodeId nodeId) : mNodeId(nodeId) {} + NodeId mNodeId; + }; + + struct OutGoingMulticast + { + static constexpr const std::size_t VariantId = 4; + explicit OutGoingMulticast(GroupId groupId) : mGroupId(groupId) {} + GroupId mGroupId; + }; + + struct OutGoingMulticastWithAlias + { + static constexpr const std::size_t VariantId = 5; + explicit OutGoingMulticastWithAlias(GroupId groupId) : mGroupId(groupId) {} + GroupId mGroupId; + }; + + struct OutGoingBroadcast + { + static constexpr const std::size_t VariantId = 6; + }; + + struct OutGoingBroadcastWithAlias + { + static constexpr const std::size_t VariantId = 7; + }; + + struct OutGoingExchange + { + static constexpr const std::size_t VariantId = 8; + explicit OutGoingExchange(Messaging::ExchangeContext * exchangeContext) : mExchangeContext(exchangeContext) {} + Messaging::ExchangeContext * mExchangeContext; + }; + + MessageSendDestination() = default; + MessageSendDestination(MessageSendDestination & that) = default; + MessageSendDestination(const MessageSendDestination & that) = default; + MessageSendDestination(MessageSendDestination && that) = default; + + template + MessageSendDestination(OutGoing && destination) + { + mDestination.Set(std::forward(destination)); + } + + std::size_t GetType() { return mDestination.GetType(); } + + template + bool Is() + { + return mDestination.Is(); + } + + template + OutGoing & Get() + { + return mDestination.Get(); + } + +private: + Variant + mDestination; }; } // namespace chip @@ -1280,8 +1346,8 @@ union MessageSendDestination * * This function is called when a message is sent. */ -typedef void (*EmberAfMessageSentFunction)(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +typedef void (*EmberAfMessageSentFunction)(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); /** * @brief The EmberAfMessageStruct is a struct wrapper that @@ -1295,7 +1361,6 @@ typedef struct uint8_t * message; chip::MessageSendDestination destination; uint16_t messageLength; - EmberOutgoingMessageType type; bool broadcast; } EmberAfMessageStruct; diff --git a/src/app/util/af.h b/src/app/util/af.h index 239a8ba183227f..5ccbe4ef533e78 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -1297,15 +1297,14 @@ EmberStatus emberAfSendMulticastWithCallback(chip::GroupId multicastId, EmberAps /** * @brief Sends unicast. */ -EmberStatus emberAfSendUnicast(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t messageLength, uint8_t * message); +EmberStatus emberAfSendUnicast(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, + uint8_t * message); /** * @brief Sends unicast with attached message sent callback. */ -EmberStatus emberAfSendUnicastWithCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, - EmberAfMessageSentFunction callback); +EmberStatus emberAfSendUnicastWithCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback); /** * @brief Unicasts the message to each remote node in the binding table that @@ -1391,13 +1390,12 @@ EmberStatus emberAfSendCommandMulticastToBindings(void); * using the emberAfFill... macros from the client command API. * It will be sent as unicast. */ -EmberStatus emberAfSendCommandUnicast(EmberOutgoingMessageType type, uint16_t indexOrDestination); +EmberStatus emberAfSendCommandUnicast(chip::MessageSendDestination & destination); /** * @brief emberAfSendCommandUnicast with attached message sent callback. */ -EmberStatus emberAfSendCommandUnicastWithCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberAfMessageSentFunction callback); +EmberStatus emberAfSendCommandUnicastWithCallback(chip::MessageSendDestination & destination, EmberAfMessageSentFunction callback); /** * @brief Sends the command prepared with emberAfFill.... macro. diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 25012098efd9b3..d907052366d571 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -300,9 +300,8 @@ void emberAfClusterDefaultResponseCallback(EndpointId endpoint, ClusterId cluste } // This function is used to call the per-cluster message sent callback -void emberAfClusterMessageSentWithMfgCodeCallback(EmberOutgoingMessageType type, MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status, - uint16_t mfgCode) +void emberAfClusterMessageSentWithMfgCodeCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status, uint16_t mfgCode) { if (apsFrame != NULL && message != NULL && msgLen != 0) { @@ -317,7 +316,7 @@ void emberAfClusterMessageSentWithMfgCodeCallback(EmberOutgoingMessageType type, if (f != NULL) { // emberAfPushEndpointNetworkIndex(apsFrame->sourceEndpoint); - ((EmberAfMessageSentFunction) f)(type, destination, apsFrame, msgLen, message, status); + ((EmberAfMessageSentFunction) f)(destination, apsFrame, msgLen, message, status); // emberAfPopNetworkIndex(); } } @@ -327,11 +326,10 @@ void emberAfClusterMessageSentWithMfgCodeCallback(EmberOutgoingMessageType type, // This function is used to call the per-cluster message sent callback, and // wraps the emberAfClusterMessageSentWithMfgCodeCallback with a // EMBER_AF_NULL_MANUFACTURER_CODE. -void emberAfClusterMessageSentCallback(EmberOutgoingMessageType type, MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status) +void emberAfClusterMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { - emberAfClusterMessageSentWithMfgCodeCallback(type, destination, apsFrame, msgLen, message, status, - EMBER_AF_NULL_MANUFACTURER_CODE); + emberAfClusterMessageSentWithMfgCodeCallback(destination, apsFrame, msgLen, message, status, EMBER_AF_NULL_MANUFACTURER_CODE); } // This function is used to call the per-cluster attribute changed callback diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index af40271be5ec5d..fe3efef6393e6d 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -218,12 +218,12 @@ void emberAfClusterDefaultResponseWithMfgCodeCallback(chip::EndpointId endpoint, EmberAfStatus status, uint8_t clientServerMask, uint16_t manufacturerCode); // Calls the message sent callback for a specific cluster, and wraps emberAfClusterMessageSentWithMfgCodeCallback -void emberAfClusterMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfClusterMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); // Calls the message sent callback for a specific cluster. -void emberAfClusterMessageSentWithMfgCodeCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status, +void emberAfClusterMessageSentWithMfgCodeCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status, uint16_t manufacturerCode); // Used to retrieve a manufacturer code from an attribute metadata diff --git a/src/app/util/client-api.cpp b/src/app/util/client-api.cpp index efae02ecec684a..800dd404206ef4 100644 --- a/src/app/util/client-api.cpp +++ b/src/app/util/client-api.cpp @@ -330,16 +330,15 @@ EmberStatus emberAfSendCommandMulticastToBindings(void) return emberAfSendMulticastToBindings(emAfCommandApsFrame, *emAfResponseLengthPtr, emAfZclBuffer); } -// EmberStatus emberAfSendCommandUnicastWithCallback(EmberOutgoingMessageType type, uint16_t indexOrDestination, -// EmberAfMessageSentFunction callback) +// EmberStatus emberAfSendCommandUnicastWithCallback(chip::MessageSendDestination & destination, EmberAfMessageSentFunction +// callback) // { -// return emberAfSendUnicastWithCallback(type, indexOrDestination, emAfCommandApsFrame, *emAfResponseLengthPtr, emAfZclBuffer, -// callback); +// return emberAfSendUnicastWithCallback(destination, emAfCommandApsFrame, *emAfResponseLengthPtr, emAfZclBuffer, callback); // } -// EmberStatus emberAfSendCommandUnicast(EmberOutgoingMessageType type, uint16_t indexOrDestination) +// EmberStatus emberAfSendCommandUnicast(chip::MessageSendDestination & destination) // { -// return emberAfSendCommandUnicastWithCallback(type, indexOrDestination, NULL); +// return emberAfSendCommandUnicastWithCallback(destination, NULL); // } // EmberStatus emberAfSendCommandBroadcastWithCallback(EmberNodeId destination, EmberAfMessageSentFunction callback) diff --git a/src/app/util/types_stub.h b/src/app/util/types_stub.h index 3446702bb84510..37382566ff6684 100644 --- a/src/app/util/types_stub.h +++ b/src/app/util/types_stub.h @@ -365,38 +365,6 @@ enum EMBER_INCOMING_BROADCAST_LOOPBACK }; -/** - * @brief Defines the possible outgoing message types. - */ -#ifdef DOXYGEN_SHOULD_SKIP_THIS -enum EmberOutgoingMessageType -#else -typedef uint8_t EmberOutgoingMessageType; -enum -#endif -{ - /** Unicast sent directly to an EmberNodeId. */ - EMBER_OUTGOING_DIRECT, - /** Unicast sent using an entry in the address table. */ - EMBER_OUTGOING_VIA_ADDRESS_TABLE, - /** Unicast sent using an entry in the binding table. */ - EMBER_OUTGOING_VIA_BINDING, - /** Multicast message. This value is passed to emberMessageSentHandler() only. - * It may not be passed to emberSendUnicast(). */ - EMBER_OUTGOING_MULTICAST, - /** An aliased multicast message. This value is passed to emberMessageSentHandler() only. - * It may not be passed to emberSendUnicast(). */ - EMBER_OUTGOING_MULTICAST_WITH_ALIAS, - /** An aliased Broadcast message. This value is passed to emberMessageSentHandler() only. - * It may not be passed to emberSendUnicast(). */ - EMBER_OUTGOING_BROADCAST_WITH_ALIAS, - /** A broadcast message. This value is passed to emberMessageSentHandler() only. - * It may not be passed to emberSendUnicast(). */ - EMBER_OUTGOING_BROADCAST, - /** A messaging going via some existing exchange. */ - EMBER_OUTGOING_VIA_EXCHANGE, -}; - /** @brief Endpoint information (a ZigBee Simple Descriptor). * * This is a ZigBee Simple Descriptor and contains information diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index baa2595416054a..10a8497de983f5 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -748,9 +748,11 @@ EmberStatus emberAfSendResponseWithCallback(EmberAfMessageSentFunction callback) } else if (!isBroadcastDestination(emberAfResponseDestination)) { - label = 'U'; - status = emberAfSendUnicastWithCallback(EMBER_OUTGOING_VIA_EXCHANGE, MessageSendDestination(emberAfResponseDestination), - &emberAfResponseApsFrame, appResponseLength, appResponseData, callback); + label = 'U'; + MessageSendDestination destination = + MessageSendDestination(MessageSendDestination::OutGoingExchange(emberAfResponseDestination)); + status = + emberAfSendUnicastWithCallback(destination, &emberAfResponseApsFrame, appResponseLength, appResponseData, callback); } else { diff --git a/src/app/zap-templates/templates/app/callback-stub-src.zapt b/src/app/zap-templates/templates/app/callback-stub-src.zapt index efec64805fcd48..ecb2e756e784e5 100644 --- a/src/app/zap-templates/templates/app/callback-stub-src.zapt +++ b/src/app/zap-templates/templates/app/callback-stub-src.zapt @@ -323,7 +323,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback( * @param status Ver.: always */ bool __attribute__((weak)) emberAfMessageSentCallback( - EmberOutgoingMessageType type, MessageSendDestination destination, + MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { diff --git a/src/app/zap-templates/templates/app/callback.zapt b/src/app/zap-templates/templates/app/callback.zapt index ea1e06e2bdf558..c19152d61dabbc 100644 --- a/src/app/zap-templates/templates/app/callback.zapt +++ b/src/app/zap-templates/templates/app/callback.zapt @@ -81,7 +81,7 @@ void emberAf{{asCamelCased name false}}Cluster{{asCamelCased side false}}Manufac * @param message The message that was sent * @param status The status of the sent message */ -void emberAf{{asCamelCased name false}}Cluster{{asCamelCased side false}}MessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAf{{asCamelCased name false}}Cluster{{asCamelCased side false}}MessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief {{name}} Cluster {{asCamelCased side false}} Pre Attribute Changed * @@ -372,7 +372,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/src/lib/support/Variant.h b/src/lib/support/Variant.h index 168840ea49c17d..1aa36cdc6fe54d 100644 --- a/src/lib/support/Variant.h +++ b/src/lib/support/Variant.h @@ -70,6 +70,15 @@ struct VariantCurry<> inline static void Copy(std::size_t that_t, const void * that_v, void * this_v) {} }; +// Using assert inside template will encoded template name into the assert +// error message, which cost lots of flash space, this function can strip the +// type name, and the function name should be as short as possible to save +// space. +inline void AssertStrip(bool exp) +{ + assert(exp); +} + } // namespace Internal /** @@ -96,8 +105,8 @@ template struct Variant { private: - static constexpr std::size_t kDataSize = std::max(sizeof(Ts)...); - static constexpr std::size_t kDataAlign = std::max(alignof(Ts)...); + static constexpr std::size_t kDataSize = std::max({ sizeof(Ts)... }); + static constexpr std::size_t kDataAlign = std::max({ alignof(Ts)... }); static constexpr std::size_t kInvalidType = SIZE_MAX; using Data = typename std::aligned_storage::type; @@ -137,12 +146,14 @@ struct Variant } template - bool Is() + bool Is() const { return (mTypeId == T::VariantId); } - bool Valid() { return (mTypeId != kInvalidType); } + std::size_t GetType() const { return mTypeId; } + + bool Valid() const { return (mTypeId != kInvalidType); } template void Set(Args &&... args) @@ -155,29 +166,15 @@ struct Variant template T & Get() { - if (mTypeId == T::VariantId) - { - return *reinterpret_cast(&mData); - } - else - { - assert(false); - return *static_cast(nullptr); - } + Internal::AssertStrip(mTypeId == T::VariantId); + return *reinterpret_cast(&mData); } template const T & Get() const { - if (mTypeId == T::VariantId) - { - return *reinterpret_cast(&mData); - } - else - { - assert(false); - return *static_cast(nullptr); - } + Internal::AssertStrip(mTypeId == T::VariantId); + return *reinterpret_cast(&mData); } ~Variant() { Curry::Destroy(mTypeId, &mData); } From 3d711df1424e128aa2862105ea5eb1a0bb4f14c9 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Tue, 25 May 2021 12:45:32 +0800 Subject: [PATCH 3/8] gen files --- .../all-clusters-common/gen/callback-stub.cpp | 2 +- .../all-clusters-common/gen/callback.h | 115 ++++++++++-------- .../bridge-common/gen/callback-stub.cpp | 2 +- .../bridge-app/bridge-common/gen/callback.h | 30 ++--- .../lighting-common/gen/callback-stub.cpp | 2 +- .../lighting-common/gen/callback.h | 29 ++--- .../lock-common/gen/callback-stub.cpp | 2 +- examples/lock-app/lock-common/gen/callback.h | 27 ++-- .../pump-common/gen/callback-stub.cpp | 2 +- examples/pump-app/pump-common/gen/callback.h | 27 ++-- .../gen/callback-stub.cpp | 2 +- .../pump-controller-common/gen/callback.h | 18 +-- .../esp32/main/gen/callback-stub.cpp | 2 +- .../esp32/main/gen/callback.h | 25 ++-- .../tv-app/tv-common/gen/callback-stub.cpp | 2 +- examples/tv-app/tv-common/gen/callback.h | 61 +++++----- .../window-app/common/gen/callback-stub.cpp | 2 +- examples/window-app/common/gen/callback.h | 13 +- .../data_model/gen/callback-stub.cpp | 2 +- src/controller/data_model/gen/callback.h | 100 ++++++++------- 20 files changed, 246 insertions(+), 219 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp index eed90ef0240fc8..f83cdc10c24a97 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp @@ -694,7 +694,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback.h b/examples/all-clusters-app/all-clusters-common/gen/callback.h index 1f6250a2b35cd1..cb779434e2037e 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback.h +++ b/examples/all-clusters-app/all-clusters-common/gen/callback.h @@ -462,7 +462,7 @@ void emberAfAccountLoginClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAccountLoginClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfAccountLoginClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Account Login Cluster Server Pre Attribute Changed @@ -531,8 +531,9 @@ void emberAfApplicationBasicClusterServerManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfApplicationBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Application Basic Cluster Server Pre Attribute Changed * @@ -601,7 +602,7 @@ void emberAfApplicationLauncherClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationLauncherClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfApplicationLauncherClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -672,7 +673,7 @@ void emberAfAudioOutputClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAudioOutputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfAudioOutputClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Audio Output Cluster Server Pre Attribute Changed @@ -741,8 +742,9 @@ void emberAfBarrierControlClusterServerManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBarrierControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBarrierControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Barrier Control Cluster Server Pre Attribute Changed * @@ -810,7 +812,7 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed @@ -950,7 +952,7 @@ void emberAfBindingClusterServerManufacturerSpecificAttributeChangedCallback(chi * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBindingClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBindingClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Binding Cluster Server Pre Attribute Changed @@ -1090,7 +1092,7 @@ void emberAfColorControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfColorControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfColorControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Color Control Cluster Server Pre Attribute Changed @@ -1159,8 +1161,9 @@ void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfContentLaunchClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfContentLaunchClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Content Launch Cluster Server Pre Attribute Changed * @@ -1228,7 +1231,7 @@ void emberAfDescriptorClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDescriptorClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfDescriptorClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Descriptor Cluster Server Pre Attribute Changed @@ -1297,7 +1300,7 @@ void emberAfDoorLockClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDoorLockClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfDoorLockClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Door Lock Cluster Server Pre Attribute Changed @@ -1367,7 +1370,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1508,7 +1511,7 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfGeneralCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1579,8 +1582,9 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed * @@ -1649,8 +1653,9 @@ void emberAfGroupKeyManagementClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupKeyManagementClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGroupKeyManagementClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Group Key Management Cluster Server Pre Attribute Changed * @@ -1719,7 +1724,7 @@ void emberAfGroupsClusterServerManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfGroupsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Groups Cluster Server Pre Attribute Changed @@ -1788,7 +1793,7 @@ void emberAfIasZoneClusterServerManufacturerSpecificAttributeChangedCallback(chi * @param message The message that was sent * @param status The status of the sent message */ -void emberAfIasZoneClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfIasZoneClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief IAS Zone Cluster Server Pre Attribute Changed @@ -1857,7 +1862,7 @@ void emberAfIdentifyClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfIdentifyClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfIdentifyClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Identify Cluster Server Pre Attribute Changed @@ -1926,7 +1931,7 @@ void emberAfKeypadInputClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfKeypadInputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfKeypadInputClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Keypad Input Cluster Server Pre Attribute Changed @@ -1995,7 +2000,7 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfLevelControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed @@ -2064,7 +2069,7 @@ void emberAfLowPowerClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLowPowerClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfLowPowerClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Low Power Cluster Server Pre Attribute Changed @@ -2133,7 +2138,7 @@ void emberAfMediaInputClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaInputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfMediaInputClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Input Cluster Server Pre Attribute Changed @@ -2202,8 +2207,9 @@ void emberAfMediaPlaybackClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaPlaybackClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfMediaPlaybackClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Media Playback Cluster Server Pre Attribute Changed * @@ -2271,7 +2277,7 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2342,7 +2348,7 @@ void emberAfOtaSoftwareUpdateClientClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOtaSoftwareUpdateClientClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOtaSoftwareUpdateClientClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2413,7 +2419,7 @@ void emberAfOtaSoftwareUpdateServerClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOtaSoftwareUpdateServerClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOtaSoftwareUpdateServerClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2484,8 +2490,9 @@ void emberAfOccupancySensingClusterServerManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOccupancySensingClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfOccupancySensingClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Occupancy Sensing Cluster Server Pre Attribute Changed * @@ -2553,7 +2560,7 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfOnOffClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed @@ -2622,7 +2629,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2694,7 +2701,7 @@ void emberAfPumpConfigurationAndControlClusterServerManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfPumpConfigurationAndControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfPumpConfigurationAndControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2838,7 +2845,7 @@ void emberAfScenesClusterServerManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfScenesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfScenesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Scenes Cluster Server Pre Attribute Changed @@ -2907,7 +2914,7 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2978,7 +2985,7 @@ void emberAfSwitchClusterServerManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSwitchClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfSwitchClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Switch Cluster Server Pre Attribute Changed @@ -3047,7 +3054,7 @@ void emberAfTvChannelClusterServerManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTvChannelClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfTvChannelClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief TV Channel Cluster Server Pre Attribute Changed @@ -3116,8 +3123,9 @@ void emberAfTargetNavigatorClusterServerManufacturerSpecificAttributeChangedCall * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTargetNavigatorClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfTargetNavigatorClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Target Navigator Cluster Server Pre Attribute Changed * @@ -3186,7 +3194,7 @@ void emberAfTemperatureMeasurementClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTemperatureMeasurementClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3257,7 +3265,7 @@ void emberAfTestClusterClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTestClusterClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfTestClusterClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Test Cluster Cluster Server Pre Attribute Changed @@ -3326,7 +3334,7 @@ void emberAfThermostatClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThermostatClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfThermostatClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Thermostat Cluster Server Pre Attribute Changed @@ -3395,7 +3403,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3466,7 +3474,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3537,7 +3545,7 @@ void emberAfWakeOnLanClusterServerManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWakeOnLanClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfWakeOnLanClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Wake on LAN Cluster Server Pre Attribute Changed @@ -3606,7 +3614,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3677,8 +3685,9 @@ void emberAfWindowCoveringClusterServerManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWindowCoveringClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfWindowCoveringClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Window Covering Cluster Server Pre Attribute Changed * @@ -4586,7 +4595,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/examples/bridge-app/bridge-common/gen/callback-stub.cpp b/examples/bridge-app/bridge-common/gen/callback-stub.cpp index ab5258d69302bd..3b25b0157bdd52 100644 --- a/examples/bridge-app/bridge-common/gen/callback-stub.cpp +++ b/examples/bridge-app/bridge-common/gen/callback-stub.cpp @@ -430,7 +430,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/bridge-app/bridge-common/gen/callback.h b/examples/bridge-app/bridge-common/gen/callback.h index 23a399963ae4b7..36e0e01e01cc4f 100644 --- a/examples/bridge-app/bridge-common/gen/callback.h +++ b/examples/bridge-app/bridge-common/gen/callback.h @@ -197,7 +197,7 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed @@ -266,9 +266,8 @@ void emberAfDescriptorClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDescriptorClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfDescriptorClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Descriptor Cluster Server Pre Attribute Changed * @@ -337,7 +336,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -478,7 +477,7 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfGeneralCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -549,8 +548,9 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed * @@ -619,7 +619,7 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfLevelControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed @@ -688,7 +688,7 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -758,7 +758,7 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfOnOffClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed @@ -899,7 +899,7 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -970,7 +970,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1113,7 +1113,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1598,7 +1598,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/examples/lighting-app/lighting-common/gen/callback-stub.cpp b/examples/lighting-app/lighting-common/gen/callback-stub.cpp index 810678fdfd0d5d..2ca7f37015a665 100644 --- a/examples/lighting-app/lighting-common/gen/callback-stub.cpp +++ b/examples/lighting-app/lighting-common/gen/callback-stub.cpp @@ -414,7 +414,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/lighting-app/lighting-common/gen/callback.h b/examples/lighting-app/lighting-common/gen/callback.h index eb115df8d7f608..18f4212d0eba0e 100644 --- a/examples/lighting-app/lighting-common/gen/callback.h +++ b/examples/lighting-app/lighting-common/gen/callback.h @@ -181,7 +181,7 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed @@ -251,7 +251,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -322,7 +322,7 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfGeneralCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -393,8 +393,9 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed * @@ -463,7 +464,7 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfLevelControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed @@ -532,7 +533,7 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -602,7 +603,7 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfOnOffClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed @@ -671,7 +672,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -742,7 +743,7 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -813,7 +814,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -884,7 +885,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -955,7 +956,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1440,7 +1441,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/examples/lock-app/lock-common/gen/callback-stub.cpp b/examples/lock-app/lock-common/gen/callback-stub.cpp index f021ed5bce0106..43852d578f78b5 100644 --- a/examples/lock-app/lock-common/gen/callback-stub.cpp +++ b/examples/lock-app/lock-common/gen/callback-stub.cpp @@ -406,7 +406,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/lock-app/lock-common/gen/callback.h b/examples/lock-app/lock-common/gen/callback.h index 97e34767a90fba..d6aa4569070269 100644 --- a/examples/lock-app/lock-common/gen/callback.h +++ b/examples/lock-app/lock-common/gen/callback.h @@ -173,7 +173,7 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed @@ -243,7 +243,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -314,7 +314,7 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfGeneralCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -385,8 +385,9 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed * @@ -455,7 +456,7 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -525,7 +526,7 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfOnOffClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed @@ -594,7 +595,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -665,7 +666,7 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -736,7 +737,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -807,7 +808,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -878,7 +879,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1310,7 +1311,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/examples/pump-app/pump-common/gen/callback-stub.cpp b/examples/pump-app/pump-common/gen/callback-stub.cpp index a4de196a9e5d7f..c4531bcde6e04e 100644 --- a/examples/pump-app/pump-common/gen/callback-stub.cpp +++ b/examples/pump-app/pump-common/gen/callback-stub.cpp @@ -430,7 +430,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/pump-app/pump-common/gen/callback.h b/examples/pump-app/pump-common/gen/callback.h index eb3357a57a4adb..33aca4c7224246 100644 --- a/examples/pump-app/pump-common/gen/callback.h +++ b/examples/pump-app/pump-common/gen/callback.h @@ -197,7 +197,7 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed @@ -267,7 +267,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -338,7 +338,7 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfGeneralCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -409,8 +409,9 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed * @@ -549,7 +550,7 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -619,7 +620,7 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfOnOffClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed @@ -688,7 +689,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -760,7 +761,7 @@ void emberAfPumpConfigurationAndControlClusterServerManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfPumpConfigurationAndControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfPumpConfigurationAndControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -831,7 +832,7 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1046,7 +1047,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1117,7 +1118,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1673,7 +1674,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/examples/pump-controller-app/pump-controller-common/gen/callback-stub.cpp b/examples/pump-controller-app/pump-controller-common/gen/callback-stub.cpp index a4de196a9e5d7f..c4531bcde6e04e 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/callback-stub.cpp +++ b/examples/pump-controller-app/pump-controller-common/gen/callback-stub.cpp @@ -430,7 +430,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/pump-controller-app/pump-controller-common/gen/callback.h b/examples/pump-controller-app/pump-controller-common/gen/callback.h index 84b04fe3475085..9d6063f8268a2e 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/callback.h +++ b/examples/pump-controller-app/pump-controller-common/gen/callback.h @@ -197,7 +197,7 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed @@ -339,7 +339,7 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfGeneralCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -551,7 +551,7 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -621,7 +621,7 @@ void emberAfOnOffClusterClientManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfOnOffClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Client Pre Attribute Changed @@ -690,7 +690,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -762,7 +762,7 @@ void emberAfPumpConfigurationAndControlClusterClientManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfPumpConfigurationAndControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfPumpConfigurationAndControlClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1048,7 +1048,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1119,7 +1119,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1611,7 +1611,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp index 4cd15fe6443aab..10c4f38551ad50 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp @@ -398,7 +398,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback.h b/examples/temperature-measurement-app/esp32/main/gen/callback.h index b22ab16f063b92..8906a63e391e33 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback.h +++ b/examples/temperature-measurement-app/esp32/main/gen/callback.h @@ -165,7 +165,7 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed @@ -235,7 +235,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -306,7 +306,7 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfGeneralCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -377,8 +377,9 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed * @@ -447,7 +448,7 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -518,7 +519,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -589,7 +590,7 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -660,7 +661,7 @@ void emberAfTemperatureMeasurementClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTemperatureMeasurementClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -731,7 +732,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -802,7 +803,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1216,7 +1217,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/examples/tv-app/tv-common/gen/callback-stub.cpp b/examples/tv-app/tv-common/gen/callback-stub.cpp index adcc01b86ce437..a0eaf38ba7dd41 100644 --- a/examples/tv-app/tv-common/gen/callback-stub.cpp +++ b/examples/tv-app/tv-common/gen/callback-stub.cpp @@ -494,7 +494,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/tv-app/tv-common/gen/callback.h b/examples/tv-app/tv-common/gen/callback.h index 0a1b46be900c7a..2b20d8a4089b9d 100644 --- a/examples/tv-app/tv-common/gen/callback.h +++ b/examples/tv-app/tv-common/gen/callback.h @@ -262,7 +262,7 @@ void emberAfAccountLoginClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAccountLoginClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfAccountLoginClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Account Login Cluster Server Pre Attribute Changed @@ -331,8 +331,9 @@ void emberAfApplicationBasicClusterServerManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfApplicationBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Application Basic Cluster Server Pre Attribute Changed * @@ -401,7 +402,7 @@ void emberAfApplicationLauncherClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationLauncherClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfApplicationLauncherClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -472,7 +473,7 @@ void emberAfAudioOutputClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAudioOutputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfAudioOutputClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Audio Output Cluster Server Pre Attribute Changed @@ -541,8 +542,9 @@ void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfContentLaunchClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfContentLaunchClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Content Launch Cluster Server Pre Attribute Changed * @@ -610,7 +612,7 @@ void emberAfDescriptorClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDescriptorClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfDescriptorClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Descriptor Cluster Server Pre Attribute Changed @@ -680,7 +682,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -751,8 +753,9 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed * @@ -821,7 +824,7 @@ void emberAfKeypadInputClusterServerManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfKeypadInputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfKeypadInputClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Keypad Input Cluster Server Pre Attribute Changed @@ -890,7 +893,7 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfLevelControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed @@ -959,7 +962,7 @@ void emberAfLowPowerClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLowPowerClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfLowPowerClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Low Power Cluster Server Pre Attribute Changed @@ -1028,7 +1031,7 @@ void emberAfMediaInputClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaInputClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfMediaInputClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Input Cluster Server Pre Attribute Changed @@ -1097,8 +1100,9 @@ void emberAfMediaPlaybackClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaPlaybackClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfMediaPlaybackClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Media Playback Cluster Server Pre Attribute Changed * @@ -1165,7 +1169,7 @@ void emberAfOnOffClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfOnOffClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Server Pre Attribute Changed @@ -1234,7 +1238,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1305,7 +1309,7 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1376,7 +1380,7 @@ void emberAfTvChannelClusterServerManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTvChannelClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfTvChannelClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief TV Channel Cluster Server Pre Attribute Changed @@ -1445,8 +1449,9 @@ void emberAfTargetNavigatorClusterServerManufacturerSpecificAttributeChangedCall * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTargetNavigatorClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfTargetNavigatorClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Target Navigator Cluster Server Pre Attribute Changed * @@ -1515,7 +1520,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1586,7 +1591,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1657,7 +1662,7 @@ void emberAfWakeOnLanClusterServerManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWakeOnLanClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfWakeOnLanClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Wake on LAN Cluster Server Pre Attribute Changed @@ -1726,7 +1731,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2132,7 +2137,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/examples/window-app/common/gen/callback-stub.cpp b/examples/window-app/common/gen/callback-stub.cpp index 3387f53fcbe831..c432a0fd5ebc65 100644 --- a/examples/window-app/common/gen/callback-stub.cpp +++ b/examples/window-app/common/gen/callback-stub.cpp @@ -350,7 +350,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/examples/window-app/common/gen/callback.h b/examples/window-app/common/gen/callback.h index c24e0118395028..61de8ef6de1653 100644 --- a/examples/window-app/common/gen/callback.h +++ b/examples/window-app/common/gen/callback.h @@ -117,7 +117,7 @@ void emberAfBasicClusterServerManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Server Pre Attribute Changed @@ -186,7 +186,7 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -257,7 +257,7 @@ void emberAfThreadNetworkDiagnosticsClusterServerManufacturerSpecificAttributeCh * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfThreadNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -328,8 +328,9 @@ void emberAfWindowCoveringClusterServerManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWindowCoveringClusterServerMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfWindowCoveringClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Window Covering Cluster Server Pre Attribute Changed * @@ -712,7 +713,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/src/controller/data_model/gen/callback-stub.cpp b/src/controller/data_model/gen/callback-stub.cpp index 6f5739b6cc416c..3313e9dd75aa61 100644 --- a/src/controller/data_model/gen/callback-stub.cpp +++ b/src/controller/data_model/gen/callback-stub.cpp @@ -646,7 +646,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback(EmberAfMessageStruct * * @param message Ver.: always * @param status Ver.: always */ -bool __attribute__((weak)) emberAfMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { return false; diff --git a/src/controller/data_model/gen/callback.h b/src/controller/data_model/gen/callback.h index 42b6cae0354587..359bb34f593468 100644 --- a/src/controller/data_model/gen/callback.h +++ b/src/controller/data_model/gen/callback.h @@ -414,7 +414,7 @@ void emberAfAccountLoginClusterClientManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAccountLoginClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfAccountLoginClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Account Login Cluster Client Pre Attribute Changed @@ -483,8 +483,9 @@ void emberAfApplicationBasicClusterClientManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationBasicClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfApplicationBasicClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Application Basic Cluster Client Pre Attribute Changed * @@ -553,7 +554,7 @@ void emberAfApplicationLauncherClusterClientManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfApplicationLauncherClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfApplicationLauncherClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -624,7 +625,7 @@ void emberAfAudioOutputClusterClientManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfAudioOutputClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfAudioOutputClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Audio Output Cluster Client Pre Attribute Changed @@ -693,8 +694,9 @@ void emberAfBarrierControlClusterClientManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBarrierControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBarrierControlClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Barrier Control Cluster Client Pre Attribute Changed * @@ -762,7 +764,7 @@ void emberAfBasicClusterClientManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBasicClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBasicClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Basic Cluster Client Pre Attribute Changed @@ -902,7 +904,7 @@ void emberAfBindingClusterClientManufacturerSpecificAttributeChangedCallback(chi * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBindingClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfBindingClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Binding Cluster Client Pre Attribute Changed @@ -1042,7 +1044,7 @@ void emberAfColorControlClusterClientManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfColorControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfColorControlClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Color Control Cluster Client Pre Attribute Changed @@ -1111,8 +1113,9 @@ void emberAfContentLaunchClusterClientManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfContentLaunchClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfContentLaunchClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Content Launch Cluster Client Pre Attribute Changed * @@ -1180,7 +1183,7 @@ void emberAfDescriptorClusterClientManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDescriptorClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfDescriptorClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Descriptor Cluster Client Pre Attribute Changed @@ -1249,7 +1252,7 @@ void emberAfDoorLockClusterClientManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDoorLockClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfDoorLockClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Door Lock Cluster Client Pre Attribute Changed @@ -1319,7 +1322,7 @@ void emberAfEthernetNetworkDiagnosticsClusterClientManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfEthernetNetworkDiagnosticsClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1460,7 +1463,7 @@ void emberAfGeneralCommissioningClusterClientManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfGeneralCommissioningClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1531,8 +1534,9 @@ void emberAfGeneralDiagnosticsClusterClientManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Client Pre Attribute Changed * @@ -1601,8 +1605,9 @@ void emberAfGroupKeyManagementClusterClientManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupKeyManagementClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGroupKeyManagementClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Group Key Management Cluster Client Pre Attribute Changed * @@ -1671,7 +1676,7 @@ void emberAfGroupsClusterClientManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfGroupsClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Groups Cluster Client Pre Attribute Changed @@ -1740,7 +1745,7 @@ void emberAfIdentifyClusterClientManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfIdentifyClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfIdentifyClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Identify Cluster Client Pre Attribute Changed @@ -1809,7 +1814,7 @@ void emberAfKeypadInputClusterClientManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfKeypadInputClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfKeypadInputClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Keypad Input Cluster Client Pre Attribute Changed @@ -1878,7 +1883,7 @@ void emberAfLevelControlClusterClientManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfLevelControlClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Client Pre Attribute Changed @@ -1947,7 +1952,7 @@ void emberAfLowPowerClusterClientManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLowPowerClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfLowPowerClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Low Power Cluster Client Pre Attribute Changed @@ -2016,7 +2021,7 @@ void emberAfMediaInputClusterClientManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaInputClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfMediaInputClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Media Input Cluster Client Pre Attribute Changed @@ -2085,8 +2090,9 @@ void emberAfMediaPlaybackClusterClientManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfMediaPlaybackClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfMediaPlaybackClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Media Playback Cluster Client Pre Attribute Changed * @@ -2154,7 +2160,7 @@ void emberAfNetworkCommissioningClusterClientManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfNetworkCommissioningClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2224,7 +2230,7 @@ void emberAfOnOffClusterClientManufacturerSpecificAttributeChangedCallback(chip: * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOnOffClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfOnOffClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief On/off Cluster Client Pre Attribute Changed @@ -2293,7 +2299,7 @@ void emberAfOperationalCredentialsClusterClientManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfOperationalCredentialsClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2365,7 +2371,7 @@ void emberAfPumpConfigurationAndControlClusterClientManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfPumpConfigurationAndControlClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfPumpConfigurationAndControlClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2509,7 +2515,7 @@ void emberAfScenesClusterClientManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfScenesClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfScenesClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Scenes Cluster Client Pre Attribute Changed @@ -2578,7 +2584,7 @@ void emberAfSoftwareDiagnosticsClusterClientManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfSoftwareDiagnosticsClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2649,7 +2655,7 @@ void emberAfSwitchClusterClientManufacturerSpecificAttributeChangedCallback(chip * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSwitchClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfSwitchClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Switch Cluster Client Pre Attribute Changed @@ -2718,7 +2724,7 @@ void emberAfTvChannelClusterClientManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTvChannelClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfTvChannelClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief TV Channel Cluster Client Pre Attribute Changed @@ -2787,8 +2793,9 @@ void emberAfTargetNavigatorClusterClientManufacturerSpecificAttributeChangedCall * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTargetNavigatorClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfTargetNavigatorClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Target Navigator Cluster Client Pre Attribute Changed * @@ -2857,7 +2864,7 @@ void emberAfTemperatureMeasurementClusterClientManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTemperatureMeasurementClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -2928,7 +2935,7 @@ void emberAfTestClusterClusterClientManufacturerSpecificAttributeChangedCallback * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTestClusterClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfTestClusterClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Test Cluster Cluster Client Pre Attribute Changed @@ -2997,7 +3004,7 @@ void emberAfThermostatClusterClientManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfThermostatClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfThermostatClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Thermostat Cluster Client Pre Attribute Changed @@ -3066,7 +3073,7 @@ void emberAfTrustedRootCertificatesClusterClientManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterClientMessageSentCallback(chip::MessageSendDestination & destination, +void emberAfTrustedRootCertificatesClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -3137,7 +3144,7 @@ void emberAfWakeOnLanClusterClientManufacturerSpecificAttributeChangedCallback(c * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWakeOnLanClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfWakeOnLanClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Wake on LAN Cluster Client Pre Attribute Changed @@ -3206,8 +3213,9 @@ void emberAfWindowCoveringClusterClientManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWindowCoveringClusterClientMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfWindowCoveringClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Window Covering Cluster Client Pre Attribute Changed * @@ -3922,7 +3930,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change From e28fd2f2f16d7f56df433d69f7795e2d389df812 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Tue, 25 May 2021 12:51:10 +0800 Subject: [PATCH 4/8] Refine MessageSendDestination API --- .../ias-zone-server/ias-zone-server.cpp | 4 +- src/app/util/af-main-common.cpp | 56 +++++++-------- src/app/util/af-main.h | 4 +- src/app/util/af-types.h | 72 +++++++++++-------- src/app/util/af.h | 9 +-- src/app/util/attribute-storage.cpp | 4 +- src/app/util/attribute-storage.h | 4 +- src/app/util/util.cpp | 8 +-- .../templates/app/callback-stub-src.zapt | 2 +- .../zap-templates/templates/app/callback.zapt | 4 +- src/lib/support/Variant.h | 2 +- 11 files changed, 91 insertions(+), 78 deletions(-) diff --git a/src/app/clusters/ias-zone-server/ias-zone-server.cpp b/src/app/clusters/ias-zone-server/ias-zone-server.cpp index 18358364b85d51..f9329b11437b47 100644 --- a/src/app/clusters/ias-zone-server/ias-zone-server.cpp +++ b/src/app/clusters/ias-zone-server/ias-zone-server.cpp @@ -762,8 +762,8 @@ void emberAfPluginIasZoneServerPrintQueueConfig(void) // destination when the destination is the only router the node is joined to. // In that case, the command will never have been sent, as the device will have // had no router by which to send the command. -void emberAfIasZoneClusterServerMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, - uint8_t * message, EmberStatus status) +void emberAfIasZoneClusterServerMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status) { #if defined(EMBER_AF_PLUGIN_IAS_ZONE_SERVER_ENABLE_QUEUE) uint8_t frameControl; diff --git a/src/app/util/af-main-common.cpp b/src/app/util/af-main-common.cpp index 4220d153643ef3..09ccd2ada82967 100644 --- a/src/app/util/af-main-common.cpp +++ b/src/app/util/af-main-common.cpp @@ -202,8 +202,8 @@ void emAfInitializeMessageSentCallbackArray(void) } } -static EmberStatus send(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, - bool broadcast, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback) +static EmberStatus send(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, + uint8_t * message, bool broadcast, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback) { EmberStatus status; uint8_t index; @@ -330,8 +330,8 @@ EmberStatus emberAfSendMulticastWithAliasWithCallback(GroupId multicastId, Ember uint8_t * message, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback) { - apsFrame->groupId = multicastId; - MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingMulticast(multicastId)); + apsFrame->groupId = multicastId; + const MessageSendDestination destination = MessageSendDestination::Multicast(multicastId); return send(destination, apsFrame, messageLength, message, true, // broadcast alias, sequence, callback); @@ -340,8 +340,8 @@ EmberStatus emberAfSendMulticastWithAliasWithCallback(GroupId multicastId, Ember EmberStatus emberAfSendMulticastWithCallback(GroupId multicastId, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback) { - apsFrame->groupId = multicastId; - MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingMulticast(multicastId)); + apsFrame->groupId = multicastId; + const MessageSendDestination destination = MessageSendDestination::Multicast(multicastId); return send(destination, apsFrame, messageLength, message, true, // broadcast? 0, // alias @@ -423,12 +423,12 @@ EmberStatus emberAfSendMulticastToBindings(EmberApsFrame * apsFrame, uint16_t me // return emberAfSendBroadcastWithCallback(destination, apsFrame, messageLength, message, NULL); //} -EmberStatus emberAfSendUnicastWithCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, - uint8_t * message, EmberAfMessageSentFunction callback) +EmberStatus emberAfSendUnicastWithCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback) { // The source endpoint in the APS frame MAY NOT be valid at this point if the // outgoing type is "via binding." - if (destination.Is()) + if (destination.IsViaBinding()) { // If using binding, set the endpoints based on those in the binding. The // cluster in the binding is not used because bindings can be used to send @@ -436,7 +436,7 @@ EmberStatus emberAfSendUnicastWithCallback(MessageSendDestination & destination, EmberBindingTableEntry binding; // TODO: This cast should go away once // https://github.com/project-chip/connectedhomeip/issues/3584 is fixed. - EmberStatus status = emberGetBinding(destination.Get().mBindingIndex, &binding); + EmberStatus status = emberGetBinding(destination.Get().mBindingIndex, &binding); if (status != EMBER_SUCCESS) { return status; @@ -451,7 +451,7 @@ EmberStatus emberAfSendUnicastWithCallback(MessageSendDestination & destination, callback); } -EmberStatus emberAfSendUnicast(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, +EmberStatus emberAfSendUnicast(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message) { return emberAfSendUnicastWithCallback(destination, apsFrame, messageLength, message, NULL); @@ -474,9 +474,9 @@ EmberStatus emberAfSendUnicastToBindingsWithCallback(EmberApsFrame * apsFrame, u if (binding.type == EMBER_UNICAST_BINDING && binding.local == apsFrame->sourceEndpoint && binding.clusterId == apsFrame->clusterId) { - apsFrame->destinationEndpoint = binding.remote; - MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingBinding(i)); - status = send(destination, apsFrame, messageLength, message, + apsFrame->destinationEndpoint = binding.remote; + const MessageSendDestination destination = MessageSendDestination::ViaBinding(i); + status = send(destination, apsFrame, messageLength, message, false, // broadcast? 0, // alias 0, // sequence @@ -559,7 +559,7 @@ static void printMessage(EmberApsFrame * apsFrame, uint16_t messageLength, uint8 emberAfAppPrintln(""); } -void emAfMessageSentHandler(MessageSendDestination & destination, EmberApsFrame * apsFrame, EmberStatus status, +void emAfMessageSentHandler(const MessageSendDestination & destination, EmberApsFrame * apsFrame, EmberStatus status, uint16_t messageLength, uint8_t * messageContents, uint8_t messageTag) { EmberAfMessageSentFunction callback; @@ -599,7 +599,7 @@ void emAfMessageSentHandler(MessageSendDestination & destination, EmberApsFrame } #ifdef EMBER_AF_PLUGIN_FRAGMENTATION -void emAfFragmentationMessageSentHandler(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t * buffer, +void emAfFragmentationMessageSentHandler(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t * buffer, uint16_t bufLen, EmberStatus status, uint8_t messageTag) { // the fragmented message is no longer in process @@ -612,7 +612,7 @@ void emAfFragmentationMessageSentHandler(MessageSendDestination & destination, E } #endif // EMBER_AF_PLUGIN_FRAGMENTATION -EmberStatus emAfSend(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t messageLength, uint8_t * message, +EmberStatus emAfSend(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t messageLength, uint8_t * message, uint8_t * messageTag, EmberNodeId alias, uint8_t sequence) { // TODO: There's an impedance mismatch here in a few ways: @@ -632,9 +632,9 @@ EmberStatus emAfSend(MessageSendDestination & destination, EmberApsFrame * apsFr EmberStatus status = EMBER_SUCCESS; switch (destination.GetType()) { - case MessageSendDestination::OutGoingBinding::VariantId: { + case MessageSendDestination::VariantViaBinding::VariantId: { EmberBindingTableEntry binding; - status = emberGetBinding(destination.Get().mBindingIndex, &binding); + status = emberGetBinding(destination.Get().mBindingIndex, &binding); if (status != EMBER_SUCCESS) { break; @@ -647,32 +647,32 @@ EmberStatus emAfSend(MessageSendDestination & destination, EmberApsFrame * apsFr status = chipSendUnicast(binding.nodeId, apsFrame, messageLength, message); break; } - case MessageSendDestination::OutGoingAddressTable::VariantId: + case MessageSendDestination::VariantViaAddressTable::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case MessageSendDestination::OutGoingDirect::VariantId: + case MessageSendDestination::VariantDirect::VariantId: status = - chipSendUnicast(destination.Get().mNodeId, apsFrame, messageLength, message); + chipSendUnicast(destination.Get().mNodeId, apsFrame, messageLength, message); break; - case MessageSendDestination::OutGoingMulticast::VariantId: + case MessageSendDestination::VariantMulticast::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case MessageSendDestination::OutGoingMulticastWithAlias::VariantId: + case MessageSendDestination::VariantMulticastWithAlias::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case MessageSendDestination::OutGoingBroadcast::VariantId: + case MessageSendDestination::VariantBroadcast::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case MessageSendDestination::OutGoingBroadcastWithAlias::VariantId: + case MessageSendDestination::VariantBroadcastWithAlias::VariantId: // No implementation yet. status = EMBER_ERR_FATAL; break; - case MessageSendDestination::OutGoingExchange::VariantId: - status = chipSendUnicast(destination.Get().mExchangeContext, apsFrame, + case MessageSendDestination::VariantViaExchange::VariantId: + status = chipSendUnicast(destination.Get().mExchangeContext, apsFrame, messageLength, message); break; default: diff --git a/src/app/util/af-main.h b/src/app/util/af-main.h index 8d0566b2a60b2d..19c0ec81489671 100644 --- a/src/app/util/af-main.h +++ b/src/app/util/af-main.h @@ -121,8 +121,8 @@ bool emAfProcessZdo(EmberNodeId sender, EmberApsFrame * apsFrame, uint8_t * mess void emAfIncomingMessageHandler(EmberIncomingMessageType type, EmberApsFrame * apsFrame, uint8_t lastHopLqi, int8_t lastHopRssi, uint16_t messageLength, uint8_t * messageContents); -EmberStatus emAfSend(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t messageLength, uint8_t * message, - uint8_t * messageTag, EmberNodeId alias, uint8_t sequence); +EmberStatus emAfSend(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t messageLength, + uint8_t * message, uint8_t * messageTag, EmberNodeId alias, uint8_t sequence); void emAfMessageSentHandler(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, EmberStatus status, uint16_t messageLength, uint8_t * messageContents, uint8_t messageTag); diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index e9bdb6a7a6f9ce..fc349785f714a1 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -1259,84 +1259,98 @@ namespace chip { class MessageSendDestination { public: - struct OutGoingBinding + struct VariantViaBinding { static constexpr const std::size_t VariantId = 1; - explicit OutGoingBinding(uint8_t bindingIndex) : mBindingIndex(bindingIndex) {} + explicit VariantViaBinding(uint8_t bindingIndex) : mBindingIndex(bindingIndex) {} uint8_t mBindingIndex; }; - struct OutGoingAddressTable + struct VariantViaAddressTable { static constexpr const std::size_t VariantId = 2; }; - struct OutGoingDirect + struct VariantDirect { static constexpr const std::size_t VariantId = 3; - explicit OutGoingDirect(NodeId nodeId) : mNodeId(nodeId) {} + explicit VariantDirect(NodeId nodeId) : mNodeId(nodeId) {} NodeId mNodeId; }; - struct OutGoingMulticast + struct VariantMulticast { static constexpr const std::size_t VariantId = 4; - explicit OutGoingMulticast(GroupId groupId) : mGroupId(groupId) {} + explicit VariantMulticast(GroupId groupId) : mGroupId(groupId) {} GroupId mGroupId; }; - struct OutGoingMulticastWithAlias + struct VariantMulticastWithAlias { static constexpr const std::size_t VariantId = 5; - explicit OutGoingMulticastWithAlias(GroupId groupId) : mGroupId(groupId) {} + explicit VariantMulticastWithAlias(GroupId groupId) : mGroupId(groupId) {} GroupId mGroupId; }; - struct OutGoingBroadcast + struct VariantBroadcast { static constexpr const std::size_t VariantId = 6; }; - struct OutGoingBroadcastWithAlias + struct VariantBroadcastWithAlias { static constexpr const std::size_t VariantId = 7; }; - struct OutGoingExchange + struct VariantViaExchange { static constexpr const std::size_t VariantId = 8; - explicit OutGoingExchange(Messaging::ExchangeContext * exchangeContext) : mExchangeContext(exchangeContext) {} + explicit VariantViaExchange(Messaging::ExchangeContext * exchangeContext) : mExchangeContext(exchangeContext) {} Messaging::ExchangeContext * mExchangeContext; }; - MessageSendDestination() = default; MessageSendDestination(MessageSendDestination & that) = default; MessageSendDestination(const MessageSendDestination & that) = default; MessageSendDestination(MessageSendDestination && that) = default; - template - MessageSendDestination(OutGoing && destination) + static MessageSendDestination ViaBinding(uint8_t bindingIndex) { - mDestination.Set(std::forward(destination)); + return MessageSendDestination(VariantViaBinding(bindingIndex)); } - std::size_t GetType() { return mDestination.GetType(); } + static MessageSendDestination Direct(NodeId nodeId) { return MessageSendDestination(VariantDirect(nodeId)); } - template - bool Is() + static MessageSendDestination Multicast(GroupId groupId) { return MessageSendDestination(VariantMulticast(groupId)); } + + static MessageSendDestination MulticastWithAlias(GroupId groupId) { - return mDestination.Is(); + return MessageSendDestination(VariantMulticastWithAlias(groupId)); } - template - OutGoing & Get() + static MessageSendDestination ViaExchange(Messaging::ExchangeContext * exchangeContext) { - return mDestination.Get(); + return MessageSendDestination(VariantViaExchange(exchangeContext)); + } + + std::size_t GetType() const { return mDestination.GetType(); } + + bool IsViaBinding() const { return mDestination.Is(); } + + template + const Destination & Get() const + { + return mDestination.Get(); } private: - Variant + template + MessageSendDestination(Destination && destination) + { + mDestination.Set(std::forward(destination)); + } + + Variant mDestination; }; } // namespace chip @@ -1346,8 +1360,8 @@ class MessageSendDestination * * This function is called when a message is sent. */ -typedef void (*EmberAfMessageSentFunction)(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, - uint8_t * message, EmberStatus status); +typedef void (*EmberAfMessageSentFunction)(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** * @brief The EmberAfMessageStruct is a struct wrapper that @@ -1359,7 +1373,7 @@ typedef struct EmberAfMessageSentFunction callback; EmberApsFrame * apsFrame; uint8_t * message; - chip::MessageSendDestination destination; + const chip::MessageSendDestination destination; uint16_t messageLength; bool broadcast; } EmberAfMessageStruct; diff --git a/src/app/util/af.h b/src/app/util/af.h index 5ccbe4ef533e78..ae8128aa0cf54d 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -1297,13 +1297,13 @@ EmberStatus emberAfSendMulticastWithCallback(chip::GroupId multicastId, EmberAps /** * @brief Sends unicast. */ -EmberStatus emberAfSendUnicast(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, +EmberStatus emberAfSendUnicast(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message); /** * @brief Sends unicast with attached message sent callback. */ -EmberStatus emberAfSendUnicastWithCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +EmberStatus emberAfSendUnicastWithCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback); /** @@ -1390,12 +1390,13 @@ EmberStatus emberAfSendCommandMulticastToBindings(void); * using the emberAfFill... macros from the client command API. * It will be sent as unicast. */ -EmberStatus emberAfSendCommandUnicast(chip::MessageSendDestination & destination); +EmberStatus emberAfSendCommandUnicast(const chip::MessageSendDestination & destination); /** * @brief emberAfSendCommandUnicast with attached message sent callback. */ -EmberStatus emberAfSendCommandUnicastWithCallback(chip::MessageSendDestination & destination, EmberAfMessageSentFunction callback); +EmberStatus emberAfSendCommandUnicastWithCallback(const chip::MessageSendDestination & destination, + EmberAfMessageSentFunction callback); /** * @brief Sends the command prepared with emberAfFill.... macro. diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index d907052366d571..95d1c93bb99978 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -300,8 +300,8 @@ void emberAfClusterDefaultResponseCallback(EndpointId endpoint, ClusterId cluste } // This function is used to call the per-cluster message sent callback -void emberAfClusterMessageSentWithMfgCodeCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, - uint8_t * message, EmberStatus status, uint16_t mfgCode) +void emberAfClusterMessageSentWithMfgCodeCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status, uint16_t mfgCode) { if (apsFrame != NULL && message != NULL && msgLen != 0) { diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index fe3efef6393e6d..912e153c7adbf5 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -218,11 +218,11 @@ void emberAfClusterDefaultResponseWithMfgCodeCallback(chip::EndpointId endpoint, EmberAfStatus status, uint8_t clientServerMask, uint16_t manufacturerCode); // Calls the message sent callback for a specific cluster, and wraps emberAfClusterMessageSentWithMfgCodeCallback -void emberAfClusterMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +void emberAfClusterMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); // Calls the message sent callback for a specific cluster. -void emberAfClusterMessageSentWithMfgCodeCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +void emberAfClusterMessageSentWithMfgCodeCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status, uint16_t manufacturerCode); diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 10a8497de983f5..1101e44177a744 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -748,11 +748,9 @@ EmberStatus emberAfSendResponseWithCallback(EmberAfMessageSentFunction callback) } else if (!isBroadcastDestination(emberAfResponseDestination)) { - label = 'U'; - MessageSendDestination destination = - MessageSendDestination(MessageSendDestination::OutGoingExchange(emberAfResponseDestination)); - status = - emberAfSendUnicastWithCallback(destination, &emberAfResponseApsFrame, appResponseLength, appResponseData, callback); + label = 'U'; + status = emberAfSendUnicastWithCallback(MessageSendDestination::ViaExchange(emberAfResponseDestination), + &emberAfResponseApsFrame, appResponseLength, appResponseData, callback); } else { diff --git a/src/app/zap-templates/templates/app/callback-stub-src.zapt b/src/app/zap-templates/templates/app/callback-stub-src.zapt index ecb2e756e784e5..13198d56ef0d53 100644 --- a/src/app/zap-templates/templates/app/callback-stub-src.zapt +++ b/src/app/zap-templates/templates/app/callback-stub-src.zapt @@ -323,7 +323,7 @@ bool __attribute__((weak)) emberAfPreMessageSendCallback( * @param status Ver.: always */ bool __attribute__((weak)) emberAfMessageSentCallback( - MessageSendDestination & destination, + const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { diff --git a/src/app/zap-templates/templates/app/callback.zapt b/src/app/zap-templates/templates/app/callback.zapt index c19152d61dabbc..61cc5d70d8cd2a 100644 --- a/src/app/zap-templates/templates/app/callback.zapt +++ b/src/app/zap-templates/templates/app/callback.zapt @@ -81,7 +81,7 @@ void emberAf{{asCamelCased name false}}Cluster{{asCamelCased side false}}Manufac * @param message The message that was sent * @param status The status of the sent message */ -void emberAf{{asCamelCased name false}}Cluster{{asCamelCased side false}}MessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAf{{asCamelCased name false}}Cluster{{asCamelCased side false}}MessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief {{name}} Cluster {{asCamelCased side false}} Pre Attribute Changed * @@ -372,7 +372,7 @@ bool emberAfPreMessageSendCallback(EmberAfMessageStruct * messageStruct, EmberSt * @param message Ver.: always * @param status Ver.: always */ -bool emberAfMessageSentCallback(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, +bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Pre Attribute Change diff --git a/src/lib/support/Variant.h b/src/lib/support/Variant.h index 1aa36cdc6fe54d..c6003b039232a9 100644 --- a/src/lib/support/Variant.h +++ b/src/lib/support/Variant.h @@ -127,7 +127,7 @@ struct Variant that.mTypeId = kInvalidType; } - Variant & operator=(Variant & that) + Variant & operator=(const Variant & that) { Curry::Destroy(mTypeId, &mData); mTypeId = that.mTypeId; From 6360539f86673169c0a905562a813f3dd6f8b359 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Wed, 26 May 2021 18:05:55 +0800 Subject: [PATCH 5/8] gen files --- .../all-clusters-common/gen/callback.h | 11 +++++------ src/controller/data_model/gen/callback.h | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback.h b/examples/all-clusters-app/all-clusters-common/gen/callback.h index cb779434e2037e..13ebff25a1ed3f 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback.h +++ b/examples/all-clusters-app/all-clusters-common/gen/callback.h @@ -1021,9 +1021,9 @@ void emberAfBridgedDeviceBasicClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBridgedDeviceBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBridgedDeviceBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Bridged Device Basic Cluster Server Pre Attribute Changed * @@ -1441,9 +1441,8 @@ void emberAfFixedLabelClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfFixedLabelClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfFixedLabelClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Fixed Label Cluster Server Pre Attribute Changed * diff --git a/src/controller/data_model/gen/callback.h b/src/controller/data_model/gen/callback.h index 359bb34f593468..4e1cf48ba7f804 100644 --- a/src/controller/data_model/gen/callback.h +++ b/src/controller/data_model/gen/callback.h @@ -973,9 +973,9 @@ void emberAfBridgedDeviceBasicClusterClientManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBridgedDeviceBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBridgedDeviceBasicClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Bridged Device Basic Cluster Client Pre Attribute Changed * @@ -1393,9 +1393,8 @@ void emberAfFixedLabelClusterClientManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfFixedLabelClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfFixedLabelClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Fixed Label Cluster Client Pre Attribute Changed * From e6d16beb9397d5b03e8da8561fc9cec34f4eae1b Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Thu, 27 May 2021 02:20:23 +0800 Subject: [PATCH 6/8] Resolve comment --- .../ias-zone-client/ias-zone-client.cpp | 3 +- .../messaging-client/messaging-client.cpp | 2 +- .../messaging-server/messaging-server.cpp | 6 +- src/app/reporting/reporting.cpp | 10 +-- src/app/util/af-main-common.cpp | 59 +++++----------- src/app/util/af-main.h | 2 +- src/app/util/af-types.h | 68 +++++++++---------- src/app/util/attribute-storage.cpp | 2 +- src/app/util/client-api.cpp | 4 +- 9 files changed, 65 insertions(+), 91 deletions(-) diff --git a/src/app/clusters/ias-zone-client/ias-zone-client.cpp b/src/app/clusters/ias-zone-client/ias-zone-client.cpp index ffd0713c132297..5bd9fddd28783f 100644 --- a/src/app/clusters/ias-zone-client/ias-zone-client.cpp +++ b/src/app/clusters/ias-zone-client/ias-zone-client.cpp @@ -390,8 +390,7 @@ static void removeServer(uint8_t * ieeeAddress) static EmberStatus sendCommand(EmberNodeId destAddress) { emberAfSetCommandEndpoints(myEndpoint, emberAfIasZoneClientKnownServers[currentIndex].endpoint); - MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingDirect(destAddress)); - EmberStatus status = emberAfSendCommandUnicast(destination); + EmberStatus status = emberAfSendCommandUnicast(MessageSendDestination::Direct(destAddress)); emberAfIasZoneClusterPrintln("Sent IAS Zone Client Command to 0x%2X (%d -> %d) status: 0x%X", destAddress, myEndpoint, emberAfIasZoneClientKnownServers[currentIndex].endpoint, status); if (status != EMBER_SUCCESS) diff --git a/src/app/clusters/messaging-client/messaging-client.cpp b/src/app/clusters/messaging-client/messaging-client.cpp index 7aa8ba0d8afe15..2e134edb6093b3 100644 --- a/src/app/clusters/messaging-client/messaging-client.cpp +++ b/src/app/clusters/messaging-client/messaging-client.cpp @@ -328,7 +328,7 @@ EmberAfStatus emberAfPluginMessagingClientConfirmMessage(EndpointId endpoint) emberAfGetCurrentTime(), 0x00, ""); // The source and destination are reversed for the confirmation. emberAfSetCommandEndpoints(messageTable[ep].clientEndpoint, esiEntry->endpoint); - MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingDirect(nodeId)); + const MessageSendDestination destination = MessageSendDestination::Direct(nodeId); status = ((emberAfSendCommandUnicast(destination) == EMBER_SUCCESS) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE); } diff --git a/src/app/clusters/messaging-server/messaging-server.cpp b/src/app/clusters/messaging-server/messaging-server.cpp index 47ebddaf6dfc6a..cfc2157d6696c8 100644 --- a/src/app/clusters/messaging-server/messaging-server.cpp +++ b/src/app/clusters/messaging-server/messaging-server.cpp @@ -226,8 +226,7 @@ void emberAfPluginMessagingServerDisplayMessage(EmberNodeId nodeId, uint8_t srcE message.startTime, message.durationInMinutes, message.message, message.extendedMessageControl); emberAfSetCommandEndpoints(srcEndpoint, dstEndpoint); emberAfGetCommandApsFrame()->options |= EMBER_APS_OPTION_SOURCE_EUI64; - MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingDirect(nodeId)); - status = emberAfSendCommandUnicast(destination); + status = emberAfSendCommandUnicast(MessageSendDestination::Direct(nodeId)); if (status != EMBER_SUCCESS) { emberAfMessagingClusterPrintln("Error in display %x", status); @@ -249,8 +248,7 @@ void emberAfPluginMessagingServerCancelMessage(EmberNodeId nodeId, uint8_t srcEn ZCL_CANCEL_MESSAGE_COMMAND_ID, "wu", message.messageId, message.messageControl); emberAfSetCommandEndpoints(srcEndpoint, dstEndpoint); emberAfGetCommandApsFrame()->options |= EMBER_APS_OPTION_SOURCE_EUI64; - MessageSendDestination destination = MessageSendDestination(MessageSendDestination::OutGoingDirect(nodeId)); - status = emberAfSendCommandUnicast(destination); + status = emberAfSendCommandUnicast(MessageSendDestination::Direct(nodeId)); if (status != EMBER_SUCCESS) { emberAfMessagingClusterPrintln("Error in cancel %x", status); diff --git a/src/app/reporting/reporting.cpp b/src/app/reporting/reporting.cpp index d1c92ccd37499e..506318ba83e149 100644 --- a/src/app/reporting/reporting.cpp +++ b/src/app/reporting/reporting.cpp @@ -73,8 +73,8 @@ static void removeConfigurationAndScheduleTick(uint8_t index); static EmberAfStatus configureReceivedAttribute(const EmberAfClusterCommand * cmd, AttributeId attributeId, uint8_t mask, uint16_t timeout); static void putReportableChangeInResp(const EmberAfPluginReportingEntry * entry, EmberAfAttributeType dataType); -static void retrySendReport(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +static void retrySendReport(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status); static uint32_t computeStringHash(uint8_t * data, uint8_t length); EmberEventControl emberAfPluginReportingTickEventControl; @@ -99,8 +99,8 @@ EmberAfStatus emberAfPluginReportingConfiguredCallback(const EmberAfPluginReport return EMBER_ZCL_STATUS_SUCCESS; } -static void retrySendReport(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status) +static void retrySendReport(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { // Retry once, and do so by unicasting without a pointer to this callback if (status != EMBER_SUCCESS) @@ -364,7 +364,7 @@ static void conditionallySendReport(EndpointId endpoint, ClusterId clusterId) EmberStatus status; if (emberAfIsDeviceEnabled(endpoint) || clusterId == ZCL_IDENTIFY_CLUSTER_ID) { - status = emberAfSendCommandUnicastToBindingsWithCallback((EmberAfMessageSentFunction)(&retrySendReport)); + status = emberAfSendCommandUnicastToBindingsWithCallback(&retrySendReport); // If the callback table is full, attempt to send the message with no // callback. Note that this could lead to a message failing to transmit diff --git a/src/app/util/af-main-common.cpp b/src/app/util/af-main-common.cpp index 09ccd2ada82967..83dbc6256c1c39 100644 --- a/src/app/util/af-main-common.cpp +++ b/src/app/util/af-main-common.cpp @@ -331,7 +331,7 @@ EmberStatus emberAfSendMulticastWithAliasWithCallback(GroupId multicastId, Ember EmberAfMessageSentFunction callback) { apsFrame->groupId = multicastId; - const MessageSendDestination destination = MessageSendDestination::Multicast(multicastId); + const MessageSendDestination destination = MessageSendDestination::MulticastWithAlias(multicastId); return send(destination, apsFrame, messageLength, message, true, // broadcast alias, sequence, callback); @@ -436,7 +436,7 @@ EmberStatus emberAfSendUnicastWithCallback(const MessageSendDestination & destin EmberBindingTableEntry binding; // TODO: This cast should go away once // https://github.com/project-chip/connectedhomeip/issues/3584 is fixed. - EmberStatus status = emberGetBinding(destination.Get().mBindingIndex, &binding); + EmberStatus status = emberGetBinding(destination.GetBindingIndex(), &binding); if (status != EMBER_SUCCESS) { return status; @@ -630,54 +630,31 @@ EmberStatus emAfSend(const MessageSendDestination & destination, EmberApsFrame * // tracks this. *messageTag = INVALID_MESSAGE_TAG; EmberStatus status = EMBER_SUCCESS; - switch (destination.GetType()) + if (destination.IsViaBinding()) { - case MessageSendDestination::VariantViaBinding::VariantId: { EmberBindingTableEntry binding; - status = emberGetBinding(destination.Get().mBindingIndex, &binding); + status = emberGetBinding(destination.GetBindingIndex(), &binding); if (status != EMBER_SUCCESS) { - break; + return status; } if (binding.type != EMBER_UNICAST_BINDING) { - status = EMBER_INVALID_BINDING_INDEX; - break; + return EMBER_INVALID_BINDING_INDEX; } - status = chipSendUnicast(binding.nodeId, apsFrame, messageLength, message); - break; + return chipSendUnicast(binding.nodeId, apsFrame, messageLength, message); } - case MessageSendDestination::VariantViaAddressTable::VariantId: - // No implementation yet. - status = EMBER_ERR_FATAL; - break; - case MessageSendDestination::VariantDirect::VariantId: - status = - chipSendUnicast(destination.Get().mNodeId, apsFrame, messageLength, message); - break; - case MessageSendDestination::VariantMulticast::VariantId: - // No implementation yet. - status = EMBER_ERR_FATAL; - break; - case MessageSendDestination::VariantMulticastWithAlias::VariantId: - // No implementation yet. - status = EMBER_ERR_FATAL; - break; - case MessageSendDestination::VariantBroadcast::VariantId: - // No implementation yet. - status = EMBER_ERR_FATAL; - break; - case MessageSendDestination::VariantBroadcastWithAlias::VariantId: + else if (destination.IsDirect()) + { + return chipSendUnicast(destination.GetDirectNodeId(), apsFrame, messageLength, message); + } + else if (destination.IsViaExchange()) + { + return chipSendUnicast(destination.GetExchangeContext(), apsFrame, messageLength, message); + } + else + { // No implementation yet. - status = EMBER_ERR_FATAL; - break; - case MessageSendDestination::VariantViaExchange::VariantId: - status = chipSendUnicast(destination.Get().mExchangeContext, apsFrame, - messageLength, message); - break; - default: - status = EMBER_BAD_ARGUMENT; - break; + return EMBER_ERR_FATAL; } - return status; } diff --git a/src/app/util/af-main.h b/src/app/util/af-main.h index 19c0ec81489671..24a3a01aa373c0 100644 --- a/src/app/util/af-main.h +++ b/src/app/util/af-main.h @@ -123,7 +123,7 @@ void emAfIncomingMessageHandler(EmberIncomingMessageType type, EmberApsFrame * a uint16_t messageLength, uint8_t * messageContents); EmberStatus emAfSend(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint8_t messageLength, uint8_t * message, uint8_t * messageTag, EmberNodeId alias, uint8_t sequence); -void emAfMessageSentHandler(chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, EmberStatus status, +void emAfMessageSentHandler(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, EmberStatus status, uint16_t messageLength, uint8_t * messageContents, uint8_t messageTag); void emAfStackStatusHandler(EmberStatus status); diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index fc349785f714a1..9a2a781200afca 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -1259,6 +1259,40 @@ namespace chip { class MessageSendDestination { public: + MessageSendDestination(MessageSendDestination & that) = default; + MessageSendDestination(const MessageSendDestination & that) = default; + MessageSendDestination(MessageSendDestination && that) = default; + + static MessageSendDestination ViaBinding(uint8_t bindingIndex) + { + return MessageSendDestination(VariantViaBinding(bindingIndex)); + } + + static MessageSendDestination Direct(NodeId nodeId) { return MessageSendDestination(VariantDirect(nodeId)); } + + static MessageSendDestination Multicast(GroupId groupId) { return MessageSendDestination(VariantMulticast(groupId)); } + + static MessageSendDestination MulticastWithAlias(GroupId groupId) + { + return MessageSendDestination(VariantMulticastWithAlias(groupId)); + } + + static MessageSendDestination ViaExchange(Messaging::ExchangeContext * exchangeContext) + { + return MessageSendDestination(VariantViaExchange(exchangeContext)); + } + + std::size_t GetType() const { return mDestination.GetType(); } + + bool IsViaBinding() const { return mDestination.Is(); } + bool IsDirect() const { return mDestination.Is(); } + bool IsViaExchange() const { return mDestination.Is(); } + + uint8_t GetBindingIndex() const { return mDestination.Get().mBindingIndex; } + NodeId GetDirectNodeId() const { return mDestination.Get().mNodeId; } + Messaging::ExchangeContext * GetExchangeContext() const { return mDestination.Get().mExchangeContext; } + +private: struct VariantViaBinding { static constexpr const std::size_t VariantId = 1; @@ -1309,40 +1343,6 @@ class MessageSendDestination Messaging::ExchangeContext * mExchangeContext; }; - MessageSendDestination(MessageSendDestination & that) = default; - MessageSendDestination(const MessageSendDestination & that) = default; - MessageSendDestination(MessageSendDestination && that) = default; - - static MessageSendDestination ViaBinding(uint8_t bindingIndex) - { - return MessageSendDestination(VariantViaBinding(bindingIndex)); - } - - static MessageSendDestination Direct(NodeId nodeId) { return MessageSendDestination(VariantDirect(nodeId)); } - - static MessageSendDestination Multicast(GroupId groupId) { return MessageSendDestination(VariantMulticast(groupId)); } - - static MessageSendDestination MulticastWithAlias(GroupId groupId) - { - return MessageSendDestination(VariantMulticastWithAlias(groupId)); - } - - static MessageSendDestination ViaExchange(Messaging::ExchangeContext * exchangeContext) - { - return MessageSendDestination(VariantViaExchange(exchangeContext)); - } - - std::size_t GetType() const { return mDestination.GetType(); } - - bool IsViaBinding() const { return mDestination.Is(); } - - template - const Destination & Get() const - { - return mDestination.Get(); - } - -private: template MessageSendDestination(Destination && destination) { diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 95d1c93bb99978..ff1e102de4a0c1 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -326,7 +326,7 @@ void emberAfClusterMessageSentWithMfgCodeCallback(const MessageSendDestination & // This function is used to call the per-cluster message sent callback, and // wraps the emberAfClusterMessageSentWithMfgCodeCallback with a // EMBER_AF_NULL_MANUFACTURER_CODE. -void emberAfClusterMessageSentCallback(MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, +void emberAfClusterMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status) { emberAfClusterMessageSentWithMfgCodeCallback(destination, apsFrame, msgLen, message, status, EMBER_AF_NULL_MANUFACTURER_CODE); diff --git a/src/app/util/client-api.cpp b/src/app/util/client-api.cpp index 800dd404206ef4..b4b2d0c24bf381 100644 --- a/src/app/util/client-api.cpp +++ b/src/app/util/client-api.cpp @@ -330,13 +330,13 @@ EmberStatus emberAfSendCommandMulticastToBindings(void) return emberAfSendMulticastToBindings(emAfCommandApsFrame, *emAfResponseLengthPtr, emAfZclBuffer); } -// EmberStatus emberAfSendCommandUnicastWithCallback(chip::MessageSendDestination & destination, EmberAfMessageSentFunction +// EmberStatus emberAfSendCommandUnicastWithCallback(const chip::MessageSendDestination & destination, EmberAfMessageSentFunction // callback) // { // return emberAfSendUnicastWithCallback(destination, emAfCommandApsFrame, *emAfResponseLengthPtr, emAfZclBuffer, callback); // } -// EmberStatus emberAfSendCommandUnicast(chip::MessageSendDestination & destination) +// EmberStatus emberAfSendCommandUnicast(const chip::MessageSendDestination & destination) // { // return emberAfSendCommandUnicastWithCallback(destination, NULL); // } From fce76f20da8ff040f5d49132e8c913177c475fd5 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Fri, 4 Jun 2021 21:27:03 +0800 Subject: [PATCH 7/8] gen files --- .../all-clusters-common/gen/callback.h | 9 +++--- .../bridge-app/bridge-common/gen/callback.h | 11 +++---- examples/pump-app/pump-common/gen/callback.h | 14 ++++----- .../pump-controller-common/gen/callback.h | 29 ++++++++----------- src/controller/data_model/gen/callback.h | 9 +++--- 5 files changed, 29 insertions(+), 43 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback.h b/examples/all-clusters-app/all-clusters-common/gen/callback.h index 13ebff25a1ed3f..b5ec3158b52c37 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback.h +++ b/examples/all-clusters-app/all-clusters-common/gen/callback.h @@ -881,9 +881,9 @@ void emberAfBinaryInputBasicClusterServerManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBinaryInputBasicClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBinaryInputBasicClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Binary Input (Basic) Cluster Server Pre Attribute Changed * @@ -2772,8 +2772,7 @@ void emberAfRelativeHumidityMeasurementClusterServerManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfRelativeHumidityMeasurementClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfRelativeHumidityMeasurementClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); diff --git a/examples/bridge-app/bridge-common/gen/callback.h b/examples/bridge-app/bridge-common/gen/callback.h index 36e0e01e01cc4f..39b3978d71f47c 100644 --- a/examples/bridge-app/bridge-common/gen/callback.h +++ b/examples/bridge-app/bridge-common/gen/callback.h @@ -407,9 +407,8 @@ void emberAfFixedLabelClusterServerManufacturerSpecificAttributeChangedCallback( * @param message The message that was sent * @param status The status of the sent message */ -void emberAfFixedLabelClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfFixedLabelClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Fixed Label Cluster Server Pre Attribute Changed * @@ -827,8 +826,7 @@ void emberAfOperationalCredentialsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfOperationalCredentialsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfOperationalCredentialsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1041,8 +1039,7 @@ void emberAfTrustedRootCertificatesClusterServerManufacturerSpecificAttributeCha * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTrustedRootCertificatesClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); diff --git a/examples/pump-app/pump-common/gen/callback.h b/examples/pump-app/pump-common/gen/callback.h index 33aca4c7224246..61e91499ea3729 100644 --- a/examples/pump-app/pump-common/gen/callback.h +++ b/examples/pump-app/pump-common/gen/callback.h @@ -480,9 +480,8 @@ void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLevelControlClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Server Pre Attribute Changed * @@ -903,8 +902,7 @@ void emberAfTemperatureMeasurementClusterClientManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTemperatureMeasurementClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -975,8 +973,7 @@ void emberAfTemperatureMeasurementClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTemperatureMeasurementClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1189,8 +1186,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); diff --git a/examples/pump-controller-app/pump-controller-common/gen/callback.h b/examples/pump-controller-app/pump-controller-common/gen/callback.h index 9d6063f8268a2e..ed2b0396ecf3df 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/callback.h +++ b/examples/pump-controller-app/pump-controller-common/gen/callback.h @@ -267,8 +267,7 @@ void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttribute * @param message The message that was sent * @param status The status of the sent message */ -void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -410,9 +409,9 @@ void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief General Diagnostics Cluster Server Pre Attribute Changed * @@ -481,9 +480,8 @@ void emberAfLevelControlClusterClientManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfLevelControlClusterClientMessageSentCallback(EmberOutgoingMessageType type, chip::MessageSendDestination destination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLevelControlClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, + uint16_t msgLen, uint8_t * message, EmberStatus status); /** @brief Level Control Cluster Client Pre Attribute Changed * @@ -833,9 +831,9 @@ void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChanged * @param message The message that was sent * @param status The status of the sent message */ -void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Software Diagnostics Cluster Server Pre Attribute Changed * @@ -904,8 +902,7 @@ void emberAfTemperatureMeasurementClusterClientManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTemperatureMeasurementClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -976,8 +973,7 @@ void emberAfTemperatureMeasurementClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfTemperatureMeasurementClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfTemperatureMeasurementClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); @@ -1190,8 +1186,7 @@ void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChan * @param message The message that was sent * @param status The status of the sent message */ -void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); diff --git a/src/controller/data_model/gen/callback.h b/src/controller/data_model/gen/callback.h index 4e1cf48ba7f804..f346545604d57d 100644 --- a/src/controller/data_model/gen/callback.h +++ b/src/controller/data_model/gen/callback.h @@ -833,9 +833,9 @@ void emberAfBinaryInputBasicClusterClientManufacturerSpecificAttributeChangedCal * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBinaryInputBasicClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status); +void emberAfBinaryInputBasicClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); /** @brief Binary Input (Basic) Cluster Client Pre Attribute Changed * @@ -2442,8 +2442,7 @@ void emberAfRelativeHumidityMeasurementClusterClientManufacturerSpecificAttribut * @param message The message that was sent * @param status The status of the sent message */ -void emberAfRelativeHumidityMeasurementClusterClientMessageSentCallback(EmberOutgoingMessageType type, - chip::MessageSendDestination destination, +void emberAfRelativeHumidityMeasurementClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); From e430aa981061ce14ab5d6ee595ecf640fdd385e5 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Fri, 4 Jun 2021 21:29:24 +0800 Subject: [PATCH 8/8] Resolve comments --- .../include/media-playback/MediaPlaybackManager.cpp | 6 +++--- src/app/util/af-main-common.cpp | 8 ++++---- src/app/util/af-types.h | 2 -- src/lib/support/Variant.h | 13 ++----------- 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp index 3d3f5ffb5e5f1d..55c009d142c0d8 100644 --- a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp +++ b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp @@ -169,21 +169,21 @@ bool emberAfMediaPlaybackClusterMediaRewindCallback(chip::app::Command *) return true; } -bool emberAfMediaPlaybackClusterMediaSkipBackwardCallback(chip::app::Command *, unsigned long long deltaPositionMilliseconds) +bool emberAfMediaPlaybackClusterMediaSkipBackwardCallback(chip::app::Command *, uint64_t deltaPositionMilliseconds) { EmberAfMediaPlaybackStatus status = MediaPlaybackManager().proxyMediaPlaybackRequest(MediaPlaybackRequest::SkipBackward); sendResponse("MediaSkipBackward", ZCL_MEDIA_SKIP_BACKWARD_RESPONSE_COMMAND_ID, status); return true; } -bool emberAfMediaPlaybackClusterMediaSkipForwardCallback(chip::app::Command *, unsigned long long deltaPositionMilliseconds) +bool emberAfMediaPlaybackClusterMediaSkipForwardCallback(chip::app::Command *, uint64_t deltaPositionMilliseconds) { EmberAfMediaPlaybackStatus status = MediaPlaybackManager().proxyMediaPlaybackRequest(MediaPlaybackRequest::SkipForward); sendResponse("MediaSkipForward", ZCL_MEDIA_SKIP_FORWARD_RESPONSE_COMMAND_ID, status); return true; } -bool emberAfMediaPlaybackClusterMediaSkipSeekCallback(chip::app::Command *, unsigned long long positionMilliseconds) +bool emberAfMediaPlaybackClusterMediaSkipSeekCallback(chip::app::Command *, uint64_t positionMilliseconds) { EmberAfMediaPlaybackStatus status = MediaPlaybackManager().proxyMediaPlaybackRequest(MediaPlaybackRequest::Seek); sendResponse("MediaSeek", ZCL_MEDIA_SKIP_FORWARD_RESPONSE_COMMAND_ID, status); diff --git a/src/app/util/af-main-common.cpp b/src/app/util/af-main-common.cpp index 83dbc6256c1c39..5b332086df10f1 100644 --- a/src/app/util/af-main-common.cpp +++ b/src/app/util/af-main-common.cpp @@ -330,8 +330,8 @@ EmberStatus emberAfSendMulticastWithAliasWithCallback(GroupId multicastId, Ember uint8_t * message, EmberNodeId alias, uint8_t sequence, EmberAfMessageSentFunction callback) { - apsFrame->groupId = multicastId; - const MessageSendDestination destination = MessageSendDestination::MulticastWithAlias(multicastId); + apsFrame->groupId = multicastId; + const auto destination = MessageSendDestination::MulticastWithAlias(multicastId); return send(destination, apsFrame, messageLength, message, true, // broadcast alias, sequence, callback); @@ -340,8 +340,8 @@ EmberStatus emberAfSendMulticastWithAliasWithCallback(GroupId multicastId, Ember EmberStatus emberAfSendMulticastWithCallback(GroupId multicastId, EmberApsFrame * apsFrame, uint16_t messageLength, uint8_t * message, EmberAfMessageSentFunction callback) { - apsFrame->groupId = multicastId; - const MessageSendDestination destination = MessageSendDestination::Multicast(multicastId); + apsFrame->groupId = multicastId; + const auto destination = MessageSendDestination::Multicast(multicastId); return send(destination, apsFrame, messageLength, message, true, // broadcast? 0, // alias diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 9a2a781200afca..23df492ff91e77 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -1282,8 +1282,6 @@ class MessageSendDestination return MessageSendDestination(VariantViaExchange(exchangeContext)); } - std::size_t GetType() const { return mDestination.GetType(); } - bool IsViaBinding() const { return mDestination.Is(); } bool IsDirect() const { return mDestination.Is(); } bool IsViaExchange() const { return mDestination.Is(); } diff --git a/src/lib/support/Variant.h b/src/lib/support/Variant.h index c6003b039232a9..fa494113a398bd 100644 --- a/src/lib/support/Variant.h +++ b/src/lib/support/Variant.h @@ -70,15 +70,6 @@ struct VariantCurry<> inline static void Copy(std::size_t that_t, const void * that_v, void * this_v) {} }; -// Using assert inside template will encoded template name into the assert -// error message, which cost lots of flash space, this function can strip the -// type name, and the function name should be as short as possible to save -// space. -inline void AssertStrip(bool exp) -{ - assert(exp); -} - } // namespace Internal /** @@ -166,14 +157,14 @@ struct Variant template T & Get() { - Internal::AssertStrip(mTypeId == T::VariantId); + VerifyOrDie(mTypeId == T::VariantId); return *reinterpret_cast(&mData); } template const T & Get() const { - Internal::AssertStrip(mTypeId == T::VariantId); + VerifyOrDie(mTypeId == T::VariantId); return *reinterpret_cast(&mData); }