#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 void | addUpLayerFromTag (int traffic_id, std::string tag) |
|
virtual void | addLowLayerFromTag (int traffic_id, 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.
Definition at line 102 of file uwmulti-traffic-control.h.
◆ UwMultiTrafficControl()
UwMultiTrafficControl::UwMultiTrafficControl |
( |
| ) |
|
◆ ~UwMultiTrafficControl()
virtual UwMultiTrafficControl::~UwMultiTrafficControl |
( |
| ) |
|
|
inlinevirtual |
◆ addLowLayerFromTag()
void UwMultiTrafficControl::addLowLayerFromTag |
( |
int |
traffic_id, |
|
|
std::string |
tag, |
|
|
int |
behavior |
|
) |
| |
|
protectedvirtual |
add a lower layer from the tag name in the map
- Parameters
-
traffic | application traffic id |
tag | tag of the lower module |
behavior | behavior of the layer |
Definition at line 141 of file uwmulti-traffic-control.cc.
◆ addUpLayerFromTag()
void UwMultiTrafficControl::addUpLayerFromTag |
( |
int |
traffic_id, |
|
|
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 |
Definition at line 124 of file uwmulti-traffic-control.cc.
◆ command()
int UwMultiTrafficControl::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
virtual |
TCL command interpreter.
It implements the following OTcl methods:
- Parameters
-
argc | Number of arguments in argv. |
argv | Array 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 in UwMultiTrafficRangeCtr.
Definition at line 75 of file uwmulti-traffic-control.cc.
◆ eraseTraffic2Low()
void UwMultiTrafficControl::eraseTraffic2Low |
( |
int |
traffic | ) |
|
|
protectedvirtual |
remove the traffic from the lower layers matrix
- Parameters
-
traffic | application traffic id |
Definition at line 327 of file uwmulti-traffic-control.cc.
◆ 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 |
Definition at line 314 of file uwmulti-traffic-control.cc.
◆ eraseTraffic2Up()
void UwMultiTrafficControl::eraseTraffic2Up |
( |
int |
traffic | ) |
|
|
protectedvirtual |
remove the traffic from the upper layers matrix
- Parameters
-
traffic | application traffic id |
Definition at line 335 of file uwmulti-traffic-control.cc.
◆ 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)
Definition at line 369 of file uwmulti-traffic-control.cc.
◆ getFromBuffer()
Packet * UwMultiTrafficControl::getFromBuffer |
( |
int |
traffic | ) |
|
|
protectedvirtual |
get a packet of a certain type from the buffer and return it
- Parameters
-
traffic | application traffic id |
- Returns
- the pointer of the removed packet
Definition at line 268 of file uwmulti-traffic-control.cc.
◆ 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
Definition at line 302 of file uwmulti-traffic-control.cc.
◆ 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 |
Definition at line 357 of file uwmulti-traffic-control.cc.
◆ insertInBuffer()
void UwMultiTrafficControl::insertInBuffer |
( |
Packet * |
p, |
|
|
int |
traffic |
|
) |
| |
|
protectedvirtual |
insert a packet of a certain type in the buffer
- Parameters
-
p | pointer of the packet |
traffic | application traffic id |
Definition at line 190 of file uwmulti-traffic-control.cc.
◆ 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 |
Definition at line 201 of file uwmulti-traffic-control.h.
◆ 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 |
Definition at line 190 of file uwmulti-traffic-control.h.
◆ manageBuffer()
void UwMultiTrafficControl::manageBuffer |
( |
int |
traffic | ) |
|
|
protectedvirtual |
◆ recv()
void UwMultiTrafficControl::recv |
( |
Packet * |
p | ) |
|
|
virtual |
recv method.
It is called when a packet is received from the other layers
- Parameters
-
Packet* | Pointer to the packet that are going to be received |
Definition at line 160 of file uwmulti-traffic-control.cc.
◆ recvFromUpperLayers()
void UwMultiTrafficControl::recvFromUpperLayers |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ removeFromBuffer()
Packet * UwMultiTrafficControl::removeFromBuffer |
( |
int |
traffic | ) |
|
|
protectedvirtual |
remove a packet of a certain type from the buffer and return it
- Parameters
-
traffic | application traffic id |
- Returns
- the pointer of the removed packet
Definition at line 254 of file uwmulti-traffic-control.cc.
◆ setBufferFeature()
void UwMultiTrafficControl::setBufferFeature |
( |
int |
traffic_id, |
|
|
int |
max_size, |
|
|
bool |
is_circular, |
|
|
double |
send_down_delay = 0 |
|
) |
| |
|
protected |
set buffer features for the given traffic type
- Parameters
-
traffic_id | application traffic id |
max_size | maximum buffer size |
is_circular | true if buffer is circular, false otherwise (discard new) buffer) |
send_down_delay | delay used to send down packets |
Definition at line 343 of file uwmulti-traffic-control.cc.
◆ buffer_feature_map
◆ debug_
int UwMultiTrafficControl::debug_ |
|
protected |
◆ down_buffer
◆ down_map
◆ up_map
The documentation for this class was generated from the following files: