#[non_exhaustive]pub struct AprsClientConfig {Show 14 fields
pub callsign: String,
pub ssid: u8,
pub symbol_table: char,
pub symbol_code: char,
pub baud: TncBaud,
pub beacon_comment: String,
pub smart_beaconing: SmartBeaconingConfig,
pub digipeater: Option<DigipeaterConfig>,
pub max_stations: usize,
pub station_timeout_secs: u64,
pub auto_ack: bool,
pub digipeater_path: Vec<Ax25Address>,
pub auto_query_response: bool,
pub auto_query_position: Option<(f64, f64)>,
}Expand description
Configuration for an AprsClient session.
Created with AprsClientConfig::new which provides sensible
defaults for a mobile station. All fields are public for
customisation before passing to AprsClient::start. Marked
#[non_exhaustive] so future optional fields can be added without
breaking the API.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.callsign: StringStation callsign (e.g., "N0CALL").
ssid: u8SSID (0-15). Common values: 7 = handheld, 9 = mobile, 15 = generic.
symbol_table: charAPRS primary symbol table character. Default: '/'.
symbol_code: charAPRS symbol code character. Default: '>' (car).
baud: TncBaudTNC data speed. Default: 1200 bps (AFSK).
beacon_comment: StringDefault comment appended to position beacons.
smart_beaconing: SmartBeaconingConfigSmartBeaconing algorithm configuration.
digipeater: Option<DigipeaterConfig>Optional digipeater configuration. When set, incoming packets are evaluated for relay according to the digipeater rules.
max_stations: usizeMaximum number of stations to track. Default: 500.
station_timeout_secs: u64Seconds before a station entry expires. Default: 3600 (1 hour).
auto_ack: boolAutomatically acknowledge incoming messages addressed to us.
Default: true.
digipeater_path: Vec<Ax25Address>Digipeater path for outgoing packets.
Default: WIDE1-1,WIDE2-1 (standard 2-hop path). Use an empty
vector for direct transmission with no digipeating. Parse from
a string with crate::aprs::parse_digipeater_path.
auto_query_response: boolAutomatically respond to ?APRSP position queries addressed to us.
When set and an incoming message contains ?APRSP, the client
sends a position beacon in response. Requires
auto_query_position to be set.
Default: true.
auto_query_position: Option<(f64, f64)>Cached position for auto query responses, as (lat, lon).
When None, query responses are not sent even if
auto_query_response is true. Update via
AprsClient::set_query_response_position.
Implementations§
Source§impl AprsClientConfig
impl AprsClientConfig
Sourcepub fn new(callsign: &str, ssid: u8) -> Self
pub fn new(callsign: &str, ssid: u8) -> Self
Create a new configuration with sensible defaults for a mobile station.
- Symbol: car (
/>) - Baud: 1200 bps (standard APRS AFSK)
SmartBeaconing: TH-D75 defaults (Menu 540-547)- Max stations: 500, timeout: 1 hour
- Auto-ack: on
Sourcepub fn builder(callsign: &str, ssid: u8) -> AprsClientConfigBuilder
pub fn builder(callsign: &str, ssid: u8) -> AprsClientConfigBuilder
Start building a configuration with the fluent builder.
Example:
use kenwood_thd75::AprsClientConfig;
let config = AprsClientConfig::builder("N0CALL", 9)
.symbol('/', '>')
.beacon_comment("mobile")
.auto_ack(true)
.build()
.expect("valid callsign and symbol");Trait Implementations§
Source§impl Clone for AprsClientConfig
impl Clone for AprsClientConfig
Source§fn clone(&self) -> AprsClientConfig
fn clone(&self) -> AprsClientConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more