Version: 9.15.0
Session_ServerCheck< MY_NS > Class Template Reference

The class Session_ServerCheck is used to check SALOME servers availability. More...

#include <Session_ServerCheck.hxx>

Inheritance diagram for Session_ServerCheck< MY_NS >:
Inheritance graph

Classes

class  Locker
 Automatic locker/unlocker. More...
 

Public Member Functions

 Session_ServerCheck (QMutex *, QWaitCondition *)
 Constructor. More...
 
virtual ~Session_ServerCheck ()
 Destructor. More...
 
QString currentMessage ()
 Get current information message. More...
 
QString error ()
 Get error message. More...
 
int currentStep ()
 Get current step. More...
 
int totalSteps ()
 Get total number of check steps. More...
 

Protected Member Functions

virtual void run ()
 Thread loop function. Performs SALOME servers check. More...
 

Private Member Functions

void setStep (const int)
 Modify current step. More...
 
void setError (const QString &msg)
 Set error message. More...
 

Private Attributes

QMutex myDataMutex
 data mutex More...
 
QMutex * myMutex
 splash mutex More...
 
QWaitCondition * myWC
 splash wait condition More...
 
bool myCheckCppContainer
 flag : check C++ container More...
 
bool myCheckPyContainer
 flag : check Python container More...
 
bool myCheckSVContainer
 flag : check supervision container More...
 
int myAttempts
 number of attemtps to get response from server More...
 
int myDelay
 delay between attempts in microseconds More...
 
int myCurrentStep
 current step More...
 
QString myMessage
 current information message More...
 
QString myError
 error message More...
 

Friends

class Locker
 

Detailed Description

template<class MY_NS>
class Session_ServerCheck< MY_NS >

The class Session_ServerCheck is used to check SALOME servers availability.

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.

Constructor & Destructor Documentation

◆ Session_ServerCheck()

template<class MY_NS >
Session_ServerCheck< MY_NS >::Session_ServerCheck ( QMutex *  mutex,
QWaitCondition *  wc 
)

Constructor.

Parameters
mutexa mutex used to serialize progress operations (splash)
wca wait condition used in combination with mutex

References Session_ServerCheck< MY_NS >::myAttempts, Session_ServerCheck< MY_NS >::myCheckCppContainer, Session_ServerCheck< MY_NS >::myCheckPyContainer, Session_ServerCheck< MY_NS >::myCheckSVContainer, and Session_ServerCheck< MY_NS >::myDelay.

◆ ~Session_ServerCheck()

template<class MY_NS >
Session_ServerCheck< MY_NS >::~Session_ServerCheck
virtual

Destructor.

Member Function Documentation

◆ currentMessage()

template<class MY_NS >
QString Session_ServerCheck< MY_NS >::currentMessage

Get current information message.

Returns
current message

◆ currentStep()

template<class MY_NS >
int Session_ServerCheck< MY_NS >::currentStep

Get current step.

Returns
current step

◆ error()

template<class MY_NS >
QString Session_ServerCheck< MY_NS >::error

Get error message.

Returns
error message or null string of there was no any error

◆ run()

template<class MY_NS >
void Session_ServerCheck< MY_NS >::run
protectedvirtual

Thread loop function. Performs SALOME servers check.

References Qtx::CmdLineArgs::argc(), and Qtx::CmdLineArgs::argv().

◆ setError()

template<class MY_NS >
void Session_ServerCheck< MY_NS >::setError ( const QString &  msg)
private

Set error message.

Parameters
msgerror message

◆ setStep()

template<class MY_NS >
void Session_ServerCheck< MY_NS >::setStep ( const int  step)
private

Modify current step.

Parameters
stepnew current step value

◆ totalSteps()

template<class MY_NS >
int Session_ServerCheck< MY_NS >::totalSteps

Get total number of check steps.

Returns
total number of steps

Friends And Related Function Documentation

◆ Locker

template<class MY_NS >
friend class Locker
friend

Member Data Documentation

◆ myAttempts

template<class MY_NS >
int Session_ServerCheck< MY_NS >::myAttempts
private

number of attemtps to get response from server

◆ myCheckCppContainer

template<class MY_NS >
bool Session_ServerCheck< MY_NS >::myCheckCppContainer
private

flag : check C++ container

◆ myCheckPyContainer

template<class MY_NS >
bool Session_ServerCheck< MY_NS >::myCheckPyContainer
private

flag : check Python container

◆ myCheckSVContainer

template<class MY_NS >
bool Session_ServerCheck< MY_NS >::myCheckSVContainer
private

flag : check supervision container

◆ myCurrentStep

template<class MY_NS >
int Session_ServerCheck< MY_NS >::myCurrentStep
private

current step

◆ myDataMutex

template<class MY_NS >
QMutex Session_ServerCheck< MY_NS >::myDataMutex
private

data mutex

◆ myDelay

template<class MY_NS >
int Session_ServerCheck< MY_NS >::myDelay
private

delay between attempts in microseconds

◆ myError

template<class MY_NS >
QString Session_ServerCheck< MY_NS >::myError
private

error message

◆ myMessage

template<class MY_NS >
QString Session_ServerCheck< MY_NS >::myMessage
private

current information message

◆ myMutex

template<class MY_NS >
QMutex* Session_ServerCheck< MY_NS >::myMutex
private

splash mutex

◆ myWC

template<class MY_NS >
QWaitCondition* Session_ServerCheck< MY_NS >::myWC
private

splash wait condition


The documentation for this class was generated from the following files: