[thread-cert] refactor case 9.2.4 using pktverify (#5412)

1. add timestamp parse and check
2. add leader aloc parse and check
This commit is contained in:
Jing Ma
2020-09-22 09:41:39 -07:00
committed by GitHub
parent b5cc12c92c
commit f787275eee
7 changed files with 221 additions and 20 deletions
+43
View File
@@ -1248,6 +1248,49 @@ class Node:
self.send_command(cmd)
self._expect('Done')
def send_mgmt_active_get(
self,
active_timestamp=None,
channel=None,
channel_mask=None,
extended_panid=None,
panid=None,
master_key=None,
mesh_local=None,
network_name=None,
binary=None,
):
cmd = 'dataset mgmtgetcommand active '
if active_timestamp is not None:
cmd += 'activetimestamp %d ' % active_timestamp
if channel is not None:
cmd += 'channel %d ' % channel
if channel_mask is not None:
cmd += 'channelmask %d ' % channel_mask
if extended_panid is not None:
cmd += 'extpanid %s ' % extended_panid
if panid is not None:
cmd += 'panid %d ' % panid
if master_key is not None:
cmd += 'masterkey %s ' % master_key
if mesh_local is not None:
cmd += 'localprefix %s ' % mesh_local
if network_name is not None:
cmd += 'networkname %s ' % self._escape_escapable(network_name)
if binary is not None:
cmd += 'binary %s ' % binary
self.send_command(cmd)
def send_mgmt_pending_set(
self,
pending_timestamp=None,