kiss_tnc/lib.rs
1//! [KISS TNC] client for Rust
2//!
3//! [KISS TNC]: https://en.wikipedia.org/wiki/KISS_(TNC)
4//!
5//! # Usage
6//!
7//! ```no_run
8//! use kiss_tnc::Tnc;
9//!
10//! tokio_test::block_on(async {
11//! let mut tnc = Tnc::connect_tcp("localhost:8001") // Direwolf default port number
12//! .await.expect("Could not connect to KISS TNC");
13//! tnc.send_frame("Hello world!".as_bytes()); // Send "Hello world!" over the air
14//! tnc.flush();
15//!
16//! // Reads a frame from the TNC
17//! // In most cases you can ignore `port` - it only matters if
18//! // you have multiple channels
19//! let (_port, data) = tnc.read_frame().await.expect("Could not read frame");
20//! println!("{:?}", data);
21//! });
22//! ```
23
24mod command;
25mod constants;
26pub mod errors;
27pub mod tnc;
28
29pub use tnc::Tnc;