mirror of
https://github.com/espressif/openthread.git
synced 2026-08-17 07:59:51 +00:00
[low-power] add csl feature for Thread 1.2 (#4557)
This commit implements the CSL feature in Thread 1.2. - Add macro definitions for low power to control the compiling of source code. - Add data and methods for running CSL in Mac and SubMac. This mainly includes setting CSL parameters, starting/stopping CSL, and the timer handling process. - Add otPlatTimeGetAPI and implementation. - Add CSL transmission implementation. CSL transmission is a new kind of transmission, the related definition and implementaion for the whole transmitting process is added. - Add calling of start/stop CSL in certain cases. - Implement CSL synchronization maintainence. If a CSL cordinator didn't get a frame containing CSL IE for CSLTimeout, the CSL receiver is regarded as de-synchronized. - Add Cli interface for using CSL. - Implement enhanced Ack with IE. The original code can only generate auto ack for Imm-Ack. As CSL requires CSL IE included in enhanced ack. This PR implements it. - Add basic functional test for CSL transmission. More tests corresponding to test plan would be added later.
This commit is contained in:
@@ -660,6 +660,22 @@ class Node:
|
||||
self.send_command('pollperiod %d' % pollperiod)
|
||||
self._expect('Done')
|
||||
|
||||
def get_csl_info(self):
|
||||
self.send_command('csl')
|
||||
self._expect('Done')
|
||||
|
||||
def set_csl_channel(self, csl_channel):
|
||||
self.send_command('csl channel %d' % csl_channel)
|
||||
self._expect('Done')
|
||||
|
||||
def set_csl_period(self, csl_period):
|
||||
self.send_command('csl period %d' % csl_period)
|
||||
self._expect('Done')
|
||||
|
||||
def set_csl_timeout(self, csl_timeout):
|
||||
self.send_command('csl timeout %d' % csl_timeout)
|
||||
self._expect('Done')
|
||||
|
||||
def set_router_upgrade_threshold(self, threshold):
|
||||
cmd = 'routerupgradethreshold %d' % threshold
|
||||
self.send_command(cmd)
|
||||
|
||||
Reference in New Issue
Block a user