123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // Created by Administrator on 2019/1/14.
- // 分站发生消息到采集服务器的消息处理
- //
- #ifndef WORKSPACE_SITE_MESSAGE_HANDLE_H
- #define WORKSPACE_SITE_MESSAGE_HANDLE_H
- #include "module_service/module_const.h"
- class site_message_handle : public singleton_base<site_message_handle>
- {
- private:
- friend class singleton_base<site_message_handle>;
- site_message_handle();
- public:
- // 最后接收分站消息的时间
- time_t m_time_last_rec;
- public:
- private:
- /** 解析 分站发送过来的数据中(分站的信息数据)
- * @param DataBuffer 接收数据
- * @param nLen 接收数据长度
- * @param dwConnID 连接关键字
- * @param nCurPos 从接收数据的那个位置开始读取数据
- * @param reader_id 分站ID
- * @return
- */
- void parse_data_locate_reader(char * DataBuffer, int nLen, int dwConnID,int& nCurPos, int& reader_id );
- /** 解析单个卡数据
- * @param DataBuffer
- * @param nCurPos
- * @param reader_id 分站ID
- * @param wChr 消息ID
- * @param ct_time
- * @param pos
- * @return 0: 成功
- */
- int parse_data_locate_card(char * DataBuffer, int reader_id, unsigned short wChr,int& nCurPos, unsigned long long ct_time = 0,int pos = 0);
- /**
- * 分站电源是否已切换直流电,发送警告
- * @param site_id
- * @param powerType
- */
- void reader_power_battery_alarm(unsigned int site_id, int powerType);
- };
- #endif //WORKSPACE_SITE_MESSAGE_HANDLE_H
|