Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* DdsHandler for DDS
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-04-14
|
||||
*/
|
||||
|
||||
#include "dds_handler_exercise.h"
|
||||
|
||||
#include <DDS/Core/pacemaker.h>
|
||||
#include <dds/domain/DomainParticipant.hpp>
|
||||
|
||||
namespace WarehouseManagement
|
||||
{
|
||||
|
||||
DdsHandlerExercise::DdsHandlerExercise(const dds::domain::DomainParticipant &dp, int exerciseId)
|
||||
: m_ddsConnector(new DDSConnector::DdsConnector(dp, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandlerExercise"))
|
||||
{
|
||||
m_ddsConnector->setDomainParticipant(dp);
|
||||
DEBUG_LOG(m_logger) << "DdsHandlerExercise for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
bool DdsHandlerExercise::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();
|
||||
|
||||
m_ppmDtc = ParticipantManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
bool bRet = m_ppmDtc->enableParty() &&
|
||||
m_ppmDtc->enableParticipant();
|
||||
|
||||
m_ppmFtc = ParticipantManagement::Interface::Ftc::create(m_ddsConnector);
|
||||
bRet &= m_ppmFtc->enableRegisterParticipant();
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
} // Namespace WarehouseManagement
|
||||
Reference in new issue
Block a user