This repository contains the implementation of a reliable and secure communication library for critical autonomous systems, developed as part of the INE5424 – Operating Systems II course project (2025/2) at UFSC. The project models autonomous systems (e.g., vehicles) and their components as virtualized environments interconnected through broadcast-based networks, providing a unified C++ API for message exchange, event handling, and integration under POSIX-compliant platforms.
To run the tests:
- Make sure you have
gtestinstalled on your system. Usescripts/install_gtest.shto install it. - Make sure you have installed the dependencies in
tests/requirements.txt. Usepip install -r tests/requirements.txtto install them. - Finally, run
maketo compile and execute the tests.
NOTE: Fedora is known to have issues with the gcc-riscv64-linux-gnu cross-compiler package. As a workaround, you can run make docker to compile our library and the automobile code inside a Docker container.
| Project | Descripion |
|---|---|
| P1 | Minimalist implementation of the API. Communication between the VMs uses raw Ethernet frames, with messages defined as simple byte arrays encapsulated in the frames. |
| P2 | Extension of the API to support communication between components within the same VM using System V IPC (shared memory and semaphores). The IPCEngine confines the internal communication logic, enabling processes (e.g., Sensor, Processor) to exchange messages reliably while keeping a unified interface with external communication. |
| P3 | Asynchronous, signal-driven receive path for raw Ethernet with a real-time RX thread (SCHED_FIFO), per-thread delivery of SIGIO. Significantly reducing RX latency and improving reliability under load. |
| P4 | Implementation of a deterministic Interest/Response layer, enabling periodic, time-triggered data exchange between distributed components. The application now defines interests with explicit periods, and publishers synchronize their responses through periodical scheduling, achieving predictable and event-driven communication atop the existing asynchronous Ethernet stack. |
| P5 | Introduces distributed temporal synchronization via PTP (Precision Time Protocol). Implements a Roadside Unit (RSU) as the master clock and adds a timestamp field to all messages, enabling vehicles to correct local time offsets and ensuring consistent event ordering. |
| P6 | Implements secure group communication using HMAC-SHA256 for message authentication. Introduces dynamic group management, allowing vehicles to join/leave quadrants with unique session keys, ensuring message integrity and authenticity within each group. |