Main Page | Directories | File List | File Members

confDB.h File Reference


Defines

#define EXTERN_CONFDB

Functions

EXTERN_CONFDB int DBConnexion (char *server, char *usr, char *pwd, char *ErrMess)
EXTERN_CONFDB int DBDeconnexion (char *ErrMess)
EXTERN_CONFDB int GetDeviceTypeRow (char *systemname, char *devitype, int &len_devtype, char *devtype_result, char *ErrMess)
EXTERN_CONFDB int GetDeviceRow_devicename (char *systemname, char *deviname, int &len_device, char *device_result, char *ErrMess)
EXTERN_CONFDB int GetDeviceRow_devid (char *systemname, int deviceID, int &len_device, char *device_result, char *ErrMess)
EXTERN_CONFDB int GetPortRow_pid (char *systemname, int portID, int &len_port, char *port_row_result, char *ErrMess)
EXTERN_CONFDB int GetPortRow_devid (char *systemname, int deviceID, int port_nbr, int &len_port, char *port_row_result, char *ErrMess)
EXTERN_CONFDB int GetConnectivityRow_lkid (char *systemname, int lkID, int &len_conn, char *Conn_row, char *ErrMess)
EXTERN_CONFDB int GetConnectivityRow_node (char *systemname, int node_name, int port_nb, int way, int &len_conn, char *Conn_row, char *ErrMess)
EXTERN_CONFDB int GetMacIPRow (char *systemname, char *Mac_address, int &len_mac, char *MacIP_row, char *ErrMess)
EXTERN_CONFDB int GetLkTypeRow_lkname (char *systemname, char *lktype_name, int &len_lktype, char *LkType_row, char *ErrMess)
EXTERN_CONFDB int GetLkTypeRow_lknb (char *systemname, int lktype_nbr, int &len_lktype, char *LkType_row, char *ErrMess)
EXTERN_CONFDB int GetDeviceNamesPerType (char *systemname, char *devitype, int &len_array, char *devIDs_list, char *ErrMess)
EXTERN_CONFDB int GetLkFromDevID (char *systemname, int node_from, int &len_array, int *lkfrom_list, char *ErrMess)
EXTERN_CONFDB int GetLkToDevID (char *systemname, int node_to, int &len_array, int *lkfrom_list, char *ErrMess)
EXTERN_CONFDB int GetPortIDPerDevID (char *systemname, int devID, int &len_array, int *portID_list, char *ErrMess)
EXTERN_CONFDB int GetDeviceIDsPerType (char *systemname, char *devitype, int &len_array, int *devIDs_list, char *ErrMess)
EXTERN_CONFDB int GetMacAddPerDevID (char *systemname, int devID, int &len_mac, char *MacAdd_list, char *ErrMess)
EXTERN_CONFDB int GetDestinationNamePerDevPort (char *systemname, char *devname, int port_nb, int &len_mac, char *Destin_list, char *ErrMess)
EXTERN_CONFDB int GetFreeDeviceNamesPerType (char *systemname, char *devitype, int &len_array, char *devIDs_list, char *ErrMess)
EXTERN_CONFDB int InsertMultipleDeviceTypes (char *systemname, char *devicetype, int nbrofinput, int nbrofoutput, char *description, int first_time, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertMultipleDevices (char *systemname, char *devicename, char *devicetype, int node, int promiscuous_mode, int nodeused, char *uuid, char *bar_code, int first_time, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertMultipleSimpleLinkTypes (char *systemname, char *link_name, int first_time, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertMultipleCompositeLinkTypes (char *systemname, char *link_name, char *simple_lk_list, int first_time, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertMultipleLinks (char *systemname, char *node_from, char *node_to, int port_nbrfrom, int port_nbrto, int lkused, char *link_type, int bidirectional_link_used, char *trunk_lkadd, int trunk_lk, int first_time, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertMultiplePorts (char *systemname, char *devicename, int port_nbr, int rxfc, int txfc, int speed1, int speed2, int speed3, int port_management, char *wire_sense, char *phy, int force_speed, int bmc_booting, int primary_interface, int traffic_type_supported, int first_time, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertMultipleMacIPs (char *systemname, char *ethernet_add, char *ip_add, char *subnet_mask, char *vlan_prefix, char *ipname, int lkaggreg, char *devicename, int port_nb, int first_time, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertDeviceType (char *systemname, char *devicetype, int nbrfofinput, int nbrofoutput, char *description, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertDevice (char *systemname, char *devicename, char *devicetype, int node, int promiscuous_mode, int nodeused, char *uuid, char *bar_code, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertSimpleLinkType (char *systemname, char *link_name, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertCompositeLinkType (char *systemname, char *link_name, char *simple_lk_list, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertPort (char *systemname, char *devicename, int port_nbr, int rxfc, int txfc, int speed1, int speed2, int speed3, int port_management, char *wire_sense, char *phy, int force_speed, int bmc_booting, int primary_interface, int traffic_type_supported, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertMacIP (char *systemname, char *ETHERNET_ADD, char *ip_add, char *subnet_mask, char *vlan_prefix, char *ipname, int lkaggreg, char *devicename, int port_nb, int last_rows, char *ErrMess)
EXTERN_CONFDB int InsertLink (char *systemname, char *node_from, char *node_to, int port_nbrfrom, int port_nbrto, int lkused, char *link_type, int bidirectional_link_used, char *trunk_lkadd, int trunk_lk, int last_rows, char *ErrMess)
EXTERN_CONFDB int GetDeviceName_deviceid (char *systemname, int deviceID, char *devicename, char *ErrMess)
EXTERN_CONFDB int GetDeviceID_devicename (char *systemname, char *deviname, int &deviceID, char *ErrMess)
EXTERN_CONFDB int GetDetailedConnectivityBetweenDevices (char *systemname, char *dev_from, char *dev_to, char *nfrom_list, int &len_array, int &nfrom_arraylen, int &nto_arraylen, int *pfrom_list, int *pto_list, char *nto_list, int *pathid_list, int *link_pos_list, char *ErrMess)
EXTERN_CONFDB int GetConnectivityBetweenDevices (char *systemname, char *dev_from, char *dev_to, int &len_array, int *pfrom_list, int *pto_list, int *pathid_list, char *ErrMess)
EXTERN_CONFDB int GetConnOutBetweenDeviceDeviceType (char *systemname, char *dev_from, char *devtype, int &len_array, int *pfrom_list, char *ErrMess)
EXTERN_CONFDB int GetDetailedConnBetweenDeviceDevType (char *systemname, char *dev_from, char *devto_type, int devto_type_given, char *nfrom_list, int &len_array, int &nfrom_arraylen, int &nto_arraylen, int *pfrom_list, int *pto_list, char *nto_list, int *pathid_list, int *link_pos_list, char *ErrMess)
EXTERN_CONFDB int CreateDestinationTable (char *systemname, char *devicename, int round_trip_max, char *ErrMess)
EXTERN_CONFDB int CreateRoutingTable (char *systemname, char *devicename, int round_trip_max, char *ErrMess)
EXTERN_CONFDB int MatchDeviceIDDeviceName (char *systemname, int &len_did, int *devid_list, int &len_dname, char *devname_list, char *ErrMess)
EXTERN_CONFDB int CreateTableSchema (char *systemname, int mac_table, int port_table, int boot_image_table, int generic_schema, char *ErrMess)
EXTERN_CONFDB int DropTableSchema (char *systemname, char *ErrMess)
EXTERN_CONFDB int GetAllPathsPerDevice (char *systemname, char *devicename, int &len_array, int *lkid_list, int *pathid_list, int *link_pos_list, char *ErrMess)
EXTERN_CONFDB int LoadConnectivityTable (char *systemname, int &len_array, int *lkid_list, int *node_from_list, int *node_to_list, int *port_nbrfrom_list, int *port_nbrto_list, int *bidirectional_list, int *lkused_list, int *lktype_list, char *ErrMess)
EXTERN_CONFDB int GetCPUDBTime (char *servicename, int &len_statres, double *statname_result)
EXTERN_CONFDB int LoadDeviceTypeTable (char *systemname, int &len_did, char *devtypename_list, char *ErrMess)
EXTERN_CONFDB int LoadLinkTypeTable (char *systemname, int &len_lkid, int *lkid_list, int &len_lkname, char *lktypename_list, char *ErrMess)

Define Documentation

#define EXTERN_CONFDB
 


Function Documentation

EXTERN_CONFDB int CreateDestinationTable char *  systemname,
char *  devicename,
int  round_trip_max,
char *  ErrMess
 

create the destination table (IP,MAC table ) of the given device in your DB schema, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
devicename :devicename
round_trip_max : maximum path length put 0 if you want the default value (10)
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int CreateRoutingTable char *  systemname,
char *  devicename,
int  round_trip_max,
char *  ErrMess
 

create the forwarding table (IP,MAC table ) of the given device in your DB schema, returning an integer value. The user should manage the memory : there is no memory allocation. you need a mac and a port table to use this function.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
devicename :devicename
round_trip_max : maximum path length put 0 if you want the default value (10)
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int CreateTableSchema char *  systemname,
int  mac_table,
int  port_table,
int  boot_image_table,
int  generic_schema,
char *  ErrMess
 

create the tables, indexes and constraints in your DB schema, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
mac_table : 1 if you need a MAC/IP table you need grant execute if you have your own db account
port_table : 1 if you need a port table (mandatory if mac_table=1)
boot_image_table : 1 if you need a boot image table
generic_schema : 1 to get the basic schema (mandatory the first time)
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int DBConnexion char *  server,
char *  usr,
char *  pwd,
char *  ErrorMessage
 

Connect to the database returning an integer value.

Parameters:
server : name of the database.
usr : user login.
pwd : user password.
ErrorMessage : error message in case of failure
Returns:
0 if the disconnection is successful

EXTERN_CONFDB int DBDeconnexion char *  ErrorMessage  ) 
 

Disconnect from the database returning an integer value.

Parameters:
ErrorMessage : error message in case of failure
Returns:
0 if the disconnection is successful

EXTERN_CONFDB int DropTableSchema char *  systemname,
char *  ErrMess
 

drop the tables, indexes and constraints in your DB schema, returning an integer value. The user should manage the memory : there is no memory allocation. you need grant execute if you have your own db account once the schema is dropped you will loose all your data: to use with precaution

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetAllPathsPerDevice char *  systemname,
char *  devicename,
int &  len_array,
int *  lkid_list,
int *  pathid_list,
int *  link_pos_list,
char *  ErrMess
 

Get the path going through a given device returning an integer value. The user should manage the memory : there is no memory allocation. you need grant execute if you have your own db account

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
devicename : name of the device
len_array : length of the lkid_list (which is equal to pathid_list,link_pos_list ) you have allocated. If the int * buffer is too small, we put the size needed here.
lkid_list : list of the lkid
pathid_list : list of the pathid
link_pos_list : position of the link in the path (start with 1) NB: the i-th entry of the lkid_list,pathid_list and link_pos_list corresponds to one link of the path
ErrMess : error message in case of failure (even NO_ROWS_SELECTED for no result)
Returns:
0 if it is successful

EXTERN_CONFDB int GetConnectivityBetweenDevices char *  systemname,
char *  dev_from,
char *  dev_to,
int &  len_array,
int *  pfrom_list,
int *  pto_list,
int *  pathid_list,
char *  ErrMess
 

Get the path (just the first and last link details) between dev_from and dev_to, returning an integer value. The user should manage the memory : there is no memory allocation. you need grant execute if you have your own db account

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
dev_from : name of the device 1 (ex. THOR_00)
dev_to : name of the device 2 (ex. ECAL_L1FE06_00_00)
len_array : length of the pfrom_list (which is equal to pto_list,pathid_list) you have allocated. If the int * buffer is too small, we put the size needed here.
pfrom_list : list of the port from numbers
pto_list : list of the port to numbers
pathid_list : list of the pathid
ErrMess : error message in case of failure (even NO_ROWS_SELECTED for no result)
Returns:
0 if it is successful

EXTERN_CONFDB int GetConnectivityRow_lkid char *  systemname,
int  lkID,
int &  len_conn,
char *  Conn_row,
char *  ErrorMessage
 

Get the link row in Conn_row, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
lkID : lkID of the link
len_conn : length of the Conn_row. If the buffer is too small, we put the size needed here.
Conn_row :char* buffer where to put the result
Conn_row : formatted as follows |db_column_name (db_column_type):db_column_value|
Conn_row : db_column_type is I for int and C for char*
Conn_row : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetConnectivityRow_node char *  systemname,
int  node_name,
int  port_nb,
int  way,
int &  len_conn,
char *  Conn_row,
char *  ErrorMessage
 

Get the link row in Conn_row, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
node_name : deviceid of the device
port_nb : port_nb of the device
way : 1 if the deviceID corresponds to the start of the link otherwise it's considered as the end of the link
len_conn : length of the Conn_row. If the buffer is too small, we put the size needed here.
Conn_row :char* buffer where to put the result
Conn_row : formatted as follows |db_column_name (db_column_type):db_column_value|
Conn_row : db_column_type is I for int and C for char*
Conn_row : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetConnOutBetweenDeviceDeviceType char *  systemname,
char *  dev_from,
char *  devtype,
int &  len_array,
int *  pfrom_list,
char *  ErrMess
 

Get the port nbs out between dev_from and devtype, returning an integer value. The user should manage the memory : there is no memory allocation. you need grant execute if you have your own db account

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
dev_from : name of the device 1 (ex. THOR_00)
devtype : name of a devicetype (ex. ECAL_L1FE)
len_array : length of the pfrom_list you have allocated. If the int * buffer is too small, we put the size needed here.
pfrom_list : list of the port from numbers
ErrMess : error message in case of failure (even NO_ROWS_SELECTED for no result)
Returns:
0 if it is successful

EXTERN_CONFDB int GetCPUDBTime char *  servicename,
int &  len_statres,
double *  statname_result
 

EXTERN_CONFDB int GetDestinationNamePerDevPort char *  systemname,
char *  devname,
int  port_nb,
int &  len_mac,
char *  Destin_list,
char *  ErrorMessage
 

Get the list of possible destination by devicename,port_nb, returning an integer value. The user should manage the memory : there is no memory allocation. case sensitive

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
devname : device name ex:"THOR_00" : port nb of the device 4
len_mac : length of the MacAdd_list. If the buffer is too small, we put the size needed here.
Destin_list : char* buffer where to put the result : the different ethernet adds are separated by |
Destin_list : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetDetailedConnBetweenDeviceDevType char *  systemname,
char *  dev_from,
char *  devto_type,
int  devto_type_given,
char *  nfrom_list,
int &  len_array,
int &  nfrom_arraylen,
int &  nto_arraylen,
int *  pfrom_list,
int *  pto_list,
char *  nto_list,
int *  pathid_list,
int *  link_pos_list,
char *  ErrMess
 

Get the path details between dev_from and dev_to, returning an integer value. The user should manage the memory : there is no memory allocation. you need grant execute if you have your own db account

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
dev_from : name of the device 1 (ex. THOR_00)
dev_to : name of the device 2 (ex. ECAL_L1FE)
devto_type_given : 1 if it's the device type you gave, 0 if it's the list of devicename which is similar to 'devto_type_given'
nfrom_list : list of the devices which start the link (separated by '')
len_array : length of the pfrom_list (which is equal to pto_list,pathid_list and link_pos_list) you have allocated. If the int * buffer is too small, we put the size needed here.
nfrom_arraylen : length of the nfrom_list you have allocated. If the char * buffer is too small, we put the size needed here.
nto_arraylen : length of the nto_list you have allocated. If the char * buffer is too small, we put the size needed here.
pfrom_list : list of the port from numbers
pto_list : list of the port to numbers
nto_list : list of the devices which end the link
pathid_list : list of the pathid
link_pos_list : position of the link in the path (start with 1)
ErrMess : error message in case of failure (even NO_ROWS_SELECTED for no result) NB: the i-th entry of the nfrom_list,pfrom_list,nto_list,pto_list,pathid_list and link_pos_list corresponds to one link of the path
Returns:
0 if it is successful

EXTERN_CONFDB int GetDetailedConnectivityBetweenDevices char *  systemname,
char *  dev_from,
char *  dev_to,
char *  nfrom_list,
int &  len_array,
int &  nfrom_arraylen,
int &  nto_arraylen,
int *  pfrom_list,
int *  pto_list,
char *  nto_list,
int *  pathid_list,
int *  link_pos_list,
char *  ErrMess
 

Get the path details between dev_from and dev_to, returning an integer value. The user should manage the memory : there is no memory allocation. you need grant execute if you have your own db account

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
dev_from : name of the device 1 (ex. THOR_00)
dev_to : name of the device 2 (ex. ECAL_L1FE)
devto_type_given : 1 if it's the device type you gave, 0 if it's the list of devicename which is similar to 'devto_type_given'
nfrom_list : list of the devices which start the link (separated by '')
len_array : length of the pfrom_list (which is equal to pto_list,pathid_list and link_pos_list) you have allocated. If the int * buffer is too small, we put the size needed here.
nfrom_arraylen : length of the nfrom_list you have allocated. If the char * buffer is too small, we put the size needed here.
nto_arraylen : length of the nto_list you have allocated. If the char * buffer is too small, we put the size needed here.
pfrom_list : list of the port from numbers
pto_list : list of the port to numbers
nto_list : list of the devices which end the link
pathid_list : list of the pathid
link_pos_list : position of the link in the path (start with 1) NB: the i-th entry of the nfrom_list,pfrom_list,nto_list,pto_list,pathid_list and link_pos_list corresponds to one link of the path
ErrMess : error message in case of failure (even NO_ROWS_SELECTED for no result)
Returns:
0 if it is successful

EXTERN_CONFDB int GetDeviceID_devicename char *  systemname,
char *  deviname,
int &  deviceID,
char *  ErrorMessage
 

Get the deviceid of the given device name in deviceID, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
deviname : device name: it's case sensitive.
deviceID : deviceID (to use if return value is 0) always>0
deviceID is set -1 if no matching device is found
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetDeviceIDsPerType char *  systemname,
char *  devitype,
int &  len_array,
int *  devIDs_list,
char *  ErrorMessage
 

Get the list of deviceIDs of the given device type, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
devitype : device type name
len_array : length of the devIDs_list. If the buffer is too small, we put the size needed here.
devIDs_list : int* buffer where to put the result (list of deviceIDs)
devIDs_list : equals to (-1,-1) if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetDeviceName_deviceid char *  systemname,
int  deviceID,
char *  devicename,
char *  ErrorMessage
 

Get the devicename corresponding to the given deviceID in devicename, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
deviceID : deviceID always>0
devicename : device name (return); Error if failed
devicename:if nothing is found, devicename is set to NO_ROWS_SELECTED
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetDeviceNamesPerType char *  systemname,
char *  devitype,
int &  len_array,
char *  devIDs_list,
char *  ErrorMessage
 

Get the list of devicename of the given device type, and returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
devitype : device type name
len_array : length of the devIDs_list. If the buffer is too small, we put the size needed here.
devIDs_list : char* buffer where to put the result (list of deviceNames) separated by a |
devIDs_list : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetDeviceRow_devicename char *  systemname,
char *  deviname,
int &  len_device,
char *  device_result,
char *  ErrorMessage
 

Get the row of the given device name in device_result, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
deviname : device name: it's case sensitive.
len_device : length of the devtype_result. If the buffer is too small, we put the size needed here.
device_result :char* buffer where to put the result
device_result : formatted as follows |db_column_name (db_column_type):db_column_value|
device_result : db_column_type is I for int and C for char*
device_result : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetDeviceRow_devid char *  systemname,
int  deviceID,
int &  len_device,
char *  device_result,
char *  ErrorMessage
 

Get the row of the given deviceID of the device in device_result, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
deviceID : deviceID of the device
len_device : length of the devtype_result. If the buffer is too small, we put the size needed here.
device_result :char* buffer where to put the result
device_result : formatted as follows |db_column_name (db_column_type):db_column_value|
device_result : db_column_type is I for int and C for char*
device_result : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetDeviceTypeRow char *  systemname,
char *  devitype,
int &  len_devtype,
char *  devtype_result,
char *  ErrorMessage
 

Get the row of the given device type in devtype_result, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
devitype : device type name: it's CASE SENSITIVE.
len_devtype : length of the devtype_result. If the buffer is too small, we put the size needed here.
devtype_result :char* buffer where to put the result
devtype_result : formatted as follows |db_column_name (db_column_type):db_column_value|
devtype_result : db_column_type is I for int and C for char*
devtype_result : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetFreeDeviceNamesPerType char *  systemname,
char *  devitype,
int &  len_array,
char *  devIDs_list,
char *  ErrorMessage
 

Get the list of free devices of the given device type, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
devitype : device type name
len_array : length of the devIDs_list. If the buffer is too small, we put the size needed here.
devIDs_list : char* buffer where to put the result (list of deviceIDs)
devIDs_list : NO_ROWS_SELECTED is set in case there is no free devices
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetLkFromDevID char *  systemname,
int  node_from,
int &  len_array,
int *  lkfrom_list,
char *  ErrorMessage
 

Get the list of LkID which start from the given deviceID, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
node_from : deviceID
len_array : length of the lkfrom_list. If the buffer is too small, we put the size needed here.
lkfrom_list : int* buffer where to put the result (list of deviceIDs)
lkfrom_list : equals to (-1,-1) if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetLkToDevID char *  systemname,
int  node_to,
int &  len_array,
int *  lkfrom_list,
char *  ErrorMessage
 

Get the list of LkID which end at the given deviceID, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
node_to : deviceID
len_array : length of the lkfrom_list. If the buffer is too small, we put the size needed here.
lkfrom_list : int* buffer where to put the result (list of deviceIDs)
lkfrom_list : equals to (-1,-1) if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetLkTypeRow_lkname char *  systemname,
char *  lktype_name,
int &  len_lktype,
char *  LkType_row,
char *  ErrorMessage
 

Get the link type row in LkType_row, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
lktype_name :link type name about which you want to get some info
len_lktype : length of the LkType_row. If the buffer is too small, we put the size needed here.
LkType_row,: char* buffer where to put the result
LkType_row,: formatted as follows |db_column_name (db_column_type):db_column_value|
LkType_row : db_column_type is I for int and C for char*
LkType_row : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetLkTypeRow_lknb char *  systemname,
int  lktype_nbr,
int &  len_lktype,
char *  LkType_row,
char *  ErrorMessage
 

Get the link type row in LkType_row,returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
lktype_nbr :link type id about which you want to get some info
len_lktype : length of the LkType_row. If the buffer is too small, we put the size needed here.
LkType_row,: char* buffer where to put the result
LkType_row,: formatted as follows |db_column_name (db_column_type):db_column_value|
LkType_row : db_column_type is I for int and C for char*
LkType_row : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetMacAddPerDevID char *  systemname,
int  devID,
int &  len_mac,
char *  MacAdd_list,
char *  ErrorMessage
 

Get the list of ethernet of the given deviceID, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
devID : deviceID
len_mac : length of the MacAdd_list. If the buffer is too small, we put the size needed here.
MacAdd_list : char* buffer where to put the result : the different ethernet adds are separated by |
MacAdd_list : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetMacIPRow char *  systemname,
char *  Mac_address,
int &  len_mac,
char *  MacIP_row,
char *  ErrorMessage
 

Get the mac row in MacIP_row, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
Mac_address : ethernet address about which you want to get some info
len_mac : length of the MacIP_row. If the buffer is too small, we put the size needed here.
MacIP_row:char* buffer where to put the result
MacIP_row,: formatted as follows |db_column_name (db_column_type):db_column_value|
MacIP_row : db_column_type is I for int and C for char*
MacIP_row : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetPortIDPerDevID char *  systemname,
int  devID,
int &  len_array,
int *  portID_list,
char *  ErrorMessage
 

Get the list of portID of the given deviceID, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
devID : deviceID
len_array : length of the portID_list. If the buffer is too small, we put the size needed here.
portID_list : int* buffer where to put the result (list of deviceIDs)
portID_list : equals to (-1,-1) if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetPortRow_devid char *  systemname,
int  deviceID,
int  port_nbr,
int &  len_port,
char *  port_row_result,
char *  ErrorMessage
 

Get the port row in port_row_result, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
deviceID : deviceID of the device
port_nbr : port nb of the device
len_port : length of the port_row_result. If the buffer is too small, we put the size needed here.
port_row_result :char* buffer where to put the result
port_row_result : formatted as follows |db_column_name (db_column_type):db_column_value|
port_row_result : db_column_type is I for int and C for char*
port_row_result : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int GetPortRow_pid char *  systemname,
int  portID,
int &  len_port,
char *  port_row_result,
char *  ErrorMessage
 

Get the port row in port_row_result, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "DAQ_".
portID : portID of the device
len_port : length of the port_row_result. If the buffer is too small, we put the size needed here.
port_row_result :char* buffer where to put the result
port_row_result : formatted as follows |db_column_name (db_column_type):db_column_value|
port_row_result : db_column_type is I for int and C for char*
port_row_result : equals to "NO_ROWS_SELECTED" if no rows selected
ErrorMessage : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertCompositeLinkType char *  systemname,
char *  link_name,
char *  simple_lk_list,
int  last_rows,
char *  ErrMess
 

Insert a Composite Link Type, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
link_name : name of the link type
simple_lk_list : name of the simple_lk_list
last_rows : 1 if it's your last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertDevice char *  systemname,
char *  devicename,
char *  devicetype,
int  node,
int  promiscuous_mode,
int  nodeused,
char *  uuid,
char *  bar_code,
int  last_rows,
char *  ErrMess
 

Insert a device returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
devicename : name of the device
devicetype : name of the devicetype
node,: 1 if it's a host node (usually starts or ends a path such as L1FEs) , 0 otherwise.
promiscuous_mode : 1 if put in this mode (default mode), 0 otherwise
nodeused : 1 if this node is used in the configuration, 0 otherwise
uuid : uuid of the device
bar_code : barcode of the device
last_rows : 1 if it's your last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertDeviceType char *  systemname,
char *  devicetype,
int  nbrofinput,
int  nbrofoutput,
char *  description,
int  last_rows,
char *  ErrMess
 

Insert a device type , returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
devicetype : name of the devicetype
nbrofinput,: nb of input ports
nbrofinput,: nb of output ports
description : some description about the component max size 500 characters.
last_rows : 1 if it's your last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertLink char *  systemname,
char *  node_from,
char *  node_to,
int  port_nbrfrom,
int  port_nbrto,
int  lkused,
char *  link_type,
int  bidirectional_link_used,
char *  trunk_lkadd,
int  trunk_lk,
int  last_rows,
char *  ErrMess
 

Insert a Link returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
node_from : name of the device starting the link
node_to : name of the device ending the link
port_nbrfrom : port nb of the device from
port_nbrto : port nb of the device to
lkused : 1 if the link is used in the configuration, 0 otherwise
link_type : name of the link type
bidirectional_link_used : 1 if it's a bidirectional link, 0 otherwise
trunk_lkadd : trunk link address if the link is part of an link aggregation, put "none", otherwise.
trunk_lk : 0 if the link is NOT truncated, otherwise 1.
last_rows : 1 if it's your last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertMacIP char *  systemname,
char *  ethernet_add,
char *  ip_add,
char *  subnet_mask,
char *  vlan_prefix,
char *  ipname,
int  lkaggreg,
char *  devicename,
int  port_nb,
int  last_rows,
char *  ErrMess
 

Insert a MAC entry, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
ethernet_add 
ip_add 
subnet_mask 
vlan_prefix 
ipname 
lkaggreg :1 if the link is aggregated, 0 otherwise
devicename : name of the device
port_nbr : port nb
last_rows,: 1 if it's your last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertMultipleCompositeLinkTypes char *  systemname,
char *  link_name,
char *  simple_lk_list,
int  first_time,
int  last_rows,
char *  ErrMess
 

Insert a Composite Link Type, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
link_name : name of the link type (such as "Mixed_Data")
simple_lk_list : name of the link types which compose the composite link, separated by ","
simple_lk_list :ex. Mixed_Data is composed of HLT_Data and L1_Data, so simple_lk_list="HLT_Data,L1_Data"
first_time : 1 if it's your CompositeLinkType first insert (save it into the database), 0 otherwise
last_rows : 1 if it's your CompositeLinkType last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertMultipleDevices char *  systemname,
char *  devicename,
char *  devicetype,
int  node,
int  promiscuous_mode,
int  nodeused,
char *  uuid,
char *  bar_code,
int  first_time,
int  last_rows,
char *  ErrMess
 

Insert a device returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
devicename : name of the device
devicetype : name of the devicetype
node : 1 if it's a host node (usually starts or ends a path such as L1FEs) , 0 otherwise.
promiscuous_mode : 1 if put in this mode (default mode), 0 otherwise
nodeused : 1 if this node is used in the configuration, 0 otherwise
uuid : uuid of the device
bar_code : barcode of the device
first_time : 1 if it's your first MultipleDevice insert (save it into the database), 0 otherwise
last_rows : 1 if it's your MultipleDevice last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertMultipleDeviceTypes char *  systemname,
char *  devicetype,
int  nbrofinput,
int  nbrofoutput,
char *  description,
int  first_time,
int  last_rows,
char *  ErrMess
 

Insert a device type , returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
devicetype : name of the devicetype
nbrofinput : nb of input ports
nbrofinput : nb of output ports
description : some description about the component max size 500 characters.
first_time : 1 if it's your MultipleDeviceType first insert (save it into the database), 0 otherwise
last_rows : 1 if it's your MultipleDeviceType last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertMultipleLinks char *  systemname,
char *  node_from,
char *  node_to,
int  port_nbrfrom,
int  port_nbrto,
int  lkused,
char *  link_type,
int  bidirectional_link_used,
char *  trunk_lkadd,
int  trunk_lk,
int  first_time,
int  last_rows,
char *  ErrMess
 

Insert Multiple Link returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
node_from : name of the device starting the link
node_to : name of the device ending the link
port_nbrfrom : port nb of the device from
port_nbrto : port nb of the device to
lkused : 1 if the link is used in the configuration, 0 otherwise
link_type : name of the link type
bidirectional_link_used : 1 if it's a bidirectional link, 0 otherwise
trunk_lkadd : trunk link address if the link is part of an link aggregation, put "none", otherwise.
trunk_lk : 0 if the link is NOT truncated, otherwise 1.
first_time : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise
last_rows : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertMultipleMacIPs char *  systemname,
char *  ethernet_add,
char *  ip_add,
char *  subnet_mask,
char *  vlan_prefix,
char *  ipname,
int  lkaggreg,
char *  devicename,
int  port_nb,
int  first_time,
int  last_rows,
char *  ErrMess
 

Insert a MAC entry, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
ethernet_add 
ip_add 
subnet_mask 
vlan_prefix 
ipname 
lkaggreg :1 if the link is aggregated, 0 otherwise
devicename : name of the device
port_nbr : port nb
first_time : 1 if it's your first MacIP insert (save it into the database), 0 otherwise
last_rows : 1 if it's your last MacIP insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertMultiplePorts char *  systemname,
char *  devicename,
int  port_nbr,
int  rxfc,
int  txfc,
int  speed1,
int  speed2,
int  speed3,
int  port_management,
char *  wire_sense,
char *  phy,
int  force_speed,
int  bmc_booting,
int  primary_interface,
int  traffic_type_supported,
int  first_time,
int  last_rows,
char *  ErrMess
 

Insert Multiple Ports, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
devicename : name of the device
port_nbr : port nb
rxfc : 1 if you allow receiver flow control, 0 otherwise
txfc : 1 if you allow transceiver flow control, 0 otherwise
speed1 : speed of the port
speed2 : speed of the port (second possible)
speed3 : speed of the port (third possible)
port_management : 1 if it's a management port
wire_sense : possible values :"SWITCH/SWITCH","AUTOSENSE","SWITCH/COMPUTER"
phy,: possible values :"SX","T","SL"
force_speed : 1 if you allow the force speed option, 0 otherwise
bmc_booting : 1 if the port is the bmc_booting one, 0 otherwise
primary_interface : (0 or 1), 1 if the port is the primary interface
traffic_type_supported : (0 or 1), 1 if the port is independant of the type of data (i.e. it can support for instance L1 data or HLT data)
first_time : 1 if it's your first Port insert (save it into the database), 0 otherwise
last_rows : 1 if it's your last Port insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertMultipleSimpleLinkTypes char *  systemname,
char *  link_name,
int  first_time,
int  last_rows,
char *  ErrMess
 

Insert a Simple Link Type, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
link_name : name of the link type
first_time,: 1 if it's your SimpleLinkType first insert (save it into the database), 0 otherwise
last_rows,: 1 if it's your SimpleLinkType last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertPort char *  systemname,
char *  devicename,
int  port_nbr,
int  rxfc,
int  txfc,
int  speed1,
int  speed2,
int  speed3,
int  port_management,
char *  wire_sense,
char *  phy,
int  force_speed,
int  bmc_booting,
int  primary_interface,
int  traffic_type_supported,
int  last_rows,
char *  ErrMess
 

Insert a Port, returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
devicename : name of the device
port_nbr : port nb
rxfc : 1 if you allow receiver flow control, 0 otherwise
txfc : 1 if you allow transceiver flow control, 0 otherwise
speed1 : speed of the port
speed2 : speed of the port (second possible)
speed3 : speed of the port (third possible)
port_management : 1 if it's a management port
wire_sense : possible values :"SWITCH/SWITCH","AUTOSENSE","SWITCH/COMPUTER"
phy : possible values : "SX","T","SL"
force_speed : 1 if you allow the force speed option, 0 otherwise
bmc_booting : 1 if the port is the bmc_booting one, 0 otherwise
primary_interface : (0 or 1), 1 if the port is the primary interface
traffic_type_supported : (0 or 1), 1 if the port is independant of the type of data (i.e. it can support for instance L1 data or HLT data)
last_rows : 1 if it's your last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int InsertSimpleLinkType char *  systemname,
char *  link_name,
int  last_rows,
char *  ErrMess
 

Insert a Simple Link Type, and returning an integer value. The user should manage the memory : there is no memory allocation.

Parameters:
systemname : name of the subsystem and "_" appended such as "TFC_".
link_name : name of the link type
last_rows : 1 if it's your last insert (save it into the database), 0 otherwise
ErrMess : error message in case of failure
Returns:
0 if it is successful

EXTERN_CONFDB int LoadConnectivityTable char *  systemname,
int &  len_array,
int *  lkid_list,
int *  node_from_list,
int *  node_to_list,
int *  port_nbrfrom_list,
int *  port_nbrto_list,
int *  bidirectional_list,
int *  lkused_list,
int *  lktype_list,
char *  ErrMess
 

Load the link type table of a given system , returning a int

Parameters:
systemname : name of the subsystem.
len_array : length of the lkid_list array you have allocated (same as node_from_list,...,lktype_list) we return the length we need if too small)
lkid_list : list of lkid
node_from_list : list of node_from (corresponding to the lkid)
node_to_list : list of node_to (corresponding to the lkid)
port_nbrfrom_list : list of port_from (corresponding to the lkid)
port_nbrto_list : list of port_to (corresponding to the lkid)
bidirectional_list : list of bidrectional (corresponding to the lkid)
lkused_list : list of lkused (corresponding to the lkid)
lktype_list : list of lktype (corresponding to the lkid)
ErrMess : error message in case of failure (NO_ROWS_SELECTED if table empty)
Returns:
0 if successful

EXTERN_CONFDB int LoadDeviceTypeTable char *  systemname,
int &  len_did,
char *  devtypename_list,
char *  ErrMess
 

Load the link type table of a given system , returning a int

Parameters:
systemname : name of the subsystem.
len_did : length of the devtypename_list you have allocated (we return the length we need if too small)
devtypename_list : list of devtypename
ErrMess : error message in case of failure (NO_ROWS_SELECTED if table empty)
Returns:
0 if successful

EXTERN_CONFDB int LoadLinkTypeTable char *  systemname,
int &  len_lkid,
int *  lkid_list,
int &  len_lkname,
char *  lktypename_list,
char *  ErrMess
 

Match the lkid lktypename table of a given system , returning a int

Parameters:
systemname : name of the subsystem.
len_lkid : length of the lkid_list array you have allocated we return the length we need if too small)
len_lkname : length of the lktypename_list you have allocated we return the length we need if too small)
lkid_list : list of lkid
lktypename_list : list of lktypename (corresponding to the deviceid)
ErrMess : error message in case of failure (NO_ROWS_SELECTED if table empty)
Returns:
0 if successful

EXTERN_CONFDB int MatchDeviceIDDeviceName char *  systemname,
int &  len_did,
int *  devid_list,
int &  len_dname,
char *  devname_list,
char *  ErrMess
 

Match the deviceid devicename table of a given system , returning a int

Parameters:
systemname : name of the subsystem.
len_did : length of the devid_list array you have allocated we return the length we need if too small)
len_dname : length of the devname_list you have allocated we return the length we need if too small)
devid_list : list of deviceid
devname_list : list of devname (corresponding to the deviceid)
ErrMess : error message in case of failure (NO_ROWS_SELECTED if table empty)
Returns:
0 if successful


Generated on Wed Nov 2 17:34:38 2005 for confDB by  doxygen 1.4.4