Coder Social home page Coder Social logo

krkind / circularbuffercc Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 7 KB

This repository contains a circular buffer or a ring buffer implementation in C++ code suitable for embedded systems.

CMake 13.53% C++ 86.47%
circular-buffer circularbuffer ring-buffer ringbuffer cpp14

circularbuffercc's Introduction

Circular Buffer

This repository contains a circular buffer or a ring buffer implementation in C++ code suitable for embedded systems. The impementation uses std::mutex type for making the class thread safe. The code follows the Google C++ Style Guide but with 2 exceptions. Uses 4 spaces instead of 2 and follows STL naming conventions.

Unittest

The added unittest uses the googletest framework and the CMake build system.

Follow the steps below for building the unittest

  1. Install the CMake, if you run on an Ubuntu machine:

    sudo apt install cmake

  2. Clone this repo and create a new folder called e.g. build inside the repo.

  3. Now you shall have the following directory structure:

  <your path>
       | circularbuffercc
           | build
  1. Change directory to the new directory build.

  2. Generate the makefiles and build the unit test:

    <your path>/circularbuffercc/build$ cmake ..

    <your path>/circularbuffercc/build$ make

  3. Now execute the circularbufffer-gtest:

    <your path>/circularbuffercc/build$ test/circularbuffer-gtest

  4. You can also do

    <your path>/circularbuffercc/build$ make test

circularbuffercc's People

Contributors

krkind avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.