SmartApp_Miun
Diff: SmartApp.h
- Revision:
- 0:3cd336aba723
- Child:
- 1:5b29579a065e
diff -r 000000000000 -r 3cd336aba723 SmartApp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SmartApp.h Wed Apr 12 05:28:25 2017 +0000 @@ -0,0 +1,68 @@ +/** + * @file SmartApp.h + * @brief Application call + * @author Bin Wang + * @version 1.0 + */ + +#ifndef SMART_APP_H +#define SMART_APP_H + +#include "mDot.h" +#include "LoRa.h" +#include "AppUnit.h" + + +namespace MIUN +{ + +class SmartApp +{ +/*** Parameters ***/ +private: + static const std::string emptyPayload; + static const int defaultPort; + + +/*** constructor ***/ +public: + SmartApp(); + +/*** Components ***/ +private: + MIUN::LoRa lora; + std::map <uint8_t, AppUnit&> appMap; + +public: + void initializeSettings(); + void addApp(AppUnit& app); + void startRunning(); + void showAppMap(); + +/*** Virtual Function ***/ +public: + virtual uint8_t measuredBattery(); + +/*** Handle ***/ + + +private: + void heartBeat(); + void triggerApp(); + void checkInterrupt(); + + + // test +public: + void testThread(); + void testSaveFile(); + void testSendAndReceive(); + void staQuality(); + void unConfirmedTest(); + void testMacCommand(); + void adaptSFTest(); +}; + +} // End of namespace + +#endif \ No newline at end of file