mrDarker
2025-05-22 5cf5e464a5891c8eb62aafadfce0d204fdc79b02
SourceCode/Bond/Servo/CEquipment.h
@@ -38,6 +38,7 @@
#define BLOCK_BUFFER_MAX         1024
#define ALIVE_TIMEOUT            15
#define VCR_MAX                  1
#define ARM_ALL                  99
   typedef std::function<void(void* pEiuipment, BOOL bAlive)> ONALIVE;
   typedef std::function<void(void* pEiuipment, int code)> ONDATACHANGED;
@@ -67,6 +68,37 @@
      int count;
      BOOL alive;
   } ALIVE;
   enum DISPATCHING_MODE {
      EAS = 1,
      Local = 2
   };
   enum RCMD {
      Robot_home = 1,
      Transfer,
      Move,
      Get,
      Put,
      One_Action_Exchange,
      Two_Action_Exchange,
      Command_Clear,
      Batch_get,
      Batch_put
   };
   // 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
   {
@@ -146,7 +178,8 @@
      int setCimMessage(const char* pszMessage, short id, short nTouchPanelNo);
      int clearCimMessage(short id, short nTouchPanelNo);
      int setDateTime(short year, short month, short day, short hour, short minute, short second);
      int setDispatchingMode(DISPATCHING_MODE mode, ONWRITED onWritedBlock = nullptr);
      // 请求主配方列表
      // unitNo: 0:local; Others:unit No
      int masterRecipeListRequest(short unitNo);