38
38
39
39
40
40
class TCP_Tests (MatterBaseTest ):
41
+ async def send_arm_cmd (self , payloadCapability : ChipDeviceCtrl .TransportPayloadCapability ) -> None :
42
+ cmd = Clusters .GeneralCommissioning .Commands .ArmFailSafe (expiryLengthSeconds = 900 , breadcrumb = 1 )
43
+ await self .send_single_cmd (cmd = cmd , endpoint = 0 , payloadCapability = payloadCapability )
44
+
45
+ @async_test_body
46
+ async def teardown_test (self ):
47
+ cmd = Clusters .GeneralCommissioning .Commands .ArmFailSafe (expiryLengthSeconds = 0 , breadcrumb = 0 )
48
+ await self .send_single_cmd (cmd = cmd , endpoint = 0 ,
49
+ payloadCapability = ChipDeviceCtrl .TransportPayloadCapability .LARGE_PAYLOAD )
50
+
51
+ def pics_SC_8_1 (self ):
52
+ return ['MCORE.SC.TCP' ]
41
53
42
54
# TCP Connection Establishment
43
55
@async_test_body
@@ -51,6 +63,9 @@ async def test_TC_SC_8_1(self):
51
63
asserts .assert_equal (device .isSessionOverTCPConnection , True , "Session does not have associated TCP connection" )
52
64
asserts .assert_equal (device .isActiveSession , True , "Large Payload Session should be active over TCP connection" )
53
65
66
+ def pics_SC_8_2 (self ):
67
+ return ['MCORE.SC.TCP' ]
68
+
54
69
# Large Payload Session Establishment
55
70
@async_test_body
56
71
async def test_TC_SC_8_2 (self ):
@@ -62,6 +77,9 @@ async def test_TC_SC_8_2(self):
62
77
asserts .fail ("Unable to establish a CASE session over TCP to the device" )
63
78
asserts .assert_equal (device .sessionAllowsLargePayload , True , "Session does not have associated TCP connection" )
64
79
80
+ def pics_SC_8_3 (self ):
81
+ return ['MCORE.SC.TCP' ]
82
+
65
83
# Session Inactive After TCP Disconnect
66
84
@async_test_body
67
85
async def test_TC_SC_8_3 (self ):
@@ -77,6 +95,9 @@ async def test_TC_SC_8_3(self):
77
95
asserts .assert_equal (device .isActiveSession , False ,
78
96
"Large Payload Session should not be active after TCP connection closure" )
79
97
98
+ def pics_SC_8_4 (self ):
99
+ return ['MCORE.SC.TCP' ]
100
+
80
101
# TCP Connect, Disconnect, Then Connect Again
81
102
@async_test_body
82
103
async def test_TC_SC_8_4 (self ):
@@ -101,7 +122,9 @@ async def test_TC_SC_8_4(self):
101
122
asserts .assert_equal (device .isSessionOverTCPConnection , True , "Session does not have associated TCP connection" )
102
123
asserts .assert_equal (device .isActiveSession , True , "Large Payload Session should be active over TCP connection" )
103
124
104
- # OnOff Cluster Toggle Command Over TCP Session
125
+ def pics_SC_8_5 (self ):
126
+ return ['MCORE.SC.TCP' ]
127
+
105
128
@async_test_body
106
129
async def test_TC_SC_8_5 (self ):
107
130
@@ -114,13 +137,14 @@ async def test_TC_SC_8_5(self):
114
137
asserts .assert_equal (device .isActiveSession , True , "Large Payload Session should be active over TCP connection" )
115
138
asserts .assert_equal (device .sessionAllowsLargePayload , True , "Session does not have associated TCP connection" )
116
139
117
- commands = Clusters .Objects .OnOff .Commands
118
140
try :
119
- await self .send_single_cmd (cmd = commands .Toggle (), endpoint = 1 ,
120
- payloadCapability = ChipDeviceCtrl .TransportPayloadCapability .LARGE_PAYLOAD )
141
+ await self .send_arm_cmd (ChipDeviceCtrl .TransportPayloadCapability .LARGE_PAYLOAD )
121
142
except InteractionModelError :
122
143
asserts .fail ("Unexpected error returned by DUT" )
123
144
145
+ def pics_SC_8_6 (self ):
146
+ return ['MCORE.SC.TCP' ]
147
+
124
148
# WildCard Read Over TCP Session
125
149
@async_test_body
126
150
async def test_TC_SC_8_6 (self ):
@@ -139,6 +163,9 @@ async def test_TC_SC_8_6(self):
139
163
except InteractionModelError :
140
164
asserts .fail ("Unexpected error returned by DUT" )
141
165
166
+ def pics_SC_8_7 (self ):
167
+ return ['MCORE.SC.TCP' ]
168
+
142
169
# Use TCP Session If Available For MRP Interaction
143
170
@async_test_body
144
171
async def test_TC_SC_8_7 (self ):
@@ -152,10 +179,8 @@ async def test_TC_SC_8_7(self):
152
179
asserts .assert_equal (device .isActiveSession , True , "Large Payload Session should be active over TCP connection" )
153
180
asserts .assert_equal (device .sessionAllowsLargePayload , True , "Session does not have associated TCP connection" )
154
181
155
- commands = Clusters .Objects .OnOff .Commands
156
182
try :
157
- await self .send_single_cmd (cmd = commands .Toggle (), endpoint = 1 ,
158
- payloadCapability = ChipDeviceCtrl .TransportPayloadCapability .MRP_OR_TCP_PAYLOAD )
183
+ self .send_arm_cmd (ChipDeviceCtrl .TransportPayloadCapability .MRP_OR_TCP_PAYLOAD )
159
184
except InteractionModelError :
160
185
asserts .fail ("Unexpected error returned by DUT" )
161
186
0 commit comments