Guest User

Untitled

a guest
Aug 13th, 2017
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. moteinotest.py(10): mynetwork = MoteinoNetwork(port='/dev/ttyAMA0', frequency=MoteinoNetwork.RF69_868MHZ, high_power=False, network_id=1, base_id=1, encryption_key='0123456789abcdef')
  2. --- modulename: moteino23, funcname: __init__
  3. moteino23.py(518): if port is None:
  4. moteino23.py(521): self._Serial = MySerial(port=port, baudrate=115200)
  5. --- modulename: moteino23, funcname: __init__
  6. moteino23.py(19): self.Serial = serial.Serial(**kwargs)
  7. --- modulename: serialutil, funcname: __init__
  8. serialutil.py(196): self.is_open = False
  9. serialutil.py(197): self.portstr = None
  10. serialutil.py(198): self.name = None
  11. serialutil.py(200): self._port = None
  12. serialutil.py(201): self._baudrate = None
  13. serialutil.py(202): self._bytesize = None
  14. serialutil.py(203): self._parity = None
  15. serialutil.py(204): self._stopbits = None
  16. serialutil.py(205): self._timeout = None
  17. serialutil.py(206): self._write_timeout = None
  18. serialutil.py(207): self._xonxoff = None
  19. serialutil.py(208): self._rtscts = None
  20. serialutil.py(209): self._dsrdtr = None
  21. serialutil.py(210): self._inter_byte_timeout = None
  22. serialutil.py(211): self._rs485_mode = None # disabled by default
  23. serialutil.py(212): self._rts_state = True
  24. serialutil.py(213): self._dtr_state = True
  25. serialutil.py(214): self._break_state = False
  26. serialutil.py(215): self._exclusive = None
  27. serialutil.py(218): self.port = port
  28. --- modulename: serialutil, funcname: port
  29. serialutil.py(263): if port is not None and not isinstance(port, basestring):
  30. serialutil.py(265): was_open = self.is_open
  31. serialutil.py(266): if was_open:
  32. serialutil.py(268): self.portstr = port
  33. serialutil.py(269): self._port = port
  34. serialutil.py(270): self.name = self.portstr
  35. serialutil.py(271): if was_open:
  36. serialutil.py(219): self.baudrate = baudrate
  37. --- modulename: serialutil, funcname: baudrate
  38. serialutil.py(286): try:
  39. serialutil.py(287): b = int(baudrate)
  40. serialutil.py(291): if b < 0:
  41. serialutil.py(293): self._baudrate = b
  42. serialutil.py(294): if self.is_open:
  43. serialutil.py(220): self.bytesize = bytesize
  44. --- modulename: serialutil, funcname: bytesize
  45. serialutil.py(305): if bytesize not in self.BYTESIZES:
  46. serialutil.py(307): self._bytesize = bytesize
  47. serialutil.py(308): if self.is_open:
  48. serialutil.py(221): self.parity = parity
  49. --- modulename: serialutil, funcname: parity
  50. serialutil.py(331): if parity not in self.PARITIES:
  51. serialutil.py(333): self._parity = parity
  52. serialutil.py(334): if self.is_open:
  53. serialutil.py(222): self.stopbits = stopbits
  54. --- modulename: serialutil, funcname: stopbits
  55. serialutil.py(345): if stopbits not in self.STOPBITS:
  56. serialutil.py(347): self._stopbits = stopbits
  57. serialutil.py(348): if self.is_open:
  58. serialutil.py(223): self.timeout = timeout
  59. --- modulename: serialutil, funcname: timeout
  60. serialutil.py(359): if timeout is not None:
  61. serialutil.py(366): self._timeout = timeout
  62. serialutil.py(367): if self.is_open:
  63. serialutil.py(224): self.write_timeout = write_timeout
  64. --- modulename: serialutil, funcname: write_timeout
  65. serialutil.py(378): if timeout is not None:
  66. serialutil.py(386): self._write_timeout = timeout
  67. serialutil.py(387): if self.is_open:
  68. serialutil.py(225): self.xonxoff = xonxoff
  69. --- modulename: serialutil, funcname: xonxoff
  70. serialutil.py(418): self._xonxoff = xonxoff
  71. serialutil.py(419): if self.is_open:
  72. serialutil.py(226): self.rtscts = rtscts
  73. --- modulename: serialutil, funcname: rtscts
  74. serialutil.py(430): self._rtscts = rtscts
  75. serialutil.py(431): if self.is_open:
  76. serialutil.py(227): self.dsrdtr = dsrdtr
  77. --- modulename: serialutil, funcname: dsrdtr
  78. serialutil.py(442): if dsrdtr is None:
  79. serialutil.py(447): self._dsrdtr = dsrdtr
  80. serialutil.py(448): if self.is_open:
  81. serialutil.py(228): self.inter_byte_timeout = inter_byte_timeout
  82. --- modulename: serialutil, funcname: inter_byte_timeout
  83. serialutil.py(398): if ic_timeout is not None:
  84. serialutil.py(406): self._inter_byte_timeout = ic_timeout
  85. serialutil.py(407): if self.is_open:
  86. serialutil.py(229): self.exclusive = exclusive
  87. --- modulename: serialutil, funcname: exclusive
  88. serialutil.py(319): self._exclusive = exclusive
  89. serialutil.py(320): if self.is_open:
  90. serialutil.py(232): if 'writeTimeout' in kwargs:
  91. serialutil.py(234): if 'interCharTimeout' in kwargs:
  92. serialutil.py(236): if kwargs:
  93. serialutil.py(239): if port is not None:
  94. serialutil.py(240): self.open()
  95. --- modulename: serialposix, funcname: open
  96. serialposix.py(258): if self._port is None:
  97. serialposix.py(260): if self.is_open:
  98. serialposix.py(262): self.fd = None
  99. serialposix.py(264): try:
  100. serialposix.py(265): self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
  101. serialposix.py(271): try:
  102. serialposix.py(272): self._reconfigure_port(force_update=True)
  103. --- modulename: serialposix, funcname: _reconfigure_port
  104. serialposix.py(303): if self.fd is None:
  105. serialposix.py(307): if self._exclusive is not None:
  106. serialposix.py(316): custom_baud = None
  107. serialposix.py(318): vmin = vtime = 0 # timeout is done via select
  108. serialposix.py(319): if self._inter_byte_timeout is not None:
  109. serialposix.py(322): try:
  110. serialposix.py(323): orig_attr = termios.tcgetattr(self.fd)
  111. serialposix.py(324): iflag, oflag, cflag, lflag, ispeed, ospeed, cc = orig_attr
  112. serialposix.py(328): cflag |= (termios.CLOCAL | termios.CREAD)
  113. serialposix.py(329): lflag &= ~(termios.ICANON | termios.ECHO | termios.ECHOE |
  114. serialposix.py(331): termios.ISIG | termios.IEXTEN) # |termios.ECHOPRT
  115. serialposix.py(332): for flag in ('ECHOCTL', 'ECHOKE'): # netbsd workaround for Erk
  116. serialposix.py(333): if hasattr(termios, flag):
  117. serialposix.py(334): lflag &= ~getattr(termios, flag)
  118. serialposix.py(332): for flag in ('ECHOCTL', 'ECHOKE'): # netbsd workaround for Erk
  119. serialposix.py(333): if hasattr(termios, flag):
  120. serialposix.py(334): lflag &= ~getattr(termios, flag)
  121. serialposix.py(332): for flag in ('ECHOCTL', 'ECHOKE'): # netbsd workaround for Erk
  122. serialposix.py(336): oflag &= ~(termios.OPOST | termios.ONLCR | termios.OCRNL)
  123. serialposix.py(337): iflag &= ~(termios.INLCR | termios.IGNCR | termios.ICRNL | termios.IGNBRK)
  124. serialposix.py(338): if hasattr(termios, 'IUCLC'):
  125. serialposix.py(339): iflag &= ~termios.IUCLC
  126. serialposix.py(340): if hasattr(termios, 'PARMRK'):
  127. serialposix.py(341): iflag &= ~termios.PARMRK
  128. serialposix.py(344): try:
  129. serialposix.py(345): ispeed = ospeed = getattr(termios, 'B{}'.format(self._baudrate))
  130. serialposix.py(362): cflag &= ~termios.CSIZE
  131. serialposix.py(363): if self._bytesize == 8:
  132. serialposix.py(364): cflag |= termios.CS8
  133. serialposix.py(374): if self._stopbits == serial.STOPBITS_ONE:
  134. serialposix.py(375): cflag &= ~(termios.CSTOPB)
  135. serialposix.py(383): iflag &= ~(termios.INPCK | termios.ISTRIP)
  136. serialposix.py(384): if self._parity == serial.PARITY_NONE:
  137. serialposix.py(385): cflag &= ~(termios.PARENB | termios.PARODD | CMSPAR)
  138. serialposix.py(401): if hasattr(termios, 'IXANY'):
  139. serialposix.py(402): if self._xonxoff:
  140. serialposix.py(405): iflag &= ~(termios.IXON | termios.IXOFF | termios.IXANY)
  141. serialposix.py(412): if hasattr(termios, 'CRTSCTS'):
  142. serialposix.py(413): if self._rtscts:
  143. serialposix.py(416): cflag &= ~(termios.CRTSCTS)
  144. serialposix.py(426): if vmin < 0 or vmin > 255:
  145. serialposix.py(428): cc[termios.VMIN] = vmin
  146. serialposix.py(430): if vtime < 0 or vtime > 255:
  147. serialposix.py(432): cc[termios.VTIME] = vtime
  148. serialposix.py(434): if force_update or [iflag, oflag, cflag, lflag, ispeed, ospeed, cc] != orig_attr:
  149. serialposix.py(435): termios.tcsetattr(
  150. serialposix.py(436): self.fd,
  151. serialposix.py(437): termios.TCSANOW,
  152. serialposix.py(438): [iflag, oflag, cflag, lflag, ispeed, ospeed, cc])
  153. serialposix.py(441): if custom_baud is not None:
  154. serialposix.py(444): if self._rs485_mode is not None:
  155. serialposix.py(283): self.is_open = True
  156. serialposix.py(284): try:
  157. serialposix.py(285): if not self._dsrdtr:
  158. serialposix.py(286): self._update_dtr_state()
  159. --- modulename: serialposix, funcname: _update_dtr_state
  160. serialposix.py(633): if self._dtr_state:
  161. serialposix.py(634): fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
  162. serialposix.py(287): if not self._rtscts:
  163. serialposix.py(288): self._update_rts_state()
  164. --- modulename: serialposix, funcname: _update_rts_state
  165. serialposix.py(626): if self._rts_state:
  166. serialposix.py(627): fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_RTS_str)
  167. serialposix.py(295): self.reset_input_buffer()
  168. --- modulename: serialposix, funcname: reset_input_buffer
  169. serialposix.py(593): if not self.is_open:
  170. serialposix.py(595): termios.tcflush(self.fd, termios.TCIFLUSH)
  171. serialposix.py(296): self.pipe_abort_read_r, self.pipe_abort_read_w = os.pipe()
  172. serialposix.py(297): self.pipe_abort_write_r, self.pipe_abort_write_w = os.pipe()
  173. serialposix.py(298): fcntl.fcntl(self.pipe_abort_read_r, fcntl.F_SETFL, os.O_NONBLOCK)
  174. serialposix.py(299): fcntl.fcntl(self.pipe_abort_write_r, fcntl.F_SETFL, os.O_NONBLOCK)
  175. moteino23.py(20): self.read = self.Serial.read
  176. moteino23.py(21): self.readline = self.Serial.readline
  177. moteino23.py(22): self.isOpen = self.Serial.isOpen
  178. moteino23.py(23): self.open = self.Serial.open
  179. moteino23.py(24): self.close = self.Serial.close
  180. moteino23.py(523): if init_base:
  181. moteino23.py(524): self._initiate_base(frequency, high_power, network_id, base_id, encryption_key, promiscous_mode)
  182. --- modulename: moteino23, funcname: _initiate_base
  183. moteino23.py(566): self._Serial.write('X') # send reset sign
  184. --- modulename: moteino23, funcname: write
  185. moteino23.py(27): if isinstance(s, unicode):
  186. moteino23.py(30): self.Serial.write(s)
  187. --- modulename: serialposix, funcname: write
  188. serialposix.py(530): if not self.is_open:
  189. serialposix.py(532): d = to_bytes(data)
  190. --- modulename: serialutil, funcname: to_bytes
  191. serialutil.py(56): if isinstance(seq, bytes):
  192. serialutil.py(57): return seq
  193. serialposix.py(533): tx_len = length = len(d)
  194. serialposix.py(534): timeout = Timeout(self._write_timeout)
  195. --- modulename: serialutil, funcname: __init__
  196. serialutil.py(125): self.is_infinite = (duration is None)
  197. serialutil.py(126): self.is_non_blocking = (duration == 0)
  198. serialutil.py(127): self.duration = duration
  199. serialutil.py(128): if duration is not None:
  200. serialutil.py(131): self.target_time = None
  201. serialposix.py(535): while tx_len > 0:
  202. serialposix.py(536): try:
  203. serialposix.py(537): n = os.write(self.fd, d)
  204. serialposix.py(538): if timeout.is_non_blocking:
  205. serialposix.py(542): elif not timeout.is_infinite:
  206. serialposix.py(554): assert timeout.time_left() is None
  207. --- modulename: serialutil, funcname: time_left
  208. serialutil.py(139): if self.is_non_blocking:
  209. serialutil.py(141): elif self.is_infinite:
  210. serialutil.py(142): return None
  211. serialposix.py(556): abort, ready, _ = select.select([self.pipe_abort_write_r], [self.fd], [], None)
  212. serialposix.py(557): if abort:
  213. serialposix.py(560): if not ready:
  214. serialposix.py(562): d = d[n:]
  215. serialposix.py(563): tx_len -= n
  216. serialposix.py(578): if not timeout.is_non_blocking and timeout.expired():
  217. --- modulename: serialutil, funcname: expired
  218. serialutil.py(135): return self.target_time is not None and self.time_left() <= 0
  219. serialposix.py(535): while tx_len > 0:
  220. serialposix.py(580): return length - len(d)
  221. moteino23.py(567): logging.debug("Restarting base")
  222. --- modulename: __init__, funcname: debug
  223. __init__.py(1628): if len(root.handlers) == 0:
  224. __init__.py(1629): basicConfig()
  225. --- modulename: __init__, funcname: basicConfig
  226. __init__.py(1534): _acquireLock()
  227. --- modulename: __init__, funcname: _acquireLock
  228. __init__.py(217): if _lock:
  229. __init__.py(218): _lock.acquire()
  230. --- modulename: threading, funcname: acquire
  231. threading.py(168): me = _get_ident()
  232. threading.py(169): if self.__owner == me:
  233. threading.py(174): rc = self.__block.acquire(blocking)
  234. threading.py(175): if rc:
  235. threading.py(176): self.__owner = me
  236. threading.py(177): self.__count = 1
  237. threading.py(179): self._note("%s.acquire(%s): initial success", self, blocking)
  238. --- modulename: threading, funcname: _note
  239. threading.py(65): if self.__verbose:
  240. threading.py(183): return rc
  241. __init__.py(1535): try:
  242. __init__.py(1536): if len(root.handlers) == 0:
  243. __init__.py(1537): filename = kwargs.get("filename")
  244. __init__.py(1538): if filename:
  245. __init__.py(1542): stream = kwargs.get("stream")
  246. __init__.py(1543): hdlr = StreamHandler(stream)
  247. --- modulename: __init__, funcname: __init__
  248. __init__.py(831): Handler.__init__(self)
  249. --- modulename: __init__, funcname: __init__
  250. __init__.py(668): Filterer.__init__(self)
  251. --- modulename: __init__, funcname: __init__
  252. __init__.py(589): self.filters = []
  253. __init__.py(669): self._name = None
  254. __init__.py(670): self.level = _checkLevel(level)
  255. --- modulename: __init__, funcname: _checkLevel
  256. __init__.py(184): if isinstance(level, (int, long)):
  257. __init__.py(185): rv = level
  258. __init__.py(192): return rv
  259. __init__.py(671): self.formatter = None
  260. __init__.py(673): _addHandlerRef(self)
  261. --- modulename: __init__, funcname: _addHandlerRef
  262. __init__.py(648): _acquireLock()
  263. --- modulename: __init__, funcname: _acquireLock
  264. __init__.py(217): if _lock:
  265. __init__.py(218): _lock.acquire()
  266. --- modulename: threading, funcname: acquire
  267. threading.py(168): me = _get_ident()
  268. threading.py(169): if self.__owner == me:
  269. threading.py(170): self.__count = self.__count + 1
  270. threading.py(172): self._note("%s.acquire(%s): recursive success", self, blocking)
  271. --- modulename: threading, funcname: _note
  272. threading.py(65): if self.__verbose:
  273. threading.py(173): return 1
  274. __init__.py(649): try:
  275. __init__.py(650): _handlerList.append(weakref.ref(handler, _removeHandlerRef))
  276. __init__.py(652): _releaseLock()
  277. --- modulename: __init__, funcname: _releaseLock
  278. __init__.py(224): if _lock:
  279. __init__.py(225): _lock.release()
  280. --- modulename: threading, funcname: release
  281. threading.py(203): if self.__owner != _get_ident():
  282. threading.py(205): self.__count = count = self.__count - 1
  283. threading.py(206): if not count:
  284. threading.py(213): self._note("%s.release(): non-final release", self)
  285. --- modulename: threading, funcname: _note
  286. threading.py(65): if self.__verbose:
  287. __init__.py(674): self.createLock()
  288. --- modulename: __init__, funcname: createLock
  289. __init__.py(696): if thread:
  290. __init__.py(697): self.lock = threading.RLock()
  291. --- modulename: threading, funcname: RLock
  292. threading.py(123): return _RLock(*args, **kwargs)
  293. --- modulename: threading, funcname: __init__
  294. threading.py(133): _Verbose.__init__(self, verbose)
  295. --- modulename: threading, funcname: __init__
  296. threading.py(60): if verbose is None:
  297. threading.py(61): verbose = _VERBOSE
  298. threading.py(62): self.__verbose = verbose
  299. threading.py(134): self.__block = _allocate_lock()
  300. threading.py(135): self.__owner = None
  301. threading.py(136): self.__count = 0
  302. __init__.py(832): if stream is None:
  303. __init__.py(833): stream = sys.stderr
  304. __init__.py(834): self.stream = stream
  305. __init__.py(1544): fs = kwargs.get("format", BASIC_FORMAT)
  306. __init__.py(1545): dfs = kwargs.get("datefmt", None)
  307. __init__.py(1546): fmt = Formatter(fs, dfs)
  308. --- modulename: __init__, funcname: __init__
  309. __init__.py(405): if fmt:
  310. __init__.py(406): self._fmt = fmt
  311. __init__.py(409): self.datefmt = datefmt
  312. __init__.py(1547): hdlr.setFormatter(fmt)
  313. --- modulename: __init__, funcname: setFormatter
  314. __init__.py(766): self.formatter = fmt
  315. __init__.py(1548): root.addHandler(hdlr)
  316. --- modulename: __init__, funcname: addHandler
  317. __init__.py(1295): _acquireLock()
  318. --- modulename: __init__, funcname: _acquireLock
  319. __init__.py(217): if _lock:
  320. __init__.py(218): _lock.acquire()
  321. --- modulename: threading, funcname: acquire
  322. threading.py(168): me = _get_ident()
  323. threading.py(169): if self.__owner == me:
  324. threading.py(170): self.__count = self.__count + 1
  325. threading.py(172): self._note("%s.acquire(%s): recursive success", self, blocking)
  326. --- modulename: threading, funcname: _note
  327. threading.py(65): if self.__verbose:
  328. threading.py(173): return 1
  329. __init__.py(1296): try:
  330. __init__.py(1297): if not (hdlr in self.handlers):
  331. __init__.py(1298): self.handlers.append(hdlr)
  332. __init__.py(1300): _releaseLock()
  333. --- modulename: __init__, funcname: _releaseLock
  334. __init__.py(224): if _lock:
  335. __init__.py(225): _lock.release()
  336. --- modulename: threading, funcname: release
  337. threading.py(203): if self.__owner != _get_ident():
  338. threading.py(205): self.__count = count = self.__count - 1
  339. threading.py(206): if not count:
  340. threading.py(213): self._note("%s.release(): non-final release", self)
  341. --- modulename: threading, funcname: _note
  342. threading.py(65): if self.__verbose:
  343. __init__.py(1549): level = kwargs.get("level")
  344. __init__.py(1550): if level is not None:
  345. __init__.py(1553): _releaseLock()
  346. --- modulename: __init__, funcname: _releaseLock
  347. __init__.py(224): if _lock:
  348. __init__.py(225): _lock.release()
  349. --- modulename: threading, funcname: release
  350. threading.py(203): if self.__owner != _get_ident():
  351. threading.py(205): self.__count = count = self.__count - 1
  352. threading.py(206): if not count:
  353. threading.py(207): self.__owner = None
  354. threading.py(208): self.__block.release()
  355. threading.py(210): self._note("%s.release(): final release", self)
  356. --- modulename: threading, funcname: _note
  357. threading.py(65): if self.__verbose:
  358. __init__.py(1630): root.debug(msg, *args, **kwargs)
  359. --- modulename: __init__, funcname: debug
  360. __init__.py(1147): if self.isEnabledFor(DEBUG):
  361. --- modulename: __init__, funcname: isEnabledFor
  362. __init__.py(1357): if self.manager.disable >= level:
  363. __init__.py(1359): return level >= self.getEffectiveLevel()
  364. --- modulename: __init__, funcname: getEffectiveLevel
  365. __init__.py(1346): logger = self
  366. __init__.py(1347): while logger:
  367. __init__.py(1348): if logger.level:
  368. __init__.py(1349): return logger.level
  369. moteino23.py(568): time.sleep(0.6) # sleep for 0.6 seconds, bootloader uses 0.5 seconds
  370. moteino23.py(569): logging.debug("Waiting for wakeup sign from base...")
  371. --- modulename: __init__, funcname: debug
  372. __init__.py(1628): if len(root.handlers) == 0:
  373. __init__.py(1630): root.debug(msg, *args, **kwargs)
  374. --- modulename: __init__, funcname: debug
  375. __init__.py(1147): if self.isEnabledFor(DEBUG):
  376. --- modulename: __init__, funcname: isEnabledFor
  377. __init__.py(1357): if self.manager.disable >= level:
  378. __init__.py(1359): return level >= self.getEffectiveLevel()
  379. --- modulename: __init__, funcname: getEffectiveLevel
  380. __init__.py(1346): logger = self
  381. __init__.py(1347): while logger:
  382. __init__.py(1348): if logger.level:
  383. __init__.py(1349): return logger.level
  384. moteino23.py(570): incoming = self._Serial.readline().rstrip()
  385. --- modulename: serialposix, funcname: read
  386. serialposix.py(477): if not self.is_open:
  387. serialposix.py(479): read = bytearray()
  388. serialposix.py(480): timeout = Timeout(self._timeout)
  389. --- modulename: serialutil, funcname: __init__
  390. serialutil.py(125): self.is_infinite = (duration is None)
  391. serialutil.py(126): self.is_non_blocking = (duration == 0)
  392. serialutil.py(127): self.duration = duration
  393. serialutil.py(128): if duration is not None:
  394. serialutil.py(131): self.target_time = None
  395. serialposix.py(481): while len(read) < size:
  396. serialposix.py(482): try:
  397. serialposix.py(483): ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
  398. --- modulename: serialutil, funcname: time_left
  399. serialutil.py(139): if self.is_non_blocking:
  400. serialutil.py(141): elif self.is_infinite:
  401. serialutil.py(142): return None
RAW Paste Data