Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+70
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* Plugin CES Mission Plan
|
||||
* $Id: $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/25_03_etb_uas/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.h $
|
||||
* $Author: Kemayou_s $
|
||||
* Created by Steve Kemayou, ESZS, 2025-06-25
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
#include "ces_mission_plan_object.h"
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
// AES-Handling for participants
|
||||
namespace CES_MISSIONPLAN
|
||||
{
|
||||
struct EnterLeaveType
|
||||
{
|
||||
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
|
||||
bool isAlreadySupplied = false;
|
||||
};
|
||||
|
||||
|
||||
class CesMissionPlanHandler : public QObject
|
||||
//, protected TrainingAreaBase::Interface::Ftc::SendCesHitReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CesMissionPlanHandler(const std::shared_ptr<CentralEffectSimulation::DdsHandler> &ddsHandler,
|
||||
const std::shared_ptr<CentralEffectSimulation::HandlerParticipant> &participantHandler,
|
||||
QObject *parent = nullptr);
|
||||
|
||||
~CesMissionPlanHandler();
|
||||
|
||||
/**
|
||||
* Initialize the handler to manage information from player management
|
||||
*/
|
||||
bool init();
|
||||
void updateMissionPlanList(const ParticipantManagement::MissionPlan &data);
|
||||
protected:
|
||||
void sendNextMissionAction();
|
||||
private Q_SLOTS:
|
||||
|
||||
void onUasChanged(const ParticipantManagement::UAS &data, DataModification modType);
|
||||
void onMissionPlanChanged(const ParticipantManagement::MissionPlan &data, DataModification modType);
|
||||
void onSendNextMissionAction(const ParticipantManagement::MissionAction &msa);
|
||||
|
||||
private: // methoden
|
||||
|
||||
|
||||
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
bool isUasInAutoMode(int participantId);
|
||||
bool isUasCombatReady(int participantId);
|
||||
|
||||
private: // attributes
|
||||
|
||||
std::shared_ptr<CentralEffectSimulation::DdsHandler> m_ddsHandler; ///< Pointer to VOM DDS handler
|
||||
std::shared_ptr<CentralEffectSimulation::HandlerParticipant> m_handlerParticipant;
|
||||
|
||||
QHash<int/*PlanId*/, CesMissionPlanObject *> m_missionPlanObjects; // Only: MissionBegin is reached and fulfilled = 0;
|
||||
int m_requestId = 1;
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
};
|
||||
} // namespace CES_MISSIONPLAN
|
||||
|
||||
Reference in new issue
Block a user