Main Page Modules Class Hierarchy Compound List File List Compound Members

# cNetMod Class Reference

`#include <cnetmod.h>`

Inheritance diagram for cNetMod::

List of all members.

## 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

## Detailed Description

Base class for the interface module for distributed simulation.

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)

## Constructor & Destructor Documentation

cNetMod::cNetMod ( | const cNetMod & m )`[inline]`

| Copy constructor.

cNetMod::cNetMod ( | )

| Constructor.

cNetMod::~cNetMod ( | )`[inline, virtual]`

| Destructor.

## Member Function Documentation

bool cNetMod::askyesno_onconsole ( | const char * question )`[pure virtual]`

| MISSINGDOC: cNetMod:bool askyesno_onconsole(char*)

bool cNetMod::block_on_syncpoint ( | simtime_t t )`[pure virtual]`

| MISSINGDOC: cNetMod:bool block_on_syncpoint(simtime_t)

void cNetMod::callFinish ( | )`[virtual]`

| Not used, implemented because it could not remain pure virtual. The implementation was copied from cSimpleModule. Reimplemented from cModule.

bool cNetMod::callInitialize ( | int stage )`[virtual]`

| Not used, implemented because it could not remain pure virtual. The implementation was copied from cSimpleModule. Reimplemented from cModule.

void cNetMod::clear ( | )`[inline, virtual]`

| MISSINGDOC: cNetMod:void clear()

void cNetMod::deleteModule ( | )`[inline, virtual]`

| Not used, implemented because it could not remain pure virtual. This dummy implementation does nothing. Reimplemented from cModule.

int cNetMod::findingate ( | const char * s )`[pure virtual]`

| MISSINGDOC: cNetMod:int findingate(char*)

int cNetMod::findoutgate ( | const char * s )`[pure virtual]`

| MISSINGDOC: cNetMod:int findoutgate(char*)

bool cNetMod::gets_onconsole ( | const char * promptstr,
| char * buf,
| int len )`[pure virtual]`

| MISSINGDOC: cNetMod:bool gets_onconsole(char*,char*,int)

cGate * cNetMod::ingate ( | const char * s )`[pure virtual]`

| Returns the input gate identified by its name.

cGate * cNetMod::ingate ( | int g )`[pure virtual]`

| Returns the input gate identified by its index.

void cNetMod::init ( | )`[pure virtual]`

| Does initialization task that can't be done in the constructor.

int cNetMod::isLocalMachineIn ( | const cArray & m )

| Returns true if the name of the local machine is in the array passed as argument. The array should contain string-valued cPar objects.

bool cNetMod::isSimple ( | ) const`[inline, virtual]`

| Returns false. Reimplemented from cModule.

const char * cNetMod::localhost ( | )`[pure virtual]`

| Returns the name of the local host.

int cNetMod::net_addgate ( | cModule * mod,
| int gate,
| char tp )`[inline, virtual]`

| FIXME: Adds a gate.

cNetMod & cNetMod::operator= ( | const cNetMod & other )`[virtual]`

| Assignment operator. The name member doesn't get copied; see cObject's operator=() for more details.

cGate * cNetMod::outgate ( | const char * s )`[pure virtual]`

| MISSINGDOC: cNetMod:cGate*outgate(char*)

cGate * cNetMod::outgate ( | int g )`[pure virtual]`

| MISSINGDOC: cNetMod:cGate*outgate(int)

void cNetMod::process_netmsg_blocking ( | )`[pure virtual]`

| Process messages arriving from other segments. This call should return immediately if there's no message available at the time of calling.

void cNetMod::process_netmsgs ( | )`[pure virtual]`

| Process messages arriving from other segments. This call should block if there's no message available at the time of calling.

void cNetMod::putmsg_onconsole ( | const char * s )`[pure virtual]`

| FIXME:

void cNetMod::puts_onconsole ( | const char * s )`[pure virtual]`

| MISSINGDOC: cNetMod:void puts_onconsole(char*)

int cNetMod::receive_runnumber ( | )`[pure virtual]`

| MISSINGDOC: cNetMod:int receive_runnumber()

void cNetMod::request_stopsimulation ( | )`[pure virtual]`

| MISSINGDOC: cNetMod:void request_stopsimulation()

void cNetMod::restart ( | )`[inline, virtual]`

| MISSINGDOC: cNetMod:void restart()

void cNetMod::scheduleStart ( | simtime_t t )`[inline, virtual]`

| Not used, implemented because it could not remain pure virtual. This dummy implementation does nothing. Reimplemented from cModule.

void cNetMod::send_cancelsyncpoint ( | simtime_t t,
| int gate )`[pure virtual]`

| MISSINGDOC: cNetMod:void send_cancelsyncpoint(simtime_t,int)

void cNetMod::send_runnumber ( | int run_nr )`[pure virtual]`

| MISSINGDOC: cNetMod:void send_runnumber(int)

void cNetMod::send_syncpoint ( | simtime_t t,
| int gate )`[pure virtual]`

| MISSINGDOC: cNetMod:void send_syncpoint(simtime_t,int)

void cNetMod::setup_connections ( | )`[pure virtual]`

| MISSINGDOC: cNetMod:void setup_connections()

short cNetMod::start_segments ( | cArray & host_list,
| int ac,
| char * av[] )`[pure virtual]`

| Called on the controlling segment, starts all other segments.

void cNetMod::stop_all_segments ( | )`[pure virtual]`

| MISSINGDOC: cNetMod:void stop_all_segments()

void cNetMod::sync_after_modinits ( | )`[pure virtual]`

| MISSINGDOC: cNetMod:void sync_after_modinits()

The documentation for this class was generated from the following file:

- cnetmod.h