embedded-nano-mesh 3.2.0

Lightweight mesh communication protocol for embedded devices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::super::bitpos::{is_flag_set, set_flag};
use super::super::constants::IGNORE_DUPLICATIONS_FLAG;
use super::super::traits::PacketFlagOps;
use super::super::Packet;

impl PacketFlagOps for Packet {
    // IGNORE_DUPLICATIONS_FLAG
    fn set_ignore_duplication_flag(&mut self, new_state: bool) {
        set_flag(&mut self.flags, IGNORE_DUPLICATIONS_FLAG, new_state);
    }

    fn is_ignore_duplication_flag_set(&self) -> bool {
        is_flag_set(self.flags, IGNORE_DUPLICATIONS_FLAG)
    }
}