initial comms

This commit is contained in:
2025-10-25 12:23:23 -07:00
parent fd63bdc0c9
commit b067ae5cec
17 changed files with 536 additions and 356 deletions

View File

@@ -1,14 +1,16 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}
use log::info;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
#[cfg(test)]
mod tests {
use super::*;
pub mod logger;
pub mod command;
pub mod telemetry;
pub mod udp;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
pub fn add_ctrlc_handler(flag: Arc<AtomicBool>) -> anyhow::Result<()> {
ctrlc::set_handler(move || {
info!("Shutdown Requested");
flag.store(false, Ordering::Relaxed);
})?;
Ok(())
}