powerSupply is an example of creating a service that requires a somewhat complicated top level PVStructure. Look at the code for details.
For more information about EPICS generally, please refer to the home page of the Experimental Physics and Industrial Control System.
This is an example of creating a service that requires a somewhat complicated top level PVStructure.
The example has a top level pvStructure:
structure
alarm_t alarm
time_t timeStamp
structure power
double value
structure voltage
double value
structure current
double value
It is designed to be accessed via a channelPutGet request. The client sets power.value and voltage.value When the record processes it computes current.value. In addition the timeStamp is set to the time when process is called.
The example can be run on linux as follows:
mrk> pwd /home/epicsv4/master/exampleCPP/powerSupply/shell mrk> ./powerSupplyMain
mrk> pwd /home/epicsv4/master/exampleCPP/powerSupply/shell mrk> ./powerSupplyMonitor
mrk> pwd /home/epicsv4/master/exampleCPP/powerSupply/shell mrk> ./powerSupplyClient
NOTE: The client ends by requesting a voltage of 0. This results in the power supply record thowing an exception. This results in problems including the powerSupplyMonitor no longer updating. Needs investigation.