OSI communication stack, initially written for AVR UART communication.
This implementation intentionally uses raw pointers instead of smart pointers.
The reasoning is that it will be ported to small 8-bit hardware architectures such as AVR/Arduino, with limited support for modern C++.
First, get the sources:
git clone https://github.com/mihaigalos/osi-stack.git && cd osi-stack
Building and testing is managed by bazel
, including dependencies to other repos such as containers (transparent to the end-user).
bazel build //...
bazel test //...
docker run -it --rm --cap-add SYS_PTRACE -v $(pwd):/src -v /tmp:/tmp/bazel docker.pkg.github.com/mihaigalos/docker/bazel /bin/zsh -c "cd /src && bazel --output_base=/tmp/bazel test //..."
The Session handshake is described in the following diagram:
This code respects many of the Clean Code & Architecture Principles:
- Composition over Inheritance
- Dependency Injection
- DMT
- Docs as Code
- DRY
- FIRST
- GRASP
- KISS
- Single Source of Truth
- SoC
- SOLID
- TDD
- Testing Pyramid