1.Graph刷新问题;
2.AttributeVector造成的闪退问题;
| | |
| | | void CBonder::onTimer(UINT nTimerid) |
| | | { |
| | | CEquipment::onTimer(nTimerid); |
| | | |
| | | // test |
| | | /* |
| | | static int i[2] = { 0, 0 }; |
| | | i[m_nIndex]++; |
| | | |
| | | if (i[m_nIndex] == 15) { |
| | | char szBuffer[26]; |
| | | decodeJobProcessStartReport(getStep(STEP_ID_JOB_PROCESS_START_REPORT), szBuffer, 26); |
| | | } |
| | | */ |
| | | } |
| | | |
| | | void CBonder::serialize(CArchive& ar) |
| | |
| | | |
| | | // 缓存Attribute,用于调试时显示信息 |
| | | unsigned int weight = 201; |
| | | CAttributeVector attrubutes; |
| | | CAttributeVector& attrubutes = pStep->attributeVector(); |
| | | processData.getAttributeVector(attrubutes, weight); |
| | | pStep->addAttributeVector(attrubutes); |
| | | |
| | | |
| | | onProcessData(&processData); |
| | | |
| | | return nRet; |
| | |
| | | |
| | | // 缓存Attribute,用于调试时显示信息 |
| | | unsigned int weight = 201; |
| | | CAttributeVector attrubutes; |
| | | CAttributeVector& attrubutes = pStep->attributeVector(); |
| | | jobDataS.getAttributeVector(attrubutes, weight); |
| | | pStep->addAttributeVector(attrubutes); |
| | | |
| | | |
| | | onReceivedJob(port, &jobDataS); |
| | | |
| | | return nRet; |
| | |
| | | |
| | | // 缓存Attribute,用于调试时显示信息 |
| | | unsigned int weight = 201; |
| | | CAttributeVector attrubutes; |
| | | CAttributeVector& attrubutes = pStep->attributeVector(); |
| | | jobDataS.getAttributeVector(attrubutes, weight); |
| | | pStep->addAttributeVector(attrubutes); |
| | | |
| | | |
| | | onSentOutJob(port, &jobDataS); |
| | | |
| | | return nRet; |
| | |
| | | |
| | | // 缓存Attribute,用于调试时显示信息 |
| | | unsigned int weight = 201; |
| | | CAttributeVector attrubutes; |
| | | CAttributeVector& attrubutes = pStep->attributeVector(); |
| | | vcrEventReport.getAttributeVector(attrubutes, weight); |
| | | pStep->addAttributeVector(attrubutes); |
| | | |
| | | // 0426, 先固定返回1(OK) |
| | | ((CReadStep*)pStep)->setReturnCode((short)VCR_Reply_Code::OK); |
| | |
| | | |
| | | // 缓存Attribute,用于调试时显示信息 |
| | | unsigned int weight = 201; |
| | | CAttributeVector attrubutes; |
| | | CAttributeVector& attrubutes = pStep->attributeVector(); |
| | | m_portStatusReport.getAttributeVector(attrubutes, weight); |
| | | pStep->addAttributeVector(attrubutes); |
| | | |
| | | |
| | | LOGI("<CCassetteTranserStateStep>decodePortStatusReport<Status:%d, CassetteSequenceNo:%d>", |
| | | m_portStatusReport.getPortStatus(), m_portStatusReport.getCassetteSequenceNo()); |
| | |
| | | } |
| | | |
| | | m_pGraph->UpdateIndicateBox1Colors(id, newBackgroundColor, newFrameColor1, newFrameColor2); |
| | | |
| | | // 刷新界面 |
| | | Invalidate(); |
| | | UpdateWindow(); |
| | | m_pGraph->Invalidata(); |
| | | } |
| | | |
| | | BOOL CPageGraph1::OnEraseBkgnd(CDC* pDC) |
| | |
| | | m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM1, cx + rotatedX1, cy + rotatedY1); |
| | | m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM2, cx + rotatedX2, cy + rotatedY2); |
| | | |
| | | Invalidate(); |
| | | UpdateWindow(); |
| | | std::this_thread::sleep_for(std::chrono::milliseconds(16)); |
| | | } |
| | | |
| | |
| | | MoveRobotToPosition(SERVO::ROBOT_POSITION::Measurement); |
| | | } |
| | | |
| | | CString s; s.Format(_T("OnGraphItemClicked %d"), pGraphNmhdr->dwData); |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)m_pGraph->GetIndicateBoxData(pGraphNmhdr->dwData); |
| | | if (pEquipment != nullptr) { |
| | | theApp.m_model.notifyPtr(RX_CODE_SELECT_EQUIPMENT, pEquipment); |
| | | // 暂时禁用展开属性页的功能 |
| | | // theApp.m_model.notifyPtr(RX_CODE_SELECT_EQUIPMENT, pEquipment); |
| | | } |
| | | |
| | | *pResult = 0; |
| | |
| | | if (robotData.position != m_lastRobotPosition) { |
| | | MoveRobotToPosition(robotData.position); |
| | | } |
| | | |
| | | m_pGraph->Invalidata(); |
| | | } |
| | | |
| | | CDialogEx::OnTimer(nIDEvent); |
| | |
| | | std::to_string(m_station.nNetNo).c_str(), "", weight++)); |
| | | attrubutes.addAttribute(new CAttribute("Station", |
| | | std::to_string(m_station.nStNo).c_str(), "", weight++)); |
| | | attrubutes.addAttributeVector(m_attributeVector); |
| | | |
| | | auto as = m_attributeVector.getAttributes(); |
| | | for (auto item : as) { |
| | | attrubutes.addAttribute(new CAttribute(item->getName().c_str(), |
| | | item->getValue().c_str(), item->getDescription().c_str(), item->getWeight())); |
| | | } |
| | | } |
| | | |
| | | CAttributeVector& CStep::attributeVector() |
| | | { |
| | | return m_attributeVector; |
| | | } |
| | | |
| | | void CStep::init() |
| | |
| | | int getID(); |
| | | void setName(const char* pszName); |
| | | std::string& getName(); |
| | | CAttributeVector& attributeVector(); |
| | | virtual void getAttributeVector(CAttributeVector& attrubutes); |
| | | virtual void init(); |
| | | virtual void term(); |
| | |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | } |
| | | |
| | | void CServoGraph::Invalidata() |
| | | { |
| | | ::InvalidateRect(m_hWnd, NULL, TRUE); |
| | | } |
| | |
| | | LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam); |
| | | |
| | | public: |
| | | void Invalidata(); |
| | | void AddImage(int id, char* pszPath, int x, int y); |
| | | void AddIndicateBox(int id, int x, int y, int width); |
| | | void AddIndicateBox(int id, int x, int y, int width, |