From 431942461c0c610b36652022544451fe76ed93da Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 2 Jun 2023 18:14:57 -0400 Subject: [PATCH] Replace usages of emberPrintln with ChipLogProgress calls (#27035) * Replace debug print calls via: ``` rg emberAfPrintln src examples --files-with-matches | xargs sd 'emberAfPrintln\(EMBER_AF_PRINT_DEBUG, ("[^)]*\);)' 'ChipLogDetail($1' ``` * Replace one more missing bit * Remove all references of debug-printing or ember-print * Add Zcl as a log source for various files * remove one more unused file * Replace detail log with zcl * Replace emberAfDoorLockClusterPrintln * Replace all the other printlns * Ran clang-format * Remove usage of emberAfAttributesFlush as it was defined as empty before * Port emberAfPrintBuffer into attribute-table * Fix typo in replacement of logs * Restyled by whitespace * Restyled by clang-format * Update the print calls to log as well, not just println * clang-format * Restyled by clang-format * zap regen * emberAfprintAttributeTable was never used. Removing * Removed one more unused method --------- Co-authored-by: Andrei Litvin Co-authored-by: Restyled.io --- .../src/static-supported-modes-manager.cpp | 2 +- examples/lock-app/linux/main.cpp | 2 +- .../linux/static-supported-modes-manager.cpp | 2 +- .../static-supported-modes-manager.cpp | 4 +- examples/window-app/common/src/WindowApp.cpp | 6 +- src/app/chip_data_model.cmake | 1 - src/app/chip_data_model.gni | 1 - .../administrator-commissioning-server.cpp | 2 +- .../barrier-control-server.cpp | 10 +- .../color-control-server.cpp | 13 +- .../door-lock-server/door-lock-server.cpp | 771 +++--- .../clusters/level-control/level-control.cpp | 111 +- .../mode-select-server/mode-select-server.cpp | 16 +- .../occupancy-sensor-server.cpp | 4 +- .../clusters/on-off-server/on-off-server.cpp | 38 +- .../pump-configuration-and-control-server.cpp | 12 +- .../window-covering-server.cpp | 91 +- src/app/util/af.h | 3 - src/app/util/attribute-table.cpp | 95 +- src/app/util/attribute-table.h | 2 - src/app/util/debug-printing-test.h | 188 -- src/app/util/debug-printing.h | 2251 ----------------- src/app/util/ember-print.cpp | 103 - src/app/util/ember-print.h | 72 - 24 files changed, 560 insertions(+), 3240 deletions(-) delete mode 100644 src/app/util/debug-printing-test.h delete mode 100644 src/app/util/debug-printing.h delete mode 100644 src/app/util/ember-print.cpp delete mode 100644 src/app/util/ember-print.h diff --git a/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp b/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp index cab8f9730a8514..17fa5d007b8493 100644 --- a/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp @@ -73,7 +73,7 @@ Status StaticSupportedModesManager::getModeOptionByMode(unsigned short endpointI return Status::Success; } } - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "Cannot find the mode %u", mode); + ChipLogProgress(Zcl, "Cannot find the mode %u", mode); return Status::InvalidCommand; } diff --git a/examples/lock-app/linux/main.cpp b/examples/lock-app/linux/main.cpp index bf6cb027107406..be81b6a520ac90 100644 --- a/examples/lock-app/linux/main.cpp +++ b/examples/lock-app/linux/main.cpp @@ -87,6 +87,6 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & // TODO: Watch for LockState, DoorState, Mode, etc changes and trigger appropriate action if (attributePath.mClusterId == Clusters::DoorLock::Id) { - emberAfDoorLockClusterPrintln("Door Lock attribute changed"); + ChipLogProgress(Zcl, "Door Lock attribute changed"); } } diff --git a/examples/placeholder/linux/static-supported-modes-manager.cpp b/examples/placeholder/linux/static-supported-modes-manager.cpp index cab8f9730a8514..17fa5d007b8493 100644 --- a/examples/placeholder/linux/static-supported-modes-manager.cpp +++ b/examples/placeholder/linux/static-supported-modes-manager.cpp @@ -73,7 +73,7 @@ Status StaticSupportedModesManager::getModeOptionByMode(unsigned short endpointI return Status::Success; } } - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "Cannot find the mode %u", mode); + ChipLogProgress(Zcl, "Cannot find the mode %u", mode); return Status::InvalidCommand; } diff --git a/examples/platform/esp32/mode-support/static-supported-modes-manager.cpp b/examples/platform/esp32/mode-support/static-supported-modes-manager.cpp index ec752cd8be67ba..769d5cbd43be53 100644 --- a/examples/platform/esp32/mode-support/static-supported-modes-manager.cpp +++ b/examples/platform/esp32/mode-support/static-supported-modes-manager.cpp @@ -17,8 +17,6 @@ */ #include "static-supported-modes-manager.h" -#include -#include #include using namespace chip; @@ -176,7 +174,7 @@ Status StaticSupportedModesManager::getModeOptionByMode(unsigned short endpointI return Status::Success; } } - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "Cannot find the mode %u", mode); + ChipLogProgress(Zcl, "Cannot find the mode %u", mode); return Status::InvalidCommand; } diff --git a/examples/window-app/common/src/WindowApp.cpp b/examples/window-app/common/src/WindowApp.cpp index 1f870503b1c818..11d49b7e34ed20 100644 --- a/examples/window-app/common/src/WindowApp.cpp +++ b/examples/window-app/common/src/WindowApp.cpp @@ -295,7 +295,7 @@ void WindowApp::DispatchEventAttributeChange(chip::EndpointId endpoint, chip::At if (nullptr == cover) { - emberAfWindowCoveringClusterPrint("Ep[%u] not supported AttributeId=%u\n", endpoint, (unsigned int) attribute); + ChipLogProgress(Zcl, "Ep[%u] not supported AttributeId=%u\n", endpoint, (unsigned int) attribute); return; } @@ -675,7 +675,7 @@ void WindowApp::Cover::OnTiltTimeout(WindowApp::Timer & timer) void WindowApp::Cover::SchedulePositionSet(chip::Percent100ths position, bool isTilt) { CoverWorkData * data = chip::Platform::New(); - VerifyOrReturn(data != nullptr, emberAfWindowCoveringClusterPrint("Cover::SchedulePositionSet - Out of Memory for WorkData")); + VerifyOrReturn(data != nullptr, ChipLogProgress(Zcl, "Cover::SchedulePositionSet - Out of Memory for WorkData")); data->mEndpointId = mEndpoint; data->percent100ths = position; @@ -701,7 +701,7 @@ void WindowApp::Cover::CallbackPositionSet(intptr_t arg) void WindowApp::Cover::ScheduleOperationalStateSet(OperationalState opState, bool isTilt) { CoverWorkData * data = chip::Platform::New(); - VerifyOrReturn(data != nullptr, emberAfWindowCoveringClusterPrint("Cover::OperationalStatusSet - Out of Memory for WorkData")); + VerifyOrReturn(data != nullptr, ChipLogProgress(Zcl, "Cover::OperationalStatusSet - Out of Memory for WorkData")); data->mEndpointId = mEndpoint; data->opState = opState; diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index e1c8a6e03f2e41..80ad1ded379b0c 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -138,7 +138,6 @@ function(chip_configure_data_model APP_TARGET) # ${CHIP_APP_BASE_DIR}/util/ClientMonitoringRegistrationTable.cpp ${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp - ${CHIP_APP_BASE_DIR}/util/ember-print.cpp ${CHIP_APP_BASE_DIR}/util/error-mapping.cpp ${CHIP_APP_BASE_DIR}/util/generic-callback-stubs.cpp ${CHIP_APP_BASE_DIR}/util/message.cpp diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 3176ce4e9b6005..48dfa7da9428b2 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -173,7 +173,6 @@ template("chip_data_model") { "${_app_root}/util/binding-table.cpp", "${_app_root}/util/binding-table.h", "${_app_root}/util/ember-compatibility-functions.cpp", - "${_app_root}/util/ember-print.cpp", "${_app_root}/util/error-mapping.cpp", "${_app_root}/util/generic-callback-stubs.cpp", "${_app_root}/util/message.cpp", diff --git a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp index 8232e5f51eb924..81dd97503e36af 100644 --- a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp +++ b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp @@ -207,6 +207,6 @@ bool emberAfAdministratorCommissioningClusterRevokeCommissioningCallback( void MatterAdministratorCommissioningPluginServerInitCallback() { - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "Initiating Admin Commissioning cluster."); + ChipLogProgress(Zcl, "Initiating Admin Commissioning cluster."); registerAttributeAccessOverride(&gAdminCommissioningAttrAccess); } diff --git a/src/app/clusters/barrier-control-server/barrier-control-server.cpp b/src/app/clusters/barrier-control-server/barrier-control-server.cpp index cea4812b546f3d..a7531aee1bcf91 100644 --- a/src/app/clusters/barrier-control-server/barrier-control-server.cpp +++ b/src/app/clusters/barrier-control-server/barrier-control-server.cpp @@ -288,7 +288,7 @@ static void sendDefaultResponse(app::CommandHandler * commandObj, const app::Con { if (commandObj->AddStatus(commandPath, status) != CHIP_NO_ERROR) { - emberAfBarrierControlClusterPrintln("Failed to send default response"); + ChipLogProgress(Zcl, "Failed to send default response"); } } @@ -301,7 +301,7 @@ bool emberAfBarrierControlClusterBarrierControlGoToPercentCallback( EndpointId endpoint = commandPath.mEndpointId; Status status = Status::Success; - emberAfBarrierControlClusterPrintln("RX: GoToPercentCallback p=%d", percentOpen); + ChipLogProgress(Zcl, "RX: GoToPercentCallback p=%d", percentOpen); if (isRemoteLockoutOn(endpoint)) { @@ -319,8 +319,8 @@ bool emberAfBarrierControlClusterBarrierControlGoToPercentCallback( state.currentPosition = getCurrentPosition(endpoint); state.targetPosition = percentOpen; state.delayMs = calculateDelayMs(endpoint, state.targetPosition, &state.increasing); - emberAfBarrierControlClusterPrintln("Scheduling barrier move from %d to %d with %" PRIu32 "ms delay", state.currentPosition, - state.targetPosition, state.delayMs); + ChipLogProgress(Zcl, "Scheduling barrier move from %d to %d with %" PRIu32 "ms delay", state.currentPosition, + state.targetPosition, state.delayMs); scheduleTimerCallbackMs(endpoint, state.delayMs); if (state.currentPosition < state.targetPosition) @@ -353,6 +353,6 @@ void MatterBarrierControlPluginServerInitCallback() {} void MatterBarrierControlClusterServerShutdownCallback(EndpointId endpoint) { - emberAfBarrierControlClusterPrintln("Shuting barrier control server cluster on endpoint %d", endpoint); + ChipLogProgress(Zcl, "Shuting barrier control server cluster on endpoint %d", endpoint); cancelEndpointTimerCallback(endpoint); } diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 707e1ba73a328b..6a9e7db0e8161e 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -1649,7 +1649,7 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) Attributes::EnhancedCurrentHue::Set(endpoint, colorHueTransitionState->currentEnhancedHue); Attributes::CurrentHue::Set(endpoint, static_cast(colorHueTransitionState->currentEnhancedHue >> 8)); - emberAfColorControlClusterPrintln("Enhanced Hue %d endpoint %d", colorHueTransitionState->currentEnhancedHue, endpoint); + ChipLogProgress(Zcl, "Enhanced Hue %d endpoint %d", colorHueTransitionState->currentEnhancedHue, endpoint); } } else @@ -1657,7 +1657,7 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) if (previousHue != colorHueTransitionState->currentHue) { Attributes::CurrentHue::Set(colorHueTransitionState->endpoint, colorHueTransitionState->currentHue); - emberAfColorControlClusterPrintln("Hue %d endpoint %d", colorHueTransitionState->currentHue, endpoint); + ChipLogProgress(Zcl, "Hue %d endpoint %d", colorHueTransitionState->currentHue, endpoint); } } @@ -1665,7 +1665,7 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) { Attributes::CurrentSaturation::Set(colorSaturationTransitionState->endpoint, (uint8_t) colorSaturationTransitionState->currentValue); - emberAfColorControlClusterPrintln("Saturation %d endpoint %d", colorSaturationTransitionState->currentValue, endpoint); + ChipLogProgress(Zcl, "Saturation %d endpoint %d", colorSaturationTransitionState->currentValue, endpoint); } computePwmFromHsv(endpoint); @@ -2014,8 +2014,7 @@ void ColorControlServer::updateXYCommand(EndpointId endpoint) Attributes::CurrentX::Set(endpoint, colorXTransitionState->currentValue); Attributes::CurrentY::Set(endpoint, colorYTransitionState->currentValue); - emberAfColorControlClusterPrintln("Color X %d Color Y %d", colorXTransitionState->currentValue, - colorYTransitionState->currentValue); + ChipLogProgress(Zcl, "Color X %d Color Y %d", colorXTransitionState->currentValue, colorYTransitionState->currentValue); computePwmFromXy(endpoint); } @@ -2215,7 +2214,7 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint) Attributes::ColorTemperatureMireds::Set(endpoint, colorTempTransitionState->currentValue); - emberAfColorControlClusterPrintln("Color Temperature %d", colorTempTransitionState->currentValue); + ChipLogProgress(Zcl, "Color Temperature %d", colorTempTransitionState->currentValue); computePwmFromTemp(endpoint); } @@ -2705,7 +2704,7 @@ void emberAfColorControlClusterServerInitCallback(EndpointId endpoint) void MatterColorControlClusterServerShutdownCallback(EndpointId endpoint) { - emberAfColorControlClusterPrintln("Shuting down color control server cluster on endpoint %d", endpoint); + ChipLogProgress(Zcl, "Shuting down color control server cluster on endpoint %d", endpoint); ColorControlServer::Instance().cancelEndpointTimerCallback(endpoint); } diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 7e788c7ecbe314..dbfd723ad8cfff 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -82,7 +82,7 @@ DoorLockServer & DoorLockServer::Instance() */ void DoorLockServer::InitServer(chip::EndpointId endpointId) { - emberAfDoorLockClusterPrintln("Door Lock cluster initialized at endpoint #%u", endpointId); + ChipLogProgress(Zcl, "Door Lock cluster initialized at endpoint #%u", endpointId); auto status = Attributes::LockState::SetNull(endpointId); if (EMBER_ZCL_STATUS_SUCCESS != status) @@ -214,8 +214,8 @@ bool DoorLockServer::HandleWrongCodeEntry(chip::EndpointId endpointId) { if (++endpointContext->wrongCodeEntryAttempts >= wrongCodeEntryLimit) { - emberAfDoorLockClusterPrintln("Too many wrong code entry attempts, engaging lockout [endpoint=%d,wrongCodeAttempts=%d]", - endpointId, endpointContext->wrongCodeEntryAttempts); + ChipLogProgress(Zcl, "Too many wrong code entry attempts, engaging lockout [endpoint=%d,wrongCodeAttempts=%d]", + endpointId, endpointContext->wrongCodeEntryAttempts); engageLockout(endpointId); } } @@ -264,7 +264,7 @@ bool DoorLockServer::engageLockout(chip::EndpointId endpointId) endpointContext->lockoutEndTimestamp = chip::System::SystemClock().GetMonotonicTimestamp() + chip::System::Clock::Seconds32(lockoutTimeout); - emberAfDoorLockClusterPrintln("Lockout engaged [endpointId=%d,lockoutTimeout=%d]", endpointId, lockoutTimeout); + ChipLogProgress(Zcl, "Lockout engaged [endpointId=%d,lockoutTimeout=%d]", endpointId, lockoutTimeout); SendLockAlarmEvent(endpointId, AlarmCodeEnum::kWrongCodeEntryLimit); @@ -346,11 +346,11 @@ void DoorLockServer::setUserCommandHandler(chip::app::CommandHandler * commandOb const chip::app::Clusters::DoorLock::Commands::SetUser::DecodableType & commandData) { auto & userIndex = commandData.userIndex; - emberAfDoorLockClusterPrintln("[SetUser] Incoming command [endpointId=%d,userIndex=%d]", commandPath.mEndpointId, userIndex); + ChipLogProgress(Zcl, "[SetUser] Incoming command [endpointId=%d,userIndex=%d]", commandPath.mEndpointId, userIndex); if (!SupportsUSR(commandPath.mEndpointId)) { - emberAfDoorLockClusterPrintln("[SetUser] User management is not supported [endpointId=%d]", commandPath.mEndpointId); + ChipLogProgress(Zcl, "[SetUser] User management is not supported [endpointId=%d]", commandPath.mEndpointId); sendClusterResponse(commandObj, commandPath, EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND); return; } @@ -382,8 +382,7 @@ void DoorLockServer::setUserCommandHandler(chip::app::CommandHandler * commandOb if (!userIndexValid(commandPath.mEndpointId, userIndex)) { - emberAfDoorLockClusterPrintln("[SetUser] User index out of bounds [endpointId=%d,userIndex=%d]", commandPath.mEndpointId, - userIndex); + ChipLogProgress(Zcl, "[SetUser] User index out of bounds [endpointId=%d,userIndex=%d]", commandPath.mEndpointId, userIndex); sendClusterResponse(commandObj, commandPath, EMBER_ZCL_STATUS_INVALID_COMMAND); return; } @@ -391,9 +390,8 @@ void DoorLockServer::setUserCommandHandler(chip::app::CommandHandler * commandOb // appclusters, 5.2.4.34: UserName has maximum DOOR_LOCK_MAX_USER_NAME_SIZE (10) characters excluding NUL terminator in it. if (!userName.IsNull() && userName.Value().size() > DOOR_LOCK_MAX_USER_NAME_SIZE) { - emberAfDoorLockClusterPrintln( - "[SetUser] Unable to set user: userName too long [endpointId=%d,userIndex=%d,userNameSize=%u]", commandPath.mEndpointId, - userIndex, static_cast(userName.Value().size())); + ChipLogProgress(Zcl, "[SetUser] Unable to set user: userName too long [endpointId=%d,userIndex=%d,userNameSize=%u]", + commandPath.mEndpointId, userIndex, static_cast(userName.Value().size())); sendClusterResponse(commandObj, commandPath, EMBER_ZCL_STATUS_INVALID_COMMAND); return; @@ -401,9 +399,9 @@ void DoorLockServer::setUserCommandHandler(chip::app::CommandHandler * commandOb if (!IsValidUserStatusForSet(userStatus)) { - emberAfDoorLockClusterPrintln( - "[SetUser] Unable to set the user: user status is out of range [endpointId=%d,userIndex=%d,userStatus=%u]", - commandPath.mEndpointId, userIndex, to_underlying(userStatus.Value())); + ChipLogProgress(Zcl, + "[SetUser] Unable to set the user: user status is out of range [endpointId=%d,userIndex=%d,userStatus=%u]", + commandPath.mEndpointId, userIndex, to_underlying(userStatus.Value())); sendClusterResponse(commandObj, commandPath, EMBER_ZCL_STATUS_INVALID_COMMAND); return; @@ -411,9 +409,8 @@ void DoorLockServer::setUserCommandHandler(chip::app::CommandHandler * commandOb if (userType == UserTypeEnum::kUnknownEnumValue) { - emberAfDoorLockClusterPrintln( - "[SetUser] Unable to set the user: user type is unknown [endpointId=%d,userIndex=%d,userType=%u]", - commandPath.mEndpointId, userIndex, to_underlying(userType.Value())); + ChipLogProgress(Zcl, "[SetUser] Unable to set the user: user type is unknown [endpointId=%d,userIndex=%d,userType=%u]", + commandPath.mEndpointId, userIndex, to_underlying(userType.Value())); sendClusterResponse(commandObj, commandPath, EMBER_ZCL_STATUS_INVALID_COMMAND); return; @@ -435,8 +432,8 @@ void DoorLockServer::setUserCommandHandler(chip::app::CommandHandler * commandOb // appclusters, 5.2.4.34: SetUser command allow only kAdd/kModify, we should respond with INVALID_COMMAND if we got kClear // or anything else status = EMBER_ZCL_STATUS_INVALID_COMMAND; - emberAfDoorLockClusterPrintln("[SetUser] Invalid operation type [endpointId=%d,operationType=%u]", commandPath.mEndpointId, - to_underlying(operationType)); + ChipLogProgress(Zcl, "[SetUser] Invalid operation type [endpointId=%d,operationType=%u]", commandPath.mEndpointId, + to_underlying(operationType)); break; } @@ -446,11 +443,11 @@ void DoorLockServer::setUserCommandHandler(chip::app::CommandHandler * commandOb void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, uint16_t userIndex) { - emberAfDoorLockClusterPrintln("[GetUser] Incoming command [endpointId=%d,userIndex=%d]", commandPath.mEndpointId, userIndex); + ChipLogProgress(Zcl, "[GetUser] Incoming command [endpointId=%d,userIndex=%d]", commandPath.mEndpointId, userIndex); if (!SupportsUSR(commandPath.mEndpointId)) { - emberAfDoorLockClusterPrintln("[GetUser] User management is not supported [endpointId=%d]", commandPath.mEndpointId); + ChipLogProgress(Zcl, "[GetUser] User management is not supported [endpointId=%d]", commandPath.mEndpointId); commandObj->AddStatus(commandPath, Status::UnsupportedCommand); return; } @@ -458,8 +455,8 @@ void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandOb uint16_t maxNumberOfUsers = 0; if (!userIndexValid(commandPath.mEndpointId, userIndex, maxNumberOfUsers)) { - emberAfDoorLockClusterPrintln("[GetUser] User index out of bounds [userIndex=%d,numberOfTotalUsersSupported=%d]", userIndex, - maxNumberOfUsers); + ChipLogProgress(Zcl, "[GetUser] User index out of bounds [userIndex=%d,numberOfTotalUsersSupported=%d]", userIndex, + maxNumberOfUsers); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } @@ -481,7 +478,7 @@ void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandOb EmberAfPluginDoorLockUserInfo user; if (!emberAfPluginDoorLockGetUser(commandPath.mEndpointId, userIndex, user)) { - emberAfDoorLockClusterPrintln("[GetUser] Could not get user info [userIndex=%d]", userIndex); + ChipLogProgress(Zcl, "[GetUser] Could not get user info [userIndex=%d]", userIndex); commandObj->AddStatus(commandPath, Status::Failure); return; } @@ -491,12 +488,12 @@ void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandOb // appclusters, 5.2.4.36: we should not set user-specific fields to non-null if the user status is set to Available if (UserStatusEnum::kAvailable != user.userStatus) { - emberAfDoorLockClusterPrintln("Found user in storage: " - "[userIndex=%d,userName=\"%.*s\",userStatus=%u,userType=%u" - ",credentialRule=%u,createdBy=%u,modifiedBy=%u]", - userIndex, static_cast(user.userName.size()), user.userName.data(), - to_underlying(user.userStatus), to_underlying(user.userType), - to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy); + ChipLogProgress(Zcl, + "Found user in storage: " + "[userIndex=%d,userName=\"%.*s\",userStatus=%u,userType=%u" + ",credentialRule=%u,createdBy=%u,modifiedBy=%u]", + userIndex, static_cast(user.userName.size()), user.userName.data(), to_underlying(user.userStatus), + to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy); response.userName.SetNonNull(user.userName); if (0xFFFFFFFFU != user.userUniqueId) @@ -519,7 +516,7 @@ void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandOb } else { - emberAfDoorLockClusterPrintln("[GetUser] User not found [userIndex=%d]", userIndex); + ChipLogProgress(Zcl, "[GetUser] User not found [userIndex=%d]", userIndex); } commandObj->AddResponse(commandPath, response); @@ -528,11 +525,11 @@ void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandOb void DoorLockServer::clearUserCommandHandler(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, uint16_t userIndex) { - emberAfDoorLockClusterPrintln("[ClearUser] Incoming command [endpointId=%d,userIndex=%d]", commandPath.mEndpointId, userIndex); + ChipLogProgress(Zcl, "[ClearUser] Incoming command [endpointId=%d,userIndex=%d]", commandPath.mEndpointId, userIndex); if (!SupportsUSR(commandPath.mEndpointId)) { - emberAfDoorLockClusterPrintln("[ClearUser] User management is not supported [endpointId=%d]", commandPath.mEndpointId); + ChipLogProgress(Zcl, "[ClearUser] User management is not supported [endpointId=%d]", commandPath.mEndpointId); commandObj->AddStatus(commandPath, Status::UnsupportedCommand); return; } @@ -558,8 +555,8 @@ void DoorLockServer::clearUserCommandHandler(chip::app::CommandHandler * command uint16_t maxNumberOfUsers = 0; if (!userIndexValid(commandPath.mEndpointId, userIndex, maxNumberOfUsers) && userIndex != 0xFFFE) { - emberAfDoorLockClusterPrintln("[ClearUser] User index out of bounds [userIndex=%d,numberOfTotalUsersSupported=%d]", - userIndex, maxNumberOfUsers); + ChipLogProgress(Zcl, "[ClearUser] User index out of bounds [userIndex=%d,numberOfTotalUsersSupported=%d]", userIndex, + maxNumberOfUsers); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } @@ -576,7 +573,7 @@ void DoorLockServer::clearUserCommandHandler(chip::app::CommandHandler * command return; } - emberAfDoorLockClusterPrintln("[ClearUser] Removing all users from storage"); + ChipLogProgress(Zcl, "[ClearUser] Removing all users from storage"); for (uint16_t i = 1; i <= maxNumberOfUsers; ++i) { auto status = clearUser(commandPath.mEndpointId, fabricIdx, sourceNodeId, i, false); @@ -589,7 +586,7 @@ void DoorLockServer::clearUserCommandHandler(chip::app::CommandHandler * command return; } } - emberAfDoorLockClusterPrintln("[ClearUser] Removed all users from storage [users=%d]", maxNumberOfUsers); + ChipLogProgress(Zcl, "[ClearUser] Removed all users from storage [users=%d]", maxNumberOfUsers); sendRemoteLockUserChange(commandPath.mEndpointId, LockDataTypeEnum::kUserIndex, DataOperationTypeEnum::kClear, sourceNodeId, fabricIdx, 0xFFFE, 0xFFFE); @@ -601,7 +598,7 @@ void DoorLockServer::setCredentialCommandHandler( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::SetCredential::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("[SetCredential] Incoming command [endpointId=%d]", commandPath.mEndpointId); + ChipLogProgress(Zcl, "[SetCredential] Incoming command [endpointId=%d]", commandPath.mEndpointId); auto fabricIdx = getFabricIndex(commandObj); if (kUndefinedFabricIndex == fabricIdx) @@ -629,8 +626,8 @@ void DoorLockServer::setCredentialCommandHandler( if (!credentialTypeSupported(commandPath.mEndpointId, credentialType)) { - emberAfDoorLockClusterPrintln("[SetCredential] Credential type is not supported [endpointId=%d,credentialType=%u]", - commandPath.mEndpointId, to_underlying(credentialType)); + ChipLogProgress(Zcl, "[SetCredential] Credential type is not supported [endpointId=%d,credentialType=%u]", + commandPath.mEndpointId, to_underlying(credentialType)); commandObj->AddStatus(commandPath, Status::UnsupportedCommand); return; } @@ -643,9 +640,10 @@ void DoorLockServer::setCredentialCommandHandler( uint16_t maxNumberOfCredentials = 0; if (!credentialIndexValid(commandPath.mEndpointId, credentialType, credentialIndex, maxNumberOfCredentials)) { - emberAfDoorLockClusterPrintln("[SetCredential] Credential index is out of range [endpointId=%d,credentialType=%u" - ",credentialIndex=%d]", - commandPath.mEndpointId, to_underlying(credentialType), credentialIndex); + ChipLogProgress(Zcl, + "[SetCredential] Credential index is out of range [endpointId=%d,credentialType=%u" + ",credentialIndex=%d]", + commandPath.mEndpointId, to_underlying(credentialType), credentialIndex); sendSetCredentialResponse(commandObj, commandPath, DlStatus::kInvalidField, 0, nextAvailableCredentialSlot); return; } @@ -664,20 +662,21 @@ void DoorLockServer::setCredentialCommandHandler( EmberAfPluginDoorLockCredentialInfo currentCredential; if (!emberAfPluginDoorLockGetCredential(commandPath.mEndpointId, i, credentialType, currentCredential)) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to get the credential to exclude duplicated entry " - "[endpointId=%d,credentialType=%u,credentialIndex=%d]", - commandPath.mEndpointId, to_underlying(credentialType), i); + ChipLogProgress(Zcl, + "[SetCredential] Unable to get the credential to exclude duplicated entry " + "[endpointId=%d,credentialType=%u,credentialIndex=%d]", + commandPath.mEndpointId, to_underlying(credentialType), i); sendSetCredentialResponse(commandObj, commandPath, DlStatus::kFailure, 0, nextAvailableCredentialSlot); return; } if (DlCredentialStatus::kAvailable != currentCredential.status && currentCredential.credentialType == credentialType && currentCredential.credentialData.data_equal(credentialData)) { - emberAfDoorLockClusterPrintln( - "[SetCredential] Credential with the same data and type already exist " - "[endpointId=%d,credentialType=%u,dataLength=%u,existingCredentialIndex=%d,credentialIndex=%d]", - commandPath.mEndpointId, to_underlying(credentialType), static_cast(credentialData.size()), i, - credentialIndex); + ChipLogProgress(Zcl, + "[SetCredential] Credential with the same data and type already exist " + "[endpointId=%d,credentialType=%u,dataLength=%u,existingCredentialIndex=%d,credentialIndex=%d]", + commandPath.mEndpointId, to_underlying(credentialType), + static_cast(credentialData.size()), i, credentialIndex); sendSetCredentialResponse(commandObj, commandPath, DlStatus::kDuplicate, 0, nextAvailableCredentialSlot); return; } @@ -686,9 +685,8 @@ void DoorLockServer::setCredentialCommandHandler( EmberAfPluginDoorLockCredentialInfo existingCredential; if (!emberAfPluginDoorLockGetCredential(commandPath.mEndpointId, credentialIndex, credentialType, existingCredential)) { - emberAfDoorLockClusterPrintln( - "[SetCredential] Unable to check if credential exists: app error [endpointId=%d,credentialIndex=%d]", - commandPath.mEndpointId, credentialIndex); + ChipLogProgress(Zcl, "[SetCredential] Unable to check if credential exists: app error [endpointId=%d,credentialIndex=%d]", + commandPath.mEndpointId, credentialIndex); sendSetCredentialResponse(commandObj, commandPath, DlStatus::kFailure, 0, nextAvailableCredentialSlot); return; @@ -696,18 +694,20 @@ void DoorLockServer::setCredentialCommandHandler( if (!IsValidUserStatusForSet(userStatus)) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to set the credential: user status is out of range " - "[endpointId=%d,credentialIndex=%d,userStatus=%u]", - commandPath.mEndpointId, credentialIndex, to_underlying(userStatus.Value())); + ChipLogProgress(Zcl, + "[SetCredential] Unable to set the credential: user status is out of range " + "[endpointId=%d,credentialIndex=%d,userStatus=%u]", + commandPath.mEndpointId, credentialIndex, to_underlying(userStatus.Value())); sendSetCredentialResponse(commandObj, commandPath, DlStatus::kInvalidField, 0, nextAvailableCredentialSlot); return; } if (userType == UserTypeEnum::kUnknownEnumValue) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to set the credential: user type is unknown " - "[endpointId=%d,credentialIndex=%d,userType=%u]", - commandPath.mEndpointId, credentialIndex, to_underlying(userType.Value())); + ChipLogProgress(Zcl, + "[SetCredential] Unable to set the credential: user type is unknown " + "[endpointId=%d,credentialIndex=%d,userType=%u]", + commandPath.mEndpointId, credentialIndex, to_underlying(userType.Value())); sendSetCredentialResponse(commandObj, commandPath, DlStatus::kInvalidField, 0, nextAvailableCredentialSlot); return; } @@ -727,9 +727,10 @@ void DoorLockServer::setCredentialCommandHandler( // appclusters, 5.2.4.41.1: should send the INVALID_COMMAND in the response when the credential is in use if (DlCredentialStatus::kAvailable == existingCredential.status) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to modify the credential: credential slot is not occupied " - "[endpointId=%d,credentialIndex=%d]", - commandPath.mEndpointId, credentialIndex); + ChipLogProgress(Zcl, + "[SetCredential] Unable to modify the credential: credential slot is not occupied " + "[endpointId=%d,credentialIndex=%d]", + commandPath.mEndpointId, credentialIndex); sendSetCredentialResponse(commandObj, commandPath, DlStatus::kInvalidField, 0, nextAvailableCredentialSlot); return; @@ -740,9 +741,10 @@ void DoorLockServer::setCredentialCommandHandler( { if (!userStatus.IsNull() || userType != UserTypeEnum::kProgrammingUser) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to modify programming PIN: invalid argument " - "[endpointId=%d,credentialIndex=%d]", - commandPath.mEndpointId, credentialIndex); + ChipLogProgress(Zcl, + "[SetCredential] Unable to modify programming PIN: invalid argument " + "[endpointId=%d,credentialIndex=%d]", + commandPath.mEndpointId, credentialIndex); } status = modifyProgrammingPIN(commandPath.mEndpointId, fabricIdx, sourceNodeId, credentialIndex, credentialType, existingCredential, credentialData); @@ -766,13 +768,14 @@ void DoorLockServer::getCredentialStatusCommandHandler(chip::app::CommandHandler const chip::app::ConcreteCommandPath & commandPath, CredentialTypeEnum credentialType, uint16_t credentialIndex) { - emberAfDoorLockClusterPrintln("[GetCredentialStatus] Incoming command [endpointId=%d]", commandPath.mEndpointId); + ChipLogProgress(Zcl, "[GetCredentialStatus] Incoming command [endpointId=%d]", commandPath.mEndpointId); if (!credentialTypeSupported(commandPath.mEndpointId, credentialType)) { - emberAfDoorLockClusterPrintln("[GetCredentialStatus] Credential type is not supported [endpointId=%d,credentialType=%u" - "]", - commandPath.mEndpointId, to_underlying(credentialType)); + ChipLogProgress(Zcl, + "[GetCredentialStatus] Credential type is not supported [endpointId=%d,credentialType=%u" + "]", + commandPath.mEndpointId, to_underlying(credentialType)); commandObj->AddStatus(commandPath, Status::UnsupportedCommand); return; } @@ -787,10 +790,11 @@ void DoorLockServer::getCredentialStatusCommandHandler(chip::app::CommandHandler EmberAfPluginDoorLockCredentialInfo credentialInfo; if (!emberAfPluginDoorLockGetCredential(commandPath.mEndpointId, credentialIndex, credentialType, credentialInfo)) { - emberAfDoorLockClusterPrintln("[GetCredentialStatus] Unable to get the credential: app error " - "[endpointId=%d,credentialIndex=%d,credentialType=%u,creator=%u,modifier=%u]", - commandPath.mEndpointId, credentialIndex, to_underlying(credentialType), - credentialInfo.createdBy, credentialInfo.lastModifiedBy); + ChipLogProgress(Zcl, + "[GetCredentialStatus] Unable to get the credential: app error " + "[endpointId=%d,credentialIndex=%d,credentialType=%u,creator=%u,modifier=%u]", + commandPath.mEndpointId, credentialIndex, to_underlying(credentialType), credentialInfo.createdBy, + credentialInfo.lastModifiedBy); commandObj->AddStatus(commandPath, Status::Failure); return; } @@ -850,17 +854,18 @@ void DoorLockServer::sendGetCredentialResponse(chip::app::CommandHandler * comma } commandObj->AddResponse(commandPath, response); - emberAfDoorLockClusterPrintln("[GetCredentialStatus] Prepared credential status " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,userIndex=%d,nextCredentialIndex=%d]", - commandPath.mEndpointId, to_underlying(credentialType), credentialIndex, userIndexWithCredential, - nextCredentialIndex); + ChipLogProgress(Zcl, + "[GetCredentialStatus] Prepared credential status " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,userIndex=%d,nextCredentialIndex=%d]", + commandPath.mEndpointId, to_underlying(credentialType), credentialIndex, userIndexWithCredential, + nextCredentialIndex); } void DoorLockServer::clearCredentialCommandHandler( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::ClearCredential::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("[ClearCredential] Incoming command [endpointId=%d]", commandPath.mEndpointId); + ChipLogProgress(Zcl, "[ClearCredential] Incoming command [endpointId=%d]", commandPath.mEndpointId); auto modifier = getFabricIndex(commandObj); if (kUndefinedFabricIndex == modifier) @@ -879,7 +884,7 @@ void DoorLockServer::clearCredentialCommandHandler( const auto & credential = commandData.credential; if (credential.IsNull()) { - emberAfDoorLockClusterPrintln("[ClearCredential] Clearing all credentials [endpointId=%d]", commandPath.mEndpointId); + ChipLogProgress(Zcl, "[ClearCredential] Clearing all credentials [endpointId=%d]", commandPath.mEndpointId); commandObj->AddStatus(commandPath, clearCredentials(commandPath.mEndpointId, modifier, sourceNodeId)); return; } @@ -905,12 +910,12 @@ void DoorLockServer::setWeekDayScheduleCommandHandler(chip::app::CommandHandler auto endpointId = commandPath.mEndpointId; if (!SupportsWeekDaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[SetWeekDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[SetWeekDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[SetWeekDaySchedule] Incoming command [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[SetWeekDaySchedule] Incoming command [endpointId=%d]", endpointId); auto fabricIdx = getFabricIndex(commandObj); if (kUndefinedFabricIndex == fabricIdx) @@ -930,8 +935,8 @@ void DoorLockServer::setWeekDayScheduleCommandHandler(chip::app::CommandHandler if (!weekDayIndexValid(endpointId, weekDayIndex) || !userIndexValid(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln( - "[SetWeekDaySchedule] Unable to add schedule - index out of range [endpointId=%d,weekDayIndex=%d,userIndex=%d]", + ChipLogProgress( + Zcl, "[SetWeekDaySchedule] Unable to add schedule - index out of range [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId, weekDayIndex, userIndex); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; @@ -939,9 +944,10 @@ void DoorLockServer::setWeekDayScheduleCommandHandler(chip::app::CommandHandler if (!userExists(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln("[SetWeekDaySchedule] Unable to add schedule - user does not exist " - "[endpointId=%d,weekDayIndex=%d,userIndex=%d]", - endpointId, weekDayIndex, userIndex); + ChipLogProgress(Zcl, + "[SetWeekDaySchedule] Unable to add schedule - user does not exist " + "[endpointId=%d,weekDayIndex=%d,userIndex=%d]", + endpointId, weekDayIndex, userIndex); commandObj->AddStatus(commandPath, Status::Failure); return; } @@ -958,9 +964,10 @@ void DoorLockServer::setWeekDayScheduleCommandHandler(chip::app::CommandHandler // TODO: Check that bits are within range if (setBitsInDaysMask == 0 || setBitsInDaysMask > 1) { - emberAfDoorLockClusterPrintln("[SetWeekDaySchedule] Unable to add schedule - daysMask is out of range " - "[endpointId=%d,weekDayIndex=%d,userIndex=%d,daysMask=%x]", - endpointId, weekDayIndex, userIndex, daysMask.Raw()); + ChipLogProgress(Zcl, + "[SetWeekDaySchedule] Unable to add schedule - daysMask is out of range " + "[endpointId=%d,weekDayIndex=%d,userIndex=%d,daysMask=%x]", + endpointId, weekDayIndex, userIndex, daysMask.Raw()); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } @@ -968,18 +975,20 @@ void DoorLockServer::setWeekDayScheduleCommandHandler(chip::app::CommandHandler if (startHour > DOOR_LOCK_SCHEDULE_MAX_HOUR || startMinute > DOOR_LOCK_SCHEDULE_MAX_MINUTE || endHour > DOOR_LOCK_SCHEDULE_MAX_HOUR || endMinute > DOOR_LOCK_SCHEDULE_MAX_MINUTE) { - emberAfDoorLockClusterPrintln("[SetWeekDaySchedule] Unable to add schedule - start time out of range " - "[endpointId=%d,weekDayIndex=%d,userIndex=%d,startTime=\"%d:%d\",endTime=\"%d:%d\"]", - endpointId, weekDayIndex, userIndex, startHour, startMinute, endHour, endMinute); + ChipLogProgress(Zcl, + "[SetWeekDaySchedule] Unable to add schedule - start time out of range " + "[endpointId=%d,weekDayIndex=%d,userIndex=%d,startTime=\"%d:%d\",endTime=\"%d:%d\"]", + endpointId, weekDayIndex, userIndex, startHour, startMinute, endHour, endMinute); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } if (startHour > endHour || (startHour == endHour && startMinute >= endMinute)) { - emberAfDoorLockClusterPrintln("[SetWeekDaySchedule] Unable to add schedule - invalid time " - "[endpointId=%d,weekDayIndex=%d,userIndex=%d,startTime=\"%d:%d\",endTime=\"%d:%d\"]", - endpointId, weekDayIndex, userIndex, startHour, startMinute, endHour, endMinute); + ChipLogProgress(Zcl, + "[SetWeekDaySchedule] Unable to add schedule - invalid time " + "[endpointId=%d,weekDayIndex=%d,userIndex=%d,startTime=\"%d:%d\",endTime=\"%d:%d\"]", + endpointId, weekDayIndex, userIndex, startHour, startMinute, endHour, endMinute); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } @@ -996,9 +1005,10 @@ void DoorLockServer::setWeekDayScheduleCommandHandler(chip::app::CommandHandler return; } - emberAfDoorLockClusterPrintln("[SetWeekDaySchedule] Successfully created new schedule " - "[endpointId=%d,weekDayIndex=%d,userIndex=%d,daysMask=%d,startTime=\"%d:%d\",endTime=\"%d:%d\"]", - endpointId, weekDayIndex, userIndex, daysMask.Raw(), startHour, startMinute, endHour, endMinute); + ChipLogProgress(Zcl, + "[SetWeekDaySchedule] Successfully created new schedule " + "[endpointId=%d,weekDayIndex=%d,userIndex=%d,daysMask=%d,startTime=\"%d:%d\",endTime=\"%d:%d\"]", + endpointId, weekDayIndex, userIndex, daysMask.Raw(), startHour, startMinute, endHour, endMinute); sendRemoteLockUserChange(endpointId, LockDataTypeEnum::kWeekDaySchedule, DataOperationTypeEnum::kAdd, sourceNodeId, fabricIdx, userIndex, static_cast(weekDayIndex)); @@ -1013,17 +1023,17 @@ void DoorLockServer::getWeekDayScheduleCommandHandler(chip::app::CommandHandler auto endpointId = commandPath.mEndpointId; if (!SupportsWeekDaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[GetWeekDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[GetWeekDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[GetWeekDaySchedule] Incoming command [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[GetWeekDaySchedule] Incoming command [endpointId=%d]", endpointId); if (!weekDayIndexValid(endpointId, weekDayIndex) || !userIndexValid(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln( - "[GetWeekDaySchedule] Unable to get schedule - index out of range [endpointId=%d,weekDayIndex=%d,userIndex=%d]", + ChipLogProgress( + Zcl, "[GetWeekDaySchedule] Unable to get schedule - index out of range [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId, weekDayIndex, userIndex); sendGetWeekDayScheduleResponse(commandObj, commandPath, weekDayIndex, userIndex, DlStatus::kInvalidField); return; @@ -1031,8 +1041,8 @@ void DoorLockServer::getWeekDayScheduleCommandHandler(chip::app::CommandHandler if (!userExists(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln("[GetWeekDaySchedule] User does not exist [endpointId=%d,weekDayIndex=%d,userIndex=%d]", - endpointId, weekDayIndex, userIndex); + ChipLogProgress(Zcl, "[GetWeekDaySchedule] User does not exist [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId, + weekDayIndex, userIndex); sendGetWeekDayScheduleResponse(commandObj, commandPath, weekDayIndex, userIndex, DlStatus::kFailure); return; } @@ -1056,12 +1066,12 @@ void DoorLockServer::clearWeekDayScheduleCommandHandler(chip::app::CommandHandle auto endpointId = commandPath.mEndpointId; if (!SupportsWeekDaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[ClearWeekDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[ClearWeekDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[ClearWeekDaySchedule] Incoming command [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[ClearWeekDaySchedule] Incoming command [endpointId=%d]", endpointId); auto fabricIdx = getFabricIndex(commandObj); if (kUndefinedFabricIndex == fabricIdx) @@ -1081,17 +1091,17 @@ void DoorLockServer::clearWeekDayScheduleCommandHandler(chip::app::CommandHandle if (!userIndexValid(endpointId, userIndex) || (!weekDayIndexValid(endpointId, weekDayIndex) && 0xFE != weekDayIndex)) { - emberAfDoorLockClusterPrintln( - "[ClearWeekDaySchedule] User or WeekDay index is out of range [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId, - weekDayIndex, userIndex); + ChipLogProgress(Zcl, + "[ClearWeekDaySchedule] User or WeekDay index is out of range [endpointId=%d,weekDayIndex=%d,userIndex=%d]", + endpointId, weekDayIndex, userIndex); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } if (!userExists(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln("[ClearWeekDaySchedule] User does not exist [endpointId=%d,weekDayIndex=%d,userIndex=%d]", - endpointId, weekDayIndex, userIndex); + ChipLogProgress(Zcl, "[ClearWeekDaySchedule] User does not exist [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId, + weekDayIndex, userIndex); commandObj->AddStatus(commandPath, Status::Failure); return; } @@ -1099,22 +1109,21 @@ void DoorLockServer::clearWeekDayScheduleCommandHandler(chip::app::CommandHandle DlStatus clearStatus = DlStatus::kSuccess; if (0xFE == weekDayIndex) { - emberAfDoorLockClusterPrintln( - "[ClearWeekDaySchedule] Clearing all schedules for a single user [endpointId=%d,userIndex=%d]", endpointId, userIndex); + ChipLogProgress(Zcl, "[ClearWeekDaySchedule] Clearing all schedules for a single user [endpointId=%d,userIndex=%d]", + endpointId, userIndex); clearStatus = clearWeekDaySchedules(endpointId, userIndex); } else { - emberAfDoorLockClusterPrintln( - "[ClearWeekDaySchedule] Clearing a single schedule [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId, - weekDayIndex, userIndex); + ChipLogProgress(Zcl, "[ClearWeekDaySchedule] Clearing a single schedule [endpointId=%d,weekDayIndex=%d,userIndex=%d]", + endpointId, weekDayIndex, userIndex); clearStatus = clearWeekDaySchedule(endpointId, userIndex, weekDayIndex); } if (DlStatus::kSuccess != clearStatus) { - emberAfDoorLockClusterPrintln( - "[ClearWeekDaySchedule] Unable to clear the user schedules - app error [endpointId=%d,userIndex=%d,status=%u]", + ChipLogProgress( + Zcl, "[ClearWeekDaySchedule] Unable to clear the user schedules - app error [endpointId=%d,userIndex=%d,status=%u]", endpointId, userIndex, to_underlying(clearStatus)); commandObj->AddStatus(commandPath, Status::Failure); return; @@ -1133,12 +1142,12 @@ void DoorLockServer::setYearDayScheduleCommandHandler(chip::app::CommandHandler auto endpointId = commandPath.mEndpointId; if (!SupportsYearDaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[SetYearDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[SetYearDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[SetYearDaySchedule] incoming command [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[SetYearDaySchedule] incoming command [endpointId=%d]", endpointId); auto fabricIdx = getFabricIndex(commandObj); if (kUndefinedFabricIndex == fabricIdx) @@ -1158,8 +1167,8 @@ void DoorLockServer::setYearDayScheduleCommandHandler(chip::app::CommandHandler if (!yearDayIndexValid(endpointId, yearDayIndex) || !userIndexValid(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln( - "[SetYearDaySchedule] Unable to add schedule - index out of range [endpointId=%d,yearDayIndex=%d,userIndex=%d]", + ChipLogProgress( + Zcl, "[SetYearDaySchedule] Unable to add schedule - index out of range [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId, yearDayIndex, userIndex); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; @@ -1167,19 +1176,20 @@ void DoorLockServer::setYearDayScheduleCommandHandler(chip::app::CommandHandler if (!userExists(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln("[SetYearDaySchedule] Unable to add schedule - user does not exist " - "[endpointId=%d,yearDayIndex=%d,userIndex=%d]", - endpointId, yearDayIndex, userIndex); + ChipLogProgress(Zcl, + "[SetYearDaySchedule] Unable to add schedule - user does not exist " + "[endpointId=%d,yearDayIndex=%d,userIndex=%d]", + endpointId, yearDayIndex, userIndex); commandObj->AddStatus(commandPath, Status::Failure); return; } if (localEndTime <= localStartTime) { - emberAfDoorLockClusterPrintln("[SetYearDaySchedule] Unable to add schedule - schedule ends earlier than starts" - "[endpointId=%d,yearDayIndex=%d,userIndex=%d,localStarTime=%" PRIu32 ",localEndTime=%" PRIu32 - "]", - endpointId, yearDayIndex, userIndex, localStartTime, localEndTime); + ChipLogProgress(Zcl, + "[SetYearDaySchedule] Unable to add schedule - schedule ends earlier than starts" + "[endpointId=%d,yearDayIndex=%d,userIndex=%d,localStarTime=%" PRIu32 ",localEndTime=%" PRIu32 "]", + endpointId, yearDayIndex, userIndex, localStartTime, localEndTime); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } @@ -1196,9 +1206,10 @@ void DoorLockServer::setYearDayScheduleCommandHandler(chip::app::CommandHandler return; } - emberAfDoorLockClusterPrintln("[SetYearDaySchedule] Successfully created new schedule " - "[endpointId=%d,yearDayIndex=%d,userIndex=%d,localStartTime=%" PRIu32 ",endTime=%" PRIu32 "]", - endpointId, yearDayIndex, userIndex, localStartTime, localEndTime); + ChipLogProgress(Zcl, + "[SetYearDaySchedule] Successfully created new schedule " + "[endpointId=%d,yearDayIndex=%d,userIndex=%d,localStartTime=%" PRIu32 ",endTime=%" PRIu32 "]", + endpointId, yearDayIndex, userIndex, localStartTime, localEndTime); sendRemoteLockUserChange(endpointId, LockDataTypeEnum::kYearDaySchedule, DataOperationTypeEnum::kAdd, sourceNodeId, fabricIdx, userIndex, static_cast(yearDayIndex)); @@ -1213,16 +1224,16 @@ void DoorLockServer::getYearDayScheduleCommandHandler(chip::app::CommandHandler auto endpointId = commandPath.mEndpointId; if (!SupportsYearDaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[GetYearDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[GetYearDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[GetYearDaySchedule] incoming command [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[GetYearDaySchedule] incoming command [endpointId=%d]", endpointId); if (!yearDayIndexValid(endpointId, yearDayIndex) || !userIndexValid(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln( - "[GetYearDaySchedule] Unable to get schedule - index out of range [endpointId=%d,yearDayIndex=%d,userIndex=%d]", + ChipLogProgress( + Zcl, "[GetYearDaySchedule] Unable to get schedule - index out of range [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId, yearDayIndex, userIndex); sendGetYearDayScheduleResponse(commandObj, commandPath, yearDayIndex, userIndex, DlStatus::kInvalidField); return; @@ -1230,8 +1241,8 @@ void DoorLockServer::getYearDayScheduleCommandHandler(chip::app::CommandHandler if (!userExists(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln("[GetYearDaySchedule] User does not exist [endpointId=%d,yearDayIndex=%d,userIndex=%d]", - endpointId, yearDayIndex, userIndex); + ChipLogProgress(Zcl, "[GetYearDaySchedule] User does not exist [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId, + yearDayIndex, userIndex); sendGetYearDayScheduleResponse(commandObj, commandPath, yearDayIndex, userIndex, DlStatus::kFailure); return; } @@ -1255,11 +1266,11 @@ void DoorLockServer::clearYearDayScheduleCommandHandler(chip::app::CommandHandle auto endpointId = commandPath.mEndpointId; if (!SupportsYearDaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[ClearYearDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[ClearYearDaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[ClearYearDaySchedule] incoming command [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[ClearYearDaySchedule] incoming command [endpointId=%d]", endpointId); auto fabricIdx = getFabricIndex(commandObj); if (kUndefinedFabricIndex == fabricIdx) @@ -1279,17 +1290,17 @@ void DoorLockServer::clearYearDayScheduleCommandHandler(chip::app::CommandHandle if (!userIndexValid(endpointId, userIndex) || (!yearDayIndexValid(endpointId, yearDayIndex) && 0xFE != yearDayIndex)) { - emberAfDoorLockClusterPrintln( - "[ClearYearDaySchedule] User or YearDay index is out of range [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId, - yearDayIndex, userIndex); + ChipLogProgress(Zcl, + "[ClearYearDaySchedule] User or YearDay index is out of range [endpointId=%d,yearDayIndex=%d,userIndex=%d]", + endpointId, yearDayIndex, userIndex); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } if (!userExists(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln("[ClearYearDaySchedule] User does not exist [endpointId=%d,yearDayIndex=%d,userIndex=%d]", - endpointId, yearDayIndex, userIndex); + ChipLogProgress(Zcl, "[ClearYearDaySchedule] User does not exist [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId, + yearDayIndex, userIndex); commandObj->AddStatus(commandPath, Status::Failure); return; } @@ -1297,22 +1308,21 @@ void DoorLockServer::clearYearDayScheduleCommandHandler(chip::app::CommandHandle DlStatus clearStatus = DlStatus::kSuccess; if (0xFE == yearDayIndex) { - emberAfDoorLockClusterPrintln( - "[ClearYearDaySchedule] Clearing all schedules for a single user [endpointId=%d,userIndex=%d]", endpointId, userIndex); + ChipLogProgress(Zcl, "[ClearYearDaySchedule] Clearing all schedules for a single user [endpointId=%d,userIndex=%d]", + endpointId, userIndex); clearStatus = clearYearDaySchedules(endpointId, userIndex); } else { - emberAfDoorLockClusterPrintln( - "[ClearYearDaySchedule] Clearing a single schedule [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId, - yearDayIndex, userIndex); + ChipLogProgress(Zcl, "[ClearYearDaySchedule] Clearing a single schedule [endpointId=%d,yearDayIndex=%d,userIndex=%d]", + endpointId, yearDayIndex, userIndex); clearStatus = clearYearDaySchedule(endpointId, userIndex, yearDayIndex); } if (DlStatus::kSuccess != clearStatus) { - emberAfDoorLockClusterPrintln( - "[ClearYearDaySchedule] Unable to clear the user schedules - app error [endpointId=%d,userIndex=%d,status=%u]", + ChipLogProgress( + Zcl, "[ClearYearDaySchedule] Unable to clear the user schedules - app error [endpointId=%d,userIndex=%d,status=%u]", endpointId, userIndex, to_underlying(clearStatus)); commandObj->AddStatus(commandPath, Status::Failure); return; @@ -1337,9 +1347,8 @@ chip::BitFlags DoorLockServer::GetFeatures(chip::EndpointId endpointId) bool DoorLockServer::OnFabricRemoved(chip::EndpointId endpointId, chip::FabricIndex fabricIndex) { - emberAfDoorLockClusterPrintln( - "[OnFabricRemoved] Handling a fabric removal from the door lock server [endpointId=%d,fabricIndex=%d]", endpointId, - fabricIndex); + ChipLogProgress(Zcl, "[OnFabricRemoved] Handling a fabric removal from the door lock server [endpointId=%d,fabricIndex=%d]", + endpointId, fabricIndex); // Iterate over all the users and clean up the deleted fabric if (!clearFabricFromUsers(endpointId, fabricIndex)) @@ -1504,10 +1513,10 @@ DlStatus DoorLockServer::credentialLengthWithinRange(chip::EndpointId endpointId if (credentialData.size() < minLen || credentialData.size() > maxLen) { - emberAfDoorLockClusterPrintln("Credential data size is out of range " - "[endpointId=%d,credentialType=%u,minLength=%u,maxLength=%u,length=%u]", - endpointId, to_underlying(type), minLen, maxLen, - static_cast(credentialData.size())); + ChipLogProgress(Zcl, + "Credential data size is out of range " + "[endpointId=%d,credentialType=%u,minLength=%u,maxLength=%u,length=%u]", + endpointId, to_underlying(type), minLen, maxLen, static_cast(credentialData.size())); return DlStatus::kInvalidField; } @@ -1793,8 +1802,7 @@ EmberAfStatus DoorLockServer::createUser(chip::EndpointId endpointId, chip::Fabr // appclusters, 5.2.4.34: to modify user its status should be set to Available. If it is we should return OCCUPIED. if (UserStatusEnum::kAvailable != user.userStatus) { - emberAfDoorLockClusterPrintln("[createUser] Unable to overwrite existing user [endpointId=%d,userIndex=%d]", endpointId, - userIndex); + ChipLogProgress(Zcl, "[createUser] Unable to overwrite existing user [endpointId=%d,userIndex=%d]", endpointId, userIndex); return static_cast(DlStatus::kOccupied); } @@ -1814,23 +1822,23 @@ EmberAfStatus DoorLockServer::createUser(chip::EndpointId endpointId, chip::Fabr if (!emberAfPluginDoorLockSetUser(endpointId, userIndex, creatorFabricIdx, creatorFabricIdx, newUserName, newUserUniqueId, newUserStatus, newUserType, newCredentialRule, newCredentials, newTotalCredentials)) { - emberAfDoorLockClusterPrintln("[createUser] Unable to create user: app error " - "[endpointId=%d,creatorFabricId=%d,userIndex=%d,userName=\"%.*s\",userUniqueId=0x%" PRIx32 - ",userStatus=%u," - "userType=%u,credentialRule=%u,totalCredentials=%u]", - endpointId, creatorFabricIdx, userIndex, static_cast(newUserName.size()), - newUserName.data(), newUserUniqueId, to_underlying(newUserStatus), to_underlying(newUserType), - to_underlying(newCredentialRule), static_cast(newTotalCredentials)); + ChipLogProgress(Zcl, + "[createUser] Unable to create user: app error " + "[endpointId=%d,creatorFabricId=%d,userIndex=%d,userName=\"%.*s\",userUniqueId=0x%" PRIx32 ",userStatus=%u," + "userType=%u,credentialRule=%u,totalCredentials=%u]", + endpointId, creatorFabricIdx, userIndex, static_cast(newUserName.size()), newUserName.data(), + newUserUniqueId, to_underlying(newUserStatus), to_underlying(newUserType), to_underlying(newCredentialRule), + static_cast(newTotalCredentials)); return EMBER_ZCL_STATUS_FAILURE; } - emberAfDoorLockClusterPrintln("[createUser] User created " - "[endpointId=%d,creatorFabricId=%d,userIndex=%d,userName=\"%.*s\",userUniqueId=0x%" PRIx32 - ",userStatus=%u," - "userType=%u,credentialRule=%u,totalCredentials=%u]", - endpointId, creatorFabricIdx, userIndex, static_cast(newUserName.size()), newUserName.data(), - newUserUniqueId, to_underlying(newUserStatus), to_underlying(newUserType), - to_underlying(newCredentialRule), static_cast(newTotalCredentials)); + ChipLogProgress(Zcl, + "[createUser] User created " + "[endpointId=%d,creatorFabricId=%d,userIndex=%d,userName=\"%.*s\",userUniqueId=0x%" PRIx32 ",userStatus=%u," + "userType=%u,credentialRule=%u,totalCredentials=%u]", + endpointId, creatorFabricIdx, userIndex, static_cast(newUserName.size()), newUserName.data(), + newUserUniqueId, to_underlying(newUserStatus), to_underlying(newUserType), to_underlying(newCredentialRule), + static_cast(newTotalCredentials)); sendRemoteLockUserChange(endpointId, LockDataTypeEnum::kUserIndex, DataOperationTypeEnum::kAdd, sourceNodeId, creatorFabricIdx, userIndex, userIndex); @@ -1855,26 +1863,27 @@ EmberAfStatus DoorLockServer::modifyUser(chip::EndpointId endpointId, chip::Fabr // appclusters, 5.2.4.34: to modify user its status should NOT be set to Available. If it is we should return INVALID_COMMAND. if (UserStatusEnum::kAvailable == user.userStatus) { - emberAfDoorLockClusterPrintln("[modifyUser] Unable to modify non-existing user [endpointId=%d,userIndex=%d]", endpointId, - userIndex); + ChipLogProgress(Zcl, "[modifyUser] Unable to modify non-existing user [endpointId=%d,userIndex=%d]", endpointId, userIndex); return EMBER_ZCL_STATUS_INVALID_COMMAND; } // appclusters, 5.2.4.34: UserName SHALL be null if modifying a user record that was not created by the accessing fabric if (user.createdBy != modifierFabricIndex && !userName.IsNull()) { - emberAfDoorLockClusterPrintln("[modifyUser] Unable to modify name of user created by different fabric " - "[endpointId=%d,userIndex=%d,creatorIdx=%d,modifierIdx=%d]", - endpointId, userIndex, user.createdBy, modifierFabricIndex); + ChipLogProgress(Zcl, + "[modifyUser] Unable to modify name of user created by different fabric " + "[endpointId=%d,userIndex=%d,creatorIdx=%d,modifierIdx=%d]", + endpointId, userIndex, user.createdBy, modifierFabricIndex); return EMBER_ZCL_STATUS_INVALID_COMMAND; } // appclusters, 5.2.4.34: UserUniqueID SHALL be null if modifying the user record that was not created by the accessing fabric. if (user.createdBy != modifierFabricIndex && !userUniqueId.IsNull()) { - emberAfDoorLockClusterPrintln("[modifyUser] Unable to modify UUID of user created by different fabric " - "[endpointId=%d,userIndex=%d,creatorIdx=%d,modifierIdx=%d]", - endpointId, userIndex, user.createdBy, modifierFabricIndex); + ChipLogProgress(Zcl, + "[modifyUser] Unable to modify UUID of user created by different fabric " + "[endpointId=%d,userIndex=%d,creatorIdx=%d,modifierIdx=%d]", + endpointId, userIndex, user.createdBy, modifierFabricIndex); return EMBER_ZCL_STATUS_INVALID_COMMAND; } @@ -1897,12 +1906,12 @@ EmberAfStatus DoorLockServer::modifyUser(chip::EndpointId endpointId, chip::Fabr return EMBER_ZCL_STATUS_FAILURE; } - emberAfDoorLockClusterPrintln("[modifyUser] User modified " - "[endpointId=%d,modifierFabric=%d,userIndex=%d,userName=\"%.*s\",userUniqueId=0x%" PRIx32 - ",userStatus=%u,userType=%u,credentialRule=%u]", - endpointId, modifierFabricIndex, userIndex, static_cast(newUserName.size()), - newUserName.data(), newUserUniqueId, to_underlying(newUserStatus), to_underlying(newUserType), - to_underlying(newCredentialRule)); + ChipLogProgress(Zcl, + "[modifyUser] User modified " + "[endpointId=%d,modifierFabric=%d,userIndex=%d,userName=\"%.*s\",userUniqueId=0x%" PRIx32 + ",userStatus=%u,userType=%u,credentialRule=%u]", + endpointId, modifierFabricIndex, userIndex, static_cast(newUserName.size()), newUserName.data(), + newUserUniqueId, to_underlying(newUserStatus), to_underlying(newUserType), to_underlying(newCredentialRule)); sendRemoteLockUserChange(endpointId, LockDataTypeEnum::kUserIndex, DataOperationTypeEnum::kModify, sourceNodeId, modifierFabricIndex, userIndex, userIndex); @@ -1928,8 +1937,8 @@ Status DoorLockServer::clearUser(chip::EndpointId endpointId, chip::FabricIndex // appclusters, 5.2.4.37: all the credentials associated with user should be cleared when clearing the user for (const auto & credential : user.credentials) { - emberAfDoorLockClusterPrintln( - "[ClearUser] Clearing associated credential [endpointId=%d,userIndex=%d,credentialType=%u,credentialIndex=%d]", + ChipLogProgress( + Zcl, "[ClearUser] Clearing associated credential [endpointId=%d,userIndex=%d,credentialType=%u,credentialIndex=%d]", endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex); if (!emberAfPluginDoorLockSetCredential(endpointId, credential.credentialIndex, kUndefinedFabricIndex, @@ -2025,9 +2034,10 @@ DlStatus DoorLockServer::createNewCredentialAndUser(chip::EndpointId endpointId, uint16_t availableUserIndex = 0; if (!findUnoccupiedUserSlot(endpointId, availableUserIndex)) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to create new user for credential: no available user slots " - "[endpointId=%d,credentialIndex=%d]", - endpointId, credential.credentialIndex); + ChipLogProgress(Zcl, + "[SetCredential] Unable to create new user for credential: no available user slots " + "[endpointId=%d,credentialIndex=%d]", + endpointId, credential.credentialIndex); return DlStatus::kOccupied; } @@ -2036,26 +2046,29 @@ DlStatus DoorLockServer::createNewCredentialAndUser(chip::EndpointId endpointId, userStatus, userType, Nullable(), Nullable(credential)); if (EMBER_ZCL_STATUS_SUCCESS != status) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to create new user for credential: internal error " - "[endpointId=%d,credentialIndex=%d,userIndex=%d,status=%d]", - endpointId, credential.credentialIndex, availableUserIndex, status); + ChipLogProgress(Zcl, + "[SetCredential] Unable to create new user for credential: internal error " + "[endpointId=%d,credentialIndex=%d,userIndex=%d,status=%d]", + endpointId, credential.credentialIndex, availableUserIndex, status); return DlStatus::kFailure; } if (!emberAfPluginDoorLockSetCredential(endpointId, credential.credentialIndex, creatorFabricIdx, creatorFabricIdx, DlCredentialStatus::kOccupied, credential.credentialType, credentialData)) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to set the credential: app error " - "[endpointId=%d,credentialIndex=%d,credentialType=%u,dataLength=%u]", - endpointId, credential.credentialIndex, to_underlying(credential.credentialType), - static_cast(credentialData.size())); + ChipLogProgress(Zcl, + "[SetCredential] Unable to set the credential: app error " + "[endpointId=%d,credentialIndex=%d,credentialType=%u,dataLength=%u]", + endpointId, credential.credentialIndex, to_underlying(credential.credentialType), + static_cast(credentialData.size())); return DlStatus::kFailure; } - emberAfDoorLockClusterPrintln("[SetCredential] Credential and user were created " - "[endpointId=%d,credentialIndex=%d,credentialType=%u,dataLength=%u,userIndex=%d]", - endpointId, credential.credentialIndex, to_underlying(credential.credentialType), - static_cast(credentialData.size()), availableUserIndex); + ChipLogProgress(Zcl, + "[SetCredential] Credential and user were created " + "[endpointId=%d,credentialIndex=%d,credentialType=%u,dataLength=%u,userIndex=%d]", + endpointId, credential.credentialIndex, to_underlying(credential.credentialType), + static_cast(credentialData.size()), availableUserIndex); createdUserIndex = availableUserIndex; return DlStatus::kSuccess; @@ -2067,17 +2080,18 @@ DlStatus DoorLockServer::createNewCredentialAndAddItToUser(chip::EndpointId endp { if (!userIndexValid(endpointId, userIndex)) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to add new credential to user: user out of bounds " - "[endpointId=%d,credentialIndex=%d,userIndex=%d]", - endpointId, credential.credentialIndex, userIndex); + ChipLogProgress(Zcl, + "[SetCredential] Unable to add new credential to user: user out of bounds " + "[endpointId=%d,credentialIndex=%d,userIndex=%d]", + endpointId, credential.credentialIndex, userIndex); return DlStatus::kInvalidField; } EmberAfPluginDoorLockUserInfo user; if (!emberAfPluginDoorLockGetUser(endpointId, userIndex, user)) { - emberAfDoorLockClusterPrintln( - "[SetCredential] Unable to check if credential exists: app error [endpointId=%d,credentialIndex=%d,userIndex=%d]", + ChipLogProgress( + Zcl, "[SetCredential] Unable to check if credential exists: app error [endpointId=%d,credentialIndex=%d,userIndex=%d]", endpointId, credential.credentialIndex, userIndex); return DlStatus::kFailure; @@ -2086,9 +2100,10 @@ DlStatus DoorLockServer::createNewCredentialAndAddItToUser(chip::EndpointId endp // Not in the spec, but common sense: I don't think we need to modify the credential if user slot is not occupied if (user.userStatus == UserStatusEnum::kAvailable) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to add credential to user: user slot is empty " - "[endpointId=%d,credentialIndex=%d,userIndex=%d]", - endpointId, credential.credentialIndex, userIndex); + ChipLogProgress(Zcl, + "[SetCredential] Unable to add credential to user: user slot is empty " + "[endpointId=%d,credentialIndex=%d,userIndex=%d]", + endpointId, credential.credentialIndex, userIndex); return DlStatus::kInvalidField; } @@ -2096,19 +2111,21 @@ DlStatus DoorLockServer::createNewCredentialAndAddItToUser(chip::EndpointId endp auto status = addCredentialToUser(endpointId, modifierFabricIdx, userIndex, credential); if (DlStatus::kSuccess != status) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to add credential to a user: internal error " - "[endpointId=%d,credentialIndex=%d,userIndex=%d,status=%u]", - endpointId, credential.credentialIndex, userIndex, to_underlying(status)); + ChipLogProgress(Zcl, + "[SetCredential] Unable to add credential to a user: internal error " + "[endpointId=%d,credentialIndex=%d,userIndex=%d,status=%u]", + endpointId, credential.credentialIndex, userIndex, to_underlying(status)); return status; } if (!emberAfPluginDoorLockSetCredential(endpointId, credential.credentialIndex, modifierFabricIdx, modifierFabricIdx, DlCredentialStatus::kOccupied, credential.credentialType, credentialData)) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to set the credential: app error " - "[endpointId=%d,credentialIndex=%d,credentialType=%u,dataLength=%u]", - endpointId, credential.credentialIndex, to_underlying(credential.credentialType), - static_cast(credentialData.size())); + ChipLogProgress(Zcl, + "[SetCredential] Unable to set the credential: app error " + "[endpointId=%d,credentialIndex=%d,credentialType=%u,dataLength=%u]", + endpointId, credential.credentialIndex, to_underlying(credential.credentialType), + static_cast(credentialData.size())); return DlStatus::kFailure; } @@ -2122,8 +2139,8 @@ DlStatus DoorLockServer::addCredentialToUser(chip::EndpointId endpointId, chip:: EmberAfPluginDoorLockUserInfo user; if (!emberAfPluginDoorLockGetUser(endpointId, userIndex, user)) { - emberAfDoorLockClusterPrintln("[AddCredentialToUser] Unable to get the user from app [endpointId=%d,userIndex=%d]", - endpointId, userIndex); + ChipLogProgress(Zcl, "[AddCredentialToUser] Unable to get the user from app [endpointId=%d,userIndex=%d]", endpointId, + userIndex); return DlStatus::kFailure; } @@ -2135,7 +2152,8 @@ DlStatus DoorLockServer::addCredentialToUser(chip::EndpointId endpointId, chip:: if (user.credentials.data()[i].credentialIndex == credential.credentialIndex && user.credentials.data()[i].credentialType == credential.credentialType) { - emberAfDoorLockClusterPrintln( + ChipLogProgress( + Zcl, "[AddCredentialToUser] Unable to add credential to user: credential with this index is already associated " "with user [endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d]", endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex); @@ -2156,9 +2174,10 @@ DlStatus DoorLockServer::addCredentialToUser(chip::EndpointId endpointId, chip:: // appclusters: spec defines up to NumberOfCredentialsSupportedPerUser credentials per user if (user.credentials.size() + 1 > maxCredentialsPerUser) { - emberAfDoorLockClusterPrintln("[AddCredentialToUser] Unable to add credentials to user: too many credentials " - "[endpointId=%d,userIndex=%d,userTotalCredentials=%u]", - endpointId, userIndex, static_cast(user.credentials.size())); + ChipLogProgress(Zcl, + "[AddCredentialToUser] Unable to add credentials to user: too many credentials " + "[endpointId=%d,userIndex=%d,userTotalCredentials=%u]", + endpointId, userIndex, static_cast(user.credentials.size())); return DlStatus::kResourceExhausted; } @@ -2179,18 +2198,19 @@ DlStatus DoorLockServer::addCredentialToUser(chip::EndpointId endpointId, chip:: user.userStatus, user.userType, user.credentialRule, newCredentials.Get(), user.credentials.size() + 1)) { - emberAfDoorLockClusterPrintln( - "[AddCredentialToUser] Unable to add credential to user: credential with this index is already associated " - "with user [endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d,userTotalCredentials=%u]", - endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex, - static_cast(user.credentials.size())); + ChipLogProgress(Zcl, + "[AddCredentialToUser] Unable to add credential to user: credential with this index is already associated " + "with user [endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d,userTotalCredentials=%u]", + endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex, + static_cast(user.credentials.size())); return DlStatus::kFailure; } - emberAfDoorLockClusterPrintln("[AddCredentialToUser] Credential added to user " - "[endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d,userTotalCredentials=%u]", - endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex, - static_cast(user.credentials.size() + 1)); + ChipLogProgress(Zcl, + "[AddCredentialToUser] Credential added to user " + "[endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d,userTotalCredentials=%u]", + endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex, + static_cast(user.credentials.size() + 1)); return DlStatus::kSuccess; } @@ -2202,8 +2222,8 @@ DlStatus DoorLockServer::modifyCredentialForUser(chip::EndpointId endpointId, ch EmberAfPluginDoorLockUserInfo user; if (!emberAfPluginDoorLockGetUser(endpointId, userIndex, user)) { - emberAfDoorLockClusterPrintln("[ModifyUserCredential] Unable to get the user from app [endpointId=%d,userIndex=%d]", - endpointId, userIndex); + ChipLogProgress(Zcl, "[ModifyUserCredential] Unable to get the user from app [endpointId=%d,userIndex=%d]", endpointId, + userIndex); return DlStatus::kFailure; } @@ -2225,7 +2245,8 @@ DlStatus DoorLockServer::modifyCredentialForUser(chip::EndpointId endpointId, ch memcpy(newCredentials.Get(), user.credentials.data(), sizeof(CredentialStruct) * user.credentials.size()); newCredentials[i] = credential; - emberAfDoorLockClusterPrintln( + ChipLogProgress( + Zcl, "[ModifyUserCredential] Unable to add credential to user: credential with this index is already associated " "[endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d]", endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex); @@ -2234,7 +2255,8 @@ DlStatus DoorLockServer::modifyCredentialForUser(chip::EndpointId endpointId, ch user.userUniqueId, user.userStatus, user.userType, user.credentialRule, newCredentials.Get(), user.credentials.size())) { - emberAfDoorLockClusterPrintln( + ChipLogProgress( + Zcl, "[ModifyUserCredential] Unable to modify user credential: credential with this index is already associated " "with user [endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d,userTotalCredentials=%u]", endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex, @@ -2242,21 +2264,21 @@ DlStatus DoorLockServer::modifyCredentialForUser(chip::EndpointId endpointId, ch return DlStatus::kFailure; } - emberAfDoorLockClusterPrintln( - "[ModifyUserCredential] User credential modified " - "[endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d,userTotalCredentials=%u]", - endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex, - static_cast(user.credentials.size())); + ChipLogProgress(Zcl, + "[ModifyUserCredential] User credential modified " + "[endpointId=%d,userIndex=%d,credentialType=%d,credentialIndex=%d,userTotalCredentials=%u]", + endpointId, userIndex, to_underlying(credential.credentialType), credential.credentialIndex, + static_cast(user.credentials.size())); return DlStatus::kSuccess; } } // appclusters, 5.2.4.40: if user is not associated with credential index we should return INVALID_COMMAND - emberAfDoorLockClusterPrintln( - "[ModifyUserCredential] Unable to modify user credential: user is not associated with credential index " - "[endpointId=%d,userIndex=%d,credentialIndex=%d]", - endpointId, userIndex, credential.credentialIndex); + ChipLogProgress(Zcl, + "[ModifyUserCredential] Unable to modify user credential: user is not associated with credential index " + "[endpointId=%d,userIndex=%d,credentialIndex=%d]", + endpointId, userIndex, credential.credentialIndex); return DlStatus::kInvalidField; } @@ -2271,8 +2293,8 @@ DlStatus DoorLockServer::createCredential(chip::EndpointId endpointId, chip::Fab // appclusters, 5.2.4.41.1: should send the OCCUPIED in the response when the credential is in use if (DlCredentialStatus::kAvailable != existingCredential.status) { - emberAfDoorLockClusterPrintln( - "[SetCredential] Unable to set the credential: credential slot is occupied [endpointId=%d,credentialIndex=%d]", + ChipLogProgress( + Zcl, "[SetCredential] Unable to set the credential: credential slot is occupied [endpointId=%d,credentialIndex=%d]", endpointId, credentialIndex); return DlStatus::kOccupied; @@ -2280,9 +2302,10 @@ DlStatus DoorLockServer::createCredential(chip::EndpointId endpointId, chip::Fab if (!userType.IsNull() && UserTypeEnum::kProgrammingUser == userType.Value()) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to set the credential: user type is invalid " - "[endpointId=%d,credentialIndex=%d,userType=%u]", - endpointId, credentialIndex, to_underlying(userType.Value())); + ChipLogProgress(Zcl, + "[SetCredential] Unable to set the credential: user type is invalid " + "[endpointId=%d,credentialIndex=%d,userType=%u]", + endpointId, credentialIndex, to_underlying(userType.Value())); return DlStatus::kInvalidField; } @@ -2292,8 +2315,8 @@ DlStatus DoorLockServer::createCredential(chip::EndpointId endpointId, chip::Fab DlStatus status = DlStatus::kSuccess; if (userIndex.IsNull()) { - emberAfDoorLockClusterPrintln("[SetCredential] UserIndex is not set, creating new user [endpointId=%d,credentialIndex=%d]", - endpointId, credentialIndex); + ChipLogProgress(Zcl, "[SetCredential] UserIndex is not set, creating new user [endpointId=%d,credentialIndex=%d]", + endpointId, credentialIndex); status = createNewCredentialAndUser(endpointId, creatorFabricIdx, sourceNodeId, userStatus, userType, credential, credentialData, createdUserIndex); @@ -2305,9 +2328,10 @@ DlStatus DoorLockServer::createCredential(chip::EndpointId endpointId, chip::Fab // be null. if (!userStatus.IsNull() || !userType.IsNull()) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to add credential: invalid arguments " - "[endpointId=%d,credentialIndex=%d,credentialType=%u]", - endpointId, credentialIndex, to_underlying(credentialType)); + ChipLogProgress(Zcl, + "[SetCredential] Unable to add credential: invalid arguments " + "[endpointId=%d,credentialIndex=%d,credentialType=%u]", + endpointId, credentialIndex, to_underlying(credentialType)); return DlStatus::kInvalidField; } status = createNewCredentialAndAddItToUser(endpointId, creatorFabricIdx, userIndex.Value(), credential, credentialData); @@ -2331,15 +2355,15 @@ DlStatus DoorLockServer::modifyProgrammingPIN(chip::EndpointId endpointId, chip: { if (CredentialTypeEnum::kProgrammingPIN != credentialType || 0 != credentialIndex) { - emberAfDoorLockClusterPrintln( - "[SetCredential] Unable to modify programming PIN: invalid argument [endpointId=%d,credentialIndex=%d]", endpointId, - credentialIndex); + ChipLogProgress(Zcl, + "[SetCredential] Unable to modify programming PIN: invalid argument [endpointId=%d,credentialIndex=%d]", + endpointId, credentialIndex); return DlStatus::kInvalidField; } - emberAfDoorLockClusterPrintln("[SetCredential] Modifying the programming PIN [endpointId=%d,credentialIndex=%d]", endpointId, - credentialIndex); + ChipLogProgress(Zcl, "[SetCredential] Modifying the programming PIN [endpointId=%d,credentialIndex=%d]", endpointId, + credentialIndex); uint16_t relatedUserIndex = 0; if (!findUserIndexByCredential(endpointId, CredentialTypeEnum::kProgrammingPIN, 0, relatedUserIndex)) @@ -2352,17 +2376,18 @@ DlStatus DoorLockServer::modifyProgrammingPIN(chip::EndpointId endpointId, chip: if (!emberAfPluginDoorLockSetCredential(endpointId, credentialIndex, existingCredential.createdBy, modifierFabricIndex, existingCredential.status, existingCredential.credentialType, credentialData)) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to modify the credential: app error " - "[endpointId=%d,credentialIndex=%d,credentialType=%u,credentialDataSize=%u]", - endpointId, credentialIndex, to_underlying(credentialType), - static_cast(credentialData.size())); + ChipLogProgress(Zcl, + "[SetCredential] Unable to modify the credential: app error " + "[endpointId=%d,credentialIndex=%d,credentialType=%u,credentialDataSize=%u]", + endpointId, credentialIndex, to_underlying(credentialType), + static_cast(credentialData.size())); return DlStatus::kFailure; } - emberAfDoorLockClusterPrintln("[SetCredential] Successfully modified the credential " - "[endpointId=%d,credentialIndex=%d,credentialType=%u,credentialDataSize=%u]", - endpointId, credentialIndex, to_underlying(credentialType), - static_cast(credentialData.size())); + ChipLogProgress(Zcl, + "[SetCredential] Successfully modified the credential " + "[endpointId=%d,credentialIndex=%d,credentialType=%u,credentialDataSize=%u]", + endpointId, credentialIndex, to_underlying(credentialType), static_cast(credentialData.size())); sendRemoteLockUserChange(endpointId, credentialTypeToLockDataType(credentialType), DataOperationTypeEnum::kModify, sourceNodeId, modifierFabricIndex, relatedUserIndex, credentialIndex); @@ -2380,9 +2405,10 @@ DlStatus DoorLockServer::modifyCredential(chip::EndpointId endpointId, chip::Fab // appclusters, 5.2.4.40: when modifying a credential, userStatus and userType shall both be NULL. if (!userStatus.IsNull() || !userType.IsNull()) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to modify the credential: invalid arguments " - "[endpointId=%d,credentialIndex=%d,credentialType=%u]", - endpointId, credentialIndex, to_underlying(credentialType)); + ChipLogProgress(Zcl, + "[SetCredential] Unable to modify the credential: invalid arguments " + "[endpointId=%d,credentialIndex=%d,credentialType=%u]", + endpointId, credentialIndex, to_underlying(credentialType)); return DlStatus::kInvalidField; } @@ -2394,18 +2420,20 @@ DlStatus DoorLockServer::modifyCredential(chip::EndpointId endpointId, chip::Fab if (!emberAfPluginDoorLockSetCredential(endpointId, credentialIndex, existingCredential.createdBy, modifierFabricIndex, existingCredential.status, existingCredential.credentialType, credentialData)) { - emberAfDoorLockClusterPrintln("[SetCredential] Unable to modify the credential: app error " - "[endpointId=%d,credentialIndex=%d,credentialType=%u,credentialDataSize=%u]", - endpointId, credentialIndex, to_underlying(credentialType), - static_cast(credentialData.size())); + ChipLogProgress(Zcl, + "[SetCredential] Unable to modify the credential: app error " + "[endpointId=%d,credentialIndex=%d,credentialType=%u,credentialDataSize=%u]", + endpointId, credentialIndex, to_underlying(credentialType), + static_cast(credentialData.size())); return DlStatus::kFailure; } - emberAfDoorLockClusterPrintln("[SetCredential] Successfully modified the credential " - "[endpointId=%d,credentialIndex=%d,credentialType=%u,credentialDataSize=%u]", - endpointId, credentialIndex, to_underlying(credentialType), - static_cast(credentialData.size())); + ChipLogProgress(Zcl, + "[SetCredential] Successfully modified the credential " + "[endpointId=%d,credentialIndex=%d,credentialType=%u,credentialDataSize=%u]", + endpointId, credentialIndex, to_underlying(credentialType), + static_cast(credentialData.size())); sendRemoteLockUserChange(endpointId, credentialTypeToLockDataType(credentialType), DataOperationTypeEnum::kModify, sourceNodeId, modifierFabricIndex, userIndex, credentialIndex); @@ -2689,17 +2717,19 @@ Status DoorLockServer::clearCredential(chip::EndpointId endpointId, chip::Fabric { if (CredentialTypeEnum::kProgrammingPIN == credentialType) { - emberAfDoorLockClusterPrintln("[clearCredential] Cannot clear programming PIN credentials " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d]", - endpointId, to_underlying(credentialType), credentialIndex, modifier); + ChipLogProgress(Zcl, + "[clearCredential] Cannot clear programming PIN credentials " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d]", + endpointId, to_underlying(credentialType), credentialIndex, modifier); return Status::InvalidCommand; } if (!credentialIndexValid(endpointId, credentialType, credentialIndex)) { - emberAfDoorLockClusterPrintln("[clearCredential] Cannot clear credential - index out of bounds " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d]", - endpointId, to_underlying(credentialType), credentialIndex, modifier); + ChipLogProgress(Zcl, + "[clearCredential] Cannot clear credential - index out of bounds " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d]", + endpointId, to_underlying(credentialType), credentialIndex, modifier); return Status::InvalidCommand; } @@ -2716,18 +2746,20 @@ Status DoorLockServer::clearCredential(chip::EndpointId endpointId, chip::Fabric if (DlCredentialStatus::kAvailable == credential.status) { - emberAfDoorLockClusterPrintln("[clearCredential] Ignored attempt to clear unoccupied credential slot " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d]", - endpointId, to_underlying(credentialType), credentialIndex, modifier); + ChipLogProgress(Zcl, + "[clearCredential] Ignored attempt to clear unoccupied credential slot " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d]", + endpointId, to_underlying(credentialType), credentialIndex, modifier); return Status::Success; } if (credentialType != credential.credentialType) { - emberAfDoorLockClusterPrintln("[clearCredential] Ignored attempt to clear credential of different type " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d,actualCredentialType=%u]", - endpointId, to_underlying(credentialType), credentialIndex, modifier, - to_underlying(credential.credentialType)); + ChipLogProgress(Zcl, + "[clearCredential] Ignored attempt to clear credential of different type " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d,actualCredentialType=%u]", + endpointId, to_underlying(credentialType), credentialIndex, modifier, + to_underlying(credential.credentialType)); return Status::Success; } @@ -2754,9 +2786,10 @@ Status DoorLockServer::clearCredential(chip::EndpointId endpointId, chip::Fabric } if (1 == relatedUser.credentials.size()) { - emberAfDoorLockClusterPrintln("[clearCredential] Clearing related user - no credentials left " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d,userIndex=%d]", - endpointId, to_underlying(credentialType), credentialIndex, modifier, relatedUserIndex); + ChipLogProgress(Zcl, + "[clearCredential] Clearing related user - no credentials left " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d,userIndex=%d]", + endpointId, to_underlying(credentialType), credentialIndex, modifier, relatedUserIndex); auto clearStatus = clearUser(endpointId, modifier, sourceNodeId, relatedUserIndex, relatedUser, true); if (Status::Success != clearStatus) { @@ -2768,9 +2801,10 @@ Status DoorLockServer::clearCredential(chip::EndpointId endpointId, chip::Fabric return Status::Failure; } - emberAfDoorLockClusterPrintln("[clearCredential] Successfully clear credential and related user " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d,userIndex=%d]", - endpointId, to_underlying(credentialType), credentialIndex, modifier, relatedUserIndex); + ChipLogProgress(Zcl, + "[clearCredential] Successfully clear credential and related user " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d,userIndex=%d]", + endpointId, to_underlying(credentialType), credentialIndex, modifier, relatedUserIndex); return Status::Success; } @@ -2841,11 +2875,11 @@ Status DoorLockServer::clearCredential(chip::EndpointId endpointId, chip::Fabric return Status::Failure; } - emberAfDoorLockClusterPrintln( - "[clearCredential] Successfully clear credential and related user " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d,userIndex=%d,newCredentialsCount=%u]", - endpointId, to_underlying(credentialType), credentialIndex, modifier, relatedUserIndex, - static_cast(newCredentialsCount)); + ChipLogProgress(Zcl, + "[clearCredential] Successfully clear credential and related user " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,modifier=%d,userIndex=%d,newCredentialsCount=%u]", + endpointId, to_underlying(credentialType), credentialIndex, modifier, relatedUserIndex, + static_cast(newCredentialsCount)); if (sendUserChangeEvent) { @@ -2868,7 +2902,7 @@ Status DoorLockServer::clearCredentials(chip::EndpointId endpointId, chip::Fabri return status; } - emberAfDoorLockClusterPrintln("[clearCredentials] All PIN credentials were cleared [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[clearCredentials] All PIN credentials were cleared [endpointId=%d]", endpointId); } if (SupportsRFID(endpointId)) @@ -2880,7 +2914,7 @@ Status DoorLockServer::clearCredentials(chip::EndpointId endpointId, chip::Fabri to_underlying(status)); return status; } - emberAfDoorLockClusterPrintln("[clearCredentials] All RFID credentials were cleared [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[clearCredentials] All RFID credentials were cleared [endpointId=%d]", endpointId); } if (SupportsFingers(endpointId)) @@ -2901,7 +2935,7 @@ Status DoorLockServer::clearCredentials(chip::EndpointId endpointId, chip::Fabri return status; } - emberAfDoorLockClusterPrintln("[clearCredentials] All Finger credentials were cleared [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[clearCredentials] All Finger credentials were cleared [endpointId=%d]", endpointId); } if (SupportsFace(endpointId)) @@ -2913,7 +2947,7 @@ Status DoorLockServer::clearCredentials(chip::EndpointId endpointId, chip::Fabri to_underlying(status)); return status; } - emberAfDoorLockClusterPrintln("[clearCredentials] All face credentials were cleared [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[clearCredentials] All face credentials were cleared [endpointId=%d]", endpointId); } return Status::Success; @@ -3087,10 +3121,10 @@ bool DoorLockServer::sendRemoteLockUserChange(chip::EndpointId endpointId, LockD endpointId); return false; } - emberAfDoorLockClusterPrintln("[RemoteLockUserChange] Sent lock user change event " - "[endpointId=%d,eventNumber=%" PRIu64 ",dataType=%u,operation=%u,nodeId=%" PRIu64 - ",fabricIndex=%d]", - endpointId, eventNumber, to_underlying(dataType), to_underlying(operation), nodeId, fabricIndex); + ChipLogProgress(Zcl, + "[RemoteLockUserChange] Sent lock user change event " + "[endpointId=%d,eventNumber=%" PRIu64 ",dataType=%u,operation=%u,nodeId=%" PRIu64 ",fabricIndex=%d]", + endpointId, eventNumber, to_underlying(dataType), to_underlying(operation), nodeId, fabricIndex); return true; } @@ -3132,37 +3166,37 @@ void DoorLockServer::setHolidayScheduleCommandHandler(chip::app::CommandHandler auto endpointId = commandPath.mEndpointId; if (!SupportsHolidaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[SetHolidaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[SetHolidaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[SetHolidaySchedule] incoming command [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[SetHolidaySchedule] incoming command [endpointId=%d]", endpointId); if (!holidayIndexValid(endpointId, holidayIndex)) { - emberAfDoorLockClusterPrintln( - "[SetHolidaySchedule] Unable to add schedule - index out of range [endpointId=%d,scheduleIndex=%d]", endpointId, - holidayIndex); + ChipLogProgress(Zcl, "[SetHolidaySchedule] Unable to add schedule - index out of range [endpointId=%d,scheduleIndex=%d]", + endpointId, holidayIndex); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } if (localEndTime <= localStartTime) { - emberAfDoorLockClusterPrintln("[SetHolidaySchedule] Unable to add schedule - schedule ends earlier than starts" - "[endpointId=%d,scheduleIndex=%d,localStarTime=%" PRIu32 ",localEndTime=%" PRIu32 "]", - endpointId, holidayIndex, localStartTime, localEndTime); + ChipLogProgress(Zcl, + "[SetHolidaySchedule] Unable to add schedule - schedule ends earlier than starts" + "[endpointId=%d,scheduleIndex=%d,localStarTime=%" PRIu32 ",localEndTime=%" PRIu32 "]", + endpointId, holidayIndex, localStartTime, localEndTime); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } if (operatingMode == OperatingModeEnum::kUnknownEnumValue) { - emberAfDoorLockClusterPrintln("[SetHolidaySchedule] Unable to add schedule - operating mode is unknown" - "[endpointId=%d,scheduleIndex=%d,localStarTime=%" PRIu32 ",localEndTime=%" PRIu32 - ", operatingMode=%d]", - endpointId, holidayIndex, localStartTime, localEndTime, to_underlying(operatingMode)); + ChipLogProgress(Zcl, + "[SetHolidaySchedule] Unable to add schedule - operating mode is unknown" + "[endpointId=%d,scheduleIndex=%d,localStarTime=%" PRIu32 ",localEndTime=%" PRIu32 ", operatingMode=%d]", + endpointId, holidayIndex, localStartTime, localEndTime, to_underlying(operatingMode)); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } @@ -3177,10 +3211,10 @@ void DoorLockServer::setHolidayScheduleCommandHandler(chip::app::CommandHandler return; } - emberAfDoorLockClusterPrintln("[SetHolidaySchedule] Successfully created new schedule " - "[endpointId=%d,scheduleIndex=%d,localStartTime=%" PRIu32 ",endTime=%" PRIu32 - ",operatingMode=%d]", - endpointId, holidayIndex, localStartTime, localEndTime, to_underlying(operatingMode)); + ChipLogProgress(Zcl, + "[SetHolidaySchedule] Successfully created new schedule " + "[endpointId=%d,scheduleIndex=%d,localStartTime=%" PRIu32 ",endTime=%" PRIu32 ",operatingMode=%d]", + endpointId, holidayIndex, localStartTime, localEndTime, to_underlying(operatingMode)); commandObj->AddStatus(commandPath, Status::Success); } @@ -3191,19 +3225,17 @@ void DoorLockServer::getHolidayScheduleCommandHandler(chip::app::CommandHandler auto endpointId = commandPath.mEndpointId; if (!SupportsHolidaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[GetHolidaySchedule] Ignore command (not supported) [endpointId=%d,scheduleIndex=%d]", - endpointId, holidayIndex); + ChipLogProgress(Zcl, "[GetHolidaySchedule] Ignore command (not supported) [endpointId=%d,scheduleIndex=%d]", endpointId, + holidayIndex); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[GetHolidaySchedule] incoming command [endpointId=%d,scheduleIndex=%d]", endpointId, - holidayIndex); + ChipLogProgress(Zcl, "[GetHolidaySchedule] incoming command [endpointId=%d,scheduleIndex=%d]", endpointId, holidayIndex); if (!holidayIndexValid(endpointId, holidayIndex)) { - emberAfDoorLockClusterPrintln( - "[GetYearDaySchedule] Unable to get schedule - index out of range [endpointId=%d,scheduleIndex=%d]", endpointId, - holidayIndex); + ChipLogProgress(Zcl, "[GetYearDaySchedule] Unable to get schedule - index out of range [endpointId=%d,scheduleIndex=%d]", + endpointId, holidayIndex); sendHolidayScheduleResponse(commandObj, commandPath, holidayIndex, DlStatus::kInvalidField); return; } @@ -3225,17 +3257,16 @@ void DoorLockServer::clearHolidayScheduleCommandHandler(chip::app::CommandHandle auto endpointId = commandPath.mEndpointId; if (!SupportsHolidaySchedules(endpointId)) { - emberAfDoorLockClusterPrintln("[ClearHolidaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + ChipLogProgress(Zcl, "[ClearHolidaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } - emberAfDoorLockClusterPrintln("[ClearHolidaySchedule] incoming command [endpointId=%d,scheduleIndex=%d]", endpointId, - holidayIndex); + ChipLogProgress(Zcl, "[ClearHolidaySchedule] incoming command [endpointId=%d,scheduleIndex=%d]", endpointId, holidayIndex); if (!holidayIndexValid(endpointId, holidayIndex) && 0xFE != holidayIndex) { - emberAfDoorLockClusterPrintln("[ClearHolidaySchedule] Holiday index is out of range [endpointId=%d,scheduleIndex=%d]", - endpointId, holidayIndex); + ChipLogProgress(Zcl, "[ClearHolidaySchedule] Holiday index is out of range [endpointId=%d,scheduleIndex=%d]", endpointId, + holidayIndex); commandObj->AddStatus(commandPath, Status::InvalidCommand); return; } @@ -3243,22 +3274,22 @@ void DoorLockServer::clearHolidayScheduleCommandHandler(chip::app::CommandHandle DlStatus clearStatus = DlStatus::kSuccess; if (0xFE == holidayIndex) { - emberAfDoorLockClusterPrintln( - "[ClearHolidaySchedule] Clearing all holiday schedules for a single user [endpointId=%d,scheduleIndex=%d]", endpointId, - holidayIndex); + ChipLogProgress(Zcl, + "[ClearHolidaySchedule] Clearing all holiday schedules for a single user [endpointId=%d,scheduleIndex=%d]", + endpointId, holidayIndex); clearStatus = clearHolidaySchedules(endpointId); } else { - emberAfDoorLockClusterPrintln("[ClearHolidaySchedule] Clearing a single schedule [endpointId=%d,scheduleIndex=%d]", - endpointId, holidayIndex); + ChipLogProgress(Zcl, "[ClearHolidaySchedule] Clearing a single schedule [endpointId=%d,scheduleIndex=%d]", endpointId, + holidayIndex); clearStatus = clearHolidaySchedule(endpointId, holidayIndex); } if (DlStatus::kSuccess != clearStatus) { - emberAfDoorLockClusterPrintln( - "[ClearHolidaySchedule] Unable to clear the user schedules - app error [endpointId=%d,scheduleIndex=%d,status=%u]", + ChipLogProgress( + Zcl, "[ClearHolidaySchedule] Unable to clear the user schedules - app error [endpointId=%d,scheduleIndex=%d,status=%u]", endpointId, holidayIndex, to_underlying(clearStatus)); commandObj->AddStatus(commandPath, Status::Failure); return; @@ -3332,9 +3363,9 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma VerifyOrExit(nullptr != endpointContext, ChipLogError(Zcl, "Failed to get endpoint index for cluster [endpoint=%d]", endpoint)); if (endpointContext->lockoutEndTimestamp >= currentTime) { - emberAfDoorLockClusterPrintln( - "Rejecting remote lock operation -- lockout is in action [endpoint=%d,lockoutEnd=%u,currentTime=%u]", endpoint, - static_cast(endpointContext->lockoutEndTimestamp.count()), static_cast(currentTime.count())); + ChipLogProgress(Zcl, "Rejecting remote lock operation -- lockout is in action [endpoint=%d,lockoutEnd=%u,currentTime=%u]", + endpoint, static_cast(endpointContext->lockoutEndTimestamp.count()), + static_cast(currentTime.count())); sendEvent = false; goto exit; } @@ -3345,9 +3376,9 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma // If the PINCode field is provided, the door lock SHALL verify PINCode before granting access regardless of the value // of RequirePINForRemoteOperation attribute. VerifyOrExit(SupportsPIN(endpoint) && SupportsUSR(endpoint), - emberAfDoorLockClusterPrintln( - "PIN code is supplied while USR/PIN features are disabled. Exiting [endpoint=%d, lock_op=%d]", endpoint, - chip::to_underlying(opType))); + ChipLogProgress(Zcl, + "PIN code is supplied while USR/PIN features are disabled. Exiting [endpoint=%d, lock_op=%d]", + endpoint, chip::to_underlying(opType))); // Look up the user index and credential index -- it should be used in the Lock Operation event EmberAfPluginDoorLockUserInfo user; @@ -3360,8 +3391,8 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma } else { - emberAfDoorLockClusterPrintln("Rejecting lock operation: unknown PIN provided [endpoint=%d, lock_op=%d]", endpoint, - to_underlying(opType)); + ChipLogProgress(Zcl, "Rejecting lock operation: unknown PIN provided [endpoint=%d, lock_op=%d]", endpoint, + to_underlying(opType)); reason = OperationErrorEnum::kInvalidCredential; goto exit; } @@ -3369,9 +3400,9 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma // If the user status is OccupiedDisabled we should deny the access and send out the appropriate event VerifyOrExit(user.userStatus != UserStatusEnum::kOccupiedDisabled, { reason = OperationErrorEnum::kDisabledUserDenied; - emberAfDoorLockClusterPrintln( - "Unable to perform remote lock operation: user is disabled [endpoint=%d, lock_op=%d, userIndex=%d]", endpoint, - to_underlying(opType), userIdx); + ChipLogProgress(Zcl, + "Unable to perform remote lock operation: user is disabled [endpoint=%d, lock_op=%d, userIndex=%d]", + endpoint, to_underlying(opType), userIdx); }); } else @@ -3392,7 +3423,7 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma // If the PIN is required but not provided we should exit VerifyOrExit(!requirePin, { reason = OperationErrorEnum::kInvalidCredential; - emberAfDoorLockClusterPrintln("Checking credentials failed: PIN is not provided when it is required"); + ChipLogProgress(Zcl, "Checking credentials failed: PIN is not provided when it is required"); }); } @@ -3543,7 +3574,7 @@ bool emberAfDoorLockClusterLockDoorCallback(chip::app::CommandHandler * commandO const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::LockDoor::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("Received command: LockDoor"); + ChipLogProgress(Zcl, "Received command: LockDoor"); DoorLockServer::Instance().HandleRemoteLockOperation(commandObj, commandPath, LockOperationTypeEnum::kLock, emberAfPluginDoorLockOnDoorLockCommand, commandData.PINCode); return true; @@ -3553,7 +3584,7 @@ bool emberAfDoorLockClusterUnlockDoorCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::UnlockDoor::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("Received command: UnlockDoor"); + ChipLogProgress(Zcl, "Received command: UnlockDoor"); LockOperationTypeEnum lockOp = LockOperationTypeEnum::kUnlock; @@ -3582,7 +3613,7 @@ bool emberAfDoorLockClusterUnlockWithTimeoutCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("Received command: UnlockWithTimeout"); + ChipLogProgress(Zcl, "Received command: UnlockWithTimeout"); LockOperationTypeEnum lockOp = LockOperationTypeEnum::kUnlock; @@ -3611,7 +3642,7 @@ bool emberAfDoorLockClusterUnboltDoorCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::UnboltDoor::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("Received command: UnboltDoor"); + ChipLogProgress(Zcl, "Received command: UnboltDoor"); if (DoorLockServer::Instance().HandleRemoteLockOperation(commandObj, commandPath, LockOperationTypeEnum::kUnlock, emberAfPluginDoorLockOnDoorUnboltCommand, commandData.PINCode)) @@ -3878,7 +3909,7 @@ void emberAfPluginDoorLockServerRelockEventHandler() {} void MatterDoorLockPluginServerInitCallback() { - emberAfDoorLockClusterPrintln("Door Lock server initialized"); + ChipLogProgress(Zcl, "Door Lock server initialized"); Server::GetInstance().GetFabricTable().AddFabricDelegate(&gFabricDelegate); } @@ -3886,7 +3917,7 @@ void MatterDoorLockClusterServerAttributeChangedCallback(const app::ConcreteAttr void MatterDoorLockClusterServerShutdownCallback(EndpointId endpoint) { - emberAfDoorLockClusterPrintln("Shuting door lock server cluster on endpoint %d", endpoint); + ChipLogProgress(Zcl, "Shuting door lock server cluster on endpoint %d", endpoint); DeviceLayer::SystemLayer().CancelTimer(DoorLockServer::DoorLockOnAutoRelockCallback, reinterpret_cast(static_cast(endpoint))); @@ -3904,13 +3935,13 @@ void DoorLockServer::DoorLockOnAutoRelockCallback(System::Layer *, void * callba if (Attributes::LockState::Get(endpointId, lockState) != EMBER_ZCL_STATUS_SUCCESS || lockState.IsNull() || lockState.Value() != DlLockState::kLocked) { - emberAfDoorLockClusterPrintln("Door Auto relock timer expired. %s", "Locking..."); + ChipLogProgress(Zcl, "Door Auto relock timer expired. %s", "Locking..."); DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kLocked, OperationSourceEnum::kAuto); emberAfPluginDoorLockOnAutoRelock(endpointId); } else { - emberAfDoorLockClusterPrintln("Door Auto relock timer expired. %s", "Already locked."); + ChipLogProgress(Zcl, "Door Auto relock timer expired. %s", "Already locked."); } } diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 966aa400ef0e83..45dd512cce55c5 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -207,7 +207,7 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint) EmberAfStatus status = Attributes::Options::Get(endpoint, &options); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("Unable to read Options attribute: 0x%X", status); + ChipLogProgress(Zcl, "Unable to read Options attribute: 0x%X", status); return; } @@ -240,13 +240,13 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) if (status != EMBER_ZCL_STATUS_SUCCESS || currentLevel.IsNull()) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + ChipLogProgress(Zcl, "ERR: reading current level %x", status); state->callbackSchedule.runTime = System::Clock::Milliseconds32(0); writeRemainingTime(endpoint, 0); return; } - emberAfLevelControlClusterPrint("Event: move from %d", currentLevel.Value()); + ChipLogProgress(Zcl, "Event: move from %d", currentLevel.Value()); // adjust by the proper amount, either up or down if (state->transitionTimeMs == 0) @@ -267,13 +267,13 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) currentLevel.SetNonNull(static_cast(currentLevel.Value() - 1)); } - emberAfLevelControlClusterPrint(" to %d ", currentLevel.Value()); - emberAfLevelControlClusterPrintln("(diff %c1)", state->increasing ? '+' : '-'); + ChipLogProgress(Zcl, " to %d ", currentLevel.Value()); + ChipLogProgress(Zcl, "(diff %c1)", state->increasing ? '+' : '-'); status = Attributes::CurrentLevel::Set(endpoint, currentLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: writing current level %x", status); + ChipLogProgress(Zcl, "ERR: writing current level %x", status); state->callbackSchedule.runTime = System::Clock::Milliseconds32(0); writeRemainingTime(endpoint, 0); return; @@ -304,7 +304,7 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) status = Attributes::CurrentLevel::Set(endpoint, storedLevel8u); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: writing current level %x", status); + ChipLogProgress(Zcl, "ERR: writing current level %x", status); } else { @@ -347,7 +347,7 @@ static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs) EmberStatus status = LevelControl::Attributes::RemainingTime::Set(endpoint, remainingTimeDs); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: writing remaining time %x", status); + ChipLogProgress(Zcl, "ERR: writing remaining time %x", status); } } #endif // IGNORE_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME @@ -358,7 +358,7 @@ static void setOnOffValue(EndpointId endpoint, bool onOff) #ifdef EMBER_AF_PLUGIN_ON_OFF if (emberAfContainsServer(endpoint, OnOff::Id)) { - emberAfLevelControlClusterPrintln("Setting on/off to %s due to level change", onOff ? "ON" : "OFF"); + ChipLogProgress(Zcl, "Setting on/off to %s due to level change", onOff ? "ON" : "OFF"); OnOffServer::Instance().setOnOffValue(endpoint, (onOff ? OnOff::Commands::On::Id : OnOff::Commands::Off::Id), true); } #endif // EMBER_AF_PLUGIN_ON_OFF @@ -394,7 +394,7 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, EmberAfStatus status = Attributes::Options::Get(endpoint, &options); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("Unable to read Options attribute: 0x%X", status); + ChipLogProgress(Zcl, "Unable to read Options attribute: 0x%X", status); // If we can't read the attribute, then we should just assume that it has its // default value. } @@ -403,7 +403,7 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, status = OnOff::Attributes::OnOff::Get(endpoint, &on); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("Unable to read OnOff attribute: 0x%X", status); + ChipLogProgress(Zcl, "Unable to read OnOff attribute: 0x%X", status); return true; } // The device is on - hence ExecuteIfOff does not matter @@ -468,13 +468,13 @@ Status MoveToLevel(EndpointId endpointId, const Commands::MoveToLevel::Decodable if (transitionTime.IsNull()) { - emberAfLevelControlClusterPrintln("%s MOVE_TO_LEVEL %x null %x %x", "RX level-control:", level, optionsMask.Raw(), - optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s MOVE_TO_LEVEL %x null %x %x", "RX level-control:", level, optionsMask.Raw(), + optionsOverride.Raw()); } else { - emberAfLevelControlClusterPrintln("%s MOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime.Value(), - optionsMask.Raw(), optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s MOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime.Value(), optionsMask.Raw(), + optionsOverride.Raw()); } return moveToLevelHandler(endpointId, Commands::MoveToLevel::Id, level, transitionTime, @@ -495,13 +495,13 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler if (transitionTime.IsNull()) { - emberAfLevelControlClusterPrintln("%s MOVE_TO_LEVEL_WITH_ON_OFF %x null %x %x", "RX level-control:", level, - optionsMask.Raw(), optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s MOVE_TO_LEVEL_WITH_ON_OFF %x null %x %x", "RX level-control:", level, optionsMask.Raw(), + optionsOverride.Raw()); } else { - emberAfLevelControlClusterPrintln("%s MOVE_TO_LEVEL_WITH_ON_OFF %x %2x %x %x", "RX level-control:", level, - transitionTime.Value(), optionsMask.Raw(), optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s MOVE_TO_LEVEL_WITH_ON_OFF %x %2x %x %x", "RX level-control:", level, transitionTime.Value(), + optionsMask.Raw(), optionsOverride.Raw()); } Status status = moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevelWithOnOff::Id, level, transitionTime, @@ -524,13 +524,12 @@ bool emberAfLevelControlClusterMoveCallback(app::CommandHandler * commandObj, co if (rate.IsNull()) { - emberAfLevelControlClusterPrintln("%s MOVE %x null %x %x", "RX level-control:", moveMode, optionsMask.Raw(), - optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s MOVE %x null %x %x", "RX level-control:", moveMode, optionsMask.Raw(), optionsOverride.Raw()); } else { - emberAfLevelControlClusterPrintln("%s MOVE %x %u %x %x", "RX level-control:", moveMode, rate.Value(), optionsMask.Raw(), - optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s MOVE %x %u %x %x", "RX level-control:", moveMode, rate.Value(), optionsMask.Raw(), + optionsOverride.Raw()); } moveHandler(commandObj, commandPath, moveMode, rate, Optional>(optionsMask), @@ -548,13 +547,13 @@ bool emberAfLevelControlClusterMoveWithOnOffCallback(app::CommandHandler * comma if (rate.IsNull()) { - emberAfLevelControlClusterPrintln("%s MOVE_WITH_ON_OFF %x null %x %x", "RX level-control:", moveMode, optionsMask.Raw(), - optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s MOVE_WITH_ON_OFF %x null %x %x", "RX level-control:", moveMode, optionsMask.Raw(), + optionsOverride.Raw()); } else { - emberAfLevelControlClusterPrintln("%s MOVE_WITH_ON_OFF %u %2x %x %x", "RX level-control:", moveMode, rate.Value(), - optionsMask.Raw(), optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s MOVE_WITH_ON_OFF %u %2x %x %x", "RX level-control:", moveMode, rate.Value(), optionsMask.Raw(), + optionsOverride.Raw()); } moveHandler(commandObj, commandPath, moveMode, rate, Optional>(optionsMask), @@ -573,13 +572,13 @@ bool emberAfLevelControlClusterStepCallback(app::CommandHandler * commandObj, co if (transitionTime.IsNull()) { - emberAfLevelControlClusterPrintln("%s STEP %x %x null %x %x", "RX level-control:", stepMode, stepSize, optionsMask.Raw(), - optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s STEP %x %x null %x %x", "RX level-control:", stepMode, stepSize, optionsMask.Raw(), + optionsOverride.Raw()); } else { - emberAfLevelControlClusterPrintln("%s STEP %x %x %2x %x %x", "RX level-control:", stepMode, stepSize, - transitionTime.Value(), optionsMask.Raw(), optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s STEP %x %x %2x %x %x", "RX level-control:", stepMode, stepSize, transitionTime.Value(), + optionsMask.Raw(), optionsOverride.Raw()); } stepHandler(commandObj, commandPath, stepMode, stepSize, transitionTime, Optional>(optionsMask), @@ -598,13 +597,13 @@ bool emberAfLevelControlClusterStepWithOnOffCallback(app::CommandHandler * comma if (transitionTime.IsNull()) { - emberAfLevelControlClusterPrintln("%s STEP_WITH_ON_OFF %x %x null %x %x", "RX level-control:", stepMode, stepSize, - optionsMask.Raw(), optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s STEP_WITH_ON_OFF %x %x null %x %x", "RX level-control:", stepMode, stepSize, optionsMask.Raw(), + optionsOverride.Raw()); } else { - emberAfLevelControlClusterPrintln("%s STEP_WITH_ON_OFF %x %x %2x %x %x", "RX level-control:", stepMode, stepSize, - transitionTime.Value(), optionsMask.Raw(), optionsOverride.Raw()); + ChipLogProgress(Zcl, "%s STEP_WITH_ON_OFF %x %x %2x %x %x", "RX level-control:", stepMode, stepSize, transitionTime.Value(), + optionsMask.Raw(), optionsOverride.Raw()); } stepHandler(commandObj, commandPath, stepMode, stepSize, transitionTime, Optional>(optionsMask), @@ -618,7 +617,7 @@ bool emberAfLevelControlClusterStopCallback(app::CommandHandler * commandObj, co auto & optionsMask = commandData.optionsMask; auto & optionsOverride = commandData.optionsOverride; - emberAfLevelControlClusterPrintln("%s STOP", "RX level-control:"); + ChipLogProgress(Zcl, "%s STOP", "RX level-control:"); stopHandler(commandObj, commandPath, Optional>(optionsMask), Optional>(optionsOverride)); return true; @@ -629,7 +628,7 @@ bool emberAfLevelControlClusterStopWithOnOffCallback(app::CommandHandler * comma { auto & optionsMask = commandData.optionsMask; auto & optionsOverride = commandData.optionsOverride; - emberAfLevelControlClusterPrintln("%s STOP_WITH_ON_OFF", "RX level-control:"); + ChipLogProgress(Zcl, "%s STOP_WITH_ON_OFF", "RX level-control:"); stopHandler(commandObj, commandPath, Optional>(optionsMask), Optional>(optionsOverride)); return true; @@ -665,13 +664,13 @@ static Status moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8 EmberAfStatus status = Attributes::CurrentLevel::Get(endpoint, currentLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + ChipLogProgress(Zcl, "ERR: reading current level %x", status); return app::ToInteractionModelStatus(status); } if (currentLevel.IsNull()) { - emberAfLevelControlClusterPrintln("ERR: Current Level is null"); + ChipLogProgress(Zcl, "ERR: Current Level is null"); return Status::Failure; } @@ -730,7 +729,7 @@ static Status moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8 status = Attributes::OnOffTransitionTime::Get(endpoint, &onOffTransitionTime); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading on/off transition time %x", status); + ChipLogProgress(Zcl, "ERR: reading on/off transition time %x", status); return app::ToInteractionModelStatus(status); } @@ -758,7 +757,7 @@ static Status moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8 #else // Transition is not supported so always use fastest transition time and ignore // both the provided transition time as well as OnOffTransitionTime. - emberAfLevelControlClusterPrintln("Device does not support transition, ignoring transition time"); + ChipLogProgress(Zcl, "Device does not support transition, ignoring transition time"); state->transitionTimeMs = FASTEST_TRANSITION_TIME_MS; #endif // IGNORE_LEVEL_CONTROL_CLUSTER_TRANSITION @@ -816,13 +815,13 @@ static void moveHandler(app::CommandHandler * commandObj, const app::ConcreteCom status = app::ToInteractionModelStatus(Attributes::CurrentLevel::Get(endpoint, currentLevel)); if (status != Status::Success) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", to_underlying(status)); + ChipLogProgress(Zcl, "ERR: reading current level %x", to_underlying(status)); goto send_default_response; } if (currentLevel.IsNull()) { - emberAfLevelControlClusterPrintln("ERR: Current Level is null"); + ChipLogProgress(Zcl, "ERR: Current Level is null"); status = Status::Failure; goto send_default_response; @@ -875,7 +874,7 @@ static void moveHandler(app::CommandHandler * commandObj, const app::ConcreteCom status = app::ToInteractionModelStatus(Attributes::DefaultMoveRate::Get(endpoint, defaultMoveRate)); if (status != Status::Success || defaultMoveRate.IsNull()) { - emberAfLevelControlClusterPrintln("ERR: reading default move rate %x", to_underlying(status)); + ChipLogProgress(Zcl, "ERR: reading default move rate %x", to_underlying(status)); state->eventDurationMs = FASTEST_TRANSITION_TIME_MS; } else @@ -896,7 +895,7 @@ static void moveHandler(app::CommandHandler * commandObj, const app::ConcreteCom #else // Transition/rate is not supported so always use fastest transition time and ignore // both the provided transition time as well as OnOffTransitionTime. - emberAfLevelControlClusterPrintln("Device does not support transition, ignoring rate"); + ChipLogProgress(Zcl, "Device does not support transition, ignoring rate"); state->eventDurationMs = FASTEST_TRANSITION_TIME_MS; #endif // IGNORE_LEVEL_CONTROL_CLUSTER_TRANSITION @@ -947,13 +946,13 @@ static void stepHandler(app::CommandHandler * commandObj, const app::ConcreteCom status = app::ToInteractionModelStatus(Attributes::CurrentLevel::Get(endpoint, currentLevel)); if (status != Status::Success) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", to_underlying(status)); + ChipLogProgress(Zcl, "ERR: reading current level %x", to_underlying(status)); goto send_default_response; } if (currentLevel.IsNull()) { - emberAfLevelControlClusterPrintln("ERR: Current Level is null"); + ChipLogProgress(Zcl, "ERR: Current Level is null"); status = Status::Failure; goto send_default_response; @@ -1034,7 +1033,7 @@ static void stepHandler(app::CommandHandler * commandObj, const app::ConcreteCom #else // Transition is not supported so always use fastest transition time and ignore // both the provided transition time as well as OnOffTransitionTime. - emberAfLevelControlClusterPrintln("Device does not support transition, ignoring transition time"); + ChipLogProgress(Zcl, "Device does not support transition, ignoring transition time"); state->transitionTimeMs = FASTEST_TRANSITION_TIME_MS; #endif // IGNORE_LEVEL_CONTROL_CLUSTER_TRANSITION @@ -1102,7 +1101,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new EmberAfLevelControlState * state = getState(endpoint); if (state == nullptr) { - emberAfLevelControlClusterPrintln("ERR: Level control cluster not available on ep%d", endpoint); + ChipLogProgress(Zcl, "ERR: Level control cluster not available on ep%d", endpoint); return; } @@ -1112,13 +1111,13 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new status = Attributes::CurrentLevel::Get(endpoint, temporaryCurrentLevelCache); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + ChipLogProgress(Zcl, "ERR: reading current level %x", status); return; } if (temporaryCurrentLevelCache.IsNull()) { - emberAfLevelControlClusterPrintln("ERR: Current Level is null"); + ChipLogProgress(Zcl, "ERR: Current Level is null"); return; } @@ -1128,7 +1127,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new status = Attributes::OnLevel::Get(endpoint, resolvedLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading on level %x", status); + ChipLogProgress(Zcl, "ERR: reading on level %x", status); return; } @@ -1157,7 +1156,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new status = Attributes::OnOffTransitionTime::Get(endpoint, ¤tOnOffTransitionTime); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + ChipLogProgress(Zcl, "ERR: reading current level %x", status); return; } transitionTime.SetNonNull(currentOnOffTransitionTime); @@ -1177,7 +1176,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new status = Attributes::CurrentLevel::Set(endpoint, minimumLevelAllowedForTheDevice); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + ChipLogProgress(Zcl, "ERR: reading current level %x", status); return; } @@ -1213,7 +1212,7 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) if (state == nullptr) { - emberAfLevelControlClusterPrintln("ERR: Level control cluster not available on ep%d", endpoint); + ChipLogProgress(Zcl, "ERR: Level control cluster not available on ep%d", endpoint); return; } @@ -1310,7 +1309,7 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) void MatterLevelControlClusterServerShutdownCallback(EndpointId endpoint) { - emberAfLevelControlClusterPrintln("Shuting down level control server cluster on endpoint %d", endpoint); + ChipLogProgress(Zcl, "Shuting down level control server cluster on endpoint %d", endpoint); cancelEndpointTimerCallback(endpoint); } diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index 794662e7b7c1e8..2c9d88c1872737 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -98,7 +98,7 @@ CHIP_ERROR ModeSelectAttrAccess::Read(const ConcreteReadAttributePath & aPath, A bool emberAfModeSelectClusterChangeToModeCallback(CommandHandler * commandHandler, const ConcreteCommandPath & commandPath, const ModeSelect::Commands::ChangeToMode::DecodableType & commandData) { - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "ModeSelect: Entering emberAfModeSelectClusterChangeToModeCallback"); + ChipLogProgress(Zcl, "ModeSelect: Entering emberAfModeSelectClusterChangeToModeCallback"); EndpointId endpointId = commandPath.mEndpointId; uint8_t newMode = commandData.newMode; // Check that the newMode matches one of the supported options @@ -107,13 +107,13 @@ bool emberAfModeSelectClusterChangeToModeCallback(CommandHandler * commandHandle ModeSelect::getSupportedModesManager()->getModeOptionByMode(endpointId, newMode, &modeOptionPtr); if (Status::Success != checkSupportedModeStatus) { - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "ModeSelect: Failed to find the option with mode %u", newMode); + ChipLogProgress(Zcl, "ModeSelect: Failed to find the option with mode %u", newMode); commandHandler->AddStatus(commandPath, checkSupportedModeStatus); return true; } ModeSelect::Attributes::CurrentMode::Set(endpointId, newMode); - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "ModeSelect: ChangeToMode successful"); + ChipLogProgress(Zcl, "ModeSelect: ChangeToMode successful"); commandHandler->AddStatus(commandPath, Status::Success); return true; } @@ -155,7 +155,7 @@ void emberAfModeSelectClusterServerInitCallback(EndpointId endpointId) { if (onOffValueForStartUp && !onMode.IsNull()) { - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "ModeSelect: CurrentMode is overwritten by OnMode"); + ChipLogProgress(Zcl, "ModeSelect: CurrentMode is overwritten by OnMode"); return; } } @@ -173,7 +173,7 @@ void emberAfModeSelectClusterServerInitCallback(EndpointId endpointId) } if (bootReason == BootReasonType::kSoftwareUpdateCompleted) { - ChipLogDetail(Zcl, "ModeSelect: CurrentMode is ignored for OTA reboot"); + ChipLogProgress(Zcl, "ModeSelect: CurrentMode is ignored for OTA reboot"); return; } @@ -190,16 +190,14 @@ void emberAfModeSelectClusterServerInitCallback(EndpointId endpointId) } else { - emberAfPrintln(EMBER_AF_PRINT_DEBUG, "ModeSelect: Successfully initialized CurrentMode to %u", - startUpMode.Value()); + ChipLogProgress(Zcl, "ModeSelect: Successfully initialized CurrentMode to %u", startUpMode.Value()); } } } } else { - emberAfPrintln(EMBER_AF_PRINT_DEBUG, - "ModeSelect: Skipped initializing CurrentMode by StartUpMode because one of them is volatile"); + ChipLogProgress(Zcl, "ModeSelect: Skipped initializing CurrentMode by StartUpMode because one of them is volatile"); } } diff --git a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp index b42949eadbb298..a64c749ae3070b 100644 --- a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp +++ b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp @@ -75,11 +75,11 @@ void halOccupancyStateChangedCallback(EndpointId endpoint, HalOccupancyState occ if (occupancyState & HAL_OCCUPANCY_STATE_OCCUPIED) { mappedOccupancyState.Set(OccupancyBitmap::kOccupied); - emberAfOccupancySensingClusterPrintln("Occupancy detected"); + ChipLogProgress(Zcl, "Occupancy detected"); } else { - emberAfOccupancySensingClusterPrintln("Occupancy no longer detected"); + ChipLogProgress(Zcl, "Occupancy no longer detected"); } Attributes::Occupancy::Set(endpoint, occupancyState); diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index b13489f7308792..78be247dd256ed 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -94,7 +94,7 @@ void OnOffServer::cancelEndpointTimerCallback(EndpointId endpoint) void MatterOnOffClusterServerShutdownCallback(EndpointId endpoint) { - emberAfOnOffClusterPrintln("Shuting down on/off server cluster on endpoint %d", endpoint); + ChipLogProgress(Zcl, "Shuting down on/off server cluster on endpoint %d", endpoint); OnOffServer::Instance().cancelEndpointTimerCallback(endpoint); } @@ -122,10 +122,10 @@ EmberAfStatus OnOffServer::getOnOffValue(chip::EndpointId endpoint, bool * curre EmberAfStatus status = Attributes::OnOff::Get(endpoint, currentOnOffValue); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfOnOffClusterPrintln("ERR: reading on/off %x", status); + ChipLogProgress(Zcl, "ERR: reading on/off %x", status); } - emberAfOnOffClusterPrintln("On/Off ep%d value: %d", endpoint, *currentOnOffValue); + ChipLogProgress(Zcl, "On/Off ep%d value: %d", endpoint, *currentOnOffValue); return status; } @@ -160,21 +160,21 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman status = Attributes::OnOff::Get(endpoint, ¤tValue); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfOnOffClusterPrintln("ERR: reading on/off %x", status); + ChipLogProgress(Zcl, "ERR: reading on/off %x", status); return status; } // if the value is already what we want to set it to then do nothing if ((!currentValue && command == Commands::Off::Id) || (currentValue && command == Commands::On::Id)) { - emberAfOnOffClusterPrintln("Endpoint %x On/off already set to new value", endpoint); + ChipLogProgress(Zcl, "Endpoint %x On/off already set to new value", endpoint); return EMBER_ZCL_STATUS_SUCCESS; } // we either got a toggle, or an on when off, or an off when on, // so we need to swap the value newValue = !currentValue; - emberAfOnOffClusterPrintln("Toggle ep%x on/off from state %x to %x", endpoint, currentValue, newValue); + ChipLogProgress(Zcl, "Toggle ep%x on/off from state %x to %x", endpoint, currentValue, newValue); // the sequence of updating on/off attribute and kick off level change effect should // be depend on whether we are turning on or off. If we are turning on the light, we @@ -190,7 +190,7 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman if (onTime == 0) { - emberAfOnOffClusterPrintln("On Command - OffWaitTime : 0"); + ChipLogProgress(Zcl, "On Command - OffWaitTime : 0"); Attributes::OffWaitTime::Set(endpoint, 0); // Stop timer on the endpoint @@ -198,7 +198,7 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman if (event != nullptr) { cancelEndpointTimerCallback(event); - emberAfOnOffClusterPrintln("On/Toggle Command - Stop Timer"); + ChipLogProgress(Zcl, "On/Toggle Command - Stop Timer"); } } @@ -209,7 +209,7 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman status = Attributes::OnOff::Set(endpoint, newValue); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfOnOffClusterPrintln("ERR: writing on/off %x", status); + ChipLogProgress(Zcl, "ERR: writing on/off %x", status); return status; } @@ -229,7 +229,7 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman ModeSelect::Attributes::OnMode::TypeInfo::Type onMode; if (ModeSelect::Attributes::OnMode::Get(endpoint, onMode) == EMBER_ZCL_STATUS_SUCCESS && !onMode.IsNull()) { - emberAfOnOffClusterPrintln("Changing Current Mode to %x", onMode.Value()); + ChipLogProgress(Zcl, "Changing Current Mode to %x", onMode.Value()); status = ModeSelect::Attributes::CurrentMode::Set(endpoint, onMode.Value()); } } @@ -251,13 +251,13 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman status = Attributes::OnOff::Set(endpoint, newValue); if (status != EMBER_ZCL_STATUS_SUCCESS) { - emberAfOnOffClusterPrintln("ERR: writing on/off %x", status); + ChipLogProgress(Zcl, "ERR: writing on/off %x", status); return status; } if (SupportsLightingApplications(endpoint)) { - emberAfOnOffClusterPrintln("Off completed. reset OnTime to 0"); + ChipLogProgress(Zcl, "Off completed. reset OnTime to 0"); Attributes::OnTime::Set(endpoint, 0); // Reset onTime } } @@ -315,7 +315,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) ModeSelect::Attributes::OnMode::TypeInfo::Type onMode; if (ModeSelect::Attributes::OnMode::Get(endpoint, onMode) == EMBER_ZCL_STATUS_SUCCESS && !onMode.IsNull()) { - emberAfOnOffClusterPrintln("Changing Current Mode to %x", onMode.Value()); + ChipLogProgress(Zcl, "Changing Current Mode to %x", onMode.Value()); status = ModeSelect::Attributes::CurrentMode::Set(endpoint, onMode.Value()); } } @@ -555,7 +555,7 @@ bool OnOffServer::OnWithTimedOffCommand(app::CommandHandler * commandObj, const currentOffWaitTime = offWaitTime; } - emberAfOnOffClusterPrintln("On Time: %d | off wait Time: %d", currentOnTime, currentOffWaitTime); + ChipLogProgress(Zcl, "On Time: %d | off wait Time: %d", currentOnTime, currentOffWaitTime); if (currentOnTime < MAX_TIME_VALUE && currentOffWaitTime < MAX_TIME_VALUE) { @@ -575,7 +575,7 @@ bool OnOffServer::OnWithTimedOffCommand(app::CommandHandler * commandObj, const */ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) { - emberAfOnOffClusterPrintln("Timer callback - Entering callbackc"); + ChipLogProgress(Zcl, "Timer callback - Entering callbackc"); bool isOn = false; OnOff::Attributes::OnOff::Get(endpoint, &isOn); @@ -588,7 +588,7 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) // Update onTime values uint16_t onTime = MIN_TIME_VALUE; OnOff::Attributes::OnTime::Get(endpoint, &onTime); - emberAfOnOffClusterPrintln("Timer callback - On Time: %d", onTime); + ChipLogProgress(Zcl, "Timer callback - On Time: %d", onTime); if (onTime > 0) { @@ -598,7 +598,7 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) if (onTime == 0) { - emberAfOnOffClusterPrintln("Timer callback - Turning off OnOff"); + ChipLogProgress(Zcl, "Timer callback - Turning off OnOff"); OnOff::Attributes::OffWaitTime::Set(endpoint, 0); setOnOffValue(endpoint, Commands::Off::Id, false); @@ -616,7 +616,7 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) OnOff::Attributes::OffWaitTime::Set(endpoint, offWaitTime); } - emberAfOnOffClusterPrintln("Timer Callback - wait Off Time: %d", offWaitTime); + ChipLogProgress(Zcl, "Timer Callback - wait Off Time: %d", offWaitTime); // Validate if necessary to restart timer if (offWaitTime > 0) @@ -626,7 +626,7 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) } else { - emberAfOnOffClusterPrintln("Timer Callback - wait Off Time cycle finished"); + ChipLogProgress(Zcl, "Timer Callback - wait Off Time cycle finished"); // Stop timer on the endpoint cancelEndpointTimerCallback(getEventControl(endpoint)); diff --git a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp index cb369f6b2f23fd..4d9a88d3f8216c 100644 --- a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp +++ b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp @@ -246,14 +246,14 @@ bool HasFeature(EndpointId endpoint, Feature feature) void emberAfPumpConfigurationAndControlClusterServerInitCallback(EndpointId endpoint) { - emberAfDebugPrintln("Initialize PCC Server Cluster [EP:%d]", endpoint); + ChipLogProgress(Zcl, "Initialize PCC Server Cluster [EP:%d]", endpoint); } chip::Protocols::InteractionModel::Status MatterPumpConfigurationAndControlClusterServerPreAttributeChangedCallback( const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value) { - emberAfDebugPrintln("PCC Server Cluster Attribute Pre-changed [EP:%d, ID:0x%x]", attributePath.mEndpointId, - (unsigned int) attributePath.mAttributeId); + ChipLogProgress(Zcl, "PCC Server Cluster Attribute Pre-changed [EP:%d, ID:0x%x]", attributePath.mEndpointId, + (unsigned int) attributePath.mAttributeId); Protocols::InteractionModel::Status status = Protocols::InteractionModel::Status::Success; @@ -353,8 +353,8 @@ chip::Protocols::InteractionModel::Status MatterPumpConfigurationAndControlClust void MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback(const app::ConcreteAttributePath & attributePath) { - emberAfDebugPrintln("PCC Server Cluster Attribute changed [EP:%d, ID:0x%x]", attributePath.mEndpointId, - (unsigned int) attributePath.mAttributeId); + ChipLogProgress(Zcl, "PCC Server Cluster Attribute changed [EP:%d, ID:0x%x]", attributePath.mEndpointId, + (unsigned int) attributePath.mAttributeId); switch (attributePath.mAttributeId) { @@ -363,7 +363,7 @@ void MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback(cons setEffectiveModes(attributePath.mEndpointId); break; default: - emberAfDebugPrintln("PCC Server: unhandled attribute ID"); + ChipLogProgress(Zcl, "PCC Server: unhandled attribute ID"); } } diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index 5a08107bed7f35..2bdd972cd634f7 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -152,14 +152,13 @@ Type TypeGet(chip::EndpointId endpoint) void ConfigStatusPrint(const chip::BitMask & configStatus) { - emberAfWindowCoveringClusterPrint("ConfigStatus 0x%02X Operational=%u OnlineReserved=%u", configStatus.Raw(), - configStatus.Has(ConfigStatus::kOperational), - configStatus.Has(ConfigStatus::kOnlineReserved)); + ChipLogProgress(Zcl, "ConfigStatus 0x%02X Operational=%u OnlineReserved=%u", configStatus.Raw(), + configStatus.Has(ConfigStatus::kOperational), configStatus.Has(ConfigStatus::kOnlineReserved)); - emberAfWindowCoveringClusterPrint( - "Lift(PA=%u Encoder=%u Reversed=%u) Tilt(PA=%u Encoder=%u)", configStatus.Has(ConfigStatus::kLiftPositionAware), - configStatus.Has(ConfigStatus::kLiftEncoderControlled), configStatus.Has(ConfigStatus::kLiftMovementReversed), - configStatus.Has(ConfigStatus::kTiltPositionAware), configStatus.Has(ConfigStatus::kTiltEncoderControlled)); + ChipLogProgress(Zcl, "Lift(PA=%u Encoder=%u Reversed=%u) Tilt(PA=%u Encoder=%u)", + configStatus.Has(ConfigStatus::kLiftPositionAware), configStatus.Has(ConfigStatus::kLiftEncoderControlled), + configStatus.Has(ConfigStatus::kLiftMovementReversed), configStatus.Has(ConfigStatus::kTiltPositionAware), + configStatus.Has(ConfigStatus::kTiltEncoderControlled)); } void ConfigStatusSet(chip::EndpointId endpoint, const chip::BitMask & configStatus) @@ -193,9 +192,9 @@ void ConfigStatusUpdateFeatures(chip::EndpointId endpoint) void OperationalStatusPrint(const chip::BitMask & opStatus) { - emberAfWindowCoveringClusterPrint("OperationalStatus raw=0x%02X global=%u lift=%u tilt=%u", opStatus.Raw(), - opStatus.GetField(OperationalStatus::kGlobal), opStatus.GetField(OperationalStatus::kLift), - opStatus.GetField(OperationalStatus::kTilt)); + ChipLogProgress(Zcl, "OperationalStatus raw=0x%02X global=%u lift=%u tilt=%u", opStatus.Raw(), + opStatus.GetField(OperationalStatus::kGlobal), opStatus.GetField(OperationalStatus::kLift), + opStatus.GetField(OperationalStatus::kTilt)); } chip::BitMask OperationalStatusGet(chip::EndpointId endpoint) @@ -264,9 +263,9 @@ EndProductType EndProductTypeGet(chip::EndpointId endpoint) void ModePrint(const chip::BitMask & mode) { - emberAfWindowCoveringClusterPrint("Mode 0x%02X MotorDirReversed=%u LedFeedback=%u Maintenance=%u Calibration=%u", mode.Raw(), - mode.Has(Mode::kMotorDirectionReversed), mode.Has(Mode::kLedFeedback), - mode.Has(Mode::kMaintenanceMode), mode.Has(Mode::kCalibrationMode)); + ChipLogProgress(Zcl, "Mode 0x%02X MotorDirReversed=%u LedFeedback=%u Maintenance=%u Calibration=%u", mode.Raw(), + mode.Has(Mode::kMotorDirectionReversed), mode.Has(Mode::kLedFeedback), mode.Has(Mode::kMaintenanceMode), + mode.Has(Mode::kCalibrationMode)); } void ModeSet(chip::EndpointId endpoint, chip::BitMask & newMode) @@ -391,13 +390,13 @@ void LiftPositionSet(chip::EndpointId endpoint, NPercent100ths percent100ths) { percent.SetNull(); rawpos.SetNull(); - emberAfWindowCoveringClusterPrint("Lift[%u] Position Set to Null", endpoint); + ChipLogProgress(Zcl, "Lift[%u] Position Set to Null", endpoint); } else { percent.SetNonNull(static_cast(percent100ths.Value() / 100)); rawpos.SetNonNull(Percent100thsToLift(endpoint, percent100ths.Value())); - emberAfWindowCoveringClusterPrint("Lift[%u] Position Set: %u", endpoint, percent100ths.Value()); + ChipLogProgress(Zcl, "Lift[%u] Position Set: %u", endpoint, percent100ths.Value()); } Attributes::CurrentPositionLift::Set(endpoint, rawpos); Attributes::CurrentPositionLiftPercentage::Set(endpoint, percent); @@ -437,13 +436,13 @@ void TiltPositionSet(chip::EndpointId endpoint, NPercent100ths percent100ths) { percent.SetNull(); rawpos.SetNull(); - emberAfWindowCoveringClusterPrint("Tilt[%u] Position Set to Null", endpoint); + ChipLogProgress(Zcl, "Tilt[%u] Position Set to Null", endpoint); } else { percent.SetNonNull(static_cast(percent100ths.Value() / 100)); rawpos.SetNonNull(Percent100thsToTilt(endpoint, percent100ths.Value())); - emberAfWindowCoveringClusterPrint("Tilt[%u] Position Set: %u", endpoint, percent100ths.Value()); + ChipLogProgress(Zcl, "Tilt[%u] Position Set: %u", endpoint, percent100ths.Value()); } Attributes::CurrentPositionTilt::Set(endpoint, rawpos); Attributes::CurrentPositionTiltPercentage::Set(endpoint, percent); @@ -515,7 +514,7 @@ void PostAttributeChange(chip::EndpointId endpoint, chip::AttributeId attributeI BitMask configStatus; NPercent100ths current, target; - emberAfWindowCoveringClusterPrint("WC POST ATTRIBUTE=%u", (unsigned int) attributeId); + ChipLogProgress(Zcl, "WC POST ATTRIBUTE=%u", (unsigned int) attributeId); OperationalState opLift = OperationalStateGet(endpoint, OperationalStatus::kLift); OperationalState opTilt = OperationalStateGet(endpoint, OperationalStatus::kTilt); @@ -528,7 +527,7 @@ void PostAttributeChange(chip::EndpointId endpoint, chip::AttributeId attributeI Attributes::CurrentPositionLiftPercent100ths::Get(endpoint, current); if ((OperationalState::Stall != opLift) && (current == target)) { - emberAfWindowCoveringClusterPrint("Lift stop"); + ChipLogProgress(Zcl, "Lift stop"); OperationalStateSet(endpoint, OperationalStatus::kLift, OperationalState::Stall); } break; @@ -537,7 +536,7 @@ void PostAttributeChange(chip::EndpointId endpoint, chip::AttributeId attributeI Attributes::CurrentPositionTiltPercent100ths::Get(endpoint, current); if ((OperationalState::Stall != opTilt) && (current == target)) { - emberAfWindowCoveringClusterPrint("Tilt stop"); + ChipLogProgress(Zcl, "Tilt stop"); OperationalStateSet(endpoint, OperationalStatus::kTilt, OperationalState::Stall); } break; @@ -606,7 +605,7 @@ void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate) } else { - emberAfWindowCoveringClusterPrint("Failed to set WindowCovering delegate for endpoint:%u", endpoint); + ChipLogProgress(Zcl, "Failed to set WindowCovering delegate for endpoint:%u", endpoint); } } @@ -627,12 +626,12 @@ bool emberAfWindowCoveringClusterUpOrOpenCallback(app::CommandHandler * commandO { EndpointId endpoint = commandPath.mEndpointId; - emberAfWindowCoveringClusterPrint("UpOrOpen command received"); + ChipLogProgress(Zcl, "UpOrOpen command received"); Status status = GetMotionLockStatus(endpoint); if (Status::Success != status) { - emberAfWindowCoveringClusterPrint("Err device locked"); + ChipLogProgress(Zcl, "Err device locked"); commandObj->AddStatus(commandPath, status); return true; } @@ -661,7 +660,7 @@ bool emberAfWindowCoveringClusterUpOrOpenCallback(app::CommandHandler * commandO } else { - emberAfWindowCoveringClusterPrint("WindowCovering has no delegate set for endpoint:%u", endpoint); + ChipLogProgress(Zcl, "WindowCovering has no delegate set for endpoint:%u", endpoint); } commandObj->AddStatus(commandPath, Status::Success); @@ -677,12 +676,12 @@ bool emberAfWindowCoveringClusterDownOrCloseCallback(app::CommandHandler * comma { EndpointId endpoint = commandPath.mEndpointId; - emberAfWindowCoveringClusterPrint("DownOrClose command received"); + ChipLogProgress(Zcl, "DownOrClose command received"); Status status = GetMotionLockStatus(endpoint); if (Status::Success != status) { - emberAfWindowCoveringClusterPrint("Err device locked"); + ChipLogProgress(Zcl, "Err device locked"); commandObj->AddStatus(commandPath, status); return true; } @@ -712,7 +711,7 @@ bool emberAfWindowCoveringClusterDownOrCloseCallback(app::CommandHandler * comma } else { - emberAfWindowCoveringClusterPrint("WindowCovering has no delegate set for endpoint:%u", endpoint); + ChipLogProgress(Zcl, "WindowCovering has no delegate set for endpoint:%u", endpoint); } return true; @@ -727,12 +726,12 @@ bool emberAfWindowCoveringClusterStopMotionCallback(app::CommandHandler * comman app::DataModel::Nullable current; chip::EndpointId endpoint = commandPath.mEndpointId; - emberAfWindowCoveringClusterPrint("StopMotion command received"); + ChipLogProgress(Zcl, "StopMotion command received"); Status status = GetMotionLockStatus(endpoint); if (Status::Success != status) { - emberAfWindowCoveringClusterPrint("Err device locked"); + ChipLogProgress(Zcl, "Err device locked"); commandObj->AddStatus(commandPath, status); return true; } @@ -754,7 +753,7 @@ bool emberAfWindowCoveringClusterStopMotionCallback(app::CommandHandler * comman } else { - emberAfWindowCoveringClusterPrint("WindowCovering has no delegate set for endpoint:%u", endpoint); + ChipLogProgress(Zcl, "WindowCovering has no delegate set for endpoint:%u", endpoint); } if (changeTarget) @@ -786,12 +785,12 @@ bool emberAfWindowCoveringClusterGoToLiftValueCallback(app::CommandHandler * com EndpointId endpoint = commandPath.mEndpointId; - emberAfWindowCoveringClusterPrint("GoToLiftValue %u command received", liftValue); + ChipLogProgress(Zcl, "GoToLiftValue %u command received", liftValue); Status status = GetMotionLockStatus(endpoint); if (Status::Success != status) { - emberAfWindowCoveringClusterPrint("Err device locked"); + ChipLogProgress(Zcl, "Err device locked"); commandObj->AddStatus(commandPath, status); return true; } @@ -806,13 +805,13 @@ bool emberAfWindowCoveringClusterGoToLiftValueCallback(app::CommandHandler * com } else { - emberAfWindowCoveringClusterPrint("WindowCovering has no delegate set for endpoint:%u", endpoint); + ChipLogProgress(Zcl, "WindowCovering has no delegate set for endpoint:%u", endpoint); } commandObj->AddStatus(commandPath, Status::Success); } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA LF"); + ChipLogProgress(Zcl, "Err Device is not PA LF"); commandObj->AddStatus(commandPath, Status::Failure); } return true; @@ -828,12 +827,12 @@ bool emberAfWindowCoveringClusterGoToLiftPercentageCallback(app::CommandHandler Percent100ths percent100ths = commandData.liftPercent100thsValue; EndpointId endpoint = commandPath.mEndpointId; - emberAfWindowCoveringClusterPrint("GoToLiftPercentage %u command received", percent100ths); + ChipLogProgress(Zcl, "GoToLiftPercentage %u command received", percent100ths); Status status = GetMotionLockStatus(endpoint); if (Status::Success != status) { - emberAfWindowCoveringClusterPrint("Err device locked"); + ChipLogProgress(Zcl, "Err device locked"); commandObj->AddStatus(commandPath, status); return true; } @@ -850,7 +849,7 @@ bool emberAfWindowCoveringClusterGoToLiftPercentageCallback(app::CommandHandler } else { - emberAfWindowCoveringClusterPrint("WindowCovering has no delegate set for endpoint:%u", endpoint); + ChipLogProgress(Zcl, "WindowCovering has no delegate set for endpoint:%u", endpoint); } commandObj->AddStatus(commandPath, Status::Success); } @@ -861,7 +860,7 @@ bool emberAfWindowCoveringClusterGoToLiftPercentageCallback(app::CommandHandler } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA LF"); + ChipLogProgress(Zcl, "Err Device is not PA LF"); commandObj->AddStatus(commandPath, Status::Failure); } return true; @@ -878,12 +877,12 @@ bool emberAfWindowCoveringClusterGoToTiltValueCallback(app::CommandHandler * com EndpointId endpoint = commandPath.mEndpointId; - emberAfWindowCoveringClusterPrint("GoToTiltValue %u command received", tiltValue); + ChipLogProgress(Zcl, "GoToTiltValue %u command received", tiltValue); Status status = GetMotionLockStatus(endpoint); if (Status::Success != status) { - emberAfWindowCoveringClusterPrint("Err device locked"); + ChipLogProgress(Zcl, "Err device locked"); commandObj->AddStatus(commandPath, status); return true; } @@ -898,13 +897,13 @@ bool emberAfWindowCoveringClusterGoToTiltValueCallback(app::CommandHandler * com } else { - emberAfWindowCoveringClusterPrint("WindowCovering has no delegate set for endpoint:%u", endpoint); + ChipLogProgress(Zcl, "WindowCovering has no delegate set for endpoint:%u", endpoint); } commandObj->AddStatus(commandPath, Status::Success); } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA TL"); + ChipLogProgress(Zcl, "Err Device is not PA TL"); commandObj->AddStatus(commandPath, Status::Failure); } return true; @@ -920,12 +919,12 @@ bool emberAfWindowCoveringClusterGoToTiltPercentageCallback(app::CommandHandler Percent100ths percent100ths = commandData.tiltPercent100thsValue; EndpointId endpoint = commandPath.mEndpointId; - emberAfWindowCoveringClusterPrint("GoToTiltPercentage %u command received", percent100ths); + ChipLogProgress(Zcl, "GoToTiltPercentage %u command received", percent100ths); Status status = GetMotionLockStatus(endpoint); if (Status::Success != status) { - emberAfWindowCoveringClusterPrint("Err device locked"); + ChipLogProgress(Zcl, "Err device locked"); commandObj->AddStatus(commandPath, status); return true; } @@ -942,7 +941,7 @@ bool emberAfWindowCoveringClusterGoToTiltPercentageCallback(app::CommandHandler } else { - emberAfWindowCoveringClusterPrint("WindowCovering has no delegate set for endpoint:%u", endpoint); + ChipLogProgress(Zcl, "WindowCovering has no delegate set for endpoint:%u", endpoint); } commandObj->AddStatus(commandPath, Status::Success); } @@ -953,7 +952,7 @@ bool emberAfWindowCoveringClusterGoToTiltPercentageCallback(app::CommandHandler } else { - emberAfWindowCoveringClusterPrint("Err Device is not PA TL"); + ChipLogProgress(Zcl, "Err Device is not PA TL"); commandObj->AddStatus(commandPath, Status::Failure); } return true; diff --git a/src/app/util/af.h b/src/app/util/af.h index 465f9f86cc0c2d..76bf8b4da08855 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -35,9 +35,6 @@ #include -#include -#include - #include #include #include diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index da60ecd8f34d45..89806abba798a3 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -74,84 +74,6 @@ EmberAfStatus emberAfReadAttribute(EndpointId endpoint, ClusterId cluster, Attri return emAfReadAttribute(endpoint, cluster, attributeID, dataPtr, readLength, nullptr); } -static void emberAfAttributeDecodeAndPrintCluster(ClusterId cluster) -{ -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ATTRIBUTES) - uint16_t index = emberAfFindClusterNameIndex(cluster); - if (index != 0xFFFF) - { - emberAfAttributesPrintln("(%p)", zclClusterNames[index].name); - } - emberAfAttributesFlush(); -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ATTRIBUTES) -} - -void emberAfPrintAttributeTable() -{ - uint8_t data[ATTRIBUTE_LARGEST]; - decltype(emberAfEndpointCount()) endpointIndex; - decltype(EmberAfEndpointType::clusterCount) clusterIndex; - uint16_t attributeIndex; - EmberAfStatus status; - for (endpointIndex = 0; endpointIndex < emberAfEndpointCount(); endpointIndex++) - { - EmberAfDefinedEndpoint * ep = &(emAfEndpoints[endpointIndex]); - emberAfAttributesPrintln("ENDPOINT %x", ep->endpoint); - emberAfAttributesPrintln("clus / attr / mfg /type(len)/ rw / storage / data (raw)"); - emberAfAttributesFlush(); - for (clusterIndex = 0; clusterIndex < ep->endpointType->clusterCount; clusterIndex++) - { - const EmberAfCluster * cluster = &(ep->endpointType->cluster[clusterIndex]); - - for (attributeIndex = 0; attributeIndex < cluster->attributeCount; attributeIndex++) - { - const EmberAfAttributeMetadata * metaData = &(cluster->attributes[attributeIndex]); - - // Depending on user config, this loop can take a very long time to - // run and watchdog reset will kick in. As a workaround, we'll - // manually reset the watchdog. - // halResetWatchdog(); - - emberAfAttributesPrint(ChipLogFormatMEI " / " ChipLogFormatMEI " / ", ChipLogValueMEI(cluster->clusterId), - ChipLogValueMEI(metaData->attributeId)); - emberAfAttributesPrint("----"); - emberAfAttributesPrint( - " / %x (%x) / %p / %p / ", metaData->attributeType, emberAfAttributeSize(metaData), - (metaData->IsReadOnly() ? "RO" : "RW"), - (metaData->IsAutomaticallyPersisted() ? " nonvolatile " : (metaData->IsExternal() ? " extern " : " RAM "))); - emberAfAttributesFlush(); - status = - emAfReadAttribute(ep->endpoint, cluster->clusterId, metaData->attributeId, data, ATTRIBUTE_LARGEST, nullptr); - if (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) - { - emberAfAttributesPrintln("Unsupported"); - } - else - { - uint16_t length; - if (emberAfIsStringAttributeType(metaData->attributeType)) - { - length = static_cast(emberAfStringLength(data) + 1); - } - else if (emberAfIsLongStringAttributeType(metaData->attributeType)) - { - length = static_cast(emberAfLongStringLength(data) + 2); - } - else - { - length = emberAfAttributeSize(metaData); - } - UNUSED_VAR(length); - emberAfAttributesPrintBuffer(data, length, true); - emberAfAttributesFlush(); - emberAfAttributeDecodeAndPrintCluster(cluster->clusterId); - } - } - } - emberAfAttributesFlush(); - } -} - //------------------------------------------------------------------------------ // Internal Functions @@ -249,9 +171,8 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu // if we dont support that attribute if (metadata == nullptr) { - emberAfAttributesPrintln("%pep %x clus " ChipLogFormatMEI " attr " ChipLogFormatMEI " not supported", - "WRITE ERR: ", endpoint, ChipLogValueMEI(cluster), ChipLogValueMEI(attributeID)); - emberAfAttributesFlush(); + ChipLogProgress(Zcl, "%pep %x clus " ChipLogFormatMEI " attr " ChipLogFormatMEI " not supported", "WRITE ERR: ", endpoint, + ChipLogValueMEI(cluster), ChipLogValueMEI(attributeID)); return status; } @@ -260,15 +181,13 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu { if (dataType != metadata->attributeType) { - emberAfAttributesPrintln("%pinvalid data type", "WRITE ERR: "); - emberAfAttributesFlush(); + ChipLogProgress(Zcl, "%pinvalid data type", "WRITE ERR: "); return EMBER_ZCL_STATUS_INVALID_DATA_TYPE; } if (metadata->IsReadOnly()) { - emberAfAttributesPrintln("%pattr not writable", "WRITE ERR: "); - emberAfAttributesFlush(); + ChipLogProgress(Zcl, "%pattr not writable", "WRITE ERR: "); return EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; } } @@ -375,8 +294,7 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu // bug: 11618, we are not handling properly external attributes // in this case... We need to do something. We don't really // know if it will succeed. - emberAfAttributesPrintln("WRITE: no write, just a test"); - emberAfAttributesFlush(); + ChipLogProgress(Zcl, "WRITE: no write, just a test"); } return EMBER_ZCL_STATUS_SUCCESS; @@ -409,8 +327,7 @@ EmberAfStatus emAfReadAttribute(EndpointId endpoint, ClusterId cluster, Attribut { // failed, print debug info if (status == EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED) { - emberAfAttributesPrintln("READ: attribute size too large for caller"); - emberAfAttributesFlush(); + ChipLogProgress(Zcl, "READ: attribute size too large for caller"); } } diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index 5cc2a3d9aa6ecd..bc46ddd467df05 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -25,8 +25,6 @@ EmberAfStatus emberAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType); -void emberAfPrintAttributeTable(void); - EmberAfStatus emAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * data, EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType, bool justTest); diff --git a/src/app/util/debug-printing-test.h b/src/app/util/debug-printing-test.h deleted file mode 100644 index da6ab7f90688c6..00000000000000 --- a/src/app/util/debug-printing-test.h +++ /dev/null @@ -1,188 +0,0 @@ -/** - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by Simplicity Studio. Please do not edit manually. -// -// - -// This is the test header, that enables all printing -// Enclosing macro to prevent multiple inclusion - -#pragma once - -#define EMBER_AF_PRINT_ENABLE -#define EMBER_AF_PRINT_BASIC_CLUSTER 0x0001 -#define EMBER_AF_PRINT_POWER_CONFIG_CLUSTER 0x0002 -#define EMBER_AF_PRINT_DEVICE_TEMP_CLUSTER 0x0004 -#define EMBER_AF_PRINT_IDENTIFY_CLUSTER 0x0008 -#define EMBER_AF_PRINT_GROUPS_CLUSTER 0x0010 -#define EMBER_AF_PRINT_SCENES_CLUSTER 0x0020 -#define EMBER_AF_PRINT_ON_OFF_CLUSTER 0x0040 -#define EMBER_AF_PRINT_ON_OFF_SWITCH_CONFIGURATION_CLUSTER 0x0080 -#define EMBER_AF_PRINT_LEVEL_CONTROL_CLUSTER 0x0101 -#define EMBER_AF_PRINT_ALARM_CLUSTER 0x0102 -#define EMBER_AF_PRINT_TIME_CLUSTER 0x0104 -#define EMBER_AF_PRINT_RSSI_LOCATION_CLUSTER 0x0108 -#define EMBER_AF_PRINT_BINARY_INPUT_BASIC_CLUSTER 0x0110 -#define EMBER_AF_PRINT_COMMISSIONING_CLUSTER 0x0120 -#define EMBER_AF_PRINT_PARTITION_CLUSTER 0x0140 -#define EMBER_AF_PRINT_OTA_BOOTLOAD_CLUSTER 0x0180 -#define EMBER_AF_PRINT_POWER_PROFILE_CLUSTER 0x0201 -#define EMBER_AF_PRINT_APPLIANCE_CONTROL_CLUSTER 0x0202 -#define EMBER_AF_PRINT_POLL_CONTROL_CLUSTER 0x0204 -#define EMBER_AF_PRINT_GREEN_POWER_CLUSTER 0x0208 -#define EMBER_AF_PRINT_KEEPALIVE_CLUSTER 0x0210 -#define EMBER_AF_PRINT_SHADE_CONFIG_CLUSTER 0x0220 -#define EMBER_AF_PRINT_DOOR_LOCK_CLUSTER 0x0240 -#define EMBER_AF_PRINT_WINDOW_COVERING_CLUSTER 0x0280 -#define EMBER_AF_PRINT_BARRIER_CONTROL_CLUSTER 0x0301 -#define EMBER_AF_PRINT_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER 0x0302 -#define EMBER_AF_PRINT_THERMOSTAT_CLUSTER 0x0304 -#define EMBER_AF_PRINT_FAN_CONTROL_CLUSTER 0x0308 -#define EMBER_AF_PRINT_DEHUMID_CONTROL_CLUSTER 0x0310 -#define EMBER_AF_PRINT_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER 0x0320 -#define EMBER_AF_PRINT_COLOR_CONTROL_CLUSTER 0x0340 -#define EMBER_AF_PRINT_BALLAST_CONFIGURATION_CLUSTER 0x0380 -#define EMBER_AF_PRINT_ILLUM_MEASUREMENT_CLUSTER 0x0401 -#define EMBER_AF_PRINT_ILLUM_LEVEL_SENSING_CLUSTER 0x0402 -#define EMBER_AF_PRINT_TEMPERATURE_MEASUREMENT_CLUSTER 0x0404 -#define EMBER_AF_PRINT_PRESSURE_MEASUREMENT_CLUSTER 0x0408 -#define EMBER_AF_PRINT_FLOW_MEASUREMENT_CLUSTER 0x0410 -#define EMBER_AF_PRINT_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER 0x0420 -#define EMBER_AF_PRINT_OCCUPANCY_SENSING_CLUSTER 0x0440 -#define EMBER_AF_PRINT_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0480 -#define EMBER_AF_PRINT_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0501 -#define EMBER_AF_PRINT_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0502 -#define EMBER_AF_PRINT_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0504 -#define EMBER_AF_PRINT_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER 0x0508 -#define EMBER_AF_PRINT_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0510 -#define EMBER_AF_PRINT_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0520 -#define EMBER_AF_PRINT_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0540 -#define EMBER_AF_PRINT_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER 0x0580 -#define EMBER_AF_PRINT_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0601 -#define EMBER_AF_PRINT_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0602 -#define EMBER_AF_PRINT_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER 0x0604 -#define EMBER_AF_PRINT_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0608 -#define EMBER_AF_PRINT_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER 0x0610 -#define EMBER_AF_PRINT_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0620 -#define EMBER_AF_PRINT_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER 0x0640 -#define EMBER_AF_PRINT_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0680 -#define EMBER_AF_PRINT_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER 0x0701 -#define EMBER_AF_PRINT_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER 0x0702 -#define EMBER_AF_PRINT_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER 0x0704 -#define EMBER_AF_PRINT_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER 0x0708 -#define EMBER_AF_PRINT_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER 0x0710 -#define EMBER_AF_PRINT_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER 0x0720 -#define EMBER_AF_PRINT_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0740 -#define EMBER_AF_PRINT_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0780 -#define EMBER_AF_PRINT_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0801 -#define EMBER_AF_PRINT_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER 0x0802 -#define EMBER_AF_PRINT_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER 0x0804 -#define EMBER_AF_PRINT_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER 0x0808 -#define EMBER_AF_PRINT_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER 0x0810 -#define EMBER_AF_PRINT_IAS_ZONE_CLUSTER 0x0820 -#define EMBER_AF_PRINT_IAS_ACE_CLUSTER 0x0840 -#define EMBER_AF_PRINT_IAS_WD_CLUSTER 0x0880 -#define EMBER_AF_PRINT_GENERIC_TUNNEL_CLUSTER 0x0901 -#define EMBER_AF_PRINT_BACNET_PROTOCOL_TUNNEL_CLUSTER 0x0902 -#define EMBER_AF_PRINT_11073_PROTOCOL_TUNNEL_CLUSTER 0x0904 -#define EMBER_AF_PRINT_ISO7816_PROTOCOL_TUNNEL_CLUSTER 0x0908 -#define EMBER_AF_PRINT_PRICE_CLUSTER 0x0910 -#define EMBER_AF_PRINT_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER 0x0920 -#define EMBER_AF_PRINT_SIMPLE_METERING_CLUSTER 0x0940 -#define EMBER_AF_PRINT_MESSAGING_CLUSTER 0x0980 -#define EMBER_AF_PRINT_TUNNELING_CLUSTER 0x0A01 -#define EMBER_AF_PRINT_PREPAYMENT_CLUSTER 0x0A02 -#define EMBER_AF_PRINT_ENERGY_MANAGEMENT_CLUSTER 0x0A04 -#define EMBER_AF_PRINT_CALENDAR_CLUSTER 0x0A08 -#define EMBER_AF_PRINT_DEVICE_MANAGEMENT_CLUSTER 0x0A10 -#define EMBER_AF_PRINT_EVENTS_CLUSTER 0x0A20 -#define EMBER_AF_PRINT_MDU_PAIRING_CLUSTER 0x0A40 -#define EMBER_AF_PRINT_SUB_GHZ_CLUSTER 0x0A80 -#define EMBER_AF_PRINT_KEY_ESTABLISHMENT_CLUSTER 0x0B01 -#define EMBER_AF_PRINT_INFORMATION_CLUSTER 0x0B02 -#define EMBER_AF_PRINT_DATA_SHARING_CLUSTER 0x0B04 -#define EMBER_AF_PRINT_GAMING_CLUSTER 0x0B08 -#define EMBER_AF_PRINT_DATA_RATE_CONTROL_CLUSTER 0x0B10 -#define EMBER_AF_PRINT_VOICE_OVER_ZIGBEE_CLUSTER 0x0B20 -#define EMBER_AF_PRINT_CHATTING_CLUSTER 0x0B40 -#define EMBER_AF_PRINT_PAYMENT_CLUSTER 0x0B80 -#define EMBER_AF_PRINT_BILLING_CLUSTER 0x0C01 -#define EMBER_AF_PRINT_APPLIANCE_IDENTIFICATION_CLUSTER 0x0C02 -#define EMBER_AF_PRINT_METER_IDENTIFICATION_CLUSTER 0x0C04 -#define EMBER_AF_PRINT_APPLIANCE_EVENTS_AND_ALERT_CLUSTER 0x0C08 -#define EMBER_AF_PRINT_APPLIANCE_STATISTICS_CLUSTER 0x0C10 -#define EMBER_AF_PRINT_ELECTRICAL_MEASUREMENT_CLUSTER 0x0C20 -#define EMBER_AF_PRINT_DIAGNOSTICS_CLUSTER 0x0C40 -#define EMBER_AF_PRINT_ZLL_COMMISSIONING_CLUSTER 0x0C80 -#define EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER 0x0D01 -#define EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER_2 0x0D02 -#define EMBER_AF_PRINT_OTA_CONFIGURATION_CLUSTER 0x0D04 -#define EMBER_AF_PRINT_MFGLIB_CLUSTER 0x0D08 -#define EMBER_AF_PRINT_SL_WWAH_CLUSTER 0x0D10 -#define EMBER_AF_PRINT_CORE 0x0D20 -#define EMBER_AF_PRINT_DEBUG 0x0D40 -#define EMBER_AF_PRINT_APP 0x0D80 -#define EMBER_AF_PRINT_SECURITY 0x0E01 -#define EMBER_AF_PRINT_ATTRIBUTES 0x0E02 -#define EMBER_AF_PRINT_REGISTRATION 0x0E10 -#define EMBER_AF_PRINT_ZDO 0x0E20 -#define EMBER_AF_PRINT_CUSTOM1 0x0E40 -#define EMBER_AF_PRINT_CUSTOM2 0x0E80 -#define EMBER_AF_PRINT_CUSTOM3 0x0F01 - -#define EMBER_AF_PRINT_OUTPUT 1 - -#define EMBER_AF_PRINT_NAMES \ - { \ - "Basic Information", "Power Configuration", "Device Temperature Configuration", "Identify", "Groups", "Scenes", "On/off", \ - "On/off Switch Configuration", "Level Control", "Alarms", "Time", "RSSI Location", "Binary Input (Basic)", \ - "Commissioning", "Partition", "Over the Air Bootloading", "Power Profile", "Appliance Control", "Poll Control", \ - "Green Power", "Keep-Alive", "Shade Configuration", "Door Lock", "Window Covering", "Barrier Control", \ - "Pump Configuration and Control", "Thermostat", "Fan Control", "Dehumidification Control", \ - "Thermostat User Interface Configuration", "Color Control", "Ballast Configuration", "Illuminance Measurement", \ - "Illuminance Level Sensing", "Temperature Measurement", "Pressure Measurement", "Flow Measurement", \ - "Relative Humidity Measurement", "Occupancy Sensing", "Carbon Monoxide Concentration Measurement", \ - "Carbon Dioxide Concentration Measurement", "Ethylene Concentration Measurement", \ - "Ethylene Oxide Concentration Measurement", "Hydrogen Concentration Measurement", \ - "Hydrogen Sulphide Concentration Measurement", "Nitric Oxide Concentration Measurement", \ - "Nitrogen Dioxide Concentration Measurement", "Oxygen Concentration Measurement", "Ozone Concentration Measurement", \ - "Sulfur Dioxide Concentration Measurement", "Dissolved Oxygen Concentration Measurement", \ - "Bromate Concentration Measurement", "Chloramines Concentration Measurement", "Chlorine Concentration Measurement", \ - "Fecal coliform and E. Coli Concentration Measurement", "Fluoride Concentration Measurement", \ - "Haloacetic Acids Concentration Measurement", "Total Trihalomethanes Concentration Measurement", \ - "Total Coliform Bacteria Concentration Measurement", "Turbidity Concentration Measurement", \ - "Copper Concentration Measurement", "Lead Concentration Measurement", "Manganese Concentration Measurement", \ - "Sulfate Concentration Measurement", "Bromodichloromethane Concentration Measurement", \ - "Bromoform Concentration Measurement", "Chlorodibromomethane Concentration Measurement", \ - "Chloroform Concentration Measurement", "Sodium Concentration Measurement", "IAS Zone", "IAS ACE", "IAS WD", \ - "Generic Tunnel", "BACnet Protocol Tunnel", "11073 Protocol Tunnel", "ISO 7816 Protocol Tunnel", "Price", \ - "Demand Response and Load Control", "Simple Metering", "Messaging", "Tunneling", "Prepayment", "Energy Management", \ - "Calendar", "Device Management", "Events", "MDU Pairing", "Sub-GHz", "Key Establishment", "Information", \ - "Data Sharing", "Gaming", "Data Rate Control", "Voice over ZigBee", "Chatting", "Payment", "Billing", \ - "Appliance Identification", "Meter Identification", "Appliance Events and Alert", "Appliance Statistics", \ - "Electrical Measurement", "Diagnostics", "ZLL Commissioning", "Sample Mfg Specific Cluster", \ - "Sample Mfg Specific Cluster 2", "Configuration Cluster", "MFGLIB Cluster", "SL Works With All Hubs", "Core", "Debug", \ - "Application", "Security", "Attributes", "Service discovery", "Registration", "ZDO (ZigBee Device Object)", \ - "Custom messages (1)", "Custom messages (2)", "Custom messages (3)" \ - } - -#define EMBER_AF_PRINT_NAME_NUMBER 121 -#define EMBER_AF_PRINT_BITS \ - { \ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF \ - } diff --git a/src/app/util/debug-printing.h b/src/app/util/debug-printing.h deleted file mode 100644 index bea705c170bfc9..00000000000000 --- a/src/app/util/debug-printing.h +++ /dev/null @@ -1,2251 +0,0 @@ -/** - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by Simplicity Studio. Please do not edit manually. -// -// - -#pragma once - -#include "debug-printing-test.h" - -// Printing macros for cluster: Basic -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BASIC_CLUSTER) -#define emberAfBasicClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_BASIC_CLUSTER, __VA_ARGS__) -#define emberAfBasicClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_BASIC_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBasicClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BASIC_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBasicClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_BASIC_CLUSTER, (buffer)) -#else -#define emberAfBasicClusterPrint(...) -#define emberAfBasicClusterPrintln(...) - -#define emberAfBasicClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBasicClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BASIC_CLUSTER) - -// Printing macros for cluster: Power Configuration -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_POWER_CONFIG_CLUSTER) -#define emberAfPowerConfigClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_POWER_CONFIG_CLUSTER, __VA_ARGS__) -#define emberAfPowerConfigClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_POWER_CONFIG_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPowerConfigClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_POWER_CONFIG_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPowerConfigClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_POWER_CONFIG_CLUSTER, (buffer)) -#else -#define emberAfPowerConfigClusterPrint(...) -#define emberAfPowerConfigClusterPrintln(...) - -#define emberAfPowerConfigClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPowerConfigClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_POWER_CONFIG_CLUSTER) - -// Printing macros for cluster: Device Temperature Configuration -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEVICE_TEMP_CLUSTER) -#define emberAfDeviceTempClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_DEVICE_TEMP_CLUSTER, __VA_ARGS__) -#define emberAfDeviceTempClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_DEVICE_TEMP_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDeviceTempClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DEVICE_TEMP_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDeviceTempClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_DEVICE_TEMP_CLUSTER, (buffer)) -#else -#define emberAfDeviceTempClusterPrint(...) -#define emberAfDeviceTempClusterPrintln(...) - -#define emberAfDeviceTempClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDeviceTempClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEVICE_TEMP_CLUSTER) - -// Printing macros for cluster: Identify -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_IDENTIFY_CLUSTER) -#define emberAfIdentifyClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_IDENTIFY_CLUSTER, __VA_ARGS__) -#define emberAfIdentifyClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_IDENTIFY_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfIdentifyClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_IDENTIFY_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfIdentifyClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_IDENTIFY_CLUSTER, (buffer)) -#else -#define emberAfIdentifyClusterPrint(...) -#define emberAfIdentifyClusterPrintln(...) - -#define emberAfIdentifyClusterPrintBuffer(buffer, len, withSpace) -#define emberAfIdentifyClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_IDENTIFY_CLUSTER) - -// Printing macros for cluster: Groups -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_GROUPS_CLUSTER) -#define emberAfGroupsClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_GROUPS_CLUSTER, __VA_ARGS__) -#define emberAfGroupsClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_GROUPS_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfGroupsClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_GROUPS_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfGroupsClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_GROUPS_CLUSTER, (buffer)) -#else -#define emberAfGroupsClusterPrint(...) -#define emberAfGroupsClusterPrintln(...) - -#define emberAfGroupsClusterPrintBuffer(buffer, len, withSpace) -#define emberAfGroupsClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_GROUPS_CLUSTER) - -// Printing macros for cluster: Scenes -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SCENES_CLUSTER) -#define emberAfScenesClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_SCENES_CLUSTER, __VA_ARGS__) -#define emberAfScenesClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_SCENES_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfScenesClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SCENES_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfScenesClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_SCENES_CLUSTER, (buffer)) -#else -#define emberAfScenesClusterPrint(...) -#define emberAfScenesClusterPrintln(...) - -#define emberAfScenesClusterPrintBuffer(buffer, len, withSpace) -#define emberAfScenesClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SCENES_CLUSTER) - -// Printing macros for cluster: On/off -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ON_OFF_CLUSTER) -#define emberAfOnOffClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ON_OFF_CLUSTER, __VA_ARGS__) -#define emberAfOnOffClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ON_OFF_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfOnOffClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ON_OFF_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfOnOffClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ON_OFF_CLUSTER, (buffer)) -#else -#define emberAfOnOffClusterPrint(...) -#define emberAfOnOffClusterPrintln(...) - -#define emberAfOnOffClusterPrintBuffer(buffer, len, withSpace) -#define emberAfOnOffClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ON_OFF_CLUSTER) - -// Printing macros for cluster: On/off Switch Configuration -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ON_OFF_SWITCH_CONFIGURATION_CLUSTER) -#define emberAfOnOffSwitchConfigClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ON_OFF_SWITCH_CONFIGURATION_CLUSTER, __VA_ARGS__) -#define emberAfOnOffSwitchConfigClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ON_OFF_SWITCH_CONFIGURATION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfOnOffSwitchConfigClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ON_OFF_SWITCH_CONFIGURATION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfOnOffSwitchConfigClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_ON_OFF_SWITCH_CONFIGURATION_CLUSTER, (buffer)) -#else -#define emberAfOnOffSwitchConfigClusterPrint(...) -#define emberAfOnOffSwitchConfigClusterPrintln(...) - -#define emberAfOnOffSwitchConfigClusterPrintBuffer(buffer, len, withSpace) -#define emberAfOnOffSwitchConfigClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ON_OFF_SWITCH_CONFIGURATION_CLUSTER) - -// Printing macros for cluster: Level Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_LEVEL_CONTROL_CLUSTER) -#define emberAfLevelControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_LEVEL_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfLevelControlClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_LEVEL_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfLevelControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_LEVEL_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfLevelControlClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_LEVEL_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfLevelControlClusterPrint(...) -#define emberAfLevelControlClusterPrintln(...) - -#define emberAfLevelControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfLevelControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_LEVEL_CONTROL_CLUSTER) - -// Printing macros for cluster: Alarms -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ALARM_CLUSTER) -#define emberAfAlarmClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ALARM_CLUSTER, __VA_ARGS__) -#define emberAfAlarmClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ALARM_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfAlarmClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ALARM_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfAlarmClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ALARM_CLUSTER, (buffer)) -#else -#define emberAfAlarmClusterPrint(...) -#define emberAfAlarmClusterPrintln(...) - -#define emberAfAlarmClusterPrintBuffer(buffer, len, withSpace) -#define emberAfAlarmClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ALARM_CLUSTER) - -// Printing macros for cluster: Time -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TIME_CLUSTER) -#define emberAfTimeClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_TIME_CLUSTER, __VA_ARGS__) -#define emberAfTimeClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_TIME_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfTimeClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_TIME_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfTimeClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_TIME_CLUSTER, (buffer)) -#else -#define emberAfTimeClusterPrint(...) -#define emberAfTimeClusterPrintln(...) - -#define emberAfTimeClusterPrintBuffer(buffer, len, withSpace) -#define emberAfTimeClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TIME_CLUSTER) - -// Printing macros for cluster: RSSI Location -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_RSSI_LOCATION_CLUSTER) -#define emberAfRssiLocationClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_RSSI_LOCATION_CLUSTER, __VA_ARGS__) -#define emberAfRssiLocationClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_RSSI_LOCATION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfRssiLocationClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_RSSI_LOCATION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfRssiLocationClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_RSSI_LOCATION_CLUSTER, (buffer)) -#else -#define emberAfRssiLocationClusterPrint(...) -#define emberAfRssiLocationClusterPrintln(...) - -#define emberAfRssiLocationClusterPrintBuffer(buffer, len, withSpace) -#define emberAfRssiLocationClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_RSSI_LOCATION_CLUSTER) - -// Printing macros for cluster: Binary Input (Basic) -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BINARY_INPUT_BASIC_CLUSTER) -#define emberAfBinaryInputBasicClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_BINARY_INPUT_BASIC_CLUSTER, __VA_ARGS__) -#define emberAfBinaryInputBasicClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_BINARY_INPUT_BASIC_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBinaryInputBasicClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BINARY_INPUT_BASIC_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBinaryInputBasicClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_BINARY_INPUT_BASIC_CLUSTER, (buffer)) -#else -#define emberAfBinaryInputBasicClusterPrint(...) -#define emberAfBinaryInputBasicClusterPrintln(...) - -#define emberAfBinaryInputBasicClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBinaryInputBasicClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BINARY_INPUT_BASIC_CLUSTER) - -// Printing macros for cluster: Commissioning -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_COMMISSIONING_CLUSTER) -#define emberAfCommissioningClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_COMMISSIONING_CLUSTER, __VA_ARGS__) -#define emberAfCommissioningClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_COMMISSIONING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfCommissioningClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_COMMISSIONING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfCommissioningClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_COMMISSIONING_CLUSTER, (buffer)) -#else -#define emberAfCommissioningClusterPrint(...) -#define emberAfCommissioningClusterPrintln(...) - -#define emberAfCommissioningClusterPrintBuffer(buffer, len, withSpace) -#define emberAfCommissioningClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_COMMISSIONING_CLUSTER) - -// Printing macros for cluster: Partition -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PARTITION_CLUSTER) -#define emberAfPartitionClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_PARTITION_CLUSTER, __VA_ARGS__) -#define emberAfPartitionClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_PARTITION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPartitionClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_PARTITION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPartitionClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_PARTITION_CLUSTER, (buffer)) -#else -#define emberAfPartitionClusterPrint(...) -#define emberAfPartitionClusterPrintln(...) - -#define emberAfPartitionClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPartitionClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PARTITION_CLUSTER) - -// Printing macros for cluster: Over the Air Bootloading -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OTA_BOOTLOAD_CLUSTER) -#define emberAfOtaBootloadClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_OTA_BOOTLOAD_CLUSTER, __VA_ARGS__) -#define emberAfOtaBootloadClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_OTA_BOOTLOAD_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfOtaBootloadClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_OTA_BOOTLOAD_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfOtaBootloadClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_OTA_BOOTLOAD_CLUSTER, (buffer)) -#else -#define emberAfOtaBootloadClusterPrint(...) -#define emberAfOtaBootloadClusterPrintln(...) - -#define emberAfOtaBootloadClusterPrintBuffer(buffer, len, withSpace) -#define emberAfOtaBootloadClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OTA_BOOTLOAD_CLUSTER) - -// Printing macros for cluster: Power Profile -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_POWER_PROFILE_CLUSTER) -#define emberAfPowerProfileClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_POWER_PROFILE_CLUSTER, __VA_ARGS__) -#define emberAfPowerProfileClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_POWER_PROFILE_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPowerProfileClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_POWER_PROFILE_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPowerProfileClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_POWER_PROFILE_CLUSTER, (buffer)) -#else -#define emberAfPowerProfileClusterPrint(...) -#define emberAfPowerProfileClusterPrintln(...) - -#define emberAfPowerProfileClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPowerProfileClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_POWER_PROFILE_CLUSTER) - -// Printing macros for cluster: Appliance Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLIANCE_CONTROL_CLUSTER) -#define emberAfApplianceControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_APPLIANCE_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfApplianceControlClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_APPLIANCE_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfApplianceControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_APPLIANCE_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfApplianceControlClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_APPLIANCE_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfApplianceControlClusterPrint(...) -#define emberAfApplianceControlClusterPrintln(...) - -#define emberAfApplianceControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfApplianceControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLIANCE_CONTROL_CLUSTER) - -// Printing macros for cluster: Poll Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_POLL_CONTROL_CLUSTER) -#define emberAfPollControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_POLL_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfPollControlClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_POLL_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPollControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_POLL_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPollControlClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_POLL_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfPollControlClusterPrint(...) -#define emberAfPollControlClusterPrintln(...) - -#define emberAfPollControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPollControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_POLL_CONTROL_CLUSTER) - -// Printing macros for cluster: Green Power -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_GREEN_POWER_CLUSTER) -#define emberAfGreenPowerClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_GREEN_POWER_CLUSTER, __VA_ARGS__) -#define emberAfGreenPowerClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_GREEN_POWER_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfGreenPowerClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_GREEN_POWER_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfGreenPowerClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_GREEN_POWER_CLUSTER, (buffer)) -#else -#define emberAfGreenPowerClusterPrint(...) -#define emberAfGreenPowerClusterPrintln(...) - -#define emberAfGreenPowerClusterPrintBuffer(buffer, len, withSpace) -#define emberAfGreenPowerClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_GREEN_POWER_CLUSTER) - -// Printing macros for cluster: Keep-Alive -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_KEEPALIVE_CLUSTER) -#define emberAfKeepaliveClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_KEEPALIVE_CLUSTER, __VA_ARGS__) -#define emberAfKeepaliveClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_KEEPALIVE_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfKeepaliveClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_KEEPALIVE_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfKeepaliveClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_KEEPALIVE_CLUSTER, (buffer)) -#else -#define emberAfKeepaliveClusterPrint(...) -#define emberAfKeepaliveClusterPrintln(...) - -#define emberAfKeepaliveClusterPrintBuffer(buffer, len, withSpace) -#define emberAfKeepaliveClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_KEEPALIVE_CLUSTER) - -// Printing macros for cluster: Shade Configuration -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SHADE_CONFIG_CLUSTER) -#define emberAfShadeConfigClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_SHADE_CONFIG_CLUSTER, __VA_ARGS__) -#define emberAfShadeConfigClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_SHADE_CONFIG_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfShadeConfigClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SHADE_CONFIG_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfShadeConfigClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_SHADE_CONFIG_CLUSTER, (buffer)) -#else -#define emberAfShadeConfigClusterPrint(...) -#define emberAfShadeConfigClusterPrintln(...) - -#define emberAfShadeConfigClusterPrintBuffer(buffer, len, withSpace) -#define emberAfShadeConfigClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SHADE_CONFIG_CLUSTER) - -// Printing macros for cluster: Door Lock -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DOOR_LOCK_CLUSTER) -#define emberAfDoorLockClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_DOOR_LOCK_CLUSTER, __VA_ARGS__) -#define emberAfDoorLockClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_DOOR_LOCK_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDoorLockClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DOOR_LOCK_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDoorLockClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_DOOR_LOCK_CLUSTER, (buffer)) -#else -#define emberAfDoorLockClusterPrint(...) -#define emberAfDoorLockClusterPrintln(...) - -#define emberAfDoorLockClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDoorLockClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DOOR_LOCK_CLUSTER) - -// Printing macros for cluster: Window Covering -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_WINDOW_COVERING_CLUSTER) -#define emberAfWindowCoveringClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_WINDOW_COVERING_CLUSTER, __VA_ARGS__) -#define emberAfWindowCoveringClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_WINDOW_COVERING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfWindowCoveringClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_WINDOW_COVERING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfWindowCoveringClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_WINDOW_COVERING_CLUSTER, (buffer)) -#else -#define emberAfWindowCoveringClusterPrint(...) -#define emberAfWindowCoveringClusterPrintln(...) - -#define emberAfWindowCoveringClusterPrintBuffer(buffer, len, withSpace) -#define emberAfWindowCoveringClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_WINDOW_COVERING_CLUSTER) - -// Printing macros for cluster: Barrier Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BARRIER_CONTROL_CLUSTER) -#define emberAfBarrierControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_BARRIER_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfBarrierControlClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_BARRIER_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBarrierControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BARRIER_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBarrierControlClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_BARRIER_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfBarrierControlClusterPrint(...) -#define emberAfBarrierControlClusterPrintln(...) - -#define emberAfBarrierControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBarrierControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BARRIER_CONTROL_CLUSTER) - -// Printing macros for cluster: Pump Configuration and Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER) -#define emberAfPumpConfigControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfPumpConfigControlClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPumpConfigControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPumpConfigControlClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfPumpConfigControlClusterPrint(...) -#define emberAfPumpConfigControlClusterPrintln(...) - -#define emberAfPumpConfigControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPumpConfigControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER) - -// Printing macros for cluster: Thermostat -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_THERMOSTAT_CLUSTER) -#define emberAfThermostatClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_THERMOSTAT_CLUSTER, __VA_ARGS__) -#define emberAfThermostatClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_THERMOSTAT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfThermostatClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_THERMOSTAT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfThermostatClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_THERMOSTAT_CLUSTER, (buffer)) -#else -#define emberAfThermostatClusterPrint(...) -#define emberAfThermostatClusterPrintln(...) - -#define emberAfThermostatClusterPrintBuffer(buffer, len, withSpace) -#define emberAfThermostatClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_THERMOSTAT_CLUSTER) - -// Printing macros for cluster: Fan Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_FAN_CONTROL_CLUSTER) -#define emberAfFanControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_FAN_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfFanControlClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_FAN_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfFanControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_FAN_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfFanControlClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_FAN_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfFanControlClusterPrint(...) -#define emberAfFanControlClusterPrintln(...) - -#define emberAfFanControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfFanControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_FAN_CONTROL_CLUSTER) - -// Printing macros for cluster: Dehumidification Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEHUMID_CONTROL_CLUSTER) -#define emberAfDehumidControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_DEHUMID_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfDehumidControlClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_DEHUMID_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDehumidControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DEHUMID_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDehumidControlClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_DEHUMID_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfDehumidControlClusterPrint(...) -#define emberAfDehumidControlClusterPrintln(...) - -#define emberAfDehumidControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDehumidControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEHUMID_CONTROL_CLUSTER) - -// Printing macros for cluster: Thermostat User Interface Configuration -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER) -#define emberAfThermostatUiConfigClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER, __VA_ARGS__) -#define emberAfThermostatUiConfigClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfThermostatUiConfigClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfThermostatUiConfigClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER, (buffer)) -#else -#define emberAfThermostatUiConfigClusterPrint(...) -#define emberAfThermostatUiConfigClusterPrintln(...) - -#define emberAfThermostatUiConfigClusterPrintBuffer(buffer, len, withSpace) -#define emberAfThermostatUiConfigClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER) - -// Printing macros for cluster: Color Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_COLOR_CONTROL_CLUSTER) -#define emberAfColorControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_COLOR_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfColorControlClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_COLOR_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfColorControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_COLOR_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfColorControlClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_COLOR_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfColorControlClusterPrint(...) -#define emberAfColorControlClusterPrintln(...) - -#define emberAfColorControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfColorControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_COLOR_CONTROL_CLUSTER) - -// Printing macros for cluster: Ballast Configuration -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BALLAST_CONFIGURATION_CLUSTER) -#define emberAfBallastConfigurationClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_BALLAST_CONFIGURATION_CLUSTER, __VA_ARGS__) -#define emberAfBallastConfigurationClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_BALLAST_CONFIGURATION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBallastConfigurationClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BALLAST_CONFIGURATION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBallastConfigurationClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_BALLAST_CONFIGURATION_CLUSTER, (buffer)) -#else -#define emberAfBallastConfigurationClusterPrint(...) -#define emberAfBallastConfigurationClusterPrintln(...) - -#define emberAfBallastConfigurationClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBallastConfigurationClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BALLAST_CONFIGURATION_CLUSTER) - -// Printing macros for cluster: Illuminance Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ILLUM_MEASUREMENT_CLUSTER) -#define emberAfIllumMeasurementClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ILLUM_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfIllumMeasurementClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ILLUM_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfIllumMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ILLUM_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfIllumMeasurementClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ILLUM_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfIllumMeasurementClusterPrint(...) -#define emberAfIllumMeasurementClusterPrintln(...) - -#define emberAfIllumMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfIllumMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ILLUM_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Illuminance Level Sensing -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ILLUM_LEVEL_SENSING_CLUSTER) -#define emberAfIllumLevelSensingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ILLUM_LEVEL_SENSING_CLUSTER, __VA_ARGS__) -#define emberAfIllumLevelSensingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ILLUM_LEVEL_SENSING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfIllumLevelSensingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ILLUM_LEVEL_SENSING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfIllumLevelSensingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ILLUM_LEVEL_SENSING_CLUSTER, (buffer)) -#else -#define emberAfIllumLevelSensingClusterPrint(...) -#define emberAfIllumLevelSensingClusterPrintln(...) - -#define emberAfIllumLevelSensingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfIllumLevelSensingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ILLUM_LEVEL_SENSING_CLUSTER) - -// Printing macros for cluster: Temperature Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TEMPERATURE_MEASUREMENT_CLUSTER) -#define emberAfTempMeasurementClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_TEMPERATURE_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfTempMeasurementClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_TEMPERATURE_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfTempMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_TEMPERATURE_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfTempMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_TEMPERATURE_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfTempMeasurementClusterPrint(...) -#define emberAfTempMeasurementClusterPrintln(...) - -#define emberAfTempMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfTempMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TEMPERATURE_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Pressure Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PRESSURE_MEASUREMENT_CLUSTER) -#define emberAfPressureMeasurementClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_PRESSURE_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfPressureMeasurementClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_PRESSURE_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPressureMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_PRESSURE_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPressureMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_PRESSURE_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfPressureMeasurementClusterPrint(...) -#define emberAfPressureMeasurementClusterPrintln(...) - -#define emberAfPressureMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPressureMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PRESSURE_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Flow Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_FLOW_MEASUREMENT_CLUSTER) -#define emberAfFlowMeasurementClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_FLOW_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfFlowMeasurementClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_FLOW_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfFlowMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_FLOW_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfFlowMeasurementClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_FLOW_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfFlowMeasurementClusterPrint(...) -#define emberAfFlowMeasurementClusterPrintln(...) - -#define emberAfFlowMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfFlowMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_FLOW_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Relative Humidity Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER) -#define emberAfRelativeHumidityMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfRelativeHumidityMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfRelativeHumidityMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfRelativeHumidityMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfRelativeHumidityMeasurementClusterPrint(...) -#define emberAfRelativeHumidityMeasurementClusterPrintln(...) - -#define emberAfRelativeHumidityMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfRelativeHumidityMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Occupancy Sensing -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OCCUPANCY_SENSING_CLUSTER) -#define emberAfOccupancySensingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_OCCUPANCY_SENSING_CLUSTER, __VA_ARGS__) -#define emberAfOccupancySensingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_OCCUPANCY_SENSING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfOccupancySensingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_OCCUPANCY_SENSING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfOccupancySensingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_OCCUPANCY_SENSING_CLUSTER, (buffer)) -#else -#define emberAfOccupancySensingClusterPrint(...) -#define emberAfOccupancySensingClusterPrintln(...) - -#define emberAfOccupancySensingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfOccupancySensingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OCCUPANCY_SENSING_CLUSTER) - -// Printing macros for cluster: Carbon Monoxide Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfCarbonMonoxideConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfCarbonMonoxideConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfCarbonMonoxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfCarbonMonoxideConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfCarbonMonoxideConcentrationMeasurementClusterPrint(...) -#define emberAfCarbonMonoxideConcentrationMeasurementClusterPrintln(...) - -#define emberAfCarbonMonoxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfCarbonMonoxideConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Carbon Dioxide Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfCarbonDioxideConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfCarbonDioxideConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfCarbonDioxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfCarbonDioxideConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfCarbonDioxideConcentrationMeasurementClusterPrint(...) -#define emberAfCarbonDioxideConcentrationMeasurementClusterPrintln(...) - -#define emberAfCarbonDioxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfCarbonDioxideConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Ethylene Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfEthyleneConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfEthyleneConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfEthyleneConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfEthyleneConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfEthyleneConcentrationMeasurementClusterPrint(...) -#define emberAfEthyleneConcentrationMeasurementClusterPrintln(...) - -#define emberAfEthyleneConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfEthyleneConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Ethylene Oxide Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfEthyleneOxideConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfEthyleneOxideConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfEthyleneOxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfEthyleneOxideConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfEthyleneOxideConcentrationMeasurementClusterPrint(...) -#define emberAfEthyleneOxideConcentrationMeasurementClusterPrintln(...) - -#define emberAfEthyleneOxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfEthyleneOxideConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Hydrogen Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfHydrogenConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfHydrogenConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfHydrogenConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfHydrogenConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfHydrogenConcentrationMeasurementClusterPrint(...) -#define emberAfHydrogenConcentrationMeasurementClusterPrintln(...) - -#define emberAfHydrogenConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfHydrogenConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Hydrogen Sulphide Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfHydrogenSulphideConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfHydrogenSulphideConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfHydrogenSulphideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfHydrogenSulphideConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfHydrogenSulphideConcentrationMeasurementClusterPrint(...) -#define emberAfHydrogenSulphideConcentrationMeasurementClusterPrintln(...) - -#define emberAfHydrogenSulphideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfHydrogenSulphideConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Nitric Oxide Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfNitricOxideConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfNitricOxideConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfNitricOxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfNitricOxideConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfNitricOxideConcentrationMeasurementClusterPrint(...) -#define emberAfNitricOxideConcentrationMeasurementClusterPrintln(...) - -#define emberAfNitricOxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfNitricOxideConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Nitrogen Dioxide Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfNitrogenDioxideConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfNitrogenDioxideConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfNitrogenDioxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfNitrogenDioxideConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfNitrogenDioxideConcentrationMeasurementClusterPrint(...) -#define emberAfNitrogenDioxideConcentrationMeasurementClusterPrintln(...) - -#define emberAfNitrogenDioxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfNitrogenDioxideConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Oxygen Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfOxygenConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfOxygenConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfOxygenConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfOxygenConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfOxygenConcentrationMeasurementClusterPrint(...) -#define emberAfOxygenConcentrationMeasurementClusterPrintln(...) - -#define emberAfOxygenConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfOxygenConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Ozone Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfOzoneConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfOzoneConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfOzoneConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfOzoneConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfOzoneConcentrationMeasurementClusterPrint(...) -#define emberAfOzoneConcentrationMeasurementClusterPrintln(...) - -#define emberAfOzoneConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfOzoneConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Sulfur Dioxide Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfSulfurDioxideConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfSulfurDioxideConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfSulfurDioxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfSulfurDioxideConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfSulfurDioxideConcentrationMeasurementClusterPrint(...) -#define emberAfSulfurDioxideConcentrationMeasurementClusterPrintln(...) - -#define emberAfSulfurDioxideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfSulfurDioxideConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Dissolved Oxygen Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfDissolvedOxygenConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfDissolvedOxygenConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDissolvedOxygenConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDissolvedOxygenConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfDissolvedOxygenConcentrationMeasurementClusterPrint(...) -#define emberAfDissolvedOxygenConcentrationMeasurementClusterPrintln(...) - -#define emberAfDissolvedOxygenConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDissolvedOxygenConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Bromate Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfBromateConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfBromateConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBromateConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBromateConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfBromateConcentrationMeasurementClusterPrint(...) -#define emberAfBromateConcentrationMeasurementClusterPrintln(...) - -#define emberAfBromateConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBromateConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Chloramines Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfChloraminesConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfChloraminesConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfChloraminesConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfChloraminesConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfChloraminesConcentrationMeasurementClusterPrint(...) -#define emberAfChloraminesConcentrationMeasurementClusterPrintln(...) - -#define emberAfChloraminesConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfChloraminesConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Chlorine Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfChlorineConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfChlorineConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfChlorineConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfChlorineConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfChlorineConcentrationMeasurementClusterPrint(...) -#define emberAfChlorineConcentrationMeasurementClusterPrintln(...) - -#define emberAfChlorineConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfChlorineConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Fecal coliform and E. Coli Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfFecalColiformAndEColiConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfFecalColiformAndEColiConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfFecalColiformAndEColiConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfFecalColiformAndEColiConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfFecalColiformAndEColiConcentrationMeasurementClusterPrint(...) -#define emberAfFecalColiformAndEColiConcentrationMeasurementClusterPrintln(...) - -#define emberAfFecalColiformAndEColiConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfFecalColiformAndEColiConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Fluoride Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfFluorideConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfFluorideConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfFluorideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfFluorideConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfFluorideConcentrationMeasurementClusterPrint(...) -#define emberAfFluorideConcentrationMeasurementClusterPrintln(...) - -#define emberAfFluorideConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfFluorideConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Haloacetic Acids Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfHaloaceticAcidsConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfHaloaceticAcidsConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfHaloaceticAcidsConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfHaloaceticAcidsConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfHaloaceticAcidsConcentrationMeasurementClusterPrint(...) -#define emberAfHaloaceticAcidsConcentrationMeasurementClusterPrintln(...) - -#define emberAfHaloaceticAcidsConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfHaloaceticAcidsConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Total Trihalomethanes Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfTotalTrihalomethanesConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfTotalTrihalomethanesConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfTotalTrihalomethanesConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfTotalTrihalomethanesConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfTotalTrihalomethanesConcentrationMeasurementClusterPrint(...) -#define emberAfTotalTrihalomethanesConcentrationMeasurementClusterPrintln(...) - -#define emberAfTotalTrihalomethanesConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfTotalTrihalomethanesConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Total Coliform Bacteria Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfTotalColiformBacteriaConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfTotalColiformBacteriaConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfTotalColiformBacteriaConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfTotalColiformBacteriaConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfTotalColiformBacteriaConcentrationMeasurementClusterPrint(...) -#define emberAfTotalColiformBacteriaConcentrationMeasurementClusterPrintln(...) - -#define emberAfTotalColiformBacteriaConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfTotalColiformBacteriaConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Turbidity Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfTurbidityConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfTurbidityConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfTurbidityConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfTurbidityConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfTurbidityConcentrationMeasurementClusterPrint(...) -#define emberAfTurbidityConcentrationMeasurementClusterPrintln(...) - -#define emberAfTurbidityConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfTurbidityConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Copper Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfCopperConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfCopperConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfCopperConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfCopperConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfCopperConcentrationMeasurementClusterPrint(...) -#define emberAfCopperConcentrationMeasurementClusterPrintln(...) - -#define emberAfCopperConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfCopperConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Lead Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfLeadConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfLeadConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfLeadConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfLeadConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfLeadConcentrationMeasurementClusterPrint(...) -#define emberAfLeadConcentrationMeasurementClusterPrintln(...) - -#define emberAfLeadConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfLeadConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Manganese Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfManganeseConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfManganeseConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfManganeseConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfManganeseConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfManganeseConcentrationMeasurementClusterPrint(...) -#define emberAfManganeseConcentrationMeasurementClusterPrintln(...) - -#define emberAfManganeseConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfManganeseConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Sulfate Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfSulfateConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfSulfateConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfSulfateConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfSulfateConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfSulfateConcentrationMeasurementClusterPrint(...) -#define emberAfSulfateConcentrationMeasurementClusterPrintln(...) - -#define emberAfSulfateConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfSulfateConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Bromodichloromethane Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfBromodichloromethaneConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfBromodichloromethaneConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBromodichloromethaneConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBromodichloromethaneConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfBromodichloromethaneConcentrationMeasurementClusterPrint(...) -#define emberAfBromodichloromethaneConcentrationMeasurementClusterPrintln(...) - -#define emberAfBromodichloromethaneConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBromodichloromethaneConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Bromoform Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfBromoformConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfBromoformConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBromoformConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBromoformConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfBromoformConcentrationMeasurementClusterPrint(...) -#define emberAfBromoformConcentrationMeasurementClusterPrintln(...) - -#define emberAfBromoformConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBromoformConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Chlorodibromomethane Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfChlorodibromomethaneConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfChlorodibromomethaneConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfChlorodibromomethaneConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfChlorodibromomethaneConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfChlorodibromomethaneConcentrationMeasurementClusterPrint(...) -#define emberAfChlorodibromomethaneConcentrationMeasurementClusterPrintln(...) - -#define emberAfChlorodibromomethaneConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfChlorodibromomethaneConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Chloroform Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfChloroformConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfChloroformConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfChloroformConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfChloroformConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfChloroformConcentrationMeasurementClusterPrint(...) -#define emberAfChloroformConcentrationMeasurementClusterPrintln(...) - -#define emberAfChloroformConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfChloroformConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Sodium Concentration Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER) -#define emberAfSodiumConcentrationMeasurementClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfSodiumConcentrationMeasurementClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfSodiumConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfSodiumConcentrationMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfSodiumConcentrationMeasurementClusterPrint(...) -#define emberAfSodiumConcentrationMeasurementClusterPrintln(...) - -#define emberAfSodiumConcentrationMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfSodiumConcentrationMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Generic Tunnel -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_GENERIC_TUNNEL_CLUSTER) -#define emberAfGenericTunnelClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_GENERIC_TUNNEL_CLUSTER, __VA_ARGS__) -#define emberAfGenericTunnelClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_GENERIC_TUNNEL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfGenericTunnelClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_GENERIC_TUNNEL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfGenericTunnelClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_GENERIC_TUNNEL_CLUSTER, (buffer)) -#else -#define emberAfGenericTunnelClusterPrint(...) -#define emberAfGenericTunnelClusterPrintln(...) - -#define emberAfGenericTunnelClusterPrintBuffer(buffer, len, withSpace) -#define emberAfGenericTunnelClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_GENERIC_TUNNEL_CLUSTER) - -// Printing macros for cluster: BACnet Protocol Tunnel -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BACNET_PROTOCOL_TUNNEL_CLUSTER) -#define emberAfBacnetProtocolTunnelClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_BACNET_PROTOCOL_TUNNEL_CLUSTER, __VA_ARGS__) -#define emberAfBacnetProtocolTunnelClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_BACNET_PROTOCOL_TUNNEL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBacnetProtocolTunnelClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BACNET_PROTOCOL_TUNNEL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBacnetProtocolTunnelClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_BACNET_PROTOCOL_TUNNEL_CLUSTER, (buffer)) -#else -#define emberAfBacnetProtocolTunnelClusterPrint(...) -#define emberAfBacnetProtocolTunnelClusterPrintln(...) - -#define emberAfBacnetProtocolTunnelClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBacnetProtocolTunnelClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BACNET_PROTOCOL_TUNNEL_CLUSTER) - -// Printing macros for cluster: 11073 Protocol Tunnel -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_11073_PROTOCOL_TUNNEL_CLUSTER) -#define emberAf11073ProtocolTunnelClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_11073_PROTOCOL_TUNNEL_CLUSTER, __VA_ARGS__) -#define emberAf11073ProtocolTunnelClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_11073_PROTOCOL_TUNNEL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAf11073ProtocolTunnelClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_11073_PROTOCOL_TUNNEL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAf11073ProtocolTunnelClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_11073_PROTOCOL_TUNNEL_CLUSTER, (buffer)) -#else -#define emberAf11073ProtocolTunnelClusterPrint(...) -#define emberAf11073ProtocolTunnelClusterPrintln(...) - -#define emberAf11073ProtocolTunnelClusterPrintBuffer(buffer, len, withSpace) -#define emberAf11073ProtocolTunnelClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_11073_PROTOCOL_TUNNEL_CLUSTER) - -// Printing macros for cluster: ISO 7816 Protocol Tunnel -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ISO7816_PROTOCOL_TUNNEL_CLUSTER) -#define emberAfIso7816ProtocolTunnelClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ISO7816_PROTOCOL_TUNNEL_CLUSTER, __VA_ARGS__) -#define emberAfIso7816ProtocolTunnelClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ISO7816_PROTOCOL_TUNNEL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfIso7816ProtocolTunnelClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ISO7816_PROTOCOL_TUNNEL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfIso7816ProtocolTunnelClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_ISO7816_PROTOCOL_TUNNEL_CLUSTER, (buffer)) -#else -#define emberAfIso7816ProtocolTunnelClusterPrint(...) -#define emberAfIso7816ProtocolTunnelClusterPrintln(...) - -#define emberAfIso7816ProtocolTunnelClusterPrintBuffer(buffer, len, withSpace) -#define emberAfIso7816ProtocolTunnelClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ISO7816_PROTOCOL_TUNNEL_CLUSTER) - -// Printing macros for cluster: Price -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PRICE_CLUSTER) -#define emberAfPriceClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_PRICE_CLUSTER, __VA_ARGS__) -#define emberAfPriceClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_PRICE_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPriceClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_PRICE_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPriceClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_PRICE_CLUSTER, (buffer)) -#else -#define emberAfPriceClusterPrint(...) -#define emberAfPriceClusterPrintln(...) - -#define emberAfPriceClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPriceClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PRICE_CLUSTER) - -// Printing macros for cluster: Demand Response and Load Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER) -#define emberAfDemandResponseLoadControlClusterPrint(...) \ - emberAfPrint(EMBER_AF_PRINT_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfDemandResponseLoadControlClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDemandResponseLoadControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDemandResponseLoadControlClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfDemandResponseLoadControlClusterPrint(...) -#define emberAfDemandResponseLoadControlClusterPrintln(...) - -#define emberAfDemandResponseLoadControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDemandResponseLoadControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER) - -// Printing macros for cluster: Simple Metering -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SIMPLE_METERING_CLUSTER) -#define emberAfSimpleMeteringClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_SIMPLE_METERING_CLUSTER, __VA_ARGS__) -#define emberAfSimpleMeteringClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_SIMPLE_METERING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfSimpleMeteringClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SIMPLE_METERING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfSimpleMeteringClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_SIMPLE_METERING_CLUSTER, (buffer)) -#else -#define emberAfSimpleMeteringClusterPrint(...) -#define emberAfSimpleMeteringClusterPrintln(...) - -#define emberAfSimpleMeteringClusterPrintBuffer(buffer, len, withSpace) -#define emberAfSimpleMeteringClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SIMPLE_METERING_CLUSTER) - -// Printing macros for cluster: Messaging -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MESSAGING_CLUSTER) -#define emberAfMessagingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_MESSAGING_CLUSTER, __VA_ARGS__) -#define emberAfMessagingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_MESSAGING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfMessagingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_MESSAGING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfMessagingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_MESSAGING_CLUSTER, (buffer)) -#else -#define emberAfMessagingClusterPrint(...) -#define emberAfMessagingClusterPrintln(...) - -#define emberAfMessagingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfMessagingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MESSAGING_CLUSTER) - -// Printing macros for cluster: Tunneling -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TUNNELING_CLUSTER) -#define emberAfTunnelingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_TUNNELING_CLUSTER, __VA_ARGS__) -#define emberAfTunnelingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_TUNNELING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfTunnelingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_TUNNELING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfTunnelingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_TUNNELING_CLUSTER, (buffer)) -#else -#define emberAfTunnelingClusterPrint(...) -#define emberAfTunnelingClusterPrintln(...) - -#define emberAfTunnelingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfTunnelingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TUNNELING_CLUSTER) - -// Printing macros for cluster: Prepayment -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PREPAYMENT_CLUSTER) -#define emberAfPrepaymentClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_PREPAYMENT_CLUSTER, __VA_ARGS__) -#define emberAfPrepaymentClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_PREPAYMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPrepaymentClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_PREPAYMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPrepaymentClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_PREPAYMENT_CLUSTER, (buffer)) -#else -#define emberAfPrepaymentClusterPrint(...) -#define emberAfPrepaymentClusterPrintln(...) - -#define emberAfPrepaymentClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPrepaymentClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PREPAYMENT_CLUSTER) - -// Printing macros for cluster: Energy Management -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ENERGY_MANAGEMENT_CLUSTER) -#define emberAfEnergyManagementClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ENERGY_MANAGEMENT_CLUSTER, __VA_ARGS__) -#define emberAfEnergyManagementClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ENERGY_MANAGEMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfEnergyManagementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ENERGY_MANAGEMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfEnergyManagementClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ENERGY_MANAGEMENT_CLUSTER, (buffer)) -#else -#define emberAfEnergyManagementClusterPrint(...) -#define emberAfEnergyManagementClusterPrintln(...) - -#define emberAfEnergyManagementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfEnergyManagementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ENERGY_MANAGEMENT_CLUSTER) - -// Printing macros for cluster: Calendar -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CALENDAR_CLUSTER) -#define emberAfCalendarClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_CALENDAR_CLUSTER, __VA_ARGS__) -#define emberAfCalendarClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_CALENDAR_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfCalendarClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CALENDAR_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfCalendarClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_CALENDAR_CLUSTER, (buffer)) -#else -#define emberAfCalendarClusterPrint(...) -#define emberAfCalendarClusterPrintln(...) - -#define emberAfCalendarClusterPrintBuffer(buffer, len, withSpace) -#define emberAfCalendarClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CALENDAR_CLUSTER) - -// Printing macros for cluster: Device Management -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEVICE_MANAGEMENT_CLUSTER) -#define emberAfDeviceManagementClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_DEVICE_MANAGEMENT_CLUSTER, __VA_ARGS__) -#define emberAfDeviceManagementClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_DEVICE_MANAGEMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDeviceManagementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DEVICE_MANAGEMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDeviceManagementClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_DEVICE_MANAGEMENT_CLUSTER, (buffer)) -#else -#define emberAfDeviceManagementClusterPrint(...) -#define emberAfDeviceManagementClusterPrintln(...) - -#define emberAfDeviceManagementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDeviceManagementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEVICE_MANAGEMENT_CLUSTER) - -// Printing macros for cluster: Events -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_EVENTS_CLUSTER) -#define emberAfEventsClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_EVENTS_CLUSTER, __VA_ARGS__) -#define emberAfEventsClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_EVENTS_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfEventsClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_EVENTS_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfEventsClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_EVENTS_CLUSTER, (buffer)) -#else -#define emberAfEventsClusterPrint(...) -#define emberAfEventsClusterPrintln(...) - -#define emberAfEventsClusterPrintBuffer(buffer, len, withSpace) -#define emberAfEventsClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_EVENTS_CLUSTER) - -// Printing macros for cluster: MDU Pairing -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MDU_PAIRING_CLUSTER) -#define emberAfMduPairingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_MDU_PAIRING_CLUSTER, __VA_ARGS__) -#define emberAfMduPairingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_MDU_PAIRING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfMduPairingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_MDU_PAIRING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfMduPairingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_MDU_PAIRING_CLUSTER, (buffer)) -#else -#define emberAfMduPairingClusterPrint(...) -#define emberAfMduPairingClusterPrintln(...) - -#define emberAfMduPairingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfMduPairingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MDU_PAIRING_CLUSTER) - -// Printing macros for cluster: Sub-GHz -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SUB_GHZ_CLUSTER) -#define emberAfSubGhzClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_SUB_GHZ_CLUSTER, __VA_ARGS__) -#define emberAfSubGhzClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_SUB_GHZ_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfSubGhzClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SUB_GHZ_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfSubGhzClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_SUB_GHZ_CLUSTER, (buffer)) -#else -#define emberAfSubGhzClusterPrint(...) -#define emberAfSubGhzClusterPrintln(...) - -#define emberAfSubGhzClusterPrintBuffer(buffer, len, withSpace) -#define emberAfSubGhzClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SUB_GHZ_CLUSTER) - -// Printing macros for cluster: Key Establishment -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_KEY_ESTABLISHMENT_CLUSTER) -#define emberAfKeyEstablishmentClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_KEY_ESTABLISHMENT_CLUSTER, __VA_ARGS__) -#define emberAfKeyEstablishmentClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_KEY_ESTABLISHMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfKeyEstablishmentClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_KEY_ESTABLISHMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfKeyEstablishmentClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_KEY_ESTABLISHMENT_CLUSTER, (buffer)) -#else -#define emberAfKeyEstablishmentClusterPrint(...) -#define emberAfKeyEstablishmentClusterPrintln(...) - -#define emberAfKeyEstablishmentClusterPrintBuffer(buffer, len, withSpace) -#define emberAfKeyEstablishmentClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_KEY_ESTABLISHMENT_CLUSTER) - -// Printing macros for cluster: Information -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_INFORMATION_CLUSTER) -#define emberAfInformationClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_INFORMATION_CLUSTER, __VA_ARGS__) -#define emberAfInformationClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_INFORMATION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfInformationClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_INFORMATION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfInformationClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_INFORMATION_CLUSTER, (buffer)) -#else -#define emberAfInformationClusterPrint(...) -#define emberAfInformationClusterPrintln(...) - -#define emberAfInformationClusterPrintBuffer(buffer, len, withSpace) -#define emberAfInformationClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_INFORMATION_CLUSTER) - -// Printing macros for cluster: Data Sharing -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DATA_SHARING_CLUSTER) -#define emberAfDataSharingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_DATA_SHARING_CLUSTER, __VA_ARGS__) -#define emberAfDataSharingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_DATA_SHARING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDataSharingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DATA_SHARING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDataSharingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_DATA_SHARING_CLUSTER, (buffer)) -#else -#define emberAfDataSharingClusterPrint(...) -#define emberAfDataSharingClusterPrintln(...) - -#define emberAfDataSharingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDataSharingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DATA_SHARING_CLUSTER) - -// Printing macros for cluster: Gaming -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_GAMING_CLUSTER) -#define emberAfGamingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_GAMING_CLUSTER, __VA_ARGS__) -#define emberAfGamingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_GAMING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfGamingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_GAMING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfGamingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_GAMING_CLUSTER, (buffer)) -#else -#define emberAfGamingClusterPrint(...) -#define emberAfGamingClusterPrintln(...) - -#define emberAfGamingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfGamingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_GAMING_CLUSTER) - -// Printing macros for cluster: Data Rate Control -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DATA_RATE_CONTROL_CLUSTER) -#define emberAfDataRateControlClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_DATA_RATE_CONTROL_CLUSTER, __VA_ARGS__) -#define emberAfDataRateControlClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_DATA_RATE_CONTROL_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDataRateControlClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DATA_RATE_CONTROL_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDataRateControlClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_DATA_RATE_CONTROL_CLUSTER, (buffer)) -#else -#define emberAfDataRateControlClusterPrint(...) -#define emberAfDataRateControlClusterPrintln(...) - -#define emberAfDataRateControlClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDataRateControlClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DATA_RATE_CONTROL_CLUSTER) - -// Printing macros for cluster: Voice over ZigBee -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_VOICE_OVER_ZIGBEE_CLUSTER) -#define emberAfVoiceOverZigbeeClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_VOICE_OVER_ZIGBEE_CLUSTER, __VA_ARGS__) -#define emberAfVoiceOverZigbeeClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_VOICE_OVER_ZIGBEE_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfVoiceOverZigbeeClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_VOICE_OVER_ZIGBEE_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfVoiceOverZigbeeClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_VOICE_OVER_ZIGBEE_CLUSTER, (buffer)) -#else -#define emberAfVoiceOverZigbeeClusterPrint(...) -#define emberAfVoiceOverZigbeeClusterPrintln(...) - -#define emberAfVoiceOverZigbeeClusterPrintBuffer(buffer, len, withSpace) -#define emberAfVoiceOverZigbeeClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_VOICE_OVER_ZIGBEE_CLUSTER) - -// Printing macros for cluster: Chatting -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHATTING_CLUSTER) -#define emberAfChattingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_CHATTING_CLUSTER, __VA_ARGS__) -#define emberAfChattingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_CHATTING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfChattingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CHATTING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfChattingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_CHATTING_CLUSTER, (buffer)) -#else -#define emberAfChattingClusterPrint(...) -#define emberAfChattingClusterPrintln(...) - -#define emberAfChattingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfChattingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CHATTING_CLUSTER) - -// Printing macros for cluster: Payment -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PAYMENT_CLUSTER) -#define emberAfPaymentClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_PAYMENT_CLUSTER, __VA_ARGS__) -#define emberAfPaymentClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_PAYMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfPaymentClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_PAYMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfPaymentClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_PAYMENT_CLUSTER, (buffer)) -#else -#define emberAfPaymentClusterPrint(...) -#define emberAfPaymentClusterPrintln(...) - -#define emberAfPaymentClusterPrintBuffer(buffer, len, withSpace) -#define emberAfPaymentClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_PAYMENT_CLUSTER) - -// Printing macros for cluster: Billing -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BILLING_CLUSTER) -#define emberAfBillingClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_BILLING_CLUSTER, __VA_ARGS__) -#define emberAfBillingClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_BILLING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfBillingClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_BILLING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfBillingClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_BILLING_CLUSTER, (buffer)) -#else -#define emberAfBillingClusterPrint(...) -#define emberAfBillingClusterPrintln(...) - -#define emberAfBillingClusterPrintBuffer(buffer, len, withSpace) -#define emberAfBillingClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_BILLING_CLUSTER) - -// Printing macros for cluster: Appliance Identification -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLIANCE_IDENTIFICATION_CLUSTER) -#define emberAfApplianceIdentificationClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_APPLIANCE_IDENTIFICATION_CLUSTER, __VA_ARGS__) -#define emberAfApplianceIdentificationClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_APPLIANCE_IDENTIFICATION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfApplianceIdentificationClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_APPLIANCE_IDENTIFICATION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfApplianceIdentificationClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_APPLIANCE_IDENTIFICATION_CLUSTER, (buffer)) -#else -#define emberAfApplianceIdentificationClusterPrint(...) -#define emberAfApplianceIdentificationClusterPrintln(...) - -#define emberAfApplianceIdentificationClusterPrintBuffer(buffer, len, withSpace) -#define emberAfApplianceIdentificationClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLIANCE_IDENTIFICATION_CLUSTER) - -// Printing macros for cluster: Meter Identification -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_METER_IDENTIFICATION_CLUSTER) -#define emberAfMeterIdentificationClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_METER_IDENTIFICATION_CLUSTER, __VA_ARGS__) -#define emberAfMeterIdentificationClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_METER_IDENTIFICATION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfMeterIdentificationClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_METER_IDENTIFICATION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfMeterIdentificationClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_METER_IDENTIFICATION_CLUSTER, (buffer)) -#else -#define emberAfMeterIdentificationClusterPrint(...) -#define emberAfMeterIdentificationClusterPrintln(...) - -#define emberAfMeterIdentificationClusterPrintBuffer(buffer, len, withSpace) -#define emberAfMeterIdentificationClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_METER_IDENTIFICATION_CLUSTER) - -// Printing macros for cluster: Appliance Events and Alert -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLIANCE_EVENTS_AND_ALERT_CLUSTER) -#define emberAfApplianceEventsAndAlertClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_APPLIANCE_EVENTS_AND_ALERT_CLUSTER, __VA_ARGS__) -#define emberAfApplianceEventsAndAlertClusterPrintln(...) \ - emberAfPrintln(EMBER_AF_PRINT_APPLIANCE_EVENTS_AND_ALERT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfApplianceEventsAndAlertClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_APPLIANCE_EVENTS_AND_ALERT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfApplianceEventsAndAlertClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_APPLIANCE_EVENTS_AND_ALERT_CLUSTER, (buffer)) -#else -#define emberAfApplianceEventsAndAlertClusterPrint(...) -#define emberAfApplianceEventsAndAlertClusterPrintln(...) - -#define emberAfApplianceEventsAndAlertClusterPrintBuffer(buffer, len, withSpace) -#define emberAfApplianceEventsAndAlertClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLIANCE_EVENTS_AND_ALERT_CLUSTER) - -// Printing macros for cluster: Appliance Statistics -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLIANCE_STATISTICS_CLUSTER) -#define emberAfApplianceStatisticsClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_APPLIANCE_STATISTICS_CLUSTER, __VA_ARGS__) -#define emberAfApplianceStatisticsClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_APPLIANCE_STATISTICS_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfApplianceStatisticsClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_APPLIANCE_STATISTICS_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfApplianceStatisticsClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_APPLIANCE_STATISTICS_CLUSTER, (buffer)) -#else -#define emberAfApplianceStatisticsClusterPrint(...) -#define emberAfApplianceStatisticsClusterPrintln(...) - -#define emberAfApplianceStatisticsClusterPrintBuffer(buffer, len, withSpace) -#define emberAfApplianceStatisticsClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLIANCE_STATISTICS_CLUSTER) - -// Printing macros for cluster: Electrical Measurement -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ELECTRICAL_MEASUREMENT_CLUSTER) -#define emberAfElectricalMeasurementClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ELECTRICAL_MEASUREMENT_CLUSTER, __VA_ARGS__) -#define emberAfElectricalMeasurementClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ELECTRICAL_MEASUREMENT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfElectricalMeasurementClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ELECTRICAL_MEASUREMENT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfElectricalMeasurementClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_ELECTRICAL_MEASUREMENT_CLUSTER, (buffer)) -#else -#define emberAfElectricalMeasurementClusterPrint(...) -#define emberAfElectricalMeasurementClusterPrintln(...) - -#define emberAfElectricalMeasurementClusterPrintBuffer(buffer, len, withSpace) -#define emberAfElectricalMeasurementClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ELECTRICAL_MEASUREMENT_CLUSTER) - -// Printing macros for cluster: Diagnostics -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DIAGNOSTICS_CLUSTER) -#define emberAfDiagnosticsClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_DIAGNOSTICS_CLUSTER, __VA_ARGS__) -#define emberAfDiagnosticsClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_DIAGNOSTICS_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfDiagnosticsClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_DIAGNOSTICS_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfDiagnosticsClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_DIAGNOSTICS_CLUSTER, (buffer)) -#else -#define emberAfDiagnosticsClusterPrint(...) -#define emberAfDiagnosticsClusterPrintln(...) - -#define emberAfDiagnosticsClusterPrintBuffer(buffer, len, withSpace) -#define emberAfDiagnosticsClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DIAGNOSTICS_CLUSTER) - -// Printing macros for cluster: Application Basic -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLICATION_BASIC_CLUSTER) -#define emberAfApplicationBasicClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_APPLICATION_BASIC_CLUSTER, __VA_ARGS__) -#define emberAfApplicationBasicClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_APPLICATION_BASIC_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfApplicationBasicClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_APPLICATION_BASIC_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfApplicationBasicClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_APPLICATION_BASIC_CLUSTER, (buffer)) -#else -#define emberAfApplicationBasicClusterPrint(...) -#define emberAfApplicationBasicClusterPrintln(...) - -#define emberAfApplicationBasicClusterPrintBuffer(buffer, len, withSpace) -#define emberAfApplicationBasicClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLICATION_BASIC_CLUSTER) - -// Printing macros for cluster: ZLL Commissioning -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ZLL_COMMISSIONING_CLUSTER) -#define emberAfZllCommissioningClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ZLL_COMMISSIONING_CLUSTER, __VA_ARGS__) -#define emberAfZllCommissioningClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ZLL_COMMISSIONING_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfZllCommissioningClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ZLL_COMMISSIONING_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfZllCommissioningClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ZLL_COMMISSIONING_CLUSTER, (buffer)) -#else -#define emberAfZllCommissioningClusterPrint(...) -#define emberAfZllCommissioningClusterPrintln(...) - -#define emberAfZllCommissioningClusterPrintBuffer(buffer, len, withSpace) -#define emberAfZllCommissioningClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ZLL_COMMISSIONING_CLUSTER) - -// Printing macros for cluster: Sample Mfg Specific Cluster -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER) -#define emberAfSampleMfgSpecificClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER, __VA_ARGS__) -#define emberAfSampleMfgSpecificClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfSampleMfgSpecificClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfSampleMfgSpecificClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER, (buffer)) -#else -#define emberAfSampleMfgSpecificClusterPrint(...) -#define emberAfSampleMfgSpecificClusterPrintln(...) - -#define emberAfSampleMfgSpecificClusterPrintBuffer(buffer, len, withSpace) -#define emberAfSampleMfgSpecificClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER) - -// Printing macros for cluster: Sample Mfg Specific Cluster 2 -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER_2) -#define emberAfSampleMfgSpecificCluster2Print(...) emberAfPrint(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER_2, __VA_ARGS__) -#define emberAfSampleMfgSpecificCluster2Println(...) emberAfPrintln(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER_2, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfSampleMfgSpecificCluster2PrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER_2, (buffer), (len), (withSpace)) -#define emberAfSampleMfgSpecificCluster2PrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER_2, (buffer)) -#else -#define emberAfSampleMfgSpecificCluster2Print(...) -#define emberAfSampleMfgSpecificCluster2Println(...) - -#define emberAfSampleMfgSpecificCluster2PrintBuffer(buffer, len, withSpace) -#define emberAfSampleMfgSpecificCluster2PrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SAMPLE_MFG_SPECIFIC_CLUSTER_2) - -// Printing macros for cluster: Configuration Cluster -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OTA_CONFIGURATION_CLUSTER) -#define emberAfOtaConfigurationClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_OTA_CONFIGURATION_CLUSTER, __VA_ARGS__) -#define emberAfOtaConfigurationClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_OTA_CONFIGURATION_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfOtaConfigurationClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_OTA_CONFIGURATION_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfOtaConfigurationClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_OTA_CONFIGURATION_CLUSTER, (buffer)) -#else -#define emberAfOtaConfigurationClusterPrint(...) -#define emberAfOtaConfigurationClusterPrintln(...) - -#define emberAfOtaConfigurationClusterPrintBuffer(buffer, len, withSpace) -#define emberAfOtaConfigurationClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_OTA_CONFIGURATION_CLUSTER) - -// Printing macros for cluster: MFGLIB Cluster -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MFGLIB_CLUSTER) -#define emberAfMfglibClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_MFGLIB_CLUSTER, __VA_ARGS__) -#define emberAfMfglibClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_MFGLIB_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfMfglibClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_MFGLIB_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfMfglibClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_MFGLIB_CLUSTER, (buffer)) -#else -#define emberAfMfglibClusterPrint(...) -#define emberAfMfglibClusterPrintln(...) - -#define emberAfMfglibClusterPrintBuffer(buffer, len, withSpace) -#define emberAfMfglibClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MFGLIB_CLUSTER) - -// Printing macros for cluster: SL Works With All Hubs -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SL_WWAH_CLUSTER) -#define emberAfSlWwahClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_SL_WWAH_CLUSTER, __VA_ARGS__) -#define emberAfSlWwahClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_SL_WWAH_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfSlWwahClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_SL_WWAH_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfSlWwahClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_SL_WWAH_CLUSTER, (buffer)) -#else -#define emberAfSlWwahClusterPrint(...) -#define emberAfSlWwahClusterPrintln(...) - -#define emberAfSlWwahClusterPrintBuffer(buffer, len, withSpace) -#define emberAfSlWwahClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_SL_WWAH_CLUSTER) - -// Printing macros for Core -// Prints messages for global flow of the receive/send -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CORE) -#define emberAfCorePrint(...) emberAfPrint(EMBER_AF_PRINT_CORE, __VA_ARGS__) -#define emberAfCorePrintln(...) emberAfPrintln(EMBER_AF_PRINT_CORE, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfCoreFlush() -#define emberAfCorePrintBuffer(buffer, len, withSpace) emberAfPrintBuffer(EMBER_AF_PRINT_CORE, (buffer), (len), (withSpace)) -#define emberAfCorePrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_CORE, (buffer)) -#else -#define emberAfCorePrint(...) -#define emberAfCorePrintln(...) -#define emberAfCoreFlush() -#define emberAfCorePrintBuffer(buffer, len, withSpace) -#define emberAfCorePrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CORE) - -// Printing macros for Debug -// Prints messages for random debugging -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEBUG) -#define emberAfDebugPrint(...) emberAfPrint(EMBER_AF_PRINT_DEBUG, __VA_ARGS__) -#define emberAfDebugPrintln(...) emberAfPrintln(EMBER_AF_PRINT_DEBUG, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfDebugFlush() -#define emberAfDebugPrintBuffer(buffer, len, withSpace) emberAfPrintBuffer(EMBER_AF_PRINT_DEBUG, (buffer), (len), (withSpace)) -#define emberAfDebugPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_DEBUG, (buffer)) -#else -#define emberAfDebugPrint(...) -#define emberAfDebugPrintln(...) -#define emberAfDebugFlush() -#define emberAfDebugPrintBuffer(buffer, len, withSpace) -#define emberAfDebugPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_DEBUG) - -// Printing macros for Application -// Prints messages for application part -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APP) -#define emberAfAppPrint(...) emberAfPrint(EMBER_AF_PRINT_APP, __VA_ARGS__) -#define emberAfAppPrintln(...) emberAfPrintln(EMBER_AF_PRINT_APP, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfAppFlush() -#define emberAfAppPrintBuffer(buffer, len, withSpace) emberAfPrintBuffer(EMBER_AF_PRINT_APP, (buffer), (len), (withSpace)) -#define emberAfAppPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_APP, (buffer)) -#else -#define emberAfAppPrint(...) -#define emberAfAppPrintln(...) -#define emberAfAppFlush() -#define emberAfAppPrintBuffer(buffer, len, withSpace) -#define emberAfAppPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APP) - -// Printing macros for Attributes -// Prints messages related to attributes -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ATTRIBUTES) -#define emberAfAttributesPrint(...) emberAfPrint(EMBER_AF_PRINT_ATTRIBUTES, __VA_ARGS__) -#define emberAfAttributesPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ATTRIBUTES, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfAttributesFlush() -#define emberAfAttributesPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ATTRIBUTES, (buffer), (len), (withSpace)) -#define emberAfAttributesPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ATTRIBUTES, (buffer)) -#else -#define emberAfAttributesPrint(...) -#define emberAfAttributesPrintln(...) -#define emberAfAttributesFlush() -#define emberAfAttributesPrintBuffer(buffer, len, withSpace) -#define emberAfAttributesPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ATTRIBUTES) - -// Printing macros for Registration -// Prints messages related to registration -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_REGISTRATION) -#define emberAfRegistrationPrint(...) emberAfPrint(EMBER_AF_PRINT_REGISTRATION, __VA_ARGS__) -#define emberAfRegistrationPrintln(...) emberAfPrintln(EMBER_AF_PRINT_REGISTRATION, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfRegistrationFlush() -#define emberAfRegistrationPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_REGISTRATION, (buffer), (len), (withSpace)) -#define emberAfRegistrationPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_REGISTRATION, (buffer)) -#else -#define emberAfRegistrationPrint(...) -#define emberAfRegistrationPrintln(...) -#define emberAfRegistrationFlush() -#define emberAfRegistrationPrintBuffer(buffer, len, withSpace) -#define emberAfRegistrationPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_REGISTRATION) - -// Printing macros for ZDO (ZigBee Device Object) -// Prints messages related to ZDO functionality -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ZDO) -#define emberAfZdoPrint(...) emberAfPrint(EMBER_AF_PRINT_ZDO, __VA_ARGS__) -#define emberAfZdoPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ZDO, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfZdoFlush() -#define emberAfZdoPrintBuffer(buffer, len, withSpace) emberAfPrintBuffer(EMBER_AF_PRINT_ZDO, (buffer), (len), (withSpace)) -#define emberAfZdoPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ZDO, (buffer)) -#else -#define emberAfZdoPrint(...) -#define emberAfZdoPrintln(...) -#define emberAfZdoFlush() -#define emberAfZdoPrintBuffer(buffer, len, withSpace) -#define emberAfZdoPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ZDO) - -// Printing macros for Custom messages (1) -// Messages that can be used by the end developer -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CUSTOM1) -#define emberAfCustom1Print(...) emberAfPrint(EMBER_AF_PRINT_CUSTOM1, __VA_ARGS__) -#define emberAfCustom1Println(...) emberAfPrintln(EMBER_AF_PRINT_CUSTOM1, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfCustom1Flush() -#define emberAfCustom1PrintBuffer(buffer, len, withSpace) emberAfPrintBuffer(EMBER_AF_PRINT_CUSTOM1, (buffer), (len), (withSpace)) -#define emberAfCustom1PrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_CUSTOM1, (buffer)) -#else -#define emberAfCustom1Print(...) -#define emberAfCustom1Println(...) -#define emberAfCustom1Flush() -#define emberAfCustom1PrintBuffer(buffer, len, withSpace) -#define emberAfCustom1PrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CUSTOM1) - -// Printing macros for Custom messages (2) -// Messages that can be used by the end developer -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CUSTOM2) -#define emberAfCustom2Print(...) emberAfPrint(EMBER_AF_PRINT_CUSTOM2, __VA_ARGS__) -#define emberAfCustom2Println(...) emberAfPrintln(EMBER_AF_PRINT_CUSTOM2, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfCustom2Flush() -#define emberAfCustom2PrintBuffer(buffer, len, withSpace) emberAfPrintBuffer(EMBER_AF_PRINT_CUSTOM2, (buffer), (len), (withSpace)) -#define emberAfCustom2PrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_CUSTOM2, (buffer)) -#else -#define emberAfCustom2Print(...) -#define emberAfCustom2Println(...) -#define emberAfCustom2Flush() -#define emberAfCustom2PrintBuffer(buffer, len, withSpace) -#define emberAfCustom2PrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CUSTOM2) - -// Printing macros for cluster: Account Login -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ACCOUNT_LOGIN_CLUSTER) -#define emberAfAccountLoginClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_ACCOUNT_LOGIN_CLUSTER, __VA_ARGS__) -#define emberAfAccountLoginClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_ACCOUNT_LOGIN_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfAccountLoginClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_ACCOUNT_LOGIN_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfAccountLoginClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_ACCOUNT_LOGIN_CLUSTER, (buffer)) -#else -#define emberAfAccountLoginClusterPrint(...) -#define emberAfAccountLoginClusterPrintln(...) - -#define emberAfAccountLoginClusterPrintBuffer(buffer, len, withSpace) -#define emberAfAccountLoginClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ACCOUNT_LOGIN_CLUSTER) - -// Printing macros for cluster: Media Playback -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MEDIA_PLAYBACK_CLUSTER) -#define emberAfMediaPlaybackClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_MEDIA_PLAYBACK_CLUSTER, __VA_ARGS__) -#define emberAfMediaPlaybackClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_MEDIA_PLAYBACK_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfMediaPlaybackClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_MEDIA_PLAYBACK_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfMediaPlaybackClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_MEDIA_PLAYBACK_CLUSTER, (buffer)) -#else -#define emberAfMediaPlaybackClusterPrint(...) -#define emberAfMediaPlaybackClusterPrintln(...) - -#define emberAfMediaPlaybackClusterPrintBuffer(buffer, len, withSpace) -#define emberAfMediaPlaybackClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_MEDIA_PLAYBACK_CLUSTER) - -// Printing macros for Custom messages (3) -// Messages that can be used by the end developer -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CUSTOM3) -#define emberAfCustom3Print(...) emberAfPrint(EMBER_AF_PRINT_CUSTOM3, __VA_ARGS__) -#define emberAfCustom3Println(...) emberAfPrintln(EMBER_AF_PRINT_CUSTOM3, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. -#define emberAfCustom3Flush() -#define emberAfCustom3PrintBuffer(buffer, len, withSpace) emberAfPrintBuffer(EMBER_AF_PRINT_CUSTOM3, (buffer), (len), (withSpace)) -#define emberAfCustom3PrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_CUSTOM3, (buffer)) -#else -#define emberAfCustom3Print(...) -#define emberAfCustom3Println(...) -#define emberAfCustom3Flush() -#define emberAfCustom3PrintBuffer(buffer, len, withSpace) -#define emberAfCustom3PrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CUSTOM3) - -// Printing macros for cluster: Application Launcher -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLICATION_LAUNCHER_CLUSTER) -#define emberAfApplicationLauncherClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_APPLICATION_LAUNCHER_CLUSTER, __VA_ARGS__) -#define emberAfApplicationLauncherClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_APPLICATION_LAUNCHER_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfApplicationLauncherClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_APPLICATION_LAUNCHER_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfApplicationLauncherClusterPrintString(buffer) \ - emberAfPrintString(EMBER_AF_PRINT_APPLICATION_LAUNCHER_CLUSTER, (buffer)) -#else -#define emberAfApplicationLauncherClusterPrint(...) -#define emberAfApplicationLauncherClusterPrintln(...) - -#define emberAfApplicationLauncherClusterPrintBuffer(buffer, len, withSpace) -#define emberAfApplicationLauncherClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_APPLICATION_LAUNCHER_CLUSTER) - -// Printing macros for cluster: Audio Output -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_AUDIO_OUTPUT_CLUSTER) -#define emberAfAudioOutputClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_AUDIO_OUTPUT_CLUSTER, __VA_ARGS__) -#define emberAfAudioOutputClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_AUDIO_OUTPUT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfAudioOutputClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_AUDIO_OUTPUT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfAudioOutputClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_AUDIO_OUTPUT_CLUSTER, (buffer)) -#else -#define emberAfAudioOutputClusterPrint(...) -#define emberAfAudioOutputClusterPrintln(...) - -#define emberAfAudioOutputClusterPrintBuffer(buffer, len, withSpace) -#define emberAfAudioOutputClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_AUDIO_OUTPUT_CLUSTER) - -// Printing macros for cluster: Keypad Input -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_KEYPAD_INPUT_CLUSTER) -#define emberAfKeypadInputClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_KEYPAD_INPUT_CLUSTER, __VA_ARGS__) -#define emberAfKeypadInputClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_KEYPAD_INPUT_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfKeypadInputClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_KEYPAD_INPUT_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfKeypadInputClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_KEYPAD_INPUT_CLUSTER, (buffer)) -#else -#define emberAfKeypadInputClusterPrint(...) -#define emberAfKeypadInputClusterPrintln(...) - -#define emberAfKeypadInputClusterPrintBuffer(buffer, len, withSpace) -#define emberAfKeypadInputClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_KEYPAD_INPUT_CLUSTER) - -// Printing macros for cluster: Content Launcher -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CONTENT_LAUNCHER_CLUSTER) -#define emberAfContentLauncherClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_CONTENT_LAUNCHER_CLUSTER, __VA_ARGS__) -#define emberAfContentLauncherClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_CONTENT_LAUNCHER_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfContentLauncherClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_CONTENT_LAUNCHER_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfContentLauncherClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_CONTENT_LAUNCHER_CLUSTER, (buffer)) -#else -#define emberAfContentLauncherClusterPrint(...) -#define emberAfContentLauncherClusterPrintln(...) - -#define emberAfContentLauncherClusterPrintBuffer(buffer, len, withSpace) -#define emberAfContentLauncherClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_CONTENT_LAUNCHER_CLUSTER) - -// Printing macros for cluster: Target Navigator -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TARGET_NAVIGATOR_CLUSTER) -#define emberAfTargetNavigatorClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_TARGET_NAVIGATOR_CLUSTER, __VA_ARGS__) -#define emberAfTargetNavigatorClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_TARGET_NAVIGATOR_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfTargetNavigatorClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_TARGET_NAVIGATOR_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfTargetNavigatorClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_TARGET_NAVIGATOR_CLUSTER, (buffer)) -#else -#define emberAfTargetNavigatorClusterPrint(...) -#define emberAfTargetNavigatorClusterPrintln(...) - -#define emberAfTargetNavigatorClusterPrintBuffer(buffer, len, withSpace) -#define emberAfTargetNavigatorClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_TARGET_NAVIGATOR_CLUSTER) - -// Printing macros for cluster: Wake on LAN -#if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_WAKE_ON_LAN_CLUSTER) -#define emberAfWakeOnLanClusterPrint(...) emberAfPrint(EMBER_AF_PRINT_WAKE_ON_LAN_CLUSTER, __VA_ARGS__) -#define emberAfWakeOnLanClusterPrintln(...) emberAfPrintln(EMBER_AF_PRINT_WAKE_ON_LAN_CLUSTER, __VA_ARGS__) -// Blocking IO is enabled for all serial ports, therefore flush calls are unnecessary. - -#define emberAfWakeOnLanClusterPrintBuffer(buffer, len, withSpace) \ - emberAfPrintBuffer(EMBER_AF_PRINT_WAKE_ON_LAN_CLUSTER, (buffer), (len), (withSpace)) -#define emberAfWakeOnLanClusterPrintString(buffer) emberAfPrintString(EMBER_AF_PRINT_WAKE_ON_LAN_CLUSTER, (buffer)) -#else -#define emberAfWakeOnLanClusterPrint(...) -#define emberAfWakeOnLanClusterPrintln(...) - -#define emberAfWakeOnLanClusterPrintBuffer(buffer, len, withSpace) -#define emberAfWakeOnLanClusterPrintString(buffer) -#endif // defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_WAKE_ON_LAN_CLUSTER) diff --git a/src/app/util/ember-print.cpp b/src/app/util/ember-print.cpp deleted file mode 100644 index 9f863b42fa3716..00000000000000 --- a/src/app/util/ember-print.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/** - * - * Copyright (c) 2020-2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include - -#include -#include - -#include -#include -#include - -bool emberAfPrintReceivedMessages = true; - -using namespace chip::Logging; - -#if CHIP_PROGRESS_LOGGING - -void emberAfPrint(int category, const char * format, ...) -{ - if (format != nullptr) - { - va_list args; - va_start(args, format); - chip::Logging::LogV(chip::Logging::kLogModule_Zcl, chip::Logging::kLogCategory_Progress, format, args); - va_end(args); - } -} - -#if !CHIP_PW_TOKENIZER_LOGGING -void emberAfPrintln(int category, const char * format, ...) -{ - if (format != nullptr) - { - va_list args; - va_start(args, format); - chip::Logging::LogV(chip::Logging::kLogModule_Zcl, chip::Logging::kLogCategory_Progress, format, args); - va_end(args); - } -} -#endif - -// TODO: add unit tests. - -void emberAfPrintBuffer(int category, const uint8_t * buffer, uint16_t length, bool withSpace) -{ - if (buffer != nullptr && length > 0) - { - constexpr uint16_t kBufferSize = CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE; - const char * perByteFormatStr = withSpace ? "%02X " : "%02X"; - const uint8_t perByteCharCount = withSpace ? 3 : 2; - const uint16_t bytesPerBuffer = static_cast((kBufferSize - 1) / perByteCharCount); - char result[kBufferSize]; - - uint16_t index = 0; - while (index < length) - { - const uint16_t remainingBytes = static_cast(length - index); - const uint16_t segmentLength = chip::min(bytesPerBuffer, remainingBytes); - const uint16_t segmentEnd = static_cast(index + segmentLength); - const uint32_t outStringEnd = segmentLength * perByteCharCount; - for (uint32_t dst_idx = 0; dst_idx < outStringEnd && index < segmentEnd; dst_idx += perByteCharCount, index++) - { - // The perByteFormatStr is in fact a literal (one of two), but - // the compiler does not realize that. We could branch on - // perByteFormatStr and have separate snprintf calls, but this - // seems like it might lead to smaller code. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-nonliteral" - snprintf(result + dst_idx, outStringEnd - dst_idx + 1, perByteFormatStr, buffer[index]); -#pragma GCC diagnostic pop - } - result[outStringEnd] = 0; - emberAfPrint(category, "%s", result); - } - } - else - { - emberAfPrint(EMBER_AF_PRINT_CORE, "NULL"); - } -} - -void emberAfPrintString(int category, const uint8_t * string) -{ - emberAfPrint(category, "%.*s", emberAfStringLength(string), string + 1); -} - -#endif // CHIP_PROGRESS_LOGGING diff --git a/src/app/util/ember-print.h b/src/app/util/ember-print.h deleted file mode 100644 index a456adbf15d3a4..00000000000000 --- a/src/app/util/ember-print.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include - -/** - * @brief Prints a log message - * @param category - Currently ignored as zcl categories do not map to chip categories. Defaults to kLogCategory_Progress - * @param format - Format string to print - */ -#if CHIP_PROGRESS_LOGGING -void emberAfPrint(int category, const char * format, ...) ENFORCE_FORMAT(2, 3); -#else -#define emberAfPrint(...) ((void) 0) -#endif - -/** - * @brief Prints a log followed by new line line - * @param category - Currently ignored as zcl categories do not map to chip categories. Defaults to kLogCategory_Progress - * @param format - Format string to print - */ -#if CHIP_PW_TOKENIZER_LOGGING -#define emberAfPrintln(MOD, MSG, ...) ChipLogProgress(Zcl, MSG, __VA_ARGS__); -#elif CHIP_PROGRESS_LOGGING -void emberAfPrintln(int category, const char * format, ...) ENFORCE_FORMAT(2, 3); -#else -#define emberAfPrintln(...) ((void) 0) -#endif - -/** - * @brief Prints a buffer - * @param category - Currently ignored as zcl categories do not map to chip categories. Defaults to kLogCategory_Progress. - * @param buffer - Buffer to print. - * @param length - Length of buffer - * @param withSpace - Pass in true if a space should be printed between each byte. - */ -#if CHIP_PROGRESS_LOGGING -void emberAfPrintBuffer(int category, const uint8_t * buffer, uint16_t length, bool withSpace); -#else -#define emberAfPrintBuffer(...) ((void) 0) -#endif - -/** - * @brief Prints a strings - * @param category - Currently ignored as zcl categories do not map to chip categories. Defaults to kLogCategory_Progress. - * @param string - Buffer to print as a string - */ -#if CHIP_PROGRESS_LOGGING -void emberAfPrintString(int category, const uint8_t * string); -#else -#define emberAfPrintString(...) ((void) 0) -#endif