1 #ifndef _MADARA_ZEROMQ_TRANSPORT_READ_THREAD_H_ 2 #define _MADARA_ZEROMQ_TRANSPORT_READ_THREAD_H_ 24 #include "ace/Mutex.h" 25 #include "ace/Barrier.h" 26 #include "ace/Atomic_Op_T.h" 27 #include "ace/Thread_Mutex.h" 31 #include "ace/Synch.h" 89 const char * print_prefix,
109 #ifndef _MADARA_NO_KARL_ 112 #endif // _MADARA_NO_KARL_ 129 #endif // _MADARA_ZEROMQ_TRANSPORT_READ_THREAD_H_ const QoSTransportSettings settings_
quality-of-service transport settings
void init(knowledge::KnowledgeBase &knowledge)
Initializes MADARA context-related items.
const std::string id_
host:port identifier of this process
BandwidthMonitor & send_monitor_
monitor for sending bandwidth usage
madara::knowledge::CompiledExpression on_data_received_
data received rules, defined in Transport settings
void * read_socket_
The multicast socket we are reading from.
knowledge::ThreadSafeContext * context_
knowledge context
void * write_socket_
underlying socket for sending
This class stores variables and their values for use by any entity needing state information in a thr...
Provides scheduler for dropping packets.
BandwidthMonitor & receive_monitor_
monitor for receiving bandwidth usage
void cleanup(void)
Cleanup function called by thread manager.
Holds basic transport settings.
Compiled, optimized KaRL logic.
ZMQTransportReadThread(const TransportSettings &settings, const std::string &id, void *write_socket, BandwidthMonitor &send_monitor, BandwidthMonitor &receive_monitor, PacketScheduler &packet_scheduler)
Constructor.
Abstract base class for implementing threads.
This class provides a distributed knowledge base to users.
::std::map< std::string, KnowledgeRecord > KnowledgeMap
Thread for reading knowledge updates through a ZMQ datagram socket.
Container for quality-of-service settings.
Provides monitoring capability of a transport's bandwidth.
Provides functions and classes for the distributed knowledge base.
Copyright (c) 2015 Carnegie Mellon University.
PacketScheduler & packet_scheduler_
scheduler for mimicking target network conditions
void rebroadcast(const char *print_prefix, MessageHeader *header, const knowledge::KnowledgeMap &records)
Sends a rebroadcast packet.
void run(void)
The main loop internals for the read thread.
madara::utility::ScopedArray< char > buffer_
buffer for receiving