asterism 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +92 -0
- data/README.md +416 -183
- data/data/transfer/transfer.rb +7 -5
- data/lib/asterism/cli/commands.rb +10 -2
- data/lib/asterism/cli/complete.rb +2 -1
- data/lib/asterism/cli/mcp.rb +90 -24
- data/lib/asterism/cli/nouns.rb +175 -22
- data/lib/asterism/cli/survey.rb +84 -19
- data/lib/asterism/cli/values.rb +249 -35
- data/lib/asterism/cli.rb +71 -22
- data/lib/asterism/cruby/objects.rb +138 -247
- data/lib/asterism/cruby/ros.rb +1 -1
- data/lib/asterism/cruby/runner.rb +2 -1
- data/lib/asterism/cruby/zenoh.rb +8 -8
- data/lib/asterism/cruby.rb +10 -6
- data/lib/asterism/transfer/endpoint.rb +29 -12
- data/lib/asterism/version.rb +3 -3
- data/lib/asterism.rb +4 -3
- data/mrblib/asterism.rb +1123 -804
- data/mrblib/future.rb +13 -8
- data/mrblib/profile.rb +286 -117
- data/mrblib/proxy.rb +17 -9
- data/mrblib/status.rb +153 -108
- data/mrblib/topic.rb +1254 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13693cfc2ea4cadbea10db51d0ab438ec569d1886ea75d11182cc3943cb43b49
|
|
4
|
+
data.tar.gz: 5b8da0ca9079e09c4dc1c36a8a194617def831027f7b9d44696c1c60fdd33b47
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb18e9285a60a8a45b452b260a1277172e08caef7fc43b02d87ba95e696621458aa66f64bd2a85a30c1232d7003b51e6fc4dc7346230ecde00136bc8042a319f
|
|
7
|
+
data.tar.gz: 70b484149001ad77d6d4c87e9cd4d775684cc64a17147a9738a6db2b3b6d970b97432524517f27e2deb79c1e5c41daeb220512a1c330a2eda6e8ace924937d73
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,98 @@ the earlier ones are only in this repository. From 0.4.0 the two Zenoh
|
|
|
6
6
|
bindings (asterism-zenoh, picoruby-asterism-zenoh) carry the same minor
|
|
7
7
|
version (a patch release of one may come without the other).
|
|
8
8
|
|
|
9
|
+
## 0.14.0
|
|
10
|
+
|
|
11
|
+
Wire protocol 2 (`Asterism::PROTOCOL = 2`, docs/protocol.md) and the
|
|
12
|
+
connection as an object. **Not compatible with 0.13.0 and earlier**, on the
|
|
13
|
+
wire or in the API: every program and board of a network moves to protocol
|
|
14
|
+
2 at once (the asterism gem, asterism-games 0.23.0, asterism-console 0.4.0,
|
|
15
|
+
the boards' firmware with picoruby-asterism-zenoh 0.4.2). A protocol 1 node
|
|
16
|
+
still sees the others and their values flow, but calls between the two are
|
|
17
|
+
refused (the error kind `protocol`) and statuses and topics are not seen.
|
|
18
|
+
asterism-zenoh is unchanged (0.4.2; `~> 0.4, >= 0.4.1` as before).
|
|
19
|
+
|
|
20
|
+
The connection
|
|
21
|
+
|
|
22
|
+
- `Asterism.connect` returns an `Asterism::Connection`; everything an
|
|
23
|
+
application used as a module function (`expose`, `[]`, `poll`, `status`,
|
|
24
|
+
`publish`, `subscribe`, `define_type`, `profile_of`, `close`, ...) is a
|
|
25
|
+
method of it, and the module functions are removed without aliases. A
|
|
26
|
+
program may hold several connections, each one application (protocol.md
|
|
27
|
+
1.1). The module keeps `connect`, `connections`, `poll_all`,
|
|
28
|
+
`profile_defaults` and the stateless helpers.
|
|
29
|
+
- CRuby: `Asterism::Net` is gone; its block API (`start`, `stop`, `run`,
|
|
30
|
+
`on_error`, `on_status`, `Enumerable`) is on the connection, one
|
|
31
|
+
receiving thread per connection. `net.session` is the portable Session;
|
|
32
|
+
the Zenoh::Connection of the receiving thread is `net.zenoh`.
|
|
33
|
+
- The node's profile is the node's: every connection of a node answers
|
|
34
|
+
`asterism/<node>/@profile` with the same content. The duplicate check
|
|
35
|
+
is per `<node>/<app>`, looks at the program's own connections too, and
|
|
36
|
+
runs without `Asterism::LOCK`.
|
|
37
|
+
- `Asterism::Transfer::Sender` takes `net:`; `Asterism::CLI` and the MCP
|
|
38
|
+
bridge run on the connection they open or are given.
|
|
39
|
+
|
|
40
|
+
Topics, types and the application's own profile
|
|
41
|
+
|
|
42
|
+
- `net.publish(name, type:, unit:, desc:, ts:, encoding:, shared:)` declares
|
|
43
|
+
a Zenoh publisher and returns an `Asterism::Topic`; `topic.put` sends a
|
|
44
|
+
MessagePack value with no encoding, or the bytes as they are for a topic
|
|
45
|
+
with one (`image/jpeg`). Every value carries an attachment: `[seq, run]`,
|
|
46
|
+
`[seq, run, ms]` with `ts:`, and on a shared place
|
|
47
|
+
`[seq, run, ms or nil, "<node>/<app>"]`. Sequence numbers are the
|
|
48
|
+
connection's (publishing a name again goes on from the last one); the
|
|
49
|
+
run id is a 16-bit random number per connection. Times are ms since 1970
|
|
50
|
+
(the built-in log type's `time` too).
|
|
51
|
+
- The declarations are put on `asterism/<node>/<app>/@pubs`;
|
|
52
|
+
`net.define_type(name, fields, desc:)` registers an application type,
|
|
53
|
+
its fields' types by name only (`"vector3"`, `"vector3[]"`, `"int[][]"`,
|
|
54
|
+
`"any"`).
|
|
55
|
+
- The application's own profile `asterism/<node>/<app>/@profile` replaces
|
|
56
|
+
the `@status` queryable: no parameters answer the status and the topics,
|
|
57
|
+
`?status`, `?pubs`, `?types` one part each. The status is still put on
|
|
58
|
+
`@status`. `status_of`, `pubs_of`, `types_of` ask it.
|
|
59
|
+
- `net.subscribe(path) { |v, info| }`: values with an
|
|
60
|
+
`Asterism::SampleInfo` (key, node, app, name, seq, run_id, time,
|
|
61
|
+
encoding, the router's timestamp, `lost`, `restarted?`, and for a shared
|
|
62
|
+
key `path`, `from`, `shared`). A reader forgets an application's numbers,
|
|
63
|
+
declarations and types when its token leaves. `type_of` /
|
|
64
|
+
`declaration_of` read a value's type from its sender and keep the
|
|
65
|
+
answer until the sender puts its `@pubs` again or leaves.
|
|
66
|
+
- Shared places (protocol.md 17): `asterism/<node>/@shared/<name>` and the
|
|
67
|
+
network's `asterism/@shared/<name>`, data with no single owner,
|
|
68
|
+
`publish(..., shared: :node | :global)`, numbers counted per sender,
|
|
69
|
+
`publishers_of(path)`. A sender of another node on a node's place counts
|
|
70
|
+
as none.
|
|
71
|
+
- The present value of a topic is asked with a method call: a reader that
|
|
72
|
+
sees `info.lost > 0` or `info.restarted?` asks again (protocol.md 9.6).
|
|
73
|
+
|
|
74
|
+
The protocol's number
|
|
75
|
+
|
|
76
|
+
- An application's liveliness token is `asterism/<node>/<app>/protocol/2`
|
|
77
|
+
(a token without the number is read as protocol 1), and a call's request
|
|
78
|
+
carries `"protocol" => 2`. A callee answers a request of another number
|
|
79
|
+
or none with the error kind `protocol` before reading the rest, and the
|
|
80
|
+
method does not run. Each program says once per application of another
|
|
81
|
+
protocol. `net.protocol_of("node/app")` and `net.protocol_of(node)`.
|
|
82
|
+
`Asterism::Transfer::Endpoint` (an inbox on a plain Zenoh connection)
|
|
83
|
+
puts the same token and refuses a request of another protocol the same
|
|
84
|
+
way.
|
|
85
|
+
- A router role that names an application's key exactly
|
|
86
|
+
(`asterism/*/game`) needs `<that line>/protocol/*` beside it to see the
|
|
87
|
+
application come and go; lines with `**` reach the new token as they
|
|
88
|
+
are (asterism-console 0.4.0 adds the line on update).
|
|
89
|
+
|
|
90
|
+
The command line and MCP
|
|
91
|
+
|
|
92
|
+
- `topic list` / `topic info` (declarations and types, shared keys with
|
|
93
|
+
who declares them), `tree` / `app info` with an application's topics,
|
|
94
|
+
`object get` / `object echo` / `asterism_values` with each value's
|
|
95
|
+
encoding, seq, run id, sender's time, lost values and, on shared places,
|
|
96
|
+
the sender; the new MCP tool `asterism_topics`; `watch` and the survey
|
|
97
|
+
mark an application of another protocol.
|
|
98
|
+
- Conformance samples version 8 (`rake test:protocol`,
|
|
99
|
+
`rake test:protocol_mruby`).
|
|
100
|
+
|
|
9
101
|
## 0.13.0
|
|
10
102
|
|
|
11
103
|
- The command line runs inside another program, on that program's connection (README "Inside another program"): `Asterism::CLI.new(net:, stop:, permit:)`. `net:` an `Asterism::Net` already connected (neither started nor closed; what a command subscribes to or hooks onto it is released when it ends), `stop:` ends a streaming command as Ctrl-C does, `permit:` is asked with an `Asterism::CLI::Plan` (the command, `:read` / `:call` / `:local`, the object and method of a call) and may refuse with a reason (`CLI#refused`). Such a command line takes no connection options, runs neither `mcp` nor `completion`, takes long options only in full, prints `--help` to its `out`, and its `__complete` keeps no cache and never exits the process.
|