1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef MODULE_MGR_H
- #define MODULE_MGR_H
- /**
- * @brief 业务模块的管理类,包括:
- * 1、初始化(init:注册web回调函数,读数据库初始化事件列表)
- * 2、启动线程start:向web发送事件
- * 3、结束线程stop
- * @author 戴月腾
- * @date 2018-08-25
- */
- #include "module_singleton_base.h"
- #include "websocket/wsClientMgr.h"
- #include "common.h"
- struct config_file;
- class module_mgr: public singleton_base<module_mgr>
- {
- private:
- friend class singleton_base<module_mgr>;
- module_mgr()
- {
- }
- public:
- /**
- * @brief 注册web回调函数,读配置文件,启动向web发送线程
- */
- static void init(config_file& config, std::map<std::string, YA::MSG_HANDLE_FUNC_TYPE>& MsgFuncList);
- /**
- * @brief 启动线程start:向web发送事件
- */
- static void start();
- /**
- * @brief 结束线程stop
- */
- static void stop();
- static void do_status(STATUS_CARD st, uint32_t card_id, int32_t type);
- };
- #endif // MODULE_MGR_H
|