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.

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