#include <cnetmod.h>
Inheritance diagram for cNetMod::
Public Methods | |
Constructors, destructor, assignment. | |
cNetMod (const cNetMod &m) | |
cNetMod () | |
virtual | ~cNetMod () |
virtual cNetMod& | operator= (const cNetMod &other) |
Redefined cModule member functions. | |
virtual bool | isSimple () const |
virtual void | scheduleStart (simtime_t t) |
virtual void | deleteModule () |
virtual bool | callInitialize (int stage) |
virtual void | callFinish () |
Miscellaneous. | |
virtual void | init ()=0 |
Information about the local segment. | |
virtual const char* | localhost ()=0 |
int | isLocalMachineIn (const cArray &m) |
Gates. | |
virtual int | net_addgate (cModule *mod, int gate, char tp) |
virtual cGate* | ingate (int g)=0 |
virtual cGate* | ingate (const char *s)=0 |
virtual int | findingate (const char *s)=0 |
virtual cGate* | outgate (int g)=0 |
virtual cGate* | outgate (const char *s)=0 |
virtual int | findoutgate (const char *s)=0 |
Sending output to the console. | |
These functions are called on background (non-console) segments by the simulation application (i.e. the cEnvir implementation), to send output to the console. | |
virtual void | putmsg_onconsole (const char *s)=0 |
virtual void | puts_onconsole (const char *s)=0 |
virtual bool | gets_onconsole (const char *promptstr, char *buf, int len)=0 |
virtual bool | askyesno_onconsole (const char *question)=0 |
Setting up and stopping a parallel simulation run. | |
virtual short | start_segments (cArray &host_list, int ac, char *av[])=0 |
virtual void | setup_connections ()=0 |
virtual void | clear () |
virtual void | stop_all_segments ()=0 |
virtual void | request_stopsimulation ()=0 |
virtual int | receive_runnumber ()=0 |
virtual void | send_runnumber (int run_nr)=0 |
Executing a parallel simulation run. | |
virtual void | restart () |
virtual void | sync_after_modinits ()=0 |
virtual void | process_netmsgs ()=0 |
virtual void | process_netmsg_blocking ()=0 |
virtual void | send_syncpoint (simtime_t t, int gate)=0 |
virtual void | send_cancelsyncpoint (simtime_t t, int gate)=0 |
virtual bool | block_on_syncpoint (simtime_t t)=0 |
This is the abstract base class of the classes supporting distributed simulation in various environments.
The class definition for a given environment may be inherited from this class. In the simulation, the global pointer of the network module (simulation.netmodp) is of type cNetMod. The advantage of this base class is that the network interface can be replaced transparently. The drawback is, that beside the general purpose functions, this class has to also declare all environment specific ones, of course all are virtual.
The virtual functions will be redefined in the specific network interface.(e.g.:pvmmod.cc)
|
Copy constructor. |
|
Constructor. |
|
Destructor. |
|
MISSINGDOC: cNetMod:bool askyesno_onconsole(char*) |
|
MISSINGDOC: cNetMod:bool block_on_syncpoint(simtime_t) |
|
Not used, implemented because it could not remain pure virtual. The implementation was copied from cSimpleModule. Reimplemented from cModule. |
|
Not used, implemented because it could not remain pure virtual. The implementation was copied from cSimpleModule. Reimplemented from cModule. |
|
MISSINGDOC: cNetMod:void clear() |
|
Not used, implemented because it could not remain pure virtual. This dummy implementation does nothing. Reimplemented from cModule. |
|
MISSINGDOC: cNetMod:int findingate(char*) |
|
MISSINGDOC: cNetMod:int findoutgate(char*) |
|
MISSINGDOC: cNetMod:bool gets_onconsole(char*,char*,int) |
|
Returns the input gate identified by its name. |
|
Returns the input gate identified by its index. |
|
Does initialization task that can't be done in the constructor. |
|
Returns true if the name of the local machine is in the array passed as argument. The array should contain string-valued cPar objects. |
|
Returns false. Reimplemented from cModule. |
|
Returns the name of the local host. |
|
FIXME: Adds a gate. |
|
Assignment operator. The name member doesn't get copied; see cObject's operator=() for more details. |
|
MISSINGDOC: cNetMod:cGate*outgate(char*) |
|
|
Process messages arriving from other segments. This call should return immediately if there's no message available at the time of calling. |
|
Process messages arriving from other segments. This call should block if there's no message available at the time of calling. |
|
FIXME: |
|
MISSINGDOC: cNetMod:void puts_onconsole(char*) |
|
MISSINGDOC: cNetMod:int receive_runnumber() |
|
MISSINGDOC: cNetMod:void request_stopsimulation() |
|
MISSINGDOC: cNetMod:void restart() |
|
Not used, implemented because it could not remain pure virtual. This dummy implementation does nothing. Reimplemented from cModule. |
|
MISSINGDOC: cNetMod:void send_cancelsyncpoint(simtime_t,int) |
|
MISSINGDOC: cNetMod:void send_runnumber(int) |
|
MISSINGDOC: cNetMod:void send_syncpoint(simtime_t,int) |
|
MISSINGDOC: cNetMod:void setup_connections() |
|
Called on the controlling segment, starts all other segments. |
|
MISSINGDOC: cNetMod:void stop_all_segments() |
|
MISSINGDOC: cNetMod:void sync_after_modinits() |