mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-05-08 11:58:25 +00:00
This feature makes it possible to select between PostgreSQL and SQLite as database backend using a compile feature-flag. It is not possible to enable both at the same time. --------- Co-authored-by: Momo Bel <plopyomomo@gmail.com>
26 lines
713 B
Rust
Vendored
26 lines
713 B
Rust
Vendored
include!(concat!(env!("OUT_DIR"), "/internal/internal.rs"));
|
|
#[cfg(feature = "json")]
|
|
include!(concat!(env!("OUT_DIR"), "/internal/internal.serde.rs"));
|
|
|
|
impl DeviceSession {
|
|
pub fn get_a_f_cnt_down(&self) -> u32 {
|
|
if self.mac_version().to_string().starts_with("1.0") {
|
|
// LoRaWAN 1.0
|
|
self.n_f_cnt_down
|
|
} else {
|
|
// LoRaWAN 1.1
|
|
self.a_f_cnt_down
|
|
}
|
|
}
|
|
|
|
pub fn set_a_f_cnt_down(&mut self, f_cnt: u32) {
|
|
if self.mac_version().to_string().starts_with("1.0") {
|
|
// LoRaWAN 1.0
|
|
self.n_f_cnt_down = f_cnt;
|
|
} else {
|
|
// LoRaWAN 1.1
|
|
self.a_f_cnt_down = f_cnt;
|
|
}
|
|
}
|
|
}
|