mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 11:17:46 +00:00
Add Thread Certification 9.2.16 to automated test. (#770)
This commit is contained in:
@@ -259,6 +259,16 @@ class Node:
|
||||
self.send_command(cmd)
|
||||
self.pexpect.expect('Done')
|
||||
|
||||
def get_network_name(self):
|
||||
self.send_command('networkname')
|
||||
while True:
|
||||
i = self.pexpect.expect(['Done', '(\S+)'])
|
||||
if i != 0:
|
||||
network_name = self.pexpect.match.groups()[0].decode('utf-8')
|
||||
else:
|
||||
break
|
||||
return network_name
|
||||
|
||||
def set_network_name(self, network_name):
|
||||
cmd = 'networkname ' + network_name
|
||||
self.send_command(cmd)
|
||||
@@ -503,6 +513,28 @@ class Node:
|
||||
self.send_command(cmd)
|
||||
self.pexpect.expect('Done')
|
||||
|
||||
def send_mgmt_active_set(self, active_timestamp=None, channel=None, panid=None, mesh_local=None,
|
||||
network_name=None):
|
||||
cmd = 'dataset mgmtsetcommand active '
|
||||
|
||||
if active_timestamp != None:
|
||||
cmd += 'activetimestamp %d ' % active_timestamp
|
||||
|
||||
if channel != None:
|
||||
cmd += 'channel %d ' % channel
|
||||
|
||||
if panid != None:
|
||||
cmd += 'panid %d ' % panid
|
||||
|
||||
if mesh_local != None:
|
||||
cmd += 'localprefix ' + mesh_local + ' '
|
||||
|
||||
if network_name != None:
|
||||
cmd += 'networkname ' + network_name + ' '
|
||||
|
||||
self.send_command(cmd)
|
||||
self.pexpect.expect('Done')
|
||||
|
||||
def send_mgmt_pending_set(self, pending_timestamp=None, active_timestamp=None, delay_timer=None, channel=None,
|
||||
panid=None, master_key=None, mesh_local=None):
|
||||
cmd = 'dataset mgmtsetcommand pending '
|
||||
|
||||
Reference in New Issue
Block a user