Cli: update 'keysequence' to make keyswithguardtime configurable (#815)

* Cli: update 'keysequence' to make keyswithguardtime configurable
This commit is contained in:
rongli
2016-10-16 22:49:31 -07:00
committed by Jonathan Hui
parent 8468ffdb77
commit aaf5a57ea2
25 changed files with 289 additions and 76 deletions
+31 -7
View File
@@ -850,22 +850,46 @@ class SpinelCliCmd(Cmd, SpinelCodec):
def do_keysequence(self, line):
"""
keysequence
keysequence counter
Get the Thread Key Sequence.
Get the Thread Key Sequence Counter.
> keysequence
> keysequence counter
10
Done
keysequence <keysequence>
keysequence counter <counter>
Set the Thread Key Sequence.
Set the Thread Key Sequence Counter.
> keysequence 10
> keysequence counter 10
Done
keysequence guardtime
Get the thrKeySwitchGuardTime (in hours).
> keysequence guardtime
0
Done
keysequence guardtime <guardtime>
Set the thrKeySwitchGuardTime (in hours).
> keysequence guardtime 0
Done
"""
self.handle_property(line, SPINEL.PROP_NET_KEY_SEQUENCE, 'L')
args = line.split(" ")
if args[0] == "counter":
newline = line.replace("counter","")
self.handle_property(newline, SPINEL.PROP_NET_KEY_SEQUENCE_COUNTER, 'L')
elif args[0] == "guardtime":
newline = line.replace("guardtime","")
self.handle_property(newline, SPINEL.PROP_NET_KEY_SWITCH_GUARDTIME, 'L')
def do_leaderdata(self, line):
"""