1 #ifndef _MADARA_QOS_TRANSPORT_SETTINGS_H_
2 #define _MADARA_QOS_TRANSPORT_SETTINGS_H_
18 #include "madara/MadaraExport.h"
28 #ifdef _MADARA_PYTHON_CALLBACKS_
29 #include <boost/python.hpp>
92 void add_send_filter(uint32_t types,
133 void add_receive_filter(uint32_t types,
168 void add_rebroadcast_filter(uint32_t types,
206 void add_receive_filter(uint32_t types, jobject&
object);
214 void add_send_filter(uint32_t types, jobject&
object);
223 void add_rebroadcast_filter(uint32_t types, jobject&
object);
231 void add_receive_filter(jobject&
object);
239 void add_send_filter(jobject&
object);
247 void add_rebroadcast_filter(jobject&
object);
258 #ifdef _MADARA_PYTHON_CALLBACKS_
267 void add_receive_filter(uint32_t types, boost::python::object&
object);
275 void add_send_filter(uint32_t types, boost::python::object&
object);
284 void add_rebroadcast_filter(uint32_t types, boost::python::object&
object);
292 void add_receive_filter(boost::python::object&
object);
300 void add_send_filter(boost::python::object&
object);
308 void add_rebroadcast_filter(boost::python::object&
object);
331 void clear_send_filters(uint32_t types);
336 void clear_send_aggregate_filters(
void);
342 void clear_receive_filters(uint32_t types);
347 void clear_buffer_filters(
void);
352 void clear_receive_aggregate_filters(
void);
358 void clear_rebroadcast_filters(uint32_t types);
363 void clear_rebroadcast_aggregate_filters(
void);
430 int filter_encode(
char* source,
int size,
int max_size)
const;
439 int filter_decode(
char* source,
int size,
int max_size)
const;
445 void print_num_filters_send(
void)
const;
451 void print_num_filters_receive(
void)
const;
457 void print_num_filters_rebroadcast(
void)
const;
465 void set_rebroadcast_ttl(
unsigned char ttl);
471 unsigned char get_rebroadcast_ttl(
void)
const;
477 size_t get_number_of_send_filtered_types(
void)
const;
483 size_t get_number_of_send_aggregate_filters(
void)
const;
490 size_t get_number_of_rebroadcast_aggregate_filters(
void)
const;
496 size_t get_number_of_rebroadcast_filtered_types(
void)
const;
502 size_t get_number_of_receive_aggregate_filters(
void)
const;
508 size_t get_number_of_receive_filtered_types(
void)
const;
514 size_t get_number_of_buffer_filters(
void)
const;
558 void enable_participant_ttl(
unsigned char maximum_ttl = 255);
566 unsigned char get_participant_ttl(
void)
const;
575 void update_drop_rate(
double drop_rate,
582 double get_drop_rate(
void)
const;
588 int get_drop_type(
void)
const;
594 uint64_t get_drop_burst(
void)
const;
600 void set_send_bandwidth_limit(int64_t bandwidth);
606 int64_t get_send_bandwidth_limit(
void)
const;
613 void set_total_bandwidth_limit(int64_t bandwidth);
620 int64_t get_total_bandwidth_limit(
void)
const;
629 void set_deadline(
double deadline);
635 double get_deadline(
void)
const;
650 virtual void load_text(
666 virtual void save_text(
const std::string& filename,
Abstract base class for implementing aggregate record filters via a functor interface.
Abstract base class for implementing buffer filters via a functor interface.
Abstract base class for implementing individual record filters via a functor interface.
Provides map of data types to a filter chain to apply to the data.
This class encapsulates an entry in a KnowledgeBase.
This class stores variables and their values for use by any entity needing state information in a thr...
Provides an interface for external functions into the MADARA KaRL variable settings.
Container for quality-of-service settings.
double packet_drop_rate_
Rate for dropping packets.
knowledge::KnowledgeRecordFilters receive_filters_
A container for receive filters.
unsigned char participant_rebroadcast_ttl_
This field is meant to limit the number of rebroadcasts that this transport will participate in.
std::map< std::string, int > trusted_peers_
A container of all trusted peers.
double deadline_
Deadline for packets at which packets drop.
int64_t max_send_bandwidth_
Maximum send bandwidth usage per second before packets drop.
knowledge::KnowledgeRecordFilters rebroadcast_filters_
A container for rebroadcast filters.
knowledge::KnowledgeRecordFilters send_filters_
A container for filters applied before sending from this host.
void add_filter(boost::python::object &object)
Adds a python buffer filter to the chain.
filters::BufferFilters buffer_filters_
buffer filters have an encode and decode method
unsigned char rebroadcast_ttl_
number of rebroadcasts for receivers to ultimately do.
std::map< std::string, int > banned_peers_
A container of all banned peers.
void add_filter(jobject &object)
Adds a Java buffer filter to the chain.
int64_t max_total_bandwidth_
Maximum bandwidth usage for the transport (receive/send) before drop.
uint64_t packet_drop_burst_
Burst of packet drops.
int packet_drop_type_
Drop rate type.
Provides context about the transport.
Holds basic transport settings.
std::list< BufferFilter * > BufferFilters
std::vector< KnowledgeRecord > FunctionArguments
::std::map< std::string, KnowledgeRecord > KnowledgeMap
PacketDropType
Enumeration for packet drop policy types.
@ PACKET_DROP_DETERMINISTIC
@ PACKET_DROP_PROBABLISTIC
Copyright(c) 2020 Galois.