1 #ifndef _MADARA_TRANSPORT_H_ 2 #define _MADARA_TRANSPORT_H_ 22 #include "madara/MadaraExport.h" 70 int validate_transport (
void);
75 virtual int setup (
void);
80 int check_transport (
void);
100 const char * print_prefix);
118 void invalidate_transport (
void);
123 virtual void close (
void);
138 #ifndef _MADARA_NO_KARL_ 142 #endif // _MADARA_NO_KARL_ 197 #ifndef _MADARA_NO_KARL_
202 const char * print_prefix,
203 const char * remote_host,
224 int64_t & buffer_remaining,
226 const char * print_prefix,
237 #endif // _MADARA_TRANSPORT_H_
QoSTransportSettings settings_
utility::ThreadSafeVector< Base * > Transports
Encapsulates a MADARA KaRL expression into an evaluatable tree.
This class stores variables and their values for use by any entity needing state information in a thr...
Provides scheduler for dropping packets.
Holds basic transport settings.
Compiled, optimized KaRL logic.
BandwidthMonitor receive_monitor_
monitor for receiving bandwidth usage
volatile bool shutting_down_
::std::map< std::string, KnowledgeRecord > KnowledgeMap
const std::string id_
host:port identifier of this process
std::map< const char *, VariableReference, VariableReferenceMapCompare > VariableReferenceMap
a map of variable references
Container for quality-of-service settings.
Provides monitoring capability of a transport's bandwidth.
Manages a thread safe STL vector.
PacketScheduler packet_scheduler_
scheduler for dropping packets to simulate network issues
std::vector< std::string > HostsVector
Used to define a vector of hosts to contact.
Copyright (c) 2015 Carnegie Mellon University.
madara::utility::ScopedArray< char > buffer_
buffer for sending
int process_received_update(const char *buffer, uint32_t bytes_read, const std::string &id, knowledge::ThreadSafeContext &context, const QoSTransportSettings &settings, BandwidthMonitor &send_monitor, BandwidthMonitor &receive_monitor, knowledge::KnowledgeMap &rebroadcast_records, knowledge::CompiledExpression &on_data_received, const char *print_prefix, const char *remote_host, MessageHeader *&header)
Processes a received update, updates monitors, fills rebroadcast records according to settings filter...
Base class from which all transports must be derived.
int prep_rebroadcast(knowledge::ThreadSafeContext &context, char *buffer, int64_t &buffer_remaining, const QoSTransportSettings &settings, const char *print_prefix, MessageHeader *header, const knowledge::KnowledgeMap &records, PacketScheduler &packet_scheduler)
Preps a buffer for rebroadcasting records to other agents on the network.
BandwidthMonitor send_monitor_
monitor for sending bandwidth usage
madara::knowledge::ThreadSafeContext & context_