Multitech xDot Utils

Committer:
Lucian Corduneanu
Date:
Mon May 21 18:08:09 2018 +0300
Revision:
4:db99b2a7d062
Parent:
3:7fa5603c10dc
Child:
6:febbdd0d0e55
Refactor & update the multitech dot utils to the latest version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 1 #ifndef MBED_MULTITECHDOT_DOT_DEFS_H
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 2 #define MBED_MULTITECHDOT_DOT_DEFS_H
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 3
lucian@192-168-0-108.rdsnet.ro 3:7fa5603c10dc 4 #include "MTSLog.h"
lucian@192-168-0-108.rdsnet.ro 3:7fa5603c10dc 5
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 6 struct dot_config {
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 7 /**
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 8 * DevAddr, 4 bytes.
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 9 */
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 10 uint8_t network_address[4];
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 11
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 12 /**
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 13 * NwkSKey, 16 bytes
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 14 */
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 15 uint8_t network_session_key[16];
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 16
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 17 /**
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 18 * AppSKey, 16 bytes
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 19 */
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 20 uint8_t data_session_key[16];
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 21
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 22 uint8_t frequency_sub_band;
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 23
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 24 bool public_network;
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 25
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 26 /**
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 27 * Acknowledgements: 0 to disable acks, otherwise 1 - 8
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 28 */
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 29 uint8_t ack;
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 30
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 31 /**
Lucian Corduneanu 4:db99b2a7d062 32 * Enable Adaptive Data Rate
Lucian Corduneanu 4:db99b2a7d062 33 */
Lucian Corduneanu 4:db99b2a7d062 34 bool adr;
Lucian Corduneanu 4:db99b2a7d062 35
Lucian Corduneanu 4:db99b2a7d062 36 /**
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 37 * Sleep time in seconds
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 38 */
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 39 uint32_t sleep_time_s;
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 40
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 41 /**
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 42 * Should sleep deeply
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 43 */
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 44 bool should_deep_sleep;
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 45
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 46 /**
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 47 * Log level mts::MTSLog
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 48 */
lucian@192-168-0-108.rdsnet.ro 3:7fa5603c10dc 49 mts::MTSLog::logLevel log_level;
lucian@192-168-0-108.rdsnet.ro 3:7fa5603c10dc 50
lucian@192-168-0-108.rdsnet.ro 3:7fa5603c10dc 51 /**
lucian@192-168-0-108.rdsnet.ro 3:7fa5603c10dc 52 * Disable duty cycle only for debugging radio purposes. Let it set on false for production.
lucian@192-168-0-108.rdsnet.ro 3:7fa5603c10dc 53 */
lucian@192-168-0-108.rdsnet.ro 3:7fa5603c10dc 54 bool disable_duty_cycle;
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 55 };
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 56
lucian@192-168-0-103.rdsnet.ro 2:8d1c64670642 57 #endif