Skip to content

Commit

Permalink
Merge pull request #25 from Cynerd/rpcmessage-userid-required
Browse files Browse the repository at this point in the history
rpcmessage: add UserIDRequired error
  • Loading branch information
fvacek authored Feb 23, 2024
2 parents 04dbdbc + 600faf8 commit 163eac9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/rpcmessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Attribute number | Attribute name | Expected type | Description
9 | ShvPath | String | Path on which method will be called.
10 | Method | String | Name of called RPC method
11 | CallerIds | List of Int | Internal attribute filled by broker in request message to distinguish requests with the same request ID, but issued by different clients.
13 | RespCallerIds | List of Int | Internal attribute filled by broker in response message to enable support for multi-part messages and tunneling. <https://github.com/silicon-heaven/libshv/wiki/multipart-messages>
13 | RespCallerIds | List of Int | Reserved, internal attribute filled by broker in response message to enable support for multi-part messages and tunneling. <https://github.com/silicon-heaven/libshv/wiki/multipart-messages>
14 | Access | String | Access granted by broker to called `shvPath` and `method` to current user.
16 | UserId | String | ID of user calling RPC method filled in by broker.
17 | AccessLevel | Int | Reserved, integer value, it will be used in next API version for chained brokers access capping
Expand Down Expand Up @@ -129,6 +129,7 @@ Value | Name | Description
8 | `MethodCallException` |
9 | `Unknown` |
10 | `LoginRequired` | Method call without previous successful login.
11 | `UserIDRequired` | Method call requires UserID to be present in the request message. Send it again with UserID.
32 | `UserCode` |

**Examples**
Expand Down
1 change: 1 addition & 0 deletions src/rpcmethods/discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ The method info in both *IMap* and *Map* must contain these fields:
unique submit ID prevents from same request being handled multiple times
because first execution will invalidate the submit ID and thus prevents
re-execution.
* `32` (`1 << 5`) specifies that method requires ClientID to be called.
* `"param"` for *Map* and `3` for *IMap* with *String* name of the parameter
type as value. It can be missing or have value `null` instead of *String* if
method takes no parameter (or `null`).
Expand Down
3 changes: 3 additions & 0 deletions src/shv-types/shv-journal.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# SHV journal

| ❗ This document is in DRAFT stage |
|------------------------------------|

> _ShvJournal_ =\
> `<`
> `>`
Expand Down
5 changes: 4 additions & 1 deletion src/shv-types/shv-type-info.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# SHV Type Info

| ❗ This document is in DRAFT stage |
|------------------------------------|

> _TypeInfo_ =\
> `<"version": 4> {`\
> &nbsp;&nbsp;`"devicePaths"`: `{`\
Expand Down Expand Up @@ -89,4 +92,4 @@
> _BitFieldFieldRangeValue_ = `[`\
> &nbsp;&nbsp;_StartIndex_ = Int // index of LSB\
> &nbsp;&nbsp;_EndIndex_ = Int // index of MSB\
> `]`
> `]`

0 comments on commit 163eac9

Please sign in to comment.