#include <chsap.h>
Inheritance diagram for ChSAP:


Public Member Functions | |
| ChSAP () | |
| virtual | ~ChSAP () |
| virtual int | command (int argc, const char *const *argv) |
| void | sendDown (Packet *p, double delay) |
| virtual void | sendUp (Packet *p, double delay) |
| void | handle (Event *e) |
| Position * | getPosition () |
Protected Attributes | |
| NodeCore * | nodeCorePtr_ |
| ChannelModule * | channel_ |
Definition at line 52 of file chsap.h.
| int ChSAP::command | ( | int | argc, | |
| const char *const * | argv | |||
| ) | [virtual] |
TCL command interpreter. It implements the following OTcl methods:
Moreover it inherits all the OTcl method of SAP
| 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 SAP.
Definition at line 54 of file chsap.cc.
References channel_, SAP::command(), SAP::downModule_, nodeCorePtr_, and SAP::upModule_.
Here is the call graph for this function:

| void ChSAP::sendDown | ( | Packet * | p, | |
| double | delay | |||
| ) | [virtual] |
Overload of the SAP method: send a packet to the channel adding a delay if it is neccessary (it does not send the module id of the sender) 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 from SAP.
Definition at line 97 of file chsap.cc.
References channel_, ConnectorTrace::debug_, ConnectorTrace::depth_, SAP::depthDown_, DOWN, ChannelModule::recv(), and SAP::trace().
Here is the call graph for this function:

| void ChSAP::sendUp | ( | Packet * | p, | |
| double | delay | |||
| ) | [virtual] |
Overload of the SAP method: 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 from SAP.
Definition at line 121 of file chsap.cc.
References ConnectorTrace::debug_, ConnectorTrace::depth_, SAP::depthUp_, Module::recv(), SAP::trace(), UP, and SAP::upModule_.
Referenced by LinkChannelModule::recv().
Here is the call graph for this function:

| void ChSAP::handle | ( | Event * | e | ) | [virtual] |
Overload of the SAP method: This method is called when the ChSAP 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 SAP.
Definition at line 154 of file chsap.cc.
References channel_, ConnectorTrace::debug_, SAP::depthDown_, SAP::depthUp_, DOWN, Module::recv(), ChannelModule::recv(), SAP::trace(), and SAP::upModule_.
Here is the call graph for this function:

| Position * ChSAP::getPosition | ( | ) |
Returns the Position of the node
Definition at line 176 of file chsap.cc.
References NodeCore::getPosition(), and nodeCorePtr_.
Referenced by WirelessChModule::sendUpPhy(), DumbWirelessChModule::sendUpPhy(), and UmtsWirelessChModule::sendUpPhy().
Here is the call graph for this function:

NodeCore* ChSAP::nodeCorePtr_ [protected] |
Instance of the node core this ChSAP belongs to
Definition at line 121 of file chsap.h.
Referenced by command(), and getPosition().
1.5.2