Merge README with CAref.html section to excas.html; install from ex

This commit is contained in:
Ralph Lange
2017-06-30 17:09:45 +02:00
parent 6575ebd10e
commit 98c8d7ef10
5 changed files with 199 additions and 72 deletions

View File

@@ -22,6 +22,8 @@ PROD_SYS_LIBS_WIN32 += ws2_32 advapi32 user32
PROD_HOST = excas
HTMLS += excas.html
excas_SRCS += main.cc
excas_SRCS += exServer.cc
excas_SRCS += exPV.cc

View File

@@ -5,7 +5,7 @@ include $(TOP)/configure/CONFIG
TEMPLATES_DIR = makeBaseApp
TEMPLATES += top/caServerApp/Makefile
TEMPLATES += top/caServerApp/README
TEMPLATES += top/caServerApp/excas.html
TEMPLATES += top/caServerApp/exAsyncPV.cc
TEMPLATES += top/caServerApp/exChannel.cc
TEMPLATES += top/caServerApp/exPV.cc

View File

@@ -19,15 +19,15 @@ PROD_LIBS += $(EPICS_BASE_HOST_LIBS)
#
PROD_SYS_LIBS_WIN32 += ws2_32 advapi32 user32
casexample_SRCS += main.cc
casexample_SRCS += exServer.cc
casexample_SRCS += exPV.cc
casexample_SRCS += exVectorPV.cc
casexample_SRCS += exScalarPV.cc
casexample_SRCS += exAsyncPV.cc
casexample_SRCS += exChannel.cc
PROD_HOST = excas
PROD_HOST = casexample
excas_SRCS += main.cc
excas_SRCS += exServer.cc
excas_SRCS += exPV.cc
excas_SRCS += exVectorPV.cc
excas_SRCS += exScalarPV.cc
excas_SRCS += exAsyncPV.cc
excas_SRCS += exChannel.cc
include $(TOP)/configure/RULES

View File

@@ -1,63 +0,0 @@
The files in this directory build an example CA server. This code
is meant to provide some examples of how the CA server library can
be used but is not intended to be an example of exemplary code organization
and therefore care should be taken when emulating what is found here.
The example server exports the process variables (PVs) in the table below.
ScanPeriod Name HOPR LOPR Type Asynchronous Elements
.1 "jane" 10.0 0.0 DBR_DOUBLE No 1
2.0 "fred" 10.0 -10.0 DBR_DOUBLE No 1
.1 "janet" 10.0 0.0 DBR_DOUBLE Yes 1
2.0 "freddy"10.0 -10.0 DBR_DOUBLE Yes 1
2.0 "alan" 10.0 -10.0 DBR_DOUBLE No 100
20.0 "albert"10.0 -10.0 DBR_DOUBLE No 1000
-1.0 "boot" 10.0 -10.0 DBR_ENUM No 1
-1.0 "booty" 10.0 -10.0 DBR_ENUM Yes 1
-1.0 "bill" 10.0 -10.0 DBR_DOUBLE No 1
-1.0 "billy" 10.0 -10.0 DBR_DOUBLE Yes 1
-1.0 "bloaty"10.0 -10.0 DBR_DOUBLE No 100000
Many ca servers will find that synchronous variables will meet
their needs and will not require the increased complexity
associated with asynchronous PVs. Asynchronous PVs are needed
when read and write IO requests cant be completed immediately.
The PVs in the example server are updated periodically if the
"ScanPeriod" column above contains a positive number. Some random
"noise" is added to a PV's current value each time that it is
updated.
usage:
excas [-d<debug level> -t<execution time> -p<PV name prefix>
-c<numbered alias count> -s<1=scan on (default), 0=scan off>
-ss<1=synchronous scan (default), 0=asynchronous scan>]
-d<debug level>
Increased diagnostics messages with increasing debug level. Defaults to no
messages.
-t<execution time>
Specifies the duration that the server will run. Defaults to forever.
-p<PV name prefix>
Specifies the prefix applied to all PV names. If you specify "-pxxx:"
then clients must specify PV names like "xxx:fred" or "xxx:jane".
This is useful when several example servers are running on the same
IP subnet for testing purposes. Defaults to no prefix.
-c<numbered alias count>
Useful when you need lots of aliased PV names. The alias names are
of the form "fred1", "fred2", etc. Defaults to no aliases.
-s<1=scan on (default), 0=scan off>
Used to turn off updating of the PVs with random noise. Default is
to update all PVs with a positive scan period.
-ss<1=synchronous scan (default), 0=asynchronous scan>
Controls updating of PVs from an asynchronous thread (tests thread
safety of the server library). Defaults to synchronous.

View File

@@ -0,0 +1,188 @@
<h1>CA Server Example</a></h1>
<h2>Usage</h2>
<p>excas [options]</p>
<p>This is an example CA server that is sometimes used for testing purposes.
It can be created as a module with the makeBaseApp script, as described in
the EPICS Application Developer's Guide.</p>
<p>This code is meant to provide some examples of how the CA server library
can be used, but is not intended to be an example of code organization.</p>
<table border="1">
<col>
<col>
<tbody>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<td>-d &lt;uuuu&gt;</td>
<td>Set verbosity level uuuu for debug messages,
where uuuu is a positive integer.</td>
</tr>
<tr>
<td>-p &lt;aaaa&gt;</td>
<td>Prefix all PV names below with aaaa (e.g. using "-p xyz:" the
PV name "bill" becomes "xyz:bill").</td>
</tr>
<tr>
<td>-t &lt;n.n&gt;</td>
<td>Set execution time where n.n is a positive real number.</td>
</tr>
<tr>
<td>-c &lt;uuuu&gt;</td>
<td>Set the numbered alias count. The alias names are of the form
"fred1", "fred2", etc. Defaults to no aliases.</td>
</tr>
<tr>
<td>-s &lt;nnn&gt;</td>
<td>nnn=1 (default) sets periodic scanning of the PVs,
adding small random noise. nnn=0 turns off periodic scanning.</td>
</tr>
<tr>
<td>-ss &lt;nnn&gt;</td>
<td>nnn=1 (default) enables synchronous scanning, nnn=0 turns on
asynchronous scanning.</td>
</tr>
<tr>
<td>-ad &lt;n.n&gt;</td>
<td>Set the delay before asynchronous operations complete
(defaults to 0.1 seconds).</td>
</tr>
<tr>
<td>-an &lt;nnn&gt;</td>
<td>Set the maximum number of simultaneous asynchronous operations
(defaults to 1000).</td>
</tr>
</tbody>
</table>
<p>The example server has a compile time fixed set of example variables.</p>
<table border="1">
<col>
<col>
<col>
<col>
<col>
<col>
<col>
<tbody>
<tr>
<th>Process Variable Name</th>
<th>Number of Elements</th>
<th>IO Type</th>
<th>Data Type</th>
<th>High Limit</th>
<th>Low Limit</th>
<th>Scan Period</th>
</tr>
<tr>
<td>jane</td>
<td>1</td>
<td>Synchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>0.0</td>
<td>0.1 Seconds, random noise changes</td>
</tr>
<tr>
<td>fred</td>
<td>1</td>
<td>Synchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>2.0 Seconds, random noise changes</td>
</tr>
<tr>
<td>janet</td>
<td>1</td>
<td>Asynchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>0.0</td>
<td>0.1 Seconds, random noise changes</td>
</tr>
<tr>
<td>freddy</td>
<td>1</td>
<td>Asynchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>2.0 Seconds, random noise changes</td>
</tr>
<tr>
<td>alan</td>
<td>100</td>
<td>Synchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>2.0 Seconds, random noise changes</td>
</tr>
<tr>
<td>albert</td>
<td>1000</td>
<td>Synchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>20.0 Seconds, random noise changes</td>
</tr>
<tr>
<td>boot</td>
<td>1</td>
<td>Synchronous</td>
<td>enumerated, 16 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>changed only by client</td>
</tr>
<tr>
<td>booty</td>
<td>1</td>
<td>Asynchronous</td>
<td>enumerated, 16 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>1.0 Seconds, random noise changes</td>
</tr>
<tr>
<td>bill</td>
<td>1</td>
<td>Synchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>changed only by client</td>
</tr>
<tr>
<td>billy</td>
<td>1</td>
<td>Asynchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>changed only by client</td>
</tr>
<tr>
<td>bloaty</td>
<td>100000</td>
<td>Synchronous</td>
<td>float point, 64 bits</td>
<td>10.0</td>
<td>-10.0</td>
<td>changed only by client</td>
</tr>
</tbody>
</table>
<h2>Bugs</h2>
<p>Not all of the options listed above have been tested recently.</p>