OpendTect-6_4  6.4
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | 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 (int firstport=19345, int niceval=19)
 
virtual ~JobIOMgr ()
 
const char * peekMsg ()
 
void fetchMsg (BufferString &bs)
 
bool startProg (const char *, IOPar &, const FilePath &, const JobInfo &, const char *)
 
void setNiceNess (int n)
 
void reqModeForJob (const JobInfo &, Mode)
 
void removeJob (const char *, int)
 
bool isReady () const
 
ObjQueue< StatusInfo > & statusQueue ()
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

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)
 

Protected Member Functions

bool mkIOParFile (FilePath &, const FilePath &basefnm, const HostData &, const IOPar &)
 
void mkCommand (CommandString &, const HostData &, const char *progname, const FilePath &basefp, const FilePath &iopfp, const JobInfo &, const char *rshcomm)
 
void mkCommand (OS::MachineCommand &, const HostData &, const char *progname, const FilePath &basefp, const FilePath &iopfp, const JobInfo &, const char *rshcomm)
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

JobIOHandler & iohdlr_
 
BufferString msg_
 
int niceval_
 

Detailed Description

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

Member Enumeration Documentation

Enumerator
Work 
Pause 
Stop 

Constructor & Destructor Documentation

JobIOMgr::JobIOMgr ( int  firstport = 19345,
int  niceval = 19 
)
virtual JobIOMgr::~JobIOMgr ( )
virtual

Member Function Documentation

void JobIOMgr::fetchMsg ( BufferString bs)
inline
bool JobIOMgr::isReady ( ) const
void JobIOMgr::mkCommand ( CommandString ,
const HostData ,
const char *  progname,
const FilePath basefp,
const FilePath iopfp,
const JobInfo ,
const char *  rshcomm 
)
protected
void JobIOMgr::mkCommand ( OS::MachineCommand ,
const HostData ,
const char *  progname,
const FilePath basefp,
const FilePath iopfp,
const JobInfo ,
const char *  rshcomm 
)
protected
static bool JobIOMgr::mkIOParFile ( const FilePath basefnm,
const HostData ,
const IOPar ,
FilePath ,
BufferString msg 
)
static
bool JobIOMgr::mkIOParFile ( FilePath ,
const FilePath basefnm,
const HostData ,
const IOPar  
)
protected
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 ).

const char* JobIOMgr::peekMsg ( )
inline
void JobIOMgr::removeJob ( const char *  ,
int   
)
void JobIOMgr::reqModeForJob ( const JobInfo ,
Mode   
)
void JobIOMgr::setNiceNess ( int  n)
inline
bool JobIOMgr::startProg ( const char *  ,
IOPar ,
const FilePath ,
const JobInfo ,
const char *   
)
ObjQueue<StatusInfo>& JobIOMgr::statusQueue ( )

Member Data Documentation

JobIOHandler& JobIOMgr::iohdlr_
protected
BufferString JobIOMgr::msg_
protected
int JobIOMgr::niceval_
protected

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