acq_task.h 613 B

123456789101112131415161718192021222324
  1. #ifndef FOUNDATION_IOTACQ_TASK_H
  2. #define FOUNDATION_IOTACQ_TASK_H
  3. #include <vendor_global.h>
  4. #include <settings/config_parser.h>
  5. #include <leoyun/yun_rpc.h>
  6. #include <unordered_map>
  7. #include <uv.h>
  8. namespace iot_acq {
  9. class AcqTask : public vendor::VendorIf {
  10. public:
  11. virtual void OnEvent(void *args);
  12. virtual void OnTimer(void *args);
  13. virtual void OnShot(void *args);
  14. void PushRpc(const std::string &name, std::shared_ptr<leoyun::YunRpc> rpc);
  15. private:
  16. std::unordered_map<std::string, std::shared_ptr<leoyun::YunRpc>> mapRpc_;
  17. };
  18. } // namespace iot_acq
  19. #endif // FOUNDATION_IOTACQ_TASK_H