[traffic] Allow decoding to be interrupted after each message

Message deduplication currently disabled

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-05-15 23:54:21 +03:00
parent 3a713c477a
commit cf57942a0b
2 changed files with 113 additions and 73 deletions

View File

@@ -246,14 +246,6 @@ private:
*/
void ConsolidateFeedQueue();
/**
* @brief Merges new messages from `m_feedQueue` into a message cache.
*
* Existing messages in `cache` will be overwritten by newer messages with the same ID in `m_feedQueue`.
* @param cache The message cache.
*/
void UpdateMessageCache(std::map<std::string, traffxml::TraffMessage> & cache);
/**
* @brief Initializes the data sources for an OpenLR decoder.
*
@@ -261,6 +253,11 @@ private:
*/
void InitializeDataSources(std::vector<FrozenDataSource> &dataSources);
/**
* @brief Removes the first message from the first feed and decodes it.
*/
void DecodeFirstMessage();
/**
* @brief Decodes a single message to its segments and their speed groups.
*
@@ -489,6 +486,11 @@ private:
*/
threads::SimpleThread m_thread;
/**
* @brief When the last response was received.
*/
std::chrono::time_point<std::chrono::steady_clock> m_lastResponseTime;
/**
* @brief Whether active MWMs have changed since the last request.
*/
@@ -530,6 +532,11 @@ private:
* Used to decode TraFF locations into road segments on the map.
*/
openlr::OpenLRDecoder m_openLrDecoder;
/**
* @brief Map between MWM IDs and their colorings.
*/
std::map<MwmSet::MwmId, traffic::TrafficInfo::Coloring> m_allMwmColoring;
};
extern std::string DebugPrint(TrafficManager::TrafficState state);