Main Page | File List | File Members

lbCondDb.ctl File Reference


Functions

void lbCondDb_init ()
void lbCondDb_subscribeCmnd ()
void lbCondDb_createDPTcmd ()
 lbCondDb_subscribeSrv ()
void lbCondDb_createDPTfolders ()
void lbCondDb_createDPT_XML ()
void lbCondDb_createDPTcond ()
void lbCondDb_createDPTrun ()
void lbCondDb_createDPTFwConditionsInfo ()
int lbCondDb_getCondDBnodes (dyn_string &folders, dyn_string &conditions)
int lbCondDb_getCondDBsrv_status ()
string lbCondDB_getParent (string folder_path)
string lbCondDB_getFolderName (string path)
string lbCondDb_validateFolder (string fldr)
bool lbCondDb_addCondition (string cond_name, string fldr_name, dyn_string parameters, int type, int timeUp, dyn_int params_type, dyn_int params_value, string &error)
bool lbCondDb_createCondition (string cond_name, string fldr_name, dyn_string parameters, int type, int timeUp, dyn_int params_type, dyn_int params_value, string &error)
string lbCondDb_getXMLCondition (string condName)
void lbCondDb_stopCondition (string condName)
void lbCondDb_startCondition (string condName)
dyn_string lbCondDb_getLocalCond ()
int getLastPos (string or, string sch)
string translate_type (string dp)
string translate_format (string dp)

Detailed Description

A library including the necessary functions to define conditions to be stored in the online CondDB.

Creation Date
23/9/2007
Author:
Maria del Carmen Barandela

Function Documentation

bool lbCondDb_addCondition string  cond_name,
string  fldr_name,
dyn_string  parameters,
int  type,
int  timeUp,
dyn_int  params_type,
dyn_int  params_value,
string &  error
 

This function creates a condition. Returns false when a condition can not be added, true in any other case. The requested function parameters:

  • con_name: is the condition name, can not be an empty string.
  • fldr_name: is the folder paht in the condDB in which the condition will be stored. It can not be an empty string and must be a right folder paht in the condDB.
  • parameters: contains all the parameters of the condition. It can not be an empty dyn_string and each parameter must represent an existing dpe.
  • type: must be a value between 0 and 6.
  • timeUp: is the period in time(seconds) in wich the condition is store into the DB. It must be a numeric value.
  • params_type: contains the type of the update procedure of each parameter. It can be:
    • 0 => No updte type.
    • 1 => Relative value
    • 2 => Absolute value
    • 3 => Old/New comparison
  • params_value: contains the absolute or relative value of the corresponding update type of each parameter.
  • error: contains the error description in the case the function fails.

Usage
Public

void lbCondDb_createDPT_XML  ) 
 

Creates the data point used to store de XML string of a selected condition.

Usage
Private
PVSS managers
DIM manager

void lbCondDb_createDPTcmd  ) 
 

Creates the datapoint needed to subscribe de DIM command.

Usage
Private
PVSS managers
DIM manager

void lbCondDb_createDPTcond  ) 
 

Creates the DPT used to recive the data of the Conditions service.

Usage
Private
PVSS managers
DIM manager

void lbCondDb_createDPTfolders  ) 
 

creates the DPT used to recive the data of the Folder service.

Usage
Private
PVSS managers
DIM manager

void lbCondDb_createDPTFwConditionsInfo  ) 
 

Creates de DPT used to store the information about a defined condition.

Usage
Private
PVSS managers
DIM manager

void lbCondDb_createDPTrun  ) 
 

Creates de data point used to received the Run Number service data.

Usage
Private
PVSS managers
DIM manager

int lbCondDb_getCondDBnodes dyn_string &  folders,
dyn_string &  conditions
 

Gets all the availables nodes in the conditions database: the folders and the existing conditions in those folders.

If no errors this function returns 0, -1 in any other case.

Usage
Public
PVSS managers
DIM manager

int lbCondDb_getCondDBsrv_status  ) 
 

Returns the status of the CondDB server. This is a DIM Server wich publishes the available nodes in the Conditions database.

If the server is not running is not posible to get the existing nodes.

If no errors this function returns 0, -1 in any other case.

Usage
Public
PVSS managers
DIM manager

string lbCondDB_getFolderName string  path  ) 
 

Returns the last name in a folder path.

Usage
Public

dyn_string lbCondDb_getLocalCond  ) 
 

Gets all the conditions defined localy.

Usage
Public

string lbCondDB_getParent string  folder_path  ) 
 

Returns the path to a given folder, folder ser or condition.

Usage
Public

string lbCondDb_getXMLCondition string  condName  ) 
 

Generates the XML object that represent the given condition name.

Usage
Public

void lbCondDb_init  ) 
 

This function create the needed data points and subscribes the necesary comands and services.

Usage
Public
PVSS managers
DIM manager

void lbCondDb_startCondition string  condName  ) 
 

Starts the update of the condition with name condName.

Usage
Public

void lbCondDb_stopCondition string  condName  ) 
 

Stops the condition wht the name condName

Usage
Public

void lbCondDb_subscribeCmnd  ) 
 

Subscribe to the comand which sends the conditions to the DIM server.

Usage
Public
PVSS managers
DIM manager

lbCondDb_subscribeSrv  ) 
 

Subscribe the PVSS client to two DIM services, one wich publishes the folder of the condDB and the other wich publish the conditions names stored in the condDB.

Usage
Public
PVSS managers
DIM manager

string lbCondDb_validateFolder string  fldr  ) 
 

Validates if the given folder path is a right one to create a new condition.

If everything is ok it returns an empty string, in any other case, the funcion returns an error message explaining the cause of the failure.

Usage
Public


Generated on Fri Apr 25 16:21:19 2008 for lbCondDB by  doxygen 1.3.9.1