1 #ifndef _BROADCAST_TRANSPORT_READ_THREAD_H_ 2 #define _BROADCAST_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" 28 #include "ace/SOCK_Dgram.h" 29 #include "ace/SOCK_Dgram_Bcast.h" 31 #include "ace/Synch.h" 61 const ACE_INET_Addr & address,
62 ACE_SOCK_Dgram_Bcast & socket,
92 const char * print_prefix,
115 #ifndef _MADARA_NO_KARL_ 118 #endif // _MADARA_NO_KARL_ 138 #endif // _BROADCAST_TRANSPORT_READ_THREAD_H_ Thread for reading knowledge updates through a Multicast datagram socket.
void run(void)
The main loop internals for the read thread.
BandwidthMonitor & send_monitor_
monitor for sending bandwidth usage
ACE_SOCK_Dgram read_socket_
The broadcast socket we are reading from.
madara::utility::ScopedArray< char > buffer_
buffer for sending
const std::string id_
host:port identifier of this process
This class stores variables and their values for use by any entity needing state information in a thr...
Provides scheduler for dropping packets.
void cleanup(void)
Cleanup function called by thread manager.
Holds basic transport settings.
PacketScheduler & packet_scheduler_
scheduler for mimicking target network conditions
Compiled, optimized KaRL logic.
const QoSTransportSettings * qos_settings_
pointer to qos_settings (if applicable)
Abstract base class for implementing threads.
BroadcastTransportReadThread(const TransportSettings &settings, const std::string &id, const ACE_INET_Addr &address, ACE_SOCK_Dgram_Bcast &socket, BandwidthMonitor &send_monitor, BandwidthMonitor &receive_monitor, PacketScheduler &packet_scheduler)
Constructor.
This class provides a distributed knowledge base to users.
::std::map< std::string, KnowledgeRecord > KnowledgeMap
ACE_SOCK_Dgram_Bcast write_socket_
underlying socket for rebroadcasting
knowledge::ThreadSafeContext * context_
knowledge context
void rebroadcast(const char *print_prefix, MessageHeader *header, const knowledge::KnowledgeMap &records)
Sends a rebroadcast packet.
Container for quality-of-service settings.
Provides monitoring capability of a transport's bandwidth.
Provides functions and classes for the distributed knowledge base.
BandwidthMonitor & receive_monitor_
monitor for receiving bandwidth usage
const TransportSettings & settings_
Transport settings.
Copyright (c) 2015 Carnegie Mellon University.
ACE_INET_Addr address_
The broadcast address we are subscribing to.
madara::knowledge::CompiledExpression on_data_received_
data received rules, defined in Transport settings
void init(knowledge::KnowledgeBase &knowledge)
Initializes MADARA context-related items.