Skip to content

Commit cae96b0

Browse files
authored
[Examples] Update docs (#944)
1 parent fd91c5f commit cae96b0

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

examples/GeneratorShowcase/doc/GeneratorShowcasePlugin.md

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ This method will return *True* for the following methods/properties: *connected,
205205
"id": 42,
206206
"method": "GeneratorShowcase.1.exists",
207207
"params": {
208-
"method": "connected"
208+
"method": "methodName"
209209
}
210210
}
211211
```
@@ -227,7 +227,7 @@ Registers for an asynchronous JSON-RPC notification.
227227

228228
### Description
229229

230-
This method supports the following event names: *[bindingChanged](#notification_bindingChanged), [statusChanged](#notification_statusChanged), [device#ID::nameChanged](#notification_device#ID::nameChanged), [device#ID::stateChanged](#notification_device#ID::stateChanged), [device#ID::pinChanged](#notification_device#ID::pinChanged), [added](#notification_added), [removed](#notification_removed), [accessory#ID::nameChanged](#notification_accessory#ID::nameChanged)*.
230+
This method supports the following event names: *[bindingChanged](#notification_bindingChanged), [statusChanged](#notification_statusChanged), [device::nameChanged](#notification_device__nameChanged), [device::stateChanged](#notification_device__stateChanged), [device::pinChanged](#notification_device__pinChanged), [added](#notification_added), [removed](#notification_removed), [accessory::nameChanged](#notification_accessory__nameChanged)*.
231231

232232
### Parameters
233233

@@ -259,7 +259,7 @@ This method supports the following event names: *[bindingChanged](#notification_
259259
"id": 42,
260260
"method": "GeneratorShowcase.1.register",
261261
"params": {
262-
"event": "bindingChanged",
262+
"event": "eventName",
263263
"id": "myapp"
264264
}
265265
}
@@ -282,7 +282,7 @@ Unregisters from an asynchronous JSON-RPC notification.
282282

283283
### Description
284284

285-
This method supports the following event names: *[bindingChanged](#notification_bindingChanged), [statusChanged](#notification_statusChanged), [device#ID::nameChanged](#notification_device#ID::nameChanged), [device#ID::stateChanged](#notification_device#ID::stateChanged), [device#ID::pinChanged](#notification_device#ID::pinChanged), [added](#notification_added), [removed](#notification_removed), [accessory#ID::nameChanged](#notification_accessory#ID::nameChanged)*.
285+
This method supports the following event names: *[bindingChanged](#notification_bindingChanged), [statusChanged](#notification_statusChanged), [device::nameChanged](#notification_device__nameChanged), [device::stateChanged](#notification_device__stateChanged), [device::pinChanged](#notification_device__pinChanged), [added](#notification_added), [removed](#notification_removed), [accessory::nameChanged](#notification_accessory__nameChanged)*.
286286

287287
### Parameters
288288

@@ -314,7 +314,7 @@ This method supports the following event names: *[bindingChanged](#notification_
314314
"id": 42,
315315
"method": "GeneratorShowcase.1.unregister",
316316
"params": {
317-
"event": "bindingChanged",
317+
"event": "eventName",
318318
"id": "myapp"
319319
}
320320
}
@@ -1210,6 +1210,8 @@ Unlinks a device.
12101210

12111211
Acquires a device.
12121212

1213+
> This method creates an instance of a *device* object.
1214+
12131215
### Parameters
12141216

12151217
| Name | Type | M/O | Description |
@@ -1221,7 +1223,7 @@ Acquires a device.
12211223

12221224
| Name | Type | M/O | Description |
12231225
| :-------- | :-------- | :-------- | :-------- |
1224-
| result | integer | mandatory | Instance of the acquired device |
1226+
| result | integer (instance ID) | mandatory | Instance of the acquired device<br> |
12251227

12261228
### Errors
12271229

@@ -1264,7 +1266,7 @@ Relinquishes a device.
12641266
| Name | Type | M/O | Description |
12651267
| :-------- | :-------- | :-------- | :-------- |
12661268
| params | object | mandatory | *...* |
1267-
| params.device | integer | mandatory | Device instance to relinquish |
1269+
| params.device | integer (instance ID) | mandatory | Device instance to relinquish<br> |
12681270

12691271
### Result
12701272

@@ -1334,7 +1336,7 @@ This method takes no parameters.
13341336
{
13351337
"jsonrpc": "2.0",
13361338
"id": 42,
1337-
"method": "GeneratorShowcase.1.device#id1::enable"
1339+
"method": "GeneratorShowcase.1.device#1::enable"
13381340
}
13391341
```
13401342

@@ -1379,7 +1381,7 @@ This method takes no parameters.
13791381
{
13801382
"jsonrpc": "2.0",
13811383
"id": 42,
1382-
"method": "GeneratorShowcase.1.device#id1::disable"
1384+
"method": "GeneratorShowcase.1.device#1::disable"
13831385
}
13841386
```
13851387

@@ -1698,7 +1700,7 @@ Provides access to the name of the device.
16981700
{
16991701
"jsonrpc": "2.0",
17001702
"id": 42,
1701-
"method": "GeneratorShowcase.1.device#id1::name"
1703+
"method": "GeneratorShowcase.1.device#1::name"
17021704
}
17031705
```
17041706

@@ -1718,7 +1720,7 @@ Provides access to the name of the device.
17181720
{
17191721
"jsonrpc": "2.0",
17201722
"id": 42,
1721-
"method": "GeneratorShowcase.1.device#id1::name",
1723+
"method": "GeneratorShowcase.1.device#1::name",
17221724
"params": {
17231725
"value": "..."
17241726
}
@@ -1775,7 +1777,7 @@ Provides access to the A pin.
17751777
{
17761778
"jsonrpc": "2.0",
17771779
"id": 42,
1778-
"method": "GeneratorShowcase.1.device#id1::pin@0"
1780+
"method": "GeneratorShowcase.1.device#1::pin@0"
17791781
}
17801782
```
17811783

@@ -1795,7 +1797,7 @@ Provides access to the A pin.
17951797
{
17961798
"jsonrpc": "2.0",
17971799
"id": 42,
1798-
"method": "GeneratorShowcase.1.device#id1::pin@0",
1800+
"method": "GeneratorShowcase.1.device#1::pin@0",
17991801
"params": {
18001802
"value": false
18011803
}
@@ -1831,7 +1833,7 @@ Provides access to the accessory by name.
18311833

18321834
| Name | Type | M/O | Description |
18331835
| :-------- | :-------- | :-------- | :-------- |
1834-
| (property) | string | mandatory | Accessory instance |
1836+
| (property) | string (instance ID) | mandatory | Accessory instance<br> |
18351837

18361838
### Example
18371839

@@ -1851,7 +1853,7 @@ Provides access to the accessory by name.
18511853
{
18521854
"jsonrpc": "2.0",
18531855
"id": 42,
1854-
"result": "..."
1856+
"result": "id1"
18551857
}
18561858
```
18571859

@@ -2065,6 +2067,8 @@ Signals completion of the Connect method.
20652067

20662068
> The *client ID* parameter is passed within the notification designator, i.e. ``<client-id>.bindingChanged@<address>``.
20672069
2070+
> The *address* parameter is passed as index within the notification designator, i.e. ``<client-id>.bindingChanged@<address>``.
2071+
20682072
<a id="notification_statusChanged"></a>
20692073
## *statusChanged [<sup>notification</sup>](#head_Notifications)*
20702074

@@ -2133,7 +2137,7 @@ Signals device name changes.
21332137
{
21342138
"jsonrpc": "2.0",
21352139
"id": 42,
2136-
"method": "GeneratorShowcase.1.device#id1::register",
2140+
"method": "GeneratorShowcase.1.device#1::register",
21372141
"params": {
21382142
"event": "nameChanged",
21392143
"id": "myid"
@@ -2146,7 +2150,7 @@ Signals device name changes.
21462150
```json
21472151
{
21482152
"jsonrpc": "2.0",
2149-
"method": "myid.device#id1::nameChanged",
2153+
"method": "myid.device#1::nameChanged",
21502154
"params": {
21512155
"state": "..."
21522156
}
@@ -2179,7 +2183,7 @@ Signals device state changes.
21792183
{
21802184
"jsonrpc": "2.0",
21812185
"id": 42,
2182-
"method": "GeneratorShowcase.1.device#id1::register",
2186+
"method": "GeneratorShowcase.1.device#1::register",
21832187
"params": {
21842188
"event": "stateChanged",
21852189
"id": "myid"
@@ -2192,7 +2196,7 @@ Signals device state changes.
21922196
```json
21932197
{
21942198
"jsonrpc": "2.0",
2195-
"method": "myid.device#id1::stateChanged",
2199+
"method": "myid.device#1::stateChanged",
21962200
"params": {
21972201
"state": "DISABLED"
21982202
}
@@ -2212,7 +2216,7 @@ Signals pin state changes.
22122216
22132217
### Parameters
22142218

2215-
> The *pin* parameter shall be passed as index to the ``register`` call, i.e. ``register@<pin>``.
2219+
> The *pin* parameter is optional. If set it shall be passed as index to the ``register`` call, i.e. ``register@<pin>``.
22162220
22172221
### Notification Parameters
22182222

@@ -2229,7 +2233,7 @@ Signals pin state changes.
22292233
{
22302234
"jsonrpc": "2.0",
22312235
"id": 42,
2232-
"method": "GeneratorShowcase.1.device#id1::register@0",
2236+
"method": "GeneratorShowcase.1.device#1::register@0",
22332237
"params": {
22342238
"event": "pinChanged",
22352239
"id": "myid"
@@ -2242,7 +2246,7 @@ Signals pin state changes.
22422246
```json
22432247
{
22442248
"jsonrpc": "2.0",
2245-
"method": "myid.device#id1::pinChanged@0",
2249+
"method": "myid.device#1::pinChanged@0",
22462250
"params": {
22472251
"high": false
22482252
}
@@ -2251,6 +2255,8 @@ Signals pin state changes.
22512255

22522256
> The *client ID* parameter is passed within the notification designator, i.e. ``<client-id>.device#<device-id>::pinChanged@<pin>``.
22532257
2258+
> The *pin* parameter is optionally passed as index within the notification designator, i.e. ``<client-id>.device#<device-id>::pinChanged@<pin>``.
2259+
22542260
> The *device instance id* parameter is passed within the notification designator, i.e. ``<client-id>.device#<device-id>::pinChanged@<pin>``.
22552261
22562262
<a id="notification_added"></a>
@@ -2265,7 +2271,7 @@ Signals addition of a accessory.
22652271
| Name | Type | M/O | Description |
22662272
| :-------- | :-------- | :-------- | :-------- |
22672273
| params | object | mandatory | *...* |
2268-
| params.accessory | string | mandatory | Accessory instance |
2274+
| params.accessory | string (instance ID) | mandatory | Accessory instance<br> |
22692275

22702276
### Example
22712277

@@ -2290,7 +2296,7 @@ Signals addition of a accessory.
22902296
"jsonrpc": "2.0",
22912297
"method": "myid.added",
22922298
"params": {
2293-
"accessory": "..."
2299+
"accessory": "id1"
22942300
}
22952301
}
22962302
```
@@ -2307,7 +2313,7 @@ Signals removal of a accessory.
23072313
| Name | Type | M/O | Description |
23082314
| :-------- | :-------- | :-------- | :-------- |
23092315
| params | object | mandatory | *...* |
2310-
| params.accessory | string | mandatory | Accessory instance |
2316+
| params.accessory | string (instance ID) | mandatory | Accessory instance<br> |
23112317

23122318
### Example
23132319

@@ -2332,7 +2338,7 @@ Signals removal of a accessory.
23322338
"jsonrpc": "2.0",
23332339
"method": "myid.removed",
23342340
"params": {
2335-
"accessory": "..."
2341+
"accessory": "id1"
23362342
}
23372343
}
23382344
```

0 commit comments

Comments
 (0)