diff --git a/src/args.rs b/src/args.rs index 67bbfa3..5d49134 100644 --- a/src/args.rs +++ b/src/args.rs @@ -51,6 +51,8 @@ pub enum GetCommands { LteRsrp, /// Fetch LTE RSRQ. LteRsrq, + /// Fetch Cell ID. + LteCellId, /// Fetch router signal bar. Signalbar, /// Fetch last cached airtime balance. diff --git a/src/main.rs b/src/main.rs index 5c3a623..4233ee4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,6 +27,7 @@ async fn main() -> EyreResult<()> { GetCommands::Sms => router.show::().await?, GetCommands::LteRsrp => router.show::().await?, GetCommands::LteRsrq => router.show::().await?, + GetCommands::LteCellId => router.show::().await?, }, TopLevelCommands::Post { command } => match command { PostCommands::Reboot => router.reboot().await.print_table(), diff --git a/src/proc_get.rs b/src/proc_get.rs index 1c6a963..8c804c7 100644 --- a/src/proc_get.rs +++ b/src/proc_get.rs @@ -209,6 +209,24 @@ impl ProcGet for LteRsrp { } } +#[derive(Debug, Deserialize)] +pub struct LteCellId { + pub lte_cellid: BoxStr, +} + +impl ProcGet for LteCellId { + const CMD: &str = "lte_cellid"; + type Params = (); + + fn print_table(&self) { + let mut table = create_table(); + table + .set_header(["LTE Cell ID"]) + .add_row([&self.lte_cellid]); + println!("{table}"); + } +} + #[derive(Debug, Deserialize)] pub struct SignalBar { pub signalbar: BoxStr,