Skip to content

Instantly share code, notes, and snippets.

@jdharms
Created July 2, 2019 15:26
Show Gist options
  • Save jdharms/7210896fbb3dc81067fd75a9b8c03312 to your computer and use it in GitHub Desktop.
Save jdharms/7210896fbb3dc81067fd75a9b8c03312 to your computer and use it in GitHub Desktop.
Resources for EdgeX Device-Service Creation

EdgeX Device Service Resources

Device-Service SDK Deep-Dive Video. Some parts of this video are out of date, but the high level concepts are still applicable.

EdgeX Docs 4.3 "Writing a Device Service for EdgeX". This document should always be up to date (File an issue if not). Includes links to documents covering both the C and Go SDKS. (As of 6/2/2019 these documents point towards Delhi documentation. Should flip to Edinburgh documentation in a week or so.)

The thousand-foot view for the SDKs is the Go SDK requires you to implement an interface and then your main function is simply a call into the SDK. The C SDK has you create a struct representing your DS with function pointers to your implementation of the necessary functions and your main function passes the struct to the SDK and then waits for a signal.

Go SDK Example Implementation. There is a simple DS implemented inside the SDK repository. This is one of the best resources, as it's always up to date with the version of the SDK that is checked out.

C SDK Example Implementation. Similar, but for the C SDK.

EdgeX Foundry Github Organization. There are several fully-implemented Device Services available to browse through here. These should also be kept up to date, and should have branches corresponding to each major version of EdgeX (for the DS's old enough). I'm not aware of any canonical documentation for the .yaml Device Profiles, so the Device Profiles for these Services act as guides for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment