DUNE: Uniform Navigational Environment
2.4.2
|
Scheduler for plan and maneuver actions.
Classes | |
struct | EventActions |
struct | TimedAction |
Public Types | |
enum | ActionType { TYPE_DEACT, TYPE_ACT } |
typedef std::stack< TimedAction > | TimedStack |
typedef std::map< std::string, EventActions > | EventMap |
typedef std::map< std::string, uint8_t > | EASMap |
typedef std::pair< std::string, uint8_t > | EASPair |
Public Member Functions | |
ActionSchedule (Tasks::Task *task, const IMC::PlanSpecification *spec, const std::vector< IMC::PlanManeuver * > &nodes, const Duration::ManeuverDuration &durations, const Duration::ManeuverDuration::const_iterator last_dur, const std::map< std::string, IMC::EntityInfo > &cinfo) | |
ActionSchedule (Tasks::Task *task, const IMC::PlanSpecification *spec, const std::vector< IMC::PlanManeuver * > &nodes, const std::map< std::string, IMC::EntityInfo > &cinfo) | |
void | updateSchedule (float time_left) |
void | flushTimed (void) |
void | planStarted (std::vector< std::string > &affected) |
void | planStopped (const std::vector< std::string > &affected) |
void | maneuverStarted (const std::string &id) |
void | maneuverDone (const std::string &id) |
float | getEarliestSchedule (void) const |
bool | onEntityActivationState (const std::string &id, const IMC::EntityActivationState *msg) |
bool | waitingForDevice (void) |
float | calibTimeLeft (void) |
typedef std::map<std::string, uint8_t> Plan::Engine::ActionSchedule::EASMap |
Map of entity names to entity activation states.
typedef std::pair<std::string, uint8_t> Plan::Engine::ActionSchedule::EASPair |
Pair for EASMap.
typedef std::map<std::string, EventActions> Plan::Engine::ActionSchedule::EventMap |
Map to address event based actions.
typedef std::stack<TimedAction> Plan::Engine::ActionSchedule::TimedStack |
Stack of timed actions.
|
inline |
Default constructor.
[in] | task | pointer to task |
[in] | spec | pointer to PlanSpecification message |
[in] | nodes | vector of sequential PlanManeuvers that describe the plan |
[in] | durations | information regarding each maneuvers duration |
[in] | last_dur | iterator to last maneuver with a valid duration |
[in] | cinfo | map of components info |
|
inline |
Alternative constructor for when plan is not sequential.
There will be no pre-scheduling using this constructor.
[in] | task | pointer to task |
[in] | spec | pointer to PlanSpecification message |
[in] | nodes | vector of sequential PlanManeuvers that describe the plan |
[in] | cinfo | map of components info |
|
inline |
Compute a shorter time for calibration.
|
inline |
Flush all remaining timed actions in the schedule.
|
inline |
Get the time of the earliest scheduled action.
|
inline |
Maneuver has stopped.
[in] | id | name of the done maneuver |
|
inline |
Maneuver has started.
[in] | id | name of the started maneuver |
|
inline |
Check if the activation and deactivation requests are being complied.
[in] | id | entity label |
[in] | msg | pointer to EntityActivationState message |
References DUNE::IMC::EntityActivationState::EAS_ACT_DONE, DUNE::IMC::EntityActivationState::EAS_ACT_FAIL, DUNE::IMC::EntityActivationState::EAS_ACTIVE, DUNE::IMC::EntityActivationState::EAS_DEACT_DONE, and DUNE::IMC::EntityActivationState::EAS_INACTIVE.
|
inline |
The plan has started.
[out] | affected | vector of entities that will be (de)activated during the plan |
|
inline |
The plan has stopped/ended.
[in] | affected | vector of entities that were (de)activated during last executed plan |
|
inline |
Update timed actions in schedule.
[in] | time_left | estimated time left to finish the plan |
|
inline |
Check if we are still waiting for a device in calibration process.