Skip to content

Commit 974dd9c

Browse files
deploy: 906e058
1 parent 3496d36 commit 974dd9c

27 files changed

Lines changed: 163 additions & 42 deletions

master/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 32b519292b81778488b1942ec76ad27a
3+
config: e8a92f52203ac96b90d0edf9920ed782
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
12.9 KB
Binary file not shown.
9.76 KB
Binary file not shown.

master/_modules/epicsdbbuilder/recordbase.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>epicsdbbuilder.recordbase &mdash; pythonSoftIOC 4.4.0+1.gdad702c documentation</title>
6+
<title>epicsdbbuilder.recordbase &mdash; pythonSoftIOC 4.4.0+4.g906e058 documentation</title>
77
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../../_static/theme_overrides.css" type="text/css" />

master/_modules/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Overview: module code &mdash; pythonSoftIOC 4.4.0+1.gdad702c documentation</title>
6+
<title>Overview: module code &mdash; pythonSoftIOC 4.4.0+4.g906e058 documentation</title>
77
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../_static/theme_overrides.css" type="text/css" />

master/_modules/softioc/asyncio_dispatcher.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>softioc.asyncio_dispatcher &mdash; pythonSoftIOC 4.4.0+1.gdad702c documentation</title>
6+
<title>softioc.asyncio_dispatcher &mdash; pythonSoftIOC 4.4.0+4.g906e058 documentation</title>
77
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../../_static/theme_overrides.css" type="text/css" />

master/_modules/softioc/builder.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>softioc.builder &mdash; pythonSoftIOC 4.4.0+1.gdad702c documentation</title>
6+
<title>softioc.builder &mdash; pythonSoftIOC 4.4.0+4.g906e058 documentation</title>
77
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../../_static/theme_overrides.css" type="text/css" />

master/_modules/softioc/device.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>softioc.device &mdash; pythonSoftIOC 4.4.0+1.gdad702c documentation</title>
6+
<title>softioc.device &mdash; pythonSoftIOC 4.4.0+4.g906e058 documentation</title>
77
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../../_static/theme_overrides.css" type="text/css" />
@@ -104,6 +104,7 @@ <h1>Source code for softioc.device</h1><div class="highlight"><pre>
104104
<span class="n">signal_processing_complete</span><span class="p">,</span>
105105
<span class="n">recGblResetAlarms</span><span class="p">,</span>
106106
<span class="n">db_put_field</span><span class="p">,</span>
107+
<span class="n">db_get_field</span><span class="p">,</span>
107108
<span class="p">)</span>
108109
<span class="kn">from</span> <span class="nn">.device_core</span> <span class="kn">import</span> <span class="n">DeviceSupportCore</span><span class="p">,</span> <span class="n">RecordLookup</span>
109110

@@ -175,6 +176,26 @@ <h1>Source code for softioc.device</h1><div class="highlight"><pre>
175176
<span class="k">def</span> <span class="nf">_write_value</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">record</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
176177
<span class="n">record</span><span class="o">.</span><span class="n">write_val</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
177178

179+
<span class="k">def</span> <span class="nf">get_field</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">field</span><span class="p">):</span>
180+
<span class="sd">&#39;&#39;&#39; Returns the given field value as a string.&#39;&#39;&#39;</span>
181+
<span class="k">assert</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;_record&quot;</span><span class="p">),</span> \
182+
<span class="s1">&#39;get_field may only be called after iocInit&#39;</span>
183+
184+
<span class="n">data</span> <span class="o">=</span> <span class="p">(</span><span class="n">c_char</span> <span class="o">*</span> <span class="mi">40</span><span class="p">)()</span>
185+
<span class="n">name</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_name</span> <span class="o">+</span> <span class="s1">&#39;.&#39;</span> <span class="o">+</span> <span class="n">field</span>
186+
<span class="n">db_get_field</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">fields</span><span class="o">.</span><span class="n">DBF_STRING</span><span class="p">,</span> <span class="n">addressof</span><span class="p">(</span><span class="n">data</span><span class="p">),</span> <span class="mi">1</span><span class="p">)</span>
187+
<span class="k">return</span> <span class="n">_string_at</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="mi">40</span><span class="p">)</span>
188+
189+
<span class="k">def</span> <span class="nf">set_field</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">field</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
190+
<span class="sd">&#39;&#39;&#39;Sets the given field to the given value. Value will be transported as</span>
191+
<span class="sd"> a DBF_STRING.&#39;&#39;&#39;</span>
192+
<span class="k">assert</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;_record&quot;</span><span class="p">),</span> \
193+
<span class="s1">&#39;set_field may only be called after iocInit&#39;</span>
194+
195+
<span class="n">data</span> <span class="o">=</span> <span class="p">(</span><span class="n">c_char</span> <span class="o">*</span> <span class="mi">40</span><span class="p">)()</span>
196+
<span class="n">data</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="o">.</span><span class="n">encode</span><span class="p">()</span> <span class="o">+</span> <span class="sa">b</span><span class="s1">&#39;</span><span class="se">\0</span><span class="s1">&#39;</span>
197+
<span class="n">name</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_name</span> <span class="o">+</span> <span class="s1">&#39;.&#39;</span> <span class="o">+</span> <span class="n">field</span>
198+
<span class="n">db_put_field</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">fields</span><span class="o">.</span><span class="n">DBF_STRING</span><span class="p">,</span> <span class="n">addressof</span><span class="p">(</span><span class="n">data</span><span class="p">),</span> <span class="mi">1</span><span class="p">)</span>
178199

179200
<div class="viewcode-block" id="ProcessDeviceSupportIn"><a class="viewcode-back" href="../../reference/api.html#softioc.builder.ProcessDeviceSupportIn">[docs]</a><span class="k">class</span> <span class="nc">ProcessDeviceSupportIn</span><span class="p">(</span><span class="n">ProcessDeviceSupportCore</span><span class="p">):</span>
180201
<span class="n">_link_</span> <span class="o">=</span> <span class="s1">&#39;INP&#39;</span>

master/_modules/softioc/softioc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>softioc.softioc &mdash; pythonSoftIOC 4.4.0+1.gdad702c documentation</title>
6+
<title>softioc.softioc &mdash; pythonSoftIOC 4.4.0+4.g906e058 documentation</title>
77
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../../_static/theme_overrides.css" type="text/css" />

master/_sources/reference/api.rst.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,27 @@ class which provides the methods documented below.
578578
Note that channel access puts to a Python soft IOC input record are
579579
completely ineffective, and this includes waveform records.
580580

581+
.. method:: get_field(field)
582+
583+
This returns the named field from the record. An exception will be raised
584+
if the field cannot be found.
585+
586+
Note that this function can only be used after the IOC has been initialized.
587+
If you need to retrieve a field's value before that, access it directly via
588+
an attribute e.g. ``my_record.EGU``. (This will not work after the IOC is
589+
initialized)
590+
591+
.. method:: set_field(field, value)
592+
593+
This sets the given field to the given value. The value will
594+
always be converted to a Python String, which is then interpreted by
595+
EPICS as a DBF_STRING type. Note that values can be no longer than 39 bytes.
596+
597+
Note that this function can only be used after the IOC has been initialized.
598+
If you need to set a field's value before that, set it directly as an attribute
599+
on the record e.g. ``my_record.EGU``. (This will not work after the IOC is
600+
initialized)
601+
581602
Working with OUT records
582603
~~~~~~~~~~~~~~~~~~~~~~~~
583604

@@ -599,4 +620,25 @@ Working with OUT records
599620

600621
Returns the value associated with the record.
601622

623+
.. method:: get_field(field)
624+
625+
This returns the named field from the record. An exception will be raised
626+
if the field cannot be found.
627+
628+
Note that this function can only be used after the IOC has been initialized.
629+
If you need to retrieve a field's value before that, access it directly via
630+
an attribute e.g. ``my_record.EGU``. (This will not work after the IOC is
631+
initialized)
632+
633+
.. method:: set_field(field, value)
634+
635+
This sets the given field to the given value. The value will
636+
always be converted to a Python String, which is then interpreted by
637+
EPICS as a DBF_STRING type. Note that values can be no longer than 39 bytes.
638+
639+
Note that this function can only be used after the IOC has been initialized.
640+
If you need to set a field's value before that, set it directly as an attribute
641+
on the record e.g. ``my_record.EGU``. (This will not work after the IOC is
642+
initialized)
643+
602644
.. _epics_device: https://github.com/Araneidae/epics_device

0 commit comments

Comments
 (0)