From 0d6d03bf8fd4c8ba72b5f0e0437ecc097d91b465 Mon Sep 17 00:00:00 2001 From: Iain Anderson Date: Mon, 20 Dec 2021 14:55:47 +0000 Subject: [PATCH] feat: Device functions ADR Remove contradictory text on function names, add SDK responsibilities Signed-off-by: Iain Anderson --- .../design/adr/device-service/0021-invoking-functions.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs_src/design/adr/device-service/0021-invoking-functions.md b/docs_src/design/adr/device-service/0021-invoking-functions.md index 7e68879f4d..9b1b2b0287 100644 --- a/docs_src/design/adr/device-service/0021-invoking-functions.md +++ b/docs_src/design/adr/device-service/0021-invoking-functions.md @@ -58,7 +58,7 @@ this is unintuitive. } ``` -Note: the `attributes` structure is analagous to `attributes` in a `deviceResource`. Each device service should document and implement a scheme of required attributes that will allow for selection of the relevant funtion. The function's `name` is intended for UI and logging purposes and should not be used for actual function selection on the device. +Note: the `attributes` structure is analagous to `attributes` in a `deviceResource`. Each device service should document and implement a scheme of required attributes that will allow for selection of the relevant funtion. **Define MessageBus topics on which function call requests and replies are to be made** @@ -102,9 +102,11 @@ or if a call fails |--------|-------- | 0 | The operation was successful | 1 | Parameters were missing, out of range or non-parsable -| 2 | The Device is DOWN or DISABLED +| 2 | The Device is DOWN or DISABLED (OperatingState / AdminState) | 3 | No such device or function | 100+ | Implementation-specific errors, defined for each Device Service -** The device SDKs will provide an API for the service implementations to implement these operations ** +** Device SDK enhancement ** + +The device SDKs will handle the messagebus communcations and parameter marshalling. The generic errors defined above may be detected in this SDK code. The SDKs will define APIs for the individual device services to implement the function invocations.