pub struct ParentCandidate {
pub node_id: NodeId,
pub level: HierarchyLevel,
pub rssi: i8,
pub age_ms: u64,
pub failure_count: u8,
}Expand description
Candidate for parent selection
Fields§
§node_id: NodeIdNode ID
level: HierarchyLevelHierarchy level
rssi: i8Signal strength
age_ms: u64Time since last beacon (ms)
failure_count: u8Previous failure count
Implementations§
Source§impl ParentCandidate
impl ParentCandidate
Sourcepub fn score(&self, my_level: HierarchyLevel) -> i32
pub fn score(&self, my_level: HierarchyLevel) -> i32
Calculate a score for this candidate (higher = better)
Factors:
- RSSI (signal strength) - primary factor
- Age (freshness of beacon)
- Failure history
- Hierarchy level preference
Trait Implementations§
Source§impl Clone for ParentCandidate
impl Clone for ParentCandidate
Source§fn clone(&self) -> ParentCandidate
fn clone(&self) -> ParentCandidate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParentCandidate
impl RefUnwindSafe for ParentCandidate
impl Send for ParentCandidate
impl Sync for ParentCandidate
impl Unpin for ParentCandidate
impl UnwindSafe for ParentCandidate
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
Mutably borrows from an owned value. Read more