Skip to content

Commit 15949ea

Browse files
Add example for call command (#98)
Question: Is there a way to this: ``` yakut call 125 435:uavcan.node.ExecuteCommand '{command: COMMAND_RESTART, parameter: "firmware.bin"}' ``` Instead of this: ``` yakut call 125 435:uavcan.node.ExecuteCommand '{command: 65533, parameter: "firmware.bin"}' ``` [Relevant forum question](https://forum.opencyphal.org/t/yakut-file-commands/1815/2) --------- Co-authored-by: Pavel Kirienko <[email protected]>
1 parent 9e9cd2f commit 15949ea

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ There are certain registers that are looked at by Cyphal nodes to determine how
110110
If the available registers define more than one transport configuration, a redundant transport will be initialized. It is not necessary to assign all of these registers to use a particular transport because all of them except `uavcan.*.iface` come with defaults.
111111

112112
| Transport | Register name | Register type | Environment variable name | Semantics | Example environment variable value |
113-
|-----------|-----------------------|----------------|---------------------------|------------------------------------------------------------|-------------------------------------|
113+
| --------- | --------------------- | -------------- | ------------------------- | ---------------------------------------------------------- | ----------------------------------- |
114114
| (any) | `uavcan.node.id` | `natural16[1]` | `UAVCAN__NODE__ID` | The local node-ID; anonymous if not set | `42` |
115115
| UDP | `uavcan.udp.iface` | `string` | `UAVCAN__UDP__IFACE` | Space-separated local IPs (16 LSB overridden with node-ID) | `127.9.0.0 192.168.0.0` |
116116
| Serial | `uavcan.serial.iface` | `string` | `UAVCAN__SERIAL__IFACE` | Space-separated serial port names | `COM9 socket://127.0.0.1:50905` |
@@ -305,6 +305,12 @@ You can still override the type if you want to use a different one (e.g., if the
305305
y q 42 least_squares:my_namespace.MySpecialType '[[10, 1], [20, 2]]'
306306
```
307307

308+
If your service call requires multiple arguments, specify them as follows:
309+
310+
```bash
311+
yakut call 125 435:uavcan.node.ExecuteCommand '{command: 65533, parameter: "firmware.bin"}'
312+
yakut call 125 435:uavcan.node.ExecuteCommand '[65533, "firmware.bin"]' # Shorter but position-sensitive
313+
308314
## Monitoring the network
309315

310316
The command `yakut monitor` can be used to display *all* activity on the network in a compact representation. It tracks online nodes and maintains real-time statistics on all transfers exchanged between each node on the network. It may also be able to detect some common network configuration issues like zombie nodes (nodes that do not publish `uavcan.node.Heartbeat`).
@@ -448,7 +454,7 @@ $ y r 125, m.inductance_dq --detailed --detailed
448454
real32:
449455
value: [1.2999999853491317e-05, 1.2000000424450263e-05]
450456
_meta_: {mutable: true, persistent: true}
451-
457+
452458
# If there is no such register, we get a null (empty):
453459
$ y r 125 no.such.register
454460
null

yakut/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.13.1
1+
0.13.2

yakut/cmd/call.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ async def call(
111111
yakut call 42 uavcan.node.getinfo +M -T3 -Pe
112112
yakut call 42 least_squares 'points: [{x: 10, y: 1}, {x: 20, y: 2}]'
113113
yakut call 42 least_squares:sirius_cyber_corp.PerformLinearLeastSquaresFit '[[10, 1], [20, 2]]'
114+
yakut call 125 435:uavcan.node.ExecuteCommand '{command: 65533, parameter: "firmware.bin"}'
114115
"""
115116
try:
116117
from pycyphal.application import Node

0 commit comments

Comments
 (0)