MADARA  3.4.1
madara::transport::QoSTransportSettings Class Reference

Container for quality-of-service settings. More...

#include <QoSTransportSettings.h>

Inheritance diagram for madara::transport::QoSTransportSettings:
madara::transport::TransportSettings

Public Types

typedef std::vector< std::string > Voters
 

Public Member Functions

 QoSTransportSettings ()
 Default constructor. More...
 
 QoSTransportSettings (const QoSTransportSettings &settings)
 Copy constructor. More...
 
 QoSTransportSettings (const TransportSettings &settings)
 Copy constructor. More...
 
virtual ~QoSTransportSettings ()
 Destructor. More...
 
void add_banned_peer (const std::string &peer)
 Adds a banned peer. More...
 
void add_filter (boost::python::object &object)
 Adds a python buffer filter to the chain. More...
 
void add_filter (filters::BufferFilter *filter)
 Adds a buffer filter to the chain. More...
 
void add_filter (jobject &object)
 Adds a Java buffer filter to the chain. More...
 
void add_host (const std::string &host)
 Safely add hosts to the settings. More...
 
void add_read_domain (const std::string &domain)
 Adds a read domain to the list of domains to read from. More...
 
void add_rebroadcast_filter (boost::python::object &object)
 Adds an aggregate filter for a map of variables to values after receiving and before rebroadcasting (if TTL > 0) More...
 
void add_rebroadcast_filter (filters::AggregateFilter *filter)
 Adds an aggregate update filter that will be applied before rebroadcasting, after individual record filters. More...
 
void add_rebroadcast_filter (jobject &object)
 Adds an aggregate filter for a map of variables to values after receiving and before rebroadcasting (if TTL > 0) More...
 
void add_rebroadcast_filter (uint32_t types, boost::python::object &object)
 Adds a filter that will be applied to certain types after receiving and before rebroadcasting (if TTL > 0) More...
 
void add_rebroadcast_filter (uint32_t types, filters::RecordFilter *filter)
 Adds a filter that will be applied to certain types after receiving and before rebroadcasting (if TTL > 0) More...
 
void add_rebroadcast_filter (uint32_t types, jobject &object)
 Adds a filter that will be applied to certain types after receiving and before rebroadcasting (if TTL > 0) More...
 
void add_rebroadcast_filter (uint32_t types, knowledge::KnowledgeRecord(*function)(knowledge::FunctionArguments &, knowledge::Variables &))
 Adds a filter that will be applied to certain types after receiving and before rebroadcasting (if TTL > 0) More...
 
void add_rebroadcast_filter (void(*function)(knowledge::KnowledgeMap &, const TransportContext &, knowledge::Variables &))
 Adds an aggregate update filter that will be applied before rebroadcasting, after individual record filters. More...
 
void add_receive_filter (boost::python::object &object)
 Adds an aggregate filter for a map of variables to values before applying updates to the KnowledgeBase. More...
 
void add_receive_filter (filters::AggregateFilter *filter)
 Adds an aggregate update filter that will be applied after receiving, after individual record filters. More...
 
void add_receive_filter (jobject &object)
 Adds an aggregate filter for a map of variables to values before applying updates to the KnowledgeBase. More...
 
void add_receive_filter (uint32_t types, boost::python::object &object)
 Adds a filter that will be applied to certain types after receiving and before applying updates to the KnowledgeBase. More...
 
void add_receive_filter (uint32_t types, filters::RecordFilter *filter)
 Adds a filter that will be applied to certain types after receiving. More...
 
void add_receive_filter (uint32_t types, jobject &object)
 Adds a filter that will be applied to certain types after receiving and before applying updates to the KnowledgeBase. More...
 
void add_receive_filter (uint32_t types, knowledge::KnowledgeRecord(*function)(knowledge::FunctionArguments &, knowledge::Variables &))
 Adds a filter that will be applied to certain types after receiving and before applying to the local knowledge base. More...
 
void add_receive_filter (void(*function)(knowledge::KnowledgeMap &, const TransportContext &, knowledge::Variables &))
 Adds an aggregate update filter that will be applied after receiving, after individual record filters. More...
 
void add_send_filter (boost::python::object &object)
 Adds an aggregate filter for a map of variables to values before sending. More...
 
void add_send_filter (filters::AggregateFilter *filter)
 Adds an aggregate update filter that will be applied before sending, after individual record filters. More...
 
void add_send_filter (jobject &object)
 Adds an aggregate filter for a map of variables to values before sending. More...
 
void add_send_filter (uint32_t types, boost::python::object &object)
 Adds a filter that will be applied to certain types before sending. More...
 
void add_send_filter (uint32_t types, filters::RecordFilter *filter)
 Adds a filter that will be applied to certain types before sending. More...
 
void add_send_filter (uint32_t types, jobject &object)
 Adds a filter that will be applied to certain types before sending. More...
 
void add_send_filter (uint32_t types, knowledge::KnowledgeRecord(*function)(knowledge::FunctionArguments &, knowledge::Variables &))
 Adds a filter that will be applied to certain types before sending. More...
 
void add_send_filter (void(*function)(knowledge::KnowledgeMap &, const TransportContext &, knowledge::Variables &))
 Adds an aggregate update filter that will be applied before sending, after individual record filters. More...
 
void add_trusted_peer (const std::string &peer)
 Adds a trusted peer. More...
 
void attach (knowledge::ThreadSafeContext *context)
 Attaches a context to the various filtering systems. More...
 
void clear_buffer_filters (void)
 Clears the list of buffer filters. More...
 
void clear_hosts (void)
 Safely clears hosts from the settings. More...
 
void clear_read_domains (void)
 Clears the list of read domains. More...
 
void clear_rebroadcast_aggregate_filters (void)
 Clears the list of rebroadcast time aggregate filters. More...
 
void clear_rebroadcast_filters (uint32_t types)
 Clears the list of filters for the specified types. More...
 
void clear_receive_aggregate_filters (void)
 Clears the list of receive time aggregate filters. More...
 
void clear_receive_filters (uint32_t types)
 Clears the list of filters for the specified types. More...
 
void clear_send_aggregate_filters (void)
 Clears the list of send time aggregate filters. More...
 
void clear_send_filters (uint32_t types)
 Clears the list of filters for the specified types. More...
 
void debug_to_kb (const std::string &prefix=".transport")
 Requests all debugging for threads go into the data plane KB instead of the control plane. More...
 
void enable_participant_ttl (unsigned char maximum_ttl=255)
 Enables rebroadcast support up to a certain time to live for other agent's messages. More...
 
int filter_decode (char *source, int size, int max_size) const
 Calls decode on the the buffer filter chain. More...
 
int filter_encode (char *source, int size, int max_size) const
 Calls encode on the the buffer filter chain. More...
 
knowledge::KnowledgeRecord filter_rebroadcast (const madara::knowledge::KnowledgeRecord &input, const std::string &name, transport::TransportContext &context) const
 Filters an input according to the rebroadcast filter chain. More...
 
void filter_rebroadcast (knowledge::KnowledgeMap &records, const transport::TransportContext &transport_context) const
 Filters aggregate records according to the rebroadcast filter chain. More...
 
knowledge::KnowledgeRecord filter_receive (const madara::knowledge::KnowledgeRecord &input, const std::string &name, transport::TransportContext &context) const
 Filters an input according to the receive filter chain. More...
 
void filter_receive (knowledge::KnowledgeMap &records, const transport::TransportContext &transport_context) const
 Filters aggregate records according to the receive filter chain. More...
 
knowledge::KnowledgeRecord filter_send (const madara::knowledge::KnowledgeRecord &input, const std::string &name, transport::TransportContext &context) const
 Filters an input according to send's filter chain. More...
 
void filter_send (knowledge::KnowledgeMap &records, const transport::TransportContext &transport_context) const
 Filters aggregate records according to the send filter chain. More...
 
double get_deadline (void) const
 Returns the latency deadline in seconds. More...
 
uint64_t get_drop_burst (void) const
 Returns the bursts of packet drops. More...
 
double get_drop_rate (void) const
 Returns the percentage of dropped packets to enforce on sends. More...
 
int get_drop_type (void) const
 Returns the policy type for packet drops. More...
 
size_t get_number_of_buffer_filters (void) const
 Returns the number of buffer filters. More...
 
size_t get_number_of_rebroadcast_aggregate_filters (void) const
 Returns the number of aggregate filters applied before rebroadcasting @ return the number of aggregate filters. More...
 
size_t get_number_of_rebroadcast_filtered_types (void) const
 Returns the number of types that are filtered before rebroadcast. More...
 
size_t get_number_of_receive_aggregate_filters (void) const
 Returns the number of aggregate filters applied after receiving @ return the number of aggregate filters. More...
 
size_t get_number_of_receive_filtered_types (void) const
 Returns the number of types that are filtered after received. More...
 
size_t get_number_of_send_aggregate_filters (void) const
 Returns the number of aggregate filters applied before sending @ return the number of aggregate filters. More...
 
size_t get_number_of_send_filtered_types (void) const
 Returns the number of types that are filtered before send. More...
 
unsigned char get_participant_ttl (void) const
 Returns the maximum time to live participation of this transport in rebroadcasting of other agent's messages. More...
 
void get_read_domains (std::vector< std::string > &domains) const
 Retrieves the list of read domains. More...
 
unsigned char get_rebroadcast_ttl (void) const
 Gets the time to live for rebroadcasting (number of rebroadcasts per message). More...
 
int64_t get_send_bandwidth_limit (void) const
 Returns the limit for sending on this transport in bytes per second. More...
 
int64_t get_total_bandwidth_limit (void) const
 Returns the total limit for this transport in bytes per second. More...
 
bool is_reading_domain (const std::string domain) const
 Checks if a domain is in the domain read list. More...
 
bool is_trusted (const std::string &peer) const
 Checks if a peer is trusted. More...
 
virtual void load (const std::string &filename, const std::string &prefix="transport")
 Loads the settings from a binary file. More...
 
virtual void load_text (const std::string &filename, const std::string &prefix="transport")
 Loads the settings from a text file. More...
 
size_t num_read_domains (void) const
 Returns the number of read domains. More...
 
void operator= (const QoSTransportSettings &settings)
 Assignment operator. More...
 
void operator= (const TransportSettings &settings)
 Assignment operator. More...
 
void print_num_filters_rebroadcast (void) const
 Prints the number of filters chained for each type to the rebroadcast filter. More...
 
void print_num_filters_receive (void) const
 Prints the number of filters chained for each type to the receive filter. More...
 
void print_num_filters_send (void) const
 Prints the number of filters chained for each type to the send filter. More...
 
bool remove_banned_peer (const std::string &peer)
 Removes a trusted peer, if it exists in the list. More...
 
bool remove_trusted_peer (const std::string &peer)
 Removes a trusted peer, if it exists in the list. More...
 
virtual void save (const std::string &filename, const std::string &prefix="transport") const
 Saves the settings from a binary file. More...
 
virtual void save_text (const std::string &filename, const std::string &prefix="transport") const
 Saves the settings from a text file. More...
 
void set_deadline (double deadline)
 Sets the packet deadline in seconds. More...
 
void set_rebroadcast_ttl (unsigned char ttl)
 Sets the time to live for our packets. More...
 
void set_send_bandwidth_limit (int64_t bandwidth)
 Sets a bandwidth limit for sending on this transport in bytes per sec. More...
 
void set_total_bandwidth_limit (int64_t bandwidth)
 Sets a bandwidth limit for receiving and sending over the transport. More...
 
void update_drop_rate (double drop_rate, int drop_type=PACKET_DROP_DETERMINISTIC, uint64_t drop_burst=1)
 Updates a packet drop rate, type, and burst. More...
 

Public Attributes

std::string debug_to_kb_prefix = ""
 if not empty, save debug information to knowledge base at prefix More...
 
bool delay_launch = false
 Delay launching transports until explicit activate call. More...
 
OriginatorFragmentMap fragment_map
 Map of fragments received by originator. More...
 
uint32_t fragment_queue_length = 100
 Indicates queue length for holding clock-keyed fragments. More...
 
std::vector< std::string > hosts
 Host information for transports that require it. More...
 
uint32_t id = 0
 The id of this process (DEPRECATED). You do not need to set this. More...
 
uint32_t max_fragment_size = 62000
 Maximum allowed fragment size for partitioning large messages. More...
 
double max_send_hertz = 0.0
 Maximum rate of sending messages. More...
 
bool never_exit = false
 Prevent MADARA from exiting on fatal errors and invalid state. More...
 
bool no_receiving = false
 if true, never receive over transport More...
 
bool no_sending = false
 if true, never send over transport More...
 
std::string on_data_received_logic
 Logic to be evaluated after every successful update. More...
 
uint32_t processes = 1
 Number of processes (DEPRECATED). You do not need to set this. More...
 
uint32_t queue_length = DEFAULT_QUEUE_LENGTH
 Length of the buffer used to store history of events. More...
 
double read_thread_hertz = 1000.0
 Number of valid messages allowed to be received per second. More...
 
uint32_t read_threads = 1
 the number of read threads to start More...
 
uint32_t reliability = DEFAULT_RELIABILITY
 Reliability required of the transport. More...
 
int resend_attempts = 10
 Maximum number of attempts to resend if transport is busy. More...
 
bool send_history = false
 if true, send all updates since last send, for records that have history enabled (if the history capacity was exceeded since last send, the oldest updates are lost). More...
 
bool send_reduced_message_header = false
 Send a reduced message header (clock, size, updates, KaRL id) More...
 
double slack_time = 0
 Time to sleep between sends and rebroadcasts. More...
 
uint32_t type = DEFAULT_TRANSPORT
 Type of transport. See madara::transport::Types for options. More...
 
std::string write_domain = "KaRL"
 All class members are accessible to users for easy setup. More...
 

Static Public Attributes

static const uint32_t DEFAULT_DEADLINE = 0
 Default deadline. More...
 
static const uint32_t DEFAULT_QUEUE_LENGTH = 500000
 Default queue length for event history (must be high for reliable transport. More...
 
static const uint32_t DEFAULT_RELIABILITY = RELIABLE
 Default reliability. More...
 
static const uint32_t DEFAULT_TRANSPORT = NO_TRANSPORT
 Default transport. More...
 

Private Attributes

std::map< std::string, int > banned_peers_
 A container of all banned peers. More...
 
filters::BufferFilters buffer_filters_
 buffer filters have an encode and decode method More...
 
double deadline_
 Deadline for packets at which packets drop. More...
 
int64_t max_send_bandwidth_
 Maximum send bandwidth usage per second before packets drop. More...
 
int64_t max_total_bandwidth_
 Maximum bandwidth usage for the transport (receive/send) before drop. More...
 
uint64_t packet_drop_burst_
 Burst of packet drops. More...
 
double packet_drop_rate_
 Rate for dropping packets. More...
 
int packet_drop_type_
 Drop rate type. More...
 
unsigned char participant_rebroadcast_ttl_
 This field is meant to limit the number of rebroadcasts that this transport will participate in. More...
 
std::map< std::string, int > read_domains_
 Any acceptable read domain is added here. More...
 
knowledge::KnowledgeRecordFilters rebroadcast_filters_
 A container for rebroadcast filters. More...
 
unsigned char rebroadcast_ttl_
 number of rebroadcasts for receivers to ultimately do. More...
 
knowledge::KnowledgeRecordFilters receive_filters_
 A container for receive filters. More...
 
knowledge::KnowledgeRecordFilters send_filters_
 A container for filters applied before sending from this host. More...
 
std::map< std::string, int > trusted_peers_
 A container of all trusted peers. More...
 

Detailed Description

Container for quality-of-service settings.

Definition at line 49 of file QoSTransportSettings.h.

Member Typedef Documentation

◆ Voters

typedef std::vector<std::string> madara::transport::TransportSettings::Voters
inherited

Definition at line 88 of file TransportSettings.h.

Constructor & Destructor Documentation

◆ QoSTransportSettings() [1/3]

madara::transport::QoSTransportSettings::QoSTransportSettings ( )

Default constructor.

Definition at line 11 of file QoSTransportSettings.cpp.

◆ QoSTransportSettings() [2/3]

madara::transport::QoSTransportSettings::QoSTransportSettings ( const QoSTransportSettings settings)

Copy constructor.

Parameters
settingsthe settings to copy from

Definition at line 25 of file QoSTransportSettings.cpp.

◆ QoSTransportSettings() [3/3]

madara::transport::QoSTransportSettings::QoSTransportSettings ( const TransportSettings settings)

Copy constructor.

Parameters
settingsthe settings to copy from

Definition at line 45 of file QoSTransportSettings.cpp.

◆ ~QoSTransportSettings()

madara::transport::QoSTransportSettings::~QoSTransportSettings ( )
virtual

Destructor.

Definition at line 83 of file QoSTransportSettings.cpp.

Member Function Documentation

◆ add_banned_peer()

void madara::transport::QoSTransportSettings::add_banned_peer ( const std::string &  peer)

Adds a banned peer.

By default, all peers are trusted unless a trusted peer or banned peer is added to the settings.

Parameters
peerpeer to add (generally ip:port)

Definition at line 172 of file QoSTransportSettings.cpp.

◆ add_filter() [1/3]

void madara::transport::QoSTransportSettings::add_filter ( boost::python::object &  object)

Adds a python buffer filter to the chain.

Parameters
objecta python callback that takes in a list of args and the Variables interface.

◆ add_filter() [2/3]

void madara::transport::QoSTransportSettings::add_filter ( filters::BufferFilter filter)

Adds a buffer filter to the chain.

Parameters
filteran instance of a buffer filter

Definition at line 259 of file QoSTransportSettings.cpp.

◆ add_filter() [3/3]

void madara::transport::QoSTransportSettings::add_filter ( jobject &  object)

Adds a Java buffer filter to the chain.

Parameters
objecta java callback that takes in a list of args and the Variables interface.

◆ add_host()

void madara::transport::TransportSettings::add_host ( const std::string &  host)
inherited

Safely add hosts to the settings.

If you are unsure if the user application and the library will be compiled with the same STL implementation for strings and vectors, this function combined with the clear_hosts function are safe ways to force the MADARA library to contain the full implementations of deallocation.

Parameters
hosthost to add to the list

Definition at line 139 of file TransportSettings.cpp.

◆ add_read_domain()

void madara::transport::TransportSettings::add_read_domain ( const std::string &  domain)
inlineinherited

Adds a read domain to the list of domains to read from.

Parameters
domaindomain to add to the read list

Definition at line 13 of file TransportSettings.inl.

◆ add_rebroadcast_filter() [1/8]

void madara::transport::QoSTransportSettings::add_rebroadcast_filter ( boost::python::object &  object)

Adds an aggregate filter for a map of variables to values after receiving and before rebroadcasting (if TTL > 0)

Parameters
objecta python callback that takes in a list of args and the Variables interface.

Definition at line 386 of file QoSTransportSettings.cpp.

◆ add_rebroadcast_filter() [2/8]

void madara::transport::QoSTransportSettings::add_rebroadcast_filter ( filters::AggregateFilter filter)

Adds an aggregate update filter that will be applied before rebroadcasting, after individual record filters.

Parameters
filteran instance of an aggregate record filter that will be managed by the underlying infrastructure

Definition at line 305 of file QoSTransportSettings.cpp.

◆ add_rebroadcast_filter() [3/8]

void madara::transport::QoSTransportSettings::add_rebroadcast_filter ( jobject &  object)

Adds an aggregate filter for a map of variables to values after receiving and before rebroadcasting (if TTL > 0)

Parameters
objecta java callback that takes in a list of args and the Variables interface.

Definition at line 346 of file QoSTransportSettings.cpp.

◆ add_rebroadcast_filter() [4/8]

void madara::transport::QoSTransportSettings::add_rebroadcast_filter ( uint32_t  types,
boost::python::object &  object 
)

Adds a filter that will be applied to certain types after receiving and before rebroadcasting (if TTL > 0)

Parameters
typesthe types to add the filter to
objecta python callback that takes in a list of args and the Variables interface.

Definition at line 368 of file QoSTransportSettings.cpp.

◆ add_rebroadcast_filter() [5/8]

void madara::transport::QoSTransportSettings::add_rebroadcast_filter ( uint32_t  types,
filters::RecordFilter filter 
)

Adds a filter that will be applied to certain types after receiving and before rebroadcasting (if TTL > 0)

Parameters
typesthe types to add the filter to
filteran instance of an individual record filter that will be managed by the underlying infrastructure

Definition at line 292 of file QoSTransportSettings.cpp.

◆ add_rebroadcast_filter() [6/8]

void madara::transport::QoSTransportSettings::add_rebroadcast_filter ( uint32_t  types,
jobject &  object 
)

Adds a filter that will be applied to certain types after receiving and before rebroadcasting (if TTL > 0)

Parameters
typesthe types to add the filter to
objecta java callback that takes in a list of args and the Variables interface.

Definition at line 329 of file QoSTransportSettings.cpp.

◆ add_rebroadcast_filter() [7/8]

void madara::transport::QoSTransportSettings::add_rebroadcast_filter ( uint32_t  types,
knowledge::KnowledgeRecord(*)(knowledge::FunctionArguments &, knowledge::Variables &)  function 
)

Adds a filter that will be applied to certain types after receiving and before rebroadcasting (if TTL > 0)

Parameters
typesthe types to add the filter to
functionthe function that will take the knowledge record in FunctionArguments.

Definition at line 285 of file QoSTransportSettings.cpp.

◆ add_rebroadcast_filter() [8/8]

void madara::transport::QoSTransportSettings::add_rebroadcast_filter ( void(*)(knowledge::KnowledgeMap &, const TransportContext &, knowledge::Variables &)  function)

Adds an aggregate update filter that will be applied before rebroadcasting, after individual record filters.

Parameters
functionan aggregate update filter

Definition at line 298 of file QoSTransportSettings.cpp.

◆ add_receive_filter() [1/8]

void madara::transport::QoSTransportSettings::add_receive_filter ( boost::python::object &  object)

Adds an aggregate filter for a map of variables to values before applying updates to the KnowledgeBase.

Parameters
objecta python callback that takes in a list of args and the Variables interface.

Definition at line 374 of file QoSTransportSettings.cpp.

◆ add_receive_filter() [2/8]

void madara::transport::QoSTransportSettings::add_receive_filter ( filters::AggregateFilter filter)

Adds an aggregate update filter that will be applied after receiving, after individual record filters.

Parameters
filteran instance of an aggregate record filter that will be managed by the underlying infrastructure

Definition at line 253 of file QoSTransportSettings.cpp.

◆ add_receive_filter() [3/8]

void madara::transport::QoSTransportSettings::add_receive_filter ( jobject &  object)

Adds an aggregate filter for a map of variables to values before applying updates to the KnowledgeBase.

Parameters
objecta java callback that takes in a list of args and the Variables interface.

Definition at line 335 of file QoSTransportSettings.cpp.

◆ add_receive_filter() [4/8]

void madara::transport::QoSTransportSettings::add_receive_filter ( uint32_t  types,
boost::python::object &  object 
)

Adds a filter that will be applied to certain types after receiving and before applying updates to the KnowledgeBase.

Parameters
typesthe types to add the filter to
objecta python callback that takes in a list of args and the Variables interface.

Definition at line 356 of file QoSTransportSettings.cpp.

◆ add_receive_filter() [5/8]

void madara::transport::QoSTransportSettings::add_receive_filter ( uint32_t  types,
filters::RecordFilter filter 
)

Adds a filter that will be applied to certain types after receiving.

Parameters
typesthe types to add the filter to
filteran instance of an individual record filter that will be managed by the underlying infrastructure

Definition at line 272 of file QoSTransportSettings.cpp.

◆ add_receive_filter() [6/8]

void madara::transport::QoSTransportSettings::add_receive_filter ( uint32_t  types,
jobject &  object 
)

Adds a filter that will be applied to certain types after receiving and before applying updates to the KnowledgeBase.

Parameters
typesthe types to add the filter to
objecta java callback that takes in a list of args and the Variables interface.

Definition at line 313 of file QoSTransportSettings.cpp.

◆ add_receive_filter() [7/8]

void madara::transport::QoSTransportSettings::add_receive_filter ( uint32_t  types,
knowledge::KnowledgeRecord(*)(knowledge::FunctionArguments &, knowledge::Variables &)  function 
)

Adds a filter that will be applied to certain types after receiving and before applying to the local knowledge base.

Parameters
typesthe types to add the filter to
functionthe function that will take the knowledge record in FunctionArguments.

Definition at line 265 of file QoSTransportSettings.cpp.

◆ add_receive_filter() [8/8]

void madara::transport::QoSTransportSettings::add_receive_filter ( void(*)(knowledge::KnowledgeMap &, const TransportContext &, knowledge::Variables &)  function)

Adds an aggregate update filter that will be applied after receiving, after individual record filters.

Parameters
functionan aggregate update filter

Definition at line 278 of file QoSTransportSettings.cpp.

◆ add_send_filter() [1/8]

void madara::transport::QoSTransportSettings::add_send_filter ( boost::python::object &  object)

Adds an aggregate filter for a map of variables to values before sending.

Parameters
objecta python callback that takes in a list of args and the Variables interface.

Definition at line 380 of file QoSTransportSettings.cpp.

◆ add_send_filter() [2/8]

void madara::transport::QoSTransportSettings::add_send_filter ( filters::AggregateFilter filter)

Adds an aggregate update filter that will be applied before sending, after individual record filters.

Parameters
filteran instance of an aggregate record filter that will be managed by the underlying infrastructure

Definition at line 247 of file QoSTransportSettings.cpp.

◆ add_send_filter() [3/8]

void madara::transport::QoSTransportSettings::add_send_filter ( jobject &  object)

Adds an aggregate filter for a map of variables to values before sending.

Parameters
objecta java callback that takes in a list of args and the Variables interface.

Definition at line 341 of file QoSTransportSettings.cpp.

◆ add_send_filter() [4/8]

void madara::transport::QoSTransportSettings::add_send_filter ( uint32_t  types,
boost::python::object &  object 
)

Adds a filter that will be applied to certain types before sending.

Parameters
typesthe types to add the filter to
objecta python callback that takes in a list of args and the Variables interface.

Definition at line 362 of file QoSTransportSettings.cpp.

◆ add_send_filter() [5/8]

void madara::transport::QoSTransportSettings::add_send_filter ( uint32_t  types,
filters::RecordFilter filter 
)

Adds a filter that will be applied to certain types before sending.

Parameters
typesthe types to add the filter to
filteran instance of an individual record filter that will be managed by the underlying infrastructure

Definition at line 235 of file QoSTransportSettings.cpp.

◆ add_send_filter() [6/8]

void madara::transport::QoSTransportSettings::add_send_filter ( uint32_t  types,
jobject &  object 
)

Adds a filter that will be applied to certain types before sending.

Parameters
typesthe types to add the filter to
objecta java callback that takes in a list of args and the Variables interface.

Definition at line 323 of file QoSTransportSettings.cpp.

◆ add_send_filter() [7/8]

void madara::transport::QoSTransportSettings::add_send_filter ( uint32_t  types,
knowledge::KnowledgeRecord(*)(knowledge::FunctionArguments &, knowledge::Variables &)  function 
)

Adds a filter that will be applied to certain types before sending.

Parameters
typesthe types to add the filter to
functionthe function that will take the knowledge record in FunctionArguments.

Definition at line 228 of file QoSTransportSettings.cpp.

◆ add_send_filter() [8/8]

void madara::transport::QoSTransportSettings::add_send_filter ( void(*)(knowledge::KnowledgeMap &, const TransportContext &, knowledge::Variables &)  function)

Adds an aggregate update filter that will be applied before sending, after individual record filters.

Parameters
functionan aggregate update filter

Definition at line 241 of file QoSTransportSettings.cpp.

◆ add_trusted_peer()

void madara::transport::QoSTransportSettings::add_trusted_peer ( const std::string &  peer)

Adds a trusted peer.

By default, all peers are trusted unless a trusted peer or banned peer is added to the settings.

Parameters
peerpeer to add (generally ip:port)

Definition at line 165 of file QoSTransportSettings.cpp.

◆ attach()

void madara::transport::QoSTransportSettings::attach ( knowledge::ThreadSafeContext context)

Attaches a context to the various filtering systems.

If the context ever goes out of scope, a 0 should be passed into this function to the context.

Parameters
contextcontext to be used for Variable lookups

Definition at line 394 of file QoSTransportSettings.cpp.

◆ clear_buffer_filters()

void madara::transport::QoSTransportSettings::clear_buffer_filters ( void  )

Clears the list of buffer filters.

Definition at line 429 of file QoSTransportSettings.cpp.

◆ clear_hosts()

void madara::transport::TransportSettings::clear_hosts ( void  )
inherited

Safely clears hosts from the settings.

If you are unsure if the user application and the library will be compiled with the same STL implementation for strings and vectors, this function provides a safe way to clear the vector of strings.

Definition at line 145 of file TransportSettings.cpp.

◆ clear_read_domains()

void madara::transport::TransportSettings::clear_read_domains ( void  )
inlineinherited

Clears the list of read domains.

Definition at line 19 of file TransportSettings.inl.

◆ clear_rebroadcast_aggregate_filters()

void madara::transport::QoSTransportSettings::clear_rebroadcast_aggregate_filters ( void  )

Clears the list of rebroadcast time aggregate filters.

Definition at line 434 of file QoSTransportSettings.cpp.

◆ clear_rebroadcast_filters()

void madara::transport::QoSTransportSettings::clear_rebroadcast_filters ( uint32_t  types)

Clears the list of filters for the specified types.

Parameters
typesthe types to clear the filters of

Definition at line 423 of file QoSTransportSettings.cpp.

◆ clear_receive_aggregate_filters()

void madara::transport::QoSTransportSettings::clear_receive_aggregate_filters ( void  )

Clears the list of receive time aggregate filters.

Definition at line 418 of file QoSTransportSettings.cpp.

◆ clear_receive_filters()

void madara::transport::QoSTransportSettings::clear_receive_filters ( uint32_t  types)

Clears the list of filters for the specified types.

Parameters
typesthe types to clear the filters of

Definition at line 412 of file QoSTransportSettings.cpp.

◆ clear_send_aggregate_filters()

void madara::transport::QoSTransportSettings::clear_send_aggregate_filters ( void  )

Clears the list of send time aggregate filters.

Definition at line 407 of file QoSTransportSettings.cpp.

◆ clear_send_filters()

void madara::transport::QoSTransportSettings::clear_send_filters ( uint32_t  types)

Clears the list of filters for the specified types.

Parameters
typesthe types to clear the filters of

Definition at line 402 of file QoSTransportSettings.cpp.

◆ debug_to_kb()

void madara::transport::TransportSettings::debug_to_kb ( const std::string &  prefix = ".transport")
inlineinherited

Requests all debugging for threads go into the data plane KB instead of the control plane.

This will impact performance of your main knowledge base, so you should use it sparingly, if possible.

Parameters
prefixprefix to save debug info into data plane KB

Definition at line 24 of file TransportSettings.inl.

◆ enable_participant_ttl()

void madara::transport::QoSTransportSettings::enable_participant_ttl ( unsigned char  maximum_ttl = 255)

Enables rebroadcast support up to a certain time to live for other agent's messages.

Default is 0 (no participation in rebroadcasts)

Parameters
maximum_ttlMaximum time to live to support (0 for not participating in rebroadcasts). A transport cannot participate in more than 255 resends.

Definition at line 153 of file QoSTransportSettings.cpp.

◆ filter_decode()

int madara::transport::QoSTransportSettings::filter_decode ( char *  source,
int  size,
int  max_size 
) const

Calls decode on the the buffer filter chain.

Parameters
sourcethe source and destination buffer
sizethe amount of data in the buffer in bytes
max_sizethe amount of bytes the buffer can hold
Returns
the new size after encoding

Definition at line 507 of file QoSTransportSettings.cpp.

◆ filter_encode()

int madara::transport::QoSTransportSettings::filter_encode ( char *  source,
int  size,
int  max_size 
) const

Calls encode on the the buffer filter chain.

Parameters
sourcethe source and destination buffer
sizethe amount of data in the buffer in bytes
max_sizethe amount of bytes the buffer can hold
Returns
the new size after encoding
Exceptions
exceptions::MemoryExceptionif max_size is not big enough

Definition at line 455 of file QoSTransportSettings.cpp.

◆ filter_rebroadcast() [1/2]

madara::knowledge::KnowledgeRecord madara::transport::QoSTransportSettings::filter_rebroadcast ( const madara::knowledge::KnowledgeRecord input,
const std::string &  name,
transport::TransportContext context 
) const

Filters an input according to the rebroadcast filter chain.

Parameters
inputthe argument to the filter chain
namevariable name of input ("" for unnamed)
contextthe context of the transport
Returns
the result of filtering the input

Definition at line 662 of file QoSTransportSettings.cpp.

◆ filter_rebroadcast() [2/2]

void madara::transport::QoSTransportSettings::filter_rebroadcast ( knowledge::KnowledgeMap records,
const transport::TransportContext transport_context 
) const

Filters aggregate records according to the rebroadcast filter chain.

Parameters
recordsthe aggregate record map
transport_contextthe context of the transport

Definition at line 669 of file QoSTransportSettings.cpp.

◆ filter_receive() [1/2]

madara::knowledge::KnowledgeRecord madara::transport::QoSTransportSettings::filter_receive ( const madara::knowledge::KnowledgeRecord input,
const std::string &  name,
transport::TransportContext context 
) const

Filters an input according to the receive filter chain.

Parameters
inputthe argument to the filter chain
namevariable name of input ("" for unnamed)
contextthe context of the transport
Returns
the result of filtering the input

Definition at line 647 of file QoSTransportSettings.cpp.

◆ filter_receive() [2/2]

void madara::transport::QoSTransportSettings::filter_receive ( knowledge::KnowledgeMap records,
const transport::TransportContext transport_context 
) const

Filters aggregate records according to the receive filter chain.

Parameters
recordsthe aggregate record map
transport_contextthe context of the transport

Definition at line 654 of file QoSTransportSettings.cpp.

◆ filter_send() [1/2]

madara::knowledge::KnowledgeRecord madara::transport::QoSTransportSettings::filter_send ( const madara::knowledge::KnowledgeRecord input,
const std::string &  name,
transport::TransportContext context 
) const

Filters an input according to send's filter chain.

Parameters
inputthe argument to the filter chain
namevariable name of input ("" for unnamed)
contextthe context of the transport
Returns
the result of filtering the input

Definition at line 441 of file QoSTransportSettings.cpp.

◆ filter_send() [2/2]

void madara::transport::QoSTransportSettings::filter_send ( knowledge::KnowledgeMap records,
const transport::TransportContext transport_context 
) const

Filters aggregate records according to the send filter chain.

Parameters
recordsthe aggregate record map
transport_contextthe context of the transport

Definition at line 448 of file QoSTransportSettings.cpp.

◆ get_deadline()

double madara::transport::QoSTransportSettings::get_deadline ( void  ) const

Returns the latency deadline in seconds.

-1 means no deadline.

Returns
deadline in seconds

Definition at line 790 of file QoSTransportSettings.cpp.

◆ get_drop_burst()

uint64_t madara::transport::QoSTransportSettings::get_drop_burst ( void  ) const

Returns the bursts of packet drops.

Returns
the consecutive bursts of dropped packets

Definition at line 756 of file QoSTransportSettings.cpp.

◆ get_drop_rate()

double madara::transport::QoSTransportSettings::get_drop_rate ( void  ) const

Returns the percentage of dropped packets to enforce on sends.

Returns
the percentage of dropped packets to enforce

Definition at line 746 of file QoSTransportSettings.cpp.

◆ get_drop_type()

int madara::transport::QoSTransportSettings::get_drop_type ( void  ) const

Returns the policy type for packet drops.

Returns
the policy type for packet drops

Definition at line 751 of file QoSTransportSettings.cpp.

◆ get_number_of_buffer_filters()

size_t madara::transport::QoSTransportSettings::get_number_of_buffer_filters ( void  ) const

Returns the number of buffer filters.

Returns
the number of buffer filters

Definition at line 732 of file QoSTransportSettings.cpp.

◆ get_number_of_rebroadcast_aggregate_filters()

size_t madara::transport::QoSTransportSettings::get_number_of_rebroadcast_aggregate_filters ( void  ) const

Returns the number of aggregate filters applied before rebroadcasting @ return the number of aggregate filters.

Definition at line 713 of file QoSTransportSettings.cpp.

◆ get_number_of_rebroadcast_filtered_types()

size_t madara::transport::QoSTransportSettings::get_number_of_rebroadcast_filtered_types ( void  ) const

Returns the number of types that are filtered before rebroadcast.

Returns
the number of types that have filters

Definition at line 707 of file QoSTransportSettings.cpp.

◆ get_number_of_receive_aggregate_filters()

size_t madara::transport::QoSTransportSettings::get_number_of_receive_aggregate_filters ( void  ) const

Returns the number of aggregate filters applied after receiving @ return the number of aggregate filters.

Definition at line 726 of file QoSTransportSettings.cpp.

◆ get_number_of_receive_filtered_types()

size_t madara::transport::QoSTransportSettings::get_number_of_receive_filtered_types ( void  ) const

Returns the number of types that are filtered after received.

Returns
the number of types that have filters

Definition at line 720 of file QoSTransportSettings.cpp.

◆ get_number_of_send_aggregate_filters()

size_t madara::transport::QoSTransportSettings::get_number_of_send_aggregate_filters ( void  ) const

Returns the number of aggregate filters applied before sending @ return the number of aggregate filters.

Definition at line 701 of file QoSTransportSettings.cpp.

◆ get_number_of_send_filtered_types()

size_t madara::transport::QoSTransportSettings::get_number_of_send_filtered_types ( void  ) const

Returns the number of types that are filtered before send.

Returns
the number of types that have filters

Definition at line 694 of file QoSTransportSettings.cpp.

◆ get_participant_ttl()

unsigned char madara::transport::QoSTransportSettings::get_participant_ttl ( void  ) const

Returns the maximum time to live participation of this transport in rebroadcasting of other agent's messages.

Returns
the maximum number of ttls this transport will participate in (per message)

Definition at line 159 of file QoSTransportSettings.cpp.

◆ get_read_domains()

void madara::transport::TransportSettings::get_read_domains ( std::vector< std::string > &  domains) const
inlineinherited

Retrieves the list of read domains.

Parameters
domainsthe list to fill with all read domains

Definition at line 30 of file TransportSettings.inl.

◆ get_rebroadcast_ttl()

unsigned char madara::transport::QoSTransportSettings::get_rebroadcast_ttl ( void  ) const

Gets the time to live for rebroadcasting (number of rebroadcasts per message).

Definition at line 147 of file QoSTransportSettings.cpp.

◆ get_send_bandwidth_limit()

int64_t madara::transport::QoSTransportSettings::get_send_bandwidth_limit ( void  ) const

Returns the limit for sending on this transport in bytes per second.

Returns
the send bandwidth limiting in bytes per second

Definition at line 767 of file QoSTransportSettings.cpp.

◆ get_total_bandwidth_limit()

int64_t madara::transport::QoSTransportSettings::get_total_bandwidth_limit ( void  ) const

Returns the total limit for this transport in bytes per second.

-1 means no limit.

Returns
the total bandwidth limit in bytes per second

Definition at line 779 of file QoSTransportSettings.cpp.

◆ is_reading_domain()

bool madara::transport::TransportSettings::is_reading_domain ( const std::string  domain) const
inlineinherited

Checks if a domain is in the domain read list.

Parameters
domaindomain to check
Returns
true if the domain exists in the read list

Definition at line 41 of file TransportSettings.inl.

◆ is_trusted()

bool madara::transport::QoSTransportSettings::is_trusted ( const std::string &  peer) const

Checks if a peer is trusted.

Parameters
peerpeer to check (generally ip:port)
Returns
true if peer is trusted, false otherwise

There are three conditions when a peer is trusted. The first is when the trusted_peers are everyone (empty set) and the peer does not exist in the banned list. The second is when trusted_peers contains the peer.

Definition at line 203 of file QoSTransportSettings.cpp.

◆ load()

void madara::transport::QoSTransportSettings::load ( const std::string &  filename,
const std::string &  prefix = "transport" 
)
virtual

Loads the settings from a binary file.

Parameters
filenamethe file to load from
prefixprefix for all transports settings

Reimplemented from madara::transport::TransportSettings.

Definition at line 795 of file QoSTransportSettings.cpp.

◆ load_text()

void madara::transport::QoSTransportSettings::load_text ( const std::string &  filename,
const std::string &  prefix = "transport" 
)
virtual

Loads the settings from a text file.

Parameters
filenamethe file to load from
prefixprefix for all transports settings

Reimplemented from madara::transport::TransportSettings.

Definition at line 866 of file QoSTransportSettings.cpp.

◆ num_read_domains()

size_t madara::transport::TransportSettings::num_read_domains ( void  ) const
inlineinherited

Returns the number of read domains.

Returns
the number of domains in the read list

Definition at line 47 of file TransportSettings.inl.

◆ operator=() [1/2]

void madara::transport::QoSTransportSettings::operator= ( const QoSTransportSettings settings)

Assignment operator.

Parameters
settingsthe settings to copy from

Definition at line 88 of file QoSTransportSettings.cpp.

◆ operator=() [2/2]

void madara::transport::QoSTransportSettings::operator= ( const TransportSettings settings)

Assignment operator.

Parameters
settingsthe settings to copy from

Definition at line 115 of file QoSTransportSettings.cpp.

◆ print_num_filters_rebroadcast()

void madara::transport::QoSTransportSettings::print_num_filters_rebroadcast ( void  ) const

Prints the number of filters chained for each type to the rebroadcast filter.

Definition at line 687 of file QoSTransportSettings.cpp.

◆ print_num_filters_receive()

void madara::transport::QoSTransportSettings::print_num_filters_receive ( void  ) const

Prints the number of filters chained for each type to the receive filter.

Definition at line 681 of file QoSTransportSettings.cpp.

◆ print_num_filters_send()

void madara::transport::QoSTransportSettings::print_num_filters_send ( void  ) const

Prints the number of filters chained for each type to the send filter.

Definition at line 676 of file QoSTransportSettings.cpp.

◆ remove_banned_peer()

bool madara::transport::QoSTransportSettings::remove_banned_peer ( const std::string &  peer)

Removes a trusted peer, if it exists in the list.

Parameters
peerpeer to remove (generally ip:port)
Returns
true if peer existed, false if peer was not in list

Definition at line 191 of file QoSTransportSettings.cpp.

◆ remove_trusted_peer()

bool madara::transport::QoSTransportSettings::remove_trusted_peer ( const std::string &  peer)

Removes a trusted peer, if it exists in the list.

Parameters
peerpeer to remove (generally ip:port)
Returns
true if peer existed, false if peer was not in list

Definition at line 179 of file QoSTransportSettings.cpp.

◆ save()

void madara::transport::QoSTransportSettings::save ( const std::string &  filename,
const std::string &  prefix = "transport" 
) const
virtual

Saves the settings from a binary file.

Parameters
filenamethe file to load from
prefixprefix for all transports settings

Reimplemented from madara::transport::TransportSettings.

Definition at line 943 of file QoSTransportSettings.cpp.

◆ save_text()

void madara::transport::QoSTransportSettings::save_text ( const std::string &  filename,
const std::string &  prefix = "transport" 
) const
virtual

Saves the settings from a text file.

Parameters
filenamethe file to load from
prefixprefix for all transports settings

Reimplemented from madara::transport::TransportSettings.

Definition at line 983 of file QoSTransportSettings.cpp.

◆ set_deadline()

void madara::transport::QoSTransportSettings::set_deadline ( double  deadline)

Sets the packet deadline in seconds.

Note that most transports only enforce deadline in seconds. However, future transports may allow for microsecond or millisecond deadlines, so we use a double here for expansion purposes. -1 means no deadline.

Parameters
deadlinedeadline in seconds

Definition at line 785 of file QoSTransportSettings.cpp.

◆ set_rebroadcast_ttl()

void madara::transport::QoSTransportSettings::set_rebroadcast_ttl ( unsigned char  ttl)

Sets the time to live for our packets.

This number is decremented by one by each receiver. If time to live is greater than 0, the message will be rebroadcasted. Default is 0.

Parameters
ttltime-to-live for message sent over this transport

Definition at line 141 of file QoSTransportSettings.cpp.

◆ set_send_bandwidth_limit()

void madara::transport::QoSTransportSettings::set_send_bandwidth_limit ( int64_t  bandwidth)

Sets a bandwidth limit for sending on this transport in bytes per sec.

Parameters
bandwidthsend bandwidth in bytes per second

Definition at line 761 of file QoSTransportSettings.cpp.

◆ set_total_bandwidth_limit()

void madara::transport::QoSTransportSettings::set_total_bandwidth_limit ( int64_t  bandwidth)

Sets a bandwidth limit for receiving and sending over the transport.

-1 means no limit.

Parameters
bandwidthtotal bandwidth limit in bytes per second

Definition at line 773 of file QoSTransportSettings.cpp.

◆ update_drop_rate()

void madara::transport::QoSTransportSettings::update_drop_rate ( double  drop_rate,
int  drop_type = PACKET_DROP_DETERMINISTIC,
uint64_t  drop_burst = 1 
)

Updates a packet drop rate, type, and burst.

Parameters
drop_ratepercent drop rate for sending packets
drop_typetype of drop rate policy to use
See also
PacketDropTypes
Parameters
drop_burstnumber of packets to drop consecutively

Definition at line 738 of file QoSTransportSettings.cpp.

Member Data Documentation

◆ banned_peers_

std::map<std::string, int> madara::transport::QoSTransportSettings::banned_peers_
private

A container of all banned peers.

Definition at line 699 of file QoSTransportSettings.h.

◆ buffer_filters_

filters::BufferFilters madara::transport::QoSTransportSettings::buffer_filters_
private

buffer filters have an encode and decode method

Definition at line 719 of file QoSTransportSettings.h.

◆ deadline_

double madara::transport::QoSTransportSettings::deadline_
private

Deadline for packets at which packets drop.

Definition at line 749 of file QoSTransportSettings.h.

◆ debug_to_kb_prefix

std::string madara::transport::TransportSettings::debug_to_kb_prefix = ""
inherited

if not empty, save debug information to knowledge base at prefix

Definition at line 330 of file TransportSettings.h.

◆ DEFAULT_DEADLINE

const uint32_t madara::transport::TransportSettings::DEFAULT_DEADLINE = 0
staticinherited

Default deadline.

Definition at line 95 of file TransportSettings.h.

◆ DEFAULT_QUEUE_LENGTH

const uint32_t madara::transport::TransportSettings::DEFAULT_QUEUE_LENGTH = 500000
staticinherited

Default queue length for event history (must be high for reliable transport.

Definition at line 92 of file TransportSettings.h.

◆ DEFAULT_RELIABILITY

const uint32_t madara::transport::TransportSettings::DEFAULT_RELIABILITY = RELIABLE
staticinherited

Default reliability.

Definition at line 101 of file TransportSettings.h.

◆ DEFAULT_TRANSPORT

const uint32_t madara::transport::TransportSettings::DEFAULT_TRANSPORT = NO_TRANSPORT
staticinherited

Default transport.

Definition at line 98 of file TransportSettings.h.

◆ delay_launch

bool madara::transport::TransportSettings::delay_launch = false
inherited

Delay launching transports until explicit activate call.

Definition at line 273 of file TransportSettings.h.

◆ fragment_map

OriginatorFragmentMap madara::transport::TransportSettings::fragment_map
mutableinherited

Map of fragments received by originator.

Definition at line 282 of file TransportSettings.h.

◆ fragment_queue_length

uint32_t madara::transport::TransportSettings::fragment_queue_length = 100
inherited

Indicates queue length for holding clock-keyed fragments.

Note that this does not limit the number of fragments–only how many clock values we want to queue for defragmentation. So, if you have a fragment_queue_length of 3, and your last three received fragmented clock values were 1=4GB, 2=4GB, 3=4GB, then you could have 12GB, regardless of max_fragment_size.

Definition at line 257 of file TransportSettings.h.

◆ hosts

std::vector<std::string> madara::transport::TransportSettings::hosts
inherited

Host information for transports that require it.

The format of these is transport specific, but for UDP, you might have "localhost:1234" for a host named localhost and a port of 1234. See the specific transport for more information.

Definition at line 308 of file TransportSettings.h.

◆ id

uint32_t madara::transport::TransportSettings::id = 0
inherited

The id of this process (DEPRECATED). You do not need to set this.

Definition at line 264 of file TransportSettings.h.

◆ max_fragment_size

uint32_t madara::transport::TransportSettings::max_fragment_size = 62000
inherited

Maximum allowed fragment size for partitioning large messages.

Definition at line 244 of file TransportSettings.h.

◆ max_send_bandwidth_

int64_t madara::transport::QoSTransportSettings::max_send_bandwidth_
private

Maximum send bandwidth usage per second before packets drop.

Definition at line 739 of file QoSTransportSettings.h.

◆ max_send_hertz

double madara::transport::TransportSettings::max_send_hertz = 0.0
inherited

Maximum rate of sending messages.

This is not a bandwidth limit. This specifically limits the number of times the transport can send in a second. Under the hood, it is causing the transport to enforce sleeps between sends to provide time for the OS or transport to recover. May be especially useful to UDP transports.

Definition at line 300 of file TransportSettings.h.

◆ max_total_bandwidth_

int64_t madara::transport::QoSTransportSettings::max_total_bandwidth_
private

Maximum bandwidth usage for the transport (receive/send) before drop.

Definition at line 744 of file QoSTransportSettings.h.

◆ never_exit

bool madara::transport::TransportSettings::never_exit = false
inherited

Prevent MADARA from exiting on fatal errors and invalid state.

Definition at line 276 of file TransportSettings.h.

◆ no_receiving

bool madara::transport::TransportSettings::no_receiving = false
inherited

if true, never receive over transport

Definition at line 318 of file TransportSettings.h.

◆ no_sending

bool madara::transport::TransportSettings::no_sending = false
inherited

if true, never send over transport

Definition at line 313 of file TransportSettings.h.

◆ on_data_received_logic

std::string madara::transport::TransportSettings::on_data_received_logic
inherited

Logic to be evaluated after every successful update.

Definition at line 270 of file TransportSettings.h.

◆ packet_drop_burst_

uint64_t madara::transport::QoSTransportSettings::packet_drop_burst_
private

Burst of packet drops.

Definition at line 734 of file QoSTransportSettings.h.

◆ packet_drop_rate_

double madara::transport::QoSTransportSettings::packet_drop_rate_
private

Rate for dropping packets.

Definition at line 724 of file QoSTransportSettings.h.

◆ packet_drop_type_

int madara::transport::QoSTransportSettings::packet_drop_type_
private

Drop rate type.

Definition at line 729 of file QoSTransportSettings.h.

◆ participant_rebroadcast_ttl_

unsigned char madara::transport::QoSTransportSettings::participant_rebroadcast_ttl_
private

This field is meant to limit the number of rebroadcasts that this transport will participate in.

If a ttl > 0 is received on a message header, the new ttl for rebroadcasts will be set to the minimum of this field and the decrement of the ttl of the message. A zero here means the transport will not participate in rebroadcasts

Definition at line 689 of file QoSTransportSettings.h.

◆ processes

uint32_t madara::transport::TransportSettings::processes = 1
inherited

Number of processes (DEPRECATED). You do not need to set this.

Definition at line 267 of file TransportSettings.h.

◆ queue_length

uint32_t madara::transport::TransportSettings::queue_length = DEFAULT_QUEUE_LENGTH
inherited

Length of the buffer used to store history of events.

For almost all transports, this is the buffer size used by the operating system and transport layer. You should set this to essentially be enough to hold at least 1 second-worth of data. So, if you sending 1KB of data at 1khz, you need at least 1MB and possibly 5MB to have smooth delivery that can handle operating system busy periods without losing too much data.

Definition at line 238 of file TransportSettings.h.

◆ read_domains_

std::map<std::string, int> madara::transport::TransportSettings::read_domains_
privateinherited

Any acceptable read domain is added here.

Definition at line 336 of file TransportSettings.h.

◆ read_thread_hertz

double madara::transport::TransportSettings::read_thread_hertz = 1000.0
inherited

Number of valid messages allowed to be received per second.

This value can be -1 or 0.0 to go as fast as possible

Definition at line 291 of file TransportSettings.h.

◆ read_threads

uint32_t madara::transport::TransportSettings::read_threads = 1
inherited

the number of read threads to start

Definition at line 227 of file TransportSettings.h.

◆ rebroadcast_filters_

knowledge::KnowledgeRecordFilters madara::transport::QoSTransportSettings::rebroadcast_filters_
private

A container for rebroadcast filters.

Definition at line 704 of file QoSTransportSettings.h.

◆ rebroadcast_ttl_

unsigned char madara::transport::QoSTransportSettings::rebroadcast_ttl_
private

number of rebroadcasts for receivers to ultimately do.

This field is experimental and is meant to allow for rebroadcasting messages across a number of loosely connected agents or amongst a routing network. For instance, if A is connected to B and B is connected to C, and A would like to have its update known to C, then a rebroadcast_ttl of 1 would instruct B to rebroadcast updates with a ttl of (rebroadcast_ttl - 1), resulting in 0 ttl when received by C (it will not rebroadcast).

Definition at line 680 of file QoSTransportSettings.h.

◆ receive_filters_

knowledge::KnowledgeRecordFilters madara::transport::QoSTransportSettings::receive_filters_
private

A container for receive filters.

Definition at line 709 of file QoSTransportSettings.h.

◆ reliability

uint32_t madara::transport::TransportSettings::reliability = DEFAULT_RELIABILITY
inherited

Reliability required of the transport.

See madara::transport::Reliabilities for options

Definition at line 261 of file TransportSettings.h.

◆ resend_attempts

int madara::transport::TransportSettings::resend_attempts = 10
inherited

Maximum number of attempts to resend if transport is busy.

Definition at line 247 of file TransportSettings.h.

◆ send_filters_

knowledge::KnowledgeRecordFilters madara::transport::QoSTransportSettings::send_filters_
private

A container for filters applied before sending from this host.

Definition at line 714 of file QoSTransportSettings.h.

◆ send_history

bool madara::transport::TransportSettings::send_history = false
inherited

if true, send all updates since last send, for records that have history enabled (if the history capacity was exceeded since last send, the oldest updates are lost).

Definition at line 325 of file TransportSettings.h.

◆ send_reduced_message_header

bool madara::transport::TransportSettings::send_reduced_message_header = false
inherited

Send a reduced message header (clock, size, updates, KaRL id)

Definition at line 279 of file TransportSettings.h.

◆ slack_time

double madara::transport::TransportSettings::slack_time = 0
inherited

Time to sleep between sends and rebroadcasts.

Definition at line 285 of file TransportSettings.h.

◆ trusted_peers_

std::map<std::string, int> madara::transport::QoSTransportSettings::trusted_peers_
private

A container of all trusted peers.

Definition at line 694 of file QoSTransportSettings.h.

◆ type

uint32_t madara::transport::TransportSettings::type = DEFAULT_TRANSPORT
inherited

Type of transport. See madara::transport::Types for options.

Definition at line 241 of file TransportSettings.h.

◆ write_domain

std::string madara::transport::TransportSettings::write_domain = "KaRL"
inherited

All class members are accessible to users for easy setup.

We only write to one domain

Definition at line 224 of file TransportSettings.h.


The documentation for this class was generated from the following files: