MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
NddsTransportReadThread.h
Go to the documentation of this file.
1
#ifndef _NDDS_TRANSPORT_READ_THREAD_H_
2
#define _NDDS_TRANSPORT_READ_THREAD_H_
3
4
#include <string>
5
6
#include "
madara/knowledge/ThreadSafeContext.h
"
7
#include "
madara/transport/Transport.h
"
8
9
#include <ndds/ndds_cpp.h>
10
#include "madara/transport/ndds/NddsKnowledgeUpdate.h"
11
#include "madara/transport/ndds/NddsKnowledgeUpdateSupport.h"
12
13
#include "ace/Task.h"
14
#include "ace/Mutex.h"
15
#include "ace/Barrier.h"
16
#include "ace/Atomic_Op_T.h"
17
#include "ace/Thread_Mutex.h"
18
19
#include "ace/Synch.h"
20
21
namespace
madara
22
{
23
namespace
transport
24
{
30
class
NDDSReadThread
:
public
ACE_Task<ACE_MT_SYNCH>
31
{
32
public
:
33
NDDSReadThread
(
34
const
std::string
&
id
,
35
knowledge::ThreadSafeContext
& context,
36
NDDSKnowledgeUpdateDataReader * reader);
37
~NDDSReadThread
();
38
40
int
enter_barrier
(
void
);
41
int
close
(
void
);
42
int
svc
(
void
);
43
void
wait_for_ready
(
void
);
44
private
:
45
void
handle_assignment
(NDDSKnowledgeUpdate & data);
46
void
handle_multiassignment
(NDDSKnowledgeUpdate & data);
47
48
::std::vector< ::std::string>
assignment_symbols_
;
49
50
const
std::string
id_
;
51
knowledge::ThreadSafeContext
&
context_
;
53
ACE_Barrier
barrier_
;
54
ACE_Atomic_Op<ACE_Mutex,bool>
terminated_
;
55
56
ACE_Thread_Mutex
mutex_
;
57
transport::Condition
is_not_ready_
;
58
bool
is_ready_
;
59
bool
enable_mutexing_
;
60
61
// NDDS variables
62
NDDSKnowledgeUpdateDataReader *
data_reader_
;
63
};
64
}
65
}
66
67
#endif
madara::transport::NDDSReadThread::is_not_ready_
transport::Condition is_not_ready_
Definition:
NddsTransportReadThread.h:57
madara::transport::NDDSReadThread::handle_multiassignment
void handle_multiassignment(NDDSKnowledgeUpdate &data)
Definition:
NddsTransportReadThread.cpp:132
madara::transport::NDDSReadThread::data_reader_
NDDSKnowledgeUpdateDataReader * data_reader_
Definition:
NddsTransportReadThread.h:62
madara::transport::NDDSReadThread::wait_for_ready
void wait_for_ready(void)
Definition:
NddsTransportReadThread.cpp:45
madara::transport::NDDSReadThread::mutex_
ACE_Thread_Mutex mutex_
Definition:
NddsTransportReadThread.h:56
madara::transport::NDDSReadThread::enter_barrier
int enter_barrier(void)
service exit point for thread
Definition:
NddsTransportReadThread.cpp:51
madara::transport::NDDSReadThread::context_
knowledge::ThreadSafeContext & context_
Definition:
NddsTransportReadThread.h:51
madara::transport::NDDSReadThread::enable_mutexing_
bool enable_mutexing_
Definition:
NddsTransportReadThread.h:59
ThreadSafeContext.h
madara::knowledge::ThreadSafeContext
This class stores variables and their values for use by any entity needing state information in a thr...
Definition:
ThreadSafeContext.h:82
madara::transport::NDDSReadThread::svc
int svc(void)
Definition:
NddsTransportReadThread.cpp:211
madara::transport::NDDSReadThread::~NDDSReadThread
~NDDSReadThread()
Definition:
NddsTransportReadThread.cpp:30
Transport.h
madara::transport::NDDSReadThread::handle_assignment
void handle_assignment(NDDSKnowledgeUpdate &data)
Definition:
NddsTransportReadThread.cpp:61
madara::transport::NDDSReadThread::is_ready_
bool is_ready_
Definition:
NddsTransportReadThread.h:58
madara::transport::Condition
ACE_Condition< ACE_Thread_Mutex > Condition
Definition:
Transport.h:53
madara::transport::NDDSReadThread::NDDSReadThread
NDDSReadThread(const std::string &id, knowledge::ThreadSafeContext &context, NDDSKnowledgeUpdateDataReader *reader)
Definition:
NddsTransportReadThread.cpp:11
madara::knowledge::tags::string
static constexpr struct madara::knowledge::tags::string_t string
madara::transport::NDDSReadThread
Thread for reading knowledge updates via a NDDS waitset (deprecated and unused).
Definition:
NddsTransportReadThread.h:30
madara::transport::NDDSReadThread::id_
const std::string id_
Definition:
NddsTransportReadThread.h:50
madara::transport::NDDSReadThread::barrier_
ACE_Barrier barrier_
typdef for a threadsafe counter
Definition:
NddsTransportReadThread.h:53
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::transport::NDDSReadThread::terminated_
ACE_Atomic_Op< ACE_Mutex, bool > terminated_
Definition:
NddsTransportReadThread.h:54
madara::transport::NDDSReadThread::close
int close(void)
Definition:
NddsTransportReadThread.cpp:36
madara::transport::NDDSReadThread::assignment_symbols_
::std::vector< ::std::string > assignment_symbols_
Definition:
NddsTransportReadThread.h:48
include
madara
transport
ndds
NddsTransportReadThread.h
Generated on Wed May 9 2018 18:17:16 for MADARA by
1.8.11