Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Fota/Fota.h
- Revision:
- 66:baa0f3116f1d
- Child:
- 68:5f787643e7d7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Fota/Fota.h Tue Apr 23 08:51:10 2019 -0500
@@ -0,0 +1,37 @@
+#ifndef FOTA_H
+#define FOTA_H
+#include "mDot.h"
+#ifdef FOTA
+#include "FragmentationSession.h"
+#endif
+#include "MulticastGroup.h"
+
+class Fota {
+
+ public:
+ Fota(mDot* dot);
+ ~Fota();
+
+ static Fota* getInstance(mDot* dot);
+ static Fota* getInstance();
+ void processCmd(uint8_t* payload, uint8_t port, uint8_t size);
+ void reset();
+ void enable(bool enabled);
+ bool enable();
+ void fixEventQueue();
+ int32_t timeToStart();
+
+ private:
+ static void start();
+
+ bool _enabled;
+ Thread _send_thread;
+ uint8_t p[242];
+ static Fota* _instance;
+ mDot* _dot;
+#ifdef FOTA
+ FragmentationSession* _frag_session;
+#endif
+ MulticastGroup* _mc_group;
+};
+#endif