Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Routing Test - data writer thread
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <queue>
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
#include <DDS/Routing/routing_plugin.h>
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
namespace RoutingService
|
||||
{
|
||||
class DataWriterTask final : public DataWriterTaskInterface
|
||||
{
|
||||
public:
|
||||
DataWriterTask();
|
||||
~DataWriterTask();
|
||||
|
||||
void enqueue(SampleWriterInterface *swi) override;
|
||||
void shutdown();
|
||||
bool waitForData();
|
||||
|
||||
SampleWriterInterface *getNextSampleWriter();
|
||||
void writeSamples();
|
||||
|
||||
private:
|
||||
std::queue<SampleWriterInterface *> m_writerQueue;
|
||||
std::mutex m_queueLock;
|
||||
std::condition_variable m_waitForDataCondition;
|
||||
bool m_doShutdown;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace RoutingService
|
||||
Reference in new issue
Block a user