55 #ifndef _GAMS_ALGORITHMS_MESSAGE_PROFILING_H_
56 #define _GAMS_ALGORITHMS_MESSAGE_PROFILING_H_
71 #include "madara/filters/AggregateFilter.h"
72 #include "madara/transport/QoSTransportSettings.h"
93 const madara::knowledge::KnowledgeRecord& send,
94 madara::knowledge::KnowledgeBase * knowledge = 0,
146 madara::knowledge::containers::String
data_;
165 void filter(madara::knowledge::KnowledgeMap& records,
166 const madara::transport::TransportContext& transport_context,
167 madara::knowledge::Variables& var);
221 const madara::knowledge::KnowledgeMap & args,
222 madara::knowledge::KnowledgeBase * knowledge,
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Base class for algorithm factories that classes derived from.
The base class that algorithms in GAMS use.
A factory class for creating MessageProfiling Algorithms.
virtual BaseAlgorithm * create(const madara::knowledge::KnowledgeMap &args, madara::knowledge::KnowledgeBase *knowledge, platforms::BasePlatform *platform, variables::Sensors *sensors, variables::Self *self, variables::Agents *agents)
Creates a MessageProfiling Algorithm.
std::map< std::string, size_t > msg_map
Keep a MessageData struct for each peer.
virtual ~MessageFilter()
virtual destructor
void filter(madara::knowledge::KnowledgeMap &records, const madara::transport::TransportContext &transport_context, madara::knowledge::Variables &var)
std::string missing_messages_string() const
An algorithm for profiling message generation and receipt.
virtual int execute(void)
Plans the next execution of the algorithm.
madara::knowledge::containers::String data_
Container for storing data to be sent to other controllers.
MessageProfiling(const madara::knowledge::KnowledgeRecord &send, madara::knowledge::KnowledgeBase *knowledge=0, platforms::Base *platform=0, variables::Sensors *sensors=0, variables::Self *self=0)
Constructor.
madara::knowledge::KnowledgeBase * local_knowledge_
provides access to the knowledge base
void operator=(const MessageProfiling &rhs)
Assignment operator.
virtual int plan(void)
Plans the next execution of the algorithm.
MessageFilter filter_
Message Filter object.
void init_filtered_transport(madara::transport::QoSTransportSettings settings)
Initialize the transport with the filter.
size_t send_size_
size of message to send
static const std::string key_prefix_
Prefix for message keys.
virtual int analyze(void)
Analyzes environment, platform, or other information.
~MessageProfiling()
Destructor.
A container for self referencing information.
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
std::vector< Agent > Agents
An array of agent knowledge.
Contains all GAMS-related tools, classes and code.
std::vector< bool > present