Lines Matching full:3
94 assert leshan.read(endpoint, '3/0/0') == 'Zephyr'
95 assert leshan.read(endpoint, '3/0/1') == 'client-1'
96 assert leshan.read(endpoint, '3/0/2') == 'serial-1'
100 ''' Verify that Device object match Configuration 3 '''
104 assert resp[0][3] == '1.2.3'
109 ''' Verify that server object match Configuration 3 '''
113 assert obj[0][3] == 10
122 resp = leshan.read(endpoint,'3/0')
130 resp = leshan.read(endpoint, '3/0')
139 leshan.write(endpoint, '1/0/3', 1010)
142 assert leshan.read(endpoint, '1/0/3') == 1010
145 leshan.write(endpoint, '1/0/3', 10)
148 assert leshan.read(endpoint, '1/0/3') == 10
168 leshan.write(endpoint, '1/0/3', 1010)
171 assert leshan.read(endpoint, '1/0/3') == 1010
174 leshan.write(endpoint, '1/0/3', 10)
188 3: 1010,
196 assert resp[0][3] == 1010
224 resp = leshan.read(endpoint, '3')
226 assert len(resp[3]) == 1
227 assert len(resp[3][0]) == 15
228 assert resp[3][0][0] == 'Zephyr'
234 resp = leshan.read(endpoint, '3/0')
247 assert leshan.read(endpoint, '3/0/11/0') == 0
292 resp = leshan.composite_read(endpoint, ['/3', '1/0'])
294 assert resp[3] is not None
296 assert len(resp[3][0]) == 15
299 resp = leshan.composite_read(endpoint, ['1/0/1', '/3/0/11/0'])
303 assert resp[3][0][11][0] is not None
315 "3": "dd"
329 assert resp[0][3] == "dd"
340 verify_device_object(leshan.read(endpoint, '3/0'))
341 assert leshan.read(endpoint, '3/0/16') == 'U'
342 assert leshan.read(endpoint, '3/0/11/0') == 0
385 expected_keys = [1, 3, 5]
391 resp = leshan.composite_read(endpoint, ['1/0', '/3/0/11/0', '/3339/0/5522', '/3353/0/6030'])
393 assert resp[3][0][11][0] is not None
401 assert leshan.read(endpoint, '3')[3][0][0] == 'Zephyr'
406 leshan.execute(endpoint, '3/0/4')
425 "/3/0/13": datetime.fromtimestamp(0)
433 # Cannot verify the /3/0/13, it is a timestamp that moves forward.
436 shell.exec_command(f'lwm2m write /3/0/13 -u32 {int(datetime.now().timestamp())}')
443 resp = leshan.discover(endpoint, '3')
444 …expected_keys = ['/3', '/3/0', '/3/0/1', '/3/0/2', '/3/0/3', '/3/0/4', '/3/0/6', '/3/0/7', '/3/0/8…
447 …assert leshan.write_attributes(endpoint, '3', {'pmin': 10, 'pmax': 200})['status'] == 'CHANGED(204…
448 resp = leshan.discover(endpoint, '3/0')
449 assert int(resp['/3/0/6']['dim']) == 2
450 assert int(resp['/3/0/7']['dim']) == 2
451 assert int(resp['/3/0/8']['dim']) == 2
452 …assert leshan.write_attributes(endpoint, '3/0/7', {'lt': 1, 'gt': 6, 'st': 1})['status'] == 'CHANG…
453 resp = leshan.discover(endpoint, '3/0')
454 …expected_keys = ['/3/0', '/3/0/1', '/3/0/2', '/3/0/3', '/3/0/4', '/3/0/6', '/3/0/7', '/3/0/8', '/3…
457 assert int(resp['/3/0/7']['dim']) == 2
458 assert float(resp['/3/0/7']['lt']) == 1.0
459 assert float(resp['/3/0/7']['gt']) == 6.0
460 assert float(resp['/3/0/7']['st']) == 1.0
461 resp = leshan.discover(endpoint, '3/0/7')
462 expected_keys = ['/3/0/7', '/3/0/7/0', '/3/0/7/1']
467 leshan.remove_attributes(endpoint, '3', ['pmin', 'pmax'])
471 resp = leshan.discover(endpoint, '3/0/11')
473 expected_keys = ['/3/0/11', '/3/0/11/0']
477 assert int(resp['/3/0/11']['dim']) == 1
478 … assert leshan.write_attributes(endpoint, '3', {'pmin':10, 'pmax':200})['status'] == 'CHANGED(204)'
479 assert leshan.write_attributes(endpoint, '3/0', {'pmax':320})['status'] == 'CHANGED(204)'
480 …assert leshan.write_attributes(endpoint, '3/0/11/0', {'pmax':100, 'epmin':1, 'epmax':20})['status'…
481 resp = leshan.discover(endpoint, '3/0/11')
483 assert int(resp['/3/0/11']['pmin']) == 10
484 assert int(resp['/3/0/11']['pmax']) == 320
485 assert int(resp['/3/0/11/0']['pmax']) == 100
488 leshan.remove_attributes(endpoint, '3', ['pmin', 'pmax'])
489 leshan.remove_attributes(endpoint, '3/0', ['pmax'])
490 leshan.remove_attributes(endpoint, '3/0/11/0', ['pmax'])
495 resp = leshan.composite_read(endpoint, ['/3/0/16', '/3/0/11/0', '/1/0'])
498 assert len(resp[3]) == 1
499 assert len(resp[3][0]) == 2 # No extra resources
500 assert resp[3][0][11][0] == 0
501 assert resp[3][0][16] == 'U'
522 pwr_src = leshan.read(endpoint, '3/0/6')
526 …assert leshan.write_attributes(endpoint, '3/0/7', {'pmin': 5, 'pmax': 10})['status'] == 'CHANGED(2…
527 leshan.observe(endpoint, '3/0/7')
529 shell.exec_command('lwm2m write /3/0/7/0 -u32 3000')
532 assert data[3][0][7][0] == 3000
535 shell.exec_command('lwm2m write /3/0/7/0 -u32 3500')
537 assert data[3][0][7][0] == 3500
542 assert data[3][0][7][0] == 3500
544 leshan.cancel_observe(endpoint, '3/0/7')
545 leshan.remove_attributes(endpoint, '3/0/7', ['pmin', 'pmax'])
549 leshan.observe(endpoint, '3/0/7')
550 leshan.observe(endpoint, '3/0/8')
552 shell.exec_command('lwm2m write /3/0/7/0 -u32 4000')
554 assert data[3][0][7][0] == 4000
555 leshan.passive_cancel_observe(endpoint, '3/0/7')
556 shell.exec_command('lwm2m write /3/0/7/0 -u32 3000')
557 dut.readlines_until(regex=r'.*Observer removed for 3/0/7')
559 shell.exec_command('lwm2m write /3/0/8/0 -u32 100')
561 assert data[3][0][8][0] == 100
562 leshan.passive_cancel_observe(endpoint, '3/0/8')
563 shell.exec_command('lwm2m write /3/0/8/0 -u32 50')
564 dut.readlines_until(regex=r'.*Observer removed for 3/0/8')
568 leshan.observe(endpoint, '3/0/7')
569 leshan.observe(endpoint, '3/0/8')
571 shell.exec_command('lwm2m write /3/0/7/0 -u32 4000')
573 assert data[3][0][7][0] == 4000
574 leshan.cancel_observe(endpoint, '3/0/7')
575 dut.readlines_until(regex=r'.*Observer removed for 3/0/7')
577 shell.exec_command('lwm2m write /3/0/8/0 -u32 100')
579 assert data[3][0][8][0] == 100
580 leshan.cancel_observe(endpoint, '3/0/8')
581 dut.readlines_until(regex=r'.*Observer removed for 3/0/8')
588 shell.exec_command('lwm2m write 1/0/3 -u32 0')
590 data = leshan.composite_observe(endpoint, ['/1/0/1', '/3/0/11/0', '/3/0/16'])
592 assert data[3][0][11][0] is not None
593 assert data[3][0][16] == 'U'
596 assert len(data[3][0]) == 2
602 assert data[3][0][11][0] is not None
603 assert data[3][0][16] == 'U'
606 assert len(data[3][0]) == 2
609 leshan.cancel_composite_observe(endpoint, ['/1/0/1', '/3/0/11/0', '/3/0/16'])
610 # Restore configuration C.3
612 shell.exec_command('lwm2m write 1/0/3 -u32 10')
617 leshan.composite_observe(endpoint, ['/1/0/1', '/3/0/11/0', '/3/0/16'])
618 leshan.cancel_composite_observe(endpoint, ['/1/0/1', '/3/0/11/0', '/3/0/16'])
620 dut.readlines_until(regex=r'.*Observer removed for 3/0/11/0')
621 dut.readlines_until(regex=r'.*Observer removed for 3/0/16')
626 shell.exec_command('lwm2m send /1 /3')
631 verify_device_object(data[3])
636 lines = shell.get_filtered_output(shell.exec_command('lwm2m send /3/0'))
639 shell.exec_command('lwm2m send /3/0')
650 shell.exec_command('lwm2m write 1/0/3 -u32 0')
655 3: 'dd'}
662 3: '44'}
680 # Restore configuration C.3
682 shell.exec_command('lwm2m write 1/0/3 -u32 10')
692 shell.exec_command('lwm2m write 1/0/3 -u32 0')
697 3: 'dd'}
704 3: '44'}
723 # Restore configuration C.3
725 shell.exec_command('lwm2m write 1/0/3 -u32 10')
733 shell.exec_command('lwm2m write 1/0/3 -u32 0')
734 leshan.composite_observe(endpoint, ['/1/0/1', '/3/0'])
736 assert leshan.write_attributes(endpoint, '3', {'pmax': 5})['status'] == 'CHANGED(204)'
739 assert data[3][0][0] == 'Zephyr'
745 leshan.cancel_composite_observe(endpoint, ['/1/0/1', '/3/0'])
746 # Restore configuration C.3
748 shell.exec_command('lwm2m write 1/0/3 -u32 10')
749 leshan.remove_attributes(endpoint, '3', ['pmax'])
754 shell.exec_command('lwm2m send /1/0/1 /3/0/11')
756 assert data == {3: {0: {11: {0: 0}}}, 1: {0: {1: 86400}}}