Device Service SDK Deep Dive Tech Talks – Session 10
Agenda Generating a Device Service Generated DS Components Service Configuration File Generated DS Components Features Service Coverage Developer Implementation Device Profile Recap Further References Upcoming Tech Talks Q&A
Tyler Cox Dell SW Senior Engineer & Software Architect From Dell End User Computing (EUC) CTO Southbound Developer for Fuse I wrote most of the reference Device Services and the SDK Dell Fuse => EdgeX Foundry tyler_cox@dell.com
Big Picture and DS SDK
Generating a Device Service Pull down device-sdk-tools Import in Eclipse Modify your Service Configuration file Run the project to generate a new service You’re ready to start developing! Follow the numbered TO DOs for now… Improvements to come!
Service Configuration File Service Name (device-<protocol-name>) Service Port Service Labels (can be used for filtering with northbound services) Configure Scheduling True builds the scheduling code in locally False lets you leverage the standalone scheduler service Define your Profile Attributes Metadata elements used by the protocol library for a type of device UUIDs for Bluetooth LE HoldingRegisters for Modbus
Generated Device Service Components Included in generated code Controllers for REST Interfaces Handlers for servicing requests Data transform for basic handling Local Metadata cache, kept consistent with callbacks Driver interface to protocol library
Device Service SDK Features Services generated with the SDK support the following: Synchronous read and write operations to devices Asynchronous data flow from devices Initialization and deconstruction of Driver Interface Initialization and disconnection of Devices Framework for automated Device discovery Support for multiple types of Devices with Device Profiles Support for sets of actions triggered by a command Cached responses to queries
Device Service SDK Interfaces DS generated with the SDK handle interactions with these services: Metadata Core Data Command Consul Logging Scheduling
Device Service Implementation Implemented by developer Plug protocol library into driver interface Implement device discovery if desired Configuring default objects Default Schedules/ScheduleEvents Default ProvisionWatchers Write Device Profiles to support devices
Device Profiles Covered in further detail in Tech Talk 5 – Metadata Part 2 All past Tech Talks on the Wiki Tell your device service how to interface with a device Commands – used for REST API definitions Resources – handle commands Device Resources – describe device properties and how to reach them Existing device profiles for current device services can be found in the resources directory
Further References SDK Getting Started Guide https://wiki.edgexfoundry.org/display/FA/EdgeX+Foundry+SDK+that+Gener ates+the+Device+Service Device Service Architecture Section https://wiki.edgexfoundry.org/display/FA/Architecture-- Device+Services+Microservices Reference Device Services MQTT, SNMP, Modbus, Bluetooth LE, BACNet, Fischertechnik, and Virtual Discussions on Rocket Chat #device-services Or chat with me directly: @trcox
Upcoming Tech Talks Suspending Tech Talks next week Focusing on Barcelona release Restart Tech Talks after Barcelona (mid – October) Suggestions welcome on other topics/direction of tech talks Email Jim or I suggestions james_white2@dell.com tyler_cox@dell.com
Questions and Answer Time