MADARA
3.1.8
|
Holds basic transport settings. More...
#include <TransportSettings.h>
Public Types | |
typedef ACE_Guard< MADARA_LOCK_TYPE > | ContextGuard |
typedef std::vector< std::string > | Voters |
Public Member Functions | |
TransportSettings () | |
Constructor for this class. More... | |
TransportSettings (const TransportSettings &settings) | |
Copy constructor. More... | |
virtual | ~TransportSettings () |
void | add_read_domain (const std::string domain) |
Adds a read domain to the list of domains to read from. More... | |
void | clear_read_domains (void) |
Clears the list of read domains. More... | |
void | get_read_domains (std::vector< std::string > &domains) const |
Retrieves the list of read domains. More... | |
bool | is_reading_domain (const std::string domain) const |
Checks if a domain is in the domain read list. 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 TransportSettings &settings) |
Assignment operator. 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... | |
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 > | read_domains_ |
Any acceptable read domain is added here. More... | |
Friends | |
class | Base |
Holds basic transport settings.
Definition at line 92 of file TransportSettings.h.
typedef ACE_Guard<MADARA_LOCK_TYPE> madara::transport::TransportSettings::ContextGuard |
Definition at line 99 of file TransportSettings.h.
typedef std::vector<std::string> madara::transport::TransportSettings::Voters |
Definition at line 104 of file TransportSettings.h.
madara::transport::TransportSettings::TransportSettings | ( | ) |
Constructor for this class.
Definition at line 10 of file TransportSettings.cpp.
madara::transport::TransportSettings::TransportSettings | ( | const TransportSettings & | settings | ) |
Copy constructor.
Definition at line 45 of file TransportSettings.cpp.
|
virtual |
Definition at line 132 of file TransportSettings.cpp.
|
inline |
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.
|
inline |
Clears the list of read domains.
Definition at line 22 of file TransportSettings.inl.
|
inline |
Retrieves the list of read domains.
domains | the list to fill with all read domains |
Definition at line 28 of file TransportSettings.inl.
|
inline |
Checks if a domain is in the domain read list.
domain | domain to check |
Definition at line 40 of file TransportSettings.inl.
|
virtual |
Loads the settings from a binary file.
filename | the file to load from |
prefix | prefix for all transports settings |
Reimplemented in madara::transport::QoSTransportSettings.
Definition at line 146 of file TransportSettings.cpp.
|
virtual |
Loads the settings from a text file.
filename | the file to load from |
prefix | prefix for all transports settings |
Reimplemented in madara::transport::QoSTransportSettings.
Definition at line 193 of file TransportSettings.cpp.
|
inline |
Returns the number of read domains.
Definition at line 48 of file TransportSettings.inl.
void madara::transport::TransportSettings::operator= | ( | const TransportSettings & | settings | ) |
Assignment operator.
Definition at line 88 of file TransportSettings.cpp.
|
virtual |
Saves the settings from a binary file.
filename | the file to load from |
prefix | prefix for all transports settings |
Reimplemented in madara::transport::QoSTransportSettings.
Definition at line 240 of file TransportSettings.cpp.
|
virtual |
Saves the settings from a text file.
filename | the file to load from |
prefix | prefix for all transports settings |
Reimplemented in madara::transport::QoSTransportSettings.
Definition at line 290 of file TransportSettings.cpp.
|
friend |
Definition at line 96 of file TransportSettings.h.
|
static |
Default deadline.
Definition at line 111 of file TransportSettings.h.
|
static |
Default queue length for event history (must be high for reliable transport.
Definition at line 108 of file TransportSettings.h.
|
static |
Default reliability.
Definition at line 117 of file TransportSettings.h.
|
static |
Default transport.
Definition at line 114 of file TransportSettings.h.
bool madara::transport::TransportSettings::delay_launch |
delay launching transports
Definition at line 805 of file TransportSettings.h.
|
mutable |
map of fragments received by originator
Definition at line 814 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::fragment_queue_length |
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.
std::vector<std::string> madara::transport::TransportSettings::hosts |
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.
uint32_t madara::transport::TransportSettings::id |
the id of this process.
May be useful for latency gathering or testing purposes
Definition at line 795 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::max_fragment_size |
Maximum allowed fragment size for partitioning large messages.
Definition at line 774 of file TransportSettings.h.
bool madara::transport::TransportSettings::never_exit |
prevent MADARA from exiting on fatal errors and invalid state
Definition at line 808 of file TransportSettings.h.
bool madara::transport::TransportSettings::no_receiving |
if true, never receive over transport
Definition at line 880 of file TransportSettings.h.
bool madara::transport::TransportSettings::no_sending |
if true, never send over transport
Definition at line 875 of file TransportSettings.h.
std::string madara::transport::TransportSettings::on_data_received_logic |
logic to be evaluated after every successful update
Definition at line 802 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::processes |
number of processes expected in the network (best to overestimate if building latency tables
Definition at line 799 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::queue_length |
Length of the buffer used to store history of events.
Definition at line 768 of file TransportSettings.h.
|
private |
Any acceptable read domain is added here.
Definition at line 887 of file TransportSettings.h.
double madara::transport::TransportSettings::read_thread_hertz |
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.
uint32_t madara::transport::TransportSettings::read_threads |
the number of read threads to start
Definition at line 765 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::reliability |
Reliability required of the transport.
See madara::transport::Reliabilities for options
Definition at line 791 of file TransportSettings.h.
int madara::transport::TransportSettings::resend_attempts |
Maximum number of attempts to resend if transport is busy.
Definition at line 777 of file TransportSettings.h.
bool madara::transport::TransportSettings::send_reduced_message_header |
send the reduced message header (clock, size, updates, KaRL id)
Definition at line 811 of file TransportSettings.h.
double madara::transport::TransportSettings::slack_time |
time to sleep between sends and rebroadcasts
Definition at line 817 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::type |
Type of transport. See madara::transport::Types for options.
Definition at line 771 of file TransportSettings.h.
std::string madara::transport::TransportSettings::write_domain |
All class members are accessible to users for easy setup.
We only write to one domain
Definition at line 762 of file TransportSettings.h.