def test05_verify_different_channel_changes_from_r1(self): # Request different channel changes from same router (router r1). self.r1.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '15') verify_channel(self.all_nodes, 14) self.r1.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '16') verify_channel(self.all_nodes, 16)
def test04_verify_same_channel_change_on_multiple_devices(self): # Request same channel change on multiple routers at the same time self.r1.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '14') self.r2.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '14') self.r3.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '14') verify_channel(self.all_nodes, 14)
def test02_switch_channel_after_detaching_sc2(self): # Reset sc2 and keep it in detached state self.sc2.set('Daemon:AutoAssociateAfterReset', 'false') self.sc2.reset_thread_radio() self.wait_for_completion(self.device_list) # Switch the rest of network to channel 26 self.router.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '26') verify_channel([self.router, self.sc1], 26)
def test06_verify_different_channel_changes_from_r1_and_r2(self): # Request different channels from two routers (r1 and r2) self.r1.set( wpan.WPAN_CHANNEL_MANAGER_DELAY, '20') # increase the time to ensure r1 change is in process self.r1.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '17') time.sleep(10.5) verify_channel(self.all_nodes, 16) self.r2.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '18') verify_channel(self.all_nodes, 18)
def test03_verify_channel_change(self): channel = self.network_data.channel verify(int(self.r1.get(wpan.WPAN_CHANNEL), 0) == channel) verify_channel(self.all_nodes, channel) # Request a channel change to channel 13 from router r1 self.r1.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL, '13') verify( int(self.r1.get(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL), 0) == 13) verify_channel(self.all_nodes, 13)