OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
JobIOMgr Class Reference

Handles starting & stopping of jobs on client machines. Sets up a separate thread to maintain contact with client. More...

Inheritance diagram for JobIOMgr:
[legend]

Public Types

enum  Mode { Work , Pause , Stop }
 

Public Member Functions

 JobIOMgr (PortNr_Type firstport=19345, int niceval=19)
 
virtual ~JobIOMgr ()
 
Network::Authority authority () const
 
void fetchMsg (BufferString &bs)
 
bool isReady () const
 
const char * peekMsg ()
 
void removeJob (const char *, int)
 
void reqModeForJob (const JobInfo &, Mode)
 
void setNiceNess (int n)
 
bool startProg (const char *, IOPar &, const FilePath &, const JobInfo &, const char *)
 
ObjQueue< StatusInfo > & statusQueue ()
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 

Static Public Member Functions

static bool mkIOParFile (const FilePath &basefnm, const HostData &, const IOPar &, FilePath &, BufferString &msg)
 
static BufferString mkRexecCmd (const char *prognm, const HostData &machine, const HostData &localhost)
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

void mkCommand (OS::MachineCommand &, const HostData &, const char *progname, const FilePath &basefp, const FilePath &iopfp, const JobInfo &, const char *rshcomm)
 
bool mkIOParFile (FilePath &, const FilePath &basefnm, const HostData &, const IOPar &)
 

Protected Attributes

OS::CommandExecPars execpars_
 
JobIOHandler & iohdlr_
 
BufferString msg_
 
int niceval_
 

Private Member Functions

void setRexecCmd (const char *prognm, const HostData &machine, const HostData &localhost, OS::MachineCommand &) const
 

Detailed Description

Handles starting & stopping of jobs on client machines. Sets up a separate thread to maintain contact with client.

<>

Member Enumeration Documentation

◆ Mode

Enumerator
Work 
Pause 
Stop 

Constructor & Destructor Documentation

◆ JobIOMgr()

JobIOMgr::JobIOMgr ( PortNr_Type  firstport = 19345,
int  niceval = 19 
)

◆ ~JobIOMgr()

virtual JobIOMgr::~JobIOMgr ( )
virtual

Member Function Documentation

◆ authority()

Network::Authority JobIOMgr::authority ( ) const

◆ fetchMsg()

void JobIOMgr::fetchMsg ( BufferString bs)
inline

◆ isReady()

bool JobIOMgr::isReady ( ) const

◆ mkCommand()

void JobIOMgr::mkCommand ( OS::MachineCommand ,
const HostData ,
const char *  progname,
const FilePath basefp,
const FilePath iopfp,
const JobInfo ,
const char *  rshcomm 
)
protected

◆ mkIOParFile() [1/2]

static bool JobIOMgr::mkIOParFile ( const FilePath basefnm,
const HostData ,
const IOPar ,
FilePath ,
BufferString msg 
)
static

◆ mkIOParFile() [2/2]

bool JobIOMgr::mkIOParFile ( FilePath ,
const FilePath basefnm,
const HostData ,
const IOPar  
)
protected

◆ mkRexecCmd()

static BufferString JobIOMgr::mkRexecCmd ( const char *  prognm,
const HostData machine,
const HostData localhost 
)
static

Sets up the command to be executed with GetScriptDir()/exec_prog script. This latter ensures all the environment is restored on the remote machine ( rsh/ssh do NOT forward environment variables such as LD_LIBRARY_PATH ).

◆ peekMsg()

const char* JobIOMgr::peekMsg ( )
inline

◆ removeJob()

void JobIOMgr::removeJob ( const char *  ,
int   
)

◆ reqModeForJob()

void JobIOMgr::reqModeForJob ( const JobInfo ,
Mode   
)

◆ setNiceNess()

void JobIOMgr::setNiceNess ( int  n)
inline

◆ setRexecCmd()

void JobIOMgr::setRexecCmd ( const char *  prognm,
const HostData machine,
const HostData localhost,
OS::MachineCommand  
) const
private

◆ startProg()

bool JobIOMgr::startProg ( const char *  ,
IOPar ,
const FilePath ,
const JobInfo ,
const char *   
)

◆ statusQueue()

ObjQueue<StatusInfo>& JobIOMgr::statusQueue ( )

Member Data Documentation

◆ execpars_

OS::CommandExecPars JobIOMgr::execpars_
protected

◆ iohdlr_

JobIOHandler& JobIOMgr::iohdlr_
protected

◆ msg_

BufferString JobIOMgr::msg_
protected

◆ niceval_

int JobIOMgr::niceval_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024