Public Member Functions | |
| __init__ (self) | |
| is_process_running (self, process_name) | |
| start_monitor (self) | |
| monitor (self) | |
Public Attributes | |
| bool | onepi_running = False |
Static Protected Attributes | |
| str | _PROCESS_NAME = "BnrOneAPlus" |
| str | _MONITOR_NAME = "BnrMonitor" |
| str | _MONITOR_PATH = "monitor.py" |
This class monitors the BnrOneAPlus process and takes action based on its status.
It provides the following functionalities:
1. Check if the BnrOneAPlus process is already running.
This can be used by the parent process to decide if it should continue running or stop.
2. Start the Monitor process.
3. Stop the robot if the BnrOneAPlus process ends.
| onepi.utils.monitor.Monitor.__init__ | ( | self | ) |
Initialize the monitor
| onepi.utils.monitor.Monitor.is_process_running | ( | self, | |
| process_name ) |
Check if a process with the given name is running.
| onepi.utils.monitor.Monitor.monitor | ( | self | ) |
Monitor the processes and take action based on their status.
| onepi.utils.monitor.Monitor.start_monitor | ( | self | ) |
Start the Monitor process.