Skip to content

Commit 06dd24e

Browse files
progress
1 parent b04d1a9 commit 06dd24e

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

src/python_testing/TC_IDM_4_3.py

+38-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ def steps_TC_IDM_4_3(self):
6868
"Verify on the TH, a report data message is received. Verify on the TH the Subscribe Response has the following fields: SubscriptionId and MaxInterval In the following Steps 2, 3, 5-10, 13, and 15, the MaxInterval time reference in each step is the MaxInterval presented in the Subscribe Response of the subscription."),
6969
TestStep("1b", "Change the value of the attribute which has been subscribed on the DUT by manually changing some settings on the device. Example: Temperature sensor may update the value of the room temperature. Turning on/off on a light bulb.",
7070
"Verify that there is a report data message sent from the DUT for the changed value of the attribute. Verify that the Report Data is sent when the minimum interval time is reached and before the MaxInterval time."),
71-
# TestStep(2, "DUT and TH activate the subscription. Change the value of the attribute which has been subscribed on the DUT by sending an IMWrite or Invoke message to the DUT from the TH.",
72-
# "Verify that there is a report data message sent from the DUT for the changed value of the attribute. Verify that the Report Data is sent when the minimum interval time is reached and before the MaxInterval time."),
73-
# TestStep(3, "DUT and TH activate the subscription for an attribute. Do not change the value of the attribute which has been subscribed.",
74-
# "Verify that there is an empty report data message sent from the DUT to the TH after MaxInterval time."),
71+
TestStep(2, "DUT and TH activate the subscription. Change the value of the attribute which has been subscribed on the DUT by sending an IMWrite or Invoke message to the DUT from the TH.",
72+
"Verify that there is a report data message sent from the DUT for the changed value of the attribute. Verify that the Report Data is sent when the minimum interval time is reached and before the MaxInterval time."),
73+
TestStep(3, "DUT and TH activate the subscription for an attribute. Do not change the value of the attribute which has been subscribed.",
74+
"Verify that there is an empty report data message sent from the DUT to the TH after the MinInterval time and no later than the MaxInterval time plus an additional duration equal to the total retransmission time according to negotiated MRP parameters."),
7575
# TestStep(4, "DUT and TH activate the subscription. Change the value of the attribute which has been subscribed on the DUT. TH force sends a status response with an \"invalid subscription\". Change the value of the attribute which has been subscribed on the DUT.",
7676
# "Verify that DUT does not send report data for the second time after the subscription has been terminated."),
7777
# TestStep(5, "Activate the subscription between the DUT and the TH for an attribute of data type bool. Modify that attribute on the DUT. DUT should send the report data with the modified attribute value. Modify the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation.",
@@ -152,7 +152,13 @@ def wait_for_attribute_update_report(self, expected_attribute, output):
152152
async def test_TC_IDM_4_3(self):
153153

154154
# Test setup
155+
# Mandatory writable attributes
155156
node_label_attr = Clusters.BasicInformation.Attributes.NodeLabel
157+
# bc = Clusters.GeneralCommissioning.Attributes.Breadcrumb
158+
159+
# Event
160+
# acl = Clusters.AccessControl.Events.
161+
156162
node_label_attr_path = [(0, node_label_attr)]
157163
TH: ChipDeviceController = self.default_controller
158164

@@ -228,6 +234,34 @@ async def test_TC_IDM_4_3(self):
228234
f"Attribute update report data must be sent before the MaxInterval")
229235

230236
sub_th_step1ab.Shutdown()
237+
238+
# DUT and TH activate the subscription. Change the value of the attribute which has been
239+
# subscribed on the DUT by sending an IMWrite or Invoke message to the DUT from the TH.
240+
# Verify that there is a report data message sent from the DUT for the changed value of
241+
# the attribute. Verify that the Report Data is sent when the minimum interval time is
242+
# reached and before the MaxInterval time.
243+
self.step(2)
244+
245+
# DUT and TH activate the subscription for an attribute. Do not change the value of the
246+
# attribute which has been subscribed. Verify that there is an empty report data message
247+
# sent from the DUT to the TH after the MinInterval time and no later than the
248+
# MaxInterval time plus an additional duration equal to the total retransmission time
249+
# according to negotiated MRP parameters.
250+
self.step(3)
251+
252+
# Subscribe to attribute
253+
sub_th_step3 = await TH.ReadAttribute(
254+
nodeid=self.dut_node_id,
255+
attributes=node_label_attr_path,
256+
reportInterval=(self.min_interval_floor_sec, self.max_interval_ceiling_sec),
257+
keepSubscriptions=False
258+
)
259+
260+
261+
sub_th_step3.Shutdown()
262+
263+
264+
231265

232266

233267
if __name__ == "__main__":

0 commit comments

Comments
 (0)