-
Notifications
You must be signed in to change notification settings - Fork 2
/
base.yml
810 lines (809 loc) · 24.5 KB
/
base.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
---
strings:
- &UTEST Uri-Path option "test"
- &USEP Uri-Path option "separate"
- &UQUERY Uri-Path option "query"
- &UVAL Uri-Path option "validate"
- &CMID Client-generated Message ID (➔ CMID)
- &CMID2 Another client-generated Message ID ≠ CMID (➔ CMID2)
- &CMID3 Another client-generated Message ID ≠ CMID and ≠ CMID2 (➔ CMID3)
- &CMID4 Another client-generated Message ID ≠ CMID, CMID2, CMID3 (➔ CMID4)
- &CTOK Client-generated Token (➔ CTOK)
- &CTOK2 Client-generated Token which may or may not be ≠ CTOK (➔ CTOK2)
- &CTOK3 Client-generated Token which may or may not be ≠ CTOK or CTOK2 (➔ CTOK3)
- &CTOK4 Client-generated Token which may or may not be ≠ CTOK, CTOK2, CTOK3 (➔ CTOK4)
- &SAME_MID Message ID = CMID
- &SAME_MID_TOKEN Message ID = CMID, Token = CTOK
- &SAME_MID_TOKEN2 Message ID = CMID2, Token = CTOK2
- &SAME_MID_TOKEN3 Message ID = CMID3, Token = CTOK3
- &SAME_MID_TOKEN4 Message ID = CMID4, Token = CTOK4
- &SMID Server-generated Message ID (➔ SMID)
- &SAME_SMID Message ID = SMID
- &SAME_TOKEN Token = CTOK
- &SETAG Option type = ETag, value = a value chosen by the server (➔ ETAG1)
- &SETAG2 Option type = ETag, value = a value ≠ ETAG1 chosen by the server (➔ ETAG2)
- &OLP Zero or more Location-path options
- &CFO Content-format option
- &OCFO Optional Content-format option
- &ONEP Empty or non-empty Payload
- &CFONE Content-format option if payload non-empty
- &NEP Non-empty Payload
- &EP Empty Payload
- &ACK0S
c:
- 'Server sends response containing:'
- - Type = 2 (ACK)
- Code = 0
- *SAME_MID
- *EP
- &ACK0C
c:
- 'Client sends response containing:'
- - Type = 2 (ACK)
- Code = 0
- *SAME_SMID
- *EP
- &S205
c:
- 'Server sends response containing:'
- - Code = 2.05 (Content)
- *SAME_MID_TOKEN
- *CFO
- *NEP
TD_COAP_CORE_01:
obj: Perform GET transaction (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 1.2, 2.1, 2.2, 3.1"
pre: &TEST_GET Server offers the resource /test with resource content is not empty that handles
GET with an arbitrary payload
seq:
- s:
- 'Client is requested to send a GET request with:'
- - Type = 0 (CON)
- Code = 1 (GET)
- c:
- 'The request sent by the client contains:'
- - Type=0 and Code=1
- *CMID
- *CTOK
- *UTEST
- c:
- 'Server sends response containing:'
- - Code = 2.05 (Content)
- *SAME_MID_TOKEN
- *CFO
- *NEP
- v: Client displays the received information
TD_COAP_CORE_02:
obj: Perform DELETE transaction (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.4, 1.2, 2.1, 2.2, 3.1"
pre: Server offers a /test resource that handles DELETE
seq:
- s:
- 'Client is requested to send a DELETE request with:'
- - Type = 0 (CON)
- Code = 4 (DELETE)
- c:
- 'The request sent by the client contains:'
- - Type=0 and Code=4
- *CMID
- *CTOK
- *UTEST
- c:
- 'Server sends response containing:'
- - Code = 2.02 (Deleted)
- *SAME_MID_TOKEN
- *CFONE
- *ONEP
- v: Client displays the received information
TD_COAP_CORE_03:
obj: Perform PUT transaction (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.3, 1.2, 2.1, 2.2, 3.1"
pre: Server offers already available resource /test or accepts creation of new
resource on /test that handles PUT
seq:
- s:
- 'Client is requested to send a PUT request with:'
- - Type = 0 (CON)
- Code = 3 (PUT)
- *CFO
- *ONEP
- c:
- 'The request sent by the client contains:'
- - Type=0 and Code=3
- *CMID
- *CTOK
- *UTEST
- v: Server displays received information
- c:
- 'Server sends response containing:'
- - Code = 2.04 (Changed) or 2.01 (Created)
- *SAME_MID_TOKEN
- *CFONE
- *ONEP
- v: Client displays the received response
TD_COAP_CORE_04:
obj: Perform POST transaction (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.2, 1.2, 2.1, 2.2, 3.1"
pre: Server accepts POST request on /test
seq:
- s:
- 'Client is requested to send a POST request with:'
- - Type = 0 (CON)
- Code = 2(POST)
- *CFO
- *ONEP
- c:
- 'The request sent by the client contains:'
- - Type=0 and Code=2
- *CMID
- *CTOK
- *UTEST
- v: Server displays received information
- c:
- 'Server sends response containing:'
- - Code = 2.01 (Created) or 2.04 (Changed)
- *SAME_MID_TOKEN
- *CFONE
- *OLP
- *ONEP
- v: Client displays the received response
TD_COAP_CORE_05:
obj: Perform GET transaction (NON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 5.2.3"
pre: Server offers a /test resource with resource content is not empty that handles GET
seq:
- s:
- 'Client is requested to send a GET request with:'
- - Type = 1 (NON)
- Code = 1 (GET)
- c:
- 'The request sent by the client contains:'
- - Type=1 and Code=1
- *CMID
- *CTOK
- *UTEST
- c:
- 'Server sends response containing:'
- - Type = 1 (NON)
- Code = 2.05 (Content)
- *SMID
- *SAME_TOKEN
- *CFO
- v: Client displays the received information
TD_COAP_CORE_06:
obj: Perform DELETE transaction (NON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.4, 5.2.3"
pre: Server offers a /test resource that handles DELETE
seq:
- s:
- 'Client is requested to send a DELETE request with:'
- - Type = 1 (NON)
- Code = 4 (DELETE)
- c:
- 'The request sent by the client contains:'
- - Type=1 and Code=4
- *CMID
- *CTOK
- *UTEST
- c:
- 'Server sends response containing:'
- - Type = 1 (NON)
- Code = 2.02 (Deleted)
- *SMID
- *SAME_TOKEN
- *CFONE
- *ONEP
- v: Client displays the received information
TD_COAP_CORE_07:
obj: Perform PUT transaction (NON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.3, 5.2.3"
pre: Server offers a /test resource that handles PUT
seq:
- s:
- 'Client is requested to send a PUT request with:'
- - Type = 1 (NON)
- Code = 3 (PUT)
- An arbitrary payload
- *CFO
- c:
- 'The request sent by the client contains:'
- - Type=1 and Code=3
- *CMID
- *CTOK
- *UTEST
- v: Server displays the received information
- c:
- 'Server sends response containing:'
- - Type = 1 (NON)
- Code = 2.04 (Changed) or 2.01 (Created)
- *SMID
- *SAME_TOKEN
- *CFONE
- *ONEP
- v: Client displays the received response
TD_COAP_CORE_08:
obj: Perform POST transaction (NON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.2, 5.2.3"
pre: Server accepts POST request on /test
seq:
- s:
- 'Client is requested to send a POST request with:'
- - Type = 1 (NON)
- Code = 2(POST)
- An arbitrary payload
- *CFO
- c:
- 'The request sent by the client contains:'
- - Type=1 and Code=2
- *CMID
- *CTOK
- *UTEST
- v: Server displays the received information
- c:
- 'Server sends response containing:'
- - Type = 1 (NON)
- Code = 2.01 (Created) or 2.04 (Changed)
- *SMID
- *SAME_TOKEN
- *OLP
- *CFONE
- *ONEP
- v: Client displays the received response
TD_COAP_CORE_09:
obj: Perform GET transaction with separate response (CON mode, no piggyback)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 5.2.2"
pre: &PRE_SEPARATE Server offers a resource /separate which is not served immediately and which therefore is not acknowledged in a piggybacked way.
seq:
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID
- *USEP
- *CTOK
- *ACK0S
- n: Some time (a couple of seconds) elapses.
- c:
- 'Server sends response containing:'
- - Type = 0 (CON)
- Code = 2.05 (Content)
- *SMID
- *SAME_TOKEN
- *CFO
- *NEP
- *ACK0C
- v: Client displays the response
not: Steps 3 and 4 may occur out-of-order
TD_COAP_CORE_10:
obj: Perform GET transaction containing non-empty Token (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 2.2, 5.8.1, 5.10.1"
pre: Server offers a /test resource with resource content is not empty that handles
GET
seq:
- s: Client is requested to send a GET request to server’s resource with non-empty Token
option
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID
- *CTOK
- Length of the token should be between 1 to 8 Bytes
- *UTEST
- *S205
- v: Client displays the response
TD_COAP_CORE_11:
obj: Perform GET transaction containing non-empty Token with a separate response (CON
mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 2.2, 5.2.2, 5.8.1"
pre: *PRE_SEPARATE
seq:
- s: Client is requested to send a GET request to server’s resource including Token
option
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID
- *CTOK
- Length of the token should be between 1 to 8 Bytes
- *USEP
- *ACK0S
- n: Some time (a couple of seconds) elapses.
- c:
- 'Server sends response containing:'
- - Type = 0 (CON)
- Code = 2.05 (Content)
- *SMID
- *SAME_TOKEN
- *NEP
- *ACK0C
- v: Client displays the response
TD_COAP_CORE_12:
obj: Perform GET transaction using empty Token (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 2.2, 5.8.1, 5.10.1"
pre: *TEST_GET
seq:
- s: 'Client is requested to send a confirmable GET request using zero-length Token
to server’s resource '
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- Zero-Length Token ➔ CTOK
- *UTEST
- *S205
- v: Client displays the response
not: Not all clients may be able to send a zero-length Token
TD_COAP_CORE_13:
obj: Perform GET transaction containing several URI-Path options (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.4.5, 5.10.2, 6.5"
pre: Server offers a /seg1/seg2/seg3 resource with resource content is not empty
seq:
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID
- *CTOK
- *UTEST
- 'and three options of type Uri-Path, with the values:'
- - seg1
- seg2
- seg3
- *S205
- v: Client displays the response
TD_COAP_CORE_14:
obj: Perform GET transaction containing several URI-Query options (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.4.5, 5.10.2, 6.5"
pre: Server offers a /query resource with resource content is not empty
seq:
- s: Client is requested to send a confirmable GET request with three Query parameters
(e.g. ?first=1&second=2&third=3) to the server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID
- *CTOK
- *UQUERY
- 'and two options of Uri-Query, with values such as:'
- - first=1
- second=2
- *S205
- v: Client displays the response
TD_COAP_CORE_15:
obj: Perform GET transaction (CON mode, piggybacked response) in a lossy context
cfg: CoAP_CFG_LOSSY
ref: "[COAP] 4.4.1, 5.2.1, 5.8.1"
pre:
- Gateway is introduced and configured to produce packet losses
- Server offers a /test resource with resource content is not empty that can handle
GET
seq:
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'Sent request must contain:'
- - Type = 0
- Code = 1
- *CMID
- *CTOK
- *UTEST
- *S205
- v: Client displays the response
- c:
- 'Repeat steps 1-4 until at least one of the following actions has been observed:'
- - One dropped request
- One dropped response
- v:
- 'For each case mentioned in step 5:'
- Observe that retransmission is launched
TD_COAP_CORE_16:
obj: Perform GET transaction (CON mode, delayed response) in a lossy context
cfg: CoAP_CFG_LOSSY
ref: "[COAP] 4.4.1, 5.2.2, 5.8.1"
pre:
- Gateway is introduced and configured to produce packet losses
- *PRE_SEPARATE
seq:
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'The requested sent by the client contains:'
- - Type = 0
- Code = 1
- *CMID
- *USEP
- *ACK0S
- c:
- 'Server sends response containing:'
- - Type = 0 (CON)
- Code = 2.05 (Content)
- *SMID
- *NEP
- *CFO
- *ACK0C
- v: Client displays the response
- c:
- 'Repeat steps 1-6 until at least one of the following actions has been observed:'
- - One dropped request
- One dropped request ACK
- One dropped response
- One dropped response ACK and its retransmission
- c:
- 'For each case mentioned in step 7:'
- Observe that retransmission is launched
- c:
- 'For the dropped request ACK case:'
- Check that retransmission is also stopped by the arrival of the CON response
TD_COAP_CORE_17:
obj: Perform GET transaction with a separate response (NON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 2.2, 5.2.2, 5.8.1"
pre: *PRE_SEPARATE
seq:
- s: Client is requested to send a non-confirmable GET request to server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 1 (NON)
- Code = 1 (GET)
- *CMID
- *USEP
- c:
- 'Server DOES NOT send response containing:'
- - Type = 2 (ACK)
- Same message ID as in the request in step 2
- *EP
- n: Some time (a couple of seconds) elapses.
- c:
- 'Server sends response containing:'
- - Type = 1 (NON)
- Code = 2.05 (Content)
- *SMID
- *CFO
- *NEP
- v: Client displays the response
TD_COAP_CORE_18:
obj: Perform POST transaction with responses containing several Location-Path options
(CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 5.10.8, 5.9.1.1"
pre: Server accepts creation of new resource on /test and the created resource is
located at /location1/location2/location3 (resource does not exist yet)
seq:
- s: Client is requested to send a confirmable POST request to server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON
- Code = 2 (POST)
- An arbitrary payload
- *CFO
- *UTEST
- c:
- 'Server sends response containing:'
- - Code = 2.01 (Created)
- 'and three options of type Location-Path, with the values (none of which contains a "/"):'
- - location1
- location2
- location3
- v: Client displays the response
TD_COAP_CORE_19:
obj: Perform POST transaction with responses containing several Location-Query options
(CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 5.10.8, 5.9.1.1"
pre: Server accepts creation of new resource on uri /location-query, the location
of the created resource contains two query parameters ?first=1&second=2
seq:
- s: Client is requested to send a confirmable POST request to server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 2 (POST)
- *CMID
- *CTOK
- *CFO
- *ONEP
- Uri-Path option "location-query"
- c:
- 'Server sends response containing:'
- - Code = 2.01 (Created)
- *SAME_MID_TOKEN
- *CFONE
- *OLP
- *ONEP
- 'and two options of type Location-Query, with the values (none of which contains a "?" or "&"):'
- - first=1
- second=2
- v: Client displays the response
TD_COAP_CORE_20:
obj: Perform GET transaction containing the Accept option (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 5.10.5, 5.10.4"
pre:
- 'Server should provide a resource /multi-format which exists in two formats: '
- - text/plain;charset=utf-8
- application/xml
seq:
- n: client requests a resource in text format
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'The request sent request by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID
- *CTOK
- 'Option type = Accept, value = 0 (text/plain;charset=utf-8)'
- Uri-Path option "multi-format"
- c:
- 'Server sends response containing:'
- - Code = 2.05 (Content)
- *SAME_MID_TOKEN
- Option type = Content-Format, value = 0 (text/plain;charset=utf-8)
- Payload = Content of the requested resource in text/plain;charset=utf-8 format
- v: Client displays the response
- n: client requests a resource in xml format
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID2
- *CTOK2
- 'Option type = Accept, value = 41 (application/xml)'
- c:
- 'Server sends response containing:'
- - Code = 2.05 (Content)
- *SAME_MID_TOKEN2
- 'Option type = Content-Format, value = 41 (application/xml)'
- Payload = Content of the requested resource in application/xml format
- v: Client displays the response
TD_COAP_CORE_21:
obj: Perform GET transaction containing the ETag option (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 5.10.7, 5.10.10, 12.1.12"
pre:
- Server should offer a /validate resource which may be made to vary over time
- Client & server supports ETag option
- The Client’s cache must be purged
seq:
- n: Verifying that client cache is empty
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'The request sent request by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID
- *CTOK
- *UVAL
- No ETag option
- c:
- 'Server sends response containing:'
- - Code = 2.05 (Content)
- *SAME_MID_TOKEN
- *SETAG
- *NEP
- v: 'Client displays the response '
- n: Verifying client cache entry is still valid
- s: Client is requested to send a confirmable GET request to server’s resource
so as to check if the resource was updated
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID2
- *CTOK2
- *UVAL
- Option Type = ETag, value = ETAG1 (the ETag value received in step 3)
- c:
- 'Server sends response containing:'
- - Code = 2.03 (Valid)
- *SAME_MID_TOKEN2
- Option type = ETag, value = ETAG1
- *EP
- v: 'Client displays the response '
- n: Verifying that client cache entry is no longer valid
- s: Update the content of the server’s resource from a CoAP client (either another client, or the testing client in a separate transaction)
- s: Client is requested to send a confirmable GET request to server’s resource
so as to check if the resource was updated
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID3
- *CTOK3
- *UVAL
- Option Type = ETag, value = ETAG1 (the ETag value received in step 3)
- c:
- 'Server sends response containing:'
- - Code = 2.05 (Content)
- *SAME_MID_TOKEN3
- Option type = ETag, value = another ETag value ≠ ETAG1
- The payload of the requested resource, which should be different from the
payload in step 3
- v: Client displays the response
TD_COAP_CORE_22:
obj: Perform GET transaction with responses containing the ETag option and requests
containing the If-Match option (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 5.10.7, 5.10.9, 12.1.12"
pre:
- Server offers a /validate resource
- Client & server supports ETag and If-Match option
- The Client ‘s cache must be purged
seq:
- n: client gets the resource
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID
- *CTOK
- *UVAL
- No ETag option
- c:
- 'Server sends response containing:'
- - Code = 2.05 (Content)
- *SAME_MID_TOKEN
- *SETAG
- *NEP
- n: single update
- s: Client is requested to send a confirmable PUT request to server’s resource
so as to perform an atomic update
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 3 (PUT)
- *CMID2
- *CTOK2
- *CFO
- *UVAL
- Option type = If-Match, value = ETAG1 (ETag value received in step 3)
- An arbitrary payload (which differs from the payload received in step 3)
- c:
- 'Server sends response containing:'
- - Code = 2.04 (Changed)
- *SAME_MID_TOKEN2
- *CFONE
- *ONEP
- v: 'Client displays the response and the server changed its resource '
- n: concurrent updates
- s: Client is requested to send a confirmable GET request to server’s resource
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 1 (GET)
- *CMID3
- *CTOK3
- *UVAL
- c:
- 'Server sends response containing:'
- - Code = 2.05 (Content)
- *SAME_MID_TOKEN3
- *SETAG2
- The Payload sent in step 5
- v: 'Client displays the response '
- s: Update the content of the server’s resource from a CoAP client once more
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 3 (PUT)
- *CMID4
- *CTOK4
- *CFO
- *UVAL
- An arbitrary payload (which differs from the payloads received in steps 3 and 10)
- c:
- 'Server sends response containing:'
- - Code = 2.04 (Changed)
- *SAME_MID_TOKEN4
- *CFONE
- *ONEP
- v: 'Client displays the response and the server changed its resource '
- s: Client is requested to send a confirmable PUT request to server’s resource
so as to perform an atomic update, assuming it is still unchanged from step 10
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 3 (PUT)
- *CMID4
- *CTOK4
- *CFO
- *UVAL
- Option type = If-Match, value = ETAG2 (ETag value received in step 10)
- An arbitrary payload (which differs from the previous payloads)
- c:
- 'Server sends response containing:'
- - Code = 4.12 (Precondition Failed)
- *SAME_MID_TOKEN4
- *OCFO
- *ONEP
- v: Client displays the response and the server did not update the content of the
resource
TD_COAP_CORE_23:
obj: Perform PUT transaction containing the If-None-Match option (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 5.8.1, 5.10.7, 5.10.10, 12.1.12"
pre:
- Server offers a /create1 resource, which does not exist and can be created by the client
- Client & server support If-Non-Match
seq:
- n: single creation
- s: Client is requested to send a confirmable PUT request to server’s resource
so as to atomically create the resource.
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 3 (PUT)
- *CMID
- *CTOK
- *CFO
- Uri-Path option "create1"
- Option Type=If-None-Match
- An arbitrary payload
- c:
- 'Server sends response containing:'
- - Code = 2.01 (Created)
- *SAME_MID_TOKEN
- *CFONE
- *ONEP
- v: Client displays the response and the server created a new resource
- n: concurrent creations
- s: Client is requested to send a confirmable PUT request to server’s resource
so as to atomically create the resource.
- c:
- 'The request sent by the client contains:'
- - Type = 0 (CON)
- Code = 3 (PUT)
- *CMID2
- *CTOK2
- *CFO
- Uri-Path option "create1"
- Option Type=If-None-Match
- An arbitrary payload
- c:
- 'Server sends response containing:'
- - Code = 4.12 (Precondition Failed)
- *SAME_MID_TOKEN2
- *OCFO
- *ONEP
- v: Client displays the response
TD_COAP_CORE_31:
obj: Perform CoAP Ping (CON mode)
cfg: CoAP_CFG_BASIC
ref: "[COAP] 4.3"
pre: (Should work with any CoAP server)
seq:
- s:
- 'Client is requested to send a "Ping" request with:'
- - Type = 0 (CON)
- Code = 0 (empty)
- c:
- 'The request sent by the client is four bytes and contains:'
- - Type=0 and Code=0
- *CMID
- Zero-length Token
- No payload
- c:
- 'Server sends four-byte RST response containing:'
- - Type=3 and Code=0
- *SAME_MID
- Zero-length Token
- No payload
- v: Client displays that the "Ping" was successful