umsh_cli/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2
3extern crate alloc;
4
5pub mod commands;
6pub mod events;
7pub mod io;
8pub mod logger;
9pub mod mac_cmd;
10pub mod peer_ref;
11pub mod session;
12pub mod settings;
13pub mod stats;
14
15pub use events::CliEvent;
16pub use io::{CliInput, CliOutput};
17pub use logger::{CliLogger, LogLevel, NullLogger};
18pub use session::{CliError, CliSession};
19pub use umsh_hal::{
20    ChannelStore, NoChannelStore, NoPeerStore, NoPowerControl, PeerStore, PowerControl,
21};
22
23/// [`CliSession`] sized for typical desktop and tracker-class targets.
24///
25/// Uses [`NoPeerStore`], [`NoChannelStore`], and [`NoPowerControl`] — state is
26/// tracked in-memory only and `/poweroff` is a no-op. For embedded targets
27/// with flash storage and a real shutdown path, use `CliSession<…>` directly.
28///
29/// Capacity defaults: 16 peers, 16 aliases, 8 channels, 64 events,
30/// 256-byte command line. Replace with an explicit `CliSession<…>` when
31/// these defaults are wrong for the target.
32pub type DefaultCliSession<M, OUT, LOG> = CliSession<
33    M,
34    OUT,
35    LOG,
36    NoPeerStore,
37    NoChannelStore,
38    NoPowerControl,
39    16,  // N_PEERS
40    16,  // N_ALIASES
41    8,   // N_CHANNELS
42    64,  // N_EVENTS
43    256, // LINE_MAX
44>;