MADARA
3.1.8
|
Container for quality-of-service settings. More...
#include <QoSTransportSettings.h>
Public Types | |
typedef ACE_Guard< MADARA_LOCK_TYPE > | ContextGuard |
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 (filters::BufferFilter *filter) |
Adds a buffer filter to the chain. 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 (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 (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 (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_rebroadcast_filter (filters::AggregateFilter *filter) |
Adds an aggregate update filter that will be applied before rebroadcasting, after individual record filters. 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 (uint32_t types, filters::RecordFilter *filter) |
Adds a filter that will be applied to certain types after receiving. 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_receive_filter (filters::AggregateFilter *filter) |
Adds an aggregate update filter that will be applied after receiving, after individual record filters. 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 (uint32_t types, filters::RecordFilter *filter) |
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_send_filter (filters::AggregateFilter *filter) |
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_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 | 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 (unsigned char *source, int size, int max_size) const |
Calls decode on the the buffer filter chain. More... | |
int | filter_encode (unsigned 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 | |
bool | delay_launch |
delay launching transports More... | |
OriginatorFragmentMap | fragment_map |
map of fragments received by originator More... | |
uint32_t | fragment_queue_length |
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 |
the id of this process. More... | |
uint32_t | max_fragment_size |
Maximum allowed fragment size for partitioning large messages. More... | |
bool | never_exit |
prevent MADARA from exiting on fatal errors and invalid state More... | |
bool | no_receiving |
if true, never receive over transport More... | |
bool | no_sending |
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 |
number of processes expected in the network (best to overestimate if building latency tables More... | |
uint32_t | queue_length |
Length of the buffer used to store history of events. More... | |
double | read_thread_hertz |
number of valid messages allowed to be received per second. More... | |
uint32_t | read_threads |
the number of read threads to start More... | |
uint32_t | reliability |
Reliability required of the transport. More... | |
int | resend_attempts |
Maximum number of attempts to resend if transport is busy. More... | |
bool | send_reduced_message_header |
send the reduced message header (clock, size, updates, KaRL id) More... | |
double | slack_time |
time to sleep between sends and rebroadcasts More... | |
uint32_t | type |
Type of transport. See madara::transport::Types for options. More... | |
std::string | write_domain |
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... | |
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... | |
Container for quality-of-service settings.
Definition at line 49 of file QoSTransportSettings.h.
|
inherited |
Definition at line 99 of file TransportSettings.h.
|
inherited |
Definition at line 104 of file TransportSettings.h.
madara::transport::QoSTransportSettings::QoSTransportSettings | ( | ) |
Default constructor.
Definition at line 11 of file QoSTransportSettings.cpp.
madara::transport::QoSTransportSettings::QoSTransportSettings | ( | const QoSTransportSettings & | settings | ) |
Copy constructor.
Definition at line 22 of file QoSTransportSettings.cpp.
madara::transport::QoSTransportSettings::QoSTransportSettings | ( | const TransportSettings & | settings | ) |
Copy constructor.
Definition at line 42 of file QoSTransportSettings.cpp.
|
virtual |
Destructor.
Definition at line 79 of file QoSTransportSettings.cpp.
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.
peer | peer to add (generally ip:port) |
Definition at line 173 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::add_filter | ( | filters::BufferFilter * | filter | ) |
Adds a buffer filter to the chain.
filter | an instance of a buffer filter |
Definition at line 272 of file QoSTransportSettings.cpp.
|
inlineinherited |
Adds a read domain to the list of domains to read from.
domain | domain to add to the read list |
Definition at line 15 of file TransportSettings.inl.
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)
types | the types to add the filter to |
function | the function that will take the knowledge record in FunctionArguments. |
Definition at line 303 of file QoSTransportSettings.cpp.
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)
types | the types to add the filter to |
filter | an instance of an individual record filter that will be managed by the underlying infrastructure |
Definition at line 311 of file QoSTransportSettings.cpp.
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.
function | an aggregate update filter |
Definition at line 318 of file QoSTransportSettings.cpp.
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.
filter | an instance of an aggregate record filter that will be managed by the underlying infrastructure |
Definition at line 327 of file QoSTransportSettings.cpp.
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.
types | the types to add the filter to |
function | the function that will take the knowledge record in FunctionArguments. |
Definition at line 279 of file QoSTransportSettings.cpp.
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.
types | the types to add the filter to |
filter | an instance of an individual record filter that will be managed by the underlying infrastructure |
Definition at line 287 of file QoSTransportSettings.cpp.
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.
function | an aggregate update filter |
Definition at line 294 of file QoSTransportSettings.cpp.
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.
filter | an instance of an aggregate record filter that will be managed by the underlying infrastructure |
Definition at line 265 of file QoSTransportSettings.cpp.
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.
types | the types to add the filter to |
function | the function that will take the knowledge record in FunctionArguments. |
Definition at line 234 of file QoSTransportSettings.cpp.
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.
types | the types to add the filter to |
filter | an instance of an individual record filter that will be managed by the underlying infrastructure |
Definition at line 242 of file QoSTransportSettings.cpp.
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.
function | an aggregate update filter |
Definition at line 249 of file QoSTransportSettings.cpp.
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.
filter | an instance of an aggregate record filter that will be managed by the underlying infrastructure |
Definition at line 258 of file QoSTransportSettings.cpp.
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.
peer | peer to add (generally ip:port) |
Definition at line 165 of file QoSTransportSettings.cpp.
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.
context | context to be used for Variable lookups |
Definition at line 435 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::clear_buffer_filters | ( | void | ) |
Clears the list of buffer filters.
Definition at line 477 of file QoSTransportSettings.cpp.
|
inlineinherited |
Clears the list of read domains.
Definition at line 22 of file TransportSettings.inl.
void madara::transport::QoSTransportSettings::clear_rebroadcast_aggregate_filters | ( | void | ) |
Clears the list of rebroadcast time aggregate filters.
Definition at line 484 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::clear_rebroadcast_filters | ( | uint32_t | types | ) |
Clears the list of filters for the specified types.
types | the types to clear the filters of |
Definition at line 470 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::clear_receive_aggregate_filters | ( | void | ) |
Clears the list of receive time aggregate filters.
Definition at line 464 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::clear_receive_filters | ( | uint32_t | types | ) |
Clears the list of filters for the specified types.
types | the types to clear the filters of |
Definition at line 457 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::clear_send_aggregate_filters | ( | void | ) |
Clears the list of send time aggregate filters.
Definition at line 451 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::clear_send_filters | ( | uint32_t | types | ) |
Clears the list of filters for the specified types.
types | the types to clear the filters of |
Definition at line 444 of file QoSTransportSettings.cpp.
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)
maximum_ttl | Maximum time to live to support (0 for not participating in rebroadcasts). A transport cannot participate in more than 255 resends. |
Definition at line 152 of file QoSTransportSettings.cpp.
int madara::transport::QoSTransportSettings::filter_decode | ( | unsigned char * | source, |
int | size, | ||
int | max_size | ||
) | const |
Calls decode on the the buffer filter chain.
source | the source and destination buffer |
size | the amount of data in the buffer in bytes |
max_size | the amount of bytes the buffer can hold |
Definition at line 524 of file QoSTransportSettings.cpp.
int madara::transport::QoSTransportSettings::filter_encode | ( | unsigned char * | source, |
int | size, | ||
int | max_size | ||
) | const |
Calls encode on the the buffer filter chain.
source | the source and destination buffer |
size | the amount of data in the buffer in bytes |
max_size | the amount of bytes the buffer can hold |
Definition at line 509 of file QoSTransportSettings.cpp.
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.
name | variable name of input ("" for unnamed) |
input | the argument to the filter chain |
context | the context of the transport |
Definition at line 556 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::filter_rebroadcast | ( | knowledge::KnowledgeMap & | records, |
const transport::TransportContext & | transport_context | ||
) | const |
Filters aggregate records according to the rebroadcast filter chain.
records | the aggregate record map |
transport_context | the context of the transport |
Definition at line 565 of file QoSTransportSettings.cpp.
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.
name | variable name of input ("" for unnamed) |
input | the argument to the filter chain |
context | the context of the transport |
Definition at line 539 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::filter_receive | ( | knowledge::KnowledgeMap & | records, |
const transport::TransportContext & | transport_context | ||
) | const |
Filters aggregate records according to the receive filter chain.
records | the aggregate record map |
transport_context | the context of the transport |
Definition at line 548 of file QoSTransportSettings.cpp.
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.
name | variable name of input ("" for unnamed) |
input | the argument to the filter chain |
context | the context of the transport |
Definition at line 491 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::filter_send | ( | knowledge::KnowledgeMap & | records, |
const transport::TransportContext & | transport_context | ||
) | const |
Filters aggregate records according to the send filter chain.
records | the aggregate record map |
transport_context | the context of the transport |
Definition at line 500 of file QoSTransportSettings.cpp.
double madara::transport::QoSTransportSettings::get_deadline | ( | void | ) | const |
Returns the latency deadline in seconds.
-1 means no deadline.
Definition at line 709 of file QoSTransportSettings.cpp.
uint64_t madara::transport::QoSTransportSettings::get_drop_burst | ( | void | ) | const |
Returns the bursts of packet drops.
Definition at line 669 of file QoSTransportSettings.cpp.
double madara::transport::QoSTransportSettings::get_drop_rate | ( | void | ) | const |
Returns the percentage of dropped packets to enforce on sends.
Definition at line 657 of file QoSTransportSettings.cpp.
int madara::transport::QoSTransportSettings::get_drop_type | ( | void | ) | const |
Returns the policy type for packet drops.
Definition at line 663 of file QoSTransportSettings.cpp.
size_t madara::transport::QoSTransportSettings::get_number_of_buffer_filters | ( | void | ) | const |
Returns the number of buffer filters.
Definition at line 639 of file QoSTransportSettings.cpp.
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 617 of file QoSTransportSettings.cpp.
size_t madara::transport::QoSTransportSettings::get_number_of_rebroadcast_filtered_types | ( | void | ) | const |
Returns the number of types that are filtered before rebroadcast.
Definition at line 610 of file QoSTransportSettings.cpp.
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 632 of file QoSTransportSettings.cpp.
size_t madara::transport::QoSTransportSettings::get_number_of_receive_filtered_types | ( | void | ) | const |
Returns the number of types that are filtered after received.
Definition at line 625 of file QoSTransportSettings.cpp.
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 603 of file QoSTransportSettings.cpp.
size_t madara::transport::QoSTransportSettings::get_number_of_send_filtered_types | ( | void | ) | const |
Returns the number of types that are filtered before send.
Definition at line 596 of file QoSTransportSettings.cpp.
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.
Definition at line 159 of file QoSTransportSettings.cpp.
|
inlineinherited |
Retrieves the list of read domains.
domains | the list to fill with all read domains |
Definition at line 28 of file TransportSettings.inl.
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 146 of file QoSTransportSettings.cpp.
int64_t madara::transport::QoSTransportSettings::get_send_bandwidth_limit | ( | void | ) | const |
Returns the limit for sending on this transport in bytes per second.
Definition at line 682 of file QoSTransportSettings.cpp.
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.
Definition at line 696 of file QoSTransportSettings.cpp.
|
inlineinherited |
Checks if a domain is in the domain read list.
domain | domain to check |
Definition at line 40 of file TransportSettings.inl.
bool madara::transport::QoSTransportSettings::is_trusted | ( | const std::string & | peer | ) | const |
Checks if a peer is trusted.
peer | peer to check (generally ip:port) |
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 207 of file QoSTransportSettings.cpp.
|
virtual |
Loads the settings from a binary file.
filename | the file to load from |
prefix | prefix for all transports settings |
Reimplemented from madara::transport::TransportSettings.
Definition at line 715 of file QoSTransportSettings.cpp.
|
virtual |
Loads the settings from a text file.
filename | the file to load from |
prefix | prefix for all transports settings |
Reimplemented from madara::transport::TransportSettings.
Definition at line 763 of file QoSTransportSettings.cpp.
|
inlineinherited |
Returns the number of read domains.
Definition at line 48 of file TransportSettings.inl.
void madara::transport::QoSTransportSettings::operator= | ( | const QoSTransportSettings & | settings | ) |
Assignment operator.
Definition at line 85 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::operator= | ( | const TransportSettings & | settings | ) |
Assignment operator.
Definition at line 113 of file QoSTransportSettings.cpp.
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 587 of file QoSTransportSettings.cpp.
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 580 of file QoSTransportSettings.cpp.
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 573 of file QoSTransportSettings.cpp.
bool madara::transport::QoSTransportSettings::remove_banned_peer | ( | const std::string & | peer | ) |
Removes a trusted peer, if it exists in the list.
peer | peer to remove (generally ip:port) |
Definition at line 194 of file QoSTransportSettings.cpp.
bool madara::transport::QoSTransportSettings::remove_trusted_peer | ( | const std::string & | peer | ) |
Removes a trusted peer, if it exists in the list.
peer | peer to remove (generally ip:port) |
Definition at line 181 of file QoSTransportSettings.cpp.
|
virtual |
Saves the settings from a binary file.
filename | the file to load from |
prefix | prefix for all transports settings |
Reimplemented from madara::transport::TransportSettings.
Definition at line 811 of file QoSTransportSettings.cpp.
|
virtual |
Saves the settings from a text file.
filename | the file to load from |
prefix | prefix for all transports settings |
Reimplemented from madara::transport::TransportSettings.
Definition at line 856 of file QoSTransportSettings.cpp.
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.
deadline | deadline in seconds |
Definition at line 703 of file QoSTransportSettings.cpp.
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.
ttl | time-to-live for message sent over this transport |
Definition at line 140 of file QoSTransportSettings.cpp.
void madara::transport::QoSTransportSettings::set_send_bandwidth_limit | ( | int64_t | bandwidth | ) |
Sets a bandwidth limit for sending on this transport in bytes per sec.
bandwidth | send bandwidth in bytes per second |
Definition at line 675 of file QoSTransportSettings.cpp.
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.
bandwidth | total bandwidth limit in bytes per second |
Definition at line 689 of file QoSTransportSettings.cpp.
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.
drop_rate | percent drop rate for sending packets |
drop_type | type of drop rate policy to use |
drop_burst | number of packets to drop consecutively |
Definition at line 646 of file QoSTransportSettings.cpp.
|
private |
A container of all banned peers.
Definition at line 697 of file QoSTransportSettings.h.
|
private |
buffer filters have an encode and decode method
Definition at line 717 of file QoSTransportSettings.h.
|
private |
Deadline for packets at which packets drop.
Definition at line 747 of file QoSTransportSettings.h.
|
staticinherited |
Default deadline.
Definition at line 111 of file TransportSettings.h.
|
staticinherited |
Default queue length for event history (must be high for reliable transport.
Definition at line 108 of file TransportSettings.h.
|
staticinherited |
Default reliability.
Definition at line 117 of file TransportSettings.h.
|
staticinherited |
Default transport.
Definition at line 114 of file TransportSettings.h.
|
inherited |
delay launching transports
Definition at line 805 of file TransportSettings.h.
|
mutableinherited |
map of fragments received by originator
Definition at line 814 of file TransportSettings.h.
|
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 787 of file TransportSettings.h.
|
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 870 of file TransportSettings.h.
|
inherited |
the id of this process.
May be useful for latency gathering or testing purposes
Definition at line 795 of file TransportSettings.h.
|
inherited |
Maximum allowed fragment size for partitioning large messages.
Definition at line 774 of file TransportSettings.h.
|
private |
Maximum send bandwidth usage per second before packets drop.
Definition at line 737 of file QoSTransportSettings.h.
|
private |
Maximum bandwidth usage for the transport (receive/send) before drop.
Definition at line 742 of file QoSTransportSettings.h.
|
inherited |
prevent MADARA from exiting on fatal errors and invalid state
Definition at line 808 of file TransportSettings.h.
|
inherited |
if true, never receive over transport
Definition at line 880 of file TransportSettings.h.
|
inherited |
if true, never send over transport
Definition at line 875 of file TransportSettings.h.
|
inherited |
logic to be evaluated after every successful update
Definition at line 802 of file TransportSettings.h.
|
private |
Burst of packet drops.
Definition at line 732 of file QoSTransportSettings.h.
|
private |
Rate for dropping packets.
Definition at line 722 of file QoSTransportSettings.h.
|
private |
Drop rate type.
Definition at line 727 of file QoSTransportSettings.h.
|
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 687 of file QoSTransportSettings.h.
|
inherited |
number of processes expected in the network (best to overestimate if building latency tables
Definition at line 799 of file TransportSettings.h.
|
inherited |
Length of the buffer used to store history of events.
Definition at line 768 of file TransportSettings.h.
|
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 823 of file TransportSettings.h.
|
inherited |
the number of read threads to start
Definition at line 765 of file TransportSettings.h.
|
private |
A container for rebroadcast filters.
Definition at line 702 of file QoSTransportSettings.h.
|
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 678 of file QoSTransportSettings.h.
|
private |
A container for receive filters.
Definition at line 707 of file QoSTransportSettings.h.
|
inherited |
Reliability required of the transport.
See madara::transport::Reliabilities for options
Definition at line 791 of file TransportSettings.h.
|
inherited |
Maximum number of attempts to resend if transport is busy.
Definition at line 777 of file TransportSettings.h.
|
private |
A container for filters applied before sending from this host.
Definition at line 712 of file QoSTransportSettings.h.
|
inherited |
send the reduced message header (clock, size, updates, KaRL id)
Definition at line 811 of file TransportSettings.h.
|
inherited |
time to sleep between sends and rebroadcasts
Definition at line 817 of file TransportSettings.h.
|
private |
A container of all trusted peers.
Definition at line 692 of file QoSTransportSettings.h.
|
inherited |
Type of transport. See madara::transport::Types for options.
Definition at line 771 of file TransportSettings.h.
|
inherited |
All class members are accessible to users for easy setup.
We only write to one domain
Definition at line 762 of file TransportSettings.h.