|
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title>pyad2 Package — pyad2 documentation</title>
-
- <link rel="stylesheet" href="_static/default.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT: './',
- VERSION: '',
- COLLAPSE_INDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="pyad2 documentation" href="index.html" />
- <link rel="next" title="event Package" href="pyad2.event.html" />
- <link rel="prev" title="Welcome to pyad2’s documentation!" href="index.html" />
- </head>
- <body>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="py-modindex.html" title="Python Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="pyad2.event.html" title="event Package"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="index.html" title="Welcome to pyad2’s documentation!"
- accesskey="P">previous</a> |</li>
- <li><a href="index.html">pyad2 documentation</a> »</li>
- </ul>
- </div>
-
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body">
-
- <div class="section" id="pyad2-package">
- <h1>pyad2 Package<a class="headerlink" href="#pyad2-package" title="Permalink to this headline">¶</a></h1>
- <div class="section" id="module-pyad2.ad2">
- <span id="ad2-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">ad2</span></tt> Module<a class="headerlink" href="#module-pyad2.ad2" title="Permalink to this headline">¶</a></h2>
- <p>Provides the full AD2 class and factory.</p>
- <dl class="class">
- <dt id="pyad2.ad2.AD2Factory">
- <em class="property">class </em><tt class="descclassname">pyad2.ad2.</tt><tt class="descname">AD2Factory</tt><big>(</big><em>attached_event=None</em>, <em>detached_event=None</em><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
- <p>Factory for creation of AD2USB devices as well as provides attach/detach events.”</p>
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2Factory.on_attached">
- <tt class="descname">on_attached</tt><a class="headerlink" href="#pyad2.ad2.AD2Factory.on_attached" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when an AD2USB device has been detected.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2Factory.on_detached">
- <tt class="descname">on_detached</tt><a class="headerlink" href="#pyad2.ad2.AD2Factory.on_detached" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when an AD2USB device has been removed.</p>
- </dd></dl>
-
- <dl class="classmethod">
- <dt id="pyad2.ad2.AD2Factory.find_all">
- <em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.find_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.find_all" title="Permalink to this definition">¶</a></dt>
- <dd><p>Returns all AD2USB devices located on the system.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of devices found</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="classmethod">
- <dt id="pyad2.ad2.AD2Factory.devices">
- <em class="property">classmethod </em><tt class="descname">devices</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.devices"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.devices" title="Permalink to this definition">¶</a></dt>
- <dd><p>Returns a cached list of AD2USB devices located on the system.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">cached list of devices found.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="classmethod">
- <dt id="pyad2.ad2.AD2Factory.create">
- <em class="property">classmethod </em><tt class="descname">create</tt><big>(</big><em>device=None</em><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.create" title="Permalink to this definition">¶</a></dt>
- <dd><p>Factory method that returns the requested AD2USB device, or the first device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>device</strong> (<em>tuple</em>) – Tuple describing the USB device to open, as returned by find_all().</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">AD2USB object utilizing the specified device.</td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body">NoDeviceError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2Factory.close">
- <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.close" title="Permalink to this definition">¶</a></dt>
- <dd><p>Clean up and shut down.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2Factory.start">
- <tt class="descname">start</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.start" title="Permalink to this definition">¶</a></dt>
- <dd><p>Starts the detection thread, if not already running.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2Factory.stop">
- <tt class="descname">stop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.stop" title="Permalink to this definition">¶</a></dt>
- <dd><p>Stops the detection thread.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2Factory.get_device">
- <tt class="descname">get_device</tt><big>(</big><em>device=None</em><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.get_device"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.get_device" title="Permalink to this definition">¶</a></dt>
- <dd><p>Factory method that returns the requested AD2USB device, or the first device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>device</strong> (<em>tuple</em>) – Tuple describing the USB device to open, as returned by find_all().</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.ad2.AD2Factory.DetectThread">
- <em class="property">class </em><tt class="descname">DetectThread</tt><big>(</big><em>factory</em><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.DetectThread"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.DetectThread" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></p>
- <p>Thread that handles detection of added/removed devices.</p>
- <dl class="method">
- <dt id="pyad2.ad2.AD2Factory.DetectThread.stop">
- <tt class="descname">stop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.DetectThread.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.DetectThread.stop" title="Permalink to this definition">¶</a></dt>
- <dd><p>Stops the thread.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2Factory.DetectThread.run">
- <tt class="descname">run</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2Factory.DetectThread.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2Factory.DetectThread.run" title="Permalink to this definition">¶</a></dt>
- <dd><p>The actual detection process.</p>
- </dd></dl>
-
- </dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.ad2.AD2">
- <em class="property">class </em><tt class="descclassname">pyad2.ad2.</tt><tt class="descname">AD2</tt><big>(</big><em>device</em><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
- <p>High-level wrapper around AD2 devices.</p>
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_arm">
- <tt class="descname">on_arm</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_arm" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the panel is armed.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_disarm">
- <tt class="descname">on_disarm</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_disarm" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the panel is disarmed.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_power_changed">
- <tt class="descname">on_power_changed</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_power_changed" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when panel power switches between AC and DC.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_alarm">
- <tt class="descname">on_alarm</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_alarm" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the alarm is triggered.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_fire">
- <tt class="descname">on_fire</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_fire" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when a fire is detected.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_bypass">
- <tt class="descname">on_bypass</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_bypass" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when a zone is bypassed.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_boot">
- <tt class="descname">on_boot</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_boot" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device finishes bootings.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_config_received">
- <tt class="descname">on_config_received</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_config_received" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device receives its configuration.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_zone_fault">
- <tt class="descname">on_zone_fault</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_zone_fault" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device detects a zone fault.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_zone_restore">
- <tt class="descname">on_zone_restore</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_zone_restore" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device detects that a fault is restored.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_low_battery">
- <tt class="descname">on_low_battery</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_low_battery" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device detects a low battery.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_panic">
- <tt class="descname">on_panic</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_panic" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device detects a panic.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_relay_changed">
- <tt class="descname">on_relay_changed</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_relay_changed" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when a relay is opened or closed on an expander board.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_message">
- <tt class="descname">on_message</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_message" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when a message has been received from the device.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_lrr_message">
- <tt class="descname">on_lrr_message</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_lrr_message" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when an LRR message is received.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_rfx_message">
- <tt class="descname">on_rfx_message</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_rfx_message" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when an RFX message is received.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_open">
- <tt class="descname">on_open</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_open" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device has been opened.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_close">
- <tt class="descname">on_close</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_close" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device has been closed.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_read">
- <tt class="descname">on_read</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_read" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when a line has been read from the device.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.on_write">
- <tt class="descname">on_write</tt><a class="headerlink" href="#pyad2.ad2.AD2.on_write" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when data has been written to the device.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.F1">
- <tt class="descname">F1</tt><em class="property"> = u'\x01\x01\x01'</em><a class="headerlink" href="#pyad2.ad2.AD2.F1" title="Permalink to this definition">¶</a></dt>
- <dd><p>Represents panel function key #1</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.F2">
- <tt class="descname">F2</tt><em class="property"> = u'\x02\x02\x02'</em><a class="headerlink" href="#pyad2.ad2.AD2.F2" title="Permalink to this definition">¶</a></dt>
- <dd><p>Represents panel function key #2</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.F3">
- <tt class="descname">F3</tt><em class="property"> = u'\x03\x03\x03'</em><a class="headerlink" href="#pyad2.ad2.AD2.F3" title="Permalink to this definition">¶</a></dt>
- <dd><p>Represents panel function key #3</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.F4">
- <tt class="descname">F4</tt><em class="property"> = u'\x04\x04\x04'</em><a class="headerlink" href="#pyad2.ad2.AD2.F4" title="Permalink to this definition">¶</a></dt>
- <dd><p>Represents panel function key #4</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.BATTERY_TIMEOUT">
- <tt class="descname">BATTERY_TIMEOUT</tt><em class="property"> = 30</em><a class="headerlink" href="#pyad2.ad2.AD2.BATTERY_TIMEOUT" title="Permalink to this definition">¶</a></dt>
- <dd><p>Timeout before the battery status reverts.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.FIRE_TIMEOUT">
- <tt class="descname">FIRE_TIMEOUT</tt><em class="property"> = 30</em><a class="headerlink" href="#pyad2.ad2.AD2.FIRE_TIMEOUT" title="Permalink to this definition">¶</a></dt>
- <dd><p>Timeout before the fire status reverts.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.ad2.AD2.id">
- <tt class="descname">id</tt><a class="reference internal" href="_modules/pyad2/ad2.html#AD2.id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.id" title="Permalink to this definition">¶</a></dt>
- <dd><p>The ID of the AD2 device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The identification string for the device.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2.open">
- <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/pyad2/ad2.html#AD2.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.open" title="Permalink to this definition">¶</a></dt>
- <dd><p>Opens the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
- <li><strong>baudrate</strong> (<em>int</em>) – The baudrate used for the device.</li>
- <li><strong>no_reader_thread</strong> (<em>bool</em>) – Specifies whether or not the automatic reader thread should be started or not</li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2.close">
- <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.close" title="Permalink to this definition">¶</a></dt>
- <dd><p>Closes the device.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2.send">
- <tt class="descname">send</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2.send"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.send" title="Permalink to this definition">¶</a></dt>
- <dd><p>Sends data to the AD2 device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em>) – The data to send.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2.get_config">
- <tt class="descname">get_config</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2.get_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.get_config" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the configuration from the device.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2.save_config">
- <tt class="descname">save_config</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2.save_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.save_config" title="Permalink to this definition">¶</a></dt>
- <dd><p>Sets configuration entries on the device.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2.reboot">
- <tt class="descname">reboot</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2.reboot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.reboot" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reboots the device.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2.fault_zone">
- <tt class="descname">fault_zone</tt><big>(</big><em>zone</em>, <em>simulate_wire_problem=False</em><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2.fault_zone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.fault_zone" title="Permalink to this definition">¶</a></dt>
- <dd><p>Faults a zone if we are emulating a zone expander.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
- <li><strong>zone</strong> (<em>int</em>) – The zone to fault.</li>
- <li><strong>simulate_wire_problem</strong> (<em>bool</em>) – Whether or not to simulate a wire fault.</li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.ad2.AD2.clear_zone">
- <tt class="descname">clear_zone</tt><big>(</big><em>zone</em><big>)</big><a class="reference internal" href="_modules/pyad2/ad2.html#AD2.clear_zone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.ad2.AD2.clear_zone" title="Permalink to this definition">¶</a></dt>
- <dd><p>Clears a zone if we are emulating a zone expander.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>zone</strong> (<em>int</em>) – The zone to clear.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- </dd></dl>
-
- </div>
- <div class="section" id="module-pyad2.devices">
- <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-pyad2.devices" title="Permalink to this headline">¶</a></h2>
- <p>Contains different types of devices belonging to the AD2 family.</p>
- <dl class="class">
- <dt id="pyad2.devices.Device">
- <em class="property">class </em><tt class="descclassname">pyad2.devices.</tt><tt class="descname">Device</tt><a class="reference internal" href="_modules/pyad2/devices.html#Device"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.Device" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
- <p>Generic parent device to all AD2 products.</p>
- <dl class="attribute">
- <dt id="pyad2.devices.Device.on_open">
- <tt class="descname">on_open</tt><a class="headerlink" href="#pyad2.devices.Device.on_open" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device has been opened</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.Device.on_close">
- <tt class="descname">on_close</tt><a class="headerlink" href="#pyad2.devices.Device.on_close" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device has been closed</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.Device.on_read">
- <tt class="descname">on_read</tt><a class="headerlink" href="#pyad2.devices.Device.on_read" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when a line has been read from the device</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.Device.on_write">
- <tt class="descname">on_write</tt><a class="headerlink" href="#pyad2.devices.Device.on_write" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when data has been written to the device</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.Device.id">
- <tt class="descname">id</tt><a class="reference internal" href="_modules/pyad2/devices.html#Device.id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.Device.id" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieve the device ID.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The identification string for the device.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.Device.is_reader_alive">
- <tt class="descname">is_reader_alive</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#Device.is_reader_alive"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.Device.is_reader_alive" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the reader thread is alive.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Whether or not the reader thread is alive.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.Device.stop_reader">
- <tt class="descname">stop_reader</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#Device.stop_reader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.Device.stop_reader" title="Permalink to this definition">¶</a></dt>
- <dd><p>Stops the reader thread.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.Device.close">
- <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#Device.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.Device.close" title="Permalink to this definition">¶</a></dt>
- <dd><p>Closes the device.</p>
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.devices.Device.ReadThread">
- <em class="property">class </em><tt class="descname">ReadThread</tt><big>(</big><em>device</em><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#Device.ReadThread"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.Device.ReadThread" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></p>
- <p>Reader thread which processes messages from the device.</p>
- <dl class="attribute">
- <dt id="pyad2.devices.Device.ReadThread.READ_TIMEOUT">
- <tt class="descname">READ_TIMEOUT</tt><em class="property"> = 10</em><a class="headerlink" href="#pyad2.devices.Device.ReadThread.READ_TIMEOUT" title="Permalink to this definition">¶</a></dt>
- <dd><p>Timeout for the reader thread.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.Device.ReadThread.stop">
- <tt class="descname">stop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#Device.ReadThread.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.Device.ReadThread.stop" title="Permalink to this definition">¶</a></dt>
- <dd><p>Stops the running thread.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.Device.ReadThread.run">
- <tt class="descname">run</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#Device.ReadThread.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.Device.ReadThread.run" title="Permalink to this definition">¶</a></dt>
- <dd><p>The actual read process.</p>
- </dd></dl>
-
- </dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.devices.USBDevice">
- <em class="property">class </em><tt class="descclassname">pyad2.devices.</tt><tt class="descname">USBDevice</tt><big>(</big><em>interface=(None</em>, <em>0)</em><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#USBDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <a class="reference internal" href="#pyad2.devices.Device" title="pyad2.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">pyad2.devices.Device</span></tt></a></p>
- <p>AD2USB device exposed with PyFTDI’s interface.</p>
- <dl class="attribute">
- <dt id="pyad2.devices.USBDevice.FTDI_VENDOR_ID">
- <tt class="descname">FTDI_VENDOR_ID</tt><em class="property"> = 1027</em><a class="headerlink" href="#pyad2.devices.USBDevice.FTDI_VENDOR_ID" title="Permalink to this definition">¶</a></dt>
- <dd><p>Vendor ID used to recognize AD2USB devices.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.USBDevice.FTDI_PRODUCT_ID">
- <tt class="descname">FTDI_PRODUCT_ID</tt><em class="property"> = 24577</em><a class="headerlink" href="#pyad2.devices.USBDevice.FTDI_PRODUCT_ID" title="Permalink to this definition">¶</a></dt>
- <dd><p>Product ID used to recognize AD2USB devices.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.USBDevice.BAUDRATE">
- <tt class="descname">BAUDRATE</tt><em class="property"> = 115200</em><a class="headerlink" href="#pyad2.devices.USBDevice.BAUDRATE" title="Permalink to this definition">¶</a></dt>
- <dd><p>Default baudrate for AD2USB devices.</p>
- </dd></dl>
-
- <dl class="staticmethod">
- <dt id="pyad2.devices.USBDevice.find_all">
- <em class="property">static </em><tt class="descname">find_all</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#USBDevice.find_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.find_all" title="Permalink to this definition">¶</a></dt>
- <dd><p>Returns all FTDI devices matching our vendor and product IDs.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of devices</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.USBDevice.interface">
- <tt class="descname">interface</tt><a class="reference internal" href="_modules/pyad2/devices.html#USBDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.interface" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the interface used to connect to the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the interface used to connect to the device.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.USBDevice.serial_number">
- <tt class="descname">serial_number</tt><a class="reference internal" href="_modules/pyad2/devices.html#USBDevice.serial_number"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.serial_number" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the serial number of the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The serial number of the device.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.USBDevice.description">
- <tt class="descname">description</tt><a class="reference internal" href="_modules/pyad2/devices.html#USBDevice.description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.description" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the description of the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The description of the device.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.USBDevice.open">
- <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/pyad2/devices.html#USBDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.open" title="Permalink to this definition">¶</a></dt>
- <dd><p>Opens the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>baudrate</strong> (<em>int</em>) – The baudrate to use.</li>
- <li><strong>no_reader_thread</strong> (<em>bool</em>) – Whether or not to automatically start the reader thread.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoDeviceError</p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.USBDevice.close">
- <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#USBDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.close" title="Permalink to this definition">¶</a></dt>
- <dd><p>Closes the device.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.USBDevice.write">
- <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#USBDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.write" title="Permalink to this definition">¶</a></dt>
- <dd><p>Writes data to the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em>) – Data to write</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.USBDevice.read">
- <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#USBDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.read" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reads a single character from the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The character read from the device.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.USBDevice.read_line">
- <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/pyad2/devices.html#USBDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.USBDevice.read_line" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reads a line from the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>timeout</strong> (<em>float</em>) – Read timeout</li>
- <li><strong>purge_buffer</strong> (<em>bool</em>) – Indicates whether to purge the buffer prior to reading.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The line that was read.</p>
- </td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">CommError, TimeoutError</p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.devices.SerialDevice">
- <em class="property">class </em><tt class="descclassname">pyad2.devices.</tt><tt class="descname">SerialDevice</tt><big>(</big><em>interface=None</em><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#SerialDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SerialDevice" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <a class="reference internal" href="#pyad2.devices.Device" title="pyad2.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">pyad2.devices.Device</span></tt></a></p>
- <p>AD2USB or AD2SERIAL device exposed with the pyserial interface.</p>
- <dl class="attribute">
- <dt id="pyad2.devices.SerialDevice.BAUDRATE">
- <tt class="descname">BAUDRATE</tt><em class="property"> = 19200</em><a class="headerlink" href="#pyad2.devices.SerialDevice.BAUDRATE" title="Permalink to this definition">¶</a></dt>
- <dd><p>Default baudrate for Serial devices.</p>
- </dd></dl>
-
- <dl class="staticmethod">
- <dt id="pyad2.devices.SerialDevice.find_all">
- <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/pyad2/devices.html#SerialDevice.find_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SerialDevice.find_all" title="Permalink to this definition">¶</a></dt>
- <dd><p>Returns all serial ports present.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pattern</strong> (<em>str</em>) – Pattern to search for when retrieving serial ports.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of devices</td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.SerialDevice.interface">
- <tt class="descname">interface</tt><a class="reference internal" href="_modules/pyad2/devices.html#SerialDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SerialDevice.interface" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the interface used to connect to the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the interface used to connect to the device.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SerialDevice.open">
- <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/pyad2/devices.html#SerialDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SerialDevice.open" title="Permalink to this definition">¶</a></dt>
- <dd><p>Opens the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>baudrate</strong> (<em>int</em>) – The baudrate to use with the device.</li>
- <li><strong>no_reader_thread</strong> (<em>bool</em>) – Whether or not to automatically start the reader thread.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoDeviceError</p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SerialDevice.close">
- <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#SerialDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SerialDevice.close" title="Permalink to this definition">¶</a></dt>
- <dd><p>Closes the device.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SerialDevice.write">
- <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#SerialDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SerialDevice.write" title="Permalink to this definition">¶</a></dt>
- <dd><p>Writes data to the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em>) – The data to write.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SerialDevice.read">
- <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#SerialDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SerialDevice.read" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reads a single character from the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The character read from the device.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SerialDevice.read_line">
- <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/pyad2/devices.html#SerialDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SerialDevice.read_line" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reads a line from the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>timeout</strong> (<em>float</em>) – The read timeout.</li>
- <li><strong>purge_buffer</strong> (<em>bool</em>) – Indicates whether to purge the buffer prior to reading.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The line read.</p>
- </td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">CommError, TimeoutError</p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.devices.SocketDevice">
- <em class="property">class </em><tt class="descclassname">pyad2.devices.</tt><tt class="descname">SocketDevice</tt><big>(</big><em>interface=('localhost'</em>, <em>10000)</em><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <a class="reference internal" href="#pyad2.devices.Device" title="pyad2.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">pyad2.devices.Device</span></tt></a></p>
- <p>Device that supports communication with an AD2 that is exposed via ser2sock or another
- Serial to IP interface.</p>
- <dl class="attribute">
- <dt id="pyad2.devices.SocketDevice.interface">
- <tt class="descname">interface</tt><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.interface" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the interface used to connect to the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the interface used to connect to the device.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.SocketDevice.ssl">
- <tt class="descname">ssl</tt><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice.ssl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.ssl" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves whether or not the device is using SSL.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Whether or not the device is using SSL.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.SocketDevice.ssl_certificate">
- <tt class="descname">ssl_certificate</tt><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice.ssl_certificate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.ssl_certificate" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the SSL client certificate path used for authentication.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The certificate path</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.SocketDevice.ssl_key">
- <tt class="descname">ssl_key</tt><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice.ssl_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.ssl_key" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the SSL client certificate key used for authentication.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The key path</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.devices.SocketDevice.ssl_ca">
- <tt class="descname">ssl_ca</tt><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice.ssl_ca"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.ssl_ca" title="Permalink to this definition">¶</a></dt>
- <dd><p>Retrieves the SSL Certificate Authority certificate used for authentication.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The CA path</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SocketDevice.open">
- <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/pyad2/devices.html#SocketDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.open" title="Permalink to this definition">¶</a></dt>
- <dd><p>Opens the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>baudrate</strong> (<em>int</em>) – The baudrate to use</li>
- <li><strong>no_reader_thread</strong> (<em>bool</em>) – Whether or not to automatically open the reader thread.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoDeviceError, CommError</p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SocketDevice.close">
- <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.close" title="Permalink to this definition">¶</a></dt>
- <dd><p>Closes the device.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SocketDevice.write">
- <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.write" title="Permalink to this definition">¶</a></dt>
- <dd><p>Writes data to the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>str</em>) – The data to write.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The number of bytes sent.</td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SocketDevice.read">
- <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pyad2/devices.html#SocketDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.read" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reads a single character from the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The character read from the device.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">CommError</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.devices.SocketDevice.read_line">
- <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/pyad2/devices.html#SocketDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.devices.SocketDevice.read_line" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reads a line from the device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>timeout</strong> (<em>float</em>) – The read timeout.</li>
- <li><strong>purge_buffer</strong> (<em>bool</em>) – Indicates whether to purge the buffer prior to reading.</li>
- </ul>
- </td>
- </tr>
- <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>
- </td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">CommError, TimeoutError</p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- </dd></dl>
-
- </div>
- <div class="section" id="module-pyad2.util">
- <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-pyad2.util" title="Permalink to this headline">¶</a></h2>
- <p>Provides utility classes for the AD2 devices.</p>
- <dl class="exception">
- <dt id="pyad2.util.NoDeviceError">
- <em class="property">exception </em><tt class="descclassname">pyad2.util.</tt><tt class="descname">NoDeviceError</tt><a class="reference internal" href="_modules/pyad2/util.html#NoDeviceError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.util.NoDeviceError" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
- <p>No devices found.</p>
- </dd></dl>
-
- <dl class="exception">
- <dt id="pyad2.util.CommError">
- <em class="property">exception </em><tt class="descclassname">pyad2.util.</tt><tt class="descname">CommError</tt><a class="reference internal" href="_modules/pyad2/util.html#CommError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.util.CommError" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
- <p>There was an error communicating with the device.</p>
- </dd></dl>
-
- <dl class="exception">
- <dt id="pyad2.util.TimeoutError">
- <em class="property">exception </em><tt class="descclassname">pyad2.util.</tt><tt class="descname">TimeoutError</tt><a class="reference internal" href="_modules/pyad2/util.html#TimeoutError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.util.TimeoutError" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
- <p>There was a timeout while trying to communicate with the device.</p>
- </dd></dl>
-
- <dl class="exception">
- <dt id="pyad2.util.InvalidMessageError">
- <em class="property">exception </em><tt class="descclassname">pyad2.util.</tt><tt class="descname">InvalidMessageError</tt><a class="reference internal" href="_modules/pyad2/util.html#InvalidMessageError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.util.InvalidMessageError" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
- <p>The format of the panel message was invalid.</p>
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.util.Firmware">
- <em class="property">class </em><tt class="descclassname">pyad2.util.</tt><tt class="descname">Firmware</tt><a class="reference internal" href="_modules/pyad2/util.html#Firmware"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.util.Firmware" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
- <p>Represents firmware for the AD2 devices.</p>
- <dl class="attribute">
- <dt id="pyad2.util.Firmware.STAGE_START">
- <tt class="descname">STAGE_START</tt><em class="property"> = 0</em><a class="headerlink" href="#pyad2.util.Firmware.STAGE_START" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.util.Firmware.STAGE_WAITING">
- <tt class="descname">STAGE_WAITING</tt><em class="property"> = 1</em><a class="headerlink" href="#pyad2.util.Firmware.STAGE_WAITING" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.util.Firmware.STAGE_BOOT">
- <tt class="descname">STAGE_BOOT</tt><em class="property"> = 2</em><a class="headerlink" href="#pyad2.util.Firmware.STAGE_BOOT" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.util.Firmware.STAGE_LOAD">
- <tt class="descname">STAGE_LOAD</tt><em class="property"> = 3</em><a class="headerlink" href="#pyad2.util.Firmware.STAGE_LOAD" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.util.Firmware.STAGE_UPLOADING">
- <tt class="descname">STAGE_UPLOADING</tt><em class="property"> = 4</em><a class="headerlink" href="#pyad2.util.Firmware.STAGE_UPLOADING" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.util.Firmware.STAGE_DONE">
- <tt class="descname">STAGE_DONE</tt><em class="property"> = 5</em><a class="headerlink" href="#pyad2.util.Firmware.STAGE_DONE" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
-
- <dl class="staticmethod">
- <dt id="pyad2.util.Firmware.upload">
- <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/pyad2/util.html#Firmware.upload"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.util.Firmware.upload" title="Permalink to this definition">¶</a></dt>
- <dd><p>Uploads firmware to an AD2 device.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
- <li><strong>filename</strong> (<em>str</em>) – The firmware filename</li>
- <li><strong>progress_callback</strong> (<em>function</em>) – Callback function used to report progress.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">util.NoDeviceError, util.TimeoutError</p>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- </dd></dl>
-
- </div>
- <div class="section" id="module-pyad2.zonetracking">
- <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-pyad2.zonetracking" title="Permalink to this headline">¶</a></h2>
- <p>Provides zone tracking functionality for the AD2 device family.</p>
- <dl class="class">
- <dt id="pyad2.zonetracking.Zone">
- <em class="property">class </em><tt class="descclassname">pyad2.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/pyad2/zonetracking.html#Zone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.zonetracking.Zone" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
- <p>Representation of a panel zone.</p>
- <dl class="attribute">
- <dt id="pyad2.zonetracking.Zone.CLEAR">
- <tt class="descname">CLEAR</tt><em class="property"> = 0</em><a class="headerlink" href="#pyad2.zonetracking.Zone.CLEAR" title="Permalink to this definition">¶</a></dt>
- <dd><p>Status indicating that the zone is cleared.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.zonetracking.Zone.FAULT">
- <tt class="descname">FAULT</tt><em class="property"> = 1</em><a class="headerlink" href="#pyad2.zonetracking.Zone.FAULT" title="Permalink to this definition">¶</a></dt>
- <dd><p>Status indicating that the zone is faulted.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.zonetracking.Zone.CHECK">
- <tt class="descname">CHECK</tt><em class="property"> = 2</em><a class="headerlink" href="#pyad2.zonetracking.Zone.CHECK" title="Permalink to this definition">¶</a></dt>
- <dd><p>Status indicating that there is a wiring issue with the zone.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.zonetracking.Zone.STATUS">
- <tt class="descname">STATUS</tt><em class="property"> = {0: 'CLEAR', 1: 'FAULT', 2: 'CHECK'}</em><a class="headerlink" href="#pyad2.zonetracking.Zone.STATUS" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.zonetracking.Zonetracker">
- <em class="property">class </em><tt class="descclassname">pyad2.zonetracking.</tt><tt class="descname">Zonetracker</tt><a class="reference internal" href="_modules/pyad2/zonetracking.html#Zonetracker"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.zonetracking.Zonetracker" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
- <p>Handles tracking of zone and their statuses.</p>
- <dl class="attribute">
- <dt id="pyad2.zonetracking.Zonetracker.on_fault">
- <tt class="descname">on_fault</tt><a class="headerlink" href="#pyad2.zonetracking.Zonetracker.on_fault" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device detects a zone fault.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.zonetracking.Zonetracker.on_restore">
- <tt class="descname">on_restore</tt><a class="headerlink" href="#pyad2.zonetracking.Zonetracker.on_restore" title="Permalink to this definition">¶</a></dt>
- <dd><p>Called when the device detects that a fault is restored.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.zonetracking.Zonetracker.EXPIRE">
- <tt class="descname">EXPIRE</tt><em class="property"> = 30</em><a class="headerlink" href="#pyad2.zonetracking.Zonetracker.EXPIRE" title="Permalink to this definition">¶</a></dt>
- <dd><p>Zone expiration timeout.</p>
- </dd></dl>
-
- <dl class="method">
- <dt id="pyad2.zonetracking.Zonetracker.update">
- <tt class="descname">update</tt><big>(</big><em>message</em><big>)</big><a class="reference internal" href="_modules/pyad2/zonetracking.html#Zonetracker.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.zonetracking.Zonetracker.update" title="Permalink to this definition">¶</a></dt>
- <dd><p>Update zone statuses based on the current message.</p>
- <table class="docutils field-list" frame="void" rules="none">
- <col class="field-name" />
- <col class="field-body" />
- <tbody valign="top">
- <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> (<em>Message or ExpanderMessage</em>) – Message to use to update the zone tracking.</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
-
- </dd></dl>
-
- </div>
- <div class="section" id="module-pyad2.panels">
- <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-pyad2.panels" title="Permalink to this headline">¶</a></h2>
- <p>Representations of Panels and their templates.</p>
- </div>
- <div class="section" id="module-pyad2.messages">
- <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-pyad2.messages" title="Permalink to this headline">¶</a></h2>
- <p>Message representations received from the panel through the AD2 devices.</p>
- <dl class="class">
- <dt id="pyad2.messages.BaseMessage">
- <em class="property">class </em><tt class="descclassname">pyad2.messages.</tt><tt class="descname">BaseMessage</tt><a class="reference internal" href="_modules/pyad2/messages.html#BaseMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.messages.BaseMessage" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
- <p>Base class for messages.</p>
- <dl class="attribute">
- <dt id="pyad2.messages.BaseMessage.raw">
- <tt class="descname">raw</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.BaseMessage.raw" title="Permalink to this definition">¶</a></dt>
- <dd><p>The raw message text</p>
- </dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.messages.Message">
- <em class="property">class </em><tt class="descclassname">pyad2.messages.</tt><tt class="descname">Message</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/pyad2/messages.html#Message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.messages.Message" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <a class="reference internal" href="#pyad2.messages.BaseMessage" title="pyad2.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">pyad2.messages.BaseMessage</span></tt></a></p>
- <p>Represents a message from the alarm panel.</p>
- <dl class="attribute">
- <dt id="pyad2.messages.Message.ready">
- <tt class="descname">ready</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.ready" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the panel is in a ready state</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.armed_away">
- <tt class="descname">armed_away</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.armed_away" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the panel is armed away</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.armed_home">
- <tt class="descname">armed_home</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.armed_home" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the panel is armed home</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.backlight_on">
- <tt class="descname">backlight_on</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.backlight_on" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the keypad backlight is on</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.programming_mode">
- <tt class="descname">programming_mode</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.programming_mode" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not we’re in programming mode</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.beeps">
- <tt class="descname">beeps</tt><em class="property"> = -1</em><a class="headerlink" href="#pyad2.messages.Message.beeps" title="Permalink to this definition">¶</a></dt>
- <dd><p>Number of beeps associated with a message</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.zone_bypassed">
- <tt class="descname">zone_bypassed</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.zone_bypassed" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not a zone is bypassed</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.ac_power">
- <tt class="descname">ac_power</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.ac_power" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the panel is on AC power</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.chime_on">
- <tt class="descname">chime_on</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.chime_on" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the chime is enabled</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.alarm_event_occurred">
- <tt class="descname">alarm_event_occurred</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.alarm_event_occurred" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not an alarm event has occurred</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.alarm_sounding">
- <tt class="descname">alarm_sounding</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.alarm_sounding" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not an alarm is sounding</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.battery_low">
- <tt class="descname">battery_low</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.battery_low" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not there is a low battery</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.entry_delay_off">
- <tt class="descname">entry_delay_off</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.entry_delay_off" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the entry delay is enabled</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.fire_alarm">
- <tt class="descname">fire_alarm</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.fire_alarm" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not a fire alarm is sounding</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.check_zone">
- <tt class="descname">check_zone</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.check_zone" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not there are zones that require attention.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.perimeter_only">
- <tt class="descname">perimeter_only</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.Message.perimeter_only" title="Permalink to this definition">¶</a></dt>
- <dd><p>Indicates whether or not the perimeter is armed</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.numeric_code">
- <tt class="descname">numeric_code</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.Message.numeric_code" title="Permalink to this definition">¶</a></dt>
- <dd><p>The numeric code associated with the message</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.text">
- <tt class="descname">text</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.Message.text" title="Permalink to this definition">¶</a></dt>
- <dd><p>The human-readable text to be displayed on the panel LCD</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.cursor_location">
- <tt class="descname">cursor_location</tt><em class="property"> = -1</em><a class="headerlink" href="#pyad2.messages.Message.cursor_location" title="Permalink to this definition">¶</a></dt>
- <dd><p>Current cursor location on the keypad</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.mask">
- <tt class="descname">mask</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.Message.mask" title="Permalink to this definition">¶</a></dt>
- <dd><p>Address mask this message is intended for</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.bitfield">
- <tt class="descname">bitfield</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.Message.bitfield" title="Permalink to this definition">¶</a></dt>
- <dd><p>The bitfield associated with this message</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.Message.panel_data">
- <tt class="descname">panel_data</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.Message.panel_data" title="Permalink to this definition">¶</a></dt>
- <dd><p>The panel data field associated with this message</p>
- </dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.messages.ExpanderMessage">
- <em class="property">class </em><tt class="descclassname">pyad2.messages.</tt><tt class="descname">ExpanderMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/pyad2/messages.html#ExpanderMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.messages.ExpanderMessage" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <a class="reference internal" href="#pyad2.messages.BaseMessage" title="pyad2.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">pyad2.messages.BaseMessage</span></tt></a></p>
- <p>Represents a message from a zone or relay expansion module.</p>
- <dl class="attribute">
- <dt id="pyad2.messages.ExpanderMessage.ZONE">
- <tt class="descname">ZONE</tt><em class="property"> = 0</em><a class="headerlink" href="#pyad2.messages.ExpanderMessage.ZONE" title="Permalink to this definition">¶</a></dt>
- <dd><p>Flag indicating that the expander message relates to a Zone Expander.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.ExpanderMessage.RELAY">
- <tt class="descname">RELAY</tt><em class="property"> = 1</em><a class="headerlink" href="#pyad2.messages.ExpanderMessage.RELAY" title="Permalink to this definition">¶</a></dt>
- <dd><p>Flag indicating that the expander message relates to a Relay Expander.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.ExpanderMessage.type">
- <tt class="descname">type</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.ExpanderMessage.type" title="Permalink to this definition">¶</a></dt>
- <dd><p>Expander message type: ExpanderMessage.ZONE or ExpanderMessage.RELAY</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.ExpanderMessage.address">
- <tt class="descname">address</tt><em class="property"> = -1</em><a class="headerlink" href="#pyad2.messages.ExpanderMessage.address" title="Permalink to this definition">¶</a></dt>
- <dd><p>Address of expander</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.ExpanderMessage.channel">
- <tt class="descname">channel</tt><em class="property"> = -1</em><a class="headerlink" href="#pyad2.messages.ExpanderMessage.channel" title="Permalink to this definition">¶</a></dt>
- <dd><p>Channel on the expander</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.ExpanderMessage.value">
- <tt class="descname">value</tt><em class="property"> = -1</em><a class="headerlink" href="#pyad2.messages.ExpanderMessage.value" title="Permalink to this definition">¶</a></dt>
- <dd><p>Value associated with the message</p>
- </dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.messages.RFMessage">
- <em class="property">class </em><tt class="descclassname">pyad2.messages.</tt><tt class="descname">RFMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/pyad2/messages.html#RFMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.messages.RFMessage" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <a class="reference internal" href="#pyad2.messages.BaseMessage" title="pyad2.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">pyad2.messages.BaseMessage</span></tt></a></p>
- <p>Represents a message from an RF receiver.</p>
- <dl class="attribute">
- <dt id="pyad2.messages.RFMessage.x">
- <tt class="descname">x</tt><em class="property"> = 3</em><a class="headerlink" href="#pyad2.messages.RFMessage.x" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.RFMessage.serial_number">
- <tt class="descname">serial_number</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.RFMessage.serial_number" title="Permalink to this definition">¶</a></dt>
- <dd><p>Serial number of the RF device</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.RFMessage.value">
- <tt class="descname">value</tt><em class="property"> = -1</em><a class="headerlink" href="#pyad2.messages.RFMessage.value" title="Permalink to this definition">¶</a></dt>
- <dd><p>Value associated with this message</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.RFMessage.battery">
- <tt class="descname">battery</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.RFMessage.battery" title="Permalink to this definition">¶</a></dt>
- <dd><p>Battery low indication</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.RFMessage.supervision">
- <tt class="descname">supervision</tt><em class="property"> = False</em><a class="headerlink" href="#pyad2.messages.RFMessage.supervision" title="Permalink to this definition">¶</a></dt>
- <dd><p>Supervision required indication</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.RFMessage.loop">
- <tt class="descname">loop</tt><em class="property"> = [False, False, False, False]</em><a class="headerlink" href="#pyad2.messages.RFMessage.loop" title="Permalink to this definition">¶</a></dt>
- <dd><p>Loop indicators</p>
- </dd></dl>
-
- </dd></dl>
-
- <dl class="class">
- <dt id="pyad2.messages.LRRMessage">
- <em class="property">class </em><tt class="descclassname">pyad2.messages.</tt><tt class="descname">LRRMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/pyad2/messages.html#LRRMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyad2.messages.LRRMessage" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <a class="reference internal" href="#pyad2.messages.BaseMessage" title="pyad2.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">pyad2.messages.BaseMessage</span></tt></a></p>
- <p>Represent a message from a Long Range Radio.</p>
- <dl class="attribute">
- <dt id="pyad2.messages.LRRMessage.event_data">
- <tt class="descname">event_data</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.LRRMessage.event_data" title="Permalink to this definition">¶</a></dt>
- <dd><p>Data associated with the LRR message. Usually user ID or zone.</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.LRRMessage.partition">
- <tt class="descname">partition</tt><em class="property"> = -1</em><a class="headerlink" href="#pyad2.messages.LRRMessage.partition" title="Permalink to this definition">¶</a></dt>
- <dd><p>The partition that this message applies to</p>
- </dd></dl>
-
- <dl class="attribute">
- <dt id="pyad2.messages.LRRMessage.event_type">
- <tt class="descname">event_type</tt><em class="property"> = None</em><a class="headerlink" href="#pyad2.messages.LRRMessage.event_type" title="Permalink to this definition">¶</a></dt>
- <dd><p>The type of the event that occurred</p>
- </dd></dl>
-
- </dd></dl>
-
- </div>
- <div class="section" id="subpackages">
- <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
- <div class="toctree-wrapper compound">
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="pyad2.event.html">event Package</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="pyad2.event.html#id1"><tt class="docutils literal"><span class="pre">event</span></tt> Package</a></li>
- <li class="toctree-l2"><a class="reference internal" href="pyad2.event.html#module-pyad2.event.event"><tt class="docutils literal"><span class="pre">event</span></tt> Module</a></li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- </div>
-
-
- </div>
- </div>
- </div>
- <div class="sphinxsidebar">
- <div class="sphinxsidebarwrapper">
- <h3><a href="index.html">Table Of Contents</a></h3>
- <ul>
- <li><a class="reference internal" href="#">pyad2 Package</a><ul>
- <li><a class="reference internal" href="#module-pyad2.ad2"><tt class="docutils literal"><span class="pre">ad2</span></tt> Module</a></li>
- <li><a class="reference internal" href="#module-pyad2.devices"><tt class="docutils literal"><span class="pre">devices</span></tt> Module</a></li>
- <li><a class="reference internal" href="#module-pyad2.util"><tt class="docutils literal"><span class="pre">util</span></tt> Module</a></li>
- <li><a class="reference internal" href="#module-pyad2.zonetracking"><tt class="docutils literal"><span class="pre">zonetracking</span></tt> Module</a></li>
- <li><a class="reference internal" href="#module-pyad2.panels"><tt class="docutils literal"><span class="pre">panels</span></tt> Module</a></li>
- <li><a class="reference internal" href="#module-pyad2.messages"><tt class="docutils literal"><span class="pre">messages</span></tt> Module</a></li>
- <li><a class="reference internal" href="#subpackages">Subpackages</a><ul>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
-
- <h4>Previous topic</h4>
- <p class="topless"><a href="index.html"
- title="previous chapter">Welcome to pyad2’s documentation!</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="pyad2.event.html"
- title="next chapter">event Package</a></p>
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="_sources/pyad2.txt"
- rel="nofollow">Show Source</a></li>
- </ul>
- <div id="searchbox" style="display: none">
- <h3>Quick search</h3>
- <form class="search" action="search.html" method="get">
- <input type="text" name="q" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- <p class="searchtip" style="font-size: 90%">
- Enter search terms or a module, class or function name.
- </p>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="py-modindex.html" title="Python Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="pyad2.event.html" title="event Package"
- >next</a> |</li>
- <li class="right" >
- <a href="index.html" title="Welcome to pyad2’s documentation!"
- >previous</a> |</li>
- <li><a href="index.html">pyad2 documentation</a> »</li>
- </ul>
- </div>
- <div class="footer">
- © Copyright 2013, Author.
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1.
- </div>
- </body>
- </html>
|