DESERT 4.0.0
UwMultiTrafficRangeCtr Class Reference

#include <uwmulti-traffic-range-crt.h>

Inheritance diagram for UwMultiTrafficRangeCtr:
Inheritance graph
Collaboration diagram for UwMultiTrafficRangeCtr:
Collaboration graph

Classes

class  UwCheckRangeTimer
 

Public Member Functions

 UwMultiTrafficRangeCtr ()
 
virtual ~UwMultiTrafficRangeCtr ()
 
virtual int command (int, const char *const *)
 
virtual void recv (Packet *p, int idSrc)
 
virtual void sendDown (Packet *p, double delay=0)
 
virtual void sendDown (int moduleId, Packet *p, double delay=0)
 
- Public Member Functions inherited from UwMultiTrafficControl
 UwMultiTrafficControl ()
 
virtual ~UwMultiTrafficControl ()
 
virtual void recv (Packet *p)
 

Protected Member Functions

virtual void manageBuffer (int traffic)
 
virtual int getBestLowerLayer (int traffic, Packet *p=NULL)
 
virtual void checkRange (int traffic, int module_id, uint8_t destAdd=UWIP_BROADCAST)
 
virtual void manageCheckedLayer (int module_id, uint8_t destAdd, bool in_range, int idSrc=0)
 
virtual void initStatus (int traffic)
 
virtual void timerExpired (int traffic)
 
void incrSignalingCounter (int traffic, CounterMap &map_cnt)
 
uint getSignalingCounter (int traffic, const CounterMap &map_cnt) const
 
- Protected Member Functions inherited from UwMultiTrafficControl
virtual void recvFromUpperLayers (Packet *p)
 
virtual void insertInBuffer (Packet *p, int traffic)
 
virtual Packet * removeFromBuffer (int traffic)
 
virtual Packet * getFromBuffer (int traffic)
 
void insertTraffic2UpLayer (int traffic, int upper_layer_id)
 
void insertTraffic2LowerLayer (int traffic, int lower_layer_stack, int lower_layer_id, int behavior)
 
virtual int getUpperLayer (int traffic)
 
virtual void eraseTraffic2LowerLayer (int traffic, int lower_layer_stack)
 
virtual void eraseTraffic2Low (int traffic)
 
virtual void eraseTraffic2Up (int traffic)
 
virtual bool addUpLayerFromTag (int traffic_id, const std::string &tag)
 
virtual bool addLowLayerFromTag (int traffic_id, const std::string &tag, int behavior)
 
void setBufferFeature (int traffic_id, int max_size, bool is_circular, double send_down_delay=0)
 
virtual void incrPktLoss (int traffic_id)
 
virtual uint getDiscardedPacket (int traffic_id) const
 

Protected Attributes

StatusMap status
 
double check_to_period
 
int signaling_pktSize
 
CounterMap tx_probe_cnt
 
CounterMap rx_probe_cnt
 
CounterMap tx_probe_ack_cnt
 
CounterMap rx_probe_ack_cnt
 
- Protected Attributes inherited from UwMultiTrafficControl
int debug_
 
UpTrafficMap up_map
 
DownTrafficMap down_map
 
DownTrafficBuffer down_buffer
 
BufferTrafficFeature buffer_feature_map
 

Private Attributes

std::map< int, UwCheckRangeTimer * > timers
 

Detailed Description

Class used to represents the UwMultiTrafficRangeCtr layer of a node.

Constructor & Destructor Documentation

◆ UwMultiTrafficRangeCtr()

UwMultiTrafficRangeCtr::UwMultiTrafficRangeCtr ( )

Constructor of UwMultiPhy class.

References check_to_period, and signaling_pktSize.

◆ ~UwMultiTrafficRangeCtr()

virtual UwMultiTrafficRangeCtr::~UwMultiTrafficRangeCtr ( )
inlinevirtual

Destructor of UwMultiPhy class.

Member Function Documentation

◆ checkRange()

void UwMultiTrafficRangeCtr::checkRange ( int  traffic,
int  module_id,
uint8_t  destAdd = UWIP_BROADCAST 
)
protectedvirtual

◆ command()

int UwMultiTrafficRangeCtr::command ( int  argc,
const char *const *  argv 
)
virtual

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

References UwMultiTrafficControl::addLowLayerFromTag(), CHECK_RANGE, UwMultiTrafficControl::command(), getSignalingCounter(), ROBUST, rx_probe_ack_cnt, rx_probe_cnt, tx_probe_ack_cnt, and tx_probe_cnt.

Here is the call graph for this function:

◆ getBestLowerLayer()

int UwMultiTrafficRangeCtr::getBestLowerLayer ( int  traffic,
Packet *  p = NULL 
)
protectedvirtual

return the Best Lower Layer id where to forward the packet of traffic type

Parameters
trafficapplication traffic id
Returns
the layer id

Reimplemented from UwMultiTrafficControl.

References CHECK_RANGE, checkRange(), UwMultiTrafficControl::debug_, UwMultiTrafficControl::down_map, IDLE, initStatus(), RANGE_CNF_WAIT, ROBUST, and status.

Referenced by manageBuffer().

Here is the call graph for this function:

◆ getSignalingCounter()

uint UwMultiTrafficRangeCtr::getSignalingCounter ( int  traffic,
const CounterMap map_cnt 
) const
protected

Return the number of signaling pkts sent for the given traffic

Parameters
trafficapplication traffic id
map_cntmap with counter for each traffic
Returns
number of signaling packets sent for the given traffic and 0 if traffic not found

Referenced by command().

◆ incrSignalingCounter()

void UwMultiTrafficRangeCtr::incrSignalingCounter ( int  traffic,
CounterMap map_cnt 
)
protected

Incement number of signaling pkts sent for the given traffic

Parameters
trafficapplication traffic id
map_cntmap with counter for each traffic

Referenced by checkRange(), and recv().

◆ initStatus()

void UwMultiTrafficRangeCtr::initStatus ( int  traffic)
protectedvirtual

default status initialization

Parameters
trafficapplication traffic id

References IDLE, check_status::module_ids, check_status::robust_id, check_status::status, and status.

Referenced by checkRange(), and getBestLowerLayer().

◆ manageBuffer()

void UwMultiTrafficRangeCtr::manageBuffer ( int  traffic)
protectedvirtual

manage to tx a packet of traffic type

Parameters
trafficapplication traffic id

Reimplemented from UwMultiTrafficControl.

References UwMultiTrafficControl::buffer_feature_map, getBestLowerLayer(), UwMultiTrafficControl::getFromBuffer(), IDLE, UwMultiTrafficControl::removeFromBuffer(), sendDown(), and status.

Here is the call graph for this function:

◆ manageCheckedLayer()

void UwMultiTrafficRangeCtr::manageCheckedLayer ( int  module_id,
uint8_t  destAdd,
bool  in_range,
int  idSrc = 0 
)
protectedvirtual

procedure when a CHECKED stack is checked

Parameters
moduleid
in_rangetrue if the PHY is in range, false otherwise

References UwMultiTrafficControl::buffer_feature_map, checkRange(), UwMultiTrafficControl::debug_, UwMultiTrafficControl::getFromBuffer(), IDLE, UwMultiTrafficControl::insertInBuffer(), UwMultiTrafficRangeCtr::UwCheckRangeTimer::num_expires, RANGE_CNF_WAIT, UwMultiTrafficControl::removeFromBuffer(), sendDown(), status, and timers.

Referenced by recv(), and timerExpired().

Here is the call graph for this function:

◆ recv()

void UwMultiTrafficRangeCtr::recv ( Packet *  p,
int  idSrc 
)
virtual

◆ sendDown() [1/2]

virtual void UwMultiTrafficRangeCtr::sendDown ( int  moduleId,
Packet *  p,
double  delay = 0 
)
inlinevirtual

Send a packet to the requested module of the bottom layer

Parameters
moduleIdID of the down module at which you would send the packet
ppointer of the packet which has to be sent
delay(optional) delay introduced before transmission [sec.]

◆ sendDown() [2/2]

virtual void UwMultiTrafficRangeCtr::sendDown ( Packet *  p,
double  delay = 0 
)
inlinevirtual

Send a packet to the module(s) of the bottom layers

Parameters
ppointer of the packet which has to be sent
delay(optional) delay introduced before transmission [sec.]

Referenced by checkRange(), manageBuffer(), manageCheckedLayer(), and recv().

◆ timerExpired()

void UwMultiTrafficRangeCtr::timerExpired ( int  traffic)
protectedvirtual

handle when a a timer expires

Parameters
trafficapplication traffic id

References checkRange(), UwMultiTrafficControl::debug_, UwMultiTrafficControl::getFromBuffer(), IDLE, manageCheckedLayer(), RANGE_CNF_WAIT, status, and timers.

Here is the call graph for this function:

Member Data Documentation

◆ check_to_period

double UwMultiTrafficRangeCtr::check_to_period
protected

Time-Out period

Referenced by checkRange(), and UwMultiTrafficRangeCtr().

◆ rx_probe_ack_cnt

CounterMap UwMultiTrafficRangeCtr::rx_probe_ack_cnt
protected

Number of probe ACK pkts recv for each traffic

Referenced by command(), and recv().

◆ rx_probe_cnt

CounterMap UwMultiTrafficRangeCtr::rx_probe_cnt
protected

Number of probe pkts recv for each traffic

Referenced by command(), and recv().

◆ signaling_pktSize

int UwMultiTrafficRangeCtr::signaling_pktSize
protected

Signaling packet size

Referenced by checkRange(), recv(), and UwMultiTrafficRangeCtr().

◆ status

StatusMap UwMultiTrafficRangeCtr::status
protected

Map of status per traffic types

Referenced by checkRange(), getBestLowerLayer(), initStatus(), manageBuffer(), manageCheckedLayer(), and timerExpired().

◆ timers

std::map<int, UwCheckRangeTimer *> UwMultiTrafficRangeCtr::timers
private

Map of timer per traffic types

Referenced by checkRange(), manageCheckedLayer(), and timerExpired().

◆ tx_probe_ack_cnt

CounterMap UwMultiTrafficRangeCtr::tx_probe_ack_cnt
protected

Number of probe ACK pkts sent for each traffic

Referenced by command(), and recv().

◆ tx_probe_cnt

CounterMap UwMultiTrafficRangeCtr::tx_probe_cnt
protected

Number of probe pkts sent for each traffic

Referenced by checkRange(), and command().


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