diff --git a/src/args.rs b/src/args.rs index d3d04b1..c06feb2 100644 --- a/src/args.rs +++ b/src/args.rs @@ -55,6 +55,8 @@ pub enum GetCommands { LteCellId, /// Fetch eNodeB ID. LteEnodebId, + /// Fetch Tracking Area Code. + LteTac, /// Fetch router signal bar. Signalbar, /// Fetch last cached airtime balance. diff --git a/src/main.rs b/src/main.rs index 266438a..408bda9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,6 +29,7 @@ async fn main() -> EyreResult<()> { GetCommands::LteRsrq => router.show::().await?, GetCommands::LteCellId => router.show::().await?, GetCommands::LteEnodebId => router.show::().await?, + GetCommands::LteTac => 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 cbe8a48..875ee37 100644 --- a/src/proc_get.rs +++ b/src/proc_get.rs @@ -245,6 +245,22 @@ impl ProcGet for LteEnodebId { } } +#[derive(Debug, Deserialize)] +pub struct LteTac { + pub lte_tac: BoxStr, +} + +impl ProcGet for LteTac { + const CMD: &str = "lte_tac"; + type Params = (); + + fn print_table(&self) { + let mut table = create_table(); + table.set_header(["LTE TAC"]).add_row([&self.lte_tac]); + println!("{table}"); + } +} + #[derive(Debug, Deserialize)] pub struct SignalBar { pub signalbar: BoxStr,