source: epicsdf/doc/build/html/src/epicsdf.html @ 1046

Last change on this file since 1046 was 1046, checked in by jemian, 11 years ago

refs #12, provides the publishing tool and changed the URL to point to the new location

  • Property svn:executable set to *
  • Property svn:mime-type set to text/html
File size: 26.6 KB
Line 
1
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6
7<html xmlns="http://www.w3.org/1999/xhtml">
8  <head>
9    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10   
11    <title>epicsdf: EPICS diskfree, in python &mdash; epicsdf 1.0 documentation</title>
12   
13    <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
14    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
15   
16    <script type="text/javascript">
17      var DOCUMENTATION_OPTIONS = {
18        URL_ROOT:    '../',
19        VERSION:     '1.0',
20        COLLAPSE_INDEX: false,
21        FILE_SUFFIX: '.html',
22        HAS_SOURCE:  true
23      };
24    </script>
25    <script type="text/javascript" src="../_static/jquery.js"></script>
26    <script type="text/javascript" src="../_static/underscore.js"></script>
27    <script type="text/javascript" src="../_static/doctools.js"></script>
28    <link rel="top" title="epicsdf 1.0 documentation" href="../index.html" />
29    <link rel="up" title="Source code documentation" href="index.html" />
30    <link rel="prev" title="Source code documentation" href="index.html" /> 
31  </head>
32  <body>
33    <div class="related">
34      <h3>Navigation</h3>
35      <ul>
36        <li class="right" style="margin-right: 10px">
37          <a href="../genindex.html" title="General Index"
38             accesskey="I">index</a></li>
39        <li class="right" >
40          <a href="../py-modindex.html" title="Python Module Index"
41             >modules</a> |</li>
42        <li class="right" >
43          <a href="index.html" title="Source code documentation"
44             accesskey="P">previous</a> |</li>
45        <li><a href="../index.html">epicsdf 1.0 documentation</a> &raquo;</li>
46          <li><a href="../contents.html" >Contents</a> &raquo;</li>
47          <li><a href="index.html" accesskey="U">Source code documentation</a> &raquo;</li> 
48      </ul>
49    </div>
50      <div class="sphinxsidebar">
51        <div class="sphinxsidebarwrapper">
52  <h4>Previous topic</h4>
53  <p class="topless"><a href="index.html"
54                        title="previous chapter">Source code documentation</a></p>
55  <h3>This Page</h3>
56  <ul class="this-page-menu">
57    <li><a href="../_sources/src/epicsdf.txt"
58           rel="nofollow">Show Source</a></li>
59  </ul>
60<div id="searchbox" style="display: none">
61  <h3>Quick search</h3>
62    <form class="search" action="../search.html" method="get">
63      <input type="text" name="q" />
64      <input type="submit" value="Go" />
65      <input type="hidden" name="check_keywords" value="yes" />
66      <input type="hidden" name="area" value="default" />
67    </form>
68    <p class="searchtip" style="font-size: 90%">
69    Enter search terms or a module, class or function name.
70    </p>
71</div>
72<script type="text/javascript">$('#searchbox').show(0);</script>
73        </div>
74      </div>
75
76    <div class="document">
77      <div class="documentwrapper">
78        <div class="bodywrapper">
79          <div class="body">
80           
81  <div class="section" id="epicsdf-epics-diskfree-in-python">
82<h1><a class="reference internal" href="#module-epicsdf" title="epicsdf: diskfree, in python"><tt class="xref py py-mod docutils literal"><span class="pre">epicsdf</span></tt></a>: EPICS diskfree, in python<a class="headerlink" href="#epicsdf-epics-diskfree-in-python" title="Permalink to this headline">¶</a></h1>
83<p>The <a class="reference internal" href="#module-epicsdf" title="epicsdf: diskfree, in python"><tt class="xref py py-mod docutils literal"><span class="pre">epicsdf</span></tt></a> module watches a disk partition and periodically reports
84information to EPICS PVs.
85The <tt class="xref py py-func docutils literal"><span class="pre">epicsdf.run()</span></tt> function is used to run the background job.
86The <tt class="xref py py-func docutils literal"><span class="pre">epicsdf.df_demo()</span></tt> function gives
87a demonstration of one possible, alternative use.</p>
88<span class="target" id="module-epicsdf"></span><p>EPICS client diskfree, in python</p>
89<dl class="class">
90<dt id="epicsdf.epicsdf">
91<em class="property">class </em><tt class="descclassname">epicsdf.</tt><tt class="descname">epicsdf</tt><big>(</big><em>prefix</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf" title="Permalink to this definition">¶</a></dt>
92<dd><p>Connect to a support database of epicsdf and
93watch the indicated disk partition.  Report the values
94to EPICS and watch for an alarm. Send an email when the
95alarm calcout PV changes.</p>
96<table class="docutils field-list" frame="void" rules="none">
97<col class="field-name" />
98<col class="field-body" />
99<tbody valign="top">
100<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>prefix</strong> (<em>str</em>) &#8211; prefix of EPICS support database instance
101(will not be changed after constructor)</td>
102</tr>
103<tr class="field-even field"><th class="field-name">Note :</th><td class="field-body">Some PV values in the support database are needed
104to construct the text of the email
105or the mailing list.  Since it is not allowed to call caget
106during a camonitor callback, we need to monitor them and
107cache the values for use in the callback.</td>
108</tr>
109</tbody>
110</table>
111<p>Usage:</p>
112<p>There are only three methods in this class that should be called
113from the outside.  All others methods are used internally.</p>
114<p><a class="reference internal" href="#epicsdf.epicsdf.run" title="epicsdf.epicsdf.run"><tt class="xref py py-meth docutils literal"><span class="pre">run()</span></tt></a> for routine use:</p>
115<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">epicsdf</span> <span class="kn">import</span> <span class="n">epicsdf</span>
116<span class="n">df</span> <span class="o">=</span> <span class="n">epicsdf</span><span class="p">(</span><span class="s">&#39;prj:p300:df:&#39;</span><span class="p">)</span>  <span class="c"># construct it</span>
117<span class="n">df</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>                      <span class="c"># run forever</span>
118</pre></div>
119</div>
120<p><a class="reference internal" href="#epicsdf.epicsdf.demo" title="epicsdf.epicsdf.demo"><tt class="xref py py-meth docutils literal"><span class="pre">demo()</span></tt></a> for code development:</p>
121<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">epicsdf</span> <span class="kn">import</span> <span class="n">epicsdf</span>
122<span class="n">df</span> <span class="o">=</span> <span class="n">epicsdf</span><span class="p">(</span><span class="s">&#39;prj:p300:df:&#39;</span><span class="p">)</span>  <span class="c"># construct it</span>
123<span class="n">df</span><span class="o">.</span><span class="n">demo</span><span class="p">()</span>                     <span class="c"># display a list of partitions</span>
124</pre></div>
125</div>
126<p><a class="reference internal" href="#epicsdf.epicsdf.df2epics" title="epicsdf.epicsdf.df2epics"><tt class="xref py py-meth docutils literal"><span class="pre">df2epics()</span></tt></a> could be called for one-off use:</p>
127<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">epicsdf</span> <span class="kn">import</span> <span class="n">epicsdf</span>
128<span class="n">df</span> <span class="o">=</span> <span class="n">epicsdf</span><span class="p">(</span><span class="s">&#39;prj:p300:df:&#39;</span><span class="p">)</span>  <span class="c"># construct it</span>
129<span class="n">df</span><span class="o">.</span><span class="n">df2epics</span><span class="p">()</span>                 <span class="c"># update once</span>
130</pre></div>
131</div>
132<dl class="method">
133<dt id="epicsdf.epicsdf.caget">
134<tt class="descname">caget</tt><big>(</big><em>item</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.caget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.caget" title="Permalink to this definition">¶</a></dt>
135<dd><table class="docutils field-list" frame="void" rules="none">
136<col class="field-name" />
137<col class="field-body" />
138<tbody valign="top">
139<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>item</strong> (<em>str</em>) &#8211; name of item in support database</td>
140</tr>
141<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">value of EPICS PV within our support database</td>
142</tr>
143</tbody>
144</table>
145</dd></dl>
146
147<dl class="method">
148<dt id="epicsdf.epicsdf.caput">
149<tt class="descname">caput</tt><big>(</big><em>item</em>, <em>value</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.caput"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.caput" title="Permalink to this definition">¶</a></dt>
150<dd><table class="docutils field-list" frame="void" rules="none">
151<col class="field-name" />
152<col class="field-body" />
153<tbody valign="top">
154<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
155<li><strong>item</strong> (<em>str</em>) &#8211; name of item in support database</li>
156<li><strong>value</strong> &#8211; new value of item</li>
157</ul>
158</td>
159</tr>
160</tbody>
161</table>
162</dd></dl>
163
164<dl class="method">
165<dt id="epicsdf.epicsdf.demo">
166<tt class="descname">demo</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.demo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.demo" title="Permalink to this definition">¶</a></dt>
167<dd><p>demonstrate one possible use of this code,
168to replicate the UNIX df command:</p>
169<div class="highlight-python"><pre>[jemian@gov,402,src]$ ./epicsdf.py
170       total         free    available    use%
171214748364800  42878369792  42878369792   80.0% .
172 20803424256  10699845632   9626038272   53.7% /
173   103512064     68733952     63389696   38.8% /boot
174  1936355328   1936334848   1936334848    0.0% /dev/shm
175215406047232 184723456000 173604937728   19.4% /local
176 20803424256  10699845632   9626038272   53.7% /tmp</pre>
177</div>
178</dd></dl>
179
180<dl class="method">
181<dt id="epicsdf.epicsdf.df">
182<tt class="descname">df</tt><big>(</big><em>newdisk=None</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.df"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.df" title="Permalink to this definition">¶</a></dt>
183<dd><p>Determine the available space of a (disk) partition,
184Report the results in a dictionary.</p>
185<table class="docutils field-list" frame="void" rules="none">
186<col class="field-name" />
187<col class="field-body" />
188<tbody valign="top">
189<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>newdisk</strong> (<em>str</em>) &#8211; name of disk to examine (will replace self.disk if not None)</td>
190</tr>
191<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">dictionary or None if partition does not exist or zero values</td>
192</tr>
193<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
194</tr>
195</tbody>
196</table>
197<table border="1" class="docutils">
198<colgroup>
199<col width="24%" />
200<col width="14%" />
201<col width="62%" />
202</colgroup>
203<thead valign="bottom">
204<tr class="row-odd"><th class="head">index</th>
205<th class="head">units</th>
206<th class="head">description</th>
207</tr>
208</thead>
209<tbody valign="top">
210<tr class="row-even"><td>total</td>
211<td>bytes</td>
212<td>total space on the partition</td>
213</tr>
214<tr class="row-odd"><td>free</td>
215<td>bytes</td>
216<td>free space</td>
217</tr>
218<tr class="row-even"><td>avail</td>
219<td>bytes</td>
220<td>available space</td>
221</tr>
222<tr class="row-odd"><td>used</td>
223<td>bytes</td>
224<td>total - avail</td>
225</tr>
226<tr class="row-even"><td>%free</td>
227<td>%</td>
228<td><img src="../_images\mathmpl/math-e604e1119d.png" style="position: relative; bottom: -8px"/></td>
229</tr>
230<tr class="row-odd"><td>%avail</td>
231<td>%</td>
232<td><img src="../_images\mathmpl/math-6e9acb7536.png" style="position: relative; bottom: -8px"/></td>
233</tr>
234<tr class="row-even"><td>%used</td>
235<td>%</td>
236<td><img src="../_images\mathmpl/math-a2c104dbc9.png" style="position: relative; bottom: -4px"/></td>
237</tr>
238</tbody>
239</table>
240</dd></dl>
241
242<dl class="method">
243<dt id="epicsdf.epicsdf.df2epics">
244<tt class="descname">df2epics</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.df2epics"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.df2epics" title="Permalink to this definition">¶</a></dt>
245<dd><p>Examine a disk partition and if possible, push its info to EPICS.
246Get the partition name from the EPICS database.</p>
247<table class="docutils field-list" frame="void" rules="none">
248<col class="field-name" />
249<col class="field-body" />
250<tbody valign="top">
251<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">dictionary from <a class="reference internal" href="#epicsdf.epicsdf.df" title="epicsdf.epicsdf.df"><tt class="xref py py-meth docutils literal"><span class="pre">df()</span></tt></a> or None</td>
252</tr>
253<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
254</tr>
255</tbody>
256</table>
257</dd></dl>
258
259<dl class="method">
260<dt id="epicsdf.epicsdf.doPeriodicUpdate">
261<tt class="descname">doPeriodicUpdate</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.doPeriodicUpdate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.doPeriodicUpdate" title="Permalink to this definition">¶</a></dt>
262<dd><p>Do the work of the periodic update,
263getting the results of <a class="reference internal" href="#epicsdf.epicsdf.df" title="epicsdf.epicsdf.df"><tt class="xref py py-meth docutils literal"><span class="pre">df()</span></tt></a> 
264(with <tt class="docutils literal"><span class="pre">self.disk</span></tt> as the argument)
265and pushing the values up to the EPICS PVs.
266Then, set the time of the next update.</p>
267<table class="docutils field-list" frame="void" rules="none">
268<col class="field-name" />
269<col class="field-body" />
270<tbody valign="top">
271<tr class="field-odd field"><th class="field-name">Note :</th><td class="field-body">Several PV changes can force an update to happen.
272See the on... methods (callback handlers) for details.</td>
273</tr>
274</tbody>
275</table>
276</dd></dl>
277
278<dl class="method">
279<dt id="epicsdf.epicsdf.getDisk">
280<tt class="descname">getDisk</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.getDisk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.getDisk" title="Permalink to this definition">¶</a></dt>
281<dd><table class="docutils field-list" frame="void" rules="none">
282<col class="field-name" />
283<col class="field-body" />
284<tbody valign="top">
285<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name of disk partition to be watched</td>
286</tr>
287<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
288</tr>
289</tbody>
290</table>
291</dd></dl>
292
293<dl class="method">
294<dt id="epicsdf.epicsdf.isValidPeriod">
295<tt class="descname">isValidPeriod</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.isValidPeriod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.isValidPeriod" title="Permalink to this definition">¶</a></dt>
296<dd><p>check that the given value is valid to be used as a period</p>
297<table class="docutils field-list" frame="void" rules="none">
298<col class="field-name" />
299<col class="field-body" />
300<tbody valign="top">
301<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<em>int or float</em>) &#8211; candidate value of period,
302must be 1.0 or greater AND an int or a float</td>
303</tr>
304<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
305</tr>
306</tbody>
307</table>
308</dd></dl>
309
310<dl class="method">
311<dt id="epicsdf.epicsdf.logger">
312<tt class="descname">logger</tt><big>(</big><em>message</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.logger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.logger" title="Permalink to this definition">¶</a></dt>
313<dd><p>log a report from this class.</p>
314<table class="docutils field-list" frame="void" rules="none">
315<col class="field-name" />
316<col class="field-body" />
317<tbody valign="top">
318<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> (<em>str</em>) &#8211; words to be logged</td>
319</tr>
320</tbody>
321</table>
322</dd></dl>
323
324<dl class="method">
325<dt id="epicsdf.epicsdf.onAlarmPvChange">
326<tt class="descname">onAlarmPvChange</tt><big>(</big><em>pvname=None</em>, <em>value=None</em>, <em>host=None</em>, <em>**kws</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.onAlarmPvChange"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.onAlarmPvChange" title="Permalink to this definition">¶</a></dt>
327<dd><p>callback handler:
328Respond to camonitor on the alarm PV.
329Trigger to send an email message.</p>
330<table class="docutils field-list" frame="void" rules="none">
331<col class="field-name" />
332<col class="field-body" />
333<tbody valign="top">
334<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
335<li><strong>pvname</strong> (<em>str</em>) &#8211; monitored EPICS process variable name</li>
336<li><strong>value</strong> &#8211; value of EPICS process variable</li>
337<li><strong>host</strong> (<em>str</em>) &#8211; computer host name where the IOC resides</li>
338<li><strong>kws</strong> (<em>dict</em>) &#8211; PyEPICS keyword dictionary for callback functions</li>
339</ul>
340</td>
341</tr>
342</tbody>
343</table>
344</dd></dl>
345
346<dl class="method">
347<dt id="epicsdf.epicsdf.onDiskPvChange">
348<tt class="descname">onDiskPvChange</tt><big>(</big><em>pvname=None</em>, <em>value=None</em>, <em>host=None</em>, <em>**kws</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.onDiskPvChange"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.onDiskPvChange" title="Permalink to this definition">¶</a></dt>
349<dd><p>callback handler:
350Respond to camonitor on the disk PV.</p>
351<table class="docutils field-list" frame="void" rules="none">
352<col class="field-name" />
353<col class="field-body" />
354<tbody valign="top">
355<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
356<li><strong>pvname</strong> (<em>str</em>) &#8211; monitored EPICS process variable name</li>
357<li><strong>value</strong> &#8211; value of EPICS process variable</li>
358<li><strong>host</strong> (<em>str</em>) &#8211; computer host name where the IOC resides</li>
359<li><strong>kws</strong> (<em>dict</em>) &#8211; PyEPICS keyword dictionary for callback functions</li>
360</ul>
361</td>
362</tr>
363<tr class="field-even field"><th class="field-name">Note :</th><td class="field-body"><p class="first last">An acceptable change of disk partition forces an update.</p>
364</td>
365</tr>
366</tbody>
367</table>
368</dd></dl>
369
370<dl class="method">
371<dt id="epicsdf.epicsdf.onEmailsPvChange">
372<tt class="descname">onEmailsPvChange</tt><big>(</big><em>pvname=None</em>, <em>value=None</em>, <em>host=None</em>, <em>**kws</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.onEmailsPvChange"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.onEmailsPvChange" title="Permalink to this definition">¶</a></dt>
373<dd><p>callback handler:
374Respond to camonitor on the email_list PV.</p>
375<table class="docutils field-list" frame="void" rules="none">
376<col class="field-name" />
377<col class="field-body" />
378<tbody valign="top">
379<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
380<li><strong>pvname</strong> (<em>str</em>) &#8211; monitored EPICS process variable name</li>
381<li><strong>value</strong> &#8211; value of EPICS process variable</li>
382<li><strong>host</strong> (<em>str</em>) &#8211; computer host name where the IOC resides</li>
383<li><strong>kws</strong> (<em>dict</em>) &#8211; PyEPICS keyword dictionary for callback functions</li>
384</ul>
385</td>
386</tr>
387</tbody>
388</table>
389</dd></dl>
390
391<dl class="method">
392<dt id="epicsdf.epicsdf.onMessagePvChange">
393<tt class="descname">onMessagePvChange</tt><big>(</big><em>pvname=None</em>, <em>value=None</em>, <em>host=None</em>, <em>**kws</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.onMessagePvChange"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.onMessagePvChange" title="Permalink to this definition">¶</a></dt>
394<dd><p>callback handler:
395Respond to camonitor on the message PV.</p>
396<table class="docutils field-list" frame="void" rules="none">
397<col class="field-name" />
398<col class="field-body" />
399<tbody valign="top">
400<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
401<li><strong>pvname</strong> (<em>str</em>) &#8211; monitored EPICS process variable name</li>
402<li><strong>value</strong> &#8211; value of EPICS process variable</li>
403<li><strong>host</strong> (<em>str</em>) &#8211; computer host name where the IOC resides</li>
404<li><strong>kws</strong> (<em>dict</em>) &#8211; PyEPICS keyword dictionary for callback functions</li>
405</ul>
406</td>
407</tr>
408</tbody>
409</table>
410</dd></dl>
411
412<dl class="method">
413<dt id="epicsdf.epicsdf.onPeriodPvChange">
414<tt class="descname">onPeriodPvChange</tt><big>(</big><em>pvname=None</em>, <em>value=None</em>, <em>host=None</em>, <em>**kws</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.onPeriodPvChange"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.onPeriodPvChange" title="Permalink to this definition">¶</a></dt>
415<dd><p>callback handler:
416Respond to camonitor on the period PV.</p>
417<table class="docutils field-list" frame="void" rules="none">
418<col class="field-name" />
419<col class="field-body" />
420<tbody valign="top">
421<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
422<li><strong>pvname</strong> (<em>str</em>) &#8211; monitored EPICS process variable name</li>
423<li><strong>value</strong> &#8211; value of EPICS process variable</li>
424<li><strong>host</strong> (<em>str</em>) &#8211; computer host name where the IOC resides</li>
425<li><strong>kws</strong> (<em>dict</em>) &#8211; PyEPICS keyword dictionary for callback functions</li>
426</ul>
427</td>
428</tr>
429<tr class="field-even field"><th class="field-name">Note :</th><td class="field-body"><p class="first last">An acceptable change of period forces an update.</p>
430</td>
431</tr>
432</tbody>
433</table>
434</dd></dl>
435
436<dl class="method">
437<dt id="epicsdf.epicsdf.run">
438<tt class="descname">run</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.run" title="Permalink to this definition">¶</a></dt>
439<dd><p>Run the job periodically &#8211; forever.</p>
440</dd></dl>
441
442<dl class="method">
443<dt id="epicsdf.epicsdf.sendMail">
444<tt class="descname">sendMail</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.sendMail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.sendMail" title="Permalink to this definition">¶</a></dt>
445<dd><p>send an email message when called</p>
446</dd></dl>
447
448<dl class="method">
449<dt id="epicsdf.epicsdf.setPeriod">
450<tt class="descname">setPeriod</tt><big>(</big><em>value=10.0</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.setPeriod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.setPeriod" title="Permalink to this definition">¶</a></dt>
451<dd><p>define the waiting period between updates (units = seconds)</p>
452<table class="docutils field-list" frame="void" rules="none">
453<col class="field-name" />
454<col class="field-body" />
455<tbody valign="top">
456<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<em>int or float</em>) &#8211; candidate value of period (default = 10.0),
457must be 1.0 or greater AND an int or a float</td>
458</tr>
459</tbody>
460</table>
461</dd></dl>
462
463<dl class="method">
464<dt id="epicsdf.epicsdf.wf2str">
465<tt class="descname">wf2str</tt><big>(</big><em>arr</em><big>)</big><a class="reference internal" href="../_modules/epicsdf.html#epicsdf.wf2str"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#epicsdf.epicsdf.wf2str" title="Permalink to this definition">¶</a></dt>
466<dd><p>converts an array of char from an
467EPICS waveform record to a python string</p>
468<table class="docutils field-list" frame="void" rules="none">
469<col class="field-name" />
470<col class="field-body" />
471<tbody valign="top">
472<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>arr</strong> (<em>numpy.ndarray</em>) &#8211; NumPy array of char from EPICS waveform record</td>
473</tr>
474<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">string as represented by arr</td>
475</tr>
476<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
477</tr>
478</tbody>
479</table>
480</dd></dl>
481
482</dd></dl>
483
484</div>
485
486
487          </div>
488        </div>
489      </div>
490      <div class="clearer"></div>
491    </div>
492    <div class="related">
493      <h3>Navigation</h3>
494      <ul>
495        <li class="right" style="margin-right: 10px">
496          <a href="../genindex.html" title="General Index"
497             >index</a></li>
498        <li class="right" >
499          <a href="../py-modindex.html" title="Python Module Index"
500             >modules</a> |</li>
501        <li class="right" >
502          <a href="index.html" title="Source code documentation"
503             >previous</a> |</li>
504        <li><a href="../index.html">epicsdf 1.0 documentation</a> &raquo;</li>
505          <li><a href="../contents.html" >Contents</a> &raquo;</li>
506          <li><a href="index.html" >Source code documentation</a> &raquo;</li> 
507      </ul>
508    </div>
509    <div class="footer">
510        &copy; Copyright 2011, Pete Jemian.
511      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
512    </div>
513  </body>
514</html>
Note: See TracBrowser for help on using the repository browser.