mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
simulator base
add shutdown and reboot
This commit is contained in:
@@ -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");
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user