pub struct MyNodeInfo {
pub my_node_num: u32,
pub reboot_count: u32,
pub min_app_version: u32,
pub device_id: Vec<u8>,
pub pio_env: String,
pub firmware_edition: i32,
pub nodedb_count: u32,
}Expand description
Unique local debugging info for this node Note: we don’t include position or the user info, because that will come in the Sent to the phone in response to WantNodes.
Fields§
§my_node_num: u32Tells the phone what our node number is, default starting value is lowbyte of macaddr, but it will be fixed if that is already in use
reboot_count: u32The total number of reboots this node has ever encountered (well - since the last time we discarded preferences)
min_app_version: u32The minimum app version that can talk to this device. Phone/PC apps should compare this to their build number and if too low tell the user they must update their app
device_id: Vec<u8>Unique hardware identifier for this device
pio_env: StringThe PlatformIO environment used to build this firmware
firmware_edition: i32The indicator for whether this device is running event firmware and which
nodedb_count: u32The number of nodes in the nodedb. This is used by the phone to know how many NodeInfo packets to expect on want_config
Implementations§
Source§impl MyNodeInfo
impl MyNodeInfo
Sourcepub fn firmware_edition(&self) -> FirmwareEdition
pub fn firmware_edition(&self) -> FirmwareEdition
Returns the enum value of firmware_edition, or the default if the field is set to an invalid enum value.
Sourcepub fn set_firmware_edition(&mut self, value: FirmwareEdition)
pub fn set_firmware_edition(&mut self, value: FirmwareEdition)
Sets firmware_edition to the provided enum value.
Trait Implementations§
Source§impl Clone for MyNodeInfo
impl Clone for MyNodeInfo
Source§fn clone(&self) -> MyNodeInfo
fn clone(&self) -> MyNodeInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MyNodeInfo
impl Debug for MyNodeInfo
Source§impl Default for MyNodeInfo
impl Default for MyNodeInfo
Source§impl<'de> Deserialize<'de> for MyNodeInfo
impl<'de> Deserialize<'de> for MyNodeInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for MyNodeInfo
impl Hash for MyNodeInfo
Source§impl Message for MyNodeInfo
impl Message for MyNodeInfo
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for MyNodeInfo
impl PartialEq for MyNodeInfo
Source§fn eq(&self, other: &MyNodeInfo) -> bool
fn eq(&self, other: &MyNodeInfo) -> bool
self and other values to be equal, and is used by ==.