Skip to content

Repository files navigation

Reliable Communications Library

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.

Authors

Testing

To run the tests:

  • Make sure you have gtest installed on your system. Use scripts/install_gtest.sh to install it.
  • Make sure you have installed the dependencies in tests/requirements.txt. Use pip install -r tests/requirements.txt to install them.
  • Finally, run make to 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.

Development Log

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.

About

A C++/POSIX library that provides reliable and secure communication primitives for critical autonomous systems.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages