Skip to content

Commit 9bbcc88

Browse files
committed
Addressing further review comments from Boris
1 parent 0b1392f commit 9bbcc88

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ class DeviceEnergyManagementDelegate : public DeviceEnergyManagement::Delegate
5050
* @brief Implements a handler to begin to adjust client power
5151
* consumption/generation to the level requested.
5252
*
53+
* Note callers must call GetPowerAdjustmentCapability and ensure the return value is not null
54+
* before calling PowerAdjustRequest.
55+
*
5356
* @param power Milli-Watts the ESA SHALL use during the adjustment period.
5457
* @param duration The duration that the ESA SHALL maintain the requested power for.
5558
* @return Success if the adjustment is accepted; otherwise the command SHALL be rejected with appropriate error.

examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ CHIP_ERROR DeviceEnergyManagementDelegate::SetAbsMinPower(int64_t newValueMw)
864864
mAbsMinPowerMw = newValueMw;
865865
if (oldValueMw != newValueMw)
866866
{
867-
ChipLogDetail(AppServer, "mAbsMinPower updated to %d", static_cast<int>(mAbsMinPowerMw));
867+
ChipLogDetail(AppServer, "mAbsMinPower updated to " ChipLogFormatX64, ChipLogValueX64(mAbsMinPowerMw));
868868
MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, AbsMinPower::Id);
869869
}
870870

@@ -878,7 +878,7 @@ CHIP_ERROR DeviceEnergyManagementDelegate::SetAbsMaxPower(int64_t newValueMw)
878878
mAbsMaxPowerMw = newValueMw;
879879
if (oldValueMw != newValueMw)
880880
{
881-
ChipLogDetail(AppServer, "mAbsMaxPower updated to %d", static_cast<int>(mAbsMaxPowerMw));
881+
ChipLogDetail(AppServer, "mAbsMaxPower updated to " ChipLogFormatX64, ChipLogValueX64(mAbsMaxPowerMw));
882882
MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, AbsMaxPower::Id);
883883
}
884884

src/app/clusters/device-energy-management-server/device-energy-management-server.h

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class Delegate
4545
* @brief Delegate should implement a handler to begin to adjust client power
4646
* consumption/generation to the level requested.
4747
*
48+
* Note callers must call GetPowerAdjustmentCapability and ensure the return value is not null
49+
* before calling PowerAdjustRequest.
50+
*
4851
* @param power Milli-Watts the ESA SHALL use during the adjustment period.
4952
* @param duration The duration that the ESA SHALL maintain the requested power for.
5053
* @return Success if the adjustment is accepted; otherwise the command SHALL be rejected with appropriate error.

src/python_testing/TC_DEM_2_2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP}
2424
# test-runner-run/run1/factoryreset: True
2525
# test-runner-run/run1/quiet: True
26-
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f
26+
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x01
2727
# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
2828
# === END CI TEST ARGUMENTS ===
2929

0 commit comments

Comments
 (0)