RepeaterConfig

Struct RepeaterConfig 

Source
pub struct RepeaterConfig {
Show 13 fields pub enabled: bool, pub regions: Vec<[u8; 2], 8>, pub default_region: Option<[u8; 2]>, pub min_rssi: Option<i16>, pub min_snr: Option<i8>, pub flood_contention_snr_low_db: i8, pub flood_contention_snr_high_db: i8, pub flood_contention_min_window_percent: u8, pub flood_contention_max_window_frames: u8, pub flood_contention_ack_guard_percent: u8, pub flood_contention_max_deferrals: u8, pub amateur_radio_mode: AmateurRadioMode, pub station_callsign: Option<HamAddr>,
}
Expand description

Configuration governing whether and how the node forwards received frames.

The UMSH MAC layer includes an optional built-in repeater that forwards packets it successfully receives, extending the effective range of the network without requiring dedicated infrastructure. RepeaterConfig controls every facet of that behavior:

  • enabled — master on/off switch. When false, all inbound forwarding logic is skipped even if the other fields are populated.
  • regions — a local list of 2-byte ARNCE region codes used as the flood-forwarding eligibility filter. When non-empty, packets carrying region codes are flood-forwarded only if at least one of those codes appears here; when empty, forwarding imposes no region check and a tagged packet is forwarded whatever its region.
  • default_region — the region code inserted into a flood-forwarded packet that carries none. None — the default — means the repeater never tags: untagged packets are forwarded untagged. Tagging is deliberately opt-in and independent of regions, because inserting a code asserts where the packet is, not merely which regions the repeater will carry. An already-tagged packet is always forwarded with its codes unchanged.
  • min_rssi / min_snr — signal-quality thresholds for flood forwarding. Packets received below these values are not flood-forwarded; this prevents marginal receptions from being re-injected into the network at full power, which would degrade SNR for nearby nodes rather than help. These thresholds do not apply to source-routed hops.
  • Flood contention tuning — controls the SNR-to-delay mapping used when several eligible repeaters contend to flood-forward the same frame. These values should usually remain aligned across the mesh.
  • amateur_radio_mode — determines whether the repeater may forward encrypted or blind-unicast frames, and whether it must inject a station callsign. See AmateurRadioMode.
  • station_callsign — the ARNCE/HAM-64 callsign injected into the options block of every forwarded frame when operating in LicensedOnly or Hybrid mode, satisfying the third-party identification requirements of FCC §97.119 and equivalent regulations.

The default configuration has enabled: false; repeating must be explicitly opted in.

Fields§

§enabled: bool

Whether repeater forwarding is enabled.

§regions: Vec<[u8; 2], 8>

Allowed repeater region codes. Empty imposes no region check.

§default_region: Option<[u8; 2]>

Region code inserted into an untagged flood-forwarded packet. None forwards untagged packets untagged.

§min_rssi: Option<i16>

Minimum RSSI threshold for flood forwarding.

§min_snr: Option<i8>

Minimum SNR threshold for flood forwarding.

§flood_contention_snr_low_db: i8

Lower clamp bound for SNR-based flood forwarding contention.

§flood_contention_snr_high_db: i8

Upper clamp bound for SNR-based flood forwarding contention.

§flood_contention_min_window_percent: u8

Minimum forwarding contention window as a percentage of T_frame.

§flood_contention_max_window_frames: u8

Maximum forwarding contention window as a multiple of T_frame.

§flood_contention_ack_guard_percent: u8

ACK protection interval as a percentage of T_frame, added to the contention delay when flood-forwarding an ack-requested packet that was received with no remaining source-route hops (see channel-access.md § ACK Protection Interval).

§flood_contention_max_deferrals: u8

Maximum number of overheard-repeat deferrals before abandoning a pending forward.

§amateur_radio_mode: AmateurRadioMode

Amateur-radio operating mode for forwarding.

§station_callsign: Option<HamAddr>

Optional station callsign injected on forwarded traffic.

Trait Implementations§

Source§

impl Clone for RepeaterConfig

Source§

fn clone(&self) -> RepeaterConfig

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RepeaterConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RepeaterConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for RepeaterConfig

Source§

fn eq(&self, other: &RepeaterConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for RepeaterConfig

Source§

impl StructuralPartialEq for RepeaterConfig

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.