You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs_src/design/adr/device-service/0021-invoking-functions.md
+47-19Lines changed: 47 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ this is unintuitive.
39
39
{
40
40
"name": "Parameter name",
41
41
"description": "(optional) description of what the parameter controls",
42
-
"type": "Any of the usual EdgeX data types",
42
+
"type": "Any of the existing EdgeX data types",
43
43
"defaultValue": "(optional) value to use if param is not supplied",
44
44
"maximum": "(optional) for numerics, maximum allowed value",
45
45
"minimum": "(optional) for numerics, minimum allowed value"
@@ -50,49 +50,65 @@ this is unintuitive.
50
50
{
51
51
"name": "Name of returned value",
52
52
"description": "(optional) description of what the value indicates",
53
-
"type": "Any of the usual EdgeX data types"
53
+
"type": "Any of the existing EdgeX data types"
54
54
}
55
55
]
56
56
}
57
57
]
58
58
}
59
59
```
60
60
61
-
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.
61
+
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 function.
62
62
63
63
**Define MessageBus topics on which function call requests and replies are to be made**
"message": "Message indicating the nature of the failure"
111
+
}
96
112
}
97
113
```
98
114
@@ -101,12 +117,24 @@ or if a call fails
101
117
| Status | Meaning
102
118
|--------|--------
103
119
| 0 | The operation was successful
104
-
| 1 | Parameters were missing, out of range or non-parsable
105
-
| 2 | The Device is DOWN or DISABLED (OperatingState / AdminState)
106
-
| 3 | No such device or function
120
+
| 1 | Request message format error
121
+
| 2 | Parameters were missing, out of range or non-parsable
122
+
| 3 | The Device is DOWN or DISABLED (OperatingState / AdminState)
123
+
| 4 | No such device or function
107
124
| 100+ | Implementation-specific errors, defined for each Device Service
108
125
109
-
** Device SDK enhancement **
126
+
*Configuration*
127
+
128
+
The topic prefixes `edgex/request/function` and `edgex/response/function` will be configurable in the device services.
129
+
130
+
**Device SDK enhancement**
110
131
111
132
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.
112
133
134
+
**Command service enhancement**
135
+
136
+
The core-command service to be extended to provide access to device functions as it does for device readings and settings.
0 commit comments