pvDatabaseCPP

Release 4.2-SNAPSHOT - 2016.07.14

Abstract

This document describes pvDatabaseCPP, which is a framework for implementing a network accessible database of smart memory resident records. Network access is via pvAccess. The data in each record is a top level PVStructure as defined by pvData. The framework includes a complete implementation of ChannelProvider as defined by pvAccess. The framework can be extended in order to create record instances that implements services. The minimum that an extension must provide is a top level PVStructure and a process method.

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

Table of Contents


Overview

pvDatabaseCPP is one of the components of EPICS Version 4

This document is only a guide to help locate code and documentation related to pvDatabaseCPP

It is intended for developers that want to use pvDatabaseCPP.

Developer Guide

A guide for developers is available at developerGuide

This guide discusses all the components that are part of an EPICS V4 release. Some understanding of the components and how they are related is necessary in order to develop code that uses pvDatabaseCPP. In particular read everything related to pvDatabase.

The developerGuide discusses code in a way that applies to both CPP and C++. For the descriptions of the CPP specific code consult the next section.

doxygen

doxygen documentation is available at doxgen

pvDatabaseCPP

pvDatabaseCPP itself has the following implementations of a PVRecord

RemoveRecord.cpp
This is the code that is used to delete another record in the same IOC.
TraceRecord.cpp
This is the code that is used to set the trace level in another record in the same IOC.

exampleCPP

Example code is available as part of this release. exampleCPP

In particular look at the example code mentioned in the following sub-sections.

database

This has many examples of how to create both soft records and records that implement other functionality.

exampleDatabase.cpp
This shows how to create soft records of each pvData type.
In addition shows how to create instances of the following two records.
exampleHelloRecord.cpp
This is a simple "hello world" that is intentended to be used via a channelPutGet request.
exampleHelloRPC.cpp
This is a simple "hello world" that is intentended to be used via a channelRPC request.
exampleDatabaseMain.cpp
This shows how to create a standalone IOC.
ioc and iocBoot
This has code and examples to create a V3 IOC which also has a PVDatabase.

exampleLink

This shows how to implement a record that has a link to another record

exampleMonitorLinkRecord
This creates a monitor link to another record.
exampleGetLinkRecord
This creates a get link to another record.
examplePutLinkRecord
This creates a put link to another record.

iocshell commands

Shell commands are made available via the standard DBD include mechanism provided by iocCore. The following provide EPICS V4 shell commands:

pvAccessCPP
pvaSrv
pvDatabaseCPP

pvDatabaseCPP provides the following iocshell command.

registerChannelProviderLocal
Including registerChannelProviderLocal.dbd as a dbd file automatically starts provider local and also creates the pvdbl shell command.
pvdbl
Provides a list of all the pvRecords in database master

In addition any code that implements a PVRecord must implement an ioc command. Look at any of the examples in exampleCPP to see how to implement shell commands.