1 : |
agomez |
1 |
#ifndef pvmconstants_h
|
2 : |
|
|
#define pvmconstants_h
|
3 : |
|
|
|
4 : |
|
|
/**
|
5 : |
|
|
* \class PVMConstants
|
6 : |
|
|
* \brief This is the class used to store information about the different tags and data encoding that can be used during the PVM network communication
|
7 : |
|
|
*/
|
8 : |
|
|
class PVMConstants {
|
9 : |
|
|
public:
|
10 : |
|
|
/**
|
11 : |
|
|
* \brief This is the default PVMConstants constructor
|
12 : |
|
|
*/
|
13 : |
|
|
PVMConstants();
|
14 : |
|
|
/**
|
15 : |
|
|
* \brief This is the default PVMConstants destructor
|
16 : |
|
|
*/
|
17 : |
|
|
~PVMConstants() {};
|
18 : |
|
|
/**
|
19 : |
|
|
* \brief This function will return the flag used to indicate that PVM has been stopped
|
20 : |
|
|
* \return stopPVM
|
21 : |
|
|
*/
|
22 : |
|
|
const int getStopTag() const { return stopPVM; };
|
23 : |
|
|
/**
|
24 : |
|
|
* \brief This function will return the flag used to indicate that PVM has been started
|
25 : |
|
|
* \return startPVM
|
26 : |
|
|
*/
|
27 : |
|
|
const int getStartTag() const { return startPVM; };
|
28 : |
|
|
/**
|
29 : |
|
|
* \brief This function will return the flag used to indicate that the PVM master is sending variables data
|
30 : |
|
|
* \return masterSendVar
|
31 : |
|
|
*/
|
32 : |
|
|
const int getMasterSendVarTag() const { return masterSendVar; };
|
33 : |
|
|
/**
|
34 : |
|
|
* \brief This function will return the flag used to indicate that the PVM master is sending string data
|
35 : |
|
|
* \return masterSendString
|
36 : |
|
|
*/
|
37 : |
|
|
const int getMasterSendStringTag() const { return masterSendString; };
|
38 : |
|
|
/**
|
39 : |
|
|
* \brief This function will return the flag used to indicate that the PVM master is sending bounds data
|
40 : |
|
|
* \return masterSendBound
|
41 : |
|
|
*/
|
42 : |
|
|
const int getMasterSendBoundTag() const { return masterSendBound; };
|
43 : |
|
|
/**
|
44 : |
|
|
* \brief This function will return the flag used to indicate that the PVM master is receiving data
|
45 : |
|
|
* \return masterReceiveData
|
46 : |
|
|
*/
|
47 : |
|
|
const int getMasterReceiveDataTag() const { return masterReceiveData; };
|
48 : |
|
|
/**
|
49 : |
|
|
* \brief This function will return the flag used to indicate that a task has died
|
50 : |
|
|
* \return taskDied
|
51 : |
|
|
*/
|
52 : |
|
|
const int getTaskDiedTag() const { return taskDied; };
|
53 : |
|
|
/**
|
54 : |
|
|
* \brief This function will return the flag used to indicate that a task has exited
|
55 : |
|
|
* \return taskExit
|
56 : |
|
|
*/
|
57 : |
|
|
const int getDataEncode() const { return dataEncode; };
|
58 : |
|
|
/**
|
59 : |
|
|
* \brief This function will set the flag used to indicate the data encoding that will take place during the PVM network communication
|
60 : |
|
|
* \param dc the new value for dataEncode
|
61 : |
|
|
*/
|
62 : |
|
|
void setDataEncode(const int dc);
|
63 : |
|
|
private:
|
64 : |
|
|
/**
|
65 : |
|
|
* \brief This is the flag used to indicate that PVM has been stopped
|
66 : |
|
|
*/
|
67 : |
|
|
int stopPVM;
|
68 : |
|
|
/**
|
69 : |
|
|
* \brief This is the flag used to indicate that PVM has been started
|
70 : |
|
|
*/
|
71 : |
|
|
int startPVM;
|
72 : |
|
|
/**
|
73 : |
|
|
* \brief This is the flag used to indicate that a task has died
|
74 : |
|
|
*/
|
75 : |
|
|
int taskDied;
|
76 : |
|
|
/**
|
77 : |
|
|
* \brief This is the flag used to indicate that the PVM master is sending variables data
|
78 : |
|
|
*/
|
79 : |
|
|
int masterSendVar;
|
80 : |
|
|
/**
|
81 : |
|
|
* \brief This is the flag used to indicate that the PVM master is sending strings data
|
82 : |
|
|
*/
|
83 : |
|
|
int masterSendString;
|
84 : |
|
|
/**
|
85 : |
|
|
* \brief This is the flag used to indicate that the PVM master is sending bounds data
|
86 : |
|
|
*/
|
87 : |
|
|
int masterSendBound;
|
88 : |
|
|
/**
|
89 : |
|
|
* \brief This is the flag used to indicate that the PVM master is receiving data
|
90 : |
|
|
*/
|
91 : |
|
|
int masterReceiveData;
|
92 : |
|
|
/**
|
93 : |
|
|
* \brief This is the flag used to indicate the data encoding that will take place during the PVM network communication
|
94 : |
|
|
* \note Possible values for dataEncode are 0 (for XDR encoding), 1 (for no encoding, the default) and 2 (to leave the data in place during the network communication)
|
95 : |
|
|
*/
|
96 : |
|
|
int dataEncode;
|
97 : |
|
|
};
|
98 : |
|
|
|
99 : |
|
|
#endif
|