Expand description
Target-side Telepath library.
Runs on the MCU in no_std mode. Provides:
TelepathServer: receive loop, COBS decode, dispatch, rzCOBS encodetransport::Transport: non-blocking byte-stream I/O trait- Re-export of
#[command]attribute macro
§Architecture
Transport → FrameAccumulator → cobs_decode → postcard::from_bytes → Dispatcher
→ postcard::to_slice → rzcobs_encode → Transport§Usage
ⓘ
use telepath_server::{TelepathServer, command};
#[command]
fn set_led(id: u8, brightness: u16) {
// ...
}
let mut server = TelepathServer::<_, 512>::new(transport, telepath_server::commands());
loop { server.poll(); }Re-exports§
pub use profile::init_dwt;
Modules§
- profile
- DWT-based framing instrumentation (enabled by the
profilefeature). - transport
- Non-blocking byte-stream transport trait.
Structs§
- Command
Metadata - Static metadata for a single registered RPC command.
- Resource
Registry - Telepath
Server - RPC server that runs on the target MCU.
Enums§
- Dispatch
Error - Errors that can occur during command dispatch.
- Dispatch
Outcome - Successful dispatch outcome: how many bytes were written to
outputand whichResponseStatusthe dispatch layer should emit. - Packet
Type - Wire-level packet type discriminant.
- Response
Status - Status code carried inside a
Responsepacket. - Wire
Error - Errors that can arise during wire-level encoding or decoding.
Constants§
- CMD_
ID_ DISCOVERY - Reserved command ID for the Command Discovery Protocol (CDP).
- MAX_
PAYLOAD_ SIZE - Maximum payload size in bytes. Both sides MUST enforce this limit.
Statics§
- TELEPATH_
COMMANDS - All commands registered via
#[command], collected at link time.
Functions§
- commands
- Returns the complete set of commands registered by
#[command].
Type Aliases§
Attribute Macros§
- command
- Marks a function as a Telepath RPC command.