Class BackupFileManager

Nested Relationships

Nested Types

Class Documentation

class 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:

root_directory[in] 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:

value[in] 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:

value[in] 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:

name[in] 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.