TTEthernet Model for INET Framework
|
Represents the part of a port that sends messages (TX) More...
#include <TTEOutput.h>
Public Member Functions | |
TTEOutput () | |
Constructor. More... | |
~TTEOutput () | |
Destructor. More... | |
virtual void | handleParameterChange (const char *parname) |
Indicates a parameter has changed. More... | |
virtual void | addListener (IPassiveQueueListener *listener) |
Implementation of IPassiveQueue::addListener(). More... | |
virtual void | removeListener (IPassiveQueueListener *listener) |
Implementation of IPassiveQueue::removeListener(). More... | |
Protected Member Functions | |
virtual void | initialize () |
Initialization of the module. More... | |
virtual void | handleMessage (cMessage *msg) |
Forwards the messages from the different buffers and LLC according to the TTEthernet specification. More... | |
virtual void | requestPacket () |
this method is invoked when the underlying mac is idle. More... | |
virtual int | getNumPendingRequests () |
Returns number of requested messages. More... | |
virtual bool | isEmpty () |
Returns true when there are no pending messages. More... | |
virtual void | clear () |
Clears all queued packets and stored requests. More... | |
void | notifyListeners () |
Static Protected Attributes | |
static simsignal_t | ttQueueLengthSignal = SIMSIGNAL_NULL |
Signal that is emitted when the queue length of time-triggered messages changes. More... | |
static simsignal_t | beQueueLengthSignal = SIMSIGNAL_NULL |
Signal that is emitted when the queue length of best-effort messages changes. More... | |
static simsignal_t | pcfQueueLengthSignal = SIMSIGNAL_NULL |
Signal that is emitted when the queue length of protocol control messages changes. More... | |
Private Member Functions | |
virtual bool | isTransmissionAllowed (EtherFrame *message) |
Helper function to check whether a Messages is allowed to be transmitted. More... | |
virtual void | setTransparentClock (PCFrame *pcf) |
Sets the transparent clock field in a protocol control frame according to the actual sending time. More... | |
virtual void | registerTTBuffer (TTBuffer *buffer) |
Registers a time-triggered buffer that feeds the module. More... | |
Private Attributes | |
cChannel * | outChannel |
Outgoing Channel used to calculate transmission duration. More... | |
unsigned int | framesRequested |
Number of frames that were requested from lower layer. More... | |
cQueue | ttQueue |
Queue for TT-Messages. More... | |
cQueue | rcQueue [NUM_RC_PRIORITIES] |
Dedicated queue for each priority of rate-constrained messages. More... | |
cQueue | beQueue |
Queue for best-effort messages. More... | |
cQueue | pcfQueue |
Queue for protocol control messages. More... | |
std::vector< TTBuffer * > | ttBuffers |
Vector of TTBuffers. More... | |
std::list < IPassiveQueueListener * > | listeners |
List of TTBuffers. More... | |
size_t | ttBuffersPos |
Current position of the next Buffer (action time) in the ttBuffers vector. More... | |
Represents the part of a port that sends messages (TX)
Definition at line 20 of file TTEOutput.h.
TTEOutput::TTEOutput | ( | ) |
TTEOutput::~TTEOutput | ( | ) |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
Returns number of requested messages.
Definition at line 360 of file TTEOutput.cc.
|
protectedvirtual |
Forwards the messages from the different buffers and LLC according to the TTEthernet specification.
Time-triggered messages are send immediately, rate-constrained and best-effort messages are delayed if they do not fit in the gap until the next time-triggered message. If the lower layer is idle messages are picked from the queues according to the priorities. Time-triggered buffers can free the bandwidth reservation mechanism by sending a TTBufferEmpty message.
msg | the incoming message |
Definition at line 75 of file TTEOutput.cc.
|
virtual |
Indicates a parameter has changed.
parname | Name of the changed parameter or NULL if multiple parameter changed. |
Definition at line 211 of file TTEOutput.cc.
|
protectedvirtual |
|
protectedvirtual |
Returns true when there are no pending messages.
Definition at line 365 of file TTEOutput.cc.
Referenced by requestPacket().
|
privatevirtual |
Helper function to check whether a Messages is allowed to be transmitted.
The function checks whether a message fits in the gap until the next TT-message should be transmitted. It uses the message length to calculate the transmission duration.
message | The message that should be transmitted |
Definition at line 292 of file TTEOutput.cc.
Referenced by handleMessage(), and requestPacket().
|
protected |
Definition at line 69 of file TTEOutput.cc.
Referenced by handleMessage().
|
privatevirtual |
Registers a time-triggered buffer that feeds the module.
Definition at line 179 of file TTEOutput.cc.
Referenced by handleParameterChange().
|
virtual |
|
protectedvirtual |
this method is invoked when the underlying mac is idle.
When this method is invoked the module sends a new message when there is one. Else it saves the state and sends the message immediately when it is received.
Definition at line 240 of file TTEOutput.cc.
Referenced by handleMessage().
|
privatevirtual |
Sets the transparent clock field in a protocol control frame according to the actual sending time.
pcf | the protocol control frame |
Definition at line 334 of file TTEOutput.cc.
Referenced by handleMessage(), and requestPacket().
|
private |
Queue for best-effort messages.
Definition at line 71 of file TTEOutput.h.
Referenced by clear(), handleMessage(), isEmpty(), requestPacket(), TTEOutput(), and ~TTEOutput().
|
staticprotected |
Signal that is emitted when the queue length of best-effort messages changes.
Definition at line 105 of file TTEOutput.h.
Referenced by handleMessage(), initialize(), and requestPacket().
|
private |
Number of frames that were requested from lower layer.
Definition at line 55 of file TTEOutput.h.
Referenced by clear(), getNumPendingRequests(), handleMessage(), requestPacket(), and TTEOutput().
|
private |
List of TTBuffers.
The vector is ordered by action time
Definition at line 90 of file TTEOutput.h.
Referenced by addListener(), notifyListeners(), and removeListener().
|
private |
Outgoing Channel used to calculate transmission duration.
Definition at line 51 of file TTEOutput.h.
Referenced by initialize(), and isTransmissionAllowed().
|
private |
Queue for protocol control messages.
Definition at line 76 of file TTEOutput.h.
Referenced by handleMessage(), TTEOutput(), and ~TTEOutput().
|
staticprotected |
Signal that is emitted when the queue length of protocol control messages changes.
Definition at line 109 of file TTEOutput.h.
Referenced by handleMessage(), and initialize().
|
private |
Dedicated queue for each priority of rate-constrained messages.
Definition at line 66 of file TTEOutput.h.
Referenced by clear(), handleMessage(), isEmpty(), requestPacket(), TTEOutput(), and ~TTEOutput().
|
private |
Vector of TTBuffers.
The vector is ordered by action time
Definition at line 83 of file TTEOutput.h.
Referenced by handleMessage(), handleParameterChange(), isTransmissionAllowed(), registerTTBuffer(), and requestPacket().
|
private |
Current position of the next Buffer (action time) in the ttBuffers vector.
Definition at line 95 of file TTEOutput.h.
Referenced by handleMessage(), isTransmissionAllowed(), requestPacket(), and TTEOutput().
|
private |
Queue for TT-Messages.
Will be only filled when there is TT shuffling configured or there was an error in the configuration.
Definition at line 61 of file TTEOutput.h.
Referenced by clear(), handleMessage(), isEmpty(), requestPacket(), TTEOutput(), and ~TTEOutput().
|
staticprotected |
Signal that is emitted when the queue length of time-triggered messages changes.
Definition at line 100 of file TTEOutput.h.
Referenced by handleMessage(), initialize(), and requestPacket().