diff --git a/tools/simulator_base.cpp b/tools/simulator_base.cpp index 462824d..fd15cfa 100644 --- a/tools/simulator_base.cpp +++ b/tools/simulator_base.cpp @@ -56,4 +56,14 @@ void Simulator_base::run() { void Simulator_base::stop() { // Stop the simulator m_timer.stop(); +} + +void Simulator_base::shutdown() { + // Shutdown the simulator + system("shutdown -h now"); +} + +void Simulator_base::reboot() { + // Reboot the simulator + system("reboot"); } \ No newline at end of file diff --git a/tools/simulator_base.hpp b/tools/simulator_base.hpp index 7a01169..4de4a34 100644 --- a/tools/simulator_base.hpp +++ b/tools/simulator_base.hpp @@ -78,6 +78,9 @@ class Simulator_base { * Override this function in the derived class */ virtual void run_at_startup() {}; + + void shutdown(); + void reboot(); protected: std::string m_name; std::vector m_UI_items;