Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122695799
updateackmab.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jul 21, 15:14
Size
4 KB
Mime Type
text/x-c++
Expires
Wed, Jul 23, 15:14 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27547436
Attached To
R6591 HyMAB
updateackmab.hh
View Options
#ifndef CLICK_UPDATEACKMAB_HH
#define CLICK_UPDATEACKMAB_HH
#include <clicknet/wifi.h>
#include <clicknet/ether.h>
#include <click/packet_anno.hh>
#include "hybridMAC.h"
#include <click/element.hh>
#include <click/notifier.hh>
#include <click/router.hh>
#include <click/confparse.hh>
#include <click/timer.hh>
#include <click/error.hh>
#include <click/etheraddress.hh>
#include <click/hashtable.hh>
#include <click/vector.hh>
#include <click/config.h>
#include <click/args.hh>
#include <click/string.hh>
#include <click/straccum.hh>
#include <elements/standard/fullnotequeue.hh>
#ifdef CLICK_USERLEVEL
#include "../elements/userlevel/todevice.hh"
#include "../elements/userlevel/fromdevice.hh"
#endif
#include "util.hh"
#include "measurementswifi.hh"
#include "measurementsplc.hh"
#include "neighbors.hh"
#include "makeburst.hh"
CLICK_DECLS
class
MeasurementsWifi
;
class
MeasurementsPLC
;
class
Neighbors
;
class
ToDevice
;
class
FromDevice
;
class
FullNoteQueue
;
/*
* class UpdateAckMab:
* Linked to a particular interface (PLC or Wifi): update the gamma fields of acks
*/
class
UpdateAckMab
:
public
Element
{
public
:
UpdateAckMab
();
~
UpdateAckMab
();
const
char
*
class_name
()
const
{
return
"UpdateAckMab"
;
}
const
char
*
port_count
()
const
{
return
"3/5"
;
}
// push input 0: messages from interface
// push input 1: messages from host
// push input 2: broadcast flow messages
// push output 0: messages to interface (to forward)
// push output 1: messages from host to interface (to forward without going through DstMab)
// push output 2: acks to local node
// push output 3: control message for PLC interface
// push output 4: broadcast flow messages
const
char
*
processing
()
const
{
return
PUSH
;
}
int
configure
(
Vector
<
String
>
&
,
ErrorHandler
*
);
int
initialize
(
ErrorHandler
*
);
void
push
(
int
,
Packet
*
);
void
run_timer
(
Timer
*
timer
);
// Handlers
void
add_handlers
();
static
int
bool_handler
(
const
String
&
,
Element
*
,
void
*
,
ErrorHandler
*
);
static
int
faifa_handler
(
const
String
&
,
Element
*
,
void
*
,
ErrorHandler
*
);
static
int
set_min_burst_handler
(
const
String
&
,
Element
*
,
void
*
,
ErrorHandler
*
);
void
set_debug
(
bool
b
)
{
_debug
=
b
;}
void
set_verb_debug
(
bool
b
)
{
_verb_debug
=
b
;
if
(
b
)
_debug
=
true
;}
void
set_faifa
(
bool
);
void
set_min_burst
(
uint32_t
m
)
{
_min_burst
=
m
;
if
(
_make_burst_elmt
)
_make_burst_elmt
->
set_burst
(
m
);}
void
clear
();
private
:
Timer
_timer
;
Timer
_nb_flows_timer
;
MeasurementsWifi
*
_measurements_wifi
;
MeasurementsPLC
*
_measurements_plc
;
Neighbors
*
_neighbors
;
FullNoteQueue
*
_queue_plc
;
FullNoteQueue
*
_queue_wifi
;
FullNoteQueue
*
_queue_plc_burst
;
FullNoteQueue
*
_queue_wifi_burst
;
MakeBurst
*
_make_burst_elmt
;
int
_min_burst
;
MakeBurst
*
_make_burst_wifi_elmt
;
int
_min_burst_wifi
;
MakeBurst
*
_make_burst_plc_elmt
;
int
_min_burst_plc
;
bool
_link_is_src
;
#ifdef CLICK_USERLEVEL
ToDevice
*
_td_wifi
;
ToDevice
*
_td_plc
;
FromDevice
*
_fd_moni
;
FromDevice
*
_fd_plc
;
#endif
bool
_burst_one
;
Timestamp
_now
;
Timestamp
_last_active
;
HashTable
<
uint16_t
,
HashTable
<
FormatedRoute
,
int
>
>
_control_message_received
;
HashTable
<
uint16_t
,
HashTable
<
FormatedRoute
,
int
>
>
_ack_printed
;
EtherAddress
_addr_wifi
;
EtherAddress
_addr_plc
;
HashTable
<
IntIdCouple
,
gamma_type
>
_current_busytime
;
HashTable
<
IntIdCouple
,
int
>
_busytime_computed
;
HashTable
<
IntIdCouple
,
gamma_type
>
_silent_busytime
;
HashTable
<
IntIdCouple
,
int
>
_silent_time_computed
;
HashTable
<
IntIdCouple
,
int
>
_initialized
;
HashTable
<
FormatedRoute
,
HashTable
<
uint16_t
,
Timestamp
>
>
_route_to_diff_ts
;
HashTable
<
FormatedRoute
,
HashTable
<
uint16_t
,
uint32_t
>
>
_route_to_rate
;
HashTable
<
FormatedRoute
,
HashTable
<
uint16_t
,
int
>
>
_is_diff_ts_ok
;
HashTable
<
FormatedRoute
,
uint16_t
>
_current_id
;
HashTable
<
uint32_t
,
FlowTuple
>
_flow_table_loc
;
HashTable
<
uint32_t
,
int
>
_flow_table_int1
;
HashTable
<
uint32_t
,
int
>
_flow_table_int2
;
HashTable
<
uint32_t
,
int
>
_flow_last_update
;
HashTable
<
FlowTuple
,
int
>
_is_exploring
;
HashTable
<
FlowTuple
,
int
>
_invalid_exploring
;
uint32_t
_current_hash_flow
;
int
_nb_flows_int1
;
int
_nb_flows_int2
;
// to handle new flows
int
_nb_flows_correction
;
Timestamp
_old_expiry
;
uint32_t
_new_flow_id
;
int
_flow_bdcst_freq
;
bool
_debug
;
bool
_verb_debug
;
void
set_bursts
(
bool
);
Measurements
*
get_measurements
(
EtherAddress
,
String
&
,
Interface
&
);
void
send_faifa_request
(
uint8_t
);
void
reset_queues
();
};
CLICK_ENDDECLS
#endif
Event Timeline
Log In to Comment