49 lines
1.2 KiB
C++
Executable File
49 lines
1.2 KiB
C++
Executable File
|
|
|
|
|
|
#include "generic_fts_internal.h"
|
|
#include <DDS/QosProfile/DDS_DefaultQos.h>
|
|
#include <QMetaMethod>
|
|
#include <NGLLogger/INGLLogger.h>
|
|
#include <qglobal.h>
|
|
|
|
namespace FTS
|
|
{
|
|
|
|
void GenericFtsInternal::printDefaultQos(NGL::INGLLogger &logger)
|
|
{
|
|
if (logger.isDebugEnabled())
|
|
DDS::QosProfile::print(dds::core::QosProvider::Default(), logger);
|
|
}
|
|
|
|
dds::sub::qos::DataReaderQos GenericFtsInternal::readerQos(NGL::INGLLogger &logger)
|
|
{
|
|
dds::sub::qos::DataReaderQos qos = DDS::QosProfile::dataReaderDefault(DDS::QosProfile::TopicType::FunctionTopic);
|
|
if (logger.isDebugEnabled())
|
|
DDS::QosProfile::print(qos, logger);
|
|
return qos;
|
|
}
|
|
|
|
dds::pub::qos::DataWriterQos GenericFtsInternal::writerQos(NGL::INGLLogger &logger)
|
|
{
|
|
dds::pub::qos::DataWriterQos qos = DDS::QosProfile::dataWriterDefault(DDS::QosProfile::TopicType::FunctionTopic);
|
|
if (logger.isDebugEnabled())
|
|
DDS::QosProfile::print(qos, logger);
|
|
return qos;
|
|
}
|
|
|
|
void GenericFtsInternal::dataAvailable()
|
|
{
|
|
if (!enqueueRequests())
|
|
return;
|
|
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
|
|
if (!QMetaObject::invokeMethod(this, "processRequests", Qt::QueuedConnection))
|
|
abort();
|
|
#else
|
|
QMetaObject::invokeMethod(this, &GenericFtsInternal::processRequests, Qt::QueuedConnection);
|
|
#endif
|
|
}
|
|
|
|
|
|
}
|