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

#include <uwrov-module.h>

Inheritance diagram for UwROVModule:
Collaboration diagram for UwROVModule:

Public Member Functions

 UwROVModule ()
 
 UwROVModule (UWSMPosition *p)
 
virtual ~UwROVModule ()
 
virtual int command (int argc, const char *const *argv)
 
virtual void initPkt (Packet *p)
 
virtual void recv (Packet *)
 
virtual void recv (Packet *p, Handler *h)
 
virtual void setPosition (UWSMPosition *p)
 
UWSMPositiongetPosition ()
 
virtual void sendAck ()
 
- Public Member Functions inherited from UwCbrModule
 UwCbrModule ()
 
virtual ~UwCbrModule ()
 
virtual int crLayCommand (ClMessage *m)
 
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

UWSMPositionposit
 
int last_sn_confirmed
 
int ack
 
std::queue< Packet * > buffer
 
UWROV_ACK_POLICY ackPolicy
 
int ackTimeout
 
UwROVSendAckTimer ackTimer_
 
int ackPriority
 
int ackNotPgbk
 
int drop_old_waypoints
 
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 78 of file uwrov-module.h.

Member Enumeration Documentation

◆ UWROV_ACK_POLICY

Enumerator
ACK_PIGGYBACK 
ACK_IMMEDIATELY 
ACK_PGBK_OR_TO 

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

Constructor & Destructor Documentation

◆ UwROVModule() [1/2]

UwROVModule::UwROVModule ( )

Default Constructor of UwROVModule class.

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

◆ UwROVModule() [2/2]

UwROVModule::UwROVModule ( UWSMPosition p)

Constructor with position setting of UwROVModule class.

Parameters
UWSMPosition*p Pointer to the ROV position

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

◆ ~UwROVModule()

UwROVModule::~UwROVModule ( )
virtual

Destructor of UwROVModule class.

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

Member Function Documentation

◆ command()

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

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 142 of file uwrov-module.cc.

◆ getPosition()

UWSMPosition * UwROVModule::getPosition ( )
inline

Returns the position of the ROV.

Returns
the current ROV position

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

◆ 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 157 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 150 of file uwrov-module.h.

◆ initPkt()

void UwROVModule::initPkt ( Packet *  p)
virtual

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 215 of file uwrov-module.cc.

◆ recv() [1/2]

void UwROVModule::recv ( Packet *  p)
virtual

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 242 of file uwrov-module.cc.

◆ recv() [2/2]

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

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 238 of file uwrov-module.cc.

◆ sendAck()

void UwROVModule::sendAck ( )
virtual

Sends ACK if ackTimeout expire;.

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

◆ setPosition()

void UwROVModule::setPosition ( UWSMPosition p)
virtual

Sets the position of the ROV.

Parameters
UWSMPosition* p Pointer to the ROV position

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

Friends And Related Symbol Documentation

◆ UwROVSendAckTimer

friend class UwROVSendAckTimer
friend

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

Member Data Documentation

◆ ack

int UwROVModule::ack
protected

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

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

◆ ackNotPgbk

int UwROVModule::ackNotPgbk
protected

< Flag to give higher priority to ACK or not.

Definition at line 184 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 a ackTimeout otherwise ACK is sent with a dedicated packet after the acKTimeout.

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

◆ ackPriority

int UwROVModule::ackPriority
protected

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

◆ ackTimeout

int UwROVModule::ackTimeout
protected

Timeout after which ACK is sent if ackPolicy = ACK_PGBK_OR_TO.

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

◆ ackTimer_

UwROVSendAckTimer UwROVModule::ackTimer_
protected

Timer to schedule ACK transmission.

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

◆ buffer

std::queue<Packet*> UwROVModule::buffer
protected

Packets buffer.

Definition at line 173 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 185 of file uwrov-module.h.

◆ last_sn_confirmed

int UwROVModule::last_sn_confirmed
protected

Sequence number of the last command Packete received.

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

◆ log_flag

int UwROVModule::log_flag
protected

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

Flag to enable log file writing.

Definition at line 189 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 191 of file uwrov-module.h.

◆ posit

UWSMPosition* UwROVModule::posit
protected

ROV position.

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


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