KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
access.h File Reference

Access provides 'introspective' access to process variables. More...

#include "util/databuffer.h"
#include "pv/varid.h"

Go to the source code of this file.

Functions

bool xsVarExists (int varID)
 Returns whether or not the specified variable exists. More...
 
bool xsRead (int varID, void *target, int size)
 Reads variable into target buffer from variable structure. More...
 
bool xsWrite (int varID, void *source, int size)
 Writes variable from target buffer into variable structure. More...
 
bool xsReadDB (int varID, DataBuffer *target)
 Reads variable into target data buffer from variable structure. More...
 
bool xsWriteDB (int varID, DataBuffer *source)
 Writes variable from target data buffer into variable structure. More...
 

Variables

bool xsLockConfig
 Variable to lock or unlock writing of configuration variables. More...
 

Detailed Description

Access provides 'introspective' access to process variables.

There are two sets of functions. Functions which just take pointers to buffers, and functions which accept DataBuffers.

Access to virtual variables is transparent.

Definition in file access.h.

Function Documentation

bool xsRead ( int  varID,
void *  target,
int  size 
)

Reads variable into target buffer from variable structure.

Parameters
varIDThe variable to read
targetThe target buffer to fill
sizeThe size of the buffer.
Return values
trueSuccess
falseFailure, check err module for more information.

Definition at line 60 of file access.c.

bool xsReadDB ( int  varID,
DataBuffer target 
)

Reads variable into target data buffer from variable structure.

Parameters
varIDThe variable to read
targetThe target data buffer to fill
Return values
trueSuccess
falseFailure, check err module for more information.

Definition at line 149 of file access.c.

bool xsVarExists ( int  varID)

Returns whether or not the specified variable exists.

Parameters
varIDThe variable ID
Return values
trueIt exists
falseIts not known to the embedded software

Definition at line 139 of file access.c.

bool xsWrite ( int  varID,
void *  source,
int  size 
)

Writes variable from target buffer into variable structure.

Parameters
varIDThe variable to read
targetThe target buffer to fill
sizeThe size of the buffer.
Return values
trueSuccess
falseFailure, check err module for more information.

Definition at line 78 of file access.c.

bool xsWriteDB ( int  varID,
DataBuffer source 
)

Writes variable from target data buffer into variable structure.

Parameters
varIDThe variable to read
targetThe target data buffer to fill
Return values
trueSuccess
falseFailure, check err module for more information.

Definition at line 218 of file access.c.

Variable Documentation

bool xsLockConfig

Variable to lock or unlock writing of configuration variables.

When attempting to write a configuration variable and illegal state will be returned.