pub struct App {
pub session: Option<Session>,
pub prefs: Prefs,
pub interactive: bool,
pub trace: bool,
pub no_save: bool,
pub baud: u32,
pub discovery: Discovery,
pub last_scan: Vec<Found>,
}Expand description
Everything a command may need beyond the device itself: the attachment, the settings, and the difference between a shell and a one-shot invocation.
Fields§
§session: Option<Session>§prefs: Prefs§interactive: boolTrue in the shell, where a question can be asked and a failure returns to a prompt.
trace: bool§no_save: bool§baud: u32§discovery: DiscoveryHow a bare connect resolves a scan — --pick at launch keeps
asking for the rest of the shell session.
last_scan: Vec<Found>The last scan listing, so connect <N> can refer to it.
Implementations§
Source§impl App
impl App
pub fn session(&mut self) -> Result<&mut Session>
pub fn device(&mut self) -> Result<&mut UlcpDevice<SessionLink>>
pub fn target_is_ble(&self) -> bool
Sourcepub fn detach(&mut self) -> Option<String>
pub fn detach(&mut self) -> Option<String>
Drop the attachment, returning what it was called. Dropping the link is what reverts session-scoped device state.
pub fn rename(&mut self, label: String)
Sourcepub fn for_extcap(session: Session, prefs: Prefs, baud: u32) -> Self
pub fn for_extcap(session: Session, prefs: Prefs, baud: u32) -> Self
An attached, non-interactive app for the Wireshark extcap interface.
interactive is false in both its senses here: there is no
prompt to return to, and nobody to answer a question. That is
also what lets a dropped BLE link be recovered underneath a
running capture.
pub async fn attach(&mut self, target: Target) -> Result<()>
Sourcepub async fn reattach(&mut self, tethered: bool) -> Result<()>
pub async fn reattach(&mut self, tethered: bool) -> Result<()>
Re-attach the open link in the other mode. Used by provision,
which needs a tethered handle for one command.
Sourcepub async fn reconnect(&mut self) -> Result<()>
pub async fn reconnect(&mut self) -> Result<()>
Open a fresh link to the same radio, keeping the capture tap so a recovered capture stays one file.