DESERT 3.6.0
Loading...
Searching...
No Matches
UwROVModule Class Reference

#include <uwrov-module.h>

Inheritance diagram for UwROVModule:
Collaboration diagram for UwROVModule:

Public Member Functions

 UwROVModule ()
 
virtual ~UwROVModule ()=default
 
virtual int command (int argc, const char *const *argv) override
 
virtual void initPkt (Packet *p) override
 
virtual void recv (Packet *) override
 
virtual void recv (Packet *p, Handler *h) override
 
virtual void sendAck ()
 
- Public Member Functions inherited from UwCbrModule
 UwCbrModule ()
 
virtual ~UwCbrModule ()=default
 
virtual double GetRTT () const
 
virtual double GetFTT () const
 
virtual double GetTxTime () const
 
virtual double GetPER () const
 
virtual double GetTHR () const
 
virtual double GetRTTstd () const
 
virtual double GetFTTstd () const
 
virtual void resetStats ()
 
void printIdsPkts () const
 

Static Public Member Functions

static int getROVMonHeaderSize ()
 
static int getROVCTRHeaderSize ()
 

Protected Types

enum  UWROV_ACK_POLICY { ACK_PIGGYBACK , ACK_IMMEDIATELY , ACK_PGBK_OR_TO }
 

Protected Attributes

int last_sn_confirmed
 
int ack
 
int ackPriority
 
int ackNotPgbk
 
int drop_old_waypoints
 
int ackTimeout
 
UWSMPositionposit
 
UwROVSendAckTimer ackTimer_
 
UWROV_ACK_POLICY ackPolicy
 
int log_flag
 
std::ofstream out_file_stats
 
- Protected Attributes inherited from UwCbrModule
uint16_t dstPort_
 
std::string log_suffix
 
nsaddr_t dstAddr_
 
char priority_
 
std::ofstream tracefile
 
std::string tracefilename
 
bool * sn_check
 
int PoissonTraffic_
 
int debug_
 
int drop_out_of_order_
 
uint traffic_type_
 
UwSendTimer sendTmr_
 
int txsn
 
int hrsn
 
int pkts_recv
 
int pkts_ooseq
 
int pkts_lost
 
int pkts_invalid
 
int pkts_last_reset
 
int cnt
 
double rftt
 
double srtt
 
double sftt
 
double lrtime
 
double sthr
 
double period_
 
int pktSize_
 
double sumrtt
 
double sumrtt2
 
int rttsamples
 
double sumftt
 
double sumftt2
 
int fttsamples
 
double sumtxtimes = 0
 
double sumbytes
 
double sumdt
 
uint32_t esn
 
int tracefile_enabler_
 

Friends

class UwROVSendAckTimer
 

Additional Inherited Members

- Protected Member Functions inherited from UwCbrModule
virtual void sendPkt ()
 
virtual void sendPktLowPriority ()
 
virtual void sendPktHighPriority ()
 
virtual void transmit ()
 
virtual void start ()
 
virtual void stop ()
 
virtual void updateRTT (const double &)
 
virtual void updateFTT (const double &)
 
virtual void updateThroughput (const int &, const double &)
 
virtual void incrPktLost (const int &)
 
virtual void incrPktRecv ()
 
virtual void incrPktOoseq ()
 
virtual void incrPktInvalid ()
 
virtual double getTimeBeforeNextPkt ()
 
virtual void printReceivedPacket (Packet *p)
 
- Static Protected Member Functions inherited from UwCbrModule
static int getCbrHeaderSize ()
 
- Static Protected Attributes inherited from UwCbrModule
static int uidcnt_ = 0
 

Detailed Description

UwROVModule class is used to manage UWROV packets and to collect statistics about them.

Definition at line 83 of file uwrov-module.h.

Member Enumeration Documentation

◆ UWROV_ACK_POLICY

Enumerator
ACK_PIGGYBACK 
ACK_IMMEDIATELY 
ACK_PGBK_OR_TO 

Definition at line 162 of file uwrov-module.h.

Constructor & Destructor Documentation

◆ UwROVModule()

UwROVModule::UwROVModule ( )

Default Constructor of UwROVModule class.

Definition at line 75 of file uwrov-module.cc.

◆ ~UwROVModule()

virtual UwROVModule::~UwROVModule ( )
virtualdefault

Destructor of UwROVModule class.

Member Function Documentation

◆ command()

int UwROVModule::command ( int  argc,
const char *const *  argv 
)
overridevirtual

TCL command interpreter.

It implements the following OTcl methods:

Parameters
argcNumber of arguments in argv.
argvArray of strings which are the command parameters (Note that argv[0] is the name of the object).
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.

Reimplemented from UwCbrModule.

Definition at line 102 of file uwrov-module.cc.

◆ getROVCTRHeaderSize()

static int UwROVModule::getROVCTRHeaderSize ( )
inlinestatic

Returns the size in byte of a hdr_uwROV_ctr packet header.

Returns
The size of a hdr_uwROV_ctr packet header.

Definition at line 151 of file uwrov-module.h.

◆ getROVMonHeaderSize()

static int UwROVModule::getROVMonHeaderSize ( )
inlinestatic

Returns the size in byte of a hdr_uwROV_monitoring packet header.

Returns
The size of a hdr_uwROV_monitoring packet header.

Definition at line 140 of file uwrov-module.h.

◆ initPkt()

void UwROVModule::initPkt ( Packet *  p)
overridevirtual

Initializes a monitoring data packet passed as argument with the default values.

Parameters
Packet*Pointer to a packet already allocated to fill with the right values.

Reimplemented from UwCbrModule.

Definition at line 189 of file uwrov-module.cc.

◆ recv() [1/2]

void UwROVModule::recv ( Packet *  p)
overridevirtual

Performs the reception of packets from upper and lower layers.

Parameters
Packet*Pointer to the packet will be received.

Reimplemented from UwCbrModule.

Definition at line 225 of file uwrov-module.cc.

◆ recv() [2/2]

void UwROVModule::recv ( Packet *  p,
Handler *  h 
)
overridevirtual

Performs the reception of packets from upper and lower layers.

Parameters
Packet*Pointer to the packet will be received.
Handler*Handler.

Reimplemented from UwCbrModule.

Definition at line 219 of file uwrov-module.cc.

◆ sendAck()

void UwROVModule::sendAck ( )
virtual

Sends ACK if ackTimeout expire;.

Definition at line 287 of file uwrov-module.cc.

Friends And Related Symbol Documentation

◆ UwROVSendAckTimer

friend class UwROVSendAckTimer
friend

Definition at line 85 of file uwrov-module.h.

Member Data Documentation

◆ ack

int UwROVModule::ack
protected

If not zero, contains the ACK to the last command packet received.

Definition at line 165 of file uwrov-module.h.

◆ ackNotPgbk

int UwROVModule::ackNotPgbk
protected

Definition at line 167 of file uwrov-module.h.

◆ ackPolicy

UWROV_ACK_POLICY UwROVModule::ackPolicy
protected

Flag to set the policy for ACK transimission, ACK_PIGGYBACK: ACK is always sent in piggyback, ACK_IMMEDIATELY: ACK is always sent immediately with a dedicated packet after the reception of CTR packet, ACK_PGBK_OR_TO: ACK is sent in piggyback if a ROV packet is generated before an ackTimeout otherwise ACK is sent with a dedicated packet after the acKTimeout.

Definition at line 176 of file uwrov-module.h.

◆ ackPriority

int UwROVModule::ackPriority
protected

Flag to give higher priority to ACK or not.

Definition at line 166 of file uwrov-module.h.

◆ ackTimeout

int UwROVModule::ackTimeout
protected

< Flag set to 1 to drop waypoints with sequence number lower or equal than last_sn_confirmed.

Timeout after which ACK is sent if ackPolicy = ACK_PGBK_OR_TO.

Definition at line 169 of file uwrov-module.h.

◆ ackTimer_

UwROVSendAckTimer UwROVModule::ackTimer_
protected

Timer to schedule ACK transmission.

Definition at line 171 of file uwrov-module.h.

◆ drop_old_waypoints

int UwROVModule::drop_old_waypoints
protected

< Number of ACK not sent in piggyback when ackPolicy = 2.

Definition at line 168 of file uwrov-module.h.

◆ last_sn_confirmed

int UwROVModule::last_sn_confirmed
protected

Sequence number of the last command packet received.

Definition at line 164 of file uwrov-module.h.

◆ log_flag

int UwROVModule::log_flag
protected

Flag to enable log file writing.

Definition at line 178 of file uwrov-module.h.

◆ out_file_stats

std::ofstream UwROVModule::out_file_stats
protected

Output stream for the textual file of debug.

Definition at line 179 of file uwrov-module.h.

◆ posit

UWSMPosition* UwROVModule::posit
protected

ROV position.

Definition at line 170 of file uwrov-module.h.


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