pub(crate) struct App {Show 34 fields
pub connected: bool,
pub port_path: String,
pub state: RadioState,
pub focus: Pane,
pub main_view: MainView,
pub input_mode: InputMode,
pub mcp: McpState,
pub should_quit: bool,
pub quit_pending: bool,
pub status_message: Option<String>,
pub show_help: bool,
pub channel_list_index: usize,
pub settings_cat_index: usize,
pub settings_mcp_index: usize,
pub search_filter: String,
pub target_band: Band,
pub cmd_tx: Option<UnboundedSender<RadioCommand>>,
pub aprs_mode: AprsMode,
pub aprs_stations: Vec<AprsStationCache>,
pub aprs_messages: Vec<AprsMessageStatus>,
pub aprs_station_index: usize,
pub aprs_compose: Option<String>,
pub dstar_mode: DStarMode,
pub dstar_last_heard: Vec<LastHeardEntry>,
pub dstar_last_heard_index: usize,
pub dstar_text_message: Option<String>,
pub dstar_rx_header: Option<DStarHeader>,
pub dstar_rx_active: bool,
pub dstar_urcall_input: Option<String>,
pub dstar_reflector_input: Option<String>,
pub channel_edit_mode: bool,
pub channel_edit_field: ChannelEditField,
pub channel_edit_buffer: String,
pub fm_radio_on: bool,
}Expand description
Central application state.
Fields§
§connected: bool§port_path: String§state: RadioState§focus: Pane§main_view: MainView§input_mode: InputMode§mcp: McpState§should_quit: bool§quit_pending: bool§status_message: Option<String>§show_help: bool§channel_list_index: usize§settings_cat_index: usizeSelected row in the CAT settings viewer.
settings_mcp_index: usizeSelected row in the MCP settings viewer.
search_filter: StringActive search filter for channel list (empty = show all).
target_band: BandWhich band channel-tune and freq-input target (last focused band pane).
cmd_tx: Option<UnboundedSender<RadioCommand>>Sender for commands to the radio background task.
aprs_mode: AprsModeAPRS mode state.
aprs_stations: Vec<AprsStationCache>Cached APRS stations, sorted by last heard (most recent first).
aprs_messages: Vec<AprsMessageStatus>Tracked sent APRS messages.
aprs_station_index: usizeSelected station index in the APRS station list.
aprs_compose: Option<String>When set, the APRS message compose prompt is active.
dstar_mode: DStarModeD-STAR mode state.
dstar_last_heard: Vec<LastHeardEntry>D-STAR last heard entries (gateway mode).
dstar_last_heard_index: usizeSelected index in the D-STAR last heard list.
dstar_text_message: Option<String>Current D-STAR text message (from slow data).
dstar_rx_header: Option<DStarHeader>Current D-STAR RX header (gateway mode).
dstar_rx_active: boolWhether a D-STAR voice transmission is active.
dstar_urcall_input: Option<String>D-STAR URCALL input buffer (when prompting).
dstar_reflector_input: Option<String>D-STAR reflector input buffer (when prompting).
channel_edit_mode: boolChannel edit mode is active.
channel_edit_field: ChannelEditFieldWhich field is selected in channel edit mode.
channel_edit_buffer: StringText buffer for the currently edited field.
fm_radio_on: boolFM radio status (true = on). Tracked locally since FR is write-only.
Implementations§
Source§impl App
impl App
Sourcepub(crate) fn filtered_channels(&self) -> Vec<u16>
pub(crate) fn filtered_channels(&self) -> Vec<u16>
Returns the list of used channel numbers, filtered by search_filter.
fn used_channel_count(&self) -> usize
Sourcepub(crate) fn new(port_path: String) -> Self
pub(crate) fn new(port_path: String) -> Self
Create a new app instance, loading MCP cache from disk if available.
Sourcepub(crate) fn update(&mut self, msg: Message) -> bool
pub(crate) fn update(&mut self, msg: Message) -> bool
Process a message and update state. Returns true if a render is needed.
fn handle_key(&mut self, key: KeyEvent) -> bool
Sourcefn toggle_setting(&mut self)
fn toggle_setting(&mut self)
Toggle a boolean setting or show hint for numeric ones.
Sourcefn adjust_setting(&mut self, delta: i8)
fn adjust_setting(&mut self, delta: i8)
Adjust a numeric setting by delta with +/-.
Sourcefn handle_aprs_event(&mut self, event: AprsEvent)
fn handle_aprs_event(&mut self, event: AprsEvent)
Process an incoming APRS event from the radio task.
Sourcefn update_station_cache(&mut self, entry: &StationEntry)
fn update_station_cache(&mut self, entry: &StationEntry)
Update the station cache from a StationEntry.
Sourcefn sort_aprs_stations(&mut self)
fn sort_aprs_stations(&mut self)
Sort stations by most recently heard.
Sourcefn handle_dstar_event(&mut self, event: DStarEvent)
fn handle_dstar_event(&mut self, event: DStarEvent)
Toggle APRS mode on or off.
fn toggle_gps(&mut self)
fn toggle_gps_pc_output(&mut self)
fn toggle_dstar_mode(&mut self)
fn toggle_fm_radio(&mut self)
Sourcefn apply_channel_edit(&mut self, field: ChannelEditField, buf: &str)
fn apply_channel_edit(&mut self, field: ChannelEditField, buf: &str)
Apply a channel edit from the edit buffer.
Uses ME (memory channel) write via CAT. This tunes the radio’s live channel, not permanent memory storage (which would require MCP).
fn toggle_aprs_mode(&mut self)
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnwindSafe for App
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more