UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pep_client.hpp
1 /* pep_client.hpp */
2 /* $Id: pep_client.hpp,v 1.3 2009/04/16 09:11:29 vlad Exp $ */
3 #ifndef __pep_client_hpp
4 #define __pep_client_hpp
5 
6 #include <sys/types.h>
7 
8 #include <csi/pep.H>
9 
10 
16 {
17 public:
18 
20  enum ClientStatus {
21  BeforeRun = 0,
22  Running,
23  Finished
24  };
25 
26  Protocol *pepParameters;
27  Protocol *pepRuntime;
28  Protocol *pepResults;
29  Protocol *pepProperties;
30 
34  PEP_Client (const char* szAppName, bool bServerRuntime = false);
35 
37  virtual ~PEP_Client ();
38 
40  const char* appName () const;
41 
44  int jobNumber () const;
45 
47  void newJobNumber ();
48 
50  void resetJobNumber ();
51 
54  pid_t pid () const;
55 
57  ClientStatus status () const;
58 
61  ClientStatus status (int* pExitStatus);
62 
67  int run (const char* szLogFpath = NULL);
68 
72  ErrCode waitForExit (int* pExitStatus = NULL);
73 
77  bool hasProperty (const char* szPropName,
78  const char* szType = NULL) const;
79 
82  const char* property (const char* szPropName) const;
83 
84 protected:
85 
87  char *m_szAppName;
88 
90  pid_t m_nPid;
91 
93  int m_nJob;
94 
97 };
98 
99 
100 #endif /* pep_client.hpp */
ClientStatus status() const
int m_nJob
Definition: pep_client.hpp:93
virtual ~PEP_Client()
ClientStatus m_eStatus
Definition: pep_client.hpp:96
int jobNumber() const
void resetJobNumber()
PEP_Client(const char *szAppName, bool bServerRuntime=false)
Definition: pep_client.hpp:15
int run(const char *szLogFpath=NULL)
pid_t pid() const
pid_t m_nPid
Definition: pep_client.hpp:90
bool hasProperty(const char *szPropName, const char *szType=NULL) const
void newJobNumber()
const char * appName() const
Definition: pep.H:23
ClientStatus
Definition: pep_client.hpp:20
const char * property(const char *szPropName) const
char * m_szAppName
Definition: pep_client.hpp:87
ErrCode waitForExit(int *pExitStatus=NULL)