Multitech xDot Utils
MultitechDot.h@2:8d1c64670642, 2018-02-19 (annotated)
- Committer:
- lucian@192-168-0-103.rdsnet.ro
- Date:
- Mon Feb 19 16:11:52 2018 +0200
- Revision:
- 2:8d1c64670642
- Parent:
- 1:73cea350269e
- Child:
- 3:7fa5603c10dc
IEM-380 Refactor raven device into its separate class
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 1 | #ifndef MBED_MULTITECHDOT_H |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 2 | #define MBED_MULTITECHDOT_H |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 3 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 4 | #include "mbed.h" |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 5 | #include "mDot.h" |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 6 | #include "MTSLog.h" |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 7 | #include "MTSText.h" |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 8 | #include "dot_defs.h" |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 9 | #include "xdot_low_power.h" |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 10 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 11 | class MultitechDot : public mDot { |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 12 | public: |
lucian@1.0.0.127.in-addr.arpa | 1:73cea350269e | 13 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 14 | static MultitechDot *get_instance(struct dot_config *config); |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 15 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 16 | void config(struct dot_config *config); |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 17 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 18 | struct dot_config *get_config(); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 19 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 20 | void display_config(); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 21 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 22 | //todo use dot_config param |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 23 | void update_ota_config_name_phrase( |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 24 | std::string network_name, std::string network_passphrase, uint8_t frequency_sub_band, bool public_network, |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 25 | uint8_t ack |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 26 | ); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 27 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 28 | //todo use dot_config param |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 29 | void update_ota_config_id_key( |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 30 | uint8_t *network_id, uint8_t *network_key, uint8_t frequency_sub_band, bool public_network, uint8_t ack |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 31 | ); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 32 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 33 | void update_manual_config(struct dot_config *config); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 34 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 35 | //todo use dot_config param |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 36 | void update_peer_to_peer_config( |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 37 | uint8_t *network_address, uint8_t *network_session_key, uint8_t *data_session_key, uint32_t tx_frequency, |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 38 | uint8_t tx_datarate, uint8_t tx_power |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 39 | ); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 40 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 41 | void update_network_link_check_config(uint8_t link_check_count, uint8_t link_check_threshold); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 42 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 43 | void join_network(); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 44 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 45 | void deep_sleep(uint32_t min_delay_s); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 46 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 47 | void sleep_wake_rtc_only(bool deepsleep); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 48 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 49 | void sleep_wake_interrupt_only(bool deepsleep); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 50 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 51 | void sleep_wake_rtc_or_interrupt(uint32_t delay_s, bool deepsleep); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 52 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 53 | void sleep_save_io(); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 54 | |
lucian@1.0.0.127.in-addr.arpa | 1:73cea350269e | 55 | void sleep_reset_hsi(); |
lucian@1.0.0.127.in-addr.arpa | 1:73cea350269e | 56 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 57 | void sleep_configure_io(); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 58 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 59 | void sleep_restore_io(); |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 60 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 61 | void send_data(std::vector<uint8_t> data); |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 62 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 63 | /** |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 64 | * Set debug mode so that debug logs are enabled |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 65 | * @param is_debug_mode true to enable debug mode, false otherwise |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 66 | */ |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 67 | void set_debug_mode(bool is_debug_mode); |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 68 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 69 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 70 | /** |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 71 | * Set sleep time |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 72 | * @param sleep_time sleep time in seconds |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 73 | */ |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 74 | void set_sleep_time(uint32_t sleep_time); |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 75 | |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 76 | protected: |
lucian@192-168-0-103.rdsnet.ro | 2:8d1c64670642 | 77 | struct dot_config *_config; |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 78 | }; |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 79 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 80 | |
lucian@1.0.0.127.in-addr.arpa | 0:a5748bc6e3e1 | 81 | #endif //MBED_MULTITECHDOT_H |