SLAC ESD Software Engineering Group
Stanford Linear Accelerator Center
AIDA

SLC Trigger Data Provider Guide

SLAC Detailed
SLAC Computing
Software Home
Software Detailed
AIDA
SLC Peer PG

This page provides documentation for users and programmers of AIDA's SLC Trigger Data Provider. This data provider allows the retrieval of the status code or a status string for a specified trigger device on a beam code. It also allows the deactivation or reactivation of a specified trigger device on a beam code.

See Also: Basic Users Guide to Aida, REF_AIDASHR; AIDA SLC Peer Programmers Guide


Users Guide

This section descibes what an AIDA user should know about using the SLC Trigger data provider. For general information on using AIDA see Basic Users Guide to Aida, and the Aida javadoc, in particular the classes DaObject and DaReference, in aida.lib.da which form Aida's programming interface. One can also use Aida through Matlab.

Table 1: Summary of AIDA Data Provider for SLC Trigger Data

SUMMARY
Supports get and set operations. The get operation obtains the status code or a status string for a specified trigger device on a beam code. The set operation deactivates or reactivates a specified trigger device on a beam code.
Status and limitations

The data provider is complete and there are no known limitations

Plan No active plans for extensions.

EXAMPLES
Schematic Java examples, see DpSlcUtilTests.java for more examples:
String query = "TRIG:LI31:109//TACT";
da.setParam("BEAM=1");         /* Required parameter specifying a beam code. */
Short v = (Short) da.get(query, DaValue.Type.SHORT); /* Get the status code for the trigger device on the beam code. */ 

String query = "TRIG:LI31:109//TACT";
da.setParam("BEAM=1");         /* Required parameter specifying a beam code. */
String v = (String) da.get(query, DaValue.Type.STRING); /* String type indicates to get the status string. */ 

String query = "TRIG:LI31:109//TACT";
da.setParam("BEAM=1");         /* Required parameter specifying a beam code. */
Short setValue = new Short((short) 0); /* Flag 0 indicates a deactivation operation. */
DaValue inData = new DaValue(setValue); /* Creation a DaValue to hold operation flag. */
DaValue outData = da.setDaValue(query, inData); /* Perform specified operation to trigger device on beam code. */

Java $CD_SOFT/ref/package/aida/test/java/DpSlcUtilTests.java
Matlab $CD_SOFT/ref/package/aida/test/matlab/trigGetDemo.m gets status of a trigger device;
$CD_SOFT/ref/package/aida/test/matlab/trigSetDemo.m deactivates or reactivates a trigger device.

INSTANCES and ATTRIBUTES
Instance Type Description
Get Syntax <prim>:<micr>:<unit>//TACT
Examples

TRIG:LI31:109//TACT

Set Syntax <prim>:<micr>:<unit>//TACT
Examples

TRIG:LI31:109//TACT

Attributes
Attribute Description
TACT Gets a status code or a status string for the specified trigger device on a beam code.
Methods Name* Returns
get(d,DaValue.Types.SHORT) A short value containing the status code for the trigger device on a beam code: 0 => deactivated, 1 => activated.
get(d,DaValue.Types.LONG) A long value containing the status code for the trigger device on a beam code: 0 => deactivated, 1 => activated.
get(d,DaValue.Types.STRING) A string value containing a status string having one of two values: "deactivated" or "activated".
Parameters Name

Req/
Opt

Syntax Semantics
BEAM

req

Integer Beam code number
TACT Deactivates or reactivates a specified trigger device on a beam code. The parameter data argument (p) is a DaValue containing a Short flag code indicating the desired operation: 0 => deactivate, 1 => reactivate.
Methods Name* Returns
setDaValue(q, p) Returns a DaValue containing a matrix having one value of type short: the status code for the specified trigger device on a beam code: 0 => deactivated, 1 => activated.
Parameters Name

Req/
Opt

Syntax Semantics
BEAM req Integer Beam code number

* See DaObject and DaReference (and DaReference's parent _DaReference) in aida.lib.da for full API and method signatures.


Programmers Guide

The SLC Trigger Data Provider is a provider in the AIDA SLC Peer (along with the SLC DB Data Provider, the SLC History Data Provider, the SLC Model Data provider, the SLC BPM Data Provider, the SLC Multiknob Data Provider, the SLC Master Oscillator Data Provider, the SLC Magnet Data Provider, and the SLC Klystron Data Provider). Development of all these data providers is described in a Programmers Guide here.


[SLAC ESD Software Engineering Group][ SLAC Home Page]

Author:  Bob Hall 01-Aug-2007