| | |
| | | #pragma once |
| | | #include "Log.h" |
| | | #include "ServoCommo.h" |
| | | #include "CCLinkIEControl.h" |
| | | #include "CSample.h" |
| | | #include "CPin.h" |
| | |
| | | #include "CJobDataC.h" |
| | | #include "CJobDataS.h" |
| | | #include "CProcessData.h" |
| | | #include "CPortStatusReport.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | #define BLOCK_BUFFER_MAX 1024 |
| | | #define ALIVE_TIMEOUT 15 |
| | | #define VCR_MAX 1 |
| | | |
| | | typedef std::function<void(void* pEiuipment, BOOL bAlive)> ONALIVE; |
| | | typedef std::function<void(void* pEiuipment, int code)> ONDATACHANGED; |
| | |
| | | ONVCREVENTREPORT onVcrEventReport; |
| | | } EquipmentListener; |
| | | |
| | | // Memory Block 结构体定义 |
| | | typedef struct _MemoryBlock { |
| | | unsigned int type; |
| | | unsigned int start; |
| | | unsigned int end; |
| | | unsigned int size; |
| | | char buffer[BLOCK_BUFFER_MAX]; |
| | | } MemoryBlock; |
| | | |
| | | // ALIVE |
| | | typedef struct _ALIVE { |
| | | BOOL flag; |
| | | int count; |
| | | BOOL alive; |
| | | } ALIVE; |
| | | |
| | | enum DISPATCHING_MODE { |
| | | EAS = 1, |
| | | Local = 2 |
| | | }; |
| | | |
| | | enum IDNEXER_OPERATION_MODE { |
| | | Normal = 1, |
| | | Clear_Out = 2, |
| | | Cold_Run = 2, |
| | | Start = 10, |
| | | Stop = 11, |
| | | Pause = 12, |
| | | Resume = 13, |
| | | Abort = 14, |
| | | Cancel = 15, |
| | | }; |
| | | |
| | | enum RCMD { |
| | | Robot_home = 1, |
| | | Transfer, |
| | | Move, |
| | | Get, |
| | | Put, |
| | | One_Action_Exchange, |
| | | Two_Action_Exchange, |
| | | Command_Clear, |
| | | Batch_get, |
| | | Batch_put |
| | | }; |
| | | |
| | | enum VCR_Reply_Code { |
| | | OK = 1, |
| | | NG, |
| | | Job_Data_Request, |
| | | VCR_Mismatch |
| | | }; |
| | | |
| | | // Robot cmd param |
| | | #define ROBOT_CMD_PARAM_SIZE 16 /* 防止以后修改ROBOT_CMD_PARAM为不是4的整数倍 */ |
| | | typedef struct _ROBOT_CMD_PARAM { |
| | | short sequenceNo; |
| | | short rcmd; |
| | | short armNo; |
| | | short getPosition; |
| | | short putPosition; |
| | | short getSlotNo; |
| | | short putSlotNo; |
| | | short subCmd; |
| | | } ROBOT_CMD_PARAM; |
| | | |
| | | class CEquipment |
| | | { |
| | | public: |
| | | CEquipment(); |
| | | virtual ~CEquipment(); |
| | | |
| | | |
| | | public: |
| | | virtual const char* getClassName() = 0; |