40 std::vector <std::string>
hosts;
44 for (
auto &host : hosts)
47 auto addr = ip::address::from_string (addr_parts.first);
48 addresses_.emplace_back (addr, addr_parts.second);
51 "UdpRegistryServer::send_data:" \
53 addresses_.back ().address ().to_string ().c_str (),
knowledge::KnowledgeBase knowledge_
knowledge base for threads to use
QoSTransportSettings settings_
std::pair< std::string, uint16_t > parse_address(std::string addr)
void keys(std::vector< std::string > &curkeys) const
Returns the keys within the map.
This class stores variables and their values for use by any entity needing state information in a thr...
std::vector< std::string > sync_keys(void)
Syncs the keys from the knowledge base.
Holds basic transport settings.
#define madara_logger_log(logger, level,...)
Fast version of the madara::logger::log method.
int setup(void) override
all subclasses should call this method at the end of its setup
knowledge::containers::Map endpoints_
std::string write_domain
All class members are accessible to users for easy setup.
long send_data(const madara::knowledge::VariableReferenceMap &updates) override
Sends a list of knowledge updates to listeners.
void set_name(const std::string &var_name, KnowledgeBase &knowledge, bool sync=true)
Sets the variable name that this refers to.
bool no_sending
if true, never send over transport
UdpRegistryServer(const std::string &id, madara::knowledge::ThreadSafeContext &context, TransportSettings &config, bool launch_transport)
Constructor.
std::vector< udp::endpoint > addresses_
holds all multicast addresses we are sending to
std::map< const char *, VariableReference, VariableReferenceMapCompare > VariableReferenceMap
a map of variable references
int setup() override
all subclasses should call this method at the end of its setup
logger::Logger & get_logger(void) const
Gets the logger used for information printing.
UDP-based transport for knowledge.
long send_data(const madara::knowledge::VariableReferenceMap &updates) override
Sends a list of knowledge updates to listeners.
madara::knowledge::ThreadSafeContext & context_