#include <uwmulti-traffic-control.h>
|
| virtual void | recvFromUpperLayers (Packet *p) |
| |
| virtual void | manageBuffer (int traffic) |
| |
| 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 | getBestLowerLayer (int traffic, Packet *p=NULL) |
| |
| 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 |
| |
Class used to represents the UwMultiTrafficControl layer of a node.
◆ UwMultiTrafficControl()
| UwMultiTrafficControl::UwMultiTrafficControl |
( |
| ) |
|
Constructor of UwMultiPhy class.
References debug_.
◆ ~UwMultiTrafficControl()
| virtual UwMultiTrafficControl::~UwMultiTrafficControl |
( |
| ) |
|
|
inlinevirtual |
Destructor of UwMultiPhy class.
◆ addLowLayerFromTag()
| bool UwMultiTrafficControl::addLowLayerFromTag |
( |
int |
traffic_id, |
|
|
const std::string & |
tag, |
|
|
int |
behavior |
|
) |
| |
|
protectedvirtual |
◆ addUpLayerFromTag()
| bool UwMultiTrafficControl::addUpLayerFromTag |
( |
int |
traffic_id, |
|
|
const std::string & |
tag |
|
) |
| |
|
protectedvirtual |
add an upper layer from the tag name in the map
- Parameters
-
| traffic | application traffic id |
| tag | tag of the upper module |
- Returns
- true if there is a valid layer associated to tag, false otherwise.
References debug_, and insertTraffic2UpLayer().
Referenced by command().
◆ command()
| int UwMultiTrafficControl::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
virtual |
◆ eraseTraffic2Low()
| void UwMultiTrafficControl::eraseTraffic2Low |
( |
int |
traffic | ) |
|
|
protectedvirtual |
remove the traffic from the lower layers matrix
- Parameters
-
| traffic | application traffic id |
References up_map.
◆ eraseTraffic2LowerLayer()
| void UwMultiTrafficControl::eraseTraffic2LowerLayer |
( |
int |
traffic, |
|
|
int |
lower_layer_stack |
|
) |
| |
|
protectedvirtual |
remove the behavior from the traffic lower layers matrix
- Parameters
-
| traffic | application traffic id |
| lower_layer_stack | lower layer stack id |
References down_map.
◆ eraseTraffic2Up()
| void UwMultiTrafficControl::eraseTraffic2Up |
( |
int |
traffic | ) |
|
|
protectedvirtual |
remove the traffic from the upper layers matrix
- Parameters
-
| traffic | application traffic id |
References up_map.
◆ getBestLowerLayer()
| int UwMultiTrafficControl::getBestLowerLayer |
( |
int |
traffic, |
|
|
Packet * |
p = NULL |
|
) |
| |
|
protectedvirtual |
◆ getDiscardedPacket()
| uint UwMultiTrafficControl::getDiscardedPacket |
( |
int |
traffic_id | ) |
const |
|
protectedvirtual |
get discarded packets
- Parameters
-
| traffic_id | application traffic id |
- Returns
- number of discarded packets for the given traffic id buffer)
References buffer_feature_map.
Referenced by command().
◆ getFromBuffer()
| Packet * UwMultiTrafficControl::getFromBuffer |
( |
int |
traffic | ) |
|
|
protectedvirtual |
◆ getUpperLayer()
| int UwMultiTrafficControl::getUpperLayer |
( |
int |
traffic | ) |
|
|
protectedvirtual |
return the Upper Layer id where to forward the received packet of traffic type
- Parameters
-
| traffic | application traffic id |
- Returns
- the layer id
References debug_, and up_map.
Referenced by recv().
◆ incrPktLoss()
| void UwMultiTrafficControl::incrPktLoss |
( |
int |
traffic_id | ) |
|
|
protectedvirtual |
Increment by 1 the number of lost packets for the given traffic
- Parameters
-
| traffic_id | application traffic id |
References buffer_feature_map.
Referenced by insertInBuffer().
◆ insertInBuffer()
| void UwMultiTrafficControl::insertInBuffer |
( |
Packet * |
p, |
|
|
int |
traffic |
|
) |
| |
|
protectedvirtual |
◆ insertTraffic2LowerLayer()
| void UwMultiTrafficControl::insertTraffic2LowerLayer |
( |
int |
traffic, |
|
|
int |
lower_layer_stack, |
|
|
int |
lower_layer_id, |
|
|
int |
behavior |
|
) |
| |
|
inlineprotected |
Set to which upper layer forward a specific kind of traffic received from the lower layers
- Parameters
-
| application | traffic id |
| lower_layer_stack | unique identifier of the lower layer stack |
| check_range | if TRUE follows the CHECK_RANGE behavior, else the ROBUST one |
References down_map.
Referenced by addLowLayerFromTag().
◆ insertTraffic2UpLayer()
| void UwMultiTrafficControl::insertTraffic2UpLayer |
( |
int |
traffic, |
|
|
int |
upper_layer_id |
|
) |
| |
|
inlineprotected |
Set to which upper layer forward a specific kind of traffic received from the lower layers
- Parameters
-
| traffic | application traffic id |
| upper_layer_id | unique identifier of the upper layer id |
References up_map.
Referenced by addUpLayerFromTag().
◆ manageBuffer()
| void UwMultiTrafficControl::manageBuffer |
( |
int |
traffic | ) |
|
|
protectedvirtual |
◆ recv()
| void UwMultiTrafficControl::recv |
( |
Packet * |
p | ) |
|
|
virtual |
◆ recvFromUpperLayers()
| void UwMultiTrafficControl::recvFromUpperLayers |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ removeFromBuffer()
| Packet * UwMultiTrafficControl::removeFromBuffer |
( |
int |
traffic | ) |
|
|
protectedvirtual |
◆ setBufferFeature()
| void UwMultiTrafficControl::setBufferFeature |
( |
int |
traffic_id, |
|
|
int |
max_size, |
|
|
bool |
is_circular, |
|
|
double |
send_down_delay = 0 |
|
) |
| |
|
protected |
◆ buffer_feature_map
◆ debug_
| int UwMultiTrafficControl::debug_ |
|
protected |
Flag to activate debug verbosity.
Referenced by addLowLayerFromTag(), addUpLayerFromTag(), UwMultiTrafficRangeCtr::checkRange(), getBestLowerLayer(), UwMultiTrafficRangeCtr::getBestLowerLayer(), getFromBuffer(), getUpperLayer(), insertInBuffer(), manageBuffer(), UwMultiTrafficRangeCtr::manageCheckedLayer(), recv(), UwMultiTrafficRangeCtr::recv(), recvFromUpperLayers(), removeFromBuffer(), setBufferFeature(), UwMultiTrafficRangeCtr::timerExpired(), and UwMultiTrafficControl().
◆ down_buffer
◆ down_map
◆ up_map
The documentation for this class was generated from the following files: