parameters: (self, timeout)
docstring: reset and join back Thread Network with a given timeout delay
  
          Args:
              timeout: a timeout interval before rejoin Thread Network
  
          Returns:
              True: successful to reset and rejoin Thread Network
              False: fail to reset and rejoin the Thread Network
docstring_summary: reset and join back Thread Network with a given timeout delay
docstring_tokens: reset and join back Thread Network with a given timeout delay
function: def resetAndRejoin(self, timeout):
          """reset and join back Thread Network with a given timeout delay
  
          Args:
              timeout: a timeout interval before rejoin Thread Network
  
          Returns:
              True: successful to reset and rejoin Thread Network
              False: fail to reset and rejoin the Thread Network
          """
          print('%s call resetAndRejoin' % self.port)
          print(timeout)
          try:
              if self.__sendCommand(self.wpan_cmd_prefix + 'setprop Daemon:AutoAssociateAfterReset false')[0] != 'Fail':
                  time.sleep(0.5)
                  if self.__sendCommand(self.wpan_cmd_prefix + 'reset')[0] != 'Fail':
                      self.isPowerDown = True
                  else:
                      return False
              else:
                  return False
              time.sleep(timeout)
  
              if self.deviceRole == Thread_Device_Role.SED:
                  self.__setPollPeriod(self.__sedPollPeriod)
  
              if self.__sendCommand(self.wpan_cmd_prefix + 'attach')[0] != 'Fail':
                  time.sleep(3)
              else:
                  return False
  
              if self.__sendCommand(self.wpan_cmd_prefix + 'setprop Daemon:AutoAssociateAfterReset true')[0] == 'Fail':
                  return False
  
              if self.__stripValue(self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:State')[0]) != 'associated':
                  print('[FAIL] reset and rejoin')
                  return False
              return True
          except Exception as e:
              ModuleHelper.WriteIntoDebugLogger('resetAndRejoin() Error: ' + str(e))
function_tokens: def resetAndRejoin ( self , timeout ) : print ( '%s call resetAndRejoin' % self . port ) print ( timeout ) try : if self . __sendCommand ( self . wpan_cmd_prefix + 'setprop Daemon:AutoAssociateAfterReset false' ) [ 0 ] != 'Fail' : time . sleep ( 0.5 ) if self . __sendCommand ( self . wpan_cmd_prefix + 'reset' ) [ 0 ] != 'Fail' : self . isPowerDown = True else : return False else : return False time . sleep ( timeout ) if self . deviceRole == Thread_Device_Role . SED : self . __setPollPeriod ( self . __sedPollPeriod ) if self . __sendCommand ( self . wpan_cmd_prefix + 'attach' ) [ 0 ] != 'Fail' : time . sleep ( 3 ) else : return False if self . __sendCommand ( self . wpan_cmd_prefix + 'setprop Daemon:AutoAssociateAfterReset true' ) [ 0 ] == 'Fail' : return False if self . __stripValue ( self . __sendCommand ( self . wpan_cmd_prefix + 'getprop -v NCP:State' ) [ 0 ] ) != 'associated' : print ( '[FAIL] reset and rejoin' ) return False return True except Exception as e : ModuleHelper . WriteIntoDebugLogger ( 'resetAndRejoin() Error: ' + str ( e ) )