1234567891011121314151617181920212223242526 |
- #ifndef FOUNDATION_IOTACQ_TASK_H
- #define FOUNDATION_IOTACQ_TASK_H
- #include <vendor_global.h>
- #include <settings/config_parser.h>
- #include <leoyun/yun_rpc.h>
- #include <unordered_map>
- #include <uv.h>
- namespace iot_acq {
- class AcqTask : public vendor::VendorIf {
- public:
- AcqTask();
- bool IsInRetry(int32_t times);
- void OnTimerTask();
- void PushRpc(const std::string &name, std::shared_ptr<leoyun::YunRpc> rpc);
- void ForEach(
- const std::function<void(const std::shared_ptr<leoyun::YunRpc> &)>
- &rpcCall);
- private:
- std::unordered_map<std::string, std::shared_ptr<leoyun::YunRpc> > mapRpc_;
- };
- } // namespace iot_acq
- #endif // FOUNDATION_IOTACQ_TASK_H
|