29 const char * print_prefix =
"madara::transport::SharedMemoryPush";
36 receive_monitor_.get_bytes_per_second(),
44 if(settings_.get_number_of_send_aggregate_filters() > 0 &&
45 filtered_updates.size() > 0)
47 settings_.filter_send(filtered_updates, send_context);
53 " No aggregate send filters were applied...\n",
61 if(settings_.get_number_of_receive_aggregate_filters() > 0 &&
62 filtered_updates.size() > 0)
64 settings_.filter_receive(filtered_updates, send_context);
70 " No aggregate receive filters were applied...\n",
80 if (id_ == kb.get_id())
90 " Applying updates to context.\n",
95 for(
auto i : filtered_updates)
101 result = record.apply(
102 context, i.first, i.second.quality, i.second.clock,
false);
108 " update %s=%s was rejected\n",
109 print_prefix, i.first.c_str(), record.to_string().c_str());
115 " update %s=%s was accepted\n",
116 print_prefix, i.first.c_str(), record.to_string().c_str());
#define madara_logger_log(loggering, level,...)
Fast version of the madara::logger::log method.
const ThreadSafeContext * context_
A thread-safe guard for a context or knowledge base.
This class provides a distributed knowledge base to users.
This class encapsulates an entry in a KnowledgeBase.
This class stores variables and their values for use by any entity needing state information in a thr...
logger::Logger & get_logger(void) const
Gets the logger used for information printing.
Base class from which all transports must be derived.
virtual int setup(void)
all subclasses should call this method at the end of its setup
virtual long send_data(const knowledge::KnowledgeMap &modifieds) override
Sends a list of updates to the domain.
SharedMemoryPush(const std::string &id, madara::transport::TransportSettings &new_settings, knowledge::KnowledgeBase &context)
Constructor.
virtual ~SharedMemoryPush()
Destructor.
Provides context about the transport.
Holds basic transport settings.
Provides functions and classes for the distributed knowledge base.
::std::map< std::string, KnowledgeRecord > KnowledgeMap
int64_t get_time(void)
Returns a time of day in nanoseconds If simtime feature is enabled, this may be simulation time inste...
Copyright(c) 2020 Galois.