Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+83
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* DdsHandler for DDS
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Hanna E. Rathje, SLSE, 2015-09-02
|
||||
*/
|
||||
|
||||
#include "dds_handler.h"
|
||||
|
||||
#include "avm_dts.h"
|
||||
#include "avm_fts.h"
|
||||
|
||||
#include <AssetManagement/asm_dtc.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include <AudioVideoManagement/avm_dts.h>
|
||||
#include <AudioVideoManagement/avm_fts.h>
|
||||
#include <InfrastructureManagement/ism_dtc.h>
|
||||
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <DDS/Core/pacemaker.h>
|
||||
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Any))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
bool DdsHandler::init(const QStringList &qosFileList)
|
||||
{
|
||||
if (!m_ddsConnector->init(qosFileList))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
||||
return false;
|
||||
}
|
||||
|
||||
// default initialize Publisher and Subscriber
|
||||
m_ddsConnector->initPublisherSubscriber();
|
||||
// no batched writer possible until frequency set data is no longer that big (currently 1800rows)
|
||||
//m_ddsConnector->enableBatchedWriter(true);
|
||||
|
||||
// Pacemaker
|
||||
m_pacemaker = std::make_shared<Core::Pacemaker>(m_ddsConnector);
|
||||
m_topicLockMaster = std::make_shared<Core::TopicLockMaster>(m_ddsConnector);
|
||||
|
||||
m_dts = Interface::Dts::create(m_ddsConnector);
|
||||
m_fts = Interface::Fts::create(m_ddsConnector);
|
||||
m_exmDtc = ExerciseManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
m_ismDtc = InfrastructureManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
m_asmDtc = AssetManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
|
||||
bool bRet = m_dts->enableAll();
|
||||
bRet &= m_fts->enableAll();
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
bool DdsHandler::enableDtcClients()
|
||||
{
|
||||
Q_ASSERT(m_exmDtc);
|
||||
Q_ASSERT(m_ismDtc);
|
||||
Q_ASSERT(m_asmDtc);
|
||||
bool status = m_exmDtc->enableExercise() &&
|
||||
m_ismDtc->enableInstrumentationAsset() &&
|
||||
m_ismDtc->enableMainStructureElement() &&
|
||||
m_ismDtc->enableMountingPointAsset() &&
|
||||
m_asmDtc->enableAsset();
|
||||
Q_ASSERT(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
dds::domain::DomainParticipant DdsHandler::domainParticipant() const
|
||||
{
|
||||
return m_ddsConnector->getDomainParticipant();
|
||||
}
|
||||
|
||||
} // Namespace AudioVideoManagement
|
||||
Reference in new issue
Block a user