38#ifndef UWMULTI_TRAFFIC_CONTROL_H
39#define UWMULTI_TRAFFIC_CONTROL_H
48#define HDR_UWMTR(P) (hdr_uwm_tr::access(P))
122 virtual int command(
int,
const char*
const*);
129 virtual void recv(Packet* p,
int idSrc);
137 virtual void sendDown(Packet* p,
double delay=0) {
if(p != NULL ) { Module::sendDown(p, delay); } }
146 virtual void sendDown(
int moduleId, Packet* p,
double delay=0) {
if(p != NULL ) { Module::sendDown(moduleId, p, delay); } }
186 virtual void manageCheckedLayer(
int module_id, uint8_t destAdd,
bool in_range,
int idSrc = 0);
243 virtual void expire(Event *e);
248 std::map <int, UwCheckRangeTimer*>
timers;
Class used to represents the UwMultiTrafficControl layer of a node.
Definition of timer class.
int num_expires
expires counter
int const max_increment
max increment of the timeout
virtual void expire(Event *e)
Timer expire procedure: handles the PROBE timeout.
UwCheckRangeTimer(UwMultiTrafficRangeCtr *m, int traff)
Class used to represents the UwMultiTrafficRangeCtr layer of a node.
virtual void manageCheckedLayer(int module_id, uint8_t destAdd, bool in_range, int idSrc=0)
procedure when a CHECKED stack is checked
virtual void manageBuffer(int traffic)
manage to tx a packet of traffic type
CounterMap rx_probe_ack_cnt
Number of probe ACK pkts recv for each traffic.
StatusMap status
Map of status per traffic types.
virtual void recv(Packet *p, int idSrc)
Handle a packet coming from upper layers.
CounterMap tx_probe_cnt
Number of probe pkts sent for each traffic.
void incrSignalingCounter(int traffic, CounterMap &map_cnt)
Incement number of signaling pkts sent for the given traffic.
virtual int command(int, const char *const *)
TCL command interpreter.
virtual void initStatus(int traffic)
default status initialization
CounterMap tx_probe_ack_cnt
Number of probe ACK pkts sent for each traffic.
int signaling_pktSize
Signaling packet size.
double check_to_period
Time-Out period.
uint getSignalingCounter(int traffic, const CounterMap &map_cnt) const
Return the number of signaling pkts sent for the given traffic.
UwMultiTrafficRangeCtr()
Constructor of UwMultiPhy class.
std::map< int, UwCheckRangeTimer * > timers
Map of timer per traffic types.
virtual void checkRange(int traffic, int module_id, uint8_t destAdd=UWIP_BROADCAST)
procedure to check if a
virtual void sendDown(Packet *p, double delay=0)
Send a packet to the module(s) of the bottom layers.
virtual void timerExpired(int traffic)
handle when a a timer expires
CounterMap rx_probe_cnt
Number of probe pkts recv for each traffic.
virtual int getBestLowerLayer(int traffic, Packet *p=NULL)
return the Best Lower Layer id where to forward the packet of traffic type
virtual void sendDown(int moduleId, Packet *p, double delay=0)
Send a packet to the requested module of the bottom layer.
virtual ~UwMultiTrafficRangeCtr()
Destructor of UwMultiPhy class.
std::set< int > module_ids
int tr_id_
Id of the traffic app layer.
static int offset_
Required by the PacketHeaderManager.
int & traffic()
Reference to the traffic ID.
static int & offset()
Reference to the offset_ variable.
static hdr_uwm_tr * access(const Packet *p)
Provides the UWIP packets header description. Definition of the class that define the network layer.
static const uint8_t UWIP_BROADCAST
Variable used to represent a broadcast UWIP.
packet_t PT_MULTI_TR_PROBE
std::map< int, uint > CounterMap
traffic, status
packet_t PT_MULTI_TR_PROBE_ACK
std::map< int, check_status > StatusMap