ClSAP Class Reference

#include <clsap.h>

Inheritance diagram for ClSAP:

Inheritance graph
[legend]
Collaboration diagram for ClSAP:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ClSAP ()
virtual ~ClSAP ()
virtual int command (int argc, const char *const *argv)
void sendModule (ClMessage *m, double delay)
void sendSynchronousModule (ClMessage *m)
void sendClLayer (ClMessage *m, double delay)
void sendSynchronousClLayer (ClMessage *m)
int getPluginId ()
virtual void handle (Event *e)
PositiongetPosition ()

Protected Attributes

int depthNC_
int depthP_

Private Attributes

PlugInpluginPtr_
NodeCorenodeCorePtr_

Detailed Description

The ClSAP class is a ConnectorTrace which connect a Plugin with the NodeCore belonging to, in order to exchange cross layer messagges It has tracing functionality, thus it could trace the ClMessage which pass through.

See also:
ClMessageTracer, ClTracer, Plugin, NodeCore

Definition at line 51 of file clsap.h.


Constructor & Destructor Documentation

ClSAP::ClSAP (  ) 

ClSAP constructor

Definition at line 52 of file clsap.cc.

References DEFAULTDEPTH, depthNC_, and depthP_.

ClSAP::~ClSAP (  )  [virtual]

ClSAP destructor

Definition at line 60 of file clsap.cc.


Member Function Documentation

int ClSAP::command ( int  argc,
const char *const *  argv 
) [virtual]

TCL command interpreter. It implements the following OTcl methods:

Parameters:
argc number of arguments in argv
argv array of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns:
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no
See also:
NodeCore, Plugin

Reimplemented from ConnectorTrace.

Reimplemented in Bin.

Definition at line 66 of file clsap.cc.

References ConnectorTrace::command(), nodeCorePtr_, and pluginPtr_.

Here is the call graph for this function:

void ClSAP::sendModule ( ClMessage m,
double  delay 
)

Sends a ClMessage to the plugin adding a delay if it is neccessary.

Parameters:
m a pointer to the ClMessage which has to send to the plugin
delay the delivery delay (it must be greater or equal 0)

Definition at line 101 of file clsap.cc.

References PlugIn::crLayCommand(), depthP_, ClMessage::direction(), pluginPtr_, PlugIn::recvAsyncClMsg(), RUN_DEPRECATED_OR_NEW_VIRTUAL_METHOD, TOMODULE, ConnectorTrace::trace(), and ClMessage::verbosity().

Referenced by NodeCore::sendClSAP().

Here is the call graph for this function:

void ClSAP::sendSynchronousModule ( ClMessage m  ) 

Sends a synchronous ClMessage to the plugin.

Parameters:
m a pointer to the ClMessage which has to send to the plugin

Definition at line 123 of file clsap.cc.

References PlugIn::crLaySynchronousCommand(), depthNC_, depthP_, ClMessage::direction(), pluginPtr_, PlugIn::recvSyncClMsg(), RUN_DEPRECATED_OR_NEW_VIRTUAL_METHOD, TOMODULE, TONODECORE, ConnectorTrace::traceSync(), and ClMessage::verbosity().

Referenced by NodeCore::sendSynchronousClSAP().

Here is the call graph for this function:

void ClSAP::sendClLayer ( ClMessage m,
double  delay 
)

Sends a ClMessage to the NodeCore adding a delay if it is neccessary.

Parameters:
m a pointer to the ClMessage which has to send to the NodeCore
delay the delivery delay (it must be greater or equal 0)

Definition at line 140 of file clsap.cc.

References NodeCore::crLayCommand(), depthNC_, ClMessage::direction(), nodeCorePtr_, TONODECORE, ConnectorTrace::trace(), and ClMessage::verbosity().

Referenced by PlugIn::sendAsyncClMsg().

Here is the call graph for this function:

void ClSAP::sendSynchronousClLayer ( ClMessage m  ) 

Sends a synchronous ClMessage to the NodeCore.

Parameters:
m a pointer to the ClMessage which has to send to the NodeCore

Definition at line 161 of file clsap.cc.

References depthNC_, depthP_, ClMessage::direction(), nodeCorePtr_, NodeCore::synchronousCrLayCommand(), TOMODULE, TONODECORE, ConnectorTrace::traceSync(), and ClMessage::verbosity().

Referenced by PlugIn::sendSyncClMsg().

Here is the call graph for this function:

int ClSAP::getPluginId (  ) 

Returns the ID of the attached plugin

Returns:
the up plugin ID

Definition at line 179 of file clsap.cc.

References PlugIn::getId(), NO_MODULE, and pluginPtr_.

Referenced by NodeCore::addClSAP(), and NodeCore::getPluginID().

Here is the call graph for this function:

void ClSAP::handle ( Event *  e  )  [virtual]

This method is called when the ClSAP has been scheduled in order to give a delay to a ClMessage

Parameters:
e pointer to the event which has this ClSAP for handler. It is a ClMessage

Reimplemented from ConnectorTrace.

Reimplemented in Bin.

Definition at line 184 of file clsap.cc.

References PlugIn::crLayCommand(), NodeCore::crLayCommand(), depthP_, ClMessage::direction(), nodeCorePtr_, pluginPtr_, PlugIn::recvAsyncClMsg(), RUN_DEPRECATED_OR_NEW_VIRTUAL_METHOD, TONODECORE, ConnectorTrace::trace(), and ClMessage::verbosity().

Here is the call graph for this function:

Position * ClSAP::getPosition (  ) 

Return the pointer to instance of the Position installed

Returns:
the pointer to instance of the Position installed

Definition at line 197 of file clsap.cc.

References NodeCore::getPosition(), and nodeCorePtr_.

Referenced by PlugIn::getPosition().

Here is the call graph for this function:


Member Data Documentation

int ClSAP::depthNC_ [protected]

Define the level of depth of tracing for the messages directed to the nodecore

Definition at line 142 of file clsap.h.

Referenced by ClSAP(), sendClLayer(), sendSynchronousClLayer(), and sendSynchronousModule().

int ClSAP::depthP_ [protected]

Define the level of depth of tracing for the messages directed to a plugin

Definition at line 144 of file clsap.h.

Referenced by ClSAP(), handle(), sendModule(), sendSynchronousClLayer(), and sendSynchronousModule().

PlugIn* ClSAP::pluginPtr_ [private]

pointer to the plugin

Definition at line 147 of file clsap.h.

Referenced by command(), getPluginId(), handle(), sendModule(), and sendSynchronousModule().

NodeCore* ClSAP::nodeCorePtr_ [private]

pointer to the NodeCore

Definition at line 149 of file clsap.h.

Referenced by command(), getPosition(), handle(), sendClLayer(), and sendSynchronousClLayer().


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:48:29 2008 for NS-MIRACLE library by  doxygen 1.5.2