- Purpose: Creates and manages pipes, and logs drone positions.
- Primitives Used: Pipes, semaphores, file operations, fork.
- Purpose: Creates and manages pipes, sockets, and logs drone positions.
- Primitives Used: Pipes, semaphores, file operations, fork, sockets.
- Purpose: Uses ncurses to display the drone position and UI messages.
- Primitives Used: Pipes, semaphores, ncurses.
- Purpose: Captures keyboard input and sends it to the drone through a FIFO.
- Primitives Used: Pipes, semaphores, FIFO.
- Purpose: Simulates a drone's movement based on keyboard input.
- Primitives Used: Pipes, semaphores.
- Purpose: Monitors the status of all processes and logs them.
- Primitives Used: Pipes, semaphores.
- Purpose: Creates targets and communicates with the server.
- Primitives Used: Pipes, semaphores, sockets.
- Purpose: Creates obstacles and keeps changing their positions periodically.
- Primitives Used: Pipes, semaphores, sockets.
include/: Contains header files.log/: Contains log files./: Contains source code files.
master.c: Main program.server.c: Server component.ui.c: UI component.keyboard.c: Keyboard component.drone.c: Drone component.targets.c: Targets component.obstacles.c: Obstacles component.watchdog.c: Watchdog component.constants.h: Header file with constant values.Makefile: Build automation file.README.md: Documentation file.
- Ensure you have the necessary libraries installed:
ncurseskonsole
- Clone the repository.
- Create the build directory:
mkdir build
- Compile the components using make:
make
-
First terminal:
make ./build/master 8080
-
Second terminal:
make ./build/master 127.0.0.1 8080
ps: change the port and host address according to your needs
- Displays the drone's position and coordinates.
- No user interaction; visualizes the drone's movement.
- Press keys to control the drone's movement.
- Logs keypresses.
- Monitors and logs the status of all processes.
- Increments the upward force on the drone, simulating an upward movement.
- Decrements the horizontal force on the drone, simulating a leftward movement.
- Decrements the downward force on the drone, simulating a downward movement.
- Increments the horizontal force on the drone, simulating a rightward movement.
- Simultaneously decrements horizontal force and increments upward force.
- Simultaneously increments horizontal force and increments upward force.
- Simultaneously decrements horizontal force and decrements downward force.
- Simultaneously increments horizontal force and decrements downward force.
- Sets both horizontal and vertical forces to zero, stopping the drone.
- Exits the program.