KPvm Class Reference

[Kpvm Index] [Kpvm Hierarchy] [Headers]


KPvm is the Main PVM-Wrapper. More...

#include <kpvm.h>

Inherits: QWidget

Public Members

Public Slots

Protected Members

Protected Slots

Signals

Private Members


Detailed Description

KPVm stands for the local running pvm-process so there must be exactly one instance of KPvm. It provides the basic functions and handles them through to the non-OO pvm.


KPvm(QWidget *parent=0, const char *name=0) [public]

**\n

bool hasPvmParent() [public]

checks if this object has a spawning parent or not.

KPvmParent* pvmParent() [public]

returns a KPvmParent object of the spawning parent or NULL if there is no parent.

int tid() const [public]

returns the TaskId of the main KPvm-Object

QString hostName() const [public]

returns the hostname on which this main KPvm-Object is running

QList<KPvmChild> spawn(QString fname, char **argv=0 , int flag=PvmDataDefault , QString where="" , int numProc=1 ) [public]

creates numProc tasks and returns a QList< KPvmChild > representing the newly created tasks.

Parameters:
argv argument vector for the invoked fname
flag same as the non-OO-pvm spawn
PvmDataDefault-->PVM can choose any host to start on
PvmTaskHost-->where contains the hostname to start on
PvmTaskArch-->where contains the architecture to start on
numProc number of tasks to spawn
fname Filename of the pvm-executable (may also be non-OO-pvm). If fname is not an absolute file, the actual working directory path is added.

void send(KPvmEntity* entity, Serialize* data , int msgtag, bool sendNetEfficient=true) [public slot]

sends a child of Persist to a KPvmEntity with a msgtag. Persist::objState of the child of Persist is called and this state is then packaged and sent to KPvmEntity

Parameters:
sendNetEfficient true (default) packs the types and looses the VarTags
false packs the whole VarTuples incl. VarTags as strings

void changeCheckInterval(int msecs) [public slot]

changes the interval in which it is looked for newly received data. When this object is constructed, a 20 msec Interval is installed.

void insertNewEntity(KPvmEntity *ent) [protected]

this is internally used to store every known KPvmEntity which was spawned by KPvm or the local parent.

void checkRecv() [protected slot]

checks in constant time intervals if there is incoming KPersist data from other tasks.

void exit() [protected slot]

is called to exit cleanly from Qt and pvm.

void dataReceived(QString className, QList<VarTuple> objState , int msgtag, KPvmEntity *entity) [signal]

dataRecieved is the most important signal, as it passes all received data to the connected slots. You have to connect an object-generating slot to it (see kpvm-example) where you go through all your possibly sendable Classes (inheriting Persist) and create an apropriate class and fill it with KPvm::setObjState

If your programm works im different steps (eg. Database split -> join -> merge back) you may want to have different handling slots and you may want to connect/disconnect to the dataHandler needed...


  • Author: Michael Kropfberger <michael.kropfberger@gmx.net>
  • Documentation generated by mike@kermit on Mon Jun 29 21:55:33 MEST 1998
Kdoc