#include <pvminterface.h>
Collaboration diagram for PVMInterface:
Public Methods | |
PVMInterface (const char *name, bool ismaster, int ntasks, int stardid, int stopid) throw (runtime_error) | |
Starts the PVM interface and syncs all the tasks. More... | |
~PVMInterface () | |
Closes down the PVM connection and notifies pvmd. More... | |
void | BroadcastCommand (const char *commandline) throw (runtime_error) |
Sends a string command to every member of the STANDBY group. More... | |
void | SendCommand (int taskno, const char *commandline) throw (runtime_error) |
void | GetCommandWithTimeout (char *commandline) throw (runtime_error) |
Waits for and reads a command line sent by the master If no command has arrived after a delay, returns with "". More... | |
bool | MessagePending () |
int | LastMessageOriginator () |
returns the task number of the last received message or -1 if not found. More... | |
bool | AllStandby () throw (runtime_error) |
void | LeaveStandbyGroup () |
void | JoinStandbyGroup () |
int | FindTask (uint32 id) |
Returns tasklist index of first task which contains the id number. Returns -1 if not found. More... | |
const char * | Name (int k) |
int | NumberOfTasks () |
int | NumberOfOtherTasks () |
uint32 | StartID (int k) |
uint32 | StopID (int k) |
bool | IsMaster () |
bool | IsSlave () |
void | GetLeafCounts (unsigned int *countsarray, uint32 *size) throw (runtime_error) |
Fills the countsarray with a list of occupied LeafNodes from another task. More... | |
void | SendLeafCounts (int tid, unsigned int *countsarray, uint32 size) throw (runtime_error) |
Private Attributes | |
PVMTaskInfo | myinfo |
bool | is_master |
int | num_tasks |
PVMTaskInfo * | tasklist |
int | last_message_tid |
int | last_message_size |
int | last_message_msgtag |
Definition at line 47 of file pvminterface.h.
|
Starts the PVM interface and syncs all the tasks. Every task collects some information about itself which must be sent to all others. The PVMInterface constructor's job is to synchronize all tasks, broadcast this task's details and read all other tasks' details into the tasklist array. Definition at line 33 of file pvminterface.cc. References PVMINTERFACE_NAMELEN, and PVMINTERFACE_SENDINFO. |
|
Closes down the PVM connection and notifies pvmd.
Definition at line 112 of file pvminterface.cc. References tasklist. |
|
Definition at line 154 of file pvminterface.cc. |
|
Sends a string command to every member of the STANDBY group.
Definition at line 215 of file pvminterface.cc. References PVMINTERFACE_SENDCOMMAND. Referenced by Talker::ProcessCommand(). |
|
Returns tasklist index of first task which contains the id number. Returns -1 if not found.
Definition at line 130 of file pvminterface.cc. References num_tasks, PVMTaskInfo::start_id, PVMTaskInfo::stop_id, tasklist, and uint32. |
|
Waits for and reads a command line sent by the master If no command has arrived after a delay, returns with "".
Definition at line 266 of file pvminterface.cc. References PVMINTERFACE_SENDCOMMAND. Referenced by Talker::ProcessCommand(). |
|
Fills the countsarray with a list of occupied LeafNodes from another task. The size parameter should be set to the maximum allowable size of the countsarray. The returned value of size is the actual size of the countsarray. Definition at line 299 of file pvminterface.cc. References PVMINTERFACE_SENDLEAFUPD, and uint32. Referenced by Talker::ProcessCommand(). |
|
Definition at line 76 of file pvminterface.h. References is_master. Referenced by Talker::ProcessCommand(). |
|
Definition at line 78 of file pvminterface.h. |
|
Definition at line 176 of file pvminterface.cc. |
|
returns the task number of the last received message or -1 if not found.
Definition at line 247 of file pvminterface.cc. References last_message_tid, num_tasks, tasklist, and PVMTaskInfo::tid. Referenced by Talker::ProcessCommand(). |
|
Definition at line 169 of file pvminterface.cc. |
|
Definition at line 121 of file pvminterface.cc. References PVMINTERFACE_SENDCOMMAND. Referenced by Talker::ProcessCommand(). |
|
Definition at line 145 of file pvminterface.cc. References PVMTaskInfo::name, num_tasks, and tasklist. |
|
Definition at line 69 of file pvminterface.h. References num_tasks. Referenced by Talker::ProcessCommand(). |
|
Definition at line 67 of file pvminterface.h. References num_tasks. Referenced by Talker::ProcessCommand(). |
|
Definition at line 183 of file pvminterface.cc. References PVMINTERFACE_SENDCOMMAND. Referenced by Talker::ProcessCommand(). |
|
Definition at line 326 of file pvminterface.cc. References PVMINTERFACE_SENDLEAFUPD, and uint32. |
|
Definition at line 71 of file pvminterface.h. References num_tasks, PVMTaskInfo::start_id, tasklist, and uint32. Referenced by Talker::ProcessCommand(). |
|
Definition at line 73 of file pvminterface.h. References num_tasks, PVMTaskInfo::stop_id, tasklist, and uint32. Referenced by Talker::ProcessCommand(). |
|
Definition at line 86 of file pvminterface.h. |
|
Definition at line 93 of file pvminterface.h. |
|
Definition at line 92 of file pvminterface.h. |
|
Definition at line 91 of file pvminterface.h. Referenced by LastMessageOriginator(). |
|
Definition at line 85 of file pvminterface.h. |
|
Definition at line 87 of file pvminterface.h. Referenced by FindTask(), IsSlave(), LastMessageOriginator(), Name(), NumberOfOtherTasks(), NumberOfTasks(), StartID(), and StopID(). |
|
Definition at line 89 of file pvminterface.h. Referenced by FindTask(), LastMessageOriginator(), Name(), StartID(), StopID(), and ~PVMInterface(). |