DESERT 4.0.0
Uwpolling_NODE Class Reference

#include <uwpolling_NODE.h>

Inheritance diagram for Uwpolling_NODE:
Inheritance graph
Collaboration diagram for Uwpolling_NODE:
Collaboration graph

Classes

class  BackOffTimer
 
class  Rx_Poll_Timer
 
class  Tx_Data_Timer
 
class  Uwpolling_NODE_Timer
 

Public Member Functions

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

Protected Types

enum  UWPOLLING_NODE_STATUS {
  UWPOLLING_NODE_STATUS_IDLE = 1 , UWPOLLING_NODE_STATUS_RX_TRIGGER , UWPOLLING_NODE_STATUS_TX_PROBE , UWPOLLING_NODE_STATUS_RX_POLL ,
  UWPOLLING_NODE_STATUS_TX_DATA , UWPOLLING_NODE_STATUS_WAIT_POLL
}
 
enum  UWPOLLING_PKT_TYPE { UWPOLLING_DATA_PKT = 1 , UWPOLLING_POLL_PKT , UWPOLLING_TRIGGER_PKT , UWPOLLING_PROBE_PKT }
 
enum  UWPOLLING_NODE_REASON {
  UWPOLLING_NODE_REASON_TX_DATA , UWPOLLING_NODE_REASON_RX_TRIGGER , UWPOLLING_NODE_REASON_PKT_ERROR , UWPOLLING_NODE_REASON_TX_PROBE ,
  UWPOLLING_NODE_REASON_RX_POLL , UWPOLLING_NODE_REASON_BACKOFF_TIMER_EXPIRED , UWPOLLING_NODE_REASON_RX_POLL_TIMER_EXPIRED , UWPOLLING_NODE_REASON_NOT_SET ,
  UWPOLLING_NODE_REASON_EMPTY_DATA_QUEUE , UWPOLLING_NODE_REASON_WRONG_TYPE , UWPOLLING_NODE_REASON_WRONG_RECEIVER , UWPOLLING_NODE_REASON_WRONG_STATE ,
  UWPOLLING_NODE_REASON_NOT_IN_LIST , UWPOLLING_NODE_REASON_LIST_NOT_POLLED
}
 
enum  UWPOLLING_TIMER_STATUS { UWPOLLING_IDLE = 1 , UWPOLLING_RUNNING , UWPOLLING_FROZEN , UWPOLLING_EXPIRED }
 

Protected Member Functions

virtual void recvFromUpperLayers (Packet *p)
 
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_NODE_REASON reason)
 
virtual void refreshState (UWPOLLING_NODE_STATUS state)
 
virtual void incrProbeSent ()
 
virtual void incrTimesPolled ()
 
void incrTriggerReceived ()
 
void incrTriggerDropped ()
 
void incrPollDropped ()
 
void getDataQueueLog ()
 
int getProbeSent ()
 
int getTimesPolled ()
 
int getTriggerReceived ()
 
int getTriggerDropped ()
 
int getPollDropped ()
 
virtual void waitForUser ()
 
virtual void stateIdle ()
 
virtual void stateTxData ()
 
virtual void stateRxTrigger ()
 
virtual void stateTxProbe ()
 
virtual void stateRxPoll ()
 
virtual void BackOffTimerExpired ()
 
virtual void RxPollTimerExpired ()
 
virtual double getBackOffTime ()
 
virtual void TxData ()
 
virtual void TxPRobe ()
 
virtual void stateWaitPoll ()
 
unsigned long int getEpoch ()
 

Protected Attributes

double T_poll
 
double T_poll_guard
 
double backoff_tuner
 
int max_payload
 
int buffer_data_pkts
 
int max_data_pkt_tx
 
uint node_id
 
int sea_trial
 
int print_stats
 
int n_run
 
double Intra_data_Guard_Time
 
std::queue< Packet * > Q_data
 
bool polled
 
bool RxPollEnabled
 
bool Triggered
 
bool LastPacket
 
double MaxTimeStamp
 
double T_in
 
double T_fin
 
double BOffTime
 
int AUV_mac_addr
 
int N_data_pkt_2_TX
 
int packet_index
 
uint n_probe_sent
 
int n_times_polled
 
int n_trigger_received
 
uint N_polled_node
 
uint PROBE_uid
 
Packet * curr_data_pkt
 
Packet * curr_probe_pkt
 
Packet * curr_poll_pkt
 
Packet * curr_trigger_pkt
 
UWPOLLING_NODE_REASON last_reason
 
UWPOLLING_NODE_STATUS curr_state
 
UWPOLLING_NODE_STATUS prev_state
 
BackOffTimer backoff_timer
 
Rx_Poll_Timer rx_poll_timer
 
Tx_Data_Timer tx_data_timer
 
std::ofstream fout
 
std::ofstream out_file_stats
 
int n_trigger_dropped
 
int n_poll_dropped
 
int useAdaptiveTpoll
 

Static Protected Attributes

static bool initialized = false
 
static map< Uwpolling_NODE::UWPOLLING_NODE_STATUS, string > status_info
 
static map< Uwpolling_NODE::UWPOLLING_NODE_REASON, string > reason_info
 
static map< Uwpolling_NODE::UWPOLLING_PKT_TYPE, string > pkt_type_info
 

Detailed Description

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

Member Enumeration Documentation

◆ UWPOLLING_NODE_REASON

Enumerator
UWPOLLING_NODE_REASON_TX_DATA 
UWPOLLING_NODE_REASON_RX_TRIGGER 
UWPOLLING_NODE_REASON_PKT_ERROR 
UWPOLLING_NODE_REASON_TX_PROBE 
UWPOLLING_NODE_REASON_RX_POLL 
UWPOLLING_NODE_REASON_BACKOFF_TIMER_EXPIRED 
UWPOLLING_NODE_REASON_RX_POLL_TIMER_EXPIRED 
UWPOLLING_NODE_REASON_NOT_SET 
UWPOLLING_NODE_REASON_EMPTY_DATA_QUEUE 
UWPOLLING_NODE_REASON_WRONG_TYPE 
UWPOLLING_NODE_REASON_WRONG_RECEIVER 
UWPOLLING_NODE_REASON_WRONG_STATE 
UWPOLLING_NODE_REASON_NOT_IN_LIST 
UWPOLLING_NODE_REASON_LIST_NOT_POLLED 

◆ UWPOLLING_NODE_STATUS

< Variable that rapresents the status of the protocol machine state

Enumerator
UWPOLLING_NODE_STATUS_IDLE 
UWPOLLING_NODE_STATUS_RX_TRIGGER 
UWPOLLING_NODE_STATUS_TX_PROBE 
UWPOLLING_NODE_STATUS_RX_POLL 
UWPOLLING_NODE_STATUS_TX_DATA 
UWPOLLING_NODE_STATUS_WAIT_POLL 

◆ UWPOLLING_PKT_TYPE

Enumerator
UWPOLLING_DATA_PKT 
UWPOLLING_POLL_PKT 
UWPOLLING_TRIGGER_PKT 
UWPOLLING_PROBE_PKT 

◆ UWPOLLING_TIMER_STATUS

Enumerator
UWPOLLING_IDLE 
UWPOLLING_RUNNING 
UWPOLLING_FROZEN 
UWPOLLING_EXPIRED 

Constructor & Destructor Documentation

◆ Uwpolling_NODE()

◆ ~Uwpolling_NODE()

Uwpolling_NODE::~Uwpolling_NODE ( )
virtual

Destructor of the Uwpolling_NODE class

Member Function Documentation

◆ BackOffTimerExpired()

void Uwpolling_NODE::BackOffTimerExpired ( )
protectedvirtual

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

References refreshReason(), stateTxProbe(), and UWPOLLING_NODE_REASON_BACKOFF_TIMER_EXPIRED.

Here is the call graph for this function:

◆ command()

int Uwpolling_NODE::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 getDataQueueLog(), getPollDropped(), getProbeSent(), getTimesPolled(), getTriggerDropped(), getTriggerReceived(), initialized, initInfo(), and Q_data.

Here is the call graph for this function:

◆ crLayCommand()

int Uwpolling_NODE::crLayCommand ( ClMessage *  m)
virtual

Cross-Layer messages interpreter

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

◆ getBackOffTime()

double Uwpolling_NODE::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, getEpoch(), T_fin, and T_in.

Referenced by stateRxTrigger().

Here is the call graph for this function:

◆ getDataQueueLog()

void Uwpolling_NODE::getDataQueueLog ( )
inlineprotected

References getEpoch(), and Q_data.

Referenced by command().

Here is the call graph for this function:

◆ getEpoch()

unsigned long int Uwpolling_NODE::getEpoch ( )
inlineprotected

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

Returns
the epoch of the system

Referenced by getBackOffTime(), getDataQueueLog(), initInfo(), initPkt(), Phy2MacEndRx(), Phy2MacEndTx(), recvFromUpperLayers(), stateIdle(), stateRxPoll(), stateRxTrigger(), stateTxData(), stateTxProbe(), and stateWaitPoll().

◆ getPollDropped()

int Uwpolling_NODE::getPollDropped ( )
inlineprotected

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

Returns
itn n_poll_dropped number of POLL dropped

References n_poll_dropped.

Referenced by command().

◆ getProbeSent()

int Uwpolling_NODE::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().

◆ getTimesPolled()

int Uwpolling_NODE::getTimesPolled ( )
inlineprotected

Return the number of times the node are polled by the AUV

Returns
int n_times_polled number of times polled

References n_times_polled.

Referenced by command().

◆ getTriggerDropped()

int Uwpolling_NODE::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_NODE::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().

◆ incrPollDropped()

void Uwpolling_NODE::incrPollDropped ( )
inlineprotected

Increments the number of POLL packets dropped because of erroneous CRC

References n_poll_dropped.

Referenced by Phy2MacEndRx().

◆ incrProbeSent()

virtual void Uwpolling_NODE::incrProbeSent ( )
inlineprotectedvirtual

Increment the number of sent PROBE packets

References n_probe_sent.

Referenced by TxPRobe().

◆ incrTimesPolled()

virtual void Uwpolling_NODE::incrTimesPolled ( )
inlineprotectedvirtual

Increments the number of times that the node has been polled by the AUV

References n_times_polled.

Referenced by stateRxPoll().

◆ incrTriggerDropped()

void Uwpolling_NODE::incrTriggerDropped ( )
inlineprotected

Increments the number of TRIGGER packets dropped because of erroneous CRC

References n_trigger_dropped.

Referenced by Phy2MacEndRx().

◆ incrTriggerReceived()

void Uwpolling_NODE::incrTriggerReceived ( )
inlineprotected

Increments the number of TRIGGER packets received

References n_trigger_received.

Referenced by stateRxTrigger().

◆ initInfo()

◆ initPkt()

void Uwpolling_NODE::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, BOffTime, curr_probe_pkt, getEpoch(), hdr_PROBE::id_node(), max_data_pkt_tx, MaxTimeStamp, N_data_pkt_2_TX, hdr_PROBE::n_pkts(), node_id, PT_PROBE, Q_data, hdr_PROBE::ts(), and UWPOLLING_PROBE_PKT.

Referenced by stateTxProbe().

Here is the call graph for this function:

◆ Mac2PhyStartTx()

void Uwpolling_NODE::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 TxData(), and TxPRobe().

◆ Phy2MacEndRx()

void Uwpolling_NODE::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_poll_pkt, curr_trigger_pkt, getEpoch(), hdr_POLL::id_, incrPollDropped(), incrTriggerDropped(), out_file_stats, print_stats, PT_POLL, PT_TRIGGER, refreshReason(), rx_poll_timer, sea_trial, stateRxPoll(), stateRxTrigger(), UWPOLLING_NODE_REASON_PKT_ERROR, UWPOLLING_NODE_REASON_RX_POLL, and UWPOLLING_NODE_REASON_RX_TRIGGER.

Here is the call graph for this function:

◆ Phy2MacEndTx()

void Uwpolling_NODE::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 AUV_mac_addr, curr_state, getEpoch(), Intra_data_Guard_Time, LastPacket, max_payload, prev_state, refreshReason(), Uwpolling_NODE::Uwpolling_NODE_Timer::schedule(), stateIdle(), stateWaitPoll(), status_info, tx_data_timer, UWPOLLING_NODE_REASON_TX_DATA, UWPOLLING_NODE_REASON_TX_PROBE, UWPOLLING_NODE_STATUS_TX_DATA, and UWPOLLING_NODE_STATUS_TX_PROBE.

Here is the call graph for this function:

◆ Phy2MacStartRx()

virtual void Uwpolling_NODE::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

◆ recvFromUpperLayers()

void Uwpolling_NODE::recvFromUpperLayers ( Packet *  p)
protectedvirtual

Receives the packet from the upper layer (e.g. IP)

Parameters
Packet*pointer to the packet received

References buffer_data_pkts, getEpoch(), out_file_stats, print_stats, Q_data, sea_trial, and hdr_uwcbr::sn_.

Here is the call graph for this function:

◆ refreshReason()

virtual void Uwpolling_NODE::refreshReason ( UWPOLLING_NODE_REASON  reason)
inlineprotectedvirtual

Refresh the reason for the changing of the state

Parameters
UWPOLLING_NODE_REASONThe reason of the change of the state

References last_reason.

Referenced by BackOffTimerExpired(), Phy2MacEndRx(), Phy2MacEndTx(), RxPollTimerExpired(), stateRxPoll(), and stateTxProbe().

◆ refreshState()

virtual void Uwpolling_NODE::refreshState ( UWPOLLING_NODE_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(), stateRxPoll(), stateRxTrigger(), stateTxData(), stateTxProbe(), and stateWaitPoll().

◆ RxPollTimerExpired()

void Uwpolling_NODE::RxPollTimerExpired ( )
protectedvirtual

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

References refreshReason(), RxPollEnabled, stateIdle(), and UWPOLLING_NODE_REASON_RX_POLL_TIMER_EXPIRED.

Here is the call graph for this function:

◆ stateIdle()

void Uwpolling_NODE::stateIdle ( )
protectedvirtual

IDLE state. Each variable is resetted

References backoff_timer, getEpoch(), polled, refreshState(), rx_poll_timer, RxPollEnabled, Triggered, and UWPOLLING_NODE_STATUS_IDLE.

Referenced by Phy2MacEndTx(), RxPollTimerExpired(), and stateTxProbe().

Here is the call graph for this function:

◆ stateRxPoll()

void Uwpolling_NODE::stateRxPoll ( )
protectedvirtual

State of the protocol in which a POLL packet is received. Here the node check if he's polled or, at least, he is in the list of polled node. If he's the polled node, he goes into the stateTxData state. Otherwise he drops the packet

References curr_poll_pkt, getEpoch(), hdr_POLL::id_, incrTimesPolled(), node_id, out_file_stats, hdr_POLL::POLL_time(), hdr_POLL::POLL_uid_, polled, print_stats, refreshReason(), refreshState(), rx_poll_timer, RxPollEnabled, Uwpolling_NODE::Uwpolling_NODE_Timer::schedule(), sea_trial, stateTxData(), useAdaptiveTpoll, UWPOLLING_NODE_REASON_NOT_IN_LIST, UWPOLLING_NODE_REASON_RX_POLL, UWPOLLING_NODE_REASON_WRONG_STATE, and UWPOLLING_NODE_STATUS_RX_POLL.

Referenced by Phy2MacEndRx().

Here is the call graph for this function:

◆ stateRxTrigger()

void Uwpolling_NODE::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(), getEpoch(), incrTriggerReceived(), out_file_stats, print_stats, refreshState(), rx_poll_timer, RxPollEnabled, Uwpolling_NODE::Uwpolling_NODE_Timer::schedule(), sea_trial, hdr_TRIGGER::t_fin(), T_fin, hdr_TRIGGER::t_in(), T_in, T_poll, T_poll_guard, hdr_TRIGGER::TRIGGER_uid_, Triggered, and UWPOLLING_NODE_STATUS_RX_TRIGGER.

Referenced by Phy2MacEndRx().

Here is the call graph for this function:

◆ stateTxData()

void Uwpolling_NODE::stateTxData ( )
protectedvirtual

State of the protocol in which a DATA packet is sent. Here we compute some statistics related to the transmission of the packet (i.e. the number of data packets transmitted is incremented and we check the number of data packet to transmit

References AUV_mac_addr, curr_data_pkt, curr_state, getEpoch(), LastPacket, N_data_pkt_2_TX, out_file_stats, packet_index, polled, print_stats, Q_data, refreshState(), sea_trial, hdr_uwcbr::sn_, TxData(), UWPOLLING_NODE_STATUS_RX_POLL, and UWPOLLING_NODE_STATUS_TX_DATA.

Referenced by stateRxPoll().

Here is the call graph for this function:

◆ stateTxProbe()

void Uwpolling_NODE::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(), hdr_PROBE::n_pkts(), hdr_PROBE::n_pkts_, out_file_stats, print_stats, PROBE_uid, hdr_PROBE::PROBE_uid_, refreshReason(), refreshState(), sea_trial, stateIdle(), Triggered, TxPRobe(), UWPOLLING_NODE_REASON_EMPTY_DATA_QUEUE, UWPOLLING_NODE_STATUS_TX_PROBE, and UWPOLLING_PROBE_PKT.

Referenced by BackOffTimerExpired().

Here is the call graph for this function:

◆ stateWaitPoll()

void Uwpolling_NODE::stateWaitPoll ( )
protectedvirtual

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

References Uwpolling_NODE::Uwpolling_NODE_Timer::getDuration(), getEpoch(), refreshState(), rx_poll_timer, RxPollEnabled, Uwpolling_NODE::Uwpolling_NODE_Timer::schedule(), T_poll, and UWPOLLING_NODE_STATUS_WAIT_POLL.

Referenced by Phy2MacEndTx().

Here is the call graph for this function:

◆ TxData()

void Uwpolling_NODE::TxData ( )
protectedvirtual

The DATA Packet is sended down to the PHY layer

References curr_data_pkt, and Mac2PhyStartTx().

Referenced by stateTxData().

Here is the call graph for this function:

◆ TxPRobe()

void Uwpolling_NODE::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_NODE::waitForUser ( )
protectedvirtual

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

Member Data Documentation

◆ AUV_mac_addr

int Uwpolling_NODE::AUV_mac_addr
protected

MAC address of the AUV

Referenced by initPkt(), Phy2MacEndTx(), stateRxTrigger(), and stateTxData().

◆ backoff_timer

BackOffTimer Uwpolling_NODE::backoff_timer
protected

Backoff timer

Referenced by stateIdle(), and stateRxTrigger().

◆ backoff_tuner

double Uwpolling_NODE::backoff_tuner
protected

Multiplying value to the backoff value

Referenced by getBackOffTime(), and Uwpolling_NODE().

◆ BOffTime

double Uwpolling_NODE::BOffTime
protected

Backoff time chosen

Referenced by initPkt(), and stateRxTrigger().

◆ buffer_data_pkts

int Uwpolling_NODE::buffer_data_pkts
protected

Length of buffer of DATA pkts in number of pkts

Referenced by recvFromUpperLayers(), and Uwpolling_NODE().

◆ curr_data_pkt

Packet* Uwpolling_NODE::curr_data_pkt
protected

Pointer to the current DATA packet

Referenced by stateTxData(), and TxData().

◆ curr_poll_pkt

Packet* Uwpolling_NODE::curr_poll_pkt
protected

Pointer ot the current POLL packet

Referenced by Phy2MacEndRx(), and stateRxPoll().

◆ curr_probe_pkt

Packet* Uwpolling_NODE::curr_probe_pkt
protected

Pointer to the current PROBE packet

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

◆ curr_state

UWPOLLING_NODE_STATUS Uwpolling_NODE::curr_state
protected

Current state of the protocol

Referenced by Phy2MacEndTx(), refreshState(), and stateTxData().

◆ curr_trigger_pkt

Packet* Uwpolling_NODE::curr_trigger_pkt
protected

Pointer to the current TRIGGER packet

Referenced by Phy2MacEndRx(), and stateRxTrigger().

◆ fout

std::ofstream Uwpolling_NODE::fout
protected

Output stream for the textual file of debug

◆ initialized

bool Uwpolling_NODE::initialized = false
staticprotected

true if the protocol is initialized, false otherwise

Referenced by command(), and initInfo().

◆ Intra_data_Guard_Time

double Uwpolling_NODE::Intra_data_Guard_Time
protected

Guard Time between one data packet and the following

Referenced by Phy2MacEndTx(), and Uwpolling_NODE().

◆ last_reason

UWPOLLING_NODE_REASON Uwpolling_NODE::last_reason
protected

Last reason to the change of state

Referenced by refreshReason().

◆ LastPacket

bool Uwpolling_NODE::LastPacket
protected

true if the node has just sent the last packet of the queue and has to exit from the TxData state, false otherwise

Referenced by Phy2MacEndTx(), and stateTxData().

◆ max_data_pkt_tx

int Uwpolling_NODE::max_data_pkt_tx
protected

Max number of DATA packets to transmit each cycle

Referenced by initPkt(), and Uwpolling_NODE().

◆ max_payload

int Uwpolling_NODE::max_payload
protected

Payload of Application Layer in bytes

Referenced by Phy2MacEndTx(), and Uwpolling_NODE().

◆ MaxTimeStamp

double Uwpolling_NODE::MaxTimeStamp
protected

Timestamp of the most recent data packet generated

Referenced by initPkt().

◆ N_data_pkt_2_TX

int Uwpolling_NODE::N_data_pkt_2_TX
protected

Number of DATA packets to transmit to the AUV

Referenced by initPkt(), and stateTxData().

◆ n_poll_dropped

int Uwpolling_NODE::n_poll_dropped
protected

Number of POLL packet dropped

Referenced by getPollDropped(), and incrPollDropped().

◆ N_polled_node

uint Uwpolling_NODE::N_polled_node
protected

Number of node polled in this POLL message

◆ n_probe_sent

uint Uwpolling_NODE::n_probe_sent
protected

Number of PROBE packets sent to the AUV

Referenced by getProbeSent(), and incrProbeSent().

◆ n_run

int Uwpolling_NODE::n_run
protected

Referenced by initInfo(), and Uwpolling_NODE().

◆ n_times_polled

int Uwpolling_NODE::n_times_polled
protected

Number of times that the node has been polled by the AUV

Referenced by getTimesPolled(), and incrTimesPolled().

◆ n_trigger_dropped

int Uwpolling_NODE::n_trigger_dropped
protected

Number of TRIGGER packet dropped

Referenced by getTriggerDropped(), and incrTriggerDropped().

◆ n_trigger_received

int Uwpolling_NODE::n_trigger_received
protected

Number of TRIGGER packets received

Referenced by getTriggerReceived(), and incrTriggerReceived().

◆ node_id

uint Uwpolling_NODE::node_id
protected

Unique Node ID

Referenced by initPkt(), stateRxPoll(), and Uwpolling_NODE().

◆ out_file_stats

std::ofstream Uwpolling_NODE::out_file_stats
protected

◆ packet_index

int Uwpolling_NODE::packet_index
protected

Index of the packet just sent to the AUV

Referenced by stateTxData().

◆ pkt_type_info

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

Textual info of the type of the packet

Referenced by initInfo().

◆ polled

bool Uwpolling_NODE::polled
protected

true if the node is polled, false otherwise

Referenced by stateIdle(), stateRxPoll(), and stateTxData().

◆ prev_state

UWPOLLING_NODE_STATUS Uwpolling_NODE::prev_state
protected

Previous state of the protocol

Referenced by Phy2MacEndTx(), and refreshState().

◆ print_stats

int Uwpolling_NODE::print_stats
protected

Print protocol's statistics of the protocol

Referenced by initInfo(), Phy2MacEndRx(), recvFromUpperLayers(), stateRxPoll(), stateRxTrigger(), stateTxData(), stateTxProbe(), and Uwpolling_NODE().

◆ PROBE_uid

uint Uwpolling_NODE::PROBE_uid
protected

PROBE Unique ID

Referenced by stateTxProbe().

◆ Q_data

std::queue<Packet *> Uwpolling_NODE::Q_data
protected

Queue of DATA in number of packets

Referenced by command(), getDataQueueLog(), initPkt(), recvFromUpperLayers(), and stateTxData().

◆ reason_info

map< Uwpolling_NODE::UWPOLLING_NODE_REASON, string > Uwpolling_NODE::reason_info
staticprotected

Textual info of the reason

Referenced by initInfo().

◆ rx_poll_timer

Rx_Poll_Timer Uwpolling_NODE::rx_poll_timer
protected

◆ RxPollEnabled

bool Uwpolling_NODE::RxPollEnabled
protected

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

Referenced by RxPollTimerExpired(), stateIdle(), stateRxPoll(), stateRxTrigger(), and stateWaitPoll().

◆ sea_trial

int Uwpolling_NODE::sea_trial
protected

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

Referenced by initInfo(), Phy2MacEndRx(), recvFromUpperLayers(), stateRxPoll(), stateRxTrigger(), stateTxData(), stateTxProbe(), and Uwpolling_NODE().

◆ status_info

map< Uwpolling_NODE::UWPOLLING_NODE_STATUS, string > Uwpolling_NODE::status_info
staticprotected

Textual info of the state

Referenced by initInfo(), and Phy2MacEndTx().

◆ T_fin

double Uwpolling_NODE::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_in

double Uwpolling_NODE::T_in
protected

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().

◆ T_poll

double Uwpolling_NODE::T_poll
protected

Duration of RxPOLLTimer

Referenced by stateRxTrigger(), and stateWaitPoll().

◆ T_poll_guard

double Uwpolling_NODE::T_poll_guard
protected

Guard time for initial POLL timer

Referenced by stateRxTrigger(), and Uwpolling_NODE().

◆ Triggered

bool Uwpolling_NODE::Triggered
protected

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

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

◆ tx_data_timer

Tx_Data_Timer Uwpolling_NODE::tx_data_timer
protected

Timer between two consequent DATA packet transmission

Referenced by Phy2MacEndTx().

◆ useAdaptiveTpoll

int Uwpolling_NODE::useAdaptiveTpoll
protected

True if an adaptive T_poll is used

Referenced by stateRxPoll(), and Uwpolling_NODE().


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