MADARA
3.2.3
|
Thread for reading knowledge updates through a UDP socket. More...
#include <UdpTransportReadThread.h>
Public Member Functions | |
UdpTransportReadThread (UdpTransport &transport) | |
void | cleanup (void) override |
Cleanup function called by thread manager. More... | |
void | init (knowledge::KnowledgeBase &knowledge) override |
Initializes MADARA context-related items. More... | |
void | rebroadcast (const char *print_prefix, MessageHeader *header, const knowledge::KnowledgeMap &records) |
Sends a rebroadcast packet. More... | |
void | run (void) override |
The main loop internals for the read thread. More... | |
Protected Member Functions | |
virtual void | init_control_vars (knowledge::KnowledgeBase &control) |
Initializes the Java thread implementation's control plane variables. More... | |
Protected Attributes | |
madara::utility::ScopedArray< char > | buffer_ |
buffer for receiving More... | |
knowledge::ThreadSafeContext * | context_ = nullptr |
std::string | name |
The unique name of your thread. More... | |
madara::knowledge::CompiledExpression | on_data_received_ |
data received rules, defined in Transport settings More... | |
madara::knowledge::containers::Integer | paused |
thread safe paused flag that may be set by the Threader More... | |
madara::knowledge::containers::Integer | terminated |
thread safe terminated flag that may be set by the Threader base More... | |
UdpTransport & | transport_ |
Thread for reading knowledge updates through a UDP socket.
Definition at line 29 of file UdpTransportReadThread.h.
madara::transport::UdpTransportReadThread::UdpTransportReadThread | ( | UdpTransport & | transport | ) |
Definition at line 10 of file UdpTransportReadThread.cpp.
|
overridevirtual |
Cleanup function called by thread manager.
Reimplemented from madara::threads::BaseThread.
Definition at line 59 of file UdpTransportReadThread.cpp.
|
overridevirtual |
Initializes MADARA context-related items.
knowledge | context for querying current program state |
Reimplemented from madara::threads::BaseThread.
Definition at line 17 of file UdpTransportReadThread.cpp.
|
inlineprotectedvirtualinherited |
Initializes the Java thread implementation's control plane variables.
control | the control plane between Threader and threads |
Reimplemented in madara::threads::JavaThread.
Definition at line 86 of file BaseThread.h.
void madara::transport::UdpTransportReadThread::rebroadcast | ( | const char * | print_prefix, |
MessageHeader * | header, | ||
const knowledge::KnowledgeMap & | records | ||
) |
Sends a rebroadcast packet.
print_prefix | prefix to include before every log message, e.g., "MyTransport::svc" |
header | header for the rebroadcasted packet |
records | records to rebroadcast (already filtered for rebroadcast) |
Definition at line 64 of file UdpTransportReadThread.cpp.
|
overridevirtual |
The main loop internals for the read thread.
Implements madara::threads::BaseThread.
Definition at line 96 of file UdpTransportReadThread.cpp.
|
protected |
buffer for receiving
Definition at line 74 of file UdpTransportReadThread.h.
|
protected |
Definition at line 66 of file UdpTransportReadThread.h.
|
protectedinherited |
The unique name of your thread.
Definition at line 96 of file BaseThread.h.
|
protected |
data received rules, defined in Transport settings
Definition at line 70 of file UdpTransportReadThread.h.
|
protectedinherited |
thread safe paused flag that may be set by the Threader
Definition at line 107 of file BaseThread.h.
|
protectedinherited |
thread safe terminated flag that may be set by the Threader base
Definition at line 102 of file BaseThread.h.
|
protected |
Definition at line 64 of file UdpTransportReadThread.h.