diff --git a/src/pcas/example/ex/Makefile b/src/pcas/example/ex/Makefile index 30014ccce..3b6444348 100644 --- a/src/pcas/example/ex/Makefile +++ b/src/pcas/example/ex/Makefile @@ -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 diff --git a/src/template/Makefile b/src/template/Makefile index 1b2ccbd0e..93adff436 100644 --- a/src/template/Makefile +++ b/src/template/Makefile @@ -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 diff --git a/src/template/top/caServerApp/Makefile b/src/template/top/caServerApp/Makefile index 0195112ac..afaac1ddd 100644 --- a/src/template/top/caServerApp/Makefile +++ b/src/template/top/caServerApp/Makefile @@ -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 diff --git a/src/template/top/caServerApp/README b/src/template/top/caServerApp/README deleted file mode 100644 index 202c0dbc5..000000000 --- a/src/template/top/caServerApp/README +++ /dev/null @@ -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 -t -p --c -s<1=scan on (default), 0=scan off> --ss<1=synchronous scan (default), 0=asynchronous scan>] - --d -Increased diagnostics messages with increasing debug level. Defaults to no -messages. - --t -Specifies the duration that the server will run. Defaults to forever. - --p -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 -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. - diff --git a/src/template/top/caServerApp/excas.html b/src/template/top/caServerApp/excas.html new file mode 100644 index 000000000..e3635e071 --- /dev/null +++ b/src/template/top/caServerApp/excas.html @@ -0,0 +1,188 @@ +

CA Server Example

+ +

Usage

+ +

excas [options]

+ +

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.

+ +

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.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
-d <uuuu>Set verbosity level uuuu for debug messages, + where uuuu is a positive integer.
-p <aaaa>Prefix all PV names below with aaaa (e.g. using "-p xyz:" the + PV name "bill" becomes "xyz:bill").
-t <n.n>Set execution time where n.n is a positive real number.
-c <uuuu>Set the numbered alias count. The alias names are of the form + "fred1", "fred2", etc. Defaults to no aliases.
-s <nnn>nnn=1 (default) sets periodic scanning of the PVs, + adding small random noise. nnn=0 turns off periodic scanning.
-ss <nnn>nnn=1 (default) enables synchronous scanning, nnn=0 turns on + asynchronous scanning.
-ad <n.n>Set the delay before asynchronous operations complete + (defaults to 0.1 seconds).
-an <nnn>Set the maximum number of simultaneous asynchronous operations + (defaults to 1000).
+ +

The example server has a compile time fixed set of example variables.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Process Variable NameNumber of ElementsIO TypeData TypeHigh LimitLow LimitScan Period
jane1Synchronousfloat point, 64 bits10.00.00.1 Seconds, random noise changes
fred1Synchronousfloat point, 64 bits10.0-10.02.0 Seconds, random noise changes
janet1Asynchronousfloat point, 64 bits10.00.00.1 Seconds, random noise changes
freddy1Asynchronousfloat point, 64 bits10.0-10.02.0 Seconds, random noise changes
alan100Synchronousfloat point, 64 bits10.0-10.02.0 Seconds, random noise changes
albert1000Synchronousfloat point, 64 bits10.0-10.020.0 Seconds, random noise changes
boot1Synchronousenumerated, 16 bits10.0-10.0changed only by client
booty1Asynchronousenumerated, 16 bits10.0-10.01.0 Seconds, random noise changes
bill1Synchronousfloat point, 64 bits10.0-10.0changed only by client
billy1Asynchronousfloat point, 64 bits10.0-10.0changed only by client
bloaty100000Synchronousfloat point, 64 bits10.0-10.0changed only by client
+ +

Bugs

+ +

Not all of the options listed above have been tested recently.