csyn is a ROS-like command-line tool for Synapse systems using Zenoh for
transport and FlatBuffers for payloads.
The command grammar intentionally mirrors common ROS 2 workflows:
csyn topic list
csyn topic echo synapse/manual_control
csyn topic pub test/topic --text hello
csyn topic hz synapse/manual_control
csyn topic bw synapse/manual_control
csyn type list
csyn type show ManualControl
csyn bag record 'synapse/**' -o flight.csynbag
csyn bag info flight.csynbag
csyn bag play flight.csynbag
csyn bag export flight.csynbag -o flight.jsonl
csyn graph serveThe default Zenoh router endpoint is tcp/127.0.0.1:7447. Override it with:
csyn --connect tcp/192.168.1.10:7447 topic list
CSYN_CONNECT=tcp/192.168.1.10:7447 csyn topic listIf no router is running locally, start one in another terminal:
zenohd -l tcp/127.0.0.1:7447topic list subscribes to ** for a short observation window and prints topics
that were seen. Zenoh does not provide ROS-style graph discovery by default, so
this is traffic-observed discovery for now.
topic echo decodes known Synapse FlatBuffers payloads using synapse_fbs when
the topic name or --type identifies the root type:
csyn topic echo synapse/manual_control
csyn topic echo synapse/manual_control --type ManualControl --output json
csyn topic echo test/topic --rawtopic pub currently publishes raw payloads from text or files:
csyn topic pub test/topic --text hello
csyn topic pub test/topic --file payload.bin
csyn topic pub test/topic --text hello --rate 10 --count 100Typed JSON-to-FlatBuffer publish is intentionally left for the BFBS reflection builder layer.
graph serve starts a local web UI for debugging traffic and Zenoh topology:
csyn graph serve
csyn --connect tcp/127.0.0.1:7448 graph serve --bind 127.0.0.1:8088Open http://127.0.0.1:8088 in a browser. The graph shows observed topics,
message counts, rates, payload sizes, Zenoh router/session topology, and any
publisher/subscriber declarations exposed by Zenoh admin-space.
The topic/message view is traffic-observed. App-level publisher and subscriber identity depends on what Zenoh admin-space exposes, so instrumented processes can make this richer over time without changing the graph API.
.csynbag v1 is a compact binary stream:
CSYNBAG1\n
u32_le record_len
synapse.log.LogRecord bytes
u32_le record_len
synapse.log.LogRecord bytes
...
Each record is a FlatBuffer synapse.log.LogRecord using the existing
synapse_fbs::log schema:
LogFileHeader
SchemaRecord
TopicRecord
LogFrame
SchemaRecord carries bundled synapse_all.bfbs bytes for known root types, so
recorded bags are self-describing enough for future dynamic decoders/exporters.
TopicRecord maps Zenoh topic names to schema IDs. LogFrame stores the compact
per-sample payload with a monotonic timestamp and numeric topic ID.
The v1 stream is simple and append-friendly. A later v2 can keep the same logical records but group frames into compressed chunks with an index footer.
The current decoder registry includes these synapse_fbs root types:
csyn type listThe registry is intentionally centralized in src/types.rs, so adding a new
generated FlatBuffers root is a local change.