Skip to main content

Crate telepath_server

Crate telepath_server 

Source
Expand description

Target-side Telepath library.

Runs on the MCU in no_std mode. Provides:

§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 profile feature).
transport
Non-blocking byte-stream transport trait.

Structs§

CommandMetadata
Static metadata for a single registered RPC command.
ResourceRegistry
TelepathServer
RPC server that runs on the target MCU.

Enums§

DispatchError
Errors that can occur during command dispatch.
DispatchOutcome
Successful dispatch outcome: how many bytes were written to output and which ResponseStatus the dispatch layer should emit.
PacketType
Wire-level packet type discriminant.
ResponseStatus
Status code carried inside a Response packet.
WireError
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§

SchemaFn
Type alias for schema-writer function pointers.
ShimFn
Type-erased shim function signature.

Attribute Macros§

command
Marks a function as a Telepath RPC command.