systemctl helper
This commit is contained in:
@ -13,7 +13,25 @@ enum Mode : Mode_t { BOOT = 5, SAFE = acs::AcsMode::SAFE, PTG_IDLE = acs::AcsMod
|
||||
|
||||
}
|
||||
|
||||
namespace xsc {
|
||||
|
||||
enum Chip : int { CHIP_0, CHIP_1, NO_CHIP, SELF_CHIP, ALL_CHIP };
|
||||
enum Copy : int { COPY_0, COPY_1, NO_COPY, SELF_COPY, ALL_COPY };
|
||||
|
||||
} // namespace xsc
|
||||
|
||||
namespace core {
|
||||
|
||||
// TODO: Support for status? Or maybe some command to quickly get information whether a unit
|
||||
// is running.
|
||||
enum SystemctlCmd : uint8_t { START = 0, STOP = 1, RESTART = 2, NUM_CMDS = 3 };
|
||||
|
||||
static constexpr char CONF_FOLDER[] = "conf";
|
||||
|
||||
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
||||
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
||||
|
||||
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
|
||||
static constexpr ActionId_t ANNOUNCE_VERSION = 1;
|
||||
static constexpr ActionId_t ANNOUNCE_CURRENT_IMAGE = 2;
|
||||
@ -37,7 +55,8 @@ static constexpr ActionId_t MOUNT_OTHER_COPY = 33;
|
||||
//! Reboot using the reboot command
|
||||
static constexpr ActionId_t REBOOT_OBC = 34;
|
||||
|
||||
static constexpr ActionId_t EXECUTE_SHELL_CMD = 40;
|
||||
static constexpr ActionId_t EXECUTE_SHELL_CMD_BLOCKING = 40;
|
||||
static constexpr ActionId_t SYSTEMCTL_CMD_EXECUTOR = 42;
|
||||
|
||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
|
||||
|
||||
|
Reference in New Issue
Block a user