Skip to content
Encode/decode numbers, share pointers, manage dynamic buffers on AVR / STM32 / x86
Branch: master
Clone or download
Latest commit e4ecbc7 Apr 30, 2019

README.md

Overview

The project contains portable C++ utility tools for

  • Encoding/decoding numeric values to/from raw bytes
  • Sharing pointer on embedded platforms
  • Storing data in AVL tree
  • Managing raw data in a buffer with read/write pointers, auto-resizing
  • Improving output from unit tests
  • Tracking number ranges for calculating delta, mean or median

Table of Contents

Build

Set up cmake build by following an example.

Tools

AvlTree

Implements an AVL tree. See usage examples in avl_tree_test.cpp

Buff

Implements dynamicaly resizable buffer. Provides read/write pointer tracking. See usage examples in buff_test.cpp

Misc

Implements various utility functions such as

  • Translation between value ranges
  • Calculation of angle delta squared
  • Computing modulo with negative numbers
  • Setting/clearing bits at given byte addresses
  • Converting degrees to radians and vice versa
  • Converting binary data to human-readable hex representation

See usage examples in misc_test.cpp

SharedPtr

Implements basic shared pointer to be used on an embedded platform. See usage examples in shared_ptr_test.cpp

Sorters

Implements sorting algorithms for sorting a plain-old-data array. See usage examples in sorters_test.cpp

SpinLock

Implements a basic spin lock for x86.

TestHelpers

Implements useful facilities for when unit testing. See usage examples in unit tests, example: value_codec_test.cpp

ValueCodec

Implements number encoding and decoding facilities accounting for target host order. See usage examples in value_codec_test.cpp

ValueTracker

The class keeps track of numeric values so as to calculate the delta, mean or median between them. See usage examples in value_tracker_test.cpp

Contribute

Consider supporting our projects by contributing to their development. Learn more at boltrobotics.com

You can’t perform that action at this time.