MADARA
3.2.3
|
Holds basic transport settings. More...
#include <TransportSettings.h>
Public Types | |
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 76 of file TransportSettings.h.
typedef std::vector<std::string> madara::transport::TransportSettings::Voters |
Definition at line 85 of file TransportSettings.h.
madara::transport::TransportSettings::TransportSettings | ( | ) |
Constructor for this class.
Definition at line 58 of file TransportSettings.cpp.
madara::transport::TransportSettings::TransportSettings | ( | const TransportSettings & | settings | ) |
Copy constructor.
Definition at line 81 of file TransportSettings.cpp.
|
virtual |
Definition at line 141 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 155 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 202 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 110 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 249 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 299 of file TransportSettings.cpp.
|
friend |
Definition at line 80 of file TransportSettings.h.
|
static |
Default deadline.
Definition at line 92 of file TransportSettings.h.
|
static |
Default queue length for event history (must be high for reliable transport.
Definition at line 89 of file TransportSettings.h.
|
static |
Default reliability.
Definition at line 98 of file TransportSettings.h.
|
static |
Default transport.
Definition at line 95 of file TransportSettings.h.
bool madara::transport::TransportSettings::delay_launch |
delay launching transports
Definition at line 244 of file TransportSettings.h.
|
mutable |
map of fragments received by originator
Definition at line 253 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 226 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 270 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 234 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::max_fragment_size |
Maximum allowed fragment size for partitioning large messages.
Definition at line 213 of file TransportSettings.h.
bool madara::transport::TransportSettings::never_exit |
prevent MADARA from exiting on fatal errors and invalid state
Definition at line 247 of file TransportSettings.h.
bool madara::transport::TransportSettings::no_receiving |
if true, never receive over transport
Definition at line 280 of file TransportSettings.h.
bool madara::transport::TransportSettings::no_sending |
if true, never send over transport
Definition at line 275 of file TransportSettings.h.
std::string madara::transport::TransportSettings::on_data_received_logic |
logic to be evaluated after every successful update
Definition at line 241 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 238 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::queue_length |
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 207 of file TransportSettings.h.
|
private |
Any acceptable read domain is added here.
Definition at line 287 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 262 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::read_threads |
the number of read threads to start
Definition at line 196 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::reliability |
Reliability required of the transport.
See madara::transport::Reliabilities for options
Definition at line 230 of file TransportSettings.h.
int madara::transport::TransportSettings::resend_attempts |
Maximum number of attempts to resend if transport is busy.
Definition at line 216 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 250 of file TransportSettings.h.
double madara::transport::TransportSettings::slack_time |
time to sleep between sends and rebroadcasts
Definition at line 256 of file TransportSettings.h.
uint32_t madara::transport::TransportSettings::type |
Type of transport. See madara::transport::Types for options.
Definition at line 210 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 193 of file TransportSettings.h.