|
DESERT 4.0.0
|
#include <uwranging_tdma.h>


Public Member Functions | |
| UwRangingTDMA () | |
| virtual | ~UwRangingTDMA () |
Public Member Functions inherited from UwTDMA | |
| UwTDMA () | |
| virtual | ~UwTDMA () |
| virtual int | recvSyncClMsg (ClMessage *m) |
Protected Member Functions | |
| virtual void | sendRange () |
| virtual void | stateTxData () |
| virtual void | Phy2MacEndRx (Packet *p) |
| virtual void | Phy2MacStartRx (const Packet *p) |
| virtual void | Mac2PhyStartTx (Packet *p) |
| virtual int | command (int argc, const char *const *argv) |
Protected Member Functions inherited from UwTDMA | |
| virtual void | txData () |
| virtual void | changeStatus () |
| virtual void | start (double delay) |
| virtual void | stop () |
| virtual void | recvFromUpperLayers (Packet *p) |
| virtual void | Phy2MacEndTx (const Packet *p) |
| virtual void | rxPacketNotForMe (Packet *p) |
| virtual void | initPkt (Packet *p) |
| unsigned long int | getEpoch () |
Protected Attributes | |
| int | node_id |
| int | slot_id |
| int | n_nodes |
| int | slotidmax |
| std::vector< double > | owtt_vec |
| std::vector< std::vector< int > > | owtt_map |
Protected Attributes inherited from UwTDMA | |
| UWTDMA_STATUS | transceiver_status |
| int | slot_status |
| int | debug_ |
| int | sea_trial_ |
| int | fair_mode |
| int | tot_slots |
| int | slot_number |
| int | HDR_size |
| double | frame_duration |
| double | guard_time |
| double | slot_duration |
| double | start_time |
| UwTDMATimer | tdma_timer |
| std::deque< Packet * > | buffer |
| std::ofstream | out_file_stats |
| bool | enable |
| int | max_queue_size |
| int | max_packet_per_slot |
| int | packet_sent_curr_slot_ |
| int | drop_old_ |
| std::string | name_label_ |
| int | checkPriority |
Static Protected Attributes | |
| static int | count_nodes = 0 |
Additional Inherited Members | |
Protected Types inherited from UwTDMA | |
| enum | UWTDMA_STATUS { IDLE , TRANSMITTING , RECEIVING } |
Class that represents a UwRangingTDMA Node
| UwRangingTDMA::UwRangingTDMA | ( | ) |
Constructor of the UwRangingTDMA class
References count_nodes, n_nodes, node_id, owtt_map, owtt_vec, UwTDMA::slot_number, and UwTDMA::tot_slots.
|
virtual |
Destructor of the UwRangingTDMA class
|
protectedvirtual |
TCL command interpreter. It implements the following OTcl methods:
| argc | Number of arguments in argv. |
| argv | Array of strings which are the command parameters |
Reimplemented from UwTDMA.
References UwTDMA::command(), n_nodes, owtt_map, and owtt_vec.

|
protectedvirtual |
Method called when the Mac Layer start to transmit a Packet
| const | Packet* Pointer to a Packet object that rapresent the Packet in transmission |
Reimplemented from UwTDMA.
References UwTDMA::sea_trial_, UwTDMA::transceiver_status, and UwTDMA::TRANSMITTING.
Referenced by sendRange().
|
protectedvirtual |
Method called when the Phy Layer finish to receive a Packet
| Packet* | Pointer to an Packet object that rapresent the Packet in reception |
Reimplemented from UwTDMA.
References UwTDMA::IDLE, n_nodes, node_id, owtt_map, owtt_vec, UwTDMA::Phy2MacEndRx(), PT_UWRANGING_TDMA, UwTDMA::slot_duration, hdr_ranging_tdma::slotId(), slotidmax, hdr_ranging_tdma::times(), UwTDMA::transceiver_status, and UwTDMA::TRANSMITTING.

|
protectedvirtual |
Method called when the Phy Layer start to receive a Packet
| const | Packet* Pointer to a Packet object that rapresent the Packet in reception |
Reimplemented from UwTDMA.
References UwTDMA::IDLE, UwTDMA::RECEIVING, and UwTDMA::transceiver_status.
|
protectedvirtual |
sends the ranging packet at the beginning of my slot
References hdr_ranging_tdma::getSize(), Mac2PhyStartTx(), n_nodes, node_id, owtt_map, owtt_vec, PT_UWRANGING_TDMA, slot_id, hdr_ranging_tdma::slotId(), slotidmax, and hdr_ranging_tdma::times().
Referenced by stateTxData().

|
protectedvirtual |
Change transceiver status and and start to transmit if in my slot Used when there's spare time, useful for transmitting other packtes.
Reimplemented from UwTDMA.
References sendRange().

|
staticprotected |
counts the instantiated nodes, used for assigning node ids in default contructor
Referenced by UwRangingTDMA().
|
protected |
number of nodes
Referenced by command(), Phy2MacEndRx(), sendRange(), and UwRangingTDMA().
|
protected |
id of the node (0 to n_nodes-1)
Referenced by Phy2MacEndRx(), sendRange(), and UwRangingTDMA().
|
protected |
of size [n_nodes][n_nodes] maps(nodeX,nodeY) -> owtt_vec index
Referenced by command(), Phy2MacEndRx(), sendRange(), and UwRangingTDMA().
|
protected |
vector of lenght D = n_nodes*(n_nodes-1)/2 + 1 where the one way travel times are stored
Referenced by command(), Phy2MacEndRx(), sendRange(), and UwRangingTDMA().
|
protected |
= node_id + k*n_nodes; slot_id value is written in the outgoing ranging packet then k is incremented
Referenced by sendRange().
|
protected |
maximum slot_id allowable in packet header
Referenced by Phy2MacEndRx(), and sendRange().