TTEthernet Model for INET Framework
|
Base class for a double buffer class. More...
#include <DoubleBuffer.h>
Public Member Functions | |
DoubleBuffer () | |
Constructor. More... | |
virtual | ~DoubleBuffer () |
Destructor. More... | |
![]() | |
~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... | |
Protected Member Functions | |
virtual void | enqueue (EtherFrame *newFrame) |
Stores a new frame. More... | |
virtual EtherFrame * | dequeue () |
Returns the frame that is stored 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... | |
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... | |
Private Attributes | |
EtherFrame * | frame |
The EtherFrame pointer is stored here. More... | |
Additional Inherited Members | |
![]() | |
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 double buffer class.
Use the implementations BGDoubleBuffer, TTDoubleBuffer, RCDoubleBuffer.
Definition at line 34 of file DoubleBuffer.h.
DoubleBuffer::DoubleBuffer | ( | ) |
|
virtual |
|
protectedvirtual |
Returns the frame that is stored in the buffer.
The stored frame is copied and the copy is being returned. If there is no EtherFrame stored NULL is returned.
Reimplemented from TTEthernetModel::Buffer.
Definition at line 41 of file DoubleBuffer.cc.
|
protectedvirtual |
Stores a new frame.
The incoming EtherFrame pointer is stored. A previously stored frame is deleted
newFrame | the new EtherFrame to store. |
Reimplemented from TTEthernetModel::Buffer.
Definition at line 30 of file DoubleBuffer.cc.
|
private |
The EtherFrame pointer is stored here.
Definition at line 50 of file DoubleBuffer.h.