helloPutGet implements a simple channelRPC putGet.
The example implements a simple putGet that has a top level pvStructure:
structure
structure argument
string value
structure result
string value
time_t timeStamp
long secondsPastEpoch
int nanoseconds
int userTag
It is designed to be accessed via a channelPutGet request. The client sets argument.value When the record processes it sets result.value to "Hello " concatenated with argument.value. Thus if the client sets argument.value equal to "World" result.value will be "Hello World". 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/helloPutGet mrk> bin/$EPICS_HOST_ARCH/helloPutGetMain
To start helloPutGet as part of a V3IOC:
mrk> pwd /home/hg/exampleCPP/master/helloPutGet/iocBoot/helloPutGet mrk> ../../../bin/$EPICS_HOST_ARCH/helloPutGet st.cmd
mrk> pwd /home/epicsv4/master/exampleCPP/helloPutGet mrk> bin/$EPICS_HOST_ARCH/helloPutGetClient
The directory layout is:
helloPutGet
configure
ExampleRELEASE.local
...
src
pv
helloPutGetRecord.h
helloPutGetRecord.cpp
helloPutGetInclude.dbd
helloPutGetMain.cpp
helloPutGetRegister.cpp
helloPutGetRegister.dbd
helloPutGetClient.cpp
ioc
Db
...
src
helloPutGetInclude.dbd
helloPutGetMain.cpp
iocBoot
helloPutGet
st.cmd
...
where
helloPutGetCreateRecord helloPutGet
Multiple commands can be issued to create multiple putGet records.
If only a main program is desired then the directory layout is:
helloPutGet
configure
ExampleRELEASE.local
...
src
pv
helloPutGetRecord.h
code
helloPutGetRecord.cpp
helloPutGetMain.cpp
Thus if only a main program is required the directory layout is simple.
Also many sites will want to build the src directory in an area separate from where the iocs are build.