Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+50
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GenericFTS Interface
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <rti/core/SampleIdentity.hpp>
|
||||
#include <QVector>
|
||||
|
||||
/**
|
||||
* Note:
|
||||
*
|
||||
* The FTS calls a slot of the calling object (CO) to send the requestData to the CO.
|
||||
* This slot needs to be implemented by the calling object (CO):
|
||||
*
|
||||
* public Q_SLOTS:
|
||||
* void handleFunctionTopicRequest(const rti::core::SampleIdentity &requestIdentity, const TOPICTYPE_REQUEST &requestData);
|
||||
*
|
||||
* The CO processes the request and sends the feedback (and possible reply data) back to the FTS
|
||||
* by calling the method:
|
||||
*
|
||||
* void sendReply(const rti::core::SampleIdentity &requestIdentity, const QVector<TOPICTYPE_REPLY> &replyData )
|
||||
*
|
||||
*
|
||||
* - The FTS cannot use SIGNALS, because templates and QObject are incompatible.
|
||||
* - The FTS and the CO are in different threads
|
||||
*
|
||||
* => reply data will be stored in a queue (std:queue) and the handling is done by a semaphore (QSemaphore)
|
||||
*
|
||||
* */
|
||||
|
||||
namespace FTS
|
||||
{
|
||||
// uses FTS (static)
|
||||
template <typename TOPICTYPE_REQUEST, typename TOPICTYPE_REPLY>
|
||||
class GenericFts
|
||||
{
|
||||
public:
|
||||
GenericFts() = default;
|
||||
virtual ~GenericFts() = default;
|
||||
|
||||
virtual bool sendReply(const rti::core::SampleIdentity &requestIdentity, const TOPICTYPE_REPLY &replyData) = 0;
|
||||
virtual bool sendReply(const rti::core::SampleIdentity &requestIdentity, const QVector<TOPICTYPE_REPLY> &replyData) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user