This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "mission/position_resolver.hpp"
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <atomic>
|
||||
@@ -11,11 +13,14 @@
|
||||
namespace lm {
|
||||
|
||||
class Database;
|
||||
class MapStore;
|
||||
class MissionStore;
|
||||
class TransitionStore;
|
||||
|
||||
class MissionQueue
|
||||
{
|
||||
public:
|
||||
explicit MissionQueue(Database& db);
|
||||
MissionQueue(Database& db, MapStore& maps, TransitionStore& transitions, MissionStore& missions);
|
||||
~MissionQueue();
|
||||
|
||||
MissionQueue(const MissionQueue&) = delete;
|
||||
@@ -36,6 +41,10 @@ private:
|
||||
enum class LoopControl { None, Break, Continue };
|
||||
|
||||
Database& db_;
|
||||
MapStore& maps_;
|
||||
TransitionStore& transitions_;
|
||||
MissionStore& missions_;
|
||||
PositionResolver position_resolver_;
|
||||
mutable std::recursive_mutex mu_;
|
||||
nlohmann::json queue_;
|
||||
nlohmann::json runner_;
|
||||
@@ -55,7 +64,13 @@ private:
|
||||
LoopControl executeActionsUnlocked(const nlohmann::json& actions,
|
||||
const nlohmann::json& parameters,
|
||||
nlohmann::json& log,
|
||||
int loop_depth);
|
||||
int loop_depth,
|
||||
bool allow_auto_transition = true);
|
||||
void runAutoTransitionIfNeeded(const std::string& from_map_id,
|
||||
const std::string& to_map_id,
|
||||
const nlohmann::json& parameters,
|
||||
nlohmann::json& log,
|
||||
int loop_depth);
|
||||
void sleepMs(int ms);
|
||||
void setRunnerState(const std::string& state, const std::string& message = "");
|
||||
void insertByPriorityUnlocked(nlohmann::json& entry);
|
||||
|
||||
Reference in New Issue
Block a user