work1
Dependencies: mbed MAX44009 mbed-os Si7021
Diff: AppCommand.h
- Revision:
- 0:d3e390d62607
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AppCommand.h Wed May 27 11:37:29 2020 +0000 @@ -0,0 +1,39 @@ +#ifndef APP_COMMAND_H +#define APP_COMMAND_H + +#include "CommandParser.h" +#include "SensorManager.h" +namespace liboo{ +class AppCommand{ + public: + + /* + * + * Register all needed command callbacks into the command parser + */ + static void configure(SensorManager* sensor_manager); + + static void process_command(u8 command_id, u8 *command_data, + u16 command_size); + + static bool get_pump_state(); + protected: + + AppCommand(void){} + + static u16 _rtc_set_time(u8 command_id, u8* command_data, + u16 command_data_size); + + static u16 _set_pump(u8 command_id, u8* command_data, + u16 command_data_size); + + + static CommandParser *_parser; + static SensorManager *_sensor_manager; + static bool _is_intialized; + static bool _is_pump_on; + +}; +} +#endif +