#include <CONFDB.h>
Public Member Functions | |
CONFDB (string dbname, string login, string passwd) | |
~CONFDB () | |
int | PyDBConnexion () |
int | PyDBDeconnexion () |
string | PyGetDeviceTypeRow (string devitype) |
string | PyGetDeviceRow_devicename (string deviname) |
string | PyGetDeviceRow_deviceid (int devid) |
string | PyGetPortRow_pid (int pID) |
string | PyGetPortRow_devid (int devid, string port_nb, int port_way, string port_type) |
string | PyGetMacroConnectivityRow_lkid (int lkid) |
string | PyGetMacroConnectivityRow_node (int nodeid, string port_nb, int way_given, string port_type) |
string | PyGetIPInfoRow (string IPadd) |
string | PyGetLkTypeRow_lkname (string lname) |
string | PyGetLkTypeRow_lknb (int lknb) |
vector< int > | PyGetPortIDPerDevID (int dID) |
vector< string > | PyGetDeviceNamesPerType (string dtype) |
vector< string > | PyGetMacIPAddPerDevID (int dID) |
vector< int > | PyGetLkToDevID (int nto) |
vector< int > | PyGetLkFromDevID (int nfrom) |
vector< int > | PyGetDeviceIDsPerType (string dtype) |
string | PyInsertPort (string devname, string ptnb, string port_type, int port_way, string bia, string ipname, string ipadd, string subnet, string macadd, vector< int > param_list, string phy, int last) |
string | PyInsertMultiplePorts (string devname, string ptnb, int port_way, string port_type, string bia, string ipname, string ipadd, string subnet, string macadd, vector< int > param_list, string phy, int first, int last) |
string | PyInsertMultipleMacroLinks (string nfrom, string nto, string pfrom, string pto, string port_typefrom, string port_typeto, string lk_type, int bidirectional, string link_info, int first, int last) |
string | PyInsertMultipleCompositeLinkTypes (string lktype, string lktype_list_concan, int first, int last) |
string | PyInsertMultipleSimpleLinkTypes (string lktype, int first, int last) |
string | PyInsertMultipleDeviceTypes (string sysname, string devtype, int nb_in, int nb_out, string devdescr, string rgbcolor, int first, int last) |
string | PyInsertMacroLink (string nfrom, string nto, string pfrom, string pto, string port_typefrom, string port_typeto, string lk_type, int bidirectional, string link_info, int last) |
string | PyInsertCompositeLinkType (string lktype, string lktype_list_concan, int last) |
string | PyInsertDeviceType (string sysname, string devtype, int nb_in, int nb_out, string devdescr, string rgbcolor, int last) |
string | PyInsertSimpleLinkType (string lktype, int last) |
vector< string > | PyGetConnOutBetweenDeviceDeviceType (string nfrom, string nto, int nto_dtype, int reload_connectivity, int delete_connectivity) |
vector< string > | PyGetDetailedConnectivityBetweenDevices (string nfrom, string nto, int reload_connectivity, int delete_connectivity) |
int | PyCreateTableSchema () |
vector< string > | PyGetConnectivityBetweenDevices (string nfrom, string nto, int reload_connectivity, int delete_connectivity) |
vector< string > | PyGetDestinationNamePerDevPort (string devtype, string port_nb, string port_type) |
int | PyGetDeviceID_devicename (string devname) |
string | PyGetDeviceName_deviceid (int devID) |
vector< string > | PyGetDetailedConnBetweenDeviceDevType (string nfrom, string nto, int dtype_given, int reload_connectivity, int delete_connectivity) |
int | PyDropTableSchema () |
vector< string > | PyGetFreeDeviceNamesPerType (string dtype) |
int | PyCreateDestinationTable (string dname, int roundtrip) |
int | PyCreateRoutingTable (string devname, int roundtrip) |
vector< string > | PyGetAllPathsPerDevice (string systemname, string devicename, int reload_connectivity, int delete_connectivity) |
vector< string > | PyMatchDeviceIDDeviceName (string systemname) |
vector< string > | PyLoadConnectivityTable (string systemname) |
vector< string > | PyLoadDeviceTypeTable (string systemname) |
vector< string > | PyLoadLinkTypeTable () |
string | PyUpdateMultiplePorts (string devicename, string port_nb, int port_way, string port_type, int speed, string phy, int pxi_booting, int first_time1, int last_rows1) |
string | PyUpdateMultipleAttributeMacIPs (string ip_add, string subnet_mask, string ipname, int first_time1, int last_rows1) |
string | PyUpdateMultipleIPAddresses (string ip_add, string oldip_add, int first_time1, int last_rows1) |
string | PyUpdateMultipleCompositeLinkTypes (string link_name, string simple_lk_list, int first_time1, int last_rows1) |
string | PyUpdateMultipleLinkTypeNames (string old_link_name, string link_name, int first_time1, int last_rows1) |
string | PyUpdateMultipleDeviceTypeAttributes (string devicetype, string description, int nbrofinput, int nbrofoutput, string rgbcolor, int first_time1, int last_rows1) |
string | PyUpdateMultipleDeviceTypes (string devicetype_old, string devicetype, int first_time1, int last_rows1) |
string | PyUpdateMultipleDevNamesDevices (string devicename_old, string devicename, int first_time1, int last_rows1) |
string | PyUpdateMultipleBidirectionalLinks (string node_from, string node_to, string port_nbrfrom, string port_typefrom, string port_nbrto, string port_typeto, int bidirectional_link_used, int first_time1, int last_rows1) |
string | PyUpdateMultipleLkUsedLinks (string node_from, string node_to, string port_nbrfrom, string port_nbrto, string port_typefrom, string port_typeto, int lkused, int first_time1, int last_rows1) |
string | PyUpdateMultipleLkTypeLinks (string node_from, string node_to, string port_nbrfrom, string port_nbrto, string port_typefrom, string port_typeto, string link_type, int first_time1, int last_rows1) |
string | PyGetBoardCpntRow_cpntname (string cpntname) |
string | PyGetHWCpntRow_serialnb (string serialnb) |
vector< string > | PyGetDeviceNamesPerLocation (string location) |
string | PyGetBoardCpntRow_cpntid (int cpntid) |
string | PyGetHWCpntRow_snbid (int snbid) |
string | PyGetMicroConnectivityRow_lkid (int lkid) |
string | PyGetMicroConnectivityRow_node (int nodeid, int port_nb, int way_given) |
vector< string > | PyGetBoardCpntPerType (string cpnttype) |
vector< string > | PyGetSpareHWPerLocation (string location) |
vector< string > | PyGetSpareHWCpntPerLocation (string location) |
vector< string > | PyGetSpareHWPerType (string hwtype) |
vector< string > | PyGetCpntNamesPerBoard (string motherboardname) |
vector< string > | PyGetSpareHWCpntPerType (string hwtype) |
vector< int > | PyGetMicroLkFromCpntID (int cpntid_from, int motherboard) |
vector< int > | PyGetMicroLkToCpntID (int cpntid_from, int motherboard) |
string | PyInsertTestFunctionalDevice (string location, vector< string > ipaddList, vector< string > ipnameList, vector< string > subnetList, vector< string > portnbList, vector< string > port_typeList, vector< int > port_wayList, int last) |
string | PyInsertMultipleSpareDevices (string hwname, string hwtype, string serialnb, string responsible, string location, string comments, int first, int last) |
string | PyInsertMultipleBoardCpnts (string cpntname, string cpnttype, int replacable, string motherboardname, string serialnb, string hwtype, string responsible, string location, string comments, int first, int last) |
string | PyInsertMultipleSparePorts (string serialnb, string ptnb, int port_way, string port_type, string bia, string macadd, int first, int last) |
string | PyInsertSparePort (string serialnb, string ptnb, int port_way, string port_type, string bia, string macadd, int last) |
string | PyInsertSpareDevice (string hwname, string hwtype, string serialnb, string responsible, string location, string comments, int last) |
string | PyInsertMultipleMicroLinks (string nfrom, string nto, int pfrom, int pto, string lk_type, int bidirectional, int first, int last) |
string | PyGetCpntName_cpntid (int cpntID) |
int | PyGetCpntID_cpntname (string cpntname) |
string | PyUpdateMultipleDeviceSystemList (string devicename, string new_systemList, int first_time1, int last_rows1) |
vector< string > | PyGetMicroConnectFromPortid (int mboardportid_from, int mboardportid_to, string cpntname) |
vector< string > | PyGetMicroConnectToCpntType (int mboardportid_from, int cpnttype_given, string cpnttype) |
vector< string > | PyGetMicroConnectBetweenBoardCpntAndMotherBoard (string cpntname_from, int mboard_portid) |
string | PyDeleteLinkRow (int linkid, int macro_link) |
string | PyDeletePortRow (int portid) |
vector< string > | PyGetLkTypeDecomposition_lknb (int lktypeID) |
string | PyUpdateMultipleDTypeDevices (string devicename, string devicetype, int first_time1, int last_rows1) |
string | PyUpdateMultipleLkInfoLinks (string node_from, string node_to, string port_nbrfrom, string port_typefrom, string port_nbrto, string port_typeto, string link_info, int first_time1, int last_rows1) |
string | PyGetBootImageRow_devicename (string functionaldeviname) |
string | PyDeleteBootImage (string devicename) |
string | PyInsertMultipleBootImages (string devicename, string boot_image, string kernel_image_location, string initrd_image_location, string physical_location, string boot_protocol, int first_rows, int last_rows) |
string | PyUpdateBootImage (string devicename, string boot_image, string kernel_image_location, string initrd_image_location, string physical_location, string boot_protocol) |
int | PyGetPortID_portinfo (int deviceid, string port_nb, string port_type, int port_way) |
string | PyDeleteIPAlias (string ipalias) |
string | PyInsertSimpleDeviceFunction (string function, int last) |
string | PyInsertMultipleFunctionalDevices (string sysname, string devname, string devtype, int dnode, int promismode, string serialnb, string hwtype, string responsible, string location, string comments, string function_list, int first, int last) |
string | PyUpdateMultipleAttributesDevices (string devicename, int node, int promiscuous_mode, string location, string function_list, int first_time1, int last_rows1) |
string | PyInsertFunctionalDevice (string sysname, string devname, string devtype, int dnode, int promismode, string serialnb, string hwtype, string responsible, string location, string comments, string function_list, int last) |
vector< int > | PyGetLkIDsPerLkInfo (string lkinfo) |
string | PyGetIPAliasRow (string ipalias) |
vector< string > | PyGetIPAliasesPerIPName (string IPName) |
string | PyUpdateIPalias (string old_ipalias, string new_ipalias) |
string | PyUpdateHWSerialNB (string old_serialnb, string new_serialnb) |
string | PyUpdateDeviceFunctionName (string old_function_name, string new_function_name) |
vector< string > | PyGetDeviceNamesPerFunction (string function_name) |
string | PyInsertMultipleIPAliases (string ip_address, string ipname, string ipalias, int first, int last) |
string | PyUpdateMultipleDeviceTypeSystemList (string devicetype, string new_systemList, int first_time1, int last_rows1) |
vector< string > | PyGetAvailableFunctions () |
string | PyDeleteHWDevice (string serialnb) |
string | PyDeleteFunctionalDeviceType (string devicetype) |
string | PyDeleteFunctionalDevice (int deviceid) |
string | PyDeleteSystemName (string system_name) |
vector< string > | PyGetListOfSubsystems () |
string | PyInsertSubsystem (string system_name, string parent_name) |
string | PyUpdateSubsystemName (string old_sysname, string new_sysname) |
string | PySwapTwoDevices (string functional_devname1, string functional_devname2, string comments) |
string | PyGetFunctionalDeviceStatus (string dname) |
string | PyGetFunctionalBoardCpntStatus (string cpntname) |
string | PyGetHWLastFunctionalDevice (string serialnb) |
string | PyGetHWLastFunctionalBoardCpntName (string hw_serialnb, int hw_snbid) |
string | PyGetFunctionalDeviceLastHW (string functional_name) |
string | PyGetFunctionalBoardCpntNameLastHW (string functional_cpntname) |
string | PyGetHWDeviceStatus (string dname) |
string | PyGetHWBoardCpntStatus (string serialnb, int snbid) |
vector< string > | PyGetHWDeviceByStatus (string systemname, string device_status) |
vector< string > | PyGetHWBoardCpntByStatus (string cpnt_status) |
vector< string > | PyGetHistoryOfHWDevice (string serial_nb, string min_date, string max_date) |
vector< string > | PyGetHistoryOfHWBoardCpnt (string serial_nb, int hw_snbid, string min_date, string max_date) |
vector< string > | PyGetHistoryOfFunctionalDevice (string functional_name, string min_date, string max_date) |
vector< string > | PyGetHistoryOfFunctionalBoardCpntName (string functional_cpntname, string min_date, string max_date) |
vector< string > | PyGetFunctionalDeviceByStatus (string systemname, string device_status) |
vector< string > | PyGetSpareHWTypeList () |
vector< string > | PyGetPortInfoPerSpare (string snb) |
string | PyGetSparePortRow_snb (string serialnb, string port_nb, int port_way, string port_type) |
string | PyGetHWDeviceRow_serialnb (string serialnb) |
Private Attributes | |
string | _dbname |
string | _login |
string | _passwd |
CONFDB::CONFDB | ( | string | dbname, | |
string | login, | |||
string | passwd | |||
) |
CONFDB Constructor .
dbname | : name of the database. | |
login | : user login. | |
passwd | : user password. |
CONFDB::~CONFDB | ( | ) |
CONFDB destructor . no param
int CONFDB::PyDBConnexion | ( | ) |
Connect to the database with the login,pwd and db as provided in the constructor .
CONFDBEXCEPTION | . |
int CONFDB::PyDBDeconnexion | ( | ) |
Disconnect from the database no input arguments and returning a int .
CONFDBEXCEPTION | . |
string CONFDB::PyGetDeviceTypeRow | ( | string | devitype | ) |
Get the row of the given device type returning a string value.
devitype | : device type name: |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetDeviceRow_devicename | ( | string | deviname | ) |
Get the row of the given device name , returning a string.
deviname | : device name: |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
string CONFDB::PyGetDeviceRow_deviceid | ( | int | devid | ) |
Get the row of the given deviceID of the device returning a string .
devid | : deviceID of the device |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
string CONFDB::PyGetPortRow_pid | ( | int | pID | ) |
Get the port row returning a string .
pID | : portID of the device |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetPortRow_devid | ( | int | devid, | |
string | port_nb, | |||
int | port_way, | |||
string | port_type | |||
) |
Get the port row returning a string value.
devid | : deviceID of the device | |
port_nb | : port nb of the device | |
port_way | : way 1 if it's an input, 2 if it' an output. | |
port_type | : type of the port Put "none" in lower case, if it's empty. |
if it is successful db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetMacroConnectivityRow_lkid | ( | int | lkid | ) |
Get the macro link row returning a string .
lkid | : lkID of the link |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetMacroConnectivityRow_node | ( | int | nodeid, | |
string | port_nb, | |||
int | way_given, | |||
string | port_type | |||
) |
Get the macro link row returning a string .
nodeid | : deviceid of the device | |
port_nb | : port_nb of the device | |
port_type | : Put "none" in lower case if you have no type. | |
way_given | : 1 if the port_nb is an input (so it means that the link ends up to this port),2 if the port nb is an output (so the link starts from this port) |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetIPInfoRow | ( | string | IPadd | ) |
Get the ip row in a string .
IPadd | : ip address about which you want to get some info |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetLkTypeRow_lkname | ( | string | lname | ) |
Get the link type row returning a string .
lname | :link type name about which you want to get some info |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetLkTypeRow_lknb | ( | int | lknb | ) |
Get the link type row returning a string .
lknb | :link type id about which you want to get some info |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< int > CONFDB::PyGetPortIDPerDevID | ( | int | dID | ) |
Get the list of portID of the given deviceID, returning a vector of int .
dID | : deviceID |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetDeviceNamesPerType | ( | string | dtype | ) |
Get the list of devices of the given device type, returning a vector of strings.
dtype | : name of the device type |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetMacIPAddPerDevID | ( | int | dID | ) |
Get the list of ethernet and ip of the given deviceID, returning a string .
dID | : deviceID |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
vector< int > CONFDB::PyGetLkToDevID | ( | int | nto | ) |
Get the list of LkID which ends at the given deviceID, returning a vector of int
nto | : deviceID |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
vector< int > CONFDB::PyGetLkFromDevID | ( | int | nfrom | ) |
Get the list of LkID which start from the given deviceID, returning a vector of int.
nfrom | : deviceID |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< int > CONFDB::PyGetDeviceIDsPerType | ( | string | dtype | ) |
Get the list of deviceID of the given device type, returning a vector of int .
dtype | : name of the device type |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyInsertPort | ( | string | devname, | |
string | ptnb, | |||
string | port_type, | |||
int | port_way, | |||
string | bia, | |||
string | ipname, | |||
string | ipadd, | |||
string | subnet, | |||
string | macadd, | |||
vector< int > | param_list, | |||
string | phy, | |||
int | last | |||
) |
Insert Ports, returning a string .
devname | : name of the device | |
ptnb | : port nb of the device | |
param_list,: | vector of int which must be filled as follows | |
param_list | : [0] corresponds to speed : speed of the port | |
param_list | : [1] corresponds to admin_status : 1 if the port status is OK, 0 otherwise | |
param_list | : [2] corresponds to pxi_booting : 1 if the port is the pxi_booting one, 0 otherwise | |
port_type | : type of the port: used in the DAQ (BMC,CONTROL). Put "" if none. | |
port_way | : 1 if the port is input, 2 otherwise. References: data flow from the detector (1); control flow (2). | |
phy,: | possible values :"SX","T","SL" . Put "" if irrelevant (used in the DAQ) | |
ipname | : associated with this port. Put "" if irrelevant (used in the DAQ) | |
ipadd | : associated with this port. Put "" if irrelevant (used in the DAQ) | |
subnet | : associated with the IPadd. Put "" if irrelevant (used in the DAQ) | |
macadd | : associated with this port. Put "" if irrelevant (used in the DAQ) | |
bia | : mac address burnt associated with port. Put "" if irrelevant (used in the DAQ) | |
last | : 1 if it's your last Port insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultiplePorts | ( | string | devname, | |
string | ptnb, | |||
int | port_way, | |||
string | port_type, | |||
string | bia, | |||
string | ipname, | |||
string | ipadd, | |||
string | subnet, | |||
string | macadd, | |||
vector< int > | param_list, | |||
string | phy, | |||
int | first, | |||
int | last | |||
) |
Insert multiple Ports, returning a string .
devname | : name of the device | |
ptnb | : port nb of the device | |
param_list,: | vector of int which must be filled as follows | |
param_list | : [0] corresponds to speed : speed of the port | |
param_list | : [1] corresponds to admin_status : 1 if the port status is OK, 0 otherwise | |
param_list | : [2] corresponds to pxi_booting : 1 if the port is the pxi_booting one, 0 otherwise | |
port_type | : type of the port: used in the DAQ (BMC,CONTROL). Put "" if none. | |
port_way | : 1 if the port is input, 2 otherwise. References: data flow from the detector (1); control flow (2). | |
phy,: | possible values :"SX","T","SL" . Put "" if irrelevant (used in the DAQ) | |
ipname | : associated with this port. Put "" if irrelevant (used in the DAQ) | |
ipadd | : associated with this port. Put "" if irrelevant (used in the DAQ) | |
subnet | : associated with the IPadd. Put "" if irrelevant (used in the DAQ) | |
macadd | : associated with this port. Put "" if irrelevant (used in the DAQ) | |
bia | : mac address burnt associated with port. Put "" if irrelevant (used in the DAQ) | |
first | : 1 if it's your CompositeLinkType first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your last Port insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleMacroLinks | ( | string | nfrom, | |
string | nto, | |||
string | pfrom, | |||
string | pto, | |||
string | port_typefrom, | |||
string | port_typeto, | |||
string | lk_type, | |||
int | bidirectional, | |||
string | link_info, | |||
int | first, | |||
int | last | |||
) |
Insert Multiple macro Link returning a string .
nfrom | : name of the device starting the link | |
nto | : name of the device ending the link | |
pfrom | : port nb of the device from | |
pto | : port nb of the device to | |
port_typefrom | : type of the port from as declared in port_table. Put "none" in lower case if none | |
port_typeto | : type of the port to as declared in port_table. Put "none" in lower case if none | |
lk_type | : name of the link type | |
bidirectional | : 1 if it's a bidirectional link, 0 otherwise | |
link_info | : info about the link (max. size 1000) | |
first | : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleCompositeLinkTypes | ( | string | lktype, | |
string | lktype_list_concan, | |||
int | first, | |||
int | last | |||
) |
Insert a Composite Link Type, returning a string .
lktype | : name of the link type (such as "Mixed_Data") | |
lktype_list_concan | : name of the link types which compose the composite links, separated by "," | |
lktype_list_concan | :ex. Mixed_Data is composed of HLT_Data and L1_Data, so simple_lk_list="HLT_Data,L1_Data" | |
first | : 1 if it's your CompositeLinkType first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your CompositeLinkType last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleSimpleLinkTypes | ( | string | lktype, | |
int | first, | |||
int | last | |||
) |
Insert a Simple Link Type, returning a string .
lktype | : name of the link type | |
first,: | 1 if it's your SimpleLinkType first insert (save it into the database), 0 otherwise | |
last,: | 1 if it's your SimpleLinkType last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleDeviceTypes | ( | string | sysname, | |
string | devtype, | |||
int | nb_in, | |||
int | nb_out, | |||
string | devdescr, | |||
string | rgbcolor, | |||
int | first, | |||
int | last | |||
) |
Insert a device type , returning a string .
sysname | : listof the subsystem which use this device types, (upper case, separated by a coma ) | |
devtype | : name of the devicetype | |
nb_in | : nb of input ports | |
nb_out | : nb of output ports | |
rgbcolor | : color in RGB reference (for display) | |
devdescr | : some description about the component max size 500 characters. | |
first | : 1 if it's your MultipleDeviceType first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your MultipleDeviceType last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMacroLink | ( | string | nfrom, | |
string | nto, | |||
string | pfrom, | |||
string | pto, | |||
string | port_typefrom, | |||
string | port_typeto, | |||
string | lk_type, | |||
int | bidirectional, | |||
string | link_info, | |||
int | last | |||
) |
Insert Link returning a string .
nfrom | : name of the device starting the link | |
nto | : name of the device ending the link | |
pfrom | : port nb of the device from | |
pto | : port nb of the device to | |
port_typefrom | : Put "none" in lower case, if you didn't put anything when you insert this port | |
port_typeto | : Put "none" in lower case, if you didn't put anything when you insert this port | |
lk_type | : name of the link type | |
bidirectional | : 1 if it's a bidirectional link, 0 otherwise | |
link_info | : some info about a link (max length 1000) | |
last | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertCompositeLinkType | ( | string | lktype, | |
string | lktype_list_concan, | |||
int | last | |||
) |
Insert a Composite Link Type, returning a string .
lktype | : name of the link type (such as "Mixed_Data") | |
lktype_list_concan | : name of the link types which compose the composite links, separated by "," | |
lktype_list_concan | :ex. Mixed_Data is composed of HLT_Data and L1_Data, so simple_lk_list="HLT_Data,L1_Data" | |
last | : 1 if it's your last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertDeviceType | ( | string | sysname, | |
string | devtype, | |||
int | nb_in, | |||
int | nb_out, | |||
string | devdescr, | |||
string | rgbcolor, | |||
int | last | |||
) |
Insert a device type , returning a string .
sysname | : list of the subsystem which use this device type separated with a coma, in upper case. | |
devtype | : name of the devicetype | |
nb_in | : nb of input ports | |
nb_out | : nb of output ports | |
rgbcolor | : color of the device as represented in CDBVis | |
devdescr | : some description about the component max size 500 characters. | |
last | : 1 if it's your last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertSimpleLinkType | ( | string | lktype, | |
int | last | |||
) |
Insert a Simple Link Type, returning a string .
lktype | : name of the link type | |
last | : 1 if it's your last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
vector< string > CONFDB::PyGetConnOutBetweenDeviceDeviceType | ( | string | nfrom, | |
string | nto, | |||
int | nto_dtype, | |||
int | reload_connectivity, | |||
int | delete_connectivity | |||
) |
Get the port nbs out between dev_from and devtype, returning a vector of int .
nfrom | : name of the device 1 (ex. THOR_00) | |
nto | : name of a devicetype (ex. ECAL_L1FE) or the fixed part of a set of devices | |
nto_dtype | : 1 if it's the devicetype you give, 0 if it's the fixed part. | |
reload_connectivity | : 1 if you want to load or reload the connectivity (we load only the connectivity of the subsystems in which dev_from is part of . for instance if dev_from belongs to HCAL, we load only the connectivity of HCAL.(To set to 1, after a change or if it is the first time or if the device is not in the same subsystem) otherwise 0. | |
delete_connectivity | : 1 if you want to delete the connectivity cache(to set to 1, last query using it) otherwise 0. N.B If ErrMess is like "Unsuccessful Malloc" or like NB of paths is too big,too many bidirectional_links, then you have to reload the connectivity table (it has been deleted). If ErrMess looks like "NO_ROWS_SELECTED" or "DEVICE_NOT_CONNECTED", you don't need to reload the table |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetDetailedConnectivityBetweenDevices | ( | string | nfrom, | |
string | nto, | |||
int | reload_connectivity, | |||
int | delete_connectivity | |||
) |
Get the path details between nfrom and nto, returning a vector of strings .
nfrom | : name of the device 1 (ex. THOR_00) | |
nto | : name of the device 2 (ex. ECAL_L1FE06_00_00) | |
reload_connectivity | : 1 if you want to load or reload the connectivity (we load only the connectivity of the subsystems in which dev_from is part of . for instance if dev_from belongs to HCAL, we load only the connectivity of HCAL.(To set to 1, after a change or if it is the first time or if the device is not in the same subsystem) otherwise 0. | |
delete_connectivity | : 1 if you want to delete the connectivity cache(to set to 1, last query using it) otherwise 0. N.B If ErrMess is like "Unsuccessful Malloc" or like NB of paths is too big,too many bidirectional_links, then you have to reload the connectivity table (it has been deleted). If ErrMess looks like "NO_ROWS_SELECTED" or "DEVICE_NOT_CONNECTED", you don't need to reload the table |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
int CONFDB::PyCreateTableSchema | ( | ) |
create the tables, indexes and constraints in your DB schema, returning a int .
CONFDBEXCEPTION | . |
vector< string > CONFDB::PyGetConnectivityBetweenDevices | ( | string | nfrom, | |
string | nto, | |||
int | reload_connectivity, | |||
int | delete_connectivity | |||
) |
Get the path (just the first and last link details) between nfrom and nto, returning a vector of strings .
nfrom | : name of the device 1 (ex. THOR_00) | |
nto | : name of the device 2 (ex. ECAL_L1FE06_00_00) | |
reload_connectivity | : 1 if you want to load or reload the connectivity (we load only the connectivity of the subsystems in which dev_from is part of . for instance if dev_from belongs to HCAL, we load only the connectivity of HCAL.(To set to 1, after a change or if it is the first time or if the device is not in the same subsystem) otherwise 0. | |
delete_connectivity | : 1 if you want to delete the connectivity cache(to set to 1, last query using it) otherwise 0. N.B If ErrMess is like "Unsuccessful Malloc" or like NB of paths is too big,too many bidirectional_links, then you have to reload the connectivity table (it has been deleted). If ErrMess looks like "NO_ROWS_SELECTED" or "DEVICE_NOT_CONNECTED", you don't need to reload the table |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetDestinationNamePerDevPort | ( | string | devicename, | |
string | port_nb, | |||
string | port_type | |||
) |
Get the list of possible destination reachable from this port
devicename | : name of the device | |
port_nb | : port nb of the device | |
port_type | : port type of the device. Put "none" in lower case if it's null |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
int CONFDB::PyGetDeviceID_devicename | ( | string | devname | ) |
Get the deviceid corresponding to the devicename
devname | : name of device |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetDeviceName_deviceid | ( | int | devID | ) |
Get the devicename corresponding to the deviceid
devID | : deviceid |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetDetailedConnBetweenDeviceDevType | ( | string | nfrom, | |
string | nto, | |||
int | dtype_given, | |||
int | reload_connectivity, | |||
int | delete_connectivity | |||
) |
Get the path details between nfrom and nto, returning a vector of strings .
nfrom | : name of the device 1 (ex. THOR_00) | |
nto | : name of the devicetype 2 (ex. ECAL_L1FE06) | |
dtype_given | : 1 if it's a device type, 0 if it should be like 'nto' | |
reload_connectivity | : 1 if you want to load or reload the connectivity (we load only the connectivity of the subsystems in which dev_from is part of . for instance if dev_from belongs to HCAL, we load only the connectivity of HCAL.(To set to 1, after a change or if it is the first time or if the device is not in the same subsystem) otherwise 0. | |
delete_connectivity | : 1 if you want to delete the connectivity cache(to set to 1, last query using it) otherwise 0. N.B If ErrMess is like "Unsuccessful Malloc" or like NB of paths is too big,too many bidirectional_links, then you have to reload the connectivity table (it has been deleted). If ErrMess looks like "NO_ROWS_SELECTED" or "DEVICE_NOT_CONNECTED", you don't need to reload the table |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
int CONFDB::PyDropTableSchema | ( | ) |
drop the tables, indexes and constraints in your DB schema, returning a int . The user should use this function with caution no way to rollback!
CONFDBEXCEPTION | . |
vector< string > CONFDB::PyGetFreeDeviceNamesPerType | ( | string | dtype | ) |
Get the list of free devices of the given device type, returning a vetcor of string .
dtype | : device type name |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
int CONFDB::PyCreateDestinationTable | ( | string | dname, | |
int | roundtrip | |||
) |
create the destination table of a given device and stored in the database, returning a int
dname | : device name | |
roundtrip | : maximum path length |
CONFDBEXCEPTION | . |
int CONFDB::PyCreateRoutingTable | ( | string | devname, | |
int | roundtrip | |||
) |
create the routing table of a given device and stored in the database, returning a int
devname | : device name | |
roundtrip | : maximum path length |
CONFDBEXCEPTION | . |
vector< string > CONFDB::PyGetAllPathsPerDevice | ( | string | systemname, | |
string | devicename, | |||
int | reload_connectivity, | |||
int | delete_connectivity | |||
) |
get all the paths going through a given device , returning a vector of strings
systemname | : paths which will be part of this system name of the subsystem (kind of filter) | |
devicename | : device name | |
reload_connectivity | : 1 if you want to load or reload the connectivity (we load only the connectivity of the subsystems in which dev_from is part of . for instance if dev_from belongs to HCAL, we load only the connectivity of HCAL.(To set to 1, after a change or if it is the first time or if the device is not in the same subsystem) otherwise 0. | |
delete_connectivity | : 1 if you want to delete the connectivity cache(to set to 1, last query using it) otherwise 0. N.B If ErrMess is like "Unsuccessful Malloc" or like NB of paths is too big,too many bidirectional_links, then you have to reload the connectivity table (it has been deleted). If ErrMess looks like "NO_ROWS_SELECTED" or "DEVICE_NOT_CONNECTED", you don't need to reload the table |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyMatchDeviceIDDeviceName | ( | string | systemname | ) |
Load part of the device table of a given system , returning a vector of strings
systemname | : device used in the given list of the subsystem.(upper case, separated with a coma) |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyLoadConnectivityTable | ( | string | systemname | ) |
Load the connectivity table of a given system , returning a vector of strings
systemname | : link which are part of the given list of the subsystem. (upper case: one subsystem because it's big table) |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
vector< string > CONFDB::PyLoadDeviceTypeTable | ( | string | systemname | ) |
Get all the device types of a given system , returning a vector of strings
systemname | : device type which are used by the list of the subsystems (upper case, separated by a coma) . |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyLoadLinkTypeTable | ( | ) |
Load the link type table , returning a vector of strings
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyUpdateMultiplePorts | ( | string | devicename, | |
string | port_nb, | |||
int | port_way, | |||
string | port_type, | |||
int | speed, | |||
string | phy, | |||
int | pxi_booting, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Upadte Multiple Ports, returning an integer value.
devicename | : name of the device which will be updated | |
port_nb | : port nb of the device to update | |
port_way | : specify the way of the port to update :1 if the port is an input and 2 if it's an output | |
port_type | : specify the type of the port of the device to update. Put "" if there is none. | |
speed | : new value of speed of the port: PUT -1 to keep the same value | |
pxi_booting | : new value of pxi_booting 1 if the port is the pxi_booting one, 0 otherwise. Put a value different from 1 or 0 to keep the same value. | |
phy,: | new value of phy possible values :"SX","T","SL". if no changes put "" | |
first_time1 | : 1 if it's your first Port insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your last Port insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleAttributeMacIPs | ( | string | ip_add, | |
string | subnet_mask, | |||
string | ipname, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update MAC entries, returning an integer value.
ip_add | : key entry : you want to update the info about this IPaddress | |
subnet_mask | : new value : put "" or "none" if no changes | |
ipname | : new value : put "" or "none" if no changes | |
first_time1 | : 1 if it's your first MacIP insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your last MacIP insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleIPAddresses | ( | string | ip_add, | |
string | oldip_add, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update MAC entries, returning an integer value.
oldip_add | : ip address entry you want to modify. | |
ip_add | : new value of ip address entry you want to modify. | |
first_time1 | : 1 if it's your first MacIP insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your last MacIP insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleCompositeLinkTypes | ( | string | link_name, | |
string | simple_lk_list, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update a Composite Link Type, returning an integer value.Not to used...
link_name | : the link type name you want to modify. | |
simple_lk_list | : name of the link types which compose the composite link, separated by "," (all of them) | |
simple_lk_list | :ex. Mixed_Data is composed of HLT_Data and L1_Data, so simple_lk_list="HLT_Data,L1_Data" | |
simple_lk_list | : put none if the link type is no longer a composite link type | |
first_time1 | : 1 if it's your CompositeLinkType first insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your CompositeLinkType last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleLinkTypeNames | ( | string | old_link_name, | |
string | link_name, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update a Link Type Name (due to mistyping error), returning an integer value.
old_link_name | : value of the link type name you want to modify | |
link_name | : value of the new link type | |
first_time1 | : 1 if it's your SimpleLinkType first insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your SimpleLinkType last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleDeviceTypeAttributes | ( | string | devicetype, | |
string | description, | |||
int | nbrofinput, | |||
int | nbrofoutput, | |||
string | rgbcolor, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update the devicetype returning an integer value.
devicetype | : name of the devicetype you want to update | |
description | : new value of the description, if nothing you put "" or none (lower case) | |
nbrofinput | : new value of nbrofinput: put -1 if you don't want to change it | |
nbrofoutput | : new value of nbrofoutput: put -1 if you don't want to change it | |
rgbcolor | : new value of the rgbcolor of the devicetypefor display if nothing you put "" or none (lower case) | |
first_time1 | : 1 if it's your first MultipleDevice update (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleDevice last update (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleDeviceTypes | ( | string | devicetype_old, | |
string | devicetype, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update the devicetype returning an integer value.
devicetype_old | : name of the devicetype you want to update | |
devicetype | : new value of the devicetype, | |
first_time1 | : 1 if it's your first MultipleDevice update (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleDevice last update (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleDevNamesDevices | ( | string | devicename_old, | |
string | devicename, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update the devicename field of a device (typically when there is a mistyping) returning an integer value.
devicename_old | : name of the device you want to update | |
devicename | : new value of the devicename. can't be NULL! | |
first_time1 | : 1 if it's your first MultipleDevice update (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleDevice last update (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleBidirectionalLinks | ( | string | node_from, | |
string | node_to, | |||
string | port_nbrfrom, | |||
string | port_typefrom, | |||
string | port_nbrto, | |||
string | port_typeto, | |||
int | bidirectional_link_used, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update bidirectional link field for a given link returning an integer value. either you give node_from,pfrom or node_to,pto.
node_from | : name of the device starting the link: put "none" if you give node_to | |
node_to | : name of the device ending the link: put "none" if you give node_from | |
port_nbrfrom | : port nb of the device from | |
port_nbrto | : port nb of the device to | |
port_typefrom | : port nb of the device from: put "none" if it doesn't exist or if you provide about the node_to | |
port_typeto | : port nb of the device to:put "none" if it doesn't exist or if you provide about the node_from | |
bidirectional_link_used | : 1 if it's a bidirectional link, 0 otherwise | |
first_time1 | : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise. Maximum in one go: 10000 rows. (we force the insert) |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleLkUsedLinks | ( | string | node_from, | |
string | node_to, | |||
string | port_nbrfrom, | |||
string | port_nbrto, | |||
string | port_typefrom, | |||
string | port_typeto, | |||
int | lkused, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update the lkused field of a Link returning an integer value. you give either node_from,portnbrfrom or node_to,pto
node_from | : name of the device starting the link. Put "none" if you give node_to | |
node_to | : name of the device ending the link. Put "none" if you give node_to | |
port_nbrfrom | : port nb of the device from | |
port_nbrto | : port nb of the device to | |
port_typefrom | : port nb of the device from | |
port_typeto | : port nb of the device to | |
lkused | : 1 if the link is used in the configuration, 0 otherwise | |
first_time1 | : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise. Maximum in one go: 10000 rows. (we force the insert) |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleLkTypeLinks | ( | string | node_from, | |
string | node_to, | |||
string | port_nbrfrom, | |||
string | port_nbrto, | |||
string | port_typefrom, | |||
string | port_typeto, | |||
string | link_type, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update the link type of a Link returning an integer value. give either nfrom,pfrom or nto,pto
node_from | : name of the device starting the link. Put "none" if giving node_to | |
node_to | : name of the device ending the link. Put "none" if giving node_from | |
port_nbrfrom | : port nb of the device from | |
port_nbrto | : port nb of the device to | |
port_typefrom | : port nb of the device from | |
port_typeto | : port nb of the device to | |
link_type | : name of the link type | |
first_time1 | : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise. Maximum in one go: 10000 rows. (we force the insert) |
CONFDBEXCEPTION |
string CONFDB::PyGetBoardCpntRow_cpntname | ( | string | cpntname | ) |
Get the row of the given board cpnt name returning a string.
cpntname | : board cpnt name: |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
string CONFDB::PyGetHWCpntRow_serialnb | ( | string | serialnb | ) |
Get the row of the given hw board cpnt serialnb returning a string.
serialnb | : serialnb of your board cpnt |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
vector< string > CONFDB::PyGetDeviceNamesPerLocation | ( | string | location | ) |
Get the list of functional device names located at the given location, returning a vector of strings.
location | : location (exact name or just a part (prefix) |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetBoardCpntRow_cpntid | ( | int | cpntid | ) |
Get the row of the given cpntID returning a string .
cpntid | : cpntID of the board cpnt |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
string CONFDB::PyGetHWCpntRow_snbid | ( | int | snbid | ) |
Get the row of the given snbID returning a string .
snbid | : snbID of the hw board cpnt (number given bu the DB to foresee the case when there is no serialnb) |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
string CONFDB::PyGetMicroConnectivityRow_lkid | ( | int | lkid | ) |
Get the micro link row returning a string .
lkid | : lkID of the micro link |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetMicroConnectivityRow_node | ( | int | nodeid, | |
int | port_nb, | |||
int | way_given | |||
) |
Get the micro link row ,returning a string .
nodeid | : cpntid of the logical board cpnt. Put -1 if it's the motherboard | |
port_nb | : port_nb of the cpnt. Put the portid if cpntID=-1 | |
way_given | : 1 if the port_nb is an input (so it means that the link ends up to this port),2 if the port nb is an output (so the link starts from this port) |
db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetBoardCpntPerType | ( | string | cpnttype | ) |
Get the list of board cpnt of the given cpnt type, returning a vector of strings.
cpnttype | : name of cpnt type |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetSpareHWPerLocation | ( | string | location | ) |
Get the list of spare hw serialnb concatenated with the hwname if it exists (equals to 'none' if it's null) located at the given location, returning a vector of strings.
location | : location |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetSpareHWCpntPerLocation | ( | string | location | ) |
Get the list of spare hw snbid (automatic nb generated by the DB) concatenated with the serialnb and the hwname (functional name) if it exists (equals to 'none' if it's null) located at the given location, returning a vector of strings.
location | : location |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetSpareHWPerType | ( | string | hwtype | ) |
Get the list of spare hw serialnb concatenated with the hwname if it exists (equals to 'none' if it's null) of the given hwtype, returning a vector of strings.
hwtype | : location |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetCpntNamesPerBoard | ( | string | motherboardname | ) |
Get the list of functional board cpnt names located at the given motherboard, returning a vector of strings.
motherboardname | : motherboadrname |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetSpareHWCpntPerType | ( | string | hwtype | ) |
Get the list of spare hw snbid (automatic nb generated by the DB) concatenated with the serialnb and the hwname (functional name) if it exists (equals to 'none' if it's null) located at the given location, returning a vector of strings.
hwtype | : name of the hwtype |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< int > CONFDB::PyGetMicroLkFromCpntID | ( | int | cpntid_from, | |
int | motherboard | |||
) |
Get the list of micro LkID which starts from the given cpntID, returning a vector of int.
cpntid_from | : cpntID which starts the link. Put -1 if you want to get the list of lkids which starts from your motherboard | |
motherboard | : id of motherboard (=deviceid of a logical device). Put -1 if you want to get the list of lkids which starts from a cpntboard |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< int > CONFDB::PyGetMicroLkToCpntID | ( | int | cpntid_to, | |
int | motherboard | |||
) |
Get the list of micro LkID which ends at the given cpntID, returning a vector of int.
cpntid_to | : cpntID which ends the link. Put -1 if you want to get the list of lkids which ends from your motherboard | |
motherboard | : id of motherboard (=deviceid of a logical device). Put -1 if you want to get the list of lkids which ends from a cpntboard |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyInsertTestFunctionalDevice | ( | string | location, | |
vector< string > | ipaddList, | |||
vector< string > | ipnameList, | |||
vector< string > | subnetList, | |||
vector< string > | portnbList, | |||
vector< string > | port_typeList, | |||
vector< int > | port_wayList, | |||
int | last | |||
) |
Insert a test logical device (used as test boards for local tets) returning a string . their name is automatically given TEST_BOARD_nbr Put all the value which are not null first..
location | : where these tests boards are sit | |
ipaddList | : list of the ip address : (same order to enable the association between mac, port nbr, port_type and port way | |
subnetList | : list of the subnet (same order to enable the association between mac, port nbr, port_type and port way) | |
ipnameList | : list of the ipname list, (same order to enable the association between mac, port nbr, port_type and port way); | |
portnbList | : list of portnb (same order to enable the association between mac, port nbr, port_type and port way) | |
port_typeList | : list of portype (same order to enable the association between mac, port nbr, port_type and port way) | |
port_wayList | : list of port_way (1 if it's an input, 2 if it's an output) | |
last | : 1 if it's your last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleSpareDevices | ( | string | hwname, | |
string | hwtype, | |||
string | serialnb, | |||
string | responsible, | |||
string | location, | |||
string | comments, | |||
int | first, | |||
int | last | |||
) |
Insert multiple spare devices returning a string .
hwname | : name of the hw. Put a name it will be easier for to trace your spare hw. For ex. Spare_board1 | |
hwtype | : name of the hwtype prefixed with the system if it can be used only for the system. It will be used to count the nb of spare by hwtype. Useful for spare management. | |
serialnb | : serialnb of the hw. | |
responsible | : for the device | |
comments | : comments on the device | |
location | : location of the device (same conv. if inserted in the equipment DB) | |
first | : 1 if it's your first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleBoardCpnts | ( | string | cpntname, | |
string | cpnttype, | |||
int | replacable, | |||
string | motherboardname, | |||
string | serialnb, | |||
string | hwtype, | |||
string | responsible, | |||
string | location, | |||
string | comments, | |||
int | first, | |||
int | last | |||
) |
Insert multiple board cpnts returning a string .
cpntname | : logical name of the cpnt (even if it's a spare cpnt, put its function name in the board) | |
cpnttype | : name of the cpnttype | |
replacable | : 1 if it's replacable on its own , 0 otherwise. | |
motherboardname | : Put "none", if you insert a spare board cpnt. otherwise the name (logical device name) where the board cpnt sits | |
serialnb | : serial_nb of the cpnt | |
hwtype | :hardware type : this one should be the same as you declared for your spare (to manage spare cpnt) | |
responsible | : guy responsible for this hw | |
comments | : some comments about the hw (max.1000 characters) | |
location | : Serialnb nb of the board in which your board cpnt sits. If it's just a spare, which is not located on a board, put the location (building, shelves..) | |
first | : 1 if it's your first MultipleCpnt insert (save it into the database), 0 otherwise | |
last | : 1 if it's your MultipleCpnt last insert (save it into the database), 0 otherwise Maximum in one go: 10000 rows.( we force the insert) |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleSparePorts | ( | string | serialnb, | |
string | ptnb, | |||
int | port_way, | |||
string | port_type, | |||
string | bia, | |||
string | macadd, | |||
int | first, | |||
int | last | |||
) |
Insert multiple Spare Ports to be used ONLY IF your spare ports have mac or bia address (for L0 electronics, no need), returning a string .
serialnb | : serialnb of the hw | |
ptnb | : port nb of the device | |
port_type | : type of the port: used in the DAQ (BMC,CONTROL). Put "" if none. | |
port_way | : 1 if the port is input, 2 otherwise. References: data flow from the detector (1); control flow (2). | |
macadd | : associated with this port. Put "" if irrelevant (used in the DAQ) | |
bia | : mac address burnt associated with port. Put "" if irrelevant (used in the DAQ) | |
first | : 1 if it's your CompositeLinkType first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your last Port insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertSparePort | ( | string | serialnb, | |
string | ptnb, | |||
int | port_way, | |||
string | port_type, | |||
string | bia, | |||
string | macadd, | |||
int | last | |||
) |
Insert a Spare Port to be used ONLY IF your spare ports have mac or bia address (for L0 electronics, no need), returning a string .
serialnb | : serialnb of the hw | |
ptnb | : port nb of the device | |
port_type | : type of the port: used in the DAQ (BMC,CONTROL). Put "" if none. | |
port_way | : 1 if the port is input, 2 otherwise. References: data flow from the detector (1); control flow (2). | |
macadd | : associated with this port. | |
bia | : mac address burnt associated with port. | |
last | : 1 if it's your last Port insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertSpareDevice | ( | string | hwname, | |
string | hwtype, | |||
string | serialnb, | |||
string | responsible, | |||
string | location, | |||
string | comments, | |||
int | last | |||
) |
Insert a spare device returning a string .
hwname | : name of the hw. Put a name it will be easier for to trace your spare hw. For ex. Spare_board1 | |
hwtype | : name of the hwtype,prefixed by the system name ifthe spare can only be used for the system. It will be used to count the nb of spare by hwtype. Useful for spare management. | |
serialnb | : serialnb of the hw. | |
responsible | : for the device | |
comments | : comments on the device | |
location | : location of the device (same conv. if inserted in the equipment DB) | |
last | : 1 if it's your last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleMicroLinks | ( | string | nfrom, | |
string | nto, | |||
int | pfrom, | |||
int | pto, | |||
string | lk_type, | |||
int | bidirectional, | |||
int | first, | |||
int | last | |||
) |
Insert Multiple micro Links returning a string .
nfrom | : name of the board cpnt starting the link : put "motherboard", if it's the board name in which the board cpnt sits. | |
nto | : name of the board cpnt ending the link : put "motherboard", if it's the board name in which the board cpnt sits. | |
pfrom | : port nb of the cpnt from. Put the portid if node_from="motherboard" | |
pto | : port nb of the cpnt to. Put the portid if node_to="motherboard" | |
lk_type | : name of the link type | |
bidirectional | : 1 if it's a bidirectional link, 0 otherwise | |
first | : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyGetCpntName_cpntid | ( | int | cpntID | ) |
Get the cpntname corresponding to the cpntid
cpntID | : cpntid |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
int CONFDB::PyGetCpntID_cpntname | ( | string | cpntname | ) |
Get the cpntid corresponding to the cpntname
cpntname | : name of the board cpnt |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyUpdateMultipleDeviceSystemList | ( | string | devicename, | |
string | new_systemList, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update the systemlist of a given devicename returning an integer value.
devicename | : name of the functional device | |
new_systemList | : new list of the subsystems to which the device belongs to, elt separated by a coma | |
first_time1 | : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise. Maximum in one go: 10000 rows. (we force the insert) |
CONFDBEXCEPTION |
vector< string > CONFDB::PyGetMicroConnectFromPortid | ( | int | mboardportid_from, | |
int | mboardportid_to, | |||
string | cpntname | |||
) |
Get the path details between dev_from and dev_to, returning an integer value. you need grant execute if you have your own db account
mboardportid_from | : portid_from of the motherboard. it will start the micro path | |
cpntname | : put "none" if you provide a mboardportid_to | |
mboardportid_to | : portid of the motherboard which wil end the micro path. Put 0 if you provide a board cpnt name NB: the i-th entry of the pathid_list|link_pos_list|nfrom|port_nbrfrom|port_typefrom|nto|port_nbrto|port_typeto corresponds to one link of the path |
vector< string > CONFDB::PyGetMicroConnectToCpntType | ( | int | mboardportid_from, | |
int | cpnttype_given, | |||
string | cpnttype | |||
) |
Get the path details between dev_from and dev_to, returning an integer value. you need grant execute if you have your own db account
mboardportid_from | : portid from of the mboard start the micro path | |
cpnttype | : cpnt type | |
cpnttype_given | : 1 if you have given a cpnt type, 0 if it should be consider as like 'cpnttype' NB: the i-th entry of the pathid_list|link_pos_list|nfrom|port_nbrfrom|port_typefrom|nto|port_nbrto|port_typeto corresponds to one link of the path |
vector< string > CONFDB::PyGetMicroConnectBetweenBoardCpntAndMotherBoard | ( | string | cpntname_from, | |
int | mboard_portid | |||
) |
Get the path details between dev_from and dev_to, returning an integer value. you need grant execute if you have your own db account
cpntname_from | : name of the board cpnt which wil start the micro path | |
mboard_portid | : portid of the motherboard which wil end the micro path. Put 0 if you want for all of them. NB: the i-th entry of the pathid_list|link_pos_list|nfrom|port_nbrfrom|port_typefrom|nto|port_nbrto|port_typeto corresponds to one link of the path |
string CONFDB::PyDeleteLinkRow | ( | int | linkid, | |
int | macro_link | |||
) |
delete a link returning a string .
linkid | : linkid you want to delete | |
macro_link | : 1 if it's a macro link you want to delete, 0 if it's a micro link |
CONFDBEXCEPTION |
string CONFDB::PyDeletePortRow | ( | int | portid | ) |
delete a port row returning a string .
portid | : portid you want to delete. it will also delete all the links which start from or end at this port |
CONFDBEXCEPTION |
vector< string > CONFDB::PyGetLkTypeDecomposition_lknb | ( | int | lktypeID | ) |
Get the decomposition of the link type of the given linktypeID, returning a vector of strings.
lktypeID | : name of the device type |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyUpdateMultipleDTypeDevices | ( | string | devicename, | |
string | devicetype, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update the devicetype field of a device :make sure that the devicetype exists 1 returning an integer value.
devicename | : name of the device you want to update | |
devicetype | : new value of the devicetype. can't be NULL! and should exist | |
first_time1 | : 1 if it's your first MultipleDevice update (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleDevice last update (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleLkInfoLinks | ( | string | node_from, | |
string | node_to, | |||
string | port_nbrfrom, | |||
string | port_typefrom, | |||
string | port_nbrto, | |||
string | port_typeto, | |||
string | link_info, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update bidirectional link field for a given link returning an integer value. The user should manage the memory : there is no memory allocation. either you give node_from,pfrom or node_to,pto.
node_from | : name of the device starting the link: put "none" if you give node_to | |
node_to | : name of the device ending the link: put "none" if you give node_from | |
port_nbrfrom | : port nb of the device from | |
port_nbrto | : port nb of the device to | |
port_typefrom | : port nb of the device from: put "none" if it doesn't exist or if you provide about the node_to | |
port_typeto | : port nb of the device to:put "none" if it doesn't exist or if you provide about the node_from | |
link_info | : new info on the link | |
first_time1 | : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise. Maximum in one go: 10000 rows. (we force the insert) |
CONFDBEXCEPTION |
string CONFDB::PyGetBootImageRow_devicename | ( | string | functionaldeviname | ) |
Get the row of the boot image information for a given device or device type name returning an integer value.
functionaldeviname | : functional device name or functional device type name. it's case sensitive. |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
string CONFDB::PyDeleteBootImage | ( | string | devicename | ) |
delete boot image information returning an integer value.
devicename | : devicename or device type for which you want to delete the boot information |
string CONFDB::PyInsertMultipleBootImages | ( | string | devicename, | |
string | boot_image, | |||
string | kernel_image_location, | |||
string | initrd_image_location, | |||
string | physical_location, | |||
string | boot_protocol, | |||
int | first_rows, | |||
int | last_rows | |||
) |
insert the boot image information of a given device or device type returning an integer value.
devicename | : name of the device or of the device type | |
boot_image | : will be used to configure the DHCP server. It is mandatory | |
kernel_image_location | : Put "" if absent. | |
initrd_image_location | : Put "" if absent. | |
physical_location | : Put "" if absent. | |
boot_protocol | : usually it;s BOOTP | |
first_rows | : 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 Maximum in one go: 10000 rows.( we force the insert) |
CONFDBEXCEPTION |
string CONFDB::PyUpdateBootImage | ( | string | devicename, | |
string | boot_image, | |||
string | kernel_image_location, | |||
string | initrd_image_location, | |||
string | physical_location, | |||
string | boot_protocol | |||
) |
update the boot image information of a given device or device type returning an integer value.
devicename | : name of the device or of the device type | |
boot_image | : will be used to configure the DHCP server. It is mandatory | |
kernel_image_location | : Put "" if absent. | |
initrd_image_location | : Put "" if absent. | |
physical_location | : Put "" if absent. | |
boot_protocol | : usually it;s BOOTP |
CONFDBEXCEPTION |
int CONFDB::PyGetPortID_portinfo | ( | int | deviceid, | |
string | port_nb, | |||
string | port_type, | |||
int | port_way | |||
) |
Get the portID corresponding to the deviceid, port_nb,port_type and port_way
deviceid | : deviceid | |
port_nb | : port nb of the device | |
port_type | : port type of the port | |
port_way | : port way of the port |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyDeleteIPAlias | ( | string | ipalias | ) |
delete an ipalias .
ipalias | : linkid you want to delete |
CONFDBEXCEPTION |
string CONFDB::PyInsertSimpleDeviceFunction | ( | string | function, | |
int | last | |||
) |
Insert a function , returning a string .
function | : name of the function. | |
last | : 1 if it's your MultipleDeviceType last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertMultipleFunctionalDevices | ( | string | sysname, | |
string | devname, | |||
string | devtype, | |||
int | dnode, | |||
int | promismode, | |||
string | serialnb, | |||
string | hwtype, | |||
string | responsible, | |||
string | location, | |||
string | comments, | |||
string | function_list, | |||
int | first, | |||
int | last | |||
) |
Insert a logical device returning a string .
sysname | : list of the subsystems which use this logical device,separeted by a coma (upper case): ex. VEL0_L1 board is used in the DAQ,TFC and VEL0 | |
devname | : name of the device | |
devtype | : name of the devicetype | |
dnode | : 1 if it's a host node (usually starts or ends a path such as L1FEs) , 0 otherwise. | |
promismode | : 1 if put in this mode (default mode), 0 otherwise | |
serialnb | : serialnb of the device | |
hwtype | : hardware type : | |
responsible | : for the device | |
comments | : comments on the device | |
location | : location of the device (same conv. if inserted in the equipment DB) | |
function_list | : List of functions, separeted by a coma. Ex: DHCP_SERVER, DNS_SERVERPut "none", if there is not. | |
first | : 1 if it's your MultipleDeviceType first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleAttributesDevices | ( | string | devicename, | |
int | node, | |||
int | promiscuous_mode, | |||
string | location, | |||
string | function_list, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update a device returning an integer value.
devicename | : new value of the devicename, if nothing you put none (lower case) | |
node | : new value of node 1 if it's a host node (usually starts or ends a path such as L1FEs) , 0 otherwise.Put -1 not to change the value | |
promiscuous_mode | : new value of prom.mode 1 if put in this mode (default mode), 0 otherwise. Put -1 not to change the value | |
location | : new value of the uuid of the device if nothing you put none (lower case) | |
function_list | : new value of the functions of the device. If several, separate them with a coma. Put "none", if it doesn't have any. | |
first_time1 | : 1 if it's your first MultipleDevice update (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleDevice last update (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyInsertFunctionalDevice | ( | string | sysname, | |
string | devname, | |||
string | devtype, | |||
int | dnode, | |||
int | promismode, | |||
string | serialnb, | |||
string | hwtype, | |||
string | responsible, | |||
string | location, | |||
string | comments, | |||
string | function_list, | |||
int | last | |||
) |
Insert a logical device returning a string .
sysname | : list of the subsystems which use this logical device,separated by a coma (upper case): ex. VEL0_L1 board is used in the DAQ,TFC and VEL0 | |
devname | : name of the device | |
devtype | : name of the devicetype | |
dnode | : 1 if it's a host node (usually starts or ends a path such as L1FEs) , 0 otherwise. | |
promismode | : 1 if put in this mode (default mode), 0 otherwise | |
serialnb | : serialnb of the device | |
hwtype | : hardware type :put "" if nothing | |
responsible | : for the device: :put "" if no responsible | |
comments | : comments on the device (if there are some defaults but working). put "" if no comments | |
location | : location of the device (same conv. if inserted in the equipment DB). Mandatory | |
function_list | : list of the functions of your devices (essentially for the DAQ, for instance DHCP_SERVER, DNS_SERVER...). Functions must be declared using insertSimpleDeviceFunction...If several, separate them with a coma. For ex. DHCP,DNS, NFS. | |
last | : 1 if it's your last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
vector< int > CONFDB::PyGetLkIDsPerLkInfo | ( | string | lkinfo | ) |
Get the list of lkID which have the link_info attributes similar to the given lkinfo, returning a vector of int .
lkinfo | : value of link_info (can be the exact value or contains this value) |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetIPAliasRow | ( | string | ipalias | ) |
Get the row of the given IP alias returning a string value.
ipalias | : ip alias: |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetIPAliasesPerIPName | ( | string | IPName | ) |
Get the list of IP aliases of the IP name, returning a vector of strings.
IPName | :IP name |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyUpdateIPalias | ( | string | old_ipalias, | |
string | new_ipalias | |||
) |
Update IP alias name, returning an integer value.
old_ipalias | : ip alias entry you want to modify. | |
new_ipalias | : new value of ip address entry you want to modify. |
CONFDBEXCEPTION |
string CONFDB::PyUpdateHWSerialNB | ( | string | old_serialnb, | |
string | new_serialnb | |||
) |
Update serialnb due to a mistype, returning an integer value.
old_serialnb | : ip alias entry you want to modify. | |
new_serialnb | : new value of ip address entry you want to modify. |
CONFDBEXCEPTION |
string CONFDB::PyUpdateDeviceFunctionName | ( | string | old_function_name, | |
string | new_function_name | |||
) |
Update the function name due to a mistype, returning an integer value.
old_function_name | : ip alias entry you want to modify. | |
new_function_name | : new value of ip address entry you want to modify. |
CONFDBEXCEPTION |
vector< string > CONFDB::PyGetDeviceNamesPerFunction | ( | string | function_name | ) |
Get the list of device names which have the given function, returning a vector of strings.
function_name | : name of the function. Put "none" if there is not. |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyInsertMultipleIPAliases | ( | string | ip_address, | |
string | ipname, | |||
string | ipalias, | |||
int | first, | |||
int | last | |||
) |
Insert an IP alias , returning a string .
ip_address | : ip address. Put "none", if you provide a IP name | |
ipname | : ip name. Put "none", if you provide a IP @ | |
ipalias | : ip alias to be associated to the given IP name or @. | |
first | : 1 if it's your MultipleDeviceType first insert (save it into the database), 0 otherwise | |
last | : 1 if it's your MultipleDeviceType last insert (save it into the database), 0 otherwise |
CONFDBEXCEPTION |
string CONFDB::PyUpdateMultipleDeviceTypeSystemList | ( | string | devicetype, | |
string | new_systemList, | |||
int | first_time1, | |||
int | last_rows1 | |||
) |
Update the systemlist of a given devicetype
devicetype | : name of the functional device type | |
new_systemList | : new list of the subsystems to which the device belongs to, elt separated by a coma | |
first_time1 | : 1 if it's your MultipleLink first insert (save it into the database), 0 otherwise | |
last_rows1 | : 1 if it's your MultipleLink last insert (save it into the database), 0 otherwise. Maximum in one go: 10000 rows. (we force the insert) |
CONFDBEXCEPTION |
vector< string > CONFDB::PyGetAvailableFunctions | ( | ) |
Get the list of available function, returning a vector of strings.
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyDeleteHWDevice | ( | string | serialnb | ) |
delete a hw device. The status of the hw device should not be IN_USE and should not contain any microscopic cpnts.
serialnb | : serialnb you want to delete |
CONFDBEXCEPTION |
string CONFDB::PyDeleteFunctionalDeviceType | ( | string | devicetype | ) |
delete a functional device type. Devices of this type must be deleted before calling this fct .
devicetype | : device type name you want to delete |
CONFDBEXCEPTION |
string CONFDB::PyDeleteFunctionalDevice | ( | int | deviceid | ) |
delete a functional device. Ports of this device must be deleted before calling this fct. The device should not contain any microscopic cpnts.
deviceid | : deviceid you want to delete |
CONFDBEXCEPTION |
string CONFDB::PyDeleteSystemName | ( | string | system_name | ) |
delete a system name. there should be no device part of this system no longer.
system_name | : system_name you want to delete |
CONFDBEXCEPTION |
vector< string > CONFDB::PyGetListOfSubsystems | ( | ) |
Get the list of available system names, returning a vector of strings.
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyInsertSubsystem | ( | string | system_name, | |
string | parent_name | |||
) |
Insert a system should follwo the ECS convention, returning a string .
system_name | : system name. Ex : VELO, RICH | |
parent_name | : name of the parent system name if it exists. Put "none" if it doesn't. For instance VELO has no parent, but VELO_A has VELO. RICH1 has RICH. Should be the same as the FSM tree. |
CONFDBEXCEPTION |
string CONFDB::PyUpdateSubsystemName | ( | string | old_sysname, | |
string | new_sysname | |||
) |
Update the name of a subsystem to be used in case of MYSTAPE ONLY .
old_sysname | : name of the old system name | |
new_sysname | : name of the new system name |
CONFDBEXCEPTION |
string CONFDB::PySwapTwoDevices | ( | string | functional_devname1, | |
string | functional_devname2, | |||
string | comments | |||
) |
Swap two devices returning an integer value.
functional_devname1 | : functional name of the device 1 | |
functional_devname2 | : functional name of the device 2 | |
comments | : put "none" if you want to put the default comment which is "Swapping functional_devicename1 and functional_devicename1", otherwise, it will append your comment to the default. |
CONFDBEXCEPTION |
string CONFDB::PyGetFunctionalDeviceStatus | ( | string | dname | ) |
Get the status of the given functional device ,
dname | : functional device name: case sensitive. |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetFunctionalBoardCpntStatus | ( | string | cpntname | ) |
Get the status of the given functional board cpnt ,
cpntname | : functional board cpnt name: case sensitive. |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetHWLastFunctionalDevice | ( | string | serialnb | ) |
Get the last functional device name which was occupied by the given hw serialnb ,
serialnb | : hw serialnb : case sensitive. |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetHWLastFunctionalBoardCpntName | ( | string | hw_serialnb, | |
int | hw_snbid | |||
) |
Get the last functional board cpnt name which was occupied by the given hw serialnb ,
hw_serialnb | : serialnb of the board cpnt name: case sensitive. Put "none" if there is not. | |
hw_snbid | : snbid of the board cpnt . case where there is no serialnb. Put -1 if you have provided a serialnb |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetFunctionalDeviceLastHW | ( | string | functional_name | ) |
Get the last hw serialnb which occupies the given functional name ,
functional_name | : functional name of the device: case sensitive. |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetFunctionalBoardCpntNameLastHW | ( | string | functional_cpntname | ) |
Get the last cpnt hw serialnb which occupies the given functional name ,
functional_cpntname | : functional name of the board cpnt: case sensitive. |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetHWDeviceStatus | ( | string | dname | ) |
Get the status of the given hw device ,
dname | : serialnb of the hw: case sensitive. |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetHWBoardCpntStatus | ( | string | serialnb, | |
int | snbid | |||
) |
Get the status of the given hw serialnb ,
serialnb | : serialnb of the board cpnt name: case sensitive. Put "none" if there is not. | |
snbid | : snbid of the board cpnt . case where there is no serialnb. Put -1 if you have provided a serialnb |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetHWDeviceByStatus | ( | string | systemname, | |
string | device_status | |||
) |
Get the list of hw device names given a status, returning a vector of strings.
systemname | : name of the subsystem | |
device_status | : status wanted |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetHWBoardCpntByStatus | ( | string | cpnt_status | ) |
Get the list of hw board cpnt names per status, returning a vector of strings.
cpnt_status | : location |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetHistoryOfHWDevice | ( | string | serial_nb, | |
string | min_date, | |||
string | max_date | |||
) |
Get the history of a hw serialnb filtered by system name
serial_nb | : serialnb of the hw | |
min_date | : min date formatted as follows YY/MM/DD/HH24/MM/SS | |
max_date | : max date formatted as follows YY/MM/DD/HH24/MM/SS |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetHistoryOfHWBoardCpnt | ( | string | serial_nb, | |
int | hw_snbid, | |||
string | min_date, | |||
string | max_date | |||
) |
Get the history of a hw serialnb filtered by system name
serial_nb | : serialnb of the hw. Put "none" if you provide a hw_snbid | |
hw_snbid | : hw_snbid. Put -1 if you have provide a serialnb | |
min_date | : min date formatted as follows YY/MM/DD/HH24/MM/SS. Put "none", if not | |
max_date | : max date formatted as follows YY/MM/DD/HH24/MM/SS. Put "none", if not |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetHistoryOfFunctionalDevice | ( | string | functional_name, | |
string | min_date, | |||
string | max_date | |||
) |
Get the history of a functional_name device filtered by system name
functional_name | : functional_name of the device | |
min_date | : min date formatted as follows YY/MM/DD/HH24/MM/SS | |
max_date | : max date formatted as follows YY/MM/DD/HH24/MM/SS |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetHistoryOfFunctionalBoardCpntName | ( | string | functional_cpntname, | |
string | min_date, | |||
string | max_date | |||
) |
Get the history of a hw serialnb filtered by system name
functional_cpntname | : functional_cpntname of the cpnt_name | |
min_date | : min date formatted as follows YY/MM/DD/HH24/MM/SS. Put "none", if not | |
max_date | : max date formatted as follows YY/MM/DD/HH24/MM/SS. Put "none", if not |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetFunctionalDeviceByStatus | ( | string | systemname, | |
string | device_status | |||
) |
Get the list of functional device names given a status, returning a vector of strings.
systemname | : name of the subsystem | |
device_status | : status wanted |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetSpareHWTypeList | ( | ) |
Get the list of available hwtypes, returning a vector of strings.
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
vector< string > CONFDB::PyGetPortInfoPerSpare | ( | string | snb | ) |
Get the list of port info of a spare hw serialnb returning a vector of strings.
snb | : snb of the spare |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetSparePortRow_snb | ( | string | serialnb, | |
string | port_nb, | |||
int | port_way, | |||
string | port_type | |||
) |
Get the port row returning a string value.
serialnb | : serialnb the spare device | |
port_nb | : port nb of the device | |
port_way | : way 1 if it's an input, 2 if it' an output. | |
port_type | : type of the port Put "none" in lower case, if it's empty. |
if it is successful db_column_type is I for int and C for char*
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found . |
string CONFDB::PyGetHWDeviceRow_serialnb | ( | string | serialnb | ) |
Get the row of the given spare serial nb , returning a string.
serialnb | : serialnb: |
CONFDBEXCEPTION | : "NO_ROWS_SELECTED", if no matching entry in the table has been found. |
string CONFDB::_dbname [private] |
string CONFDB::_login [private] |
string CONFDB::_passwd [private] |