83 lines
2.6 KiB
C++
83 lines
2.6 KiB
C++
/*
|
|
* @brief Defines the EuroScope plug-in
|
|
* @file src/PlugIn.h
|
|
* @author Sven Czarnian <devel@svcz.de>
|
|
* @copyright Copyright 2021 Sven Czarnian
|
|
* @license This project is published under the GNU General Public License v3 (GPLv3)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
#pragma warning(push, 0)
|
|
#include <EuroScopePlugIn.h>
|
|
#pragma warning(pop)
|
|
|
|
#include <aman/types/Communication.h>
|
|
|
|
#pragma warning(push, 0)
|
|
#include <protobuf/BaseTypes.pb.h>
|
|
#include <protobuf/AircraftReport.pb.h>
|
|
#include <protobuf/Communication.pb.h>
|
|
#pragma warning(pop)
|
|
|
|
#include "RadarScreen.h"
|
|
|
|
namespace aman {
|
|
/**
|
|
* @brief Defines the EuroScope plug-in
|
|
* @ingroup euroscope
|
|
*/
|
|
class PlugIn : public EuroScopePlugIn::CPlugIn {
|
|
public:
|
|
/**
|
|
* @brief Defines the different internal and external tag functions
|
|
*/
|
|
enum class TagItemFunction {
|
|
};
|
|
|
|
private:
|
|
enum class TagItemElement {
|
|
};
|
|
|
|
aman::Aircraft* generateAircraftMessage(const EuroScopePlugIn::CRadarTarget& target);
|
|
void generateAircraftReportMessage(const EuroScopePlugIn::CRadarTarget& radarTarget, aman::AircraftReport* report);
|
|
|
|
Communication m_configuration;
|
|
std::shared_ptr<RadarScreen> m_screen;
|
|
|
|
public:
|
|
/**
|
|
* @brief Creates a new plug-in
|
|
*/
|
|
PlugIn();
|
|
/**
|
|
* @brief Destroys all internal strcutures
|
|
*/
|
|
~PlugIn() noexcept;
|
|
|
|
PlugIn(const PlugIn&) = delete;
|
|
PlugIn(PlugIn&&) = delete;
|
|
PlugIn& operator=(const PlugIn&) = delete;
|
|
PlugIn& operator=(PlugIn&&) = delete;
|
|
|
|
/**
|
|
* @brief Called as soon as a new RADAR screen needs to be created
|
|
* @param[in] displayName The display's name
|
|
* @param[in] needsRadarContent True of the screen needs RADAR content
|
|
* @param[in] geoReferenced True if the positions are geo referenced
|
|
* @param[in] canBeSaved True if the configurations can be saved
|
|
* @param[in] canBeCreated True if the configuration can be created
|
|
* @return The created RADAR screen
|
|
*/
|
|
EuroScopePlugIn::CRadarScreen* OnRadarScreenCreated(const char* displayName, bool needsRadarContent, bool geoReferenced,
|
|
bool canBeSaved, bool canBeCreated) override;
|
|
/**
|
|
* @brief Called as soon as a radar target position is updated
|
|
* @param[in] radarTarget The updated radar target
|
|
*/
|
|
void OnRadarTargetPositionUpdate(EuroScopePlugIn::CRadarTarget radarTarget) override;
|
|
};
|
|
}
|