diff --git a/src/args.rs b/src/args.rs index 5d49134..d3d04b1 100644 --- a/src/args.rs +++ b/src/args.rs @@ -53,6 +53,8 @@ pub enum GetCommands { LteRsrq, /// Fetch Cell ID. LteCellId, + /// Fetch eNodeB ID. + LteEnodebId, /// Fetch router signal bar. Signalbar, /// Fetch last cached airtime balance. diff --git a/src/main.rs b/src/main.rs index 4233ee4..266438a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,6 +28,7 @@ async fn main() -> EyreResult<()> { GetCommands::LteRsrp => router.show::().await?, GetCommands::LteRsrq => router.show::().await?, GetCommands::LteCellId => router.show::().await?, + GetCommands::LteEnodebId => 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 8c804c7..cbe8a48 100644 --- a/src/proc_get.rs +++ b/src/proc_get.rs @@ -227,6 +227,24 @@ impl ProcGet for LteCellId { } } +#[derive(Debug, Deserialize)] +pub struct LteEnodebId { + pub lte_enodebid: BoxStr, +} + +impl ProcGet for LteEnodebId { + const CMD: &str = "lte_enodebid"; + type Params = (); + + fn print_table(&self) { + let mut table = create_table(); + table + .set_header(["LTE eNodeB ID"]) + .add_row([&self.lte_enodebid]); + println!("{table}"); + } +} + #[derive(Debug, Deserialize)] pub struct SignalBar { pub signalbar: BoxStr,