simulator base

add shutdown and reboot
This commit is contained in:
2024-08-27 11:10:40 +02:00
parent edfe0a91e4
commit 5a2fb2de22
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -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");
}
+3
View File
@@ -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<UI_item*> m_UI_items;