#include <sap.h>
Inheritance diagram for SAP:
Public Member Functions | |
SAP () | |
virtual | ~SAP () |
virtual int | command (int argc, const char *const *argv) |
virtual void | sendUp (Packet *p, double delay) |
virtual void | sendDown (Packet *p, double delay) |
virtual void | sendUp (ClMessage *m, double delay) |
virtual void | sendDown (ClMessage *m, double delay) |
virtual void | sendSynchronousUp (ClMessage *m) |
virtual void | sendSynchronousDown (ClMessage *m) |
int | getModuleUpId () |
int | getModuleDownId () |
virtual void | handle (Event *e) |
int | depthUp () |
int | depthDown () |
Static Public Member Functions | |
static void | addTracer (Tracer *tr) |
Protected Member Functions | |
void | trace (Packet *p) |
void | trace (ClMessage *m) |
Protected Attributes | |
Module * | upModule_ |
Module * | downModule_ |
int | depthUp_ |
int | depthDown_ |
Static Protected Attributes | |
static PktTracer * | pktTr_ = 0 |
Friends | |
class | Tracer |
Definition at line 53 of file sap.h.
SAP::SAP | ( | ) |
SAP constructor
Definition at line 65 of file sap.cc.
References DEFAULTDEPTH, depthDown_, and depthUp_.
int SAP::command | ( | int | argc, | |
const char *const * | argv | |||
) | [virtual] |
TCL command interpreter. It implements the following OTcl methods:
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) |
Reimplemented from ConnectorTrace.
Reimplemented in Bin, and ChSAP.
Definition at line 79 of file sap.cc.
References ConnectorTrace::command(), downModule_, and upModule_.
Referenced by ChSAP::command().
Here is the call graph for this function:
void SAP::sendUp | ( | Packet * | p, | |
double | delay | |||
) | [virtual] |
Send a packet to the up module adding a delay if it is neccessary. Note: this method sets the direction of the packet to UP
p | a pointer to the packet which has to send up | |
delay | the delivery delay (it must be greater or equal 0) |
Reimplemented in ChSAP.
Definition at line 121 of file sap.cc.
References ConnectorTrace::debug_, depthUp_, getModuleDownId(), Module::recv(), trace(), UP, and upModule_.
Referenced by Module::sendAsyncClMsgUp(), and Module::sendUp().
Here is the call graph for this function:
void SAP::sendDown | ( | Packet * | p, | |
double | delay | |||
) | [virtual] |
Send a packet to the down module with the sender module ID and adding a delay if it is neccessary Note: this method sets the direction of the packet to DOWN
p | a pointer to the packet which has to send down | |
delay | the delivery delay (it must be greater or equal 0) |
Reimplemented in ChSAP.
Definition at line 154 of file sap.cc.
References depthDown_, DOWN, downModule_, getModuleUpId(), Module::recv(), and trace().
Referenced by Module::sendAsyncClMsgDown(), and Module::sendDown().
Here is the call graph for this function:
void SAP::sendUp | ( | ClMessage * | m, | |
double | delay | |||
) | [virtual] |
Send a ClMessage to the up module adding a delay if it is neccessary. Note: this method sets the direction of the packet to UP
m | a pointer to the ClMessage which has to send up | |
delay | the delivery delay (it must be greater or equal 0) |
Definition at line 177 of file sap.cc.
References PlugIn::crLayCommand(), depthUp_, ClMessage::direction(), PlugIn::recvAsyncClMsg(), RUN_DEPRECATED_OR_NEW_VIRTUAL_METHOD, trace(), UP, upModule_, and ClMessage::verbosity().
Here is the call graph for this function:
void SAP::sendDown | ( | ClMessage * | m, | |
double | delay | |||
) | [virtual] |
Send a ClMessage to the up module adding a delay if it is neccessary. Note: this method sets the direction of the packet to UP
m | a pointer to the ClMessage which has to send down | |
delay | the delivery delay (it must be greater or equal 0) |
Definition at line 199 of file sap.cc.
References PlugIn::crLayCommand(), depthDown_, ClMessage::direction(), DOWN, downModule_, PlugIn::recvAsyncClMsg(), RUN_DEPRECATED_OR_NEW_VIRTUAL_METHOD, trace(), and ClMessage::verbosity().
Here is the call graph for this function:
void SAP::sendSynchronousUp | ( | ClMessage * | m | ) | [virtual] |
Send a Synchronous ClMessage to the up module adding a delay if it is neccessary. Note: this method sets the direction of the packet to UP
m | a pointer to the ClMessage which has to send up |
Definition at line 220 of file sap.cc.
References PlugIn::crLaySynchronousCommand(), depthDown_, depthUp_, ClMessage::direction(), DOWN, PlugIn::recvSyncClMsg(), RUN_DEPRECATED_OR_NEW_VIRTUAL_METHOD, ConnectorTrace::traceSync(), UP, upModule_, and ClMessage::verbosity().
Referenced by Module::sendSyncClMsgUp().
Here is the call graph for this function:
void SAP::sendSynchronousDown | ( | ClMessage * | m | ) | [virtual] |
Send a Synchronous ClMessage to the up module adding a delay if it is neccessary. Note: this method sets the direction of the packet to UP
m | a pointer to the ClMessage which has to send down | |
delay | the delivery delay (it must be greater or equal 0) |
Definition at line 237 of file sap.cc.
References PlugIn::crLaySynchronousCommand(), depthDown_, depthUp_, ClMessage::direction(), DOWN, downModule_, PlugIn::recvSyncClMsg(), RUN_DEPRECATED_OR_NEW_VIRTUAL_METHOD, ConnectorTrace::traceSync(), UP, and ClMessage::verbosity().
Referenced by Module::sendSyncClMsgDown().
Here is the call graph for this function:
void SAP::addTracer | ( | Tracer * | tr | ) | [static] |
int SAP::getModuleUpId | ( | ) |
Returns the ID of the up module
Definition at line 255 of file sap.cc.
References PlugIn::getId(), and upModule_.
Referenced by UmtsWirelessChModule::command(), MrclRouting::getConfiguration(), handle(), sendDown(), and Module::sendUp().
Here is the call graph for this function:
int SAP::getModuleDownId | ( | ) |
Returns the ID of the down module
Definition at line 261 of file sap.cc.
References downModule_, and PlugIn::getId().
Referenced by MrclRouting::getConfiguration(), handle(), Module::sendDown(), sendUp(), and Module::sendUp().
Here is the call graph for this function:
void SAP::handle | ( | Event * | e | ) | [virtual] |
This method is called when the SAP has been scheduled in order to give a delay to a packet
e | pointer to the event which has this SAP for handler. It is a Packet |
Reimplemented from ConnectorTrace.
Reimplemented in Bin, and ChSAP.
Definition at line 295 of file sap.cc.
References ConnectorTrace::debug_, depthDown_, depthUp_, DOWN, downModule_, getModuleDownId(), getModuleUpId(), Module::recv(), trace(), and upModule_.
Here is the call graph for this function:
int SAP::depthUp | ( | ) |
int SAP::depthDown | ( | ) |
Return the value of depthDown_
Definition at line 116 of file sap.cc.
References depthDown_.
void SAP::trace | ( | Packet * | p | ) | [protected] |
Write a line in the system trace file which contains the trace information of a packet
p | pointer to the packet which has to be traced |
Definition at line 274 of file sap.cc.
References ConnectorTrace::debug_, ConnectorTrace::dirDown_, ConnectorTrace::dirUp_, DOWN, ConnectorTrace::dump(), pktTr_, ConnectorTrace::preambleDown_, ConnectorTrace::preambleUp_, PktTracer::trace(), and ConnectorTrace::writeTrace().
Referenced by handle(), ChSAP::handle(), sendDown(), ChSAP::sendDown(), sendUp(), and ChSAP::sendUp().
Here is the call graph for this function:
void SAP::trace | ( | ClMessage * | m | ) | [protected] |
Write a line in the system trace file which contains the trace information of a ClMessage
m | pointer to the ClMessage which has to be traced |
Reimplemented from ConnectorTrace.
Definition at line 290 of file sap.cc.
References ConnectorTrace::trace().
Here is the call graph for this function:
PktTracer * SAP::pktTr_ = 0 [static, protected] |
The packet tracer list
Definition at line 198 of file sap.h.
Referenced by addTracer(), Bin::drop(), and trace().
Module* SAP::upModule_ [protected] |
Pointer to the up module
Definition at line 200 of file sap.h.
Referenced by command(), ChSAP::command(), getModuleUpId(), handle(), ChSAP::handle(), sendSynchronousUp(), sendUp(), and ChSAP::sendUp().
Module* SAP::downModule_ [protected] |
Pointer to the down module
Definition at line 202 of file sap.h.
Referenced by command(), ChSAP::command(), getModuleDownId(), handle(), sendDown(), and sendSynchronousDown().
int SAP::depthUp_ [protected] |
Define the level of tracing for packet with up direction
Definition at line 220 of file sap.h.
Referenced by depthUp(), handle(), ChSAP::handle(), SAP(), sendSynchronousDown(), sendSynchronousUp(), sendUp(), and ChSAP::sendUp().
int SAP::depthDown_ [protected] |
Define the level of tracing for packet with down direction
Definition at line 222 of file sap.h.
Referenced by depthDown(), handle(), ChSAP::handle(), SAP(), sendDown(), ChSAP::sendDown(), sendSynchronousDown(), and sendSynchronousUp().