DESERT 4.0.0
UwTDMA_frame Class Reference

#include <uwtdma-frame.h>

Inheritance diagram for UwTDMA_frame:
Inheritance graph
Collaboration diagram for UwTDMA_frame:
Collaboration graph

Public Member Functions

 UwTDMA_frame ()
 
virtual ~UwTDMA_frame ()
 
- Public Member Functions inherited from UwTDMA
 UwTDMA ()
 
virtual ~UwTDMA ()
 
virtual int recvSyncClMsg (ClMessage *m)
 

Protected Member Functions

virtual int command (int argc, const char *const *argv)
 
virtual void changeStatus ()
 
virtual void initializeTopologyS ()
 
Slot::iterator getCurrentSlot ()
 
Slot::iterator getNextMySlot (int skip=0)
 
- Protected Member Functions inherited from UwTDMA
virtual void txData ()
 
virtual void stateTxData ()
 
virtual void start (double delay)
 
virtual void stop ()
 
virtual void recvFromUpperLayers (Packet *p)
 
virtual void Phy2MacEndRx (Packet *p)
 
virtual void Phy2MacStartRx (const Packet *p)
 
virtual void Mac2PhyStartTx (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 my_slots_counter
 
int tot_nodes
 
int topology_index
 
int max_packet_per_slot
 
int packet_sent_curr_slot_
 
SlotTopology s_
 
Slot my_slot_numbers_
 
- 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
 

Private Attributes

string topology_S_file_name_
 
char topology_S_token_separator_
 

Friends

class UwTDMATimer
 

Additional Inherited Members

- Protected Types inherited from UwTDMA
enum  UWTDMA_STATUS { IDLE , TRANSMITTING , RECEIVING }
 

Detailed Description

Class that represents a TDMA_frame MAC layer of a Node

Constructor & Destructor Documentation

◆ UwTDMA_frame()

UwTDMA_frame::UwTDMA_frame ( )

Constructor of the TDMA_frame class

References UwTDMA::fair_mode, UwTDMA::guard_time, and UwTDMA::tot_slots.

◆ ~UwTDMA_frame()

UwTDMA_frame::~UwTDMA_frame ( )
virtual

Destructor of the TDMA_frame class

Member Function Documentation

◆ changeStatus()

void UwTDMA_frame::changeStatus ( )
protectedvirtual

◆ command()

int UwTDMA_frame::command ( int  argc,
const char *const *  argv 
)
protectedvirtual

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.

Reimplemented from UwTDMA.

References UwTDMA::command(), UwTDMA::fair_mode, UwTDMA::frame_duration, UwTDMA::guard_time, initializeTopologyS(), my_slot_numbers_, UwTDMA::slot_duration, UwTDMA::start(), UwTDMA::start_time, UwTDMA::stop(), topology_index, topology_S_file_name_, topology_S_token_separator_, and UwTDMA::tot_slots.

Here is the call graph for this function:

◆ getCurrentSlot()

Slot::iterator UwTDMA_frame::getCurrentSlot ( )
protected

◆ getNextMySlot()

Slot::iterator UwTDMA_frame::getNextMySlot ( int  skip = 0)
protected

◆ initializeTopologyS()

void UwTDMA_frame::initializeTopologyS ( )
protectedvirtual

Initialize the topology S 2D matrix from file. This matrix cointains the schedule slot of each node.

References UwTDMA::debug_, my_slot_numbers_, s_, UwTDMA::slot_number, topology_index, topology_S_file_name_, topology_S_token_separator_, tot_nodes, and UwTDMA::tot_slots.

Referenced by command().

Friends And Related Symbol Documentation

◆ UwTDMATimer

friend class UwTDMATimer
friend

Member Data Documentation

◆ max_packet_per_slot

int UwTDMA_frame::max_packet_per_slot
protected

max numer of packet it can transmit per slot

◆ my_slot_numbers_

Slot UwTDMA_frame::my_slot_numbers_
protected

set the position of the node in the frame (fair_mode) (starting from 0 to tot_slots-1)

Referenced by command(), getCurrentSlot(), getNextMySlot(), and initializeTopologyS().

◆ my_slots_counter

int UwTDMA_frame::my_slots_counter
protected

count the passed number of slots in which it was active

Referenced by changeStatus(), getCurrentSlot(), and getNextMySlot().

◆ packet_sent_curr_slot_

int UwTDMA_frame::packet_sent_curr_slot_
protected

counter of packet has been sent in the current slot

Referenced by changeStatus().

◆ s_

SlotTopology UwTDMA_frame::s_
protected

matrix cointaining the transmission schedule of all the network

Referenced by initializeTopologyS().

◆ topology_index

int UwTDMA_frame::topology_index
protected

index in the topology matrix

Referenced by command(), and initializeTopologyS().

◆ topology_S_file_name_

string UwTDMA_frame::topology_S_file_name_
private

Topology S file name

Referenced by command(), and initializeTopologyS().

◆ topology_S_token_separator_

char UwTDMA_frame::topology_S_token_separator_
private

character used as token separator when importing the S topology from file

Referenced by command(), and initializeTopologyS().

◆ tot_nodes

int UwTDMA_frame::tot_nodes
protected

total number of nodes in the network

Referenced by initializeTopologyS().


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