Class MirrorManager
Defined in File MirrorManager.hpp
Nested Relationships
Nested Types
Class Documentation
-
class MirrorManager
Public Functions
-
std::shared_ptr<const rmf_traffic::schedule::Mirror> view() const
Get an immutable view of the mirror.
-
void update()
Attempt to update this mirror immediately.
-
MirrorManager &set_options(Options options)
Set the options for this mirror manager.
-
rmf_traffic::schedule::Database fork() const
Fork a new database off of the managed Mirror. The state of the new database will match the last state of the upstream database that this Mirror knows about.
-
class Options
Options for the MirrorManager.
Public Functions
-
Options(std::mutex *update_mutex = nullptr, bool update_on_wakeup = true)
update_mutex A reference to a mutex that should be locked when performing an update. When set to a nullptr, no mutex will be locked.
Constructor
update_on_wakeup Specify if the mirror should perform an update whenever it gets woken up by the schedule.
-
std::mutex *update_mutex() const
Get a reference to the mutex that will be used when performing an update.
-
Options &update_mutex(std::mutex *mutex)
Set the mutex that should be used when performing an update.
-
bool update_on_wakeup() const
True if the mirror should be updated each time a MirrorWakeup message is received. The MirrorWakeup messages are sent out each time a change is introduced to the schedule database.
-
Options(std::mutex *update_mutex = nullptr, bool update_on_wakeup = true)
-
std::shared_ptr<const rmf_traffic::schedule::Mirror> view() const