Struct esp_idf_sys::mesh_assoc_t

source ·
#[repr(C, packed(1))]
pub struct mesh_assoc_t {
Show 31 fields pub eid: u8, pub len: u8, pub oui: [u8; 3], pub type_: u8, pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1]>, pub mesh_type: u8, pub mesh_id: [u8; 6], pub layer_cap: u8, pub layer: u8, pub assoc_cap: u8, pub assoc: u8, pub leaf_cap: u8, pub leaf_assoc: u8, pub root_cap: u16, pub self_cap: u16, pub layer2_cap: u16, pub scan_ap_num: u16, pub rssi: i8, pub router_rssi: i8, pub flag: u8, pub rc_addr: [u8; 6], pub rc_rssi: i8, pub vote_addr: [u8; 6], pub vote_rssi: i8, pub vote_ttl: u8, pub votes: u16, pub my_votes: u16, pub reason: u8, pub child: [u8; 6], pub toDS: u8,
}
Expand description

@brief Mesh networking IE

Fields§

§eid: u8

< element ID, vendor specific, 221

§len: u8

< element length, the length after this member

§oui: [u8; 3]

< organization identifier, 0x18fe34

§type_: u8

< ESP defined IE type, include Assoc IE, SSID IE, Ext Assoc IE, Roots IE, etc.

§_bitfield_align_1: [u8; 0]§_bitfield_1: __BindgenBitfieldUnit<[u8; 1]>§mesh_type: u8

< mesh device type, include idle, root, node, etc, refer to mesh_type_t

§mesh_id: [u8; 6]

< mesh ID, only the same mesh id can form a unified mesh network

§layer_cap: u8

< layer_cap = max_layer - layer, indicates the number of remaining available layers of the mesh network

§layer: u8

< the current layer of this node

§assoc_cap: u8

< the maximum connections of this mesh AP

§assoc: u8

< current connections of this mesh AP

§leaf_cap: u8

< the maximum number of leaves in the mesh network

§leaf_assoc: u8

< the number of current connected leaves

§root_cap: u16

< the capacity of the root, equal to the total child numbers plus 1, root node updates root_cap and self_cap

§self_cap: u16

< the capacity of myself, total child numbers plus 1, all nodes update this member

§layer2_cap: u16

< the capacity of layer2 node, total child numbers plus 1, layer2 node updates layer2_cap and self_cap, root sets this to 0

§scan_ap_num: u16

< the number of mesh APs around

§rssi: i8

< RSSI of the connected parent, default value is -120, root node will not update this

§router_rssi: i8

< RSSI of the router, default value is -120

§flag: u8

< flag of networking, indicates the status of the network, refer to MESH_ASSOC_FLAG_XXX */ /**< vote related

§rc_addr: [u8; 6]

< the address of the root candidate, i.e. the voted addesss before connection, root node will update this with self address

§rc_rssi: i8

< the router RSSI of the root candidate

§vote_addr: [u8; 6]

< the voted address after connection

§vote_rssi: i8

< the router RSSI of the voted address

§vote_ttl: u8

< vote ttl, indicate the voting is from myself or from other nodes

§votes: u16

< the number of all voting nodes

§my_votes: u16

< the number of nodes that voted for me

§reason: u8

< the reason why the voting happens, root initiated or child initiated, refer to mesh_vote_reason_t

§child: [u8; 6]

< child address, not used currently

§toDS: u8

< state represents whether the root is able to access external IP network

Implementations§

source§

impl mesh_assoc_t

source

pub fn encrypted(&self) -> u8

source

pub fn set_encrypted(&mut self, val: u8)

source

pub fn version(&self) -> u8

source

pub fn set_version(&mut self, val: u8)

source

pub fn new_bitfield_1( encrypted: u8, version: u8, ) -> __BindgenBitfieldUnit<[u8; 1]>

Trait Implementations§

source§

impl Clone for mesh_assoc_t

source§

fn clone(&self) -> mesh_assoc_t

Returns a copy 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 mesh_assoc_t

source§

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

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

impl Default for mesh_assoc_t

source§

fn default() -> mesh_assoc_t

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

impl Copy for mesh_assoc_t

Auto Trait Implementations§

§

impl Freeze for mesh_assoc_t

§

impl RefUnwindSafe for mesh_assoc_t

§

impl Send for mesh_assoc_t

§

impl Sync for mesh_assoc_t

§

impl Unpin for mesh_assoc_t

§

impl UnwindSafe for mesh_assoc_t

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: Copy,

§

unsafe fn clone_to_uninit(&self, dst: *mut T)

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

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

§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.

§

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.