DESERT 3.5.1
Loading...
Searching...
No Matches
UwTDMA_frame Class Reference

#include <uwtdma-frame.h>

Inheritance diagram for UwTDMA_frame:
Collaboration diagram for UwTDMA_frame:

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.

Definition at line 62 of file uwtdma-frame.h.

Constructor & Destructor Documentation

◆ UwTDMA_frame()

UwTDMA_frame::UwTDMA_frame ( )

Constructor of the TDMA_frame class.

Definition at line 80 of file uwtdma-frame.cpp.

◆ ~UwTDMA_frame()

UwTDMA_frame::~UwTDMA_frame ( )
virtual

Destructor of the TDMA_frame class.

Definition at line 95 of file uwtdma-frame.cpp.

Member Function Documentation

◆ changeStatus()

void UwTDMA_frame::changeStatus ( )
protectedvirtual

Alternate TDMA status between MY_STATUS and NOT_MY_STATUS.

Reimplemented from UwTDMA.

Definition at line 100 of file uwtdma-frame.cpp.

◆ 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.

Definition at line 132 of file uwtdma-frame.cpp.

◆ getCurrentSlot()

Slot::iterator UwTDMA_frame::getCurrentSlot ( )
protected

Definition at line 194 of file uwtdma-frame.cpp.

◆ getNextMySlot()

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

Definition at line 209 of file uwtdma-frame.cpp.

◆ initializeTopologyS()

void UwTDMA_frame::initializeTopologyS ( )
protectedvirtual

Initialize the topology S 2D matrix from file.

This matrix cointains the schedule slot of each node.

Definition at line 222 of file uwtdma-frame.cpp.

Friends And Related Symbol Documentation

◆ UwTDMATimer

friend class UwTDMATimer
friend

Definition at line 65 of file uwtdma-frame.h.

Member Data Documentation

◆ max_packet_per_slot

int UwTDMA_frame::max_packet_per_slot
protected

max numer of packet it can transmit per slot

Definition at line 108 of file uwtdma-frame.h.

◆ 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)

Definition at line 114 of file uwtdma-frame.h.

◆ my_slots_counter

int UwTDMA_frame::my_slots_counter
protected

count the passed number of slots in which it was active

Definition at line 104 of file uwtdma-frame.h.

◆ packet_sent_curr_slot_

int UwTDMA_frame::packet_sent_curr_slot_
protected

counter of packet has been sent in the current slot

Definition at line 109 of file uwtdma-frame.h.

◆ s_

SlotTopology UwTDMA_frame::s_
protected

matrix cointaining the transmission schedule of all the network

Definition at line 112 of file uwtdma-frame.h.

◆ topology_index

int UwTDMA_frame::topology_index
protected

index in the topology matrix

Definition at line 107 of file uwtdma-frame.h.

◆ topology_S_file_name_

string UwTDMA_frame::topology_S_file_name_
private

Topology S file name.

Definition at line 119 of file uwtdma-frame.h.

◆ topology_S_token_separator_

char UwTDMA_frame::topology_S_token_separator_
private

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

Definition at line 120 of file uwtdma-frame.h.

◆ tot_nodes

int UwTDMA_frame::tot_nodes
protected

total number of nodes in the network

Definition at line 106 of file uwtdma-frame.h.


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