DESERT 4.0.0
Uwpolling_SINK Class Reference

#include <uwpolling_SINK.h>

Inheritance diagram for Uwpolling_SINK:
Inheritance graph
Collaboration diagram for Uwpolling_SINK:
Collaboration graph

Classes

class  BackOffTimer
 
class  Rx_Data_Timer
 
class  Uwpolling_SINK_Timer
 

Public Member Functions

 Uwpolling_SINK ()
 
virtual ~Uwpolling_SINK ()
 
virtual int command (int argc, const char *const *argv)
 
virtual int crLayCommand (ClMessage *m)
 

Protected Types

enum  UWPOLLING_SINK_STATUS {
  UWPOLLING_SINK_STATUS_IDLE = 1 , UWPOLLING_SINK_STATUS_RX_TRIGGER , UWPOLLING_SINK_STATUS_TX_PROBE , UWPOLLING_SINK_STATUS_WAIT_DATA ,
  UWPOLLING_SINK_STATUS_RX_DATA , UWPOLLING_SINK_STATUS_TX_ACK
}
 
enum  UWPOLLING_PKT_TYPE {
  UWPOLLING_DATA_PKT = 1 , UWPOLLING_POLL_PKT , UWPOLLING_TRIGGER_PKT , UWPOLLING_PROBE_PKT ,
  UWPOLLING_ACK_PKT
}
 
enum  UWPOLLING_SINK_REASON {
  UWPOLLING_SINK_REASON_RX_DATA , UWPOLLING_SINK_REASON_RX_TRIGGER , UWPOLLING_SINK_REASON_PKT_ERROR , UWPOLLING_SINK_REASON_TX_PROBE ,
  UWPOLLING_SINK_REASON_TX_ACK , UWPOLLING_SINK_REASON_BACKOFF_TIMER_EXPIRED , UWPOLLING_SINK_REASON_RX_DATA_TIMER_EXPIRED , UWPOLLING_SINK_REASON_NOT_SET ,
  UWPOLLING_SINK_REASON_MAX_DATA_RECEIVED , UWPOLLING_SINK_REASON_WRONG_TYPE , UWPOLLING_SINK_REASON_WRONG_RECEIVER , UWPOLLING_SINK_REASON_WRONG_STATE
}
 
enum  UWPOLLING_TIMER_STATUS { UWPOLLING_IDLE = 1 , UWPOLLING_RUNNING , UWPOLLING_FROZEN , UWPOLLING_EXPIRED }
 

Protected Member Functions

virtual void Mac2PhyStartTx (Packet *p)
 
virtual void Phy2MacEndTx (const Packet *p)
 
virtual void Phy2MacStartRx (const Packet *p)
 
virtual void Phy2MacEndRx (Packet *p)
 
virtual void initPkt (UWPOLLING_PKT_TYPE pkt_type)
 
virtual void initInfo ()
 
virtual void refreshReason (UWPOLLING_SINK_REASON reason)
 
virtual void refreshState (UWPOLLING_SINK_STATUS state)
 
virtual void incrProbeSent ()
 
virtual void incrAckSent ()
 
void incrTriggerReceived ()
 
void incrTriggerDropped ()
 
int getProbeSent ()
 
int getAckSent ()
 
int getTriggerReceived ()
 
int getTriggerDropped ()
 
uint getDuplicatedPkt ()
 
void incrDuplicatedPkt ()
 
virtual void waitForUser ()
 
virtual void stateIdle ()
 
virtual void stateRxTrigger ()
 
virtual void stateTxProbe ()
 
virtual void BackOffTimerExpired ()
 
virtual void RxDataTimerExpired ()
 
virtual double getBackOffTime ()
 
virtual void txAck ()
 
virtual void TxProbe ()
 
virtual void stateWaitData ()
 
virtual void stateRxData ()
 
virtual void addMissPkt2List (uint16_t n_pkts)
 
virtual void stateTxAck ()
 
unsigned long int getEpoch ()
 

Protected Attributes

double T_data
 
double T_data_gurad
 
double backoff_tuner
 
uint sink_id
 
bool RxDataEnabled
 
bool Triggered
 
bool triggerEnabled
 
double T_in
 
double T_fin
 
double BOffTime
 
int AUV_mac_addr
 
int n_probe_sent
 
int n_trigger_received
 
int n_trigger_dropped
 
int n_ack_sent
 
uint n_curr_rx_pkts
 
uint16_t expected_id
 
uint16_t last_rx
 
bool send_ACK
 
std::list< uint16_t > missing_id_list
 
uint16_t expected_last_id
 
uint16_t prev_expect_last_id
 
uint duplicate_pkts
 
bool first_rx_pkt
 
uint PROBE_uid
 
Packet * curr_data_pkt
 
Packet * curr_probe_pkt
 
Packet * curr_trigger_pkt
 
Packet * curr_ack_pkt
 
UWPOLLING_SINK_REASON last_reason
 
UWPOLLING_SINK_STATUS curr_state
 
UWPOLLING_SINK_STATUS prev_state
 
BackOffTimer backoff_timer
 
Rx_Data_Timer rx_data_timer
 
std::ofstream fout
 
std::ofstream out_file_stats
 
int sea_trial
 
int print_stats
 
int n_run
 
int useAdaptiveTdata
 
int ack_enabled
 
uint max_n_ack
 
double T_guard
 
int max_payload
 
int modem_data_bit_rate
 

Static Protected Attributes

static bool initialized = false
 
static map< Uwpolling_SINK::UWPOLLING_SINK_STATUS, string > status_info
 
static map< Uwpolling_SINK::UWPOLLING_SINK_REASON, string > reason_info
 
static map< Uwpolling_SINK::UWPOLLING_PKT_TYPE, string > pkt_type_info
 

Detailed Description

Class used to represents the UWPOLLING MAC layer of a node.

Member Enumeration Documentation

◆ UWPOLLING_PKT_TYPE

Enumerator
UWPOLLING_DATA_PKT 
UWPOLLING_POLL_PKT 
UWPOLLING_TRIGGER_PKT 
UWPOLLING_PROBE_PKT 
UWPOLLING_ACK_PKT 

◆ UWPOLLING_SINK_REASON

Enumerator
UWPOLLING_SINK_REASON_RX_DATA 
UWPOLLING_SINK_REASON_RX_TRIGGER 
UWPOLLING_SINK_REASON_PKT_ERROR 
UWPOLLING_SINK_REASON_TX_PROBE 
UWPOLLING_SINK_REASON_TX_ACK 
UWPOLLING_SINK_REASON_BACKOFF_TIMER_EXPIRED 
UWPOLLING_SINK_REASON_RX_DATA_TIMER_EXPIRED 
UWPOLLING_SINK_REASON_NOT_SET 
UWPOLLING_SINK_REASON_MAX_DATA_RECEIVED 
UWPOLLING_SINK_REASON_WRONG_TYPE 
UWPOLLING_SINK_REASON_WRONG_RECEIVER 
UWPOLLING_SINK_REASON_WRONG_STATE 

◆ UWPOLLING_SINK_STATUS

< Variable that rapresents the status of the protocol machine state

Enumerator
UWPOLLING_SINK_STATUS_IDLE 
UWPOLLING_SINK_STATUS_RX_TRIGGER 
UWPOLLING_SINK_STATUS_TX_PROBE 
UWPOLLING_SINK_STATUS_WAIT_DATA 
UWPOLLING_SINK_STATUS_RX_DATA 
UWPOLLING_SINK_STATUS_TX_ACK 

◆ UWPOLLING_TIMER_STATUS

Enumerator
UWPOLLING_IDLE 
UWPOLLING_RUNNING 
UWPOLLING_FROZEN 
UWPOLLING_EXPIRED 

Constructor & Destructor Documentation

◆ Uwpolling_SINK()

Uwpolling_SINK::Uwpolling_SINK ( )

◆ ~Uwpolling_SINK()

Uwpolling_SINK::~Uwpolling_SINK ( )
virtual

Destructor of the Uwpolling_SINK class

Member Function Documentation

◆ addMissPkt2List()

void Uwpolling_SINK::addMissPkt2List ( uint16_t  n_pkts)
protectedvirtual

Add packet uids in the missing packet list

Parameters
numberof missing packets to insert inthe list

References last_rx, and missing_id_list.

Referenced by RxDataTimerExpired(), and stateRxData().

◆ BackOffTimerExpired()

void Uwpolling_SINK::BackOffTimerExpired ( )
protectedvirtual

Method called by the Expire event of the timer. Here we call the stateTxProbe method

References refreshReason(), stateTxProbe(), Triggered, and UWPOLLING_SINK_REASON_BACKOFF_TIMER_EXPIRED.

Here is the call graph for this function:

◆ command()

int Uwpolling_SINK::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.

References getAckSent(), getDuplicatedPkt(), getProbeSent(), getTriggerDropped(), getTriggerReceived(), initialized, and initInfo().

Here is the call graph for this function:

◆ crLayCommand()

int Uwpolling_SINK::crLayCommand ( ClMessage *  m)
virtual

Cross-Layer messages interpreter

Parameters
ClMessage*an instance of ClMessage that represent the message received
Returns
0 if successful.

◆ getAckSent()

int Uwpolling_SINK::getAckSent ( )
inlineprotected

Returns the number of ACK packets sent during the simulation

Returns
int n_ack_sent the number of ACK packets sent

References n_ack_sent.

Referenced by command().

◆ getBackOffTime()

double Uwpolling_SINK::getBackOffTime ( )
protectedvirtual

The backoff timer is calculated choosing randomly using a Uniform random variable and multiplying it by a backoff_tuner chosen by the user via tcl

References backoff_tuner, T_fin, and T_in.

Referenced by stateRxTrigger().

◆ getDuplicatedPkt()

uint Uwpolling_SINK::getDuplicatedPkt ( )
inlineprotected

References duplicate_pkts.

Referenced by command().

◆ getEpoch()

unsigned long int Uwpolling_SINK::getEpoch ( )
inlineprotected

Calculate the epoch of the event. Used in sea-trial mode

Returns
the epoch of the system

Referenced by initInfo(), Phy2MacEndRx(), stateRxData(), and stateTxProbe().

◆ getProbeSent()

int Uwpolling_SINK::getProbeSent ( )
inlineprotected

Returns the number of PROBE packets sent during the simulation

Returns
int n_probe_sent the number of PROBE packets sent

References n_probe_sent.

Referenced by command().

◆ getTriggerDropped()

int Uwpolling_SINK::getTriggerDropped ( )
inlineprotected

Return the number of TRIGGER dropped by the node because of erroneous CRC

Returns
int n_trigger_dropped number of TRIGGER dropped by the AUV

References n_trigger_dropped.

Referenced by command().

◆ getTriggerReceived()

int Uwpolling_SINK::getTriggerReceived ( )
inlineprotected

Return the number of TRIGGER packets received by the NODE

Returns
int n_trigger_received number of TRIGGER packets received

References n_trigger_received.

Referenced by command().

◆ incrAckSent()

virtual void Uwpolling_SINK::incrAckSent ( )
inlineprotectedvirtual

Increment the number of sent PROBE packets

References n_ack_sent.

Referenced by txAck().

◆ incrDuplicatedPkt()

void Uwpolling_SINK::incrDuplicatedPkt ( )
inlineprotected

References duplicate_pkts.

Referenced by stateRxData().

◆ incrProbeSent()

virtual void Uwpolling_SINK::incrProbeSent ( )
inlineprotectedvirtual

Increment the number of sent PROBE packets

References n_probe_sent.

Referenced by TxProbe().

◆ incrTriggerDropped()

void Uwpolling_SINK::incrTriggerDropped ( )
inlineprotected

Increments the number of TRIGGER packets dropped because of erroneous CRC

References n_trigger_dropped.

Referenced by Phy2MacEndRx().

◆ incrTriggerReceived()

void Uwpolling_SINK::incrTriggerReceived ( )
inlineprotected

Increments the number of TRIGGER packets received

References n_trigger_received.

Referenced by stateRxTrigger().

◆ initInfo()

◆ initPkt()

void Uwpolling_SINK::initPkt ( UWPOLLING_PKT_TYPE  pkt_type)
protectedvirtual

Inits the packet with the MAC address of the receiver and the sender, the size of the packet and the type

Parameters
UWPOLLING_PKT_TYPEthe type of the packet

References AUV_mac_addr, curr_ack_pkt, curr_probe_pkt, hdr_PROBE_SINK::id_ack(), hdr_ACK_SINK::id_ack(), hdr_PROBE_SINK::id_sink(), last_rx, max_n_ack, missing_id_list, hdr_PROBE_SINK::PROBE_uid(), PROBE_uid, PT_ACK_SINK, PT_PROBE_SINK, sink_id, UWPOLLING_ACK_PKT, and UWPOLLING_PROBE_PKT.

Referenced by stateTxAck(), and stateTxProbe().

Here is the call graph for this function:

◆ Mac2PhyStartTx()

void Uwpolling_SINK::Mac2PhyStartTx ( Packet *  p)
protectedvirtual

Pass the packet to the PHY layer

Parameters
Packet*Pointer to an object of type Packet that rapresent the Packet to transmit

Referenced by txAck(), and TxProbe().

◆ Phy2MacEndRx()

void Uwpolling_SINK::Phy2MacEndRx ( Packet *  p)
protectedvirtual

Method called when the Phy Layer finish to receive a Packet

Parameters
constPacket* Pointer to an object of type Packet that rapresent the packet received

References curr_data_pkt, curr_trigger_pkt, getEpoch(), incrTriggerDropped(), out_file_stats, hdr_POLL::POLL_time(), print_stats, PT_ACK_SINK, PT_POLL, PT_PROBE, PT_TRIGGER, refreshReason(), rx_data_timer, RxDataEnabled, Uwpolling_SINK::Uwpolling_SINK_Timer::schedule(), sea_trial, stateRxData(), stateRxTrigger(), useAdaptiveTdata, UWPOLLING_SINK_REASON_PKT_ERROR, UWPOLLING_SINK_REASON_RX_DATA, and UWPOLLING_SINK_REASON_RX_TRIGGER.

Here is the call graph for this function:

◆ Phy2MacEndTx()

void Uwpolling_SINK::Phy2MacEndTx ( const Packet *  p)
protectedvirtual

Method called when the PHY layer finish to transmit the packet.

Parameters
Packet*Pointer to an object of type Packet that rapresent the Packet transmitted

References PT_ACK_SINK, PT_PROBE_SINK, refreshReason(), stateIdle(), stateWaitData(), UWPOLLING_SINK_REASON_TX_ACK, and UWPOLLING_SINK_REASON_TX_PROBE.

Here is the call graph for this function:

◆ Phy2MacStartRx()

virtual void Uwpolling_SINK::Phy2MacStartRx ( const Packet *  p)
inlineprotectedvirtual

Method called when the Phy Layer start to receive a Packet

Parameters
constPacket* Pointer to an object of type Packet that rapresent the Packet that is in reception

◆ refreshReason()

virtual void Uwpolling_SINK::refreshReason ( UWPOLLING_SINK_REASON  reason)
inlineprotectedvirtual

Refresh the reason for the changing of the state

Parameters
UWPOLLING_SINK_REASONThe reason of the change of the state

References last_reason.

Referenced by BackOffTimerExpired(), Phy2MacEndRx(), Phy2MacEndTx(), RxDataTimerExpired(), and stateRxData().

◆ refreshState()

virtual void Uwpolling_SINK::refreshState ( UWPOLLING_SINK_STATUS  state)
inlineprotectedvirtual

Refresh the state of the protocol

Parameters
UWPOLLING_AUV_STATUScurrent state of the protcol

References curr_state, and prev_state.

Referenced by stateIdle(), stateRxData(), stateRxTrigger(), stateTxAck(), stateTxProbe(), and stateWaitData().

◆ RxDataTimerExpired()

void Uwpolling_SINK::RxDataTimerExpired ( )
protectedvirtual

Methods called by the Expire event of the timer. Here we disable the possibility of the node to receive DATA packets.

References ack_enabled, addMissPkt2List(), expected_last_id, first_rx_pkt, last_rx, n_curr_rx_pkts, refreshReason(), RxDataEnabled, send_ACK, stateIdle(), stateTxAck(), and UWPOLLING_SINK_REASON_RX_DATA_TIMER_EXPIRED.

Here is the call graph for this function:

◆ stateIdle()

void Uwpolling_SINK::stateIdle ( )
protectedvirtual

IDLE state. Each variable is resetted

References backoff_timer, first_rx_pkt, n_curr_rx_pkts, refreshState(), rx_data_timer, RxDataEnabled, send_ACK, Triggered, triggerEnabled, and UWPOLLING_SINK_STATUS_IDLE.

Referenced by Phy2MacEndTx(), RxDataTimerExpired(), and stateRxData().

Here is the call graph for this function:

◆ stateRxData()

◆ stateRxTrigger()

void Uwpolling_SINK::stateRxTrigger ( )
protectedvirtual

State of the protocol in which a TRIGGER packet is received. Here we check the header of the TRIGGER and we store the information into it (i.e. the range of values into which choose randomly the backoff time

References AUV_mac_addr, backoff_timer, BOffTime, curr_trigger_pkt, getBackOffTime(), incrTriggerReceived(), refreshState(), rx_data_timer, RxDataEnabled, Uwpolling_SINK::Uwpolling_SINK_Timer::schedule(), send_ACK, T_data, T_data_gurad, hdr_TRIGGER::t_fin(), T_fin, hdr_TRIGGER::t_in(), T_in, Triggered, triggerEnabled, and UWPOLLING_SINK_STATUS_RX_TRIGGER.

Referenced by Phy2MacEndRx().

Here is the call graph for this function:

◆ stateTxAck()

void Uwpolling_SINK::stateTxAck ( )
protectedvirtual

State in which the ACK is sent

References initPkt(), refreshState(), send_ACK, txAck(), UWPOLLING_ACK_PKT, and UWPOLLING_SINK_STATUS_TX_ACK.

Referenced by RxDataTimerExpired(), and stateRxData().

Here is the call graph for this function:

◆ stateTxProbe()

void Uwpolling_SINK::stateTxProbe ( )
protectedvirtual

State of the protocol in which a PROBE packet is sent. Here we store into the PROBE header all the information needed, such as the timestamp of the most recent data packet, the number of the packets that the node wish to transmit

References curr_probe_pkt, getEpoch(), initPkt(), out_file_stats, print_stats, hdr_PROBE_SINK::PROBE_uid(), refreshState(), sea_trial, Triggered, TxProbe(), UWPOLLING_PROBE_PKT, and UWPOLLING_SINK_STATUS_TX_PROBE.

Referenced by BackOffTimerExpired().

Here is the call graph for this function:

◆ stateWaitData()

void Uwpolling_SINK::stateWaitData ( )
protectedvirtual

State in which the protocol set up the timer to wait the reception of the DATA packet

References n_curr_rx_pkts, refreshState(), rx_data_timer, RxDataEnabled, Uwpolling_SINK::Uwpolling_SINK_Timer::schedule(), T_data, and UWPOLLING_SINK_STATUS_WAIT_DATA.

Referenced by Phy2MacEndTx().

Here is the call graph for this function:

◆ txAck()

void Uwpolling_SINK::txAck ( )
protectedvirtual

The ACK Packet is sent down to the PHY layer

References curr_ack_pkt, incrAckSent(), Mac2PhyStartTx(), and send_ACK.

Referenced by stateTxAck().

Here is the call graph for this function:

◆ TxProbe()

void Uwpolling_SINK::TxProbe ( )
protectedvirtual

The PROBE Packet is sended down to the PHY layer

References curr_probe_pkt, incrProbeSent(), and Mac2PhyStartTx().

Referenced by stateTxProbe().

Here is the call graph for this function:

◆ waitForUser()

void Uwpolling_SINK::waitForUser ( )
protectedvirtual

Used for debug purposes. (Permit to have a "step by step" behaviour of the protocol)

Member Data Documentation

◆ ack_enabled

int Uwpolling_SINK::ack_enabled
protected

True if ack is enabled, false if disabled, default true

Referenced by RxDataTimerExpired(), stateRxData(), and Uwpolling_SINK().

◆ AUV_mac_addr

int Uwpolling_SINK::AUV_mac_addr
protected

MAC address of the AUV from which it receives data

Referenced by initPkt(), and stateRxTrigger().

◆ backoff_timer

BackOffTimer Uwpolling_SINK::backoff_timer
protected

Backoff timer

Referenced by stateIdle(), and stateRxTrigger().

◆ backoff_tuner

double Uwpolling_SINK::backoff_tuner
protected

Multiplying value to the backoff value

Referenced by getBackOffTime(), and Uwpolling_SINK().

◆ BOffTime

double Uwpolling_SINK::BOffTime
protected

Backoff time chosen

Referenced by stateRxTrigger().

◆ curr_ack_pkt

Packet* Uwpolling_SINK::curr_ack_pkt
protected

Pointer to the current ACK packet

Referenced by initPkt(), and txAck().

◆ curr_data_pkt

Packet* Uwpolling_SINK::curr_data_pkt
protected

Pointer to the current DATA packet

Referenced by Phy2MacEndRx(), and stateRxData().

◆ curr_probe_pkt

Packet* Uwpolling_SINK::curr_probe_pkt
protected

Pointer to the current PROBE packet

Referenced by initPkt(), stateTxProbe(), and TxProbe().

◆ curr_state

UWPOLLING_SINK_STATUS Uwpolling_SINK::curr_state
protected

Current state of the protocol

Referenced by refreshState().

◆ curr_trigger_pkt

Packet* Uwpolling_SINK::curr_trigger_pkt
protected

Pointer to the current TRIGGER packet

Referenced by Phy2MacEndRx(), and stateRxTrigger().

◆ duplicate_pkts

uint Uwpolling_SINK::duplicate_pkts
protected

◆ expected_id

uint16_t Uwpolling_SINK::expected_id
protected

Expected ID of the next data packet received

◆ expected_last_id

uint16_t Uwpolling_SINK::expected_last_id
protected

Referenced by RxDataTimerExpired(), and stateRxData().

◆ first_rx_pkt

bool Uwpolling_SINK::first_rx_pkt
protected

Number ot duplicated packets received.

Referenced by RxDataTimerExpired(), stateIdle(), and stateRxData().

◆ fout

std::ofstream Uwpolling_SINK::fout
protected

Output stream for the textual file of debug

◆ initialized

bool Uwpolling_SINK::initialized = false
staticprotected

true if the protocol is initialized, false otherwise

Referenced by command(), and initInfo().

◆ last_reason

UWPOLLING_SINK_REASON Uwpolling_SINK::last_reason
protected

Last reason to the change of state

Referenced by refreshReason().

◆ last_rx

uint16_t Uwpolling_SINK::last_rx
protected

ID of the last received packet

Referenced by addMissPkt2List(), initPkt(), RxDataTimerExpired(), and stateRxData().

◆ max_n_ack

uint Uwpolling_SINK::max_n_ack
protected

Max number of ACK that can be sent in a single round. The same value has to be used in packer, if needed.

Referenced by initPkt(), and Uwpolling_SINK().

◆ max_payload

int Uwpolling_SINK::max_payload
protected

Dimension of the DATA payload

Referenced by stateRxData(), and Uwpolling_SINK().

◆ missing_id_list

std::list<uint16_t> Uwpolling_SINK::missing_id_list
protected

List with missing packet ID

Referenced by addMissPkt2List(), initPkt(), and stateRxData().

◆ modem_data_bit_rate

int Uwpolling_SINK::modem_data_bit_rate
protected

Bit rate of the modem used

Referenced by stateRxData(), and Uwpolling_SINK().

◆ n_ack_sent

int Uwpolling_SINK::n_ack_sent
protected

Referenced by getAckSent(), and incrAckSent().

◆ n_curr_rx_pkts

uint Uwpolling_SINK::n_curr_rx_pkts
protected

Number of current received packets after the probe transmission.

Referenced by RxDataTimerExpired(), stateIdle(), stateRxData(), and stateWaitData().

◆ n_probe_sent

int Uwpolling_SINK::n_probe_sent
protected

Number of PROBE packets sent to the AUV

Referenced by getProbeSent(), and incrProbeSent().

◆ n_run

int Uwpolling_SINK::n_run
protected

Referenced by initInfo(), and Uwpolling_SINK().

◆ n_trigger_dropped

int Uwpolling_SINK::n_trigger_dropped
protected

Number of TRIGGER packet dropped

Referenced by getTriggerDropped(), and incrTriggerDropped().

◆ n_trigger_received

int Uwpolling_SINK::n_trigger_received
protected

Number of TRIGGER packets received

Referenced by getTriggerReceived(), and incrTriggerReceived().

◆ out_file_stats

std::ofstream Uwpolling_SINK::out_file_stats
protected

◆ pkt_type_info

map< Uwpolling_SINK::UWPOLLING_PKT_TYPE, string > Uwpolling_SINK::pkt_type_info
staticprotected

Textual info of the type of the packet

Referenced by initInfo().

◆ prev_expect_last_id

uint16_t Uwpolling_SINK::prev_expect_last_id
protected

Expected Unique ID of the last packet in the round

Referenced by stateRxData().

◆ prev_state

UWPOLLING_SINK_STATUS Uwpolling_SINK::prev_state
protected

Previous state of the protocol

Referenced by refreshState().

◆ print_stats

int Uwpolling_SINK::print_stats
protected

Print protocol's statistics of the protocol

Referenced by initInfo(), Phy2MacEndRx(), stateRxData(), stateTxProbe(), and Uwpolling_SINK().

◆ PROBE_uid

uint Uwpolling_SINK::PROBE_uid
protected

True if the packet received is the first packet in the round PROBE Unique ID

Referenced by initPkt().

◆ reason_info

map< Uwpolling_SINK::UWPOLLING_SINK_REASON, string > Uwpolling_SINK::reason_info
staticprotected

Textual info of the reason

Referenced by initInfo().

◆ rx_data_timer

Rx_Data_Timer Uwpolling_SINK::rx_data_timer
protected

◆ RxDataEnabled

bool Uwpolling_SINK::RxDataEnabled
protected

true if the node is enabled to receive the DATA, false otherwise

Referenced by Phy2MacEndRx(), RxDataTimerExpired(), stateIdle(), stateRxData(), stateRxTrigger(), and stateWaitData().

◆ sea_trial

int Uwpolling_SINK::sea_trial
protected

Sea Trial flag: To activate if the protocol is going to be tested at the sea

Referenced by initInfo(), Phy2MacEndRx(), stateRxData(), stateTxProbe(), and Uwpolling_SINK().

◆ send_ACK

bool Uwpolling_SINK::send_ACK
protected

True if an ACK has to be sent, false otherwise

Referenced by RxDataTimerExpired(), stateIdle(), stateRxData(), stateRxTrigger(), stateTxAck(), and txAck().

◆ sink_id

uint Uwpolling_SINK::sink_id
protected

Unique Node ID

Referenced by initPkt(), and Uwpolling_SINK().

◆ status_info

map< Uwpolling_SINK::UWPOLLING_SINK_STATUS, string > Uwpolling_SINK::status_info
staticprotected

Textual info of the state

Referenced by initInfo().

◆ T_data

double Uwpolling_SINK::T_data
protected

Duration of RxDataTimer

Referenced by stateRxTrigger(), and stateWaitData().

◆ T_data_gurad

double Uwpolling_SINK::T_data_gurad
protected

Guard time for RxDataTimer

Referenced by stateRxTrigger(), and Uwpolling_SINK().

◆ T_fin

double Uwpolling_SINK::T_fin
protected

Upper bound of the range in which choose randomly the backoff time (sent by the AUV in the TRIGGER message)

Referenced by getBackOffTime(), and stateRxTrigger().

◆ T_guard

double Uwpolling_SINK::T_guard
protected

Guard time added to the calculation of the data TO

Referenced by stateRxData(), and Uwpolling_SINK().

◆ T_in

double Uwpolling_SINK::T_in
protected

True if rx trigger is enabled. Lower bound of the range in which choose randomly the backoff time (sent by the AUV in the TRIGGER message)

Referenced by getBackOffTime(), and stateRxTrigger().

◆ Triggered

bool Uwpolling_SINK::Triggered
protected

true if the node has correctly received a TRIGGER, false otherwise

Referenced by BackOffTimerExpired(), stateIdle(), stateRxTrigger(), and stateTxProbe().

◆ triggerEnabled

bool Uwpolling_SINK::triggerEnabled
protected

◆ useAdaptiveTdata

int Uwpolling_SINK::useAdaptiveTdata
protected

True if an adaptive T_poll is used

Referenced by Phy2MacEndRx(), and Uwpolling_SINK().


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