prepare the receive aircraft position updates

This commit is contained in:
Sven Czarnian
2021-08-14 10:37:08 +02:00
parent c7ab3bd551
commit 8a3c2d3cb8
2 changed files with 39 additions and 1 deletions

View File

@@ -56,3 +56,21 @@ PlugIn::PlugIn() :
}
PlugIn::~PlugIn() noexcept { }
EuroScopePlugIn::CRadarScreen* PlugIn::OnRadarScreenCreated(const char* displayName, bool needsRadarContent, bool geoReferenced,
bool canBeSaved, bool canBeCreated) {
std::ignore = needsRadarContent;
std::ignore = geoReferenced;
std::ignore = canBeSaved;
std::ignore = canBeCreated;
std::ignore = displayName;
if (nullptr == this->m_screen)
this->m_screen = std::make_shared<RadarScreen>();
return this->m_screen.get();
}
void PlugIn::OnRadarTargetPositionUpdate(EuroScopePlugIn::CRadarTarget radarTarget) {
}

View File

@@ -16,6 +16,8 @@
#include <aman/types/Communication.h>
#include "RadarScreen.h"
namespace aman {
/**
* @brief Defines the EuroScope plug-in
@@ -34,6 +36,7 @@ namespace aman {
};
Communication m_configuration;
std::shared_ptr<RadarScreen> m_screen;
public:
/**
@@ -49,5 +52,22 @@ namespace aman {
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;
};
}