embedded-nano-mesh 2.1.11

Lightweight mesh communication protocol for embedded devices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::super::types::IdType;
use super::super::Packet;

impl Packet {
    pub fn get_id(&self) -> IdType {
        self.id
    }

    pub fn set_id(&mut self, id: IdType) {
        self.id = id;
    }

    pub fn increment_id(&mut self) {
        self.id = self.id.overflowing_add(1).0;
    }
}