Accelerator Independent Data Access / PVAccess 2.0
AIDA-PVA is the latest version of the AIDA framework. Built on top of EPICS 7 it enables client applications to programmatically access and manage any device or database on the SLAC Network using simple channel names.
|
This is the guide to using the AIDA-PVA system at SLAC National Accelerator Laboratory. AIDA is the Accelerator Integrated Data Access framework developed by SLAC in the early 2000s. AIDA-PVA is the latest version developed in the early 20s.
If you are already familiar AIDA you can jump to Differences Between AIDA and AIDA-PVA without reading all the following sections. If you are already familiar with EPICS and just want to know how you can use it to access AIDA-PVA data providers then check out EPICS and AIDA-PVA. If you are already familiar with using AIDA from matlab please go directly to AIDA-PVA in matlab. If you're new to AIDA, Matlab, and EPICS then grab a coffee, and strap in, this may take some time :)
AIDA-PVA
is the successor to AIDA a system for providing programmatic access to SLC Control System devices, data and services.
Since its introduction in 2002 it has been used in other laboratories in the US and around the world. It provides a naming convention to address all devices and their attributes, a way of specifying arguments for remote procedure calls and obtaining results in any format, including rich formats with including metadata. Finally, it provides security, logging and reliability to allow it to be used in a variety of applications from logging, and monitoring, to modeling and control.
AIDA-PVA supersedes AIDA, but both AIDA and AIDA-PVA now co-exist, sharing many of the low level AIDA Modules from AIDASHR, so results obtained by using either version remain consistent.
Legacy AIDA uses CORBA to transport requests to the Data Providers, while AIDA-PVA uses EPICS-7's PVAccess
mechanism.
EPICS has become a staple for laboratories around the world, and leveraging its features allows scientists, and engineers who are already familiar with programming on EPICS, to access AIDA-PVA data providers with very little effort.
For the client AIDA-PVA comes with a client library aida-pva-client which can aid client-side programmers. For more information see aida-pva-client documentation.
As you can see below, clients using AIDA-PVA will look like any other EPICS client. AIDA-PVA data providers are implemented inside the EPICS framework and so will appear to EPICs clients as just another EPICS service.
In order to access an AIDA-PVA Channel Provider you'll select a Channel Name that the Channel Provider has published. The EPICS framework will find the service that serves requests for that Channel and will direct your request to it.
In AIDA-PVA, channel name parts are all separated by colons e.g.,PRIM:MICR:UNIT:ATTR
.
AIDA-PVA allows accessing services with the same naming conventions as EPICS.
Even though AIDA-PVA has an updated naming scheme to align with EPICs it is backwards compatible with AIDA and allows legacy style names to be used.
INSTANCE//ATTRIBUTE
where INSTANCE
can have other sub-parts typically delimited by colons. Though the ATTRIBUTE
part is typically a single name, in rare cases it is also made up of parts, delimited by colons.In some cases there are name clashes that can exist between channels supported by one Channel Provider and another.
AIDA-PVA offers Channel Providers the possibility of prefixing a service identifier to the clashing channel names to disambiguate them for clients. These prefixes are delimited by double colons. e.g., SLC::KLYS:LI15:61:ACON
disambiguates the SLC Database Channel Provider channel from the Klystron Channel Provider channel (KLYS:LI15:61:ACON
) of the same name.
AIDA-PVA allows you to get
values associated with channels. These requests are known as Getters.
Any request that does not have a VALUE
argument will be interpreted as a Getter request by AIDA-PVA.
AIDA-PVA allows you to set
values associated with channels. These special requests are known as Setters. To select a Setter request simply add an argument called VALUE
. All Setters have a VALUE
which is used by the Channel Provider to set a value in the Channel Data Source.
Getter and Setter can take optional arguments which are simple name/value pairs. The value can be either a simple string, a scalar value, or some json that allows specifying arrays, and objects.
The value can be set programmatically to any type of complex PVField structure, to allow complex types and arrays to be specified in any way required.
The interpretation of these arguments is deferred until the Channel Provider reads them - except TYPE
and VALUE
explained below.
This means that each Channel Provider can have its own interpretation of an argument. Each provider publishes the names of the arguments they accept for each of Channels/Operations they support, and describe the names, formats, requirements, defaults, and acceptable values of the parameters they support.
EPICS allows synchronous and asynchronous call semantics so either can be used with AIDA-PVA.
The only EPICS protocol AIDA-PVA implements is RPC.
The configuration of EPICS is important to make sure that your client application will connect to the correct Channel Provider. The full documentation is available here but the main things to set to get you going are:
EPICS_PVA_ADDR_LIST
- this is the list of addresses to search for Channel Providers. Set it to mccdev.slac.stanford.edu
for testing against the development environment.EPICS_PVA_AUTO_ADDR_LIST
- set this to FALSE
so that EPICS won't try to automatically create your address listWhen you need to specify the type of the response you can set the TYPE
argument to one of the available types.
e.g. TYPE=FLOAT
BOOLEAN
to return a boolean : NTScalarBYTE
to return a byte : NTScalarSHORT
to return a short : NTScalarINTEGER
to return an integer : NTScalarLONG
to return a long : NTScalarFLOAT
to return a float : NTScalarDOUBLE
to return a double : NTScalarSTRING
to return a string : NTScalarBOOLEAN_ARRAY
to return a boolean array : NTScalarArrayBYTE_ARRAY
to return a byte array : NTScalarArraySHORT_ARRAY
to return a short array : NTScalarArrayINTEGER_ARRAY
to return an integer array : NTScalarArrayLONG_ARRAY
to return a long array : NTScalarArrayFLOAT_ARRAY
to return a float array : NTScalarArrayDOUBLE_ARRAY
to return a double array : NTScalarArraySTRING_ARRAY
to return a string array : NTScalarArrayTABLE
to return a table : NTTableIf supported you can specify the type for rows in a table by providing the TABLE_TYPE
argument. The value can be any Scalar or Scalar Array type. eg. TABLE_TYPE=FLOAT
so the SLC Channel Provider will select a float for the single row in the single column table returned from a request.
If an exception occurs in the Channel Provider the Exception will be propagated back up to the client, and logged using the configured logger.
All EPICS environment variables work in the same way they do for EPICS, under AIDA-PVA.
For more information on EPICS variables see EPICS Config Documentation
You can access data in AIDA-PVA using the commandline.
This will access the Buffered Acquisition Channel Provider requesting information on 4 BPMs with the specified parameters.
From Java you can have more control over the data types sent and received.
The java libraries available to matlab have been updated and new functions have been added:
See AIDA-PVA matlab documentation for full details.
Here are some simple examples.
In functions, you need to use the aidapva
script to bring the aida-pva-client api into the function scope. From the commandline or in scripts this is not necessary.
Here is the documentation for all the implemented AIDA-PVA channel providers.