1 #ifndef _MADARA_TRANSPORT_SETTINGS_H_ 2 #define _MADARA_TRANSPORT_SETTINGS_H_ 22 #include "madara/LockType.h" 27 #include "madara/MadaraExport.h" 83 #define DEFAULT_DOMAIN "KaRL" 85 typedef std::vector <std::string>
Voters;
89 static const uint32_t DEFAULT_QUEUE_LENGTH = 500000;
92 static const uint32_t DEFAULT_DEADLINE = 0;
98 static const uint32_t DEFAULT_RELIABILITY =
RELIABLE;
108 #define DEFAULT_PROCESSES 1 113 #define MAXIMUM_RESEND_ATTEMPTS 10 116 TransportSettings ();
119 TransportSettings (
const TransportSettings & settings);
121 virtual ~TransportSettings ();
124 void operator= (
const TransportSettings & settings);
135 void clear_read_domains (
void);
141 void get_read_domains (std::vector<std::string> & domains)
const;
148 bool is_reading_domain (
const std::string domain)
const;
154 size_t num_read_domains (
void)
const;
169 virtual void load_text (
const std::string & filename,
185 virtual void save_text (
const std::string & filename,
295 switch (settings.
type)
301 name =
"PrismTech DDS";
307 name =
"TCP (unsupported)";
310 name =
"UDP Unicast";
313 name =
"UDP Multicast";
316 name =
"UDP Broadcast";
319 name =
"UDP P2P Registry Server";
322 name =
"UDP P2P Registry Client";
325 name =
"ZeroMQ Pub/Sub";
336 #endif // _MADARA_TRANSPORT_SETTINGS_H_
OriginatorFragmentMap fragment_map
map of fragments received by originator
uint32_t fragment_queue_length
Indicates queue length for holding clock-keyed fragments.
std::vector< std::string > hosts
Host information for transports that require it.
double read_thread_hertz
number of valid messages allowed to be received per second.
Holds basic transport settings.
uint32_t type
Type of transport. See madara::transport::Types for options.
uint32_t id
the id of this process.
std::map< std::string, ClockFragmentMap > OriginatorFragmentMap
Map of originator to a map of clocks to fragments.
uint32_t processes
number of processes expected in the network (best to overestimate if building latency tables ...
bool no_receiving
if true, never receive over transport
std::map< std::string, int > read_domains_
Any acceptable read domain is added here.
std::string write_domain
All class members are accessible to users for easy setup.
MADARA_EXPORT std::string types_to_string(int id)
Converts a transport type enum to a string equivalent.
bool no_sending
if true, never send over transport
bool send_reduced_message_header
send the reduced message header (clock, size, updates, KaRL id)
std::string on_data_received_logic
logic to be evaluated after every successful update
double slack_time
time to sleep between sends and rebroadcasts
uint32_t read_threads
the number of read threads to start
uint32_t queue_length
Length of the buffer used to store history of events.
std::vector< std::string > Voters
uint32_t reliability
Reliability required of the transport.
Copyright (c) 2015 Carnegie Mellon University.
Base class from which all transports must be derived.
bool never_exit
prevent MADARA from exiting on fatal errors and invalid state
uint32_t max_fragment_size
Maximum allowed fragment size for partitioning large messages.
std::string type_name(const TransportSettings &settings)
int resend_attempts
Maximum number of attempts to resend if transport is busy.
bool delay_launch
delay launching transports