Class BackupFileManager

Nested Relationships

Nested Types

Class Documentation

class rmf_task::BackupFileManager

Public Functions

BackupFileManager(std::filesystem::path root_directory, std::function<void(std::string)> info_logger = nullptr, std::function<void(std::string)> debug_logger = nullptr)

Construct a BackupFileManager

Parameters
  • [in] root_directory: Specify the root directory that the backup files should live in

BackupFileManager &clear_on_startup(bool value = true)

Set whether any previously existing backups should be cleared out on startup. By default this behavior is turned OFF.

Parameters
  • [in] value: True if the behavior should be turned on; false if it should be turned off.

BackupFileManager &clear_on_shutdown(bool value = true)

Set whether any currently existing backups should be cleared out on shutdown. By default this behavior is turned ON.

Parameters
  • [in] value: True if the behavior should be turned on; false if it should be turned off.

std::shared_ptr<Group> make_group(std::string name)

Make a group (a.k.a. fleet) to back up.

class Group

Public Functions

std::shared_ptr<Robot> make_robot(std::string name)

Make a handle to backup a robot for this group

Parameters
  • [in] name: The unique name of the robot that’s being backed up

class Robot

Public Functions

std::optional<std::string> read() const

Read a backup state from file if a backup file exists for this robot. If a backup does not exist, return a nullopt.

void write(const Task::Active::Backup &backup)

Write a backup to file.