1#![no_std]
6
7pub use {
8 crate::{
9 client::{Client, PUBLISH_SHORTCODE_OFFSET},
10 client_io::{ClientIo, ClientIoError},
11 table::{Table, TableError},
12 },
13 anachro_icd::{self, arbitrator::SubMsg, ManagedString, Path, PubSubPath, Version},
14 postcard::{from_bytes, to_slice},
15};
16
17mod client;
18mod client_io;
19mod table;
20
21#[derive(Debug, PartialEq, Eq)]
23pub enum Error {
24 NotActive,
25 Busy,
26 UnexpectedMessage,
27 ClientIoError(ClientIoError),
28}
29
30impl From<ClientIoError> for Error {
31 fn from(other: ClientIoError) -> Self {
32 Error::ClientIoError(other)
33 }
34}
35
36#[derive(Debug)]
38pub struct RecvMsg<T: Table> {
39 pub path: Path<'static>,
40 pub payload: T,
41}
42
43#[derive(Debug)]
45pub struct SendMsg<'a> {
46 pub buf: &'a [u8],
47 pub path: &'static str,
48}