123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #pragma once
- //#include "GeneratorDriver.h"
- #include "LogicDriver.h"
- #include "Generator_Model_Def.h"
- #include "SCF.hpp"
- namespace nsSCF = DIOS::Dev::Communication;
- class CMACHINE_DPC : public LogicDriver
- {
- std::string *m_pWorkpath;
- public:
- CMACHINE_DPC();
- virtual ~CMACHINE_DPC();
- ///////////////////////////////////////////////////////
- virtual bool DriverEntry(ResDataObject &Configuration);
- virtual bool Driver_Probe(ResDataObject &HardwareInfo);
- virtual bool SYSTEM_CALL SetDriverWorkPath(const char * PARAM_IN pWorkPath);
- virtual PVOID SYSTEM_CALL LoadDriver();//无根节点
- virtual void SYSTEM_CALL UnloadDriver();
- RET_STATUS SYSTEM_CALL GetDriverDictionary(ResDataObject& PARAM_OUT DriverInfo);
- RET_STATUS SYSTEM_CALL GetDeviceResource(ResDataObject PARAM_OUT *pDeviceResource);
- RET_STATUS DATA_ACTION GetDeviceConfig(ResDataObject PARAM_OUT *pDeviceConfig);
- RET_STATUS DATA_ACTION SetDeviceConfig(ResDataObject PARAM_IN *DeviceConfig);
- virtual bool Connect();
- virtual void DisConnect();
- //给硬件驱动设置Unique工作路径
- //如果是同一设备同一连接情况下,硬件多次接入,系统会保证工作路径是一样的.
- //连接后,单一硬件相关的数据要保存在此.
- virtual bool SYSTEM_CALL SetDeviceWorkPath(const char * PARAM_IN pWorkPath);
- //逻辑设备树的加载和卸载
- virtual PVOID SYSTEM_CALL LoadLogicDevices();
- virtual void SYSTEM_CALL UnloadLogicDevices();
- virtual bool SYSTEM_CALL OnHeartBeat();
- virtual bool Device_Probe(ResDataObject &HardwareInfo);
- /////////////////////////////////
- void OEM_IF NotifyTomoParams(FLOAT fSID, FLOAT fTID, FLOAT fMaxAngle, int nDirection, int nProjectionNumber);
- public:
- int CMDSet(const char *pKey,int len);
- int SendCmd(char * pCmd);
- int ActionCall(char * pName);
- int m_nStatus;
- ResDataObject CurrentExamMode;
- bool SendTomoExam(void);
- bool StartMove(bool state);
- bool ClearMoveState();
- bool SendIXRAY(void);
- bool MechMoveReady();
- bool SetPositionNum(const char* code);
- bool MechGetPosReady();
- bool GetPosition(ResDataObject &resangle, ResDataObject &resheight);
- private:
- string m_strWorkPath;
- ResDataObject m_DeviceConfig; //设备属性
- HMODULE m_hDPCDll;
- nsSCF::SCF* m_pSCFServer;
- typedef nsSCF::SCF* (*GetSCF)();
- GetSCF m_fpGetSCF;
- typedef void(*ReleaseSCF)(nsSCF::SCF* p);
- ReleaseSCF m_fpReleaseSCF;
- CRITICAL_SECTION m_stCSProcessMsg;
- class CMACHINE_Logical * m_pGenLogical;
- HANDLE m_hConnectFinish;
- HANDLE m_hBeginConnect;
- HANDLE m_hConnection;
- HANDLE m_hMechReady;
- HANDLE m_hMechGetPostionFinished;
- ResDataObject m_DetectorToTableDistance;
- ResDataObject m_DistanceSourcetoDetector;
- ResDataObject m_DistanceSourcetoEntrance;
- ResDataObject m_GEOMETRY;
- ResDataObject m_ProjectionNum;
- ResDataObject m_ProjectionMaxAngle;
- ResDataObject m_ProjectionDirection;
- ResDataObject m_MechAngle;
- ResDataObject m_MechHeight;
- int m_nLostConnectNumber;
- int m_nTimeoutCount;
- int m_nCurrentViewNumber;
- int m_nTargetViewNumber;
- int m_nLastErrorCount;
- string Inifilename;
- bool m_bIdentStatus;
- void *m_pNotify;
- bool m_bMechMoveState;
- bool SendDate(void);
- ConfigInfo *m_pGenVender;
- ConfigInfo *m_pGenModel;
- ConfigInfo *m_pGenSyncType;
- ConfigInfo *m_pGenSCFType;
- ConfigInfo *m_pGenSCFPort;
- ConfigInfo *m_pTID;
- ConfigInfo *m_pSID;
- ConfigInfo *m_pENTRANCE;
- ConfigInfo *m_pGEOMETRY;
- #ifdef CMD_ANSYNC
- class CRingBuffer * m_pRBMsg;
- HANDLE m_hSemaphore;
- #endif
- };
- int FormatCMD(char * pCmd, int nSize);
- int GetSingleMsg(char * pCmd, int nCmdLen, char * pMsg);
|