<emclass="property">class </em><codeclass="descclassname">cbpi.controller.actor_controller.</code><codeclass="descname">ActorController</code><spanclass="sig-paren">(</span><em>cbpi</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_abc_impl</code><emclass="property"> = <_abc_data object></em><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController._abc_impl"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_init_actor</code><spanclass="sig-paren">(</span><em>actor</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController._init_actor"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_post_add_callback</code><spanclass="sig-paren">(</span><em>m</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController._post_add_callback"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_post_update_callback</code><spanclass="sig-paren">(</span><em>actor</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController._post_update_callback"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_pre_delete_callback</code><spanclass="sig-paren">(</span><em>actor_id</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController._pre_delete_callback"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_pre_update_callback</code><spanclass="sig-paren">(</span><em>actor</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController._pre_update_callback"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_stop_actor</code><spanclass="sig-paren">(</span><em>actor</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController._stop_actor"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">call_action</code><spanclass="sig-paren">(</span><em>actor_id</em>, <em>data</em>, <em>**kwargs</em><spanclass="sig-paren">)</span>→ None<aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController.call_action"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_state</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController.get_state"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">init</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController.init"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">model</code><aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController.model"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">cbpi.database.model.ActorModel</span></code></p>
<codeclass="descname">off</code><spanclass="sig-paren">(</span><em>actor_id</em>, <em>**kwargs</em><spanclass="sig-paren">)</span>→ None<aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController.off"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">on</code><spanclass="sig-paren">(</span><em>actor_id</em>, <em>future: _asyncio.Future</em>, <em>power=100</em>, <em>**kwargs</em><spanclass="sig-paren">)</span>→ None<aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController.on"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">toggle</code><spanclass="sig-paren">(</span><em>actor_id</em>, <em>power=100</em>, <em>**kwargs</em><spanclass="sig-paren">)</span>→ None<aclass="headerlink"href="#cbpi.controller.actor_controller.ActorController.toggle"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">cbpi.api.</code><codeclass="descname">CBPiActor</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwds</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.api.CBPiActor"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">_abc_impl</code><emclass="property"> = <_abc_data object></em><aclass="headerlink"href="#cbpi.api.CBPiActor._abc_impl"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">init</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.api.CBPiActor.init"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="cbpi.api.CBPiActor.off">
<codeclass="descname">off</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.api.CBPiActor.off"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">on</code><spanclass="sig-paren">(</span><em>power</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.api.CBPiActor.on"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">reprJSON</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.api.CBPiActor.reprJSON"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="cbpi.api.CBPiActor.state">
<codeclass="descname">state</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.api.CBPiActor.state"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">stop</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#cbpi.api.CBPiActor.stop"title="Permalink to this definition">¶</a></dt>
<divclass="code-block-caption"><spanclass="caption-text">__init__.py</span><aclass="headerlink"href="#init-py"title="Permalink to this code">¶</a></div>
<spanclass="n">logger</span><spanclass="o">.</span><spanclass="n">error</span><spanclass="p">(</span><spanclass="s2">"Failed to load RPi.GPIO. Using Mock"</span><spanclass="p">)</span>
<spanclass="n">logger</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="s2">"ACTOR </span><spanclass="si">%s</span><spanclass="s2"> OFF "</span><spanclass="o">%</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">id</span><spanclass="p">)</span>
<spanclass="c1"># Custom property which can be configured by the user</span>
<spanclass="n">gpio</span><spanclass="o">=</span><spanclass="n">Property</span><spanclass="o">.</span><spanclass="n">Select</span><spanclass="p">(</span><spanclass="s2">"GPIO"</span><spanclass="p">,</span><spanclass="n">options</span><spanclass="o">=</span><spanclass="p">[</span><spanclass="mi">0</span><spanclass="p">,</span><spanclass="mi">1</span><spanclass="p">,</span><spanclass="mi">2</span><spanclass="p">,</span><spanclass="mi">3</span><spanclass="p">,</span><spanclass="mi">4</span><spanclass="p">,</span><spanclass="mi">5</span><spanclass="p">,</span><spanclass="mi">6</span><spanclass="p">,</span><spanclass="mi">7</span><spanclass="p">,</span><spanclass="mi">8</span><spanclass="p">,</span><spanclass="mi">9</span><spanclass="p">,</span><spanclass="mi">10</span><spanclass="p">,</span><spanclass="mi">11</span><spanclass="p">,</span><spanclass="mi">12</span><spanclass="p">,</span><spanclass="mi">13</span><spanclass="p">,</span><spanclass="mi">14</span><spanclass="p">,</span><spanclass="mi">15</span><spanclass="p">,</span><spanclass="mi">16</span><spanclass="p">,</span><spanclass="mi">17</span><spanclass="p">,</span><spanclass="mi">18</span><spanclass="p">,</span><spanclass="mi">19</span><spanclass="p">,</span><spanclass="mi">20</span><spanclass="p">,</span><spanclass="mi">21</span><spanclass="p">,</span><spanclass="mi">22</span><spanclass="p">,</span><spanclass="mi">23</span><spanclass="p">,</span><spanclass="mi">24</span><spanclass="p">,</span><spanclass="mi">25</span><spanclass="p">,</span><spanclass="mi">26</span><spanclass="p">,</span><spanclass="mi">27</span><spanclass="p">],</span><spanclass="n">description</span><spanclass="o">=</span><spanclass="s2">"GPIO to which the actor is connected"</span><spanclass="p">)</span>
<spanclass="k">raise</span><spanclass="n">CBPiException</span><spanclass="p">(</span><spanclass="s2">"FAILD TO INIT ACTOR"</span><spanclass="p">)</span>
<spanclass="k">print</span><spanclass="p">(</span><spanclass="s2">"GPIO ON </span><spanclass="si">%s</span><spanclass="s2">"</span><spanclass="o">%</span><spanclass="nb">str</span><spanclass="p">(</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">gpio</span><spanclass="p">))</span>
<spanclass="k">print</span><spanclass="p">(</span><spanclass="s2">"GPIO OFF </span><spanclass="si">%s</span><spanclass="s2">"</span><spanclass="o">%</span><spanclass="nb">str</span><spanclass="p">(</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">gpio</span><spanclass="p">))</span>
<spanclass="c1"># Custom property which can be configured by the user</span>
<spanclass="n">gpio</span><spanclass="o">=</span><spanclass="n">Property</span><spanclass="o">.</span><spanclass="n">Select</span><spanclass="p">(</span><spanclass="s2">"GPIO"</span><spanclass="p">,</span><spanclass="n">options</span><spanclass="o">=</span><spanclass="p">[</span><spanclass="mi">0</span><spanclass="p">,</span><spanclass="mi">1</span><spanclass="p">,</span><spanclass="mi">2</span><spanclass="p">,</span><spanclass="mi">3</span><spanclass="p">,</span><spanclass="mi">4</span><spanclass="p">,</span><spanclass="mi">5</span><spanclass="p">,</span><spanclass="mi">6</span><spanclass="p">,</span><spanclass="mi">7</span><spanclass="p">,</span><spanclass="mi">8</span><spanclass="p">,</span><spanclass="mi">9</span><spanclass="p">,</span><spanclass="mi">10</span><spanclass="p">,</span><spanclass="mi">11</span><spanclass="p">,</span><spanclass="mi">12</span><spanclass="p">,</span><spanclass="mi">13</span><spanclass="p">,</span><spanclass="mi">14</span><spanclass="p">,</span><spanclass="mi">15</span><spanclass="p">,</span><spanclass="mi">16</span><spanclass="p">,</span><spanclass="mi">17</span><spanclass="p">,</span><spanclass="mi">18</span><spanclass="p">,</span><spanclass="mi">19</span><spanclass="p">,</span><spanclass="mi">20</span><spanclass="p">,</span><spanclass="mi">21</span><spanclass="p">,</span><spanclass="mi">22</span><spanclass="p">,</span><spanclass="mi">23</span><spanclass="p">,</span><spanclass="mi">24</span><spanclass="p">,</span><spanclass="mi">25</span><spanclass="p">,</span><spanclass="mi">26</span><spanclass="p">,</span><spanclass="mi">27</span><spanclass="p">],</span><spanclass="n">description</span><spanclass="o">=</span><spanclass="s2">"GPIO to which the actor is connected"</span><spanclass="p">)</span>
<spanclass="k">raise</span><spanclass="n">CBPiException</span><spanclass="p">(</span><spanclass="s2">"FAILD TO INIT ACTOR"</span><spanclass="p">)</span>
<spanclass="k">print</span><spanclass="p">(</span><spanclass="s2">"GPIO ON </span><spanclass="si">%s</span><spanclass="s2">"</span><spanclass="o">%</span><spanclass="nb">str</span><spanclass="p">(</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">gpio</span><spanclass="p">))</span>
<spanclass="k">print</span><spanclass="p">(</span><spanclass="s2">"GPIO OFF </span><spanclass="si">%s</span><spanclass="s2">"</span><spanclass="o">%</span><spanclass="nb">str</span><spanclass="p">(</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">gpio</span><spanclass="p">))</span>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.