#include <User_Interface.h>
Public Attributes | |
BS_queue * | cola_bs |
BS_table * | Tabla |
int_matrix_t | indices_rutas |
int_vector_t | num_rutas |
Protected Member Functions | |
virtual void | initialize () |
virtual void | handleMessage (cMessage *msg) |
virtual void | finish () |
Definition at line 28 of file User_Interface.h.
void User_Interface::finish | ( | ) | [protected, virtual] |
void User_Interface::handleMessage | ( | cMessage * | msg | ) | [protected, virtual] |
Reimplemented from cSimpleModule.
Definition at line 41 of file User_Interface.cc.
00042 { 00043 int type = msg->getKind(); 00044 switch(type) 00045 { 00046 case 12: 00047 // LLEGA UN PAQUETE 'ETHERNET' CON IDENTIFICADOR = 12 00048 if(msg->getKind()==12) 00049 { 00050 //ETHERNETmsg *msjdatos = check_and_cast<ETHERNETmsg*>(msg); 00051 DATA *msjdatos = check_and_cast<DATA*>(msg); 00052 //ev << " Envio de paquete inalambrico, de prioridad P" << msjdatos->getPriority() << ", del " << this->getParentModule()->getFullName() << endl; 00053 // Envio del paquete "datos", con el retardo propio del canal: 00054 //sendDelayed(msjdatos,(simtime_t) msjdatos->getArrayField1(0),"interface$o"); 00055 // OJO! No considerar el retardo de propagacion del usuario a la estacion base 00056 // (se considera despreciable por estar muy proximos) 00057 /* 00058 double prop_del = (double)(check_and_cast<cDelayChannel*>(this->getParentModule()->gate("physicalUser$o")->getChannel()))->par(4); 00059 simtime_t propag_delay = (simtime_t) prop_del; 00060 ev << " Retardo de propagacion del mensaje: " << prop_del << "s" << endl; 00061 double txrate = (double)this->getParentModule()->par("tasabinaria"); 00062 double tx_del = (double) msjdatos->getByteLength()*8/txrate; 00063 simtime_t tx_delay = (simtime_t) tx_del; 00064 ev << " Retardo de transmision del mensaje: " << tx_del << "s" << endl; 00065 ev << " Tiempo en el que tiene que llegar a la BS[" << this->getParentModule()->getIndex() << "]: T=" << SIMTIME_DBL(simTime())+prop_del+tx_del << endl; 00066 sendDelayed(msjdatos,propag_delay+tx_delay,"interface$o"); 00067 */ 00068 send(msjdatos,"interface$o"); 00069 } 00070 break; 00071 00072 default: 00073 delete msg; 00074 break; 00075 } 00076 }
void User_Interface::initialize | ( | ) | [protected, virtual] |
Definition at line 31 of file User_Interface.h.
Definition at line 33 of file User_Interface.h.
Definition at line 34 of file User_Interface.h.
Definition at line 32 of file User_Interface.h.