DESERT 3.5.1
Loading...
Searching...
No Matches
uw-mac-TLohi.h File Reference
#include <mmac.h>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <utility>
#include <fstream>
#include <mphy.h>
Include dependency graph for uw-mac-TLohi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hdr_tlohi
 
class  Timer
 
class  DataTimer
 
class  MMacTLOHI
 

Macros

#define HDR_TLOHI(P)   (hdr_tlohi::access(P))
 
#define TLOHI_DROP_REASON_WRONG_STATE   "WST"
 
#define TLOHI_DROP_REASON_WRONG_RECEIVER   "WRCV"
 
#define TLOHI_DROP_REASON_UNKNOWN_TYPE   "UPT"
 
#define TLOHI_DROP_REASON_BUFFER_FULL   "DBF"
 

Typedefs

typedef struct hdr_tlohi hdr_tlohi
 

Enumerations

enum  TLOHI_STATUS {
  STATE_IDLE = 1 , STATE_BACKOFF , STATE_START_CONTENTION , STATE_WAIT_END_CONTENTION ,
  STATE_TX_DATA , STATE_SLEEP , STATE_TX_ACK , STATE_WAIT_ACK ,
  STATE_DATA_RECEIVED , STATE_ACK_RECEIVED , STATE_WAIT_END_CR , STATE_COUNT_CONTENDERS ,
  STATE_RECONTEND_WINDOW , STATE_WAIT_XACK , STATE_NOT_SET
}
 
enum  TLOHI_REASON_STATUS {
  REASON_TONE_TX = 1 , REASON_DATA_PENDING , REASON_TONE_RX , REASON_WAIT_CR_END ,
  REASON_NO_CONTENDERS , REASON_CONTENDERS , REASON_DATA_RX , REASON_XDATA_RX ,
  REASON_XACK_RX , REASON_DATA_TX , REASON_ACK_TX , REASON_ACK_RX ,
  REASON_BACKOFF_TIMEOUT , REASON_ACK_TIMEOUT , REASON_SLEEP_TIMEOUT , REASON_RECONTEND_END ,
  REASON_CR_END , REASON_DATA_EMPTY , REASON_XACK_TIMEOUT , REASON_NOT_SET ,
  REASON_MAX_TX_TRIES
}
 
enum  TLOHI_PKT_TYPE { TONE_PKT = 1 , ACK_PKT , DATA_PKT , DATAMAX_PKT }
 
enum  TLOHI_ACK_MODE { ACK_MODE = 1 , NO_ACK_MODE }
 
enum  TLOHI_MODE { CONSERVATIVE_UNSYNC_MODE = 1 , AGGRESSIVE_UNSYNC_MODE , SYNC_MODE }
 
enum  TIMER_STATUS { RUNNING = 1 , STOPPED , FREEZED }
 

Variables

packet_t PT_TLOHI
 
static const int prop_speed
 

Detailed Description

Provides the declaration of uw-mac-TLohi MAC protocol.

Author
Federico Guerra
Version
1.0.0

Definition in file uw-mac-TLohi.h.

Macro Definition Documentation

◆ HDR_TLOHI

#define HDR_TLOHI (   P)    (hdr_tlohi::access(P))

Definition at line 54 of file uw-mac-TLohi.h.

◆ TLOHI_DROP_REASON_BUFFER_FULL

#define TLOHI_DROP_REASON_BUFFER_FULL   "DBF"

Definition at line 59 of file uw-mac-TLohi.h.

◆ TLOHI_DROP_REASON_UNKNOWN_TYPE

#define TLOHI_DROP_REASON_UNKNOWN_TYPE   "UPT"

Definition at line 58 of file uw-mac-TLohi.h.

◆ TLOHI_DROP_REASON_WRONG_RECEIVER

#define TLOHI_DROP_REASON_WRONG_RECEIVER   "WRCV"

Definition at line 57 of file uw-mac-TLohi.h.

◆ TLOHI_DROP_REASON_WRONG_STATE

#define TLOHI_DROP_REASON_WRONG_STATE   "WST"

Definition at line 56 of file uw-mac-TLohi.h.

Typedef Documentation

◆ hdr_tlohi

typedef struct hdr_tlohi hdr_tlohi

Struct that defines the header of T-LOHI in the packets.

Enumeration Type Documentation

◆ TIMER_STATUS

Enumeration that indicates the possible state of the timers, namely: RUNNING, STOPPED or FREEZED.

Enumerator
RUNNING 
STOPPED 
FREEZED 

Definition at line 143 of file uw-mac-TLohi.h.

◆ TLOHI_ACK_MODE

Enumeration that indicates the possible type of ACK MODE, namely: ACK_MODE or NO_ACK_MODE.

Enumerator
ACK_MODE 
NO_ACK_MODE 

Definition at line 125 of file uw-mac-TLohi.h.

◆ TLOHI_MODE

enum TLOHI_MODE

Enumeration that indicates the possible modality of T-LOHI protocol, namely: CONSERVATIVE_UNSYNC_MODE or AGGRESSIVE_UNSYNC_MODE.

Enumerator
CONSERVATIVE_UNSYNC_MODE 
AGGRESSIVE_UNSYNC_MODE 
SYNC_MODE 

Definition at line 132 of file uw-mac-TLohi.h.

◆ TLOHI_PKT_TYPE

Enumeration that indicates the possibile type of packets in T-LOHI MAC protocol.

Enumerator
TONE_PKT 
ACK_PKT 
DATA_PKT 
DATAMAX_PKT 

Definition at line 119 of file uw-mac-TLohi.h.

◆ TLOHI_REASON_STATUS

Enumeration that indicates the possibile reason for the change of state in T-LOHI MAC protocol.

Enumerator
REASON_TONE_TX 
REASON_DATA_PENDING 
REASON_TONE_RX 
REASON_WAIT_CR_END 
REASON_NO_CONTENDERS 
REASON_CONTENDERS 
REASON_DATA_RX 
REASON_XDATA_RX 
REASON_XACK_RX 
REASON_DATA_TX 
REASON_ACK_TX 
REASON_ACK_RX 
REASON_BACKOFF_TIMEOUT 
REASON_ACK_TIMEOUT 
REASON_SLEEP_TIMEOUT 
REASON_RECONTEND_END 
REASON_CR_END 
REASON_DATA_EMPTY 
REASON_XACK_TIMEOUT 
REASON_NOT_SET 
REASON_MAX_TX_TRIES 

Definition at line 91 of file uw-mac-TLohi.h.

◆ TLOHI_STATUS

Enumeration that indicates the possible state of T-LOHI MAC.

Enumerator
STATE_IDLE 
STATE_BACKOFF 
STATE_START_CONTENTION 
STATE_WAIT_END_CONTENTION 
STATE_TX_DATA 
STATE_SLEEP 
STATE_TX_ACK 
STATE_WAIT_ACK 
STATE_DATA_RECEIVED 
STATE_ACK_RECEIVED 
STATE_WAIT_END_CR 
STATE_COUNT_CONTENDERS 
STATE_RECONTEND_WINDOW 
STATE_WAIT_XACK 
STATE_NOT_SET 

Definition at line 69 of file uw-mac-TLohi.h.

Variable Documentation

◆ prop_speed

const int prop_speed
static
Initial value:
=
1500

typical sound speed in underwater scenario

Definition at line 63 of file uw-mac-TLohi.h.

◆ PT_TLOHI

packet_t PT_TLOHI
extern