EPICS pvaSrv

EPICS v4 Working Group, Working Draft, 19-Jun-2013

This version:
pvaSrv_20130619.html
Previous version:
pvaSrv_20130123.html
Latest version:
pvaSrv.html
Editors:
Marty Kraimer, BNL
Ralph Lange, HZB / BESSY II

Abstract

pvaSrv is a pvAccess server running on top of an EPICS V3 database, implemented in C++.

Status of this Document

This document is describing version 0.9.1 of pvaSrv as of 19-Jun-2013. This version is being released part of EPICS V4.3.0 (BETA).

Table of Contents

Introduction

pvaSrv is a pvAccess server that runs in the EPICS V3 IOC.

pvaSrv allows you to get, put and monitor V3 PVs (fields of EPICS DB records) over pvAccess, translating the value and its meta data (graphics limits, alarm status, timestamp) to or from V4 Normative Type (NT) pvData structures (NTScalar, NTScalarArray).

Module dbPv

pvaSrv's module dbPv allows access to a single PV in the EPICS DB, i.e. to any record.field that is also accessible through Channel Access.

dbPv does not require any configuration - it serves all fields of all records in the local EPICS database.

Installation

Prerequisites

You need to have the following modules installed and mentioned in the configure/RELEASE file of pvaSrv:

EPICS Base
≥ 3.14.11
pvCommonCPP
pvDataCPP
pvAccessCPP
pvIOCCPP
≥ 4.3.0 BETA

Build

With these modules present, pvaSrv should compile as a regular EPICS V3 support module.

Usage

pvaSrv is a regular V3 support module. To use it in a V3 IOC created in yourApp, you have to do the following steps:

  1. Add the pvaSrv dbd(s) to your IOC, for example in myAppInclude.dbd
    include "base.dbd"
    include "dbPv.dbd"
    
  2. Add the EPICS V4 libraries, for example in myApp/src/Makefile
    myApp_LIBS += pvaSrv pvIOC pvAccess pvData pvMB
    myApp_LIBS += $(EPICS_BASE_IOC_LIBS)
    
  3. Build your IOC
  4. Start pvaSrv in your st.cmd, for example in iocBoot/myApp/st.cmd
    [...]
    iocInit()
    pvaSrvStart
    

After your IOC has started pvaSrv, you can connect using pvAccess:

> pvget TESTLONG
TESTLONG                       99
> pvinfo TESTLONG
CHANNEL  : TESTLONG
STATE    : CONNECTED
ADDRESS  : 192.168.n.n:5075

epics:nt/NTScalar:1.0
    int value
    alarm_t alarm
        int severity
        int status
        string message
    time_t timeStamp
        long secondsPastEpoch
        int nanoSeconds
        int userTag
    display_t display
        double limitLow
        double limitHigh
        string description
        string format
        string units
    control_t control
        double limitLow
        double limitHigh
        double minStep

Example Application

pvaSrv contains a simple example application in exampleApp to demonstrate its usage. The example is a TOP structure by itself, so you can simply copy exampleApp into your workspace, adapt the references in its configure/RELEASE file, and compile it.

Reference

Doxygen generated API documentation is available at doxygenDoc.

Sources

The source code is kept under Mercurial revision control as part of the EPICS V4 project on SourceForge. A repository browser is available.