An open API service indexing awesome lists of open source software.

https://github.com/mihaigalos/osi-stack

🧩 OSI communication stack.
https://github.com/mihaigalos/osi-stack

arduino avr cpp embedded library

Last synced: about 2 months ago
JSON representation

🧩 OSI communication stack.

Awesome Lists containing this project

README

          

# OSI Stack

[![codecov](https://codecov.io/gh/mihaigalos/osi-stack/branch/master/graph/badge.svg)](https://codecov.io/gh/mihaigalos/osi-stack)
[![license](https://img.shields.io/badge/license-GPLv3-brightgreen.svg)](LICENSE)
[![LoC](https://tokei.rs/b1/github/mihaigalos/osi-stack)](https://github.com/Aaronepower/tokei)

![Last Logs](https://img.shields.io/endpoint?style=social&url=https%3A%2F%2Fapi.cl1p.net%2Fosi-stack%2Fclipboard)

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++.

### Layers

ISO/OSI Layers (Rough Model).

### Build and Test

First, get the sources:
```
git clone https://github.com/mihaigalos/osi-stack.git && cd osi-stack
```

#### Baremetal

Building and testing is managed by `bazel`, including dependencies to other repos such as [containers](https://github.com/mihaigalos/containers) (transparent to the end-user).

```bash
bazel build //...
bazel test //...
```

#### Using Docker

```bash
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 //..."
```

#### Session Layer Authentification

The Session handshake is described in the following diagram:

ISO/OSI Layers (Rough Model).

#### Matter of principles

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