LAPTOP-SNT8I5JK\Boounion
2025-05-30 405bd36e812c3645e8d9d84700777e2eaeb036ec
SourceCode/Bond/Servo/CRobotTask.h
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
#pragma once
#include "ServoCommo.h"
#include "Context.h"
namespace SERVO {
   class CRobotTask
   {
   public:
      CRobotTask();
      virtual ~CRobotTask();
   public:
      std::string& getId();
      std::string getDescription() const;
      void setContext(CContext* pContext);
      CContext* getContext();
      void setRobotTransferParam(int seq, int armNo, int fromPos, int toPos, int fromSlot, int toSlot);
      ROBOT_CMD_PARAM& getRobotCmdParam();
      time_t getCreateTime();
      time_t getFetchoutTime();
      time_t getStoredTime();
      time_t getFinishTime();
      ROBOT_TASK_STATE getState();
      void completed();
      void error();
      void abort();
      int getSrcPosition();
      int getSrcSlot();
      int getTarPosition();
      int getTarSlot();
      // ä»Žæºåœ°æ‹”片
      void fetchOut();
      // åœ¨ç›®çš„地放片
      void stored();
   private:
      static std::string& generateId(std::string& out);
   private:
      ROBOT_TASK_STATE m_state;               /* ä»»åŠ¡çŠ¶æ€ */
      std::string m_strId;
      time_t m_timeCreate;                  /* åˆ›å»ºæ—¶é—´ */
      time_t m_timeFetchOut;                  /* å–片时间*/
      time_t m_timeStored;                  /* æ”¾ç‰‡æ—¶é—´ */
      time_t m_timeFinish;                  /* ç»“束时间 */
      ROBOT_CMD_PARAM m_robotCmdParam;         /* å‚æ•° */
      CContext* m_pContext;
   };
}