This C++ program simulates a real-time aircraft monitoring system using threads, mutexes, scheduling and interrupts. The system monitors key sensors such as fuel level, temperature, and pressure. It also includes a smoke detector, warning lamps, and a command interface for the pilot.
- The program uses threads and scheduling to enable real-time monitoring of the aircraft's vital parameters.
- Threads are employed to concurrently monitor fuel level, temperature, and pressure.
- Monitors the fuel level in the aircraft.
- Generates warnings if the fuel level is critically low.
- Monitors temperature and pressure levels in the aircraft.
- Generates warnings if values are outside normal ranges.
- Simulates a smoke detector for the left and right engines.
- Generates warnings if smoke is detected.
- Pilot commands are processed in real-time through a dedicated thread.
- Allows the pilot to simulate smoke, clear warnings, and request sensor rates.
- The system uses warning lamps to indicate critical conditions for fuel, temperature, pressure, and smoke.
- Displays real-time sensor values such as fuel level, temperature, and pressure.
- Calculates and displays sensor rates based on initial and current values.
- Utilizes mutexes to ensure thread safety during data access and printing.
- Mutexes are employed to control access to shared variables and resources.
- The program continuously monitors and displays information.
- Threads run concurrently, providing real-time updates on the aircraft's status.
- Compile and run the program using a C++ compiler.