RINASim  October 2016
Documentation of framework for OMNeT++
DTP Class Reference

#include <DTP.h>

Inheritance diagram for DTP:

Public Member Functions

 DTP ()
 
virtual ~DTP ()
 
void delimitFromRMT ()
 
void svUpdate (unsigned int seqNum)
 
void setFlow (const Flow *flow)
 
void setDTCP (DTCP *dtcp)
 
const QoSCubegetQoSCube () const
 
void setQoSCube (const QoSCube *qosCube)
 
void setPduDroppingEnabled (bool pduDroppingEnabled)
 
void flushAllQueuesAndPrepareToDie ()
 
cModule * createPolicyModule (const char *prefix, const char *name)
 
void startATimer (unsigned int seqNum)
 
void resetSenderInactivTimer ()
 
void setPDUHeader (PDU *pdu)
 
void fillFlowControlPDU (FlowControlPDU *flowControlPdu)
 
void sendFCOnlyPDU ()
 
void sendAckFlowPDU (unsigned int seqNum=0, bool seqNumValid=false)
 
void sendControlAckPDU ()
 
void sendEmptyDTPDU ()
 
void sendToRMT (PDU *pdu)
 
void notifyStopSending ()
 
void notifyAboutUnableMaintain ()
 
void runCongestionNotificationPolicy ()
 
bool runInitialSeqNumPolicy ()
 
void setState (DTPState *state)
 
void sendReliableControlPDU ()
 
void cancelATimer (unsigned int seqNum)
 
bool isATimerQEmpty ()
 
void handleQueueInfoFromRMT (QueueInfo *queueInfo)
 
void handleQueueInfoFromSocket (QueueInfo *queueInfo)
 

Protected Member Functions

virtual void handleMessage (cMessage *msg)
 
virtual void initialize (int step)
 
int numInitStages () const
 
void initSignalsAndListeners ()
 

Protected Attributes

simsignal_t sigEFCPStahpSending
 
simsignal_t sigEFCPStartSending
 
simsignal_t sigStatDTPRTT
 
simsignal_t sigStatDTPClosedWinQ
 
simsignal_t sigStatDTPSentSeqNum
 
simsignal_t sigStatDTPRecvSeqNum
 

Private Member Functions

void handleDTPRcvrInactivityTimer (RcvrInactivityTimer *timer)
 
void handleDTPSenderInactivityTimer (SenderInactivityTimer *timer)
 
void handleDTPATimer (ATimer *timer)
 
void handleMsgFromUp (UserDataField *userDataField)
 
void handleMsgFromRMT (PDU *msg)
 
void handleDataTransferPDUFromRMT (DataTransferPDU *pdu)
 
void handleQueueInfo (QueueInfo *queueInfo)
 
unsigned int delimit (SDUData *sduData)
 
unsigned int delimitFromRMT (PDU *pdu, unsigned int len)
 
void generatePDUsnew ()
 
void trySendGenPDUs (std::vector< DataTransferPDU * > *pduQ)
 
void sduProtection (SDU *sdu)
 
void getSDUFromQ (SDU *sdu)
 
void setConnId (const ConnectionId &connId)
 
void runRcvrInactivityTimerPolicy ()
 
void runSenderInactivityTimerPolicy ()
 
void runRTTEstimatorPolicy ()
 
unsigned int getFlowControlRightWinEdge ()
 
double getRxTime ()
 
unsigned int getAllowableGap ()
 
void flushReassemblyPDUQ ()
 
void clearRxQ ()
 
void clearClosedWindowQ ()
 
void generateDTPDU (UserDataField *userDataField)
 
void schedule (DTPTimers *timer, double time=0.0)
 
void initGates ()
 
bool commonRcvControl (ControlPDU *pdu)
 
void sendAckOnlyPDU (unsigned int seqNum)
 
bool setDRFInPDU (bool override)
 
void redrawGUI ()
 
void addPDUToReassemblyQ (DataTransferPDU *pdu)
 
void rcvrBufferStateChange ()
 
bool isDuplicate (unsigned int seqNum)
 
void notifyAboutInactivity ()
 
void notifyStartSending ()
 
void handleControlPDUFromRMT (ControlPDU *pdu)
 
double getATime ()
 
void fillControlAckPDU (ControlAckPDU *ctrlAckPdu)
 
void fillRendezvousPDU (RendezvousPDU *rendezPDU)
 
void sendRendezvousPDU ()
 
void rendezvousCondition ()
 
void handleRendezvousTimer (DTCPRendezvousTimer *timer)
 
void handleInterrupterTimer (TheInterrupterTimer *msg)
 
void changeInBuffers ()
 

Private Attributes

unsigned int sduSeqNum
 
std::set< unsigned int > sequencingQ
 
int deletePdu
 
bool pduDroppingEnabled
 
bool rendezvousEnabled
 
DTPStatestate
 
DTCPdtcp
 
const Flowflow
 
RcvrInactivityPolicyBasercvrInactivityPolicy
 
SenderInactivityPolicyBasesenderInactivityPolicy
 
InitialSeqNumPolicyBaseinitialSeqNumPolicy
 
RTTEstimatorPolicyBaserttEstimatorPolicy
 
std::vector< UserDataField * > userDataFieldQOut
 
std::vector< ATimer * > aTimerQ
 
SenderInactivityTimersenderInactivityTimer
 
RcvrInactivityTimerrcvrInactivityTimer
 
cGate * northI
 
cGate * northO
 
cGate * southI
 
cGate * southO
 
ConnectionId connId
 

Friends

class DTCP
 

Detailed Description

Definition at line 60 of file DTP.h.

Constructor & Destructor Documentation

DTP::DTP ( )

Definition at line 32 of file DTP.cc.

DTP::~DTP ( )
virtual

Definition at line 53 of file DTP.cc.

Member Function Documentation

void DTP::addPDUToReassemblyQ ( DataTransferPDU pdu)
private

Invokes method of same name in DTPState to add

Parameters
pduto Reassembly Queue for further processing.
pduPDU to be put on the Reassembly Queue.

Definition at line 458 of file DTP.cc.

Referenced by handleDataTransferPDUFromRMT().

void DTP::cancelATimer ( unsigned int  seqNum)

This method cancels and deletes all A-Timers from aTimerQ up to

Parameters
seqNum
seqNumMaximum sequence number associated with ATimer that will be deleted.

Definition at line 800 of file DTP.cc.

Referenced by RcvrAckPolicyBase::defaultAction(), and handleDTPATimer().

void DTP::changeInBuffers ( )
private

Definition at line 307 of file DTP.cc.

Referenced by handleInterrupterTimer().

void DTP::clearClosedWindowQ ( )
private
void DTP::clearRxQ ( )
private

Definition at line 1731 of file DTP.cc.

bool DTP::commonRcvControl ( ControlPDU pdu)
private

Invokes Common checks on incomming Control PDUs.

Parameters
pduControl PDU to be checked.
Returns
Return false if the check fails signaling to stop processing this Control PDU.

Definition at line 488 of file DTP.cc.

Referenced by handleControlPDUFromRMT().

cModule * DTP::createPolicyModule ( const char *  prefix,
const char *  name 
)

Definition at line 65 of file DTP.cc.

unsigned int DTP::delimit ( SDUData sduData)
private

Delimits content of buffer from application

Definition at line 1171 of file DTP.cc.

unsigned int DTP::delimitFromRMT ( PDU pdu,
unsigned int  len 
)
private

Definition at line 1203 of file DTP.cc.

Referenced by SendingAckPolicyBase::defaultAction().

void DTP::delimitFromRMT ( )

Invokes delimiting upon finishing processing incoming PDU from RMT. For now, this method passes only complete, in-order SDUs to the upper flow.

Parameters
pduCan be nullptr.

Definition at line 468 of file DTP.cc.

Referenced by handleDataTransferPDUFromRMT(), and handleDTPATimer().

void DTP::fillControlAckPDU ( ControlAckPDU ctrlAckPdu)
private

Definition at line 1503 of file DTP.cc.

Referenced by fillRendezvousPDU(), and sendControlAckPDU().

void DTP::fillFlowControlPDU ( FlowControlPDU flowControlPdu)

This methods fill all Flow Control information related fields in Control PDU and updates last sent RRWE.

Parameters
flowControlPdu

Definition at line 540 of file DTP.cc.

Referenced by RcvrAckPolicyLG::run(), sendAckFlowPDU(), and sendFCOnlyPDU().

void DTP::fillRendezvousPDU ( RendezvousPDU rendezPDU)
private

Definition at line 1261 of file DTP.cc.

Referenced by sendRendezvousPDU().

void DTP::flushAllQueuesAndPrepareToDie ( )

This method is called upon deletion of DTP module. All dynamically components belonging to DTP should be deallocated here.

Definition at line 225 of file DTP.cc.

Referenced by ~DTP().

void DTP::flushReassemblyPDUQ ( )
private

Definition at line 1726 of file DTP.cc.

Referenced by handleDataTransferPDUFromRMT().

void DTP::generateDTPDU ( UserDataField userDataField)
private

!!!!!!!!!!!!!!!!!!!!!! Deprecated !!!!!!!!!!!!!!! Generates new DT-PDU with

Parameters
userDataFieldand puts it on generatedPDUsQ.
userDataField

Definition at line 418 of file DTP.cc.

void DTP::generatePDUsnew ( )
private

Encapsulate all SDUs from sduQ into PDUs and put them in generated_PDU Queue

Definition at line 1225 of file DTP.cc.

Referenced by handleMsgFromUp().

unsigned int DTP::getAllowableGap ( )
private

Definition at line 1678 of file DTP.cc.

double DTP::getATime ( )
private

Definition at line 857 of file DTP.cc.

unsigned int DTP::getFlowControlRightWinEdge ( )
private
const QoSCube * DTP::getQoSCube ( ) const

Get reference to the QoSCube active on this flow.

Returns
Reference to the QoSCube active on this flow.

Definition at line 196 of file DTP.cc.

Referenced by RcvrAckPolicyBase::defaultAction(), getAllowableGap(), and getRxTime().

double DTP::getRxTime ( )
private

Definition at line 1670 of file DTP.cc.

void DTP::getSDUFromQ ( SDU sdu)
private
void DTP::handleControlPDUFromRMT ( ControlPDU pdu)
private

Definition at line 602 of file DTP.cc.

Referenced by handleMsgFromRMT().

void DTP::handleDataTransferPDUFromRMT ( DataTransferPDU pdu)
private
  • Security requires a new flow */

Definition at line 862 of file DTP.cc.

Referenced by handleMsgFromRMT().

void DTP::handleDTPATimer ( ATimer timer)
private

Definition at line 1107 of file DTP.cc.

Referenced by handleMessage().

void DTP::handleDTPRcvrInactivityTimer ( RcvrInactivityTimer timer)
private

Definition at line 1087 of file DTP.cc.

Referenced by handleMessage().

void DTP::handleDTPSenderInactivityTimer ( SenderInactivityTimer timer)
private

Definition at line 1094 of file DTP.cc.

Referenced by handleMessage().

void DTP::handleInterrupterTimer ( TheInterrupterTimer msg)
private

Definition at line 325 of file DTP.cc.

Referenced by handleMessage().

void DTP::handleMessage ( cMessage *  msg)
protectedvirtual

Definition at line 343 of file DTP.cc.

void DTP::handleMsgFromRMT ( PDU msg)
private

This method handles incomming PDUs from RMT and passes them to specific methods for further processing.

Parameters
msgIncomming msg is either DataTransferPDU or ControlPDU. If it is neither of those, Error is raised.

Definition at line 757 of file DTP.cc.

Referenced by handleMessage().

void DTP::handleMsgFromUp ( UserDataField userDataField)
private

Handles message processing from upper module (delimiting) and tries to send it to RMT.

Parameters
sdu

Definition at line 437 of file DTP.cc.

Referenced by handleMessage().

void DTP::handleQueueInfo ( QueueInfo queueInfo)
private

Definition at line 100 of file DTP.cc.

Referenced by handleQueueInfoFromRMT(), and handleQueueInfoFromSocket().

void DTP::handleQueueInfoFromRMT ( QueueInfo queueInfo)

Definition at line 1788 of file DTP.cc.

Referenced by LisEFCPQueueInfoFromRMT::receiveSignal().

void DTP::handleQueueInfoFromSocket ( QueueInfo queueInfo)

Definition at line 95 of file DTP.cc.

Referenced by LisEFCPQueueInfoFromAE::receiveSignal().

void DTP::handleRendezvousTimer ( DTCPRendezvousTimer timer)
private

Definition at line 299 of file DTP.cc.

void DTP::initGates ( )
private

Definition at line 185 of file DTP.cc.

Referenced by initialize().

void DTP::initialize ( int  step)
protectedvirtual

Definition at line 116 of file DTP.cc.

void DTP::initSignalsAndListeners ( )
protected

Definition at line 104 of file DTP.cc.

Referenced by initialize().

bool DTP::isATimerQEmpty ( )

Definition at line 789 of file DTP.cc.

Referenced by RcvrAckPolicyBase::defaultAction().

bool DTP::isDuplicate ( unsigned int  seqNum)
private

Definition at line 840 of file DTP.cc.

Referenced by handleDataTransferPDUFromRMT().

void DTP::notifyAboutInactivity ( )
private

Definition at line 1607 of file DTP.cc.

void DTP::notifyAboutUnableMaintain ( )

Definition at line 1565 of file DTP.cc.

Referenced by RxTimerExpiryPolicyBase::defaultAction().

void DTP::notifyStartSending ( )
private

This methods is invoked when number of PDUs on closedWindowQueue gets reduced under maxClosedWinQLen. It indicates to the upper flow that it can start sending again.

Definition at line 1581 of file DTP.cc.

Referenced by handleControlPDUFromRMT().

void DTP::notifyStopSending ( )

This method is invoked upon reaching limit on closedWindowQueue and causes the upper flow (whether it is AE or another IPCP).

Definition at line 1594 of file DTP.cc.

Referenced by SndFCOverrunPolicyBase::defaultAction().

int DTP::numInitStages ( ) const
inlineprotected

Definition at line 275 of file DTP.h.

void DTP::rcvrBufferStateChange ( )
private

Definition at line 1686 of file DTP.cc.

void DTP::redrawGUI ( )
private

Prints important variables on the simulation pane next to the module.

Definition at line 243 of file DTP.cc.

Referenced by handleMessage().

void DTP::rendezvousCondition ( )
private
void DTP::resetSenderInactivTimer ( )

Definition at line 1100 of file DTP.cc.

Referenced by SendingAckPolicyBase::defaultAction().

void DTP::runCongestionNotificationPolicy ( )

Definition at line 90 of file DTP.cc.

Referenced by LisEFCPCongestFromRA::receiveSignal().

bool DTP::runInitialSeqNumPolicy ( )

Definition at line 1470 of file DTP.cc.

Referenced by SenderInactivityPolicyBase::defaultAction().

void DTP::runRcvrInactivityTimerPolicy ( )
private

Definition at line 1619 of file DTP.cc.

Referenced by handleDTPRcvrInactivityTimer().

void DTP::runRTTEstimatorPolicy ( )
private

Definition at line 80 of file DTP.cc.

Referenced by handleControlPDUFromRMT().

void DTP::runSenderInactivityTimerPolicy ( )
private

Definition at line 1633 of file DTP.cc.

Referenced by handleDTPSenderInactivityTimer().

void DTP::schedule ( DTPTimers timer,
double  time = 0.0 
)
private
void DTP::sduProtection ( SDU sdu)
private

This method does SDU protection eg CRC

This method calls specified function to perform SDU protection. SDU size will probably change because of the added CRC or whatnot.

Parameters
sduis the SDU being protected eg added CRC or otherwise

Definition at line 1464 of file DTP.cc.

void DTP::sendAckFlowPDU ( unsigned int  seqNum = 0,
bool  seqNumValid = false 
)

This method sends Ack and Flow Control information based on the presence of Flow Control and Retransmission Control.

Parameters
seqNumExplicitly specify the seqNum to be Acked, otherwise the RLWE is Acked.
seqNumValidSpecifies if the seqNum is valid, or if it is just "default and the RLWE should be used instead".

Definition at line 565 of file DTP.cc.

Referenced by RcvrAckPolicyBase::defaultAction(), RcvrControlAckPolicyBase::defaultAction(), RcvFCOverrunPolicyBase::defaultAction(), RateReductionPolicyBase::defaultAction(), handleDataTransferPDUFromRMT(), DTCP::handleMessage(), and sendReliableControlPDU().

void DTP::sendAckOnlyPDU ( unsigned int  seqNum)
private

Definition at line 1490 of file DTP.cc.

Referenced by sendAckFlowPDU().

void DTP::sendControlAckPDU ( )

Definition at line 1514 of file DTP.cc.

Referenced by LostControlPDUPolicyBase::defaultAction(), and handleControlPDUFromRMT().

void DTP::sendEmptyDTPDU ( )

Definition at line 1525 of file DTP.cc.

Referenced by LostControlPDUPolicyBase::defaultAction().

void DTP::sendFCOnlyPDU ( )

This method sends ControlPDU containing only Flow Control information.

Definition at line 519 of file DTP.cc.

Referenced by ReceivingFCPolicyBase::defaultAction(), and sendAckFlowPDU().

void DTP::sendReliableControlPDU ( )

Definition at line 319 of file DTP.cc.

Referenced by changeInBuffers().

void DTP::sendRendezvousPDU ( )
private

Definition at line 1272 of file DTP.cc.

Referenced by rendezvousCondition().

void DTP::setConnId ( const ConnectionId connId)
private

Sets Connection-ID of this connection.

Parameters
connId

Definition at line 294 of file DTP.cc.

bool DTP::setDRFInPDU ( bool  override)
private

Definition at line 1212 of file DTP.cc.

Referenced by generateDTPDU(), generatePDUsnew(), and sendEmptyDTPDU().

void DTP::setDTCP ( DTCP dtcp)

Definition at line 1774 of file DTP.cc.

Referenced by EFCPInstance::setDtcp().

void DTP::setFlow ( const Flow flow)

Definition at line 1769 of file DTP.cc.

Referenced by EFCP::createEFCPI().

void DTP::setPduDroppingEnabled ( bool  pduDroppingEnabled)

Sets flag for activating PDU dropping capabilities used purely for testing Retransmission This flag is currently obsolete.

Parameters
pduDroppingEnabled

Definition at line 216 of file DTP.cc.

void DTP::setPDUHeader ( PDU pdu)

This method fills header fields in given

Parameters
pdu
pdu

Definition at line 404 of file DTP.cc.

Referenced by generateDTPDU(), generatePDUsnew(), RcvrAckPolicyLG::run(), sendAckFlowPDU(), sendAckOnlyPDU(), sendControlAckPDU(), sendEmptyDTPDU(), sendFCOnlyPDU(), and sendRendezvousPDU().

void DTP::setQoSCube ( const QoSCube qosCube)

Set QoSCube for this flow.

Parameters
qosCubeQoSCube to be used on this connection.

Definition at line 205 of file DTP.cc.

void DTP::setState ( DTPState state)

Definition at line 1783 of file DTP.cc.

Referenced by EFCP::createEFCPI().

void DTP::startATimer ( unsigned int  seqNum)

Definition at line 812 of file DTP.cc.

Referenced by RcvrAckPolicyBase::defaultAction(), and handleDataTransferPDUFromRMT().

void DTP::svUpdate ( unsigned int  seqNum)

Definition at line 1694 of file DTP.cc.

Referenced by SendingAckPolicyBase::defaultAction(), and handleDataTransferPDUFromRMT().

void DTP::trySendGenPDUs ( std::vector< DataTransferPDU * > *  pduQ)
private

Definition at line 1323 of file DTP.cc.

Referenced by handleControlPDUFromRMT(), and handleMsgFromUp().

Friends And Related Function Documentation

friend class DTCP
friend

Definition at line 63 of file DTP.h.

Member Data Documentation

std::vector<ATimer*> DTP::aTimerQ
private

Definition at line 89 of file DTP.h.

Referenced by cancelATimer(), flushAllQueuesAndPrepareToDie(), isATimerQEmpty(), and startATimer().

ConnectionId DTP::connId
private

Definition at line 113 of file DTP.h.

Referenced by setConnId().

int DTP::deletePdu
private

Definition at line 68 of file DTP.h.

Referenced by DTP().

const Flow* DTP::flow
private

Definition at line 74 of file DTP.h.

Referenced by notifyStartSending(), notifyStopSending(), setFlow(), and setPDUHeader().

InitialSeqNumPolicyBase* DTP::initialSeqNumPolicy
private

Definition at line 81 of file DTP.h.

Referenced by DTP(), initialize(), and runInitialSeqNumPolicy().

cGate* DTP::northI
private

Definition at line 106 of file DTP.h.

Referenced by handleMessage(), and initGates().

cGate* DTP::northO
private

Definition at line 107 of file DTP.h.

Referenced by delimitFromRMT(), and initGates().

bool DTP::pduDroppingEnabled
private

Definition at line 69 of file DTP.h.

Referenced by DTP(), and setPduDroppingEnabled().

RcvrInactivityPolicyBase* DTP::rcvrInactivityPolicy
private

Definition at line 79 of file DTP.h.

Referenced by DTP(), initialize(), and runRcvrInactivityTimerPolicy().

RcvrInactivityTimer* DTP::rcvrInactivityTimer
private

Definition at line 95 of file DTP.h.

Referenced by DTP(), flushAllQueuesAndPrepareToDie(), handleDataTransferPDUFromRMT(), and initialize().

bool DTP::rendezvousEnabled
private

Definition at line 70 of file DTP.h.

Referenced by initialize(), and rendezvousCondition().

RTTEstimatorPolicyBase* DTP::rttEstimatorPolicy
private

Definition at line 82 of file DTP.h.

Referenced by DTP(), initialize(), runRTTEstimatorPolicy(), and DTCP::schedule().

unsigned int DTP::sduSeqNum
private

Definition at line 66 of file DTP.h.

Referenced by DTP().

SenderInactivityPolicyBase* DTP::senderInactivityPolicy
private

Definition at line 80 of file DTP.h.

Referenced by DTP(), initialize(), and runSenderInactivityTimerPolicy().

SenderInactivityTimer* DTP::senderInactivityTimer
private
std::set<unsigned int> DTP::sequencingQ
private

Definition at line 67 of file DTP.h.

simsignal_t DTP::sigEFCPStahpSending
protected

Definition at line 285 of file DTP.h.

Referenced by initSignalsAndListeners(), and notifyStopSending().

simsignal_t DTP::sigEFCPStartSending
protected

Definition at line 286 of file DTP.h.

Referenced by initSignalsAndListeners(), and notifyStartSending().

simsignal_t DTP::sigStatDTPClosedWinQ
protected

Definition at line 290 of file DTP.h.

Referenced by handleMessage(), and initSignalsAndListeners().

simsignal_t DTP::sigStatDTPRecvSeqNum
protected

Definition at line 293 of file DTP.h.

Referenced by handleDataTransferPDUFromRMT(), and initSignalsAndListeners().

simsignal_t DTP::sigStatDTPRTT
protected

Definition at line 289 of file DTP.h.

Referenced by initSignalsAndListeners(), and runRTTEstimatorPolicy().

simsignal_t DTP::sigStatDTPSentSeqNum
protected

Definition at line 292 of file DTP.h.

Referenced by initSignalsAndListeners(), and sendToRMT().

cGate* DTP::southI
private

Definition at line 110 of file DTP.h.

Referenced by handleMessage(), and initGates().

cGate* DTP::southO
private

Definition at line 111 of file DTP.h.

Referenced by initGates(), and sendToRMT().

std::vector<UserDataField*> DTP::userDataFieldQOut
private

Definition at line 87 of file DTP.h.

Referenced by generatePDUsnew(), and handleMsgFromUp().


The documentation for this class was generated from the following files: