This project provides a set of examples of client and server code for pvAccess.
For more information about EPICS generally, please refer to the home page of the Experimental Physics and Industrial Control System.
This project provides a set of examples of client and server code for pvAccess. Each example can be built separately by building in the example subdirectory. The complete set of examples can also be built by building in exampleJava itself.
Each example can be used as a template for building other applications:
Just type:
mvn package
Just type:
mvn package
Provides a server that has a database of V4 PVRecords.
Provides a set of examples that use pvaClientJava.
In order to run the examples, database must also be built and then started as follows:
mrk> pwd /home/epicsv4/master/exampleJava/database/shell mrk> ./exampleDatabase
Implements a PVRecord that is an example of a PVRecord intended to be accessed via channelPutGet. It is a simple HelloWorld example.
A very simple example of an EPICS V4 RPC service: This implements a "Hello World" example of a service that is accessed via Channel RPC.
This is a starting point for writing an RPC service without using pvDatabaseJava.
But note that example database has a similar example implemented via pvDatabaseJava, which allows clients to monitor the result of each request.
This implements a V3 IOC that has a PVRecord doubleArray and a PVRecord exampleLink that monitors changes to doubleArray. PVRecord exampleLink uses pvAccess client code to monitor for changes in doubleArray. It can use either provider local, pva, or ca to connect to doubleArray.
This is an example of creating a PVRecord that uses a somewhat complicated top level PVStructure. It simulates a power supply.
The example also has an example pvaClient for accessing the PVRecord.
An example of a pvDatabase PVRecord which also supports RPC services.
The record represents a 2-D position, but also provides an RPC service which moves the position through a sequence of points before returning. A channel to the record supports the usual operations (such as get, put and monitor) but also supports Channel RPC, i.e. the RPC service has the same channel name as the position PV.
A client ("move") for calling the service is supplied.
This is an example that shows performance for an array of longs.
arrayPerformanceMain implement a PVRecord that is a long array. It has a process method with code that causes the array to be updated at selectable rates and sizes.!
It also has pvaClient examples that can get, put, and monitor the long array record.
Start with its RDBSERVICE_README.txt.
The rdbService example is a complete functional server for accessing SQL databases such Oracle via an EPICS V4 server, and returning the resulting table ResultSet data back to an EPICS V4 client. rdbService illustrates a number of facets of EPICS V4's, use for writing high performance synchronous servers, plus some other stuff:
The "serviceapi" package in src/org/epics/serviceAPI is composed of a single class server and a single class client, and is intended to illustrate the principles of RPC comms in EPICS V4. It shows how one defines and populates the pvStructure conforming to the NTURI Normative Type, for making an RPC query to a pvAccess server, and it shows how the server defines and populates a table of data conforming to the NTTable Normative Type for encoding the reply.
Start with its RDBSERVICE_README.txt
rdbService is the classic hello world idea, implemented as a server and a client. The client sends an argument "your name" to the server, which replies just saying "hello that name". The server is built on top of the RPCSever framework in pvAccessJava.