Giter Club home page Giter Club logo

device-sdk-c's Introduction

EdgeX Device C SDK

About

The C SDK provides a framework for building EdgeX device services in C.

Prerequisites

  • A Linux build host
  • A version of GCC supporting C11.
  • CMake version 3 or greater and make.
  • Development libraries and headers for:
    • curl (version 7.32 or later)
    • microhttpd (version 0.9)
    • libyaml (version 0.1.6 or later)
    • libcbor (version 0.5)
    • libuuid (from util-linux v2.x)

On Debian 10 "Buster" these libraries can be installed by

apt-get install libcurl4-openssl-dev libmicrohttpd-dev libyaml-dev libcbor-dev 

Building

At the toplevel C SDK directory, run

make

This retrieves dependencies and uses CMake to build the SDK. Subsequent rebuilds may be performed by moving to the build/release or build/debug directories and running make.

A .tar.gz file containing the SDK headers and library is created in the build/{debug, release} directories. When building on some distributions a .deb or .rpm file is also created, as appropriate.

Creating a Device Service

The main include file devsdk/devsdk.h contains the functions provided by the SDK and defines the callbacks which a device service implementor needs to create. Documentation is provided within that file in doxygen format. An outline device service and various examples are provided in src/c/examples to illustrate usage.

Building with docker

To build the SDK in a docker image, run the following command:

make docker

This will generate the sdk files in a results directory at the root of this project.

Alternatively, you can build a docker image which can be used to build device services in, with the following command:

docker build -t edgex-csdk-base:1.2.0 -f scripts/Dockerfile.alpine-3.9-base .

You can then write a Dockerfile for your service that begins FROM edgex-csdk-base:1.2.0

Versioning

Please refer to the EdgeX Foundry versioning policy for information on how EdgeX services are released and how EdgeX services are compatible with one another. Specifically, device services (and the associated SDK), application services (and the associated app functions SDK), and client tools (like the EdgeX CLI and UI) can have independent minor releases, but these services must be compatible with the latest major release of EdgeX.

Long Term Support

Please refer to the EdgeX Foundry LTS policy for information on support of EdgeX releases. The EdgeX community does not offer support on any non-LTS release outside of the latest release.

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.