Stable version of the xDot library for mbed 5. This version of the library is suitable for deployment scenarios.
Dependents: Dot-Examples XDOT-Devicewise Dot-Examples-delujoc Dot-Examples_receive ... more
Fork of libxDot-dev-mbed5-deprecated by
Fota.h
00001 /********************************************************************** 00002 * COPYRIGHT 2018 MULTI-TECH SYSTEMS, INC. 00003 * 00004 * ALL RIGHTS RESERVED BY AND FOR THE EXCLUSIVE BENEFIT OF 00005 * MULTI-TECH SYSTEMS, INC. 00006 * 00007 * MULTI-TECH SYSTEMS, INC. - CONFIDENTIAL AND PROPRIETARY 00008 * INFORMATION AND/OR TRADE SECRET. 00009 * 00010 * NOTICE: ALL CODE, PROGRAM, INFORMATION, SCRIPT, INSTRUCTION, 00011 * DATA, AND COMMENT HEREIN IS AND SHALL REMAIN THE CONFIDENTIAL 00012 * INFORMATION AND PROPERTY OF MULTI-TECH SYSTEMS, INC. 00013 * USE AND DISCLOSURE THEREOF, EXCEPT AS STRICTLY AUTHORIZED IN A 00014 * WRITTEN AGREEMENT SIGNED BY MULTI-TECH SYSTEMS, INC. IS PROHIBITED. 00015 * 00016 ***********************************************************************/ 00017 00018 #ifndef FOTA_H 00019 #define FOTA_H 00020 #include "mDot.h" 00021 #ifdef FOTA 00022 #include "FragmentationSession.h" 00023 #endif 00024 #include "MulticastGroup.h" 00025 00026 class Fota { 00027 00028 public: 00029 Fota(mDot* dot); 00030 ~Fota(); 00031 00032 static Fota* getInstance(mDot* dot); 00033 static Fota* getInstance(); 00034 void processCmd(uint8_t* payload, uint8_t port, uint8_t size); 00035 void reset(); 00036 void enable(bool enabled); 00037 bool enable(); 00038 void fixEventQueue(); 00039 int32_t timeToStart(); 00040 bool getClockSynced(); 00041 int32_t setClockOffset(uint32_t gps_time); 00042 00043 private: 00044 static void start(); 00045 00046 bool _enabled; 00047 Thread _send_thread; 00048 uint8_t p[242]; 00049 static Fota* _instance; 00050 mDot* _dot; 00051 bool _clk_synced = false; 00052 #ifdef FOTA 00053 FragmentationSession* _frag_session; 00054 #endif 00055 MulticastGroup* _mc_group; 00056 }; 00057 #endif
Generated on Wed Jul 13 2022 04:34:59 by 1.7.2