Expand description
The wire protocol: JSON lines.
The recorder starts a plugin’s executable with no arguments and writes one
HostMessage per line to its stdin; the plugin writes one
PluginMessage per line to its stdout. stderr is the plugin’s log.
Either side ignores message types and fields it doesn’t know, so both can
grow within an API_VERSION.
plugin --describe prints the plugin’s Manifest (one JSON object) and exits.
Modules§
- base64
- Standard base64 (for
AudioChunk::pcm). - format
- Audio formats a plugin can ask for (
Manifest::audio_formats). WAV is always there. - topic
- What a plugin can subscribe to (
Manifest::subscribe).
Structs§
- Audio
Chunk - A slice of a recording call’s audio: 16-bit mono PCM, little-endian, base64.
- Call
Files - Call
Info - A call as it starts or ends.
- Call
Record - Trunk Recorder’s call JSON. Fields this crate doesn’t name are in
extra. - Concluded
Call - A recorded call whose files are on disk.
- Endpoint
- A service a plugin talks to, and how it’s answering.
- Freq
Entry - Hello
- Host
Info - Manifest
- Who a plugin is and what it wants — printed by
plugin --describe. - Metrics
- A plugin’s figures (
PluginMessage::Metrics). Every field is optional: send what you know. Totals are since the plugin started. - Shutdown
- SrcEntry
- A radio heard on the call.
- Status
- System
Info - System
Status - Unit
Event - Something a radio did on the control channel.
Enums§
Constants§
- API_
VERSION - The protocol version. A plugin states the version it was built for in its
manifest; the recorder runs plugins whose
apiit supports. - CONVENTIONAL
- The index calls and events use for the first conventional system; the
next ones count down from it (65534, 65533, …). Each is a system of its
own in
Hello::systems, with its own short name and settings. - EXIT_
CONFIG - Exit status of a plugin that can’t run with its configuration: the recorder shows the error and doesn’t restart it until recording next starts. (Any other exit is a crash, and the plugin is restarted with backoff.)