update the inbound queue lock
This commit is contained in:
27
src/PlugIn.h
27
src/PlugIn.h
@@ -15,6 +15,7 @@
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <aman/types/Communication.h>
|
||||
#include <aman/types/Inbound.h>
|
||||
|
||||
#pragma warning(push, 0)
|
||||
#include <protobuf/BaseTypes.pb.h>
|
||||
@@ -46,11 +47,17 @@ namespace aman {
|
||||
void validateBackendData();
|
||||
aman::Aircraft* generateAircraftMessage(EuroScopePlugIn::CRadarTarget& target);
|
||||
void generateAircraftReportMessage(EuroScopePlugIn::CRadarTarget& radarTarget, aman::AircraftReport* report);
|
||||
void addUpdateQueue(EuroScopePlugIn::CRadarTarget& radarTarget);
|
||||
void updateInbound(EuroScopePlugIn::CRadarTarget& radarTarget);
|
||||
void updateInbound(EuroScopePlugIn::CFlightPlan& plan);
|
||||
void updateSequence(std::shared_ptr<aman::AircraftSequence>& sequence);
|
||||
|
||||
Communication m_configuration;
|
||||
std::shared_ptr<RadarScreen> m_screen;
|
||||
std::mutex m_updateQueueLock;
|
||||
std::map<std::string, std::list<std::string>> m_updateQueue;
|
||||
std::mutex m_inboundsQueueLock;
|
||||
std::map<std::string, Inbound> m_inbounds;
|
||||
std::list<std::string> m_forcedToBackendCallsigns;
|
||||
bool m_compatible;
|
||||
|
||||
@@ -94,11 +101,31 @@ namespace aman {
|
||||
* @param[in] area The clicked area
|
||||
*/
|
||||
void OnFunctionCall(int functionId, const char* itemString, POINT pt, RECT area) override;
|
||||
/**
|
||||
* @brief Called as soon as a tag entry needs to be updated
|
||||
* @param[in] flightPlan The requested flight plan
|
||||
* @param[in] radarTarget The corresponding RADAR target
|
||||
* @param[in] itemCode The requested item
|
||||
* @param[in] tagData The requested tag data
|
||||
* @param[in] itemString The buffer to store the data
|
||||
* @param[in] colorCode The color code of the entry
|
||||
* @param[in] rgb The colorization of the entry
|
||||
* @param[in] fontSize The size of the text
|
||||
*/
|
||||
void OnGetTagItem(EuroScopePlugIn::CFlightPlan flightPlan, EuroScopePlugIn::CRadarTarget radarTarget,
|
||||
int itemCode, int tagData, char itemString[16], int* colorCode, COLORREF* rgb,
|
||||
double* fontSize) override;
|
||||
/**
|
||||
* @brief Called every second
|
||||
* @param[in] counter The counter that indicates the seconds
|
||||
*/
|
||||
void OnTimer(int counter) override;
|
||||
/**
|
||||
* @brief Called as soon as a controller updated the flight plan
|
||||
* @param[in] flightPlan The updated flight plan
|
||||
* @param[in] type The changed information
|
||||
*/
|
||||
void OnFlightPlanControllerAssignedDataUpdate(EuroScopePlugIn::CFlightPlan flightPlan, int type) override;
|
||||
/**
|
||||
* @brief Called as soon as a radar target position is updated
|
||||
* @param[in] radarTarget The updated radar target
|
||||
|
||||
Reference in New Issue
Block a user