[dataset] add support for wake-up channel (#10736)

- Add Wake-up Channel TLV to the dataset.
- Add CLI support to handle the wake-up channel.
- Add MAC support for wake-up channel (to be used for sending
  and receiving wake-up frames).
This commit is contained in:
Eduardo Montoya
2024-09-26 14:01:46 -07:00
committed by GitHub
parent b42be4cff1
commit 596c5aa6a2
23 changed files with 308 additions and 3 deletions
+7
View File
@@ -1762,6 +1762,7 @@ class OTCI(object):
#
# Active Timestamp: 1
# Channel: 22
# Wake-up Channel: 11
# Channel Mask: 0x07fff800
# Ext PAN ID: 5c93ae980ff22d35
# Mesh Local Prefix: fdc7:55fe:6363:bd01::/64
@@ -1781,6 +1782,8 @@ class OTCI(object):
dataset['active_timestamp'] = int(val)
elif key == 'Channel':
dataset['channel'] = int(val)
elif key == 'Wake-up Channel':
dataset['wakeupchannel'] = int(val)
elif key == 'Channel Mask':
dataset['channel_mask'] = int(val, 16)
elif key == 'Ext PAN ID':
@@ -1829,6 +1832,7 @@ class OTCI(object):
def dataset_set_buffer(self,
active_timestamp: Optional[int] = None,
channel: Optional[int] = None,
wakeupchannel: Optional[int] = None,
channel_mask: Optional[int] = None,
extpanid: Optional[str] = None,
mesh_local_prefix: Optional[str] = None,
@@ -1844,6 +1848,9 @@ class OTCI(object):
if channel is not None:
self.execute_command(f'dataset channel {channel}')
if wakeupchannel is not None:
self.execute_command(f'dataset wakeupchannel {wakeupchannel}')
if channel_mask is not None:
self.execute_command(f'dataset channelmask {channel_mask}')