| | |
| | | |
| | | void CRobotTask::setContext(CContext* pContext) |
| | | { |
| | | if (pContext != nullptr) { |
| | | pContext->release(); |
| | | if (m_pContext != nullptr) { |
| | | m_pContext->release(); |
| | | } |
| | | |
| | | m_pContext = pContext; |
| | |
| | | return m_robotCmdParam.putSlotNo; |
| | | } |
| | | |
| | | CString CRobotTask::getStateString() |
| | | { |
| | | switch (m_state) { |
| | | case ROBOT_TASK_STATE::Ready: return _T("Ready"); |
| | | case ROBOT_TASK_STATE::Running: return _T("Running"); |
| | | case ROBOT_TASK_STATE::Error: return _T("Error"); |
| | | case ROBOT_TASK_STATE::Abort: return _T("Abort"); |
| | | case ROBOT_TASK_STATE::Completed: return _T("Completed"); |
| | | default: return _T("Unknown"); |
| | | } |
| | | } |
| | | |
| | | void CRobotTask::fetchOut() |
| | | { |
| | | m_timeFetchOut = CToolUnits::getUnixTimestamp();; |