A clone of: https://github.com/nutechsoftware/alarmdecoder This is requires as they dropped support for older firmware releases w/o building in backward compatibility code, and they had previously hardcoded pyserial to a python2 only version.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1225 lines
71 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>alarmdecoder Package &mdash; alarmdecoder documentation</title>
  7. <link rel="stylesheet" href="_static/default.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: './',
  12. VERSION: '',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/underscore.js"></script>
  20. <script type="text/javascript" src="_static/doctools.js"></script>
  21. <link rel="top" title="alarmdecoder documentation" href="index.html" />
  22. <link rel="next" title="event Package" href="alarmdecoder.event.html" />
  23. <link rel="prev" title="Welcome to alarmdecoder’s documentation!" href="index.html" />
  24. </head>
  25. <body>
  26. <div class="related">
  27. <h3>Navigation</h3>
  28. <ul>
  29. <li class="right" style="margin-right: 10px">
  30. <a href="genindex.html" title="General Index"
  31. accesskey="I">index</a></li>
  32. <li class="right" >
  33. <a href="py-modindex.html" title="Python Module Index"
  34. >modules</a> |</li>
  35. <li class="right" >
  36. <a href="alarmdecoder.event.html" title="event Package"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="index.html" title="Welcome to alarmdecoder’s documentation!"
  40. accesskey="P">previous</a> |</li>
  41. <li><a href="index.html">alarmdecoder documentation</a> &raquo;</li>
  42. </ul>
  43. </div>
  44. <div class="document">
  45. <div class="documentwrapper">
  46. <div class="bodywrapper">
  47. <div class="body">
  48. <div class="section" id="alarmdecoder-package">
  49. <h1>alarmdecoder Package<a class="headerlink" href="#alarmdecoder-package" title="Permalink to this headline">¶</a></h1>
  50. <div class="section" id="alarmdecoder-module">
  51. <h2><tt class="xref py py-mod docutils literal"><span class="pre">alarmdecoder</span></tt> Module<a class="headerlink" href="#alarmdecoder-module" title="Permalink to this headline">¶</a></h2>
  52. </div>
  53. <div class="section" id="module-alarmdecoder.devices">
  54. <span id="devices-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">devices</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.devices" title="Permalink to this headline">¶</a></h2>
  55. <p>Contains different types of devices belonging to the Alarm Decoder (AD2) family.</p>
  56. <dl class="class">
  57. <dt id="alarmdecoder.devices.Device">
  58. <em class="property">class </em><tt class="descclassname">alarmdecoder.devices.</tt><tt class="descname">Device</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device" title="Permalink to this definition">¶</a></dt>
  59. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  60. <p>Generic parent device to all Alarm Decoder (AD2) products.</p>
  61. <dl class="attribute">
  62. <dt id="alarmdecoder.devices.Device.on_open">
  63. <tt class="descname">on_open</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_open" title="Permalink to this definition">¶</a></dt>
  64. <dd><p>Called when the device has been opened</p>
  65. </dd></dl>
  66. <dl class="attribute">
  67. <dt id="alarmdecoder.devices.Device.on_close">
  68. <tt class="descname">on_close</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_close" title="Permalink to this definition">¶</a></dt>
  69. <dd><p>Called when the device has been closed</p>
  70. </dd></dl>
  71. <dl class="attribute">
  72. <dt id="alarmdecoder.devices.Device.on_read">
  73. <tt class="descname">on_read</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_read" title="Permalink to this definition">¶</a></dt>
  74. <dd><p>Called when a line has been read from the device</p>
  75. </dd></dl>
  76. <dl class="attribute">
  77. <dt id="alarmdecoder.devices.Device.on_write">
  78. <tt class="descname">on_write</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_write" title="Permalink to this definition">¶</a></dt>
  79. <dd><p>Called when data has been written to the device</p>
  80. </dd></dl>
  81. <dl class="attribute">
  82. <dt id="alarmdecoder.devices.Device.id">
  83. <tt class="descname">id</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.id" title="Permalink to this definition">¶</a></dt>
  84. <dd><p>Retrieve the device ID.</p>
  85. <table class="docutils field-list" frame="void" rules="none">
  86. <col class="field-name" />
  87. <col class="field-body" />
  88. <tbody valign="top">
  89. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The identification string for the device.</td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. </dd></dl>
  94. <dl class="method">
  95. <dt id="alarmdecoder.devices.Device.is_reader_alive">
  96. <tt class="descname">is_reader_alive</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.is_reader_alive"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.is_reader_alive" title="Permalink to this definition">¶</a></dt>
  97. <dd><p>Indicates whether or not the reader thread is alive.</p>
  98. <table class="docutils field-list" frame="void" rules="none">
  99. <col class="field-name" />
  100. <col class="field-body" />
  101. <tbody valign="top">
  102. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Whether or not the reader thread is alive.</td>
  103. </tr>
  104. </tbody>
  105. </table>
  106. </dd></dl>
  107. <dl class="method">
  108. <dt id="alarmdecoder.devices.Device.stop_reader">
  109. <tt class="descname">stop_reader</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.stop_reader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.stop_reader" title="Permalink to this definition">¶</a></dt>
  110. <dd><p>Stops the reader thread.</p>
  111. </dd></dl>
  112. <dl class="method">
  113. <dt id="alarmdecoder.devices.Device.close">
  114. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.close" title="Permalink to this definition">¶</a></dt>
  115. <dd><p>Closes the device.</p>
  116. </dd></dl>
  117. <dl class="class">
  118. <dt id="alarmdecoder.devices.Device.ReadThread">
  119. <em class="property">class </em><tt class="descname">ReadThread</tt><big>(</big><em>device</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.ReadThread"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.ReadThread" title="Permalink to this definition">¶</a></dt>
  120. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></p>
  121. <p>Reader thread which processes messages from the device.</p>
  122. <dl class="attribute">
  123. <dt id="alarmdecoder.devices.Device.ReadThread.READ_TIMEOUT">
  124. <tt class="descname">READ_TIMEOUT</tt><em class="property"> = 10</em><a class="headerlink" href="#alarmdecoder.devices.Device.ReadThread.READ_TIMEOUT" title="Permalink to this definition">¶</a></dt>
  125. <dd><p>Timeout for the reader thread.</p>
  126. </dd></dl>
  127. <dl class="method">
  128. <dt id="alarmdecoder.devices.Device.ReadThread.stop">
  129. <tt class="descname">stop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.ReadThread.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.ReadThread.stop" title="Permalink to this definition">¶</a></dt>
  130. <dd><p>Stops the running thread.</p>
  131. </dd></dl>
  132. <dl class="method">
  133. <dt id="alarmdecoder.devices.Device.ReadThread.run">
  134. <tt class="descname">run</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.ReadThread.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.ReadThread.run" title="Permalink to this definition">¶</a></dt>
  135. <dd><p>The actual read process.</p>
  136. </dd></dl>
  137. </dd></dl>
  138. </dd></dl>
  139. <dl class="class">
  140. <dt id="alarmdecoder.devices.USBDevice">
  141. <em class="property">class </em><tt class="descclassname">alarmdecoder.devices.</tt><tt class="descname">USBDevice</tt><big>(</big><em>interface=0</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice" title="Permalink to this definition">¶</a></dt>
  142. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.devices.Device" title="alarmdecoder.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.devices.Device</span></tt></a></p>
  143. <p>AD2USB device exposed with PyFTDI&#8217;s interface.</p>
  144. <dl class="attribute">
  145. <dt id="alarmdecoder.devices.USBDevice.FTDI_VENDOR_ID">
  146. <tt class="descname">FTDI_VENDOR_ID</tt><em class="property"> = 1027</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.FTDI_VENDOR_ID" title="Permalink to this definition">¶</a></dt>
  147. <dd><p>Vendor ID used to recognize AD2USB devices.</p>
  148. </dd></dl>
  149. <dl class="attribute">
  150. <dt id="alarmdecoder.devices.USBDevice.FTDI_PRODUCT_ID">
  151. <tt class="descname">FTDI_PRODUCT_ID</tt><em class="property"> = 24577</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.FTDI_PRODUCT_ID" title="Permalink to this definition">¶</a></dt>
  152. <dd><p>Product ID used to recognize AD2USB devices.</p>
  153. </dd></dl>
  154. <dl class="attribute">
  155. <dt id="alarmdecoder.devices.USBDevice.BAUDRATE">
  156. <tt class="descname">BAUDRATE</tt><em class="property"> = 115200</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.BAUDRATE" title="Permalink to this definition">¶</a></dt>
  157. <dd><p>Default baudrate for AD2USB devices.</p>
  158. </dd></dl>
  159. <dl class="classmethod">
  160. <dt id="alarmdecoder.devices.USBDevice.find_all">
  161. <em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><em>vid=1027</em>, <em>pid=24577</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.find_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.find_all" title="Permalink to this definition">¶</a></dt>
  162. <dd><p>Returns all FTDI devices matching our vendor and product IDs.</p>
  163. <table class="docutils field-list" frame="void" rules="none">
  164. <col class="field-name" />
  165. <col class="field-body" />
  166. <tbody valign="top">
  167. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of devices</td>
  168. </tr>
  169. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
  170. </tr>
  171. </tbody>
  172. </table>
  173. </dd></dl>
  174. <dl class="classmethod">
  175. <dt id="alarmdecoder.devices.USBDevice.devices">
  176. <em class="property">classmethod </em><tt class="descname">devices</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.devices"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.devices" title="Permalink to this definition">¶</a></dt>
  177. <dd><p>Returns a cached list of AD2USB devices located on the system.</p>
  178. <table class="docutils field-list" frame="void" rules="none">
  179. <col class="field-name" />
  180. <col class="field-body" />
  181. <tbody valign="top">
  182. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">cached list of devices found.</td>
  183. </tr>
  184. </tbody>
  185. </table>
  186. </dd></dl>
  187. <dl class="classmethod">
  188. <dt id="alarmdecoder.devices.USBDevice.find">
  189. <em class="property">classmethod </em><tt class="descname">find</tt><big>(</big><em>device=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.find"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.find" title="Permalink to this definition">¶</a></dt>
  190. <dd><p>Factory method that returns the requested USBDevice device, or the first device.</p>
  191. <table class="docutils field-list" frame="void" rules="none">
  192. <col class="field-name" />
  193. <col class="field-body" />
  194. <tbody valign="top">
  195. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>device</strong> (<em>tuple</em>) &#8211; Tuple describing the USB device to open, as returned by find_all().</td>
  196. </tr>
  197. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">USBDevice object utilizing the specified device.</td>
  198. </tr>
  199. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body">NoDeviceError</td>
  200. </tr>
  201. </tbody>
  202. </table>
  203. </dd></dl>
  204. <dl class="classmethod">
  205. <dt id="alarmdecoder.devices.USBDevice.start_detection">
  206. <em class="property">classmethod </em><tt class="descname">start_detection</tt><big>(</big><em>on_attached=None</em>, <em>on_detached=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.start_detection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.start_detection" title="Permalink to this definition">¶</a></dt>
  207. <dd><p>Starts the device detection thread.</p>
  208. <table class="docutils field-list" frame="void" rules="none">
  209. <col class="field-name" />
  210. <col class="field-body" />
  211. <tbody valign="top">
  212. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  213. <li><strong>on_attached</strong> (<em>function</em>) &#8211; function to be called when a device is attached.</li>
  214. <li><strong>on_detached</strong> (<em>function</em>) &#8211; function to be called when a device is detached.</li>
  215. </ul>
  216. </td>
  217. </tr>
  218. </tbody>
  219. </table>
  220. </dd></dl>
  221. <dl class="classmethod">
  222. <dt id="alarmdecoder.devices.USBDevice.stop_detection">
  223. <em class="property">classmethod </em><tt class="descname">stop_detection</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.stop_detection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.stop_detection" title="Permalink to this definition">¶</a></dt>
  224. <dd><p>Stops the device detection thread.</p>
  225. </dd></dl>
  226. <dl class="attribute">
  227. <dt id="alarmdecoder.devices.USBDevice.serial_number">
  228. <tt class="descname">serial_number</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.serial_number"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.serial_number" title="Permalink to this definition">¶</a></dt>
  229. <dd><p>Retrieves the serial number of the device.</p>
  230. <table class="docutils field-list" frame="void" rules="none">
  231. <col class="field-name" />
  232. <col class="field-body" />
  233. <tbody valign="top">
  234. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The serial number of the device.</td>
  235. </tr>
  236. </tbody>
  237. </table>
  238. </dd></dl>
  239. <dl class="attribute">
  240. <dt id="alarmdecoder.devices.USBDevice.description">
  241. <tt class="descname">description</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.description" title="Permalink to this definition">¶</a></dt>
  242. <dd><p>Retrieves the description of the device.</p>
  243. <table class="docutils field-list" frame="void" rules="none">
  244. <col class="field-name" />
  245. <col class="field-body" />
  246. <tbody valign="top">
  247. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The description of the device.</td>
  248. </tr>
  249. </tbody>
  250. </table>
  251. </dd></dl>
  252. <dl class="attribute">
  253. <dt id="alarmdecoder.devices.USBDevice.interface">
  254. <tt class="descname">interface</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.interface" title="Permalink to this definition">¶</a></dt>
  255. <dd><p>Retrieves the interface used to connect to the device.</p>
  256. <table class="docutils field-list" frame="void" rules="none">
  257. <col class="field-name" />
  258. <col class="field-body" />
  259. <tbody valign="top">
  260. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the interface used to connect to the device.</td>
  261. </tr>
  262. </tbody>
  263. </table>
  264. </dd></dl>
  265. <dl class="method">
  266. <dt id="alarmdecoder.devices.USBDevice.open">
  267. <tt class="descname">open</tt><big>(</big><em>baudrate=115200</em>, <em>no_reader_thread=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.open" title="Permalink to this definition">¶</a></dt>
  268. <dd><p>Opens the device.</p>
  269. <table class="docutils field-list" frame="void" rules="none">
  270. <col class="field-name" />
  271. <col class="field-body" />
  272. <tbody valign="top">
  273. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  274. <li><strong>baudrate</strong> (<em>int</em>) &#8211; The baudrate to use.</li>
  275. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; Whether or not to automatically start the reader thread.</li>
  276. </ul>
  277. </td>
  278. </tr>
  279. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoDeviceError</p>
  280. </td>
  281. </tr>
  282. </tbody>
  283. </table>
  284. </dd></dl>
  285. <dl class="method">
  286. <dt id="alarmdecoder.devices.USBDevice.close">
  287. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.close" title="Permalink to this definition">¶</a></dt>
  288. <dd><p>Closes the device.</p>
  289. </dd></dl>
  290. <dl class="method">
  291. <dt id="alarmdecoder.devices.USBDevice.write">
  292. <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.write" title="Permalink to this definition">¶</a></dt>
  293. <dd><p>Writes data to the device.</p>
  294. <table class="docutils field-list" frame="void" rules="none">
  295. <col class="field-name" />
  296. <col class="field-body" />
  297. <tbody valign="top">
  298. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em>) &#8211; Data to write</td>
  299. </tr>
  300. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
  301. </tr>
  302. </tbody>
  303. </table>
  304. </dd></dl>
  305. <dl class="method">
  306. <dt id="alarmdecoder.devices.USBDevice.read">
  307. <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.read" title="Permalink to this definition">¶</a></dt>
  308. <dd><p>Reads a single character from the device.</p>
  309. <table class="docutils field-list" frame="void" rules="none">
  310. <col class="field-name" />
  311. <col class="field-body" />
  312. <tbody valign="top">
  313. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The character read from the device.</td>
  314. </tr>
  315. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
  316. </tr>
  317. </tbody>
  318. </table>
  319. </dd></dl>
  320. <dl class="method">
  321. <dt id="alarmdecoder.devices.USBDevice.read_line">
  322. <tt class="descname">read_line</tt><big>(</big><em>timeout=0.0</em>, <em>purge_buffer=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.read_line" title="Permalink to this definition">¶</a></dt>
  323. <dd><p>Reads a line from the device.</p>
  324. <table class="docutils field-list" frame="void" rules="none">
  325. <col class="field-name" />
  326. <col class="field-body" />
  327. <tbody valign="top">
  328. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  329. <li><strong>timeout</strong> (<em>float</em>) &#8211; Read timeout</li>
  330. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to reading.</li>
  331. </ul>
  332. </td>
  333. </tr>
  334. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The line that was read.</p>
  335. </td>
  336. </tr>
  337. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">CommError, TimeoutError</p>
  338. </td>
  339. </tr>
  340. </tbody>
  341. </table>
  342. </dd></dl>
  343. <dl class="class">
  344. <dt id="alarmdecoder.devices.USBDevice.DetectThread">
  345. <em class="property">class </em><tt class="descname">DetectThread</tt><big>(</big><em>on_attached=None</em>, <em>on_detached=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.DetectThread"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread" title="Permalink to this definition">¶</a></dt>
  346. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></p>
  347. <p>Thread that handles detection of added/removed devices.</p>
  348. <dl class="attribute">
  349. <dt id="alarmdecoder.devices.USBDevice.DetectThread.on_attached">
  350. <tt class="descname">on_attached</tt><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.on_attached" title="Permalink to this definition">¶</a></dt>
  351. <dd><p>Called when an AD2USB device has been detected.</p>
  352. </dd></dl>
  353. <dl class="attribute">
  354. <dt id="alarmdecoder.devices.USBDevice.DetectThread.on_detached">
  355. <tt class="descname">on_detached</tt><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.on_detached" title="Permalink to this definition">¶</a></dt>
  356. <dd><p>Called when an AD2USB device has been removed.</p>
  357. </dd></dl>
  358. <dl class="method">
  359. <dt id="alarmdecoder.devices.USBDevice.DetectThread.stop">
  360. <tt class="descname">stop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.DetectThread.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.stop" title="Permalink to this definition">¶</a></dt>
  361. <dd><p>Stops the thread.</p>
  362. </dd></dl>
  363. <dl class="method">
  364. <dt id="alarmdecoder.devices.USBDevice.DetectThread.run">
  365. <tt class="descname">run</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.DetectThread.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.run" title="Permalink to this definition">¶</a></dt>
  366. <dd><p>The actual detection process.</p>
  367. </dd></dl>
  368. </dd></dl>
  369. </dd></dl>
  370. <dl class="class">
  371. <dt id="alarmdecoder.devices.SerialDevice">
  372. <em class="property">class </em><tt class="descclassname">alarmdecoder.devices.</tt><tt class="descname">SerialDevice</tt><big>(</big><em>interface=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice" title="Permalink to this definition">¶</a></dt>
  373. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.devices.Device" title="alarmdecoder.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.devices.Device</span></tt></a></p>
  374. <p>AD2USB or AD2SERIAL device exposed with the pyserial interface.</p>
  375. <dl class="attribute">
  376. <dt id="alarmdecoder.devices.SerialDevice.BAUDRATE">
  377. <tt class="descname">BAUDRATE</tt><em class="property"> = 19200</em><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.BAUDRATE" title="Permalink to this definition">¶</a></dt>
  378. <dd><p>Default baudrate for Serial devices.</p>
  379. </dd></dl>
  380. <dl class="staticmethod">
  381. <dt id="alarmdecoder.devices.SerialDevice.find_all">
  382. <em class="property">static </em><tt class="descname">find_all</tt><big>(</big><em>pattern=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.find_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.find_all" title="Permalink to this definition">¶</a></dt>
  383. <dd><p>Returns all serial ports present.</p>
  384. <table class="docutils field-list" frame="void" rules="none">
  385. <col class="field-name" />
  386. <col class="field-body" />
  387. <tbody valign="top">
  388. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pattern</strong> (<em>str</em>) &#8211; Pattern to search for when retrieving serial ports.</td>
  389. </tr>
  390. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of devices</td>
  391. </tr>
  392. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
  393. </tr>
  394. </tbody>
  395. </table>
  396. </dd></dl>
  397. <dl class="attribute">
  398. <dt id="alarmdecoder.devices.SerialDevice.interface">
  399. <tt class="descname">interface</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.interface" title="Permalink to this definition">¶</a></dt>
  400. <dd><p>Retrieves the interface used to connect to the device.</p>
  401. <table class="docutils field-list" frame="void" rules="none">
  402. <col class="field-name" />
  403. <col class="field-body" />
  404. <tbody valign="top">
  405. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the interface used to connect to the device.</td>
  406. </tr>
  407. </tbody>
  408. </table>
  409. </dd></dl>
  410. <dl class="method">
  411. <dt id="alarmdecoder.devices.SerialDevice.open">
  412. <tt class="descname">open</tt><big>(</big><em>baudrate=19200</em>, <em>no_reader_thread=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.open" title="Permalink to this definition">¶</a></dt>
  413. <dd><p>Opens the device.</p>
  414. <table class="docutils field-list" frame="void" rules="none">
  415. <col class="field-name" />
  416. <col class="field-body" />
  417. <tbody valign="top">
  418. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  419. <li><strong>baudrate</strong> (<em>int</em>) &#8211; The baudrate to use with the device.</li>
  420. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; Whether or not to automatically start the reader thread.</li>
  421. </ul>
  422. </td>
  423. </tr>
  424. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoDeviceError</p>
  425. </td>
  426. </tr>
  427. </tbody>
  428. </table>
  429. </dd></dl>
  430. <dl class="method">
  431. <dt id="alarmdecoder.devices.SerialDevice.close">
  432. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.close" title="Permalink to this definition">¶</a></dt>
  433. <dd><p>Closes the device.</p>
  434. </dd></dl>
  435. <dl class="method">
  436. <dt id="alarmdecoder.devices.SerialDevice.write">
  437. <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.write" title="Permalink to this definition">¶</a></dt>
  438. <dd><p>Writes data to the device.</p>
  439. <table class="docutils field-list" frame="void" rules="none">
  440. <col class="field-name" />
  441. <col class="field-body" />
  442. <tbody valign="top">
  443. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em>) &#8211; The data to write.</td>
  444. </tr>
  445. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
  446. </tr>
  447. </tbody>
  448. </table>
  449. </dd></dl>
  450. <dl class="method">
  451. <dt id="alarmdecoder.devices.SerialDevice.read">
  452. <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.read" title="Permalink to this definition">¶</a></dt>
  453. <dd><p>Reads a single character from the device.</p>
  454. <table class="docutils field-list" frame="void" rules="none">
  455. <col class="field-name" />
  456. <col class="field-body" />
  457. <tbody valign="top">
  458. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The character read from the device.</td>
  459. </tr>
  460. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
  461. </tr>
  462. </tbody>
  463. </table>
  464. </dd></dl>
  465. <dl class="method">
  466. <dt id="alarmdecoder.devices.SerialDevice.read_line">
  467. <tt class="descname">read_line</tt><big>(</big><em>timeout=0.0</em>, <em>purge_buffer=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.read_line" title="Permalink to this definition">¶</a></dt>
  468. <dd><p>Reads a line from the device.</p>
  469. <table class="docutils field-list" frame="void" rules="none">
  470. <col class="field-name" />
  471. <col class="field-body" />
  472. <tbody valign="top">
  473. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  474. <li><strong>timeout</strong> (<em>float</em>) &#8211; The read timeout.</li>
  475. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to reading.</li>
  476. </ul>
  477. </td>
  478. </tr>
  479. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The line read.</p>
  480. </td>
  481. </tr>
  482. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">CommError, TimeoutError</p>
  483. </td>
  484. </tr>
  485. </tbody>
  486. </table>
  487. </dd></dl>
  488. </dd></dl>
  489. <dl class="class">
  490. <dt id="alarmdecoder.devices.SocketDevice">
  491. <em class="property">class </em><tt class="descclassname">alarmdecoder.devices.</tt><tt class="descname">SocketDevice</tt><big>(</big><em>interface=('localhost'</em>, <em>10000)</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice" title="Permalink to this definition">¶</a></dt>
  492. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.devices.Device" title="alarmdecoder.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.devices.Device</span></tt></a></p>
  493. <p>Device that supports communication with an Alarm Decoder (AD2) that is
  494. exposed via ser2sock or another Serial to IP interface.</p>
  495. <dl class="attribute">
  496. <dt id="alarmdecoder.devices.SocketDevice.interface">
  497. <tt class="descname">interface</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.interface" title="Permalink to this definition">¶</a></dt>
  498. <dd><p>Retrieves the interface used to connect to the device.</p>
  499. <table class="docutils field-list" frame="void" rules="none">
  500. <col class="field-name" />
  501. <col class="field-body" />
  502. <tbody valign="top">
  503. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the interface used to connect to the device.</td>
  504. </tr>
  505. </tbody>
  506. </table>
  507. </dd></dl>
  508. <dl class="attribute">
  509. <dt id="alarmdecoder.devices.SocketDevice.ssl">
  510. <tt class="descname">ssl</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.ssl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.ssl" title="Permalink to this definition">¶</a></dt>
  511. <dd><p>Retrieves whether or not the device is using SSL.</p>
  512. <table class="docutils field-list" frame="void" rules="none">
  513. <col class="field-name" />
  514. <col class="field-body" />
  515. <tbody valign="top">
  516. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Whether or not the device is using SSL.</td>
  517. </tr>
  518. </tbody>
  519. </table>
  520. </dd></dl>
  521. <dl class="attribute">
  522. <dt id="alarmdecoder.devices.SocketDevice.ssl_certificate">
  523. <tt class="descname">ssl_certificate</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.ssl_certificate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.ssl_certificate" title="Permalink to this definition">¶</a></dt>
  524. <dd><p>Retrieves the SSL client certificate path used for authentication.</p>
  525. <table class="docutils field-list" frame="void" rules="none">
  526. <col class="field-name" />
  527. <col class="field-body" />
  528. <tbody valign="top">
  529. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The certificate path</td>
  530. </tr>
  531. </tbody>
  532. </table>
  533. </dd></dl>
  534. <dl class="attribute">
  535. <dt id="alarmdecoder.devices.SocketDevice.ssl_key">
  536. <tt class="descname">ssl_key</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.ssl_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.ssl_key" title="Permalink to this definition">¶</a></dt>
  537. <dd><p>Retrieves the SSL client certificate key used for authentication.</p>
  538. <table class="docutils field-list" frame="void" rules="none">
  539. <col class="field-name" />
  540. <col class="field-body" />
  541. <tbody valign="top">
  542. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The key path</td>
  543. </tr>
  544. </tbody>
  545. </table>
  546. </dd></dl>
  547. <dl class="attribute">
  548. <dt id="alarmdecoder.devices.SocketDevice.ssl_ca">
  549. <tt class="descname">ssl_ca</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.ssl_ca"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.ssl_ca" title="Permalink to this definition">¶</a></dt>
  550. <dd><p>Retrieves the SSL Certificate Authority certificate used for authentication.</p>
  551. <table class="docutils field-list" frame="void" rules="none">
  552. <col class="field-name" />
  553. <col class="field-body" />
  554. <tbody valign="top">
  555. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The CA path</td>
  556. </tr>
  557. </tbody>
  558. </table>
  559. </dd></dl>
  560. <dl class="method">
  561. <dt id="alarmdecoder.devices.SocketDevice.open">
  562. <tt class="descname">open</tt><big>(</big><em>baudrate=None</em>, <em>no_reader_thread=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.open" title="Permalink to this definition">¶</a></dt>
  563. <dd><p>Opens the device.</p>
  564. <table class="docutils field-list" frame="void" rules="none">
  565. <col class="field-name" />
  566. <col class="field-body" />
  567. <tbody valign="top">
  568. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  569. <li><strong>baudrate</strong> (<em>int</em>) &#8211; The baudrate to use</li>
  570. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; Whether or not to automatically open the reader thread.</li>
  571. </ul>
  572. </td>
  573. </tr>
  574. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoDeviceError, CommError</p>
  575. </td>
  576. </tr>
  577. </tbody>
  578. </table>
  579. </dd></dl>
  580. <dl class="method">
  581. <dt id="alarmdecoder.devices.SocketDevice.close">
  582. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.close" title="Permalink to this definition">¶</a></dt>
  583. <dd><p>Closes the device.</p>
  584. </dd></dl>
  585. <dl class="method">
  586. <dt id="alarmdecoder.devices.SocketDevice.write">
  587. <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.write" title="Permalink to this definition">¶</a></dt>
  588. <dd><p>Writes data to the device.</p>
  589. <table class="docutils field-list" frame="void" rules="none">
  590. <col class="field-name" />
  591. <col class="field-body" />
  592. <tbody valign="top">
  593. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em>) &#8211; The data to write.</td>
  594. </tr>
  595. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The number of bytes sent.</td>
  596. </tr>
  597. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
  598. </tr>
  599. </tbody>
  600. </table>
  601. </dd></dl>
  602. <dl class="method">
  603. <dt id="alarmdecoder.devices.SocketDevice.read">
  604. <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.read" title="Permalink to this definition">¶</a></dt>
  605. <dd><p>Reads a single character from the device.</p>
  606. <table class="docutils field-list" frame="void" rules="none">
  607. <col class="field-name" />
  608. <col class="field-body" />
  609. <tbody valign="top">
  610. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The character read from the device.</td>
  611. </tr>
  612. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
  613. </tr>
  614. </tbody>
  615. </table>
  616. </dd></dl>
  617. <dl class="method">
  618. <dt id="alarmdecoder.devices.SocketDevice.read_line">
  619. <tt class="descname">read_line</tt><big>(</big><em>timeout=0.0</em>, <em>purge_buffer=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.read_line" title="Permalink to this definition">¶</a></dt>
  620. <dd><p>Reads a line from the device.</p>
  621. <table class="docutils field-list" frame="void" rules="none">
  622. <col class="field-name" />
  623. <col class="field-body" />
  624. <tbody valign="top">
  625. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  626. <li><strong>timeout</strong> (<em>float</em>) &#8211; The read timeout.</li>
  627. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to reading.</li>
  628. </ul>
  629. </td>
  630. </tr>
  631. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The line read from the device.</p>
  632. </td>
  633. </tr>
  634. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">CommError, TimeoutError</p>
  635. </td>
  636. </tr>
  637. </tbody>
  638. </table>
  639. </dd></dl>
  640. </dd></dl>
  641. </div>
  642. <div class="section" id="module-alarmdecoder.util">
  643. <span id="util-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">util</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.util" title="Permalink to this headline">¶</a></h2>
  644. <p>Provides utility classes for the Alarm Decoder (AD2) devices.</p>
  645. <dl class="exception">
  646. <dt id="alarmdecoder.util.NoDeviceError">
  647. <em class="property">exception </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">NoDeviceError</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#NoDeviceError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.NoDeviceError" title="Permalink to this definition">¶</a></dt>
  648. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  649. <p>No devices found.</p>
  650. </dd></dl>
  651. <dl class="exception">
  652. <dt id="alarmdecoder.util.CommError">
  653. <em class="property">exception </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">CommError</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#CommError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.CommError" title="Permalink to this definition">¶</a></dt>
  654. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  655. <p>There was an error communicating with the device.</p>
  656. </dd></dl>
  657. <dl class="exception">
  658. <dt id="alarmdecoder.util.TimeoutError">
  659. <em class="property">exception </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">TimeoutError</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#TimeoutError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.TimeoutError" title="Permalink to this definition">¶</a></dt>
  660. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  661. <p>There was a timeout while trying to communicate with the device.</p>
  662. </dd></dl>
  663. <dl class="exception">
  664. <dt id="alarmdecoder.util.InvalidMessageError">
  665. <em class="property">exception </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">InvalidMessageError</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#InvalidMessageError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.InvalidMessageError" title="Permalink to this definition">¶</a></dt>
  666. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  667. <p>The format of the panel message was invalid.</p>
  668. </dd></dl>
  669. <dl class="class">
  670. <dt id="alarmdecoder.util.Firmware">
  671. <em class="property">class </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">Firmware</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#Firmware"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.Firmware" title="Permalink to this definition">¶</a></dt>
  672. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  673. <p>Represents firmware for the Alarm Decoder devices.</p>
  674. <dl class="attribute">
  675. <dt id="alarmdecoder.util.Firmware.STAGE_START">
  676. <tt class="descname">STAGE_START</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_START" title="Permalink to this definition">¶</a></dt>
  677. <dd></dd></dl>
  678. <dl class="attribute">
  679. <dt id="alarmdecoder.util.Firmware.STAGE_WAITING">
  680. <tt class="descname">STAGE_WAITING</tt><em class="property"> = 1</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_WAITING" title="Permalink to this definition">¶</a></dt>
  681. <dd></dd></dl>
  682. <dl class="attribute">
  683. <dt id="alarmdecoder.util.Firmware.STAGE_BOOT">
  684. <tt class="descname">STAGE_BOOT</tt><em class="property"> = 2</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_BOOT" title="Permalink to this definition">¶</a></dt>
  685. <dd></dd></dl>
  686. <dl class="attribute">
  687. <dt id="alarmdecoder.util.Firmware.STAGE_LOAD">
  688. <tt class="descname">STAGE_LOAD</tt><em class="property"> = 3</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_LOAD" title="Permalink to this definition">¶</a></dt>
  689. <dd></dd></dl>
  690. <dl class="attribute">
  691. <dt id="alarmdecoder.util.Firmware.STAGE_UPLOADING">
  692. <tt class="descname">STAGE_UPLOADING</tt><em class="property"> = 4</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_UPLOADING" title="Permalink to this definition">¶</a></dt>
  693. <dd></dd></dl>
  694. <dl class="attribute">
  695. <dt id="alarmdecoder.util.Firmware.STAGE_DONE">
  696. <tt class="descname">STAGE_DONE</tt><em class="property"> = 5</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_DONE" title="Permalink to this definition">¶</a></dt>
  697. <dd></dd></dl>
  698. <dl class="staticmethod">
  699. <dt id="alarmdecoder.util.Firmware.upload">
  700. <em class="property">static </em><tt class="descname">upload</tt><big>(</big><em>dev</em>, <em>filename</em>, <em>progress_callback=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/util.html#Firmware.upload"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.Firmware.upload" title="Permalink to this definition">¶</a></dt>
  701. <dd><p>Uploads firmware to an Alarm Decoder device.</p>
  702. <table class="docutils field-list" frame="void" rules="none">
  703. <col class="field-name" />
  704. <col class="field-body" />
  705. <tbody valign="top">
  706. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  707. <li><strong>filename</strong> (<em>str</em>) &#8211; The firmware filename</li>
  708. <li><strong>progress_callback</strong> (<em>function</em>) &#8211; Callback function used to report progress.</li>
  709. </ul>
  710. </td>
  711. </tr>
  712. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoDeviceError, TimeoutError</p>
  713. </td>
  714. </tr>
  715. </tbody>
  716. </table>
  717. </dd></dl>
  718. </dd></dl>
  719. </div>
  720. <div class="section" id="module-alarmdecoder.zonetracking">
  721. <span id="zonetracking-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">zonetracking</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.zonetracking" title="Permalink to this headline">¶</a></h2>
  722. <p>Provides zone tracking functionality for the Alarm Decoder (AD2) device family.</p>
  723. <dl class="class">
  724. <dt id="alarmdecoder.zonetracking.Zone">
  725. <em class="property">class </em><tt class="descclassname">alarmdecoder.zonetracking.</tt><tt class="descname">Zone</tt><big>(</big><em>zone=0</em>, <em>name=''</em>, <em>status=0</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zone" title="Permalink to this definition">¶</a></dt>
  726. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  727. <p>Representation of a panel zone.</p>
  728. <dl class="attribute">
  729. <dt id="alarmdecoder.zonetracking.Zone.CLEAR">
  730. <tt class="descname">CLEAR</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.CLEAR" title="Permalink to this definition">¶</a></dt>
  731. <dd><p>Status indicating that the zone is cleared.</p>
  732. </dd></dl>
  733. <dl class="attribute">
  734. <dt id="alarmdecoder.zonetracking.Zone.FAULT">
  735. <tt class="descname">FAULT</tt><em class="property"> = 1</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.FAULT" title="Permalink to this definition">¶</a></dt>
  736. <dd><p>Status indicating that the zone is faulted.</p>
  737. </dd></dl>
  738. <dl class="attribute">
  739. <dt id="alarmdecoder.zonetracking.Zone.CHECK">
  740. <tt class="descname">CHECK</tt><em class="property"> = 2</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.CHECK" title="Permalink to this definition">¶</a></dt>
  741. <dd><p>Status indicating that there is a wiring issue with the zone.</p>
  742. </dd></dl>
  743. <dl class="attribute">
  744. <dt id="alarmdecoder.zonetracking.Zone.STATUS">
  745. <tt class="descname">STATUS</tt><em class="property"> = {0: 'CLEAR', 1: 'FAULT', 2: 'CHECK'}</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.STATUS" title="Permalink to this definition">¶</a></dt>
  746. <dd></dd></dl>
  747. </dd></dl>
  748. <dl class="class">
  749. <dt id="alarmdecoder.zonetracking.Zonetracker">
  750. <em class="property">class </em><tt class="descclassname">alarmdecoder.zonetracking.</tt><tt class="descname">Zonetracker</tt><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zonetracker"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker" title="Permalink to this definition">¶</a></dt>
  751. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  752. <p>Handles tracking of zone and their statuses.</p>
  753. <dl class="attribute">
  754. <dt id="alarmdecoder.zonetracking.Zonetracker.on_fault">
  755. <tt class="descname">on_fault</tt><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.on_fault" title="Permalink to this definition">¶</a></dt>
  756. <dd><p>Called when the device detects a zone fault.</p>
  757. </dd></dl>
  758. <dl class="attribute">
  759. <dt id="alarmdecoder.zonetracking.Zonetracker.on_restore">
  760. <tt class="descname">on_restore</tt><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.on_restore" title="Permalink to this definition">¶</a></dt>
  761. <dd><p>Called when the device detects that a fault is restored.</p>
  762. </dd></dl>
  763. <dl class="attribute">
  764. <dt id="alarmdecoder.zonetracking.Zonetracker.EXPIRE">
  765. <tt class="descname">EXPIRE</tt><em class="property"> = 30</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.EXPIRE" title="Permalink to this definition">¶</a></dt>
  766. <dd><p>Zone expiration timeout.</p>
  767. </dd></dl>
  768. <dl class="method">
  769. <dt id="alarmdecoder.zonetracking.Zonetracker.update">
  770. <tt class="descname">update</tt><big>(</big><em>message</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zonetracker.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.update" title="Permalink to this definition">¶</a></dt>
  771. <dd><p>Update zone statuses based on the current message.</p>
  772. <table class="docutils field-list" frame="void" rules="none">
  773. <col class="field-name" />
  774. <col class="field-body" />
  775. <tbody valign="top">
  776. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> (<em>Message or ExpanderMessage</em>) &#8211; Message to use to update the zone tracking.</td>
  777. </tr>
  778. </tbody>
  779. </table>
  780. </dd></dl>
  781. </dd></dl>
  782. </div>
  783. <div class="section" id="module-alarmdecoder.panels">
  784. <span id="panels-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">panels</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.panels" title="Permalink to this headline">¶</a></h2>
  785. <p>Representations of Panels and their templates.</p>
  786. </div>
  787. <div class="section" id="module-alarmdecoder.messages">
  788. <span id="messages-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">messages</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.messages" title="Permalink to this headline">¶</a></h2>
  789. <p>Message representations received from the panel through the Alarm Decoder (AD2)
  790. devices.</p>
  791. <dl class="class">
  792. <dt id="alarmdecoder.messages.BaseMessage">
  793. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">BaseMessage</tt><a class="reference internal" href="_modules/alarmdecoder/messages.html#BaseMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.BaseMessage" title="Permalink to this definition">¶</a></dt>
  794. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  795. <p>Base class for messages.</p>
  796. <dl class="attribute">
  797. <dt id="alarmdecoder.messages.BaseMessage.raw">
  798. <tt class="descname">raw</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.BaseMessage.raw" title="Permalink to this definition">¶</a></dt>
  799. <dd><p>The raw message text</p>
  800. </dd></dl>
  801. </dd></dl>
  802. <dl class="class">
  803. <dt id="alarmdecoder.messages.Message">
  804. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">Message</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#Message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.Message" title="Permalink to this definition">¶</a></dt>
  805. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.messages.BaseMessage" title="alarmdecoder.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.messages.BaseMessage</span></tt></a></p>
  806. <p>Represents a message from the alarm panel.</p>
  807. <dl class="attribute">
  808. <dt id="alarmdecoder.messages.Message.ready">
  809. <tt class="descname">ready</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.ready" title="Permalink to this definition">¶</a></dt>
  810. <dd><p>Indicates whether or not the panel is in a ready state</p>
  811. </dd></dl>
  812. <dl class="attribute">
  813. <dt id="alarmdecoder.messages.Message.armed_away">
  814. <tt class="descname">armed_away</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.armed_away" title="Permalink to this definition">¶</a></dt>
  815. <dd><p>Indicates whether or not the panel is armed away</p>
  816. </dd></dl>
  817. <dl class="attribute">
  818. <dt id="alarmdecoder.messages.Message.armed_home">
  819. <tt class="descname">armed_home</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.armed_home" title="Permalink to this definition">¶</a></dt>
  820. <dd><p>Indicates whether or not the panel is armed home</p>
  821. </dd></dl>
  822. <dl class="attribute">
  823. <dt id="alarmdecoder.messages.Message.backlight_on">
  824. <tt class="descname">backlight_on</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.backlight_on" title="Permalink to this definition">¶</a></dt>
  825. <dd><p>Indicates whether or not the keypad backlight is on</p>
  826. </dd></dl>
  827. <dl class="attribute">
  828. <dt id="alarmdecoder.messages.Message.programming_mode">
  829. <tt class="descname">programming_mode</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.programming_mode" title="Permalink to this definition">¶</a></dt>
  830. <dd><p>Indicates whether or not we&#8217;re in programming mode</p>
  831. </dd></dl>
  832. <dl class="attribute">
  833. <dt id="alarmdecoder.messages.Message.beeps">
  834. <tt class="descname">beeps</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.Message.beeps" title="Permalink to this definition">¶</a></dt>
  835. <dd><p>Number of beeps associated with a message</p>
  836. </dd></dl>
  837. <dl class="attribute">
  838. <dt id="alarmdecoder.messages.Message.zone_bypassed">
  839. <tt class="descname">zone_bypassed</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.zone_bypassed" title="Permalink to this definition">¶</a></dt>
  840. <dd><p>Indicates whether or not a zone is bypassed</p>
  841. </dd></dl>
  842. <dl class="attribute">
  843. <dt id="alarmdecoder.messages.Message.ac_power">
  844. <tt class="descname">ac_power</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.ac_power" title="Permalink to this definition">¶</a></dt>
  845. <dd><p>Indicates whether or not the panel is on AC power</p>
  846. </dd></dl>
  847. <dl class="attribute">
  848. <dt id="alarmdecoder.messages.Message.chime_on">
  849. <tt class="descname">chime_on</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.chime_on" title="Permalink to this definition">¶</a></dt>
  850. <dd><p>Indicates whether or not the chime is enabled</p>
  851. </dd></dl>
  852. <dl class="attribute">
  853. <dt id="alarmdecoder.messages.Message.alarm_event_occurred">
  854. <tt class="descname">alarm_event_occurred</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.alarm_event_occurred" title="Permalink to this definition">¶</a></dt>
  855. <dd><p>Indicates whether or not an alarm event has occurred</p>
  856. </dd></dl>
  857. <dl class="attribute">
  858. <dt id="alarmdecoder.messages.Message.alarm_sounding">
  859. <tt class="descname">alarm_sounding</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.alarm_sounding" title="Permalink to this definition">¶</a></dt>
  860. <dd><p>Indicates whether or not an alarm is sounding</p>
  861. </dd></dl>
  862. <dl class="attribute">
  863. <dt id="alarmdecoder.messages.Message.battery_low">
  864. <tt class="descname">battery_low</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.battery_low" title="Permalink to this definition">¶</a></dt>
  865. <dd><p>Indicates whether or not there is a low battery</p>
  866. </dd></dl>
  867. <dl class="attribute">
  868. <dt id="alarmdecoder.messages.Message.entry_delay_off">
  869. <tt class="descname">entry_delay_off</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.entry_delay_off" title="Permalink to this definition">¶</a></dt>
  870. <dd><p>Indicates whether or not the entry delay is enabled</p>
  871. </dd></dl>
  872. <dl class="attribute">
  873. <dt id="alarmdecoder.messages.Message.fire_alarm">
  874. <tt class="descname">fire_alarm</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.fire_alarm" title="Permalink to this definition">¶</a></dt>
  875. <dd><p>Indicates whether or not a fire alarm is sounding</p>
  876. </dd></dl>
  877. <dl class="attribute">
  878. <dt id="alarmdecoder.messages.Message.check_zone">
  879. <tt class="descname">check_zone</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.check_zone" title="Permalink to this definition">¶</a></dt>
  880. <dd><p>Indicates whether or not there are zones that require attention.</p>
  881. </dd></dl>
  882. <dl class="attribute">
  883. <dt id="alarmdecoder.messages.Message.perimeter_only">
  884. <tt class="descname">perimeter_only</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.perimeter_only" title="Permalink to this definition">¶</a></dt>
  885. <dd><p>Indicates whether or not the perimeter is armed</p>
  886. </dd></dl>
  887. <dl class="attribute">
  888. <dt id="alarmdecoder.messages.Message.numeric_code">
  889. <tt class="descname">numeric_code</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.numeric_code" title="Permalink to this definition">¶</a></dt>
  890. <dd><p>The numeric code associated with the message</p>
  891. </dd></dl>
  892. <dl class="attribute">
  893. <dt id="alarmdecoder.messages.Message.text">
  894. <tt class="descname">text</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.text" title="Permalink to this definition">¶</a></dt>
  895. <dd><p>The human-readable text to be displayed on the panel LCD</p>
  896. </dd></dl>
  897. <dl class="attribute">
  898. <dt id="alarmdecoder.messages.Message.cursor_location">
  899. <tt class="descname">cursor_location</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.Message.cursor_location" title="Permalink to this definition">¶</a></dt>
  900. <dd><p>Current cursor location on the keypad</p>
  901. </dd></dl>
  902. <dl class="attribute">
  903. <dt id="alarmdecoder.messages.Message.mask">
  904. <tt class="descname">mask</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.mask" title="Permalink to this definition">¶</a></dt>
  905. <dd><p>Address mask this message is intended for</p>
  906. </dd></dl>
  907. <dl class="attribute">
  908. <dt id="alarmdecoder.messages.Message.bitfield">
  909. <tt class="descname">bitfield</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.bitfield" title="Permalink to this definition">¶</a></dt>
  910. <dd><p>The bitfield associated with this message</p>
  911. </dd></dl>
  912. <dl class="attribute">
  913. <dt id="alarmdecoder.messages.Message.panel_data">
  914. <tt class="descname">panel_data</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.panel_data" title="Permalink to this definition">¶</a></dt>
  915. <dd><p>The panel data field associated with this message</p>
  916. </dd></dl>
  917. </dd></dl>
  918. <dl class="class">
  919. <dt id="alarmdecoder.messages.ExpanderMessage">
  920. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">ExpanderMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#ExpanderMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage" title="Permalink to this definition">¶</a></dt>
  921. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.messages.BaseMessage" title="alarmdecoder.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.messages.BaseMessage</span></tt></a></p>
  922. <p>Represents a message from a zone or relay expansion module.</p>
  923. <dl class="attribute">
  924. <dt id="alarmdecoder.messages.ExpanderMessage.ZONE">
  925. <tt class="descname">ZONE</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.ZONE" title="Permalink to this definition">¶</a></dt>
  926. <dd><p>Flag indicating that the expander message relates to a Zone Expander.</p>
  927. </dd></dl>
  928. <dl class="attribute">
  929. <dt id="alarmdecoder.messages.ExpanderMessage.RELAY">
  930. <tt class="descname">RELAY</tt><em class="property"> = 1</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.RELAY" title="Permalink to this definition">¶</a></dt>
  931. <dd><p>Flag indicating that the expander message relates to a Relay Expander.</p>
  932. </dd></dl>
  933. <dl class="attribute">
  934. <dt id="alarmdecoder.messages.ExpanderMessage.type">
  935. <tt class="descname">type</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.type" title="Permalink to this definition">¶</a></dt>
  936. <dd><p>Expander message type: ExpanderMessage.ZONE or ExpanderMessage.RELAY</p>
  937. </dd></dl>
  938. <dl class="attribute">
  939. <dt id="alarmdecoder.messages.ExpanderMessage.address">
  940. <tt class="descname">address</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.address" title="Permalink to this definition">¶</a></dt>
  941. <dd><p>Address of expander</p>
  942. </dd></dl>
  943. <dl class="attribute">
  944. <dt id="alarmdecoder.messages.ExpanderMessage.channel">
  945. <tt class="descname">channel</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.channel" title="Permalink to this definition">¶</a></dt>
  946. <dd><p>Channel on the expander</p>
  947. </dd></dl>
  948. <dl class="attribute">
  949. <dt id="alarmdecoder.messages.ExpanderMessage.value">
  950. <tt class="descname">value</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.value" title="Permalink to this definition">¶</a></dt>
  951. <dd><p>Value associated with the message</p>
  952. </dd></dl>
  953. </dd></dl>
  954. <dl class="class">
  955. <dt id="alarmdecoder.messages.RFMessage">
  956. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">RFMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#RFMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.RFMessage" title="Permalink to this definition">¶</a></dt>
  957. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.messages.BaseMessage" title="alarmdecoder.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.messages.BaseMessage</span></tt></a></p>
  958. <p>Represents a message from an RF receiver.</p>
  959. <dl class="attribute">
  960. <dt id="alarmdecoder.messages.RFMessage.x">
  961. <tt class="descname">x</tt><em class="property"> = 3</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.x" title="Permalink to this definition">¶</a></dt>
  962. <dd></dd></dl>
  963. <dl class="attribute">
  964. <dt id="alarmdecoder.messages.RFMessage.serial_number">
  965. <tt class="descname">serial_number</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.serial_number" title="Permalink to this definition">¶</a></dt>
  966. <dd><p>Serial number of the RF device</p>
  967. </dd></dl>
  968. <dl class="attribute">
  969. <dt id="alarmdecoder.messages.RFMessage.value">
  970. <tt class="descname">value</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.value" title="Permalink to this definition">¶</a></dt>
  971. <dd><p>Value associated with this message</p>
  972. </dd></dl>
  973. <dl class="attribute">
  974. <dt id="alarmdecoder.messages.RFMessage.battery">
  975. <tt class="descname">battery</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.battery" title="Permalink to this definition">¶</a></dt>
  976. <dd><p>Battery low indication</p>
  977. </dd></dl>
  978. <dl class="attribute">
  979. <dt id="alarmdecoder.messages.RFMessage.supervision">
  980. <tt class="descname">supervision</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.supervision" title="Permalink to this definition">¶</a></dt>
  981. <dd><p>Supervision required indication</p>
  982. </dd></dl>
  983. <dl class="attribute">
  984. <dt id="alarmdecoder.messages.RFMessage.loop">
  985. <tt class="descname">loop</tt><em class="property"> = [False, False, False, False]</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.loop" title="Permalink to this definition">¶</a></dt>
  986. <dd><p>Loop indicators</p>
  987. </dd></dl>
  988. </dd></dl>
  989. <dl class="class">
  990. <dt id="alarmdecoder.messages.LRRMessage">
  991. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">LRRMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#LRRMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.LRRMessage" title="Permalink to this definition">¶</a></dt>
  992. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.messages.BaseMessage" title="alarmdecoder.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.messages.BaseMessage</span></tt></a></p>
  993. <p>Represent a message from a Long Range Radio.</p>
  994. <dl class="attribute">
  995. <dt id="alarmdecoder.messages.LRRMessage.event_data">
  996. <tt class="descname">event_data</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.LRRMessage.event_data" title="Permalink to this definition">¶</a></dt>
  997. <dd><p>Data associated with the LRR message. Usually user ID or zone.</p>
  998. </dd></dl>
  999. <dl class="attribute">
  1000. <dt id="alarmdecoder.messages.LRRMessage.partition">
  1001. <tt class="descname">partition</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.LRRMessage.partition" title="Permalink to this definition">¶</a></dt>
  1002. <dd><p>The partition that this message applies to</p>
  1003. </dd></dl>
  1004. <dl class="attribute">
  1005. <dt id="alarmdecoder.messages.LRRMessage.event_type">
  1006. <tt class="descname">event_type</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.LRRMessage.event_type" title="Permalink to this definition">¶</a></dt>
  1007. <dd><p>The type of the event that occurred</p>
  1008. </dd></dl>
  1009. </dd></dl>
  1010. </div>
  1011. <div class="section" id="subpackages">
  1012. <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
  1013. <div class="toctree-wrapper compound">
  1014. <ul>
  1015. <li class="toctree-l1"><a class="reference internal" href="alarmdecoder.event.html">event Package</a><ul>
  1016. <li class="toctree-l2"><a class="reference internal" href="alarmdecoder.event.html#id1"><tt class="docutils literal"><span class="pre">event</span></tt> Package</a></li>
  1017. <li class="toctree-l2"><a class="reference internal" href="alarmdecoder.event.html#module-alarmdecoder.event.event"><tt class="docutils literal"><span class="pre">event</span></tt> Module</a></li>
  1018. </ul>
  1019. </li>
  1020. </ul>
  1021. </div>
  1022. </div>
  1023. </div>
  1024. </div>
  1025. </div>
  1026. </div>
  1027. <div class="sphinxsidebar">
  1028. <div class="sphinxsidebarwrapper">
  1029. <h3><a href="index.html">Table Of Contents</a></h3>
  1030. <ul>
  1031. <li><a class="reference internal" href="#">alarmdecoder Package</a><ul>
  1032. <li><a class="reference internal" href="#alarmdecoder-module"><tt class="docutils literal"><span class="pre">alarmdecoder</span></tt> Module</a></li>
  1033. <li><a class="reference internal" href="#module-alarmdecoder.devices"><tt class="docutils literal"><span class="pre">devices</span></tt> Module</a></li>
  1034. <li><a class="reference internal" href="#module-alarmdecoder.util"><tt class="docutils literal"><span class="pre">util</span></tt> Module</a></li>
  1035. <li><a class="reference internal" href="#module-alarmdecoder.zonetracking"><tt class="docutils literal"><span class="pre">zonetracking</span></tt> Module</a></li>
  1036. <li><a class="reference internal" href="#module-alarmdecoder.panels"><tt class="docutils literal"><span class="pre">panels</span></tt> Module</a></li>
  1037. <li><a class="reference internal" href="#module-alarmdecoder.messages"><tt class="docutils literal"><span class="pre">messages</span></tt> Module</a></li>
  1038. <li><a class="reference internal" href="#subpackages">Subpackages</a><ul>
  1039. </ul>
  1040. </li>
  1041. </ul>
  1042. </li>
  1043. </ul>
  1044. <h4>Previous topic</h4>
  1045. <p class="topless"><a href="index.html"
  1046. title="previous chapter">Welcome to alarmdecoder&#8217;s documentation!</a></p>
  1047. <h4>Next topic</h4>
  1048. <p class="topless"><a href="alarmdecoder.event.html"
  1049. title="next chapter">event Package</a></p>
  1050. <h3>This Page</h3>
  1051. <ul class="this-page-menu">
  1052. <li><a href="_sources/alarmdecoder.txt"
  1053. rel="nofollow">Show Source</a></li>
  1054. </ul>
  1055. <div id="searchbox" style="display: none">
  1056. <h3>Quick search</h3>
  1057. <form class="search" action="search.html" method="get">
  1058. <input type="text" name="q" />
  1059. <input type="submit" value="Go" />
  1060. <input type="hidden" name="check_keywords" value="yes" />
  1061. <input type="hidden" name="area" value="default" />
  1062. </form>
  1063. <p class="searchtip" style="font-size: 90%">
  1064. Enter search terms or a module, class or function name.
  1065. </p>
  1066. </div>
  1067. <script type="text/javascript">$('#searchbox').show(0);</script>
  1068. </div>
  1069. </div>
  1070. <div class="clearer"></div>
  1071. </div>
  1072. <div class="related">
  1073. <h3>Navigation</h3>
  1074. <ul>
  1075. <li class="right" style="margin-right: 10px">
  1076. <a href="genindex.html" title="General Index"
  1077. >index</a></li>
  1078. <li class="right" >
  1079. <a href="py-modindex.html" title="Python Module Index"
  1080. >modules</a> |</li>
  1081. <li class="right" >
  1082. <a href="alarmdecoder.event.html" title="event Package"
  1083. >next</a> |</li>
  1084. <li class="right" >
  1085. <a href="index.html" title="Welcome to alarmdecoder’s documentation!"
  1086. >previous</a> |</li>
  1087. <li><a href="index.html">alarmdecoder documentation</a> &raquo;</li>
  1088. </ul>
  1089. </div>
  1090. <div class="footer">
  1091. &copy; Copyright 2013, Nu Tech Software Solutions, Inc..
  1092. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1.
  1093. </div>
  1094. </body>
  1095. </html>