17
17
18
18
19
19
import inspect
20
- import logging
20
+
21
21
from enum import IntFlag
22
22
import chip .clusters as Clusters
23
23
from chip .tlv import uint
26
26
from chip .clusters .enum import MatterIntEnum
27
27
from chip .clusters .ClusterObjects import ClusterObject
28
28
from chip .clusters .Objects import Thermostat
29
- from chip . clusters . Objects import OccupancySensing
29
+
30
30
from matter_testing_support import MatterBaseTest , async_test_body , default_matter_test_main
31
31
from mobly import asserts
32
32
@@ -103,33 +103,33 @@ async def test_TC_IDM_2_2(self):
103
103
self .all_supported_clusters = [cluster for cluster in Clusters .__dict__ .values () if inspect .isclass (cluster ) and issubclass (cluster , ClusterObjects .Cluster )]
104
104
# For bool test
105
105
boolean_state = Clusters .Objects .BooleanState
106
- boolean_state_attr = boolean_state . Attributes . StateValue
106
+
107
107
# For str test
108
108
power_source = Clusters .Objects .PowerSource
109
- power_source_desc_attr = power_source . Attributes . Description
109
+
110
110
# For uint test
111
111
microwave_oven_mode = Clusters .Objects .MicrowaveOvenMode
112
- microwave_oven_cur_mode_attr = microwave_oven_mode . Attributes . CurrentMode
112
+
113
113
# For int test
114
114
device_energy_mgmt = Clusters .Objects .DeviceEnergyManagement
115
- device_energy_mgmt_absmin_attr = device_energy_mgmt . Attributes . AbsMinPower
115
+
116
116
# For float test
117
117
unit_testing = Clusters .Objects .UnitTesting
118
- unit_testing_float_double_attr = unit_testing . Attributes . FloatDouble
119
- # For octet test
120
- unit_testing_oct_attr = unit_testing . Attributes . OctetString
121
- # For struct test
122
- struct_cluster = Clusters . Objects . GeneralCommissioning
123
- struct_attr = Clusters . Objects . GeneralCommissioning . Attributes . BasicCommissioningInfo
118
+
119
+
120
+
121
+
122
+
123
+
124
124
# For list test
125
125
energy_evse_mode = Clusters .Objects .EnergyEvseMode
126
- energy_evse_mode_attr = energy_evse_mode . Attributes . AcceptedCommandList
126
+
127
127
# For bitmap test
128
128
occupancy_sensing = Clusters .Objects .OccupancySensing
129
- occupancy_sensor_bitmap_attr = occupancy_sensing . Attributes . OccupancySensorTypeBitmap
129
+
130
130
# occupancy_sensor_bitmap OccupancySensing.Bitmaps.OccupancySensorTypeBitmap
131
131
# for enum test
132
- enum_class = Thermostat . Attributes . PresetTypes
132
+
133
133
134
134
self .print_step (0 , "Commissioning - already done" )
135
135
@@ -341,7 +341,7 @@ async def test_TC_IDM_2_2(self):
341
341
# Verify on the TH that the DUT sends the status code UNSUPPORTED_ENDPOINT
342
342
self .print_step (19 , "Send the Read Request Message to the DUT to read any attribute to an unsupported Endpoint" )
343
343
# Seems to return only {} -- Is this a failure or the unintended behavior?
344
- read_request_19 = await self .default_controller .ReadAttribute (self .dut_node_id , [non_existent_endpoint ])
344
+ # read_request_19 = await self.default_controller.ReadAttribute(self.dut_node_id, [non_existent_endpoint])
345
345
346
346
# Step 20
347
347
# TH sends the Read Request Message to the DUT to read any attribute to an unsupported cluster.
@@ -358,7 +358,7 @@ async def test_TC_IDM_2_2(self):
358
358
# Select unsupported cluster
359
359
unsupported_cluster = list (unsupported_clusters )[0 ]
360
360
# Seems to return only {} (like unsupported endpoints)
361
- read_request_20 = await self .default_controller .ReadAttribute (self .dut_node_id , [unsupported_cluster ])
361
+ # read_request_20 = await self.default_controller.ReadAttribute(self.dut_node_id, [unsupported_cluster])
362
362
363
363
# Step 21
364
364
# TH sends the Read Request Message to the DUT to read an unsupported attribute
@@ -379,7 +379,7 @@ async def test_TC_IDM_2_2(self):
379
379
unsupported_attribute = list (unsupported_attributes_set )[0 ]
380
380
381
381
# Seems to return only {} (like unsupported endpoints and clusters)
382
- read_request_21 = await self .default_controller .ReadAttribute (self .dut_node_id , [unsupported_attribute ])
382
+ # read_request_21 = await self.default_controller.ReadAttribute(self.dut_node_id, [unsupported_attribute])
383
383
384
384
# Verify on the TH that the DUT sends the status code UNSUPPORTED_ATTRIBUTE
385
385
0 commit comments