39#ifndef UWRANGINGTDMA_H
40#define UWRANGINGTDMA_H
99 virtual int command(
int argc,
const char *
const *argv);
Class that represents a UwRangingTDMA Node.
int node_id
id of the node (0 to n_nodes-1)
int n_nodes
number of nodes
virtual void Mac2PhyStartTx(Packet *p)
Method called when the Mac Layer start to transmit a Packet.
virtual void sendRange()
sends the ranging packet at the beginning of my slot
virtual void Phy2MacStartRx(const Packet *p)
Method called when the Phy Layer start to receive a Packet.
std::vector< std::vector< int > > owtt_map
of size [n_nodes][n_nodes] maps(nodeX,nodeY) -> owtt_vec index
static int count_nodes
counts the instantiated nodes, used for assigning node ids in default contructor
int slotidmax
maximum slot_id allowable in packet header
UwRangingTDMA()
Constructor of the UwRangingTDMA class.
virtual void Phy2MacEndRx(Packet *p)
Method called when the Phy Layer finish to receive a Packet.
virtual ~UwRangingTDMA()
Destructor of the UwRangingTDMA class.
std::vector< double > owtt_vec
vector of lenght D = n_nodes*(n_nodes-1)/2 + 1 where the one way travel times are stored
virtual int command(int argc, const char *const *argv)
TCL command interpreter.
int slot_id
= node_id + k*n_nodes; slot_id value is written in the outgoing ranging packet then k is incremented
virtual void stateTxData()
Change transceiver status and and start to transmit if in my slot Used when there's spare time,...
Class that represents a TDMA Node.
packet_t PT_UWRANGING_TDMA
Provides the definition of the class UWTDMA.