#include <uw-csma-aloha-trigger-node.h>
|
enum | UW_CS_ALOHA_TRIG_NODE_STATUS {
UW_CS_ALOHA_TRIG_NODE_STATE_IDLE = 1
, UW_CS_ALOHA_TRIG_NODE_STATE_TX_DATA
, UW_CS_ALOHA_TRIG_NODE_STATE_DATA_RX
, UW_CS_ALOHA_TRIG_NODE_STATE_NOT_SET
,
UW_CS_ALOHA_TRIG_NODE_STATE_LISTEN
, UW_CS_ALOHA_TRIG_NODE_STATE_CHK_LISTEN_TIMEOUT
, UW_CS_ALOHA_TRIG_NODE_STATE_RX_IDLE
, UW_CS_ALOHA_TRIG_NODE_STATE_RX_LISTEN
,
UW_CS_ALOHA_TRIG_NODE_STATE_WRONG_PKT_RX
, UW_CS_ALOHA_TRIG_NODE_STATE_RX_TRIGGER
} |
|
enum | UW_CS_ALOHA_TRIG_NODE_REASON_STATUS {
UW_CS_ALOHA_TRIG_NODE_REASON_DATA_PENDING
, UW_CS_ALOHA_TRIG_NODE_REASON_DATA_RX
, UW_CS_ALOHA_TRIG_NODE_REASON_DATA_TX
, UW_CS_ALOHA_TRIG_NODE_REASON_DATA_EMPTY
,
UW_CS_ALOHA_TRIG_NODE_REASON_NOT_SET
, UW_CS_ALOHA_TRIG_NODE_REASON_LISTEN
, UW_CS_ALOHA_TRIG_NODE_REASON_LISTEN_TIMEOUT
, UW_CS_ALOHA_TRIG_NODE_REASON_LISTEN_PENDING
,
UW_CS_ALOHA_TRIG_NODE_REASON_START_RX
, UW_CS_ALOHA_TRIG_NODE_REASON_PKT_NOT_FOR_ME
, UW_CS_ALOHA_TRIG_NODE_REASON_PKT_ERROR
, UW_CS_ALOHA_TRIG_NODE_REASON_LISTEN_AFTER_TRIGGER
,
UW_CS_ALOHA_TRIG_NODE_REASON_TRIGGER_RX
} |
|
enum | UW_CS_ALOHA_TRIG_NODE_TIMER_STATUS { UW_CS_ALOHA_TRIG_NODE_IDLE = 1
, UW_CS_ALOHA_TRIG_NODE_RUNNING
, UW_CS_ALOHA_TRIG_NODE_FROZEN
, UW_CS_ALOHA_TRIG_NODE_EXPIRED
} |
|
Class that describes a CsmaAloha_TRIGGERED module of the node.
Definition at line 65 of file uw-csma-aloha-trigger-node.h.
◆ UW_CS_ALOHA_TRIG_NODE_REASON_STATUS
Enumerator |
---|
UW_CS_ALOHA_TRIG_NODE_REASON_DATA_PENDING | |
UW_CS_ALOHA_TRIG_NODE_REASON_DATA_RX | |
UW_CS_ALOHA_TRIG_NODE_REASON_DATA_TX | |
UW_CS_ALOHA_TRIG_NODE_REASON_DATA_EMPTY | |
UW_CS_ALOHA_TRIG_NODE_REASON_NOT_SET | |
UW_CS_ALOHA_TRIG_NODE_REASON_LISTEN | |
UW_CS_ALOHA_TRIG_NODE_REASON_LISTEN_TIMEOUT | |
UW_CS_ALOHA_TRIG_NODE_REASON_LISTEN_PENDING | |
UW_CS_ALOHA_TRIG_NODE_REASON_START_RX | |
UW_CS_ALOHA_TRIG_NODE_REASON_PKT_NOT_FOR_ME | |
UW_CS_ALOHA_TRIG_NODE_REASON_PKT_ERROR | |
UW_CS_ALOHA_TRIG_NODE_REASON_LISTEN_AFTER_TRIGGER | |
UW_CS_ALOHA_TRIG_NODE_REASON_TRIGGER_RX | |
Definition at line 115 of file uw-csma-aloha-trigger-node.h.
◆ UW_CS_ALOHA_TRIG_NODE_STATUS
Enumerator |
---|
UW_CS_ALOHA_TRIG_NODE_STATE_IDLE | |
UW_CS_ALOHA_TRIG_NODE_STATE_TX_DATA | |
UW_CS_ALOHA_TRIG_NODE_STATE_DATA_RX | |
UW_CS_ALOHA_TRIG_NODE_STATE_NOT_SET | |
UW_CS_ALOHA_TRIG_NODE_STATE_LISTEN | |
UW_CS_ALOHA_TRIG_NODE_STATE_CHK_LISTEN_TIMEOUT | |
UW_CS_ALOHA_TRIG_NODE_STATE_RX_IDLE | |
UW_CS_ALOHA_TRIG_NODE_STATE_RX_LISTEN | |
UW_CS_ALOHA_TRIG_NODE_STATE_WRONG_PKT_RX | |
UW_CS_ALOHA_TRIG_NODE_STATE_RX_TRIGGER | |
Definition at line 101 of file uw-csma-aloha-trigger-node.h.
◆ UW_CS_ALOHA_TRIG_NODE_TIMER_STATUS
Enumerator |
---|
UW_CS_ALOHA_TRIG_NODE_IDLE | |
UW_CS_ALOHA_TRIG_NODE_RUNNING | |
UW_CS_ALOHA_TRIG_NODE_FROZEN | |
UW_CS_ALOHA_TRIG_NODE_EXPIRED | |
Definition at line 132 of file uw-csma-aloha-trigger-node.h.
◆ UwCsmaAloha_Trigger_NODE()
UwCsmaAloha_Trigger_NODE::UwCsmaAloha_Trigger_NODE |
( |
| ) |
|
◆ ~UwCsmaAloha_Trigger_NODE()
UwCsmaAloha_Trigger_NODE::~UwCsmaAloha_Trigger_NODE |
( |
| ) |
|
|
virtual |
◆ command()
int UwCsmaAloha_Trigger_NODE::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
virtual |
TCL command interpreter.
It implements the following OTcl methods:
- Parameters
-
argc | Number of arguments in argv. |
argv | Array 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.
Definition at line 144 of file uw-csma-aloha-trigger-node.cpp.
◆ crLayCommand()
int UwCsmaAloha_Trigger_NODE::crLayCommand |
( |
ClMessage * |
m | ) |
|
|
virtual |
Cross-Layer messages interpreter.
- Parameters
-
ClMessage* | an instance of ClMessage that represent the message received |
- Returns
- 0 if successful.
Definition at line 160 of file uw-csma-aloha-trigger-node.cpp.
◆ getRemainingPkts()
virtual int UwCsmaAloha_Trigger_NODE::getRemainingPkts |
( |
| ) |
|
|
inlineprotectedvirtual |
Return the number of packets not transmitted (remained in the protocol queue) at the end of the simulation.
- Returns
- the size of the queue at the end of the simulation
Definition at line 535 of file uw-csma-aloha-trigger-node.h.
◆ incrUpperDataRx()
virtual void UwCsmaAloha_Trigger_NODE::incrUpperDataRx |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ initInfo()
void UwCsmaAloha_Trigger_NODE::initInfo |
( |
| ) |
|
|
protectedvirtual |
Initializes the protocol at the beginning of the simulation.
This method is called by a command in tcl.
- Parameters
-
- See also
- command method
Definition at line 170 of file uw-csma-aloha-trigger-node.cpp.
◆ initPkt()
void UwCsmaAloha_Trigger_NODE::initPkt |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Init the packet with the MAC address of the receiver and the sender, the size of the packet and the type.
- Parameters
-
UWPOLLING_PKT_TYPE | the type of the packet |
Definition at line 235 of file uw-csma-aloha-trigger-node.cpp.
◆ Mac2PhyStartTx()
void UwCsmaAloha_Trigger_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 |
Definition at line 246 of file uw-csma-aloha-trigger-node.cpp.
◆ Phy2MacEndRx()
void UwCsmaAloha_Trigger_NODE::Phy2MacEndRx |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Method called when the Phy Layer finish to receive a Packet.
- Parameters
-
Packet* | Pointer to an object of type Packet that rapresent the Packet received |
Definition at line 314 of file uw-csma-aloha-trigger-node.cpp.
◆ Phy2MacEndTx()
void UwCsmaAloha_Trigger_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 |
Definition at line 256 of file uw-csma-aloha-trigger-node.cpp.
◆ Phy2MacStartRx()
void UwCsmaAloha_Trigger_NODE::Phy2MacStartRx |
( |
const Packet * |
p | ) |
|
|
protectedvirtual |
Method called when the Phy Layer start to receive a Packet.
- Parameters
-
const | Packet* Pointer to an object of type Packet that rapresent the Packet that is in reception |
Definition at line 286 of file uw-csma-aloha-trigger-node.cpp.
◆ queuePop()
virtual void UwCsmaAloha_Trigger_NODE::queuePop |
( |
bool |
flag = true | ) |
|
|
inlineprotectedvirtual |
◆ recvFromUpperLayers()
void UwCsmaAloha_Trigger_NODE::recvFromUpperLayers |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ refreshReason()
◆ refreshState()
◆ stateCheckListenExpired()
void UwCsmaAloha_Trigger_NODE::stateCheckListenExpired |
( |
| ) |
|
|
protectedvirtual |
◆ stateCheckTxTimerExpired()
void UwCsmaAloha_Trigger_NODE::stateCheckTxTimerExpired |
( |
| ) |
|
|
protectedvirtual |
◆ stateIdle()
void UwCsmaAloha_Trigger_NODE::stateIdle |
( |
| ) |
|
|
protectedvirtual |
◆ stateListen()
void UwCsmaAloha_Trigger_NODE::stateListen |
( |
| ) |
|
|
protectedvirtual |
◆ stateRxData()
void UwCsmaAloha_Trigger_NODE::stateRxData |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ stateRxIdle()
void UwCsmaAloha_Trigger_NODE::stateRxIdle |
( |
| ) |
|
|
protectedvirtual |
◆ stateRxListen()
void UwCsmaAloha_Trigger_NODE::stateRxListen |
( |
| ) |
|
|
protectedvirtual |
◆ stateRxPacketNotForMe()
void UwCsmaAloha_Trigger_NODE::stateRxPacketNotForMe |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ stateRxTrigger()
void UwCsmaAloha_Trigger_NODE::stateRxTrigger |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
State of the protocol in which a TRIGGER packet is received.
- Parameters
-
p | Pointer to the Packet received |
Definition at line 365 of file uw-csma-aloha-trigger-node.cpp.
◆ stateTxData()
void UwCsmaAloha_Trigger_NODE::stateTxData |
( |
| ) |
|
|
protectedvirtual |
◆ txData()
void UwCsmaAloha_Trigger_NODE::txData |
( |
| ) |
|
|
protectedvirtual |
Transmits the DATA packet (calling Mac2PhyStartTx) and increment the counter of transmitted data packets.
Definition at line 387 of file uw-csma-aloha-trigger-node.cpp.
◆ updateLastDataIdRx()
virtual void UwCsmaAloha_Trigger_NODE::updateLastDataIdRx |
( |
int |
id | ) |
|
|
inlineprotectedvirtual |
◆ waitForUser()
void UwCsmaAloha_Trigger_NODE::waitForUser |
( |
| ) |
|
|
protectedvirtual |
◆ buffer_pkts
int UwCsmaAloha_Trigger_NODE::buffer_pkts |
|
protected |
◆ can_transmit
bool UwCsmaAloha_Trigger_NODE::can_transmit |
|
protected |
◆ curr_data_pkt
Packet* UwCsmaAloha_Trigger_NODE::curr_data_pkt |
|
protected |
◆ curr_state
◆ data_sn_queue
std::queue<int> UwCsmaAloha_Trigger_NODE::data_sn_queue |
|
protected |
◆ fout
ofstream UwCsmaAloha_Trigger_NODE::fout |
|
protected |
◆ has_buffer_queue
bool UwCsmaAloha_Trigger_NODE::has_buffer_queue |
|
protected |
◆ HDR_size
int UwCsmaAloha_Trigger_NODE::HDR_size |
|
protected |
◆ initialized
bool UwCsmaAloha_Trigger_NODE::initialized = false |
|
staticprotected |
◆ last_data_id_rx
int UwCsmaAloha_Trigger_NODE::last_data_id_rx |
|
protected |
◆ last_reason
◆ last_sent_data_id
int UwCsmaAloha_Trigger_NODE::last_sent_data_id |
|
protected |
◆ listen_time
double UwCsmaAloha_Trigger_NODE::listen_time |
|
protected |
◆ listen_timer
◆ max_payload
int UwCsmaAloha_Trigger_NODE::max_payload |
|
protected |
◆ prev_prev_state
◆ prev_state
◆ prop_speed
const double UwCsmaAloha_Trigger_NODE::prop_speed = 1500.0 |
|
staticprotected |
Typical sound propagation speed in underwater enviroment.
Variable that rapresent the status of the protocol machine state
Definition at line 97 of file uw-csma-aloha-trigger-node.h.
std::queue<Packet *> UwCsmaAloha_Trigger_NODE::Q |
|
protected |
◆ reason_info
◆ status_info
◆ tx_timer
◆ tx_timer_duration
int UwCsmaAloha_Trigger_NODE::tx_timer_duration |
|
protected |
◆ u_data_id
int UwCsmaAloha_Trigger_NODE::u_data_id |
|
protected |
◆ u_pkt_id
int UwCsmaAloha_Trigger_NODE::u_pkt_id |
|
staticprotected |
◆ wait_costant
double UwCsmaAloha_Trigger_NODE::wait_costant |
|
protected |
The documentation for this class was generated from the following files: