/** * @RDE_HEADER@ * Provide access to Plugins via LtsSession * $Id$ * $HeadURL$ * $Author$ */ #include "plugin_provider_lts_session.h" #include namespace SituationMap { PluginProviderLtsSession::PluginProviderLtsSession(const QPointer &session) : m_session(session) {} QString PluginProviderLtsSession::toString() const { return m_session ? m_session->toString() : QStringLiteral("????"); } std::shared_ptr PluginProviderLtsSession::ismDtc() const { if (!m_ismDtc && m_session) m_session->getDtc(m_ismDtc); return m_ismDtc; } std::shared_ptr PluginProviderLtsSession::ismDataIfc() const { if (!m_ismDataIfc && m_session) m_session->getForeignDataInterface(m_ismDataIfc); return m_ismDataIfc; } bool PluginProviderLtsSession::init(NGL::INGLLogger &logger) { if (!m_session) return false; m_session->getDtc(m_aesDtc); m_session->getForeignGuiInterface(m_aesInfoIfc); // optional m_session->getDtc(m_almDtc); // optional m_session->getFtc(m_almFtc); // optional m_session->getForeignGuiInterface(m_almInfoIfc); // optional m_session->getDtc(m_asmDtc); // optional m_session->getFtc(m_asmFtc); // optional m_session->getDtc(m_bldDtc); // optional m_session->getFtc(m_bldFtc); // optional m_session->getForeignGuiInterface(m_bldInfoIfc); // optional m_session->getDtc(m_cesDtc); m_session->getDtc(m_exmDtc); // optional m_session->getFtc(m_exmFtc); // optional m_session->getDtc(m_fltDtc); // optional m_session->getFtc(m_fltFtc); // optional m_session->getForeignGuiInterface(m_fltParticipantIfc); // not in global m_session->getForeignGuiInterface(m_fltAesIfc); // not in global m_session->getForeignGuiInterface(m_fltBuildingComponentIfc); // not in global m_session->getDtc(m_gimDtc); // optional m_session->getForeignGuiInterface(m_gimIfc); // optional m_session->getDtc(m_gnaDtc); // optional m_session->getForeignGuiInterface(m_gnaIfc); // optional //m_session->getDtc(m_ismDtc); //m_session->getForeignDataInterface(m_ismDataIfc); m_session->getForeignGuiInterface(m_ismGuiIfc); // optional m_session->getDtc(m_opmDtc); // optional m_session->getFtc(m_opmFtc); // optional m_session->getDtc(m_ppmDtc); m_session->getFtc(m_ppmFtc); m_session->getForeignGuiInterface(m_ppmParticipantInfoIfc); // optional m_session->getDtc(m_pdmDtc); m_session->getForeignGuiInterface(m_ocParticipantInfoIfc); // optional m_session->getForeignGuiInterface(m_smoServiceMonitorIfc); // optional m_session->getDtc(m_tgtDtc); // optional m_session->getDtc(m_cmoDtc); // optional bool bRet = true; if (!m_aesDtc) { WARNING_LOG(logger) << "Can not retrieve AreaEffectSimulation::DTC"; bRet = false; } if (!m_cesDtc) { WARNING_LOG(logger) << "Can not retrieve CentralEffectSimulation::DTC"; bRet = false; } if (!m_fltAesIfc && m_session->partitionType() != IDL::PartitionType::Global) { WARNING_LOG(logger) << "Can not retrieve FilterManagement::GuiIFC"; bRet = false; } // GUEZE-1769: Schnappschuss und ABT: Entfernen Filter für Etagen / Komponenten // Nachtrag zu r 59394 (branch 23_1_guez_bugfixing) // Wenn das Plugin flt.building_cmpnt nur in Global geladen wird (ResourceApp), // dann muss es im plugin_provider_lts_session.cpp optional sein. // Check dementsprechend nun folgendermaßen: if (!m_fltBuildingComponentIfc && m_session->app() == LtsAppDescriptor::App::ResourceManager) { ERROR_LOG(logger) << "Can not retrieve FilterManagement::BuildingComponentGuiIfc"; bRet = false; } // if (!m_ismDtc) // { // WARNING_LOG(logger) << "Can not retrieve InfrastructureManagement::DTC"; // bRet = false; // } // if (!m_ismDataIfc) // { // WARNING_LOG(logger) << "Can not retrieve InfrastructureManagement::DataIFC"; // bRet = false; // } if (!m_ppmDtc) { WARNING_LOG(logger) << "Can not retrieve ParticipantManagement::DTC"; bRet = false; } connect(m_session.data(), &LtsSession::LtsSessionDataDds::partitionTimeChanged, this, &PluginProviderLtsSession::partitionTimeChanged, Qt::UniqueConnection); connect(m_session.data(), &LtsSession::LtsSession::workspaceIdChanged, this, &PluginProviderLtsSession::workspaceIdChanged, Qt::UniqueConnection); if (!bRet) { FATAL_LOG(logger) << "SitMap - PluginProvider failed!!!"; FATAL_LOG(logger) << "SitMap - PluginProvider failed!!!"; FATAL_LOG(logger) << "SitMap - PluginProvider failed!!!"; } return bRet; } } // namespace SituationMap