dtn7_plus/location/mod.rs
1mod block;
2mod loc;
3
4pub use block::{get_location_data, new_location_block, LocationBlockData, LOCATION_BLOCK};
5pub use loc::Location;
6
7use bitflags::bitflags;
8use serde::{Deserialize, Serialize};
9
10bitflags! {
11 // Results in default value with bits: 0
12 #[derive(Default, Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Hash)]
13 pub struct NodeTypeFlags: u16 {
14 /// Indicates that this node is a mobile device, moving over time, e.g., UAV, smartphone or satellite
15 /// If this flag is not set then the node is considered stationary, e.g., immobile infrastructure such as an access point
16 const MOBILE = 0b00000001;
17 /// Node does not listen for incoming bundles, e.g., wireless sensor node periodically reporting data
18 const PURESENDER = 0b00000010;
19 /// This node is a gateway connecting different networks
20 const GW = 0b00000100;
21 /// This node has a working Internet uplink
22 const INTERNET = 0b00001000;
23 /// Indicates that this node is battery powered
24 const BATTERY = 0b00010000;
25 }
26}