|
8 | 8 | <meta charset="utf-8" /> |
9 | 9 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" /> |
10 | 10 |
|
11 | | - <title>fastcs.attributes.attr_r — FastCS 0.11.4.dev6+ga2a780819 documentation</title> |
| 11 | + <title>fastcs.attributes.attr_r — FastCS 0.11.4.dev9+g40aa634af documentation</title> |
12 | 12 |
|
13 | 13 |
|
14 | 14 |
|
|
43 | 43 | <link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" /> |
44 | 44 | <link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" /> |
45 | 45 |
|
46 | | - <script src="../_static/documentation_options.js?v=a2e8f6b6"></script> |
| 46 | + <script src="../_static/documentation_options.js?v=bba35bb6"></script> |
47 | 47 | <script src="../_static/doctools.js?v=9bcbadda"></script> |
48 | 48 | <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> |
49 | 49 | <script src="../_static/clipboard.min.js?v=a7894cd8"></script> |
|
413 | 413 | <li class="toctree-l3"><a class="reference internal" href="fastcs.attributes.attribute_io.html"><code class="docutils literal notranslate"><span class="pre">fastcs.attributes.attribute_io</span></code></a></li> |
414 | 414 | <li class="toctree-l3"><a class="reference internal" href="fastcs.attributes.attribute_io_ref.html"><code class="docutils literal notranslate"><span class="pre">fastcs.attributes.attribute_io_ref</span></code></a></li> |
415 | 415 | <li class="toctree-l3"><a class="reference internal" href="fastcs.attributes.hinted_attribute.html"><code class="docutils literal notranslate"><span class="pre">fastcs.attributes.hinted_attribute</span></code></a></li> |
| 416 | +<li class="toctree-l3"><a class="reference internal" href="fastcs.attributes.util.html"><code class="docutils literal notranslate"><span class="pre">fastcs.attributes.util</span></code></a></li> |
416 | 417 | </ul> |
417 | 418 | </details></li> |
418 | 419 | <li class="toctree-l2 has-children"><a class="reference internal" href="fastcs.connections.html"><code class="docutils literal notranslate"><span class="pre">fastcs.connections</span></code></a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul> |
|
619 | 620 | <p>This sets the cached value of the attribute presented in the API. It should |
620 | 621 | generally only be called from an IO or a controller that is updating the value |
621 | 622 | from some underlying source.</p> |
| 623 | +<p>Any update callbacks will be called with the new value and any update events |
| 624 | +with predicates satisfied by the new value will be set.</p> |
622 | 625 | <p>To request a change to the setpoint of the attribute, use the <code class="docutils literal notranslate"><span class="pre">put</span></code> method, |
623 | 626 | which will attempt to apply the change to the underlying source.</p> |
624 | 627 | <dl class="field-list simple"> |
|
651 | 654 | <dd><p>Bind self into the registered IO update callback</p> |
652 | 655 | </dd></dl> |
653 | 656 |
|
| 657 | +<dl class="py method"> |
| 658 | +<dt class="sig sig-object py" id="fastcs.attributes.attr_r.AttrR.wait_for_predicate"> |
| 659 | +<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">wait_for_predicate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicate</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable" title="(in Python v3.14)"><span class="pre">Callable</span></a><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="fastcs.datatypes.datatype.html#fastcs.datatypes.datatype.DType_T" title="fastcs.datatypes.datatype.DType_T"><span class="pre">DType_T</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.14)"><span class="pre">float</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/fastcs/attributes/attr_r.html#AttrR.wait_for_predicate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fastcs.attributes.attr_r.AttrR.wait_for_predicate" title="Link to this definition">#</a></dt> |
| 660 | +<dd><p>Wait for the predicate to be satisfied when called with the current value</p> |
| 661 | +<dl class="field-list simple"> |
| 662 | +<dt class="field-odd">Parameters<span class="colon">:</span></dt> |
| 663 | +<dd class="field-odd"><ul class="simple"> |
| 664 | +<li><p><strong>predicate</strong> – The predicate to test - a callable that takes the attribute |
| 665 | +value and returns True if the event should be set</p></li> |
| 666 | +<li><p><strong>timeout</strong> – The timeout in seconds</p></li> |
| 667 | +</ul> |
| 668 | +</dd> |
| 669 | +</dl> |
| 670 | +</dd></dl> |
| 671 | + |
| 672 | +<dl class="py method"> |
| 673 | +<dt class="sig sig-object py" id="fastcs.attributes.attr_r.AttrR.wait_for_value"> |
| 674 | +<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">wait_for_value</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target_value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="fastcs.datatypes.datatype.html#fastcs.datatypes.datatype.DType_T" title="fastcs.datatypes.datatype.DType_T"><span class="pre">DType_T</span></a></span></em>, <em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.14)"><span class="pre">float</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/fastcs/attributes/attr_r.html#AttrR.wait_for_value"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#fastcs.attributes.attr_r.AttrR.wait_for_value" title="Link to this definition">#</a></dt> |
| 675 | +<dd><p>Wait for self._value to equal the target value</p> |
| 676 | +<dl class="field-list simple"> |
| 677 | +<dt class="field-odd">Parameters<span class="colon">:</span></dt> |
| 678 | +<dd class="field-odd"><ul class="simple"> |
| 679 | +<li><p><strong>target_value</strong> – The target value to wait for</p></li> |
| 680 | +<li><p><strong>timeout</strong> – The timeout in seconds</p></li> |
| 681 | +</ul> |
| 682 | +</dd> |
| 683 | +<dt class="field-even">Raises<span class="colon">:</span></dt> |
| 684 | +<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#TimeoutError" title="(in Python v3.14)"><strong>TimeoutError</strong></a> – If the attribute does not reach the target value within the |
| 685 | + timeout</p> |
| 686 | +</dd> |
| 687 | +</dl> |
| 688 | +</dd></dl> |
| 689 | + |
654 | 690 | </dd></dl> |
655 | 691 |
|
656 | 692 | </section> |
|
711 | 747 | <li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#fastcs.attributes.attr_r.AttrR.add_on_update_callback"><code class="docutils literal notranslate"><span class="pre">AttrR.add_on_update_callback()</span></code></a></li> |
712 | 748 | <li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#fastcs.attributes.attr_r.AttrR.set_update_callback"><code class="docutils literal notranslate"><span class="pre">AttrR.set_update_callback()</span></code></a></li> |
713 | 749 | <li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#fastcs.attributes.attr_r.AttrR.bind_update_callback"><code class="docutils literal notranslate"><span class="pre">AttrR.bind_update_callback()</span></code></a></li> |
| 750 | +<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#fastcs.attributes.attr_r.AttrR.wait_for_predicate"><code class="docutils literal notranslate"><span class="pre">AttrR.wait_for_predicate()</span></code></a></li> |
| 751 | +<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#fastcs.attributes.attr_r.AttrR.wait_for_value"><code class="docutils literal notranslate"><span class="pre">AttrR.wait_for_value()</span></code></a></li> |
714 | 752 | </ul> |
715 | 753 | </li> |
716 | 754 | </ul> |
|
0 commit comments