1 #ifndef _MADARA_TCP_TRANSPORT_READ_THREAD_H_ 2 #define _MADARA_TCP_TRANSPORT_READ_THREAD_H_ 16 #include "ace/Mutex.h" 17 #include "ace/Barrier.h" 18 #include "ace/Atomic_Op_T.h" 19 #include "ace/Thread_Mutex.h" 21 #include "ace/Synch.h" 49 std::map <std::string, ACE_INET_Addr> & addresses,
79 const char * print_prefix,
99 #ifndef _MADARA_NO_KARL_ 102 #endif // _MADARA_NO_KARL_ 116 #endif // _MADARA_TCP_TRANSPORT_READ_THREAD_H_ const std::string id_
host:port identifier of this process
madara::knowledge::CompiledExpression on_data_received_
data received rules, defined in Transport settings
BandwidthMonitor & send_monitor_
monitor for sending bandwidth usage
TcpTransportReadThread(const TransportSettings &settings, const std::string &id, std::map< std::string, ACE_INET_Addr > &addresses, BandwidthMonitor &send_monitor, BandwidthMonitor &receive_monitor, PacketScheduler &packet_scheduler)
Constructor.
void rebroadcast(const char *print_prefix, MessageHeader *header, const knowledge::KnowledgeMap &records)
Sends a rebroadcast packet to all peers.
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.
madara::utility::ScopedArray< char > buffer_
buffer for sending
void run(void)
The main loop internals for the read thread.
Abstract base class for implementing threads.
void cleanup(void)
Cleanup function called by thread manager.
This class provides a distributed knowledge base to users.
::std::map< std::string, KnowledgeRecord > KnowledgeMap
BandwidthMonitor & receive_monitor_
monitor for receiving bandwidth usage
void init(knowledge::KnowledgeBase &knowledge)
Initializes MADARA context-related items.
Container for quality-of-service settings.
Provides monitoring capability of a transport's bandwidth.
Provides functions and classes for the distributed knowledge base.
std::map< std::string, ACE_INET_Addr > & addresses_
internet addresses of our peers
Copyright (c) 2015 Carnegie Mellon University.
knowledge::ThreadSafeContext * context_
knowledge context
PacketScheduler & packet_scheduler_
scheduler for mimicking target network conditions
Thread for reading knowledge updates through a TCP socket (unused but planned)
const QoSTransportSettings settings_
Transport settings.