This class is like a class for all subsystems in the ConfDB, it is responsible to connect and disconnect to and from the ConfDB, retrieving subsystem info from the configuration file, setting global variables and retrieving info about available subsystems.
Definition at line 160 of file objectclasses.py.
Public Member Functions | |
def | __init__ |
def | SetErrorMessage |
def | GetErrorMessage |
def | GetSubSystems |
def | Connect |
def | Disconnect |
def | GetAllDeviceFunctions |
def | GetAllSpareHWTypes |
def | GetDevicesByLocation |
Private Member Functions | |
def | __setSettingsFile |
def | __getSettingsFile |
def | __isConnected |
Private Attributes | |
__cfg | |
__connected | |
__main | |
__rootDir | |
__subsystems | |
__functions | |
__errormessage | |
return True |
def objectclasses::DBSystem::__init__ | ( | self, | ||
cfgFile, | ||||
main | ||||
) |
Constructor
Parameters: - a reference to the program configuration file - a reference to the program instance (MainWindow), for communication purposes
Definition at line 169 of file objectclasses.py.
def objectclasses::DBSystem::__setSettingsFile | ( | self, | ||
settingsfile | ||||
) | [private] |
Set configuration file.
- reference to the configuration file
Definition at line 191 of file objectclasses.py.
def objectclasses::DBSystem::__getSettingsFile | ( | self | ) | [private] |
Return the reference to the configuration file.
!return - reference to the configuration file.
Definition at line 199 of file objectclasses.py.
def objectclasses::DBSystem::SetErrorMessage | ( | self, | ||
msg | ||||
) |
Definition at line 202 of file objectclasses.py.
def objectclasses::DBSystem::GetErrorMessage | ( | self | ) |
Definition at line 205 of file objectclasses.py.
def objectclasses::DBSystem::GetSubSystems | ( | self | ) |
Definition at line 208 of file objectclasses.py.
def objectclasses::DBSystem::__isConnected | ( | self | ) | [private] |
Return whether we are connected to the ConfDB or not.
!return - True if we are connected, False otherwise
Definition at line 234 of file objectclasses.py.
def objectclasses::DBSystem::Connect | ( | self, | ||
rootDir | ||||
) |
Connect and set up a persistent connection to the ConfDB. Set the connection object to be available for every other object; as a global variable.
- The root directory of where we will start to search in the configuration file (set file cursor)
Definition at line 245 of file objectclasses.py.
def objectclasses::DBSystem::Disconnect | ( | self | ) |
Disconnect from the ConfDB. Destroy the persistent connection.
Definition at line 295 of file objectclasses.py.
def objectclasses::DBSystem::GetAllDeviceFunctions | ( | self | ) |
Get all the available funcitons
!return - a list of device functions available if successful, an empty list if none found, and False if an error occurs.
Definition at line 329 of file objectclasses.py.
def objectclasses::DBSystem::GetAllSpareHWTypes | ( | self | ) |
Get all the available funcitons
!return - a list of device functions available if successful, an empty list if none found, and False if an error occurs.
Definition at line 355 of file objectclasses.py.
def objectclasses::DBSystem::GetDevicesByLocation | ( | self, | ||
location_string | ||||
) |
General get a device at a given location. TODO: should also be moved to SubSystem class. NB! This function does not look for devices that are not yet stored in the ConfDB.
- the location string which looks for devices with the same location string set.
Definition at line 382 of file objectclasses.py.
objectclasses::DBSystem::__cfg [private] |
Definition at line 171 of file objectclasses.py.
objectclasses::DBSystem::__connected [private] |
Definition at line 176 of file objectclasses.py.
objectclasses::DBSystem::__main [private] |
Definition at line 179 of file objectclasses.py.
objectclasses::DBSystem::__rootDir [private] |
Definition at line 180 of file objectclasses.py.
objectclasses::DBSystem::__subsystems [private] |
Definition at line 182 of file objectclasses.py.
objectclasses::DBSystem::__functions [private] |
Definition at line 183 of file objectclasses.py.
objectclasses::DBSystem::__errormessage [private] |