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_server_helper.h
Go to the documentation of this file.
1/** @file
2 * @brief The Header File for the Native Channel Provider Server Helper functions.
3 * **CMS**=C_INC
4 */
5#ifndef aida_pva_server_helper_h
6#define aida_pva_server_helper_h
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#include "aida_pva.h"
12
13/**
14 * Get a named argument
15 * @param arguments arguments
16 * @param name name
17 * @return Argument
18 */
19Argument getArgument(Arguments arguments, char* name);
20
21/**
22 * Get the json value from the given value identified by the path
23 *
24 * @param value the given value
25 * @param passedInPath is an absolute reference to the element within the json of the given value. e.g. root.collection[0].name
26 * @return the json_value
27 */
28json_value* getJsonValue(Value* value, char* passedInPath);
29
30/**
31 * Get value from a named argument in the provided arguments structure.
32 *
33 * @param env env
34 * @param arguments provided arguments structure
35 * @param name provided name
36 * @return the extracted Value
37 */
38Value getNamedValue(JNIEnv* env, Arguments arguments, char* name);
39
40/**
41 * Get array value from a named argument in the provided arguments structure.
42 *
43 * @param env env
44 * @param arguments provided arguments structure
45 * @param name provided name
46 * @return the extracted Value
47 */
48Value getNamedArrayValue(JNIEnv* env, Arguments arguments, char* name);
49
50/**
51 * Skip root element if it is _array otherwise return unchanged
52 *
53 * This is because our json parser can't process arrays at the top level and so we insert
54 * an object at the top level with an "_array" element if we find an array at the top level
55 *
56 * @param jsonValue the json value traverse
57 * @return json value
58 */
59json_value* getJsonRoot(json_value* jsonValue);
60
61#ifdef __cplusplus
62}
63#endif
64#endif
65
The Header File for the AIDA-PVA Module functions.
Value getNamedArrayValue(JNIEnv *env, Arguments arguments, char *name)
Get array value from a named argument in the provided arguments structure.
json_value * getJsonValue(Value *value, char *passedInPath)
Get the json value from the given value identified by the path.
Argument getArgument(Arguments arguments, char *name)
Get a named argument.
Value getNamedValue(JNIEnv *env, Arguments arguments, char *name)
Get value from a named argument in the provided arguments structure.
json_value * getJsonRoot(json_value *jsonValue)
A single request argument.
An Arguments structure stores all of the arguments passed from the request to the Native Channel Prov...
This special type represents a Value.