Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+103
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Custom ppm functions (extends tab_db_impl.cpp/.h)
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <ParticipantManagement/ppm_dtc_impl.h>
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
class DtcImplCustom final : public Interface::DtcImpl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DtcImplCustom(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector);
|
||||
bool rootTemplates(QVector<TemplateParticipant> &templateVector) const override;
|
||||
bool templateParticipantsFromTemplateId(int rootTemplateId, QVector<TemplateParticipant> &templateVector) override;
|
||||
TemplateData convertFromParticipantTemplateToTemplateData(const TemplateParticipant &inputTemplate) const override;
|
||||
ParticipantData convertParticipantToParticipantData(const Participant &inputParticipant) const override;
|
||||
ParticipantManagement::StateInformation youngestStateInformation(
|
||||
const std::vector<ParticipantManagement::StateInformation> &stateList /*, bool debug = false*/) const override;
|
||||
SanitationResult proceduresDone(const std::vector<ParticipantManagement::StateInformation> &stateList) const override;
|
||||
|
||||
/* To get this method working, the topics Type and Participant have to be enabled */
|
||||
QMap<int, Participant> units() const override;
|
||||
|
||||
/* To get this method working, the topics Type and Participant have to be enabled */
|
||||
bool participantIdsByUnit(int unitId, const QMap<int, Participant> &participants, QSet<int> &participantIds) override;
|
||||
|
||||
/* To get the visible parties, the topic Party has to be enabled */
|
||||
bool visibleParties(QMap<int32_t, Party> &visibleParties, const QVector<int> &filter) const override;
|
||||
|
||||
/* To get the hole hierarchy String of own and superior designators */
|
||||
QString hierarchyFromParticipant(int participantId) override;
|
||||
QString hierarchyFromParticipant(int participantId, const QMap<int, Participant> &participants) const override;
|
||||
|
||||
bool isEquipmentNumberInUse(int equipmentNumber, int &exerciseId) const override;
|
||||
bool isTypeInUse(int typeId) const override;
|
||||
bool isTypePatientSimulator(int typeId) const override;
|
||||
bool isAdlerType(int typeId) const override;
|
||||
bool isArtilleryType(int typeId) const override;
|
||||
bool isEditable(int typeId) const override;
|
||||
bool isAdlerVerbund(int typeId) const override;
|
||||
bool isPartyAdlerVerbund(int typeId) const override;
|
||||
|
||||
Type getTypeFromAdlerType(const QString &adlerTypeName, bool isUnit, bool isVerbund) override;
|
||||
|
||||
bool isTypeUas(int typeId) override;
|
||||
|
||||
UAS getUasByParticipantId(int participantId, int exerciseId) override;
|
||||
|
||||
int getParticipantFromPrf(int prf) const override;
|
||||
int getPrfFromParticipant(int participantId) const override;
|
||||
|
||||
/* Searching the participant ID for the given EquipmentNumber */
|
||||
int participantIdByEquipmentNumber(int equipmentNumber) const override;
|
||||
|
||||
/* Searching the EquipmentNumber for the given participant Id */
|
||||
int equipmentNumberByParticipantId(int participantId) const override;
|
||||
|
||||
/* Searching the UAS Middion ID for the given EquipmentNumber */
|
||||
int uasMissionIdByEquipmentNumber(int equipmentNumber) const override;
|
||||
|
||||
/* Searching to party ID from the HLA Force Identifier */
|
||||
int partyIdFromForceIdentifier(HlaForceIdentifierEnum inputForceIdentifier) const override;
|
||||
|
||||
/* returns true is SAA is connected for the party */
|
||||
ConnectState saaConnectedState(const int partyId) override;
|
||||
|
||||
// returns all participant IDs that have a position in the given polygon
|
||||
QVector<int> getParticipantsByPolygon(const QPolygonF &polygon, bool includeUnits, bool includeOc) override;
|
||||
|
||||
// returns all participants with superioId == participantId
|
||||
QVector<int> getSubordinatesByParticipant(const int participantId) override;
|
||||
|
||||
QMap<double, int> sortByDistance(const double lon, const double lat, const QVector<int> &participantIds) override;
|
||||
|
||||
// provides all participantIds of the drone type (type UAS)
|
||||
QVector<int> getUasIds() override;
|
||||
|
||||
// return uas entry by pariticpant id
|
||||
ParticipantManagement::UAS getUasByParticipantId(int participantId, int exerciseId) const override;
|
||||
|
||||
ParticipantManagement::MissionAction currentMissionAction(int missionPlanId) const override;
|
||||
|
||||
ParticipantManagement::Participant getParticipantByInternalName(int partyId, const QString &unitName, const QString &internalName) const override;
|
||||
|
||||
private: // methods
|
||||
static QSet<int> recursiveInferiosForParticipant(int participantId, const QMap<int, Participant> &participants);
|
||||
static QString lookUpHierachy(int participantId, const QMap<int, Participant> &participants);
|
||||
QVector<TemplateParticipant> inferiorTemplates(int templateId);
|
||||
bool getNeedsIp(const std::string &s) const;
|
||||
bool getNeedsPort(const std::string &s) const;
|
||||
bool getIsUAS(const std::string &s) const;
|
||||
};
|
||||
} // namespace Interface
|
||||
} // namespace ParticipantManagement
|
||||
Reference in new issue
Block a user