#pragma once // 下列 ifdef 块是创建使从 DLL 导出更简单的 // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 DRIVERTHREAD_EXPORTS // 符号编译的。在使用此 DLL 的 // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将 // DRIVERTHREAD_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的 // 符号视为是被导出的。 #include "MsgMap.h" #include "MsgVector.h" #include "CcosThread.h" #include "LogicDevice.h" class Driver_Thread : public Work_Thread { protected: bool HandleClientRequest(); bool HandleDeviceNotify(); MsgMap *m_pDeviceSysIFMap; MsgVector *m_pDeviceSysIFVec; virtual bool Exec(); virtual bool OnEndThread(); virtual bool OnStartThread(); public: Driver_Thread(void); virtual ~Driver_Thread(void); //work //IF void RegistSysIFObject(LogicDeviceSysIF* pobj); bool UnRegistSysIFObject(LogicDeviceSysIF* pobj); }; class Notify_Driver_Thread : public Driver_Thread { public: Notify_Driver_Thread(void); virtual ~Notify_Driver_Thread(void); protected: int WaitForEvent();//Req,NotifyPacket,NotifyEvt virtual bool Exec(); bool ProcessDeviceEvent(size_t Idx); }; //class Dual_Driver_Thread //{ // Driver_Thread *m_pReqThread; // Driver_Thread *m_pResThread; //public: // Dual_Driver_Thread(void); // virtual ~Dual_Driver_Thread(void); // // //IF // void InitDriverThread(Driver_Thread *pReq, Driver_Thread *pRes); // bool HasThread(DWORD Tid); // bool StartThread(bool Sync = true, bool Inherit = true); // bool StopThread(DWORD timeperiod = 10000); // // bool PushReqDataObject(ResDataObject &obj); // bool PushResDataObject(ResDataObject &obj); // // void RegistSysIFObject(LogicDeviceSysIF* pobj); // bool UnRegistSysIFObject(LogicDeviceSysIF* pobj); // // void SetLogger(PVOID pLogger); // // Work_Thread* GetReqThread() { return m_pReqThread; } // Work_Thread* GetResThread() { return m_pResThread; } // //};