Skip to content

Commit

Permalink
Get DEM 1.1 test passing
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterC1965 committed Aug 22, 2024
1 parent e854d86 commit 75411a6
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/python_testing/TC_DEM_1_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP}
# test-runner-run/run1/factoryreset: True
# test-runner-run/run1/quiet: True
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x23
# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7f
# 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
# === END CI TEST ARGUMENTS ===

Expand Down Expand Up @@ -86,15 +86,15 @@ async def test_TC_DEM_1_1(self):
self.step("2")
await self.check_dem_attribute("ClusterRevision", 4)


self.step("3")
#await self.validate_feature_map([Clusters.DeviceEnergyManagement.Bitmaps.Feature.kForecastAdjustment,
# Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting],
# [Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerAdjustment,
# Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting,
# Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStartTimeAdjustment,
# Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPausable,
# Clusters.DeviceEnergyManagement.Bitmaps.Feature.kConstraintBasedAdjustment])
await self.validate_feature_map([Clusters.DeviceEnergyManagement.Bitmaps.Feature.kForecastAdjustment,
Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting,
Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerAdjustment,
Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting,
Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStartTimeAdjustment,
Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPausable,
Clusters.DeviceEnergyManagement.Bitmaps.Feature.kConstraintBasedAdjustment],
[])

self.step("4")
attribute_list = await self.read_dem_attribute_expect_success(attribute="AttributeList")
Expand Down Expand Up @@ -152,10 +152,8 @@ async def test_TC_DEM_1_1(self):
asserts.assert_equal(len(attribute_list), 0)

self.step("5")
#event_list = await self.read_dem_attribute_expect_success(attribute="EventList")
#logging.info(f"event_list {event_list}")
logging.info(f"Not supported/skipped")

#n- 0x00, 0x01: SHALL be included if and only if DEM.S.F00(PowerAdjustment).\n- 0x02, 0x03: SHALL be included if and only if DEM.S.F04(Pausable)."),
self.step("6")
accepted_command_list = await self.read_dem_attribute_expect_success(attribute="AcceptedCommandList")
logging.info(f"accepted_command_list {accepted_command_list}")
Expand Down

0 comments on commit 75411a6

Please sign in to comment.