Git Product home page Git Product logo

metawear-cppapi's Introduction

MetaWear C++ API

This project is a C++ implementation of the MetaWear protocol. If compiled as a shared library, it can be used with any language that supports calling C functions from a shared library, such as C# and Python. The library only constructs the bytes for communicating with the MetaWear platform, it does not contain any Bluetooth LE code. Users will need to fill in the appropriate Bluetooth LE functions for their target device.

Build

Building the project has been tested on Linux using GCC and make, and on Windows with Visual Studio Community 2015.

GCC and Make

Linux users can build the project by invoking make. The default action is to build the shared library for your platform.

> make

Upon a successful compile, the library will be placed in the newly created dist directory.

> tree dist
dist/
└── release
    └── lib
        └── x64
            ├── libmetawear.so -> libmetawear.so.0
            ├── libmetawear.so.0 -> libmetawear.so.0.0.0
            └── libmetawear.so.0.0.0

Testing

Unit tests for the library are written in Python3 and can be invoked by calling the test target.

> make test
python3 -m unittest discover -s test
...................................................................................
----------------------------------------------------------------------
Ran 83 tests in 0.018s

OK

Visual Studio

If building the project with Visual Studio, users should build the project as a Windows Runtime Component. When your project is created, make the following changes to the project properties:

  1. Disable the Precompiled Headers compile option
  2. Disable Generate Windows Metadata linker option
  3. Add METAWEAR_DLL_EXPORTS to the preprocessor list

metawear-cppapi's People

Contributors

scaryghost avatar

Watchers

James Cloos avatar  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.