#include <fec.h>
Inheritance diagram for FECModel:


Public Member Functions | |
| FECModel () | |
| virtual void | recv (Packet *, Handler *) |
| NsObject * | uptarget () |
| NsObject * | downtarget () |
| virtual void | drop (Packet *p) |
| virtual void | recv (Packet *p, const char *s) |
| virtual void | recvOnly (Packet *) |
| virtual void | delay_bind_init_all () |
| virtual int | delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer) |
| int | isdebug () const |
| virtual void | debug (const char *fmt,...) |
Protected Member Functions | |
| virtual int | command (int argc, const char *const *argv) |
| void | addfec (Packet *p) |
| void | subfec (Packet *p) |
| virtual void | drop (Packet *p, const char *s) |
| virtual void | sendDown (Packet *p, Handler *h) |
| virtual void | sendUp (Packet *p, Handler *h) |
| virtual void | reset () |
| void | handle (Event *) |
Protected Attributes | |
| int | firstTime_ |
| int | FECstrength_ |
| int | FECbyte_ |
| int | debug_ |
| NsObject * | uptarget_ |
| NsObject * | downtarget_ |
| NsObject * | drop_ |
|
|
Definition at line 66 of file fec.cc.
00066 : firstTime_(1), FECstrength_(1) 00067 { 00068 } |
|
|
Definition at line 110 of file fec.cc. References hdr_cmn::access(), FECbyte_, hdr_cmn::fecsize(), FECstrength_, and hdr_cmn::size(). Referenced by recv().
00111 {
00112 int bit = hdr_cmn::access(p)->size() * 8;
00113 FECbyte_ = (int)(log(bit) / log(2));
00114 FECbyte_ *= FECstrength_;
00115 FECbyte_ = (FECbyte_ + 7) / 8;
00116
00117 // firstTime_ = 0;
00118
00119 // printf("FEC Down = %d \n", hdr_cmn::access(p)->size());
00120
00121 hdr_cmn::access(p)->size() += FECbyte_;
00122 hdr_cmn::access(p)->fecsize() = FECbyte_;
00123 }
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented from BiConnector. Definition at line 70 of file fec.cc. References BiConnector::command(), and FECstrength_.
00071 {
00072 Tcl& tcl = Tcl::instance();
00073 if (argc == 3) {
00074 if (strcmp(argv[1], "FECstrength") == 0) {
00075 FECstrength_ = atoi(argv[2]);
00076 return (TCL_OK);
00077 }
00078 } else if (argc == 2) {
00079 if (strcmp(argv[1], "FECstrength") == 0) {
00080 tcl.resultf("%d", FECstrength_);
00081 return (TCL_OK);
00082 }
00083 }
00084 return BiConnector::command(argc, argv);
00085 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 102 of file object.cc. References NsObject::debug_.
00103 {
00104 if (!debug_)
00105 return;
00106 va_list ap;
00107 va_start(ap, fmt);
00108 vprintf(fmt, ap);
00109 }
|
|
||||||||||||||||
|
Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent. Definition at line 63 of file object.cc. References NsObject::debug_. Referenced by MPLSAddressClassifier::delay_bind_dispatch(), and Agent::delay_bind_dispatch().
00064 {
00065 if (delay_bind_bool(varName, localName, "debug_", &debug_, tracer))
00066 return TCL_OK;
00067 return TclObject::delay_bind_dispatch(varName, localName, tracer);
00068 }
|
|
|
Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent. Definition at line 57 of file object.cc. Referenced by MPLSAddressClassifier::delay_bind_init_all(), and Agent::delay_bind_init_all().
00058 {
00059 delay_bind_init_one("debug_");
00060 }
|
|
|
Definition at line 49 of file bi-connector.h. References BiConnector::downtarget_. Referenced by SatLL::channel().
00049 { return downtarget_; }
|
|
||||||||||||
|
Definition at line 144 of file bi-connector.cc. References BiConnector::drop_, Packet::free(), and NsObject::recv().
00145 {
00146 if (drop_ != 0)
00147 drop_->recv(p, s);
00148 else
00149 Packet::free(p);
00150 }
|
Here is the call graph for this function:
|
|
Definition at line 135 of file bi-connector.cc. References BiConnector::drop_, Packet::free(), and NsObject::recv(). Referenced by Mac802_3::collision(), Mac802_11::discard(), SMAC::drop_CTS(), SMAC::drop_DATA(), SMAC::drop_RTS(), SMAC::drop_SYNC(), UnslottedAlohaMac::end_of_contention(), MacTdma::recvHandler(), Mac::resume(), MacCsma::resume(), UnslottedAlohaMac::sendUp(), SatMac::sendUp(), Mac::sendUp(), MacTdma::TX_Time(), and Mac802_11::txtime().
00136 {
00137 if (drop_ != 0)
00138 drop_->recv(p);
00139 else
00140 Packet::free(p);
00141 }
|
Here is the call graph for this function:
|
|
Implements Handler. Reimplemented in LinkDelay, LL, AckRecons, and Snoop. Definition at line 91 of file object.cc. References NsObject::recv().
|
Here is the call graph for this function:

|
|
Definition at line 61 of file object.h. References NsObject::debug_.
00061 { return debug_; }
|
|
||||||||||||
|
Reimplemented in CMUTrace. Definition at line 96 of file object.cc. References Packet::free().
00097 {
00098 Packet::free(p);
00099 }
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented from BiConnector. Definition at line 88 of file fec.cc. References hdr_cmn::access(), addfec(), hdr_cmn::direction(), hdr_cmn::DOWN, BiConnector::downtarget_, hdr_cmn::errbitcnt(), hdr_cmn::error(), FECstrength_, fix_, Packet::free(), NsObject::recv(), subfec(), and BiConnector::uptarget_.
00089 {
00090 hdr_cmn* ch = hdr_cmn::access(p);
00091
00092 if(ch->direction() == hdr_cmn::DOWN) {
00093 addfec(p);
00094 downtarget_->recv(p, h);
00095 return;
00096 } else {
00097 if(ch->errbitcnt() > FECstrength_) {
00098 Packet::free(p);
00099 return;
00100 } else if (ch->errbitcnt() && (ch->errbitcnt() <= FECstrength_)) {
00101 ch->errbitcnt() = 0;
00102 ch->error() = 0;
00103 printf("FEC: %d fixed\n", fix_++);
00104 }
00105 subfec(p);
00106 uptarget_->recv(p, h);
00107 }
00108 }
|
Here is the call graph for this function:

|
|
Reimplemented in Agent, and Trace. Definition at line 56 of file object.h. Referenced by Trace::recvOnly().
00056 {};
|
|
|
Reimplemented in BayFullTcpAgent, HashClassifier, IvsSource, dsREDQueue, DiffusionRate, SinkAgent, DiffusionAgent, FloodingAgent, OmniMcastAgent, LinkDelay, CBQueue, DropTail, ErrorModel, PIQueue, Queue< T >, RedPDQueue, REDQueue, REMQueue, RIOQueue, Snoop, FackTcpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, Sack1TcpAgent, TcpSink, DelAckSink, TcpAgent, VegasTcpAgent, toraAgent, and Queue< T >. Definition at line 70 of file object.cc. Referenced by NsObject::command().
00071 {
00072 }
|
|
||||||||||||
|
Reimplemented in Mac802_3. Definition at line 55 of file bi-connector.h. References BiConnector::downtarget_, and NsObject::recv(). Referenced by BiConnector::recv().
00056 { downtarget_->recv(p, h); }
|
Here is the call graph for this function:
|
||||||||||||
|
Reimplemented in Mac802_3. Definition at line 57 of file bi-connector.h. References NsObject::recv(), and BiConnector::uptarget_. Referenced by BiConnector::recv().
|
Here is the call graph for this function:
|
|
Definition at line 125 of file fec.cc. References hdr_cmn::access(), FECbyte_, hdr_cmn::fecsize(), and hdr_cmn::size(). Referenced by recv().
00126 {
00127 FECbyte_ = hdr_cmn::access(p)->fecsize();
00128 hdr_cmn::access(p)->size() -= FECbyte_;
00129 // printf("FEC Up = %d \n", hdr_cmn::access(p)->size());
00130 }
|
Here is the call graph for this function:

|
|
Definition at line 48 of file bi-connector.h. References BiConnector::uptarget_. Referenced by SatChannel::find_peer_mac_addr().
00048 { return uptarget_; }
|
|
|
Reimplemented from NsObject. |
|
|
Definition at line 63 of file bi-connector.h. Referenced by Phy::command(), BiConnector::command(), BiConnector::downtarget(), WirelessPhy::initialized(), WiredPhy::initialized(), SMAC::initialized(), Mac::initialized(), recv(), MacTdma::send(), UnslottedAlohaMac::sendDown(), SatMac::sendDown(), Mac::sendDown(), BiConnector::sendDown(), SMAC::transmit(), and Mac802_3::transmit(). |
|
|
Definition at line 64 of file bi-connector.h. Referenced by BiConnector::command(), and BiConnector::drop(). |
|
|
|
|
|
|
|
|
|
|
1.3.3