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.
Loading...
Searching...
No Matches
aida_pva_uri.h
Go to the documentation of this file.
1/** @file
2 * @brief The Header File for uri and channel name manipulation functions.
3 * **CMS**=C_INC
4 */
5#ifndef aida_pva_uri_h
6#define aida_pva_uri_h
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#include "aida_pva.h"
12
13/**
14 * The maximum length of the PMU part of a URI, includes primary, micro and unit strings with spaces between them
15 */
16#define MAX_PMU_LEN 18
17/**
18 * The maximum length of a URI
19 */
20#define MAX_URI_LEN 30
21/**
22 * The length of the primary part of a PMU string
23 */
24#define PRIM_LEN 4
25/**
26 * The length of the micro part of a PMU string
27 */
28#define MICRO_LEN 4
29
30/**
31 * Get a PMU (Primary-Micro-Unit) string from the supplied URI.
32 *
33 * @param _uri the uri to pull the pmu string from
34 * @param _var the name of the variable to store the resulting pmu string
35 */
36#define PMU_STRING_FROM_URI(_var, _uri) \
37 char _var[MAX_PMU_LEN]; \
38 pmuStringFromUri(_var, _uri);
39
40/**
41 * Get a slcName from the provided uri and store it in the given variable name.
42 * A slcName is the URI with the last ':' converted to a dot
43 *
44 * @param _uri the uri to pull the slcName from
45 * @param _var the name of the variable to store the resulting slcName in
46 */
47#define TO_SLC_NAME(_uri, _var)\
48 char _var[MAX_URI_LEN]; \
49 uriToSlcName(_var, _uri);
50
51/**
52 * Get a legacy AIDA name from the provided uri and store it in the given variable name.
53 *
54 * @param _uri the uri to pull the slcName from
55 * @param _var the name of the variable to store the resulting slcName in
56 */
57#define TO_LEGACY_NAME(_uri, _var)\
58 char _var[MAX_URI_LEN]; \
59 uriLegacyName(_var, _uri);
60
61/**
62 * Get a display group name from the provided uri and store it in the given variable name.
63 *
64 * A display group name is the the part of the URI before the last ':'
65 *
66 * @param _uri the uri to pull the dgroup from
67 * @param _var the name of the variable to store the resulting dgroup in
68 */
69#define TO_DGROUP(_var, _uri) \
70 char _var[MAX_URI_LEN]; \
71 groupNameFromUri(_var, _uri);
72
73#ifdef __cplusplus
74}
75#endif
76#endif
77
The Header File for the AIDA-PVA Module functions.