/** * @RDE_HEADER@ * GenericFTS Interface * $Id$ * $HeadURL$ * $Author$ */ #pragma once #include #include /** * 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 &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 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 &replyData) = 0; }; }