Skip to content

Commit d447dba

Browse files
committed
feat: Device functions ADR
Clarify parameter specification, add error table, move ADR to no. 0021 Signed-off-by: Iain Anderson <[email protected]>
1 parent 7f7bf2a commit d447dba

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

docs_src/design/adr/device-service/0020-invoking-functions.md renamed to docs_src/design/adr/device-service/0021-invoking-functions.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,24 @@ this is unintuitive.
3535
"description": "Readable description of the function",
3636
"attributes": { device-service-specific attributes which select this function },
3737
"parameters":
38-
{
39-
"in":
40-
[
41-
{
42-
"name": "Parameter name",
43-
"description": "(optional) description of what the parameter controls",
44-
"type": "Any of the usual EdgeX data types",
45-
"defaultValue": "(optional) value to use if param is not supplied",
46-
"maximum": "(optional) for numerics, maximum allowed value",
47-
"minimum": "(optional) for numerics, minimum allowed value"
48-
}
49-
],
50-
"out":
51-
[
52-
{
53-
"name": "Name of returned value",
54-
"description": "(optional) description of what the value indicates",
55-
"type": "Any of the usual EdgeX data types"
56-
}
57-
]
58-
}
38+
[
39+
{
40+
"name": "Parameter name",
41+
"description": "(optional) description of what the parameter controls",
42+
"type": "Any of the usual EdgeX data types",
43+
"defaultValue": "(optional) value to use if param is not supplied",
44+
"maximum": "(optional) for numerics, maximum allowed value",
45+
"minimum": "(optional) for numerics, minimum allowed value"
46+
}
47+
],
48+
"returnValues":
49+
[
50+
{
51+
"name": "Name of returned value",
52+
"description": "(optional) description of what the value indicates",
53+
"type": "Any of the usual EdgeX data types"
54+
}
55+
]
5956
}
6057
]
6158
}
@@ -99,7 +96,15 @@ or if a call fails
9996
}
10097
```
10198

102-
TODO: define status codes for common errors eg not found, locked etc
99+
*Returned status codes*
100+
101+
| Status | Meaning
102+
|--------|--------
103+
| 0 | The operation was successful
104+
| 1 | Parameters were missing, out of range or non-parsable
105+
| 2 | The Device is DOWN or DISABLED
106+
| 3 | No such device or function
107+
| 100+ | Implementation-specific errors, defined for each Device Service
103108

104109
** The device SDKs will provide an API for the service implementations to implement these operations **
105110

0 commit comments

Comments
 (0)