the node firmware of ChiaYi Xingang
Embed:
(wiki syntax)
Show/hide line numbers
Fota.h
00001 #ifndef FOTA_H 00002 #define FOTA_H 00003 #include "mDot.h" 00004 #ifdef FOTA 00005 #include "FragmentationSession.h" 00006 #endif 00007 #include "MulticastGroup.h" 00008 00009 class Fota { 00010 00011 public: 00012 Fota(mDot* dot); 00013 ~Fota(); 00014 00015 static Fota* getInstance(mDot* dot); 00016 static Fota* getInstance(); 00017 void processCmd(uint8_t* payload, uint8_t port, uint8_t size); 00018 void reset(); 00019 void enable(bool enabled); 00020 bool enable(); 00021 void fixEventQueue(); 00022 int32_t timeToStart(); 00023 00024 private: 00025 static void start(); 00026 00027 bool _enabled; 00028 Thread _send_thread; 00029 uint8_t p[242]; 00030 static Fota* _instance; 00031 mDot* _dot; 00032 #ifdef FOTA 00033 FragmentationSession* _frag_session; 00034 #endif 00035 MulticastGroup* _mc_group; 00036 }; 00037 #endif
Generated on Tue Jul 12 2022 21:47:10 by 1.7.2