The class Session_ServerCheck is used to check SALOME servers availability. More...
#include <Session_ServerCheck.hxx>

Data Structures | |
| class | Locker |
| Automatic locker/unlocker. More... | |
Public Member Functions | |
| Session_ServerCheck (QMutex *, QWaitCondition *) | |
| Constructor. | |
| virtual | ~Session_ServerCheck () |
| Destructor. | |
| QString | currentMessage () |
| Get current information message. | |
| QString | error () |
| Get error message. | |
| int | currentStep () |
| Get current step. | |
| int | totalSteps () |
| Get total number of check steps. | |
Protected Member Functions | |
| virtual void | run () |
| Thread loop function. Performs SALOME servers check. | |
Private Member Functions | |
| void | setStep (const int) |
| Modify current step. | |
| void | setError (const QString &msg) |
| Set error message. | |
Private Attributes | |
| QMutex | myDataMutex |
| data mutex | |
| QMutex * | myMutex |
| splash mutex | |
| QWaitCondition * | myWC |
| splash wait condition | |
| bool | myCheckCppContainer |
| flag : check C++ container | |
| bool | myCheckPyContainer |
| flag : check Python container | |
| bool | myCheckSVContainer |
| flag : check supervision container | |
| int | myAttempts |
| number of attemtps to get response from server | |
| int | myDelay |
| delay between attempts in microseconds | |
| int | myCurrentStep |
| current step | |
| QString | myMessage |
| current information message | |
| QString | myError |
| error message | |
Friends | |
| class | Locker |
It runs in the secondrary thread. The number of attemts to check each SALOME server and the time delay between checks can be specified via setting the CSF_RepeatServerRequest and CSF_DelayServerRequest environment variables.
Total number of the check attempts can be retrieved via totalSteps() method and current check step can be retrieved via currentStep() method.
The method currentMessage() can be used to get the information message about what SALOME server is currently checked. If any error occured (some server could not be found) the thread loop is stopped and error status is set. Error message can be retrieved with the error() method.
| Session_ServerCheck::Session_ServerCheck | ( | QMutex * | mutex, |
| QWaitCondition * | wc | ||
| ) |
| mutex | a mutex used to serialize progress operations (splash) |
| wc | a wait condition used in combination with mutex |
References myAttempts, myCheckCppContainer, myCheckPyContainer, myCheckSVContainer, and myDelay.
| Session_ServerCheck::~Session_ServerCheck | ( | ) | [virtual] |
| QString Session_ServerCheck::currentMessage | ( | ) |
References myAttempts, myCurrentStep, and myDataMutex.
| QString Session_ServerCheck::error | ( | ) |
References myDataMutex, and myError.
| int Session_ServerCheck::currentStep | ( | ) |
References myCurrentStep, and myDataMutex.
| int Session_ServerCheck::totalSteps | ( | ) |
References myAttempts, myCheckCppContainer, myCheckPyContainer, myCheckSVContainer, and myDataMutex.
| void Session_ServerCheck::run | ( | ) | [protected, virtual] |
References error(), myAttempts, myCheckCppContainer, myCheckPyContainer, myCheckSVContainer, PyInterp.obj, PyInterp.orb, setError(), and setStep().
| void Session_ServerCheck::setStep | ( | const int | step | ) | [private] |
| step | new current step value |
References myCurrentStep, and myDataMutex.
| void Session_ServerCheck::setError | ( | const QString & | msg | ) | [private] |
| msg | error message |
References myDataMutex, and myError.
friend class Locker [friend] |
QMutex Session_ServerCheck.myDataMutex [private] |
QMutex* Session_ServerCheck.myMutex [private] |
QWaitCondition* Session_ServerCheck.myWC [private] |
bool Session_ServerCheck.myCheckCppContainer [private] |
bool Session_ServerCheck.myCheckPyContainer [private] |
bool Session_ServerCheck.myCheckSVContainer [private] |
int Session_ServerCheck.myAttempts [private] |
int Session_ServerCheck.myDelay [private] |
int Session_ServerCheck.myCurrentStep [private] |
QString Session_ServerCheck.myMessage [private] |
QString Session_ServerCheck.myError [private] |