Skip to content

Commit

Permalink
Documentation(software): Section for simple-networking library
Browse files Browse the repository at this point in the history
documentation(software): fixed typo
  • Loading branch information
DingoOz authored and RandomSpaceship committed Jan 12, 2025
1 parent 6100acc commit 2571506
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/source/architecture/software.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ To ensure that this doesn't happen at all, run a clean after every git pull or a

### Shared Libraries

:::{tip}
Shared libraries can be made available to your ROS2 package and nodes by including them as a dependency in your package's package.xml and then running the script 'nix-package.sh'
:::

#### Hi-CAN

Abbreviated from "hierarchical CAN", Hi-CAN is the library implementing the standards laid out [here](project:/architecture/can-bus.md), and is shared across ROS and native code, as well as firmware.
Expand All @@ -103,6 +107,17 @@ However, this on its own is not particularly useful - which is where implementat
The `hi-can-raw` library implements {class}`hi_can::FilteredCanInterface` using the Linux SocketCAN [`RAW_CAN`](https://docs.kernel.org/networking/can.html#raw-protocol-sockets-with-can-filters-sock-raw) interface, and is what most code uses to interface with the CAN bus.
The `hi-can-net` library is currently unused, but may become an implementation of {class}`hi_can::CanInterface` which forwards all traffic over a network connection.

#### Simple-networking

The simple-networking library provides a modern C++ implementation for handling network socket communications, with a primary focus on client-side operations.

It offers an object-oriented wrapper around traditional POSIX socket operations, supporting both TCP and UDP protocols. The library implements RAII principles through its Client class, which manages socket creation, configuration, connection and cleanup while providing exception-based error handling for robust failure management.

The library distinguishes itself through flexible socket configuration using handler callbacks, support for custom bind addresses and a clean abstraction over low-level socket operations. It provides convenient methods for transmitting and receiving both string and binary data, with support for both blocking and non-blocking operations. Error handling is comprehensive, with descriptive error messages that include both the operation context and underlying system error details.
:::{warning}
This library is not used for ROS2 communications, it exists for scenarios such as a creating a ROS2 driver node which needs to interface with a specific sensor via ethernet.
:::

## Web UI

The other project is the rover's web control UI - since it's a completely different tech stack, it ends up being almost entirely independent of the rover core software.
Expand Down

0 comments on commit 2571506

Please sign in to comment.