EPICS exampleJava

Release 4.2-DEV - 2016.09.02

Abstract

This project provides a set of examples of client and server code for pvAccess.
This release of exampleJava is one of the components of EPICS V4 Release 4.6.

For more information about EPICS generally, please refer to the home page of the Experimental Physics and Industrial Control System.

Table of Contents


Overview

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.

The main purpose of these examples is to understand and create new code for EPICS V4. This document assumes that the reader also looks at the source code for the examples. The reader should also be familiar with developerGuide

Each example is a template

Each example can be used as a template for building other applications:

Building via exampleJava

Just type:

mvn install

Building an individual example

In the example directory:

mvn install

exampleCPP and exampleJava

Each example that appears in both exampleJava and exampleCPP are compatible, i. e. A client from one can communicate with a server from the other.

Brief summary of examples and links to documentation

database

Provides a server that has a database of V4 PVRecords.

Documentation:database

exampleClient

Provides a set of examples that use pvaClientJava.

Documentation:exampleClient

In order to run the examples, database must also be built and then started (in linux) as follows:

mrk> pwd
/home/epicsv4/master/exampleJava/database
mrk> scripts/exampleDatabase

helloPutGet

Implements a PVRecord that is an example of a PVRecord intended to be accessed via channelPutGet. It is a simple HelloWorld example.

Documentation:helloPutGet

helloRPC

A very simple example of an EPICS V4 "Hello World" RPC service.

Documentation:helloRPC

pvDatabaseRPC

An example of a pvDatabase PVRecord which also supports multiple RPC services.

It illustrates synchronous and asynchronous RPC services, selecting services based on the supplied pvRequest and using EPICS V4 to talk to an existing object which has no knowledge of EPICS and call its methods, so creating distributed objects.

It represents a device which has a 2D position setpoint and readback as well as a state. Each field has a time stamp, as does the record itself. The device can be controlled through a client using RPC commands to move through a sequence of points as well as conventionally by putting to the setpoint. Commands are: configuring the set of points, starting a scan (blocking or non-blocking), pausing and resuming, rewinding and stopping/aborting.

A client ("control") for calling the services is supplied.

Documentation:pvDatabaseRPC

exampleLink

This implements a server that has records exampleGetLink, exampleMonitorLink, and examplePutLink. Each has a link to another record (default name is doubleArray). The other record can be in the same server or in another server including a V3 IOC DBRecord.

The example records can use provider local, pva, or ca to connect to doubleArray.

Documentation:exampleLink

powerSupply

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.

Documentation:powerSupply

arrayPerformance

This is an example that shows performance for an array of longs.

Documentation:arrayPerformance

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.

serviceAPI

Documentation:serviceAPI

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

Warning: rdbService does not run as delivered with EPICS V4 release 4.6

Documentation:rdbService