TTEthernet Model for INET Framework
|
Base class for a background (best-effort) buffer class. More...
#include <BGBuffer.h>
Protected Member Functions | |
virtual void | initialize () |
Initializes the module. More... | |
virtual void | handleMessage (cMessage *msg) |
Is called when a new Frame is received in the buffer. More... | |
![]() | |
virtual void | initialize (int stage) |
Initializes the module. More... | |
virtual int | numInitStages () const |
Returns the numer of initializaiton stages this module needs. More... | |
void | handleMessage (cMessage *msg) |
Is called when a new Frame is received in the buffer. More... | |
virtual void | enqueue (EtherFrame *newFrame) |
Is called to store an EtherFrame in the buffer. More... | |
virtual EtherFrame * | dequeue () |
Is called to get an EtherFrame from the buffer. More... | |
void | recordPacketSent () |
Emits a statistics signal that a frame was sent from the buffer. More... | |
void | setIsEmpty (bool empty) |
Sets the status of the Buffer to empty or non-empty. More... | |
Additional Inherited Members | |
![]() | |
~Buffer () | |
Destructor. More... | |
virtual void | handleParameterChange (const char *parname) |
Indicates a parameter has changed. More... | |
EtherFrame * | getFrame () |
Wrapper function arround dequeue(). More... | |
void | putFrame (EtherFrame *frame) |
Wrapper function arround enqueue(). More... | |
void | addReceiveCallback (Callback *cb, TTEApplicationBase *application) |
Adds a receive callback for an application to the buffer. More... | |
Callback * | getReceiveCallback (TTEApplicationBase *application) |
Returns the currently registered receive callback for an application. More... | |
void | addTransmitCallback (Callback *cb, TTEApplicationBase *application) |
Adds a transmit callback for an application to the buffer. More... | |
Callback * | getTransmitCallback (TTEApplicationBase *application) |
Returns the currently registered transmit callback for an application. More... | |
![]() | |
std::list< cGate * > | destinationGates |
Stores the Gates to that the messages are delivered. More... | |
std::map< TTEApplicationBase *, Callback * > | receiveCallbacks |
Stores the callbacks that are executed when a frame is added to the buffer. More... | |
std::map< TTEApplicationBase *, Callback * > | transmitCallbacks |
Stores the callbacks that are executed when a frame is removed from the buffer. More... | |
![]() | |
static simsignal_t | txPkSignal = SIMSIGNAL_NULL |
Signal that is emitted every time a frame was sent. More... | |
static simsignal_t | latencySignal = SIMSIGNAL_NULL |
Signal that contains the latency until the frame enters the buffer. More... | |
Base class for a background (best-effort) buffer class.
Use the implementation BGQueueBuffer.
Definition at line 33 of file BGBuffer.h.
|
protectedvirtual |
Is called when a new Frame is received in the buffer.
Extends the handleMessage(cMessage *msg) method in Buffer class. An incoming frame is directly dequeued. No buffering!
msg | The incoming message |
Definition at line 29 of file BGBuffer.cc.
|
protectedvirtual |
Initializes the module.
Definition at line 23 of file BGBuffer.cc.