//----------------------------------------------- void CanCtrlPltfCOb3::sendNetStartCanOpen() { CanMsg msg; msg.m_iID = 0; msg.m_iLen = 2; msg.set(1,0,0,0,0,0,0,0); m_pCanCtrl->transmitMsg(msg, false); usleep(100000); }
bool ElmoCtrl::sendNetStartCanOpen(CanItf* canCtrl) { bool ret = false; CanMsg msg; msg.m_iID = 0; msg.m_iLen = 2; msg.set(1,0,0,0,0,0,0,0); ret = canCtrl->transmitMsg(msg, false); usleep(100000); return ret; }
void ForceTorqueCtrl::ReadFTSerialNumber() { std::cout << "\n\n*********CheckCalMatrix**********" << std::endl; CanMsg CMsg; CMsg.setID(0x205); CMsg.setLength(0); bool ret = m_Can->transmitMsg(CMsg, true); CanMsg replyMsg; replyMsg.set(0,0); replyMsg.set(0,1); replyMsg.set(0,2); replyMsg.set(0,3); replyMsg.set(0,4); bool ret2 = m_Can->receiveMsg(&replyMsg); int length = replyMsg.getLength(); std::cout << "reply ID: \t" << replyMsg.getID()<<std::endl; std::cout << "reply Length: \t" << replyMsg.getLength()<<std::endl; std::cout << "reply Data: \t" << replyMsg.getAt(0) << " " << replyMsg.getAt(1) << " " << replyMsg.getAt(2) << " " << replyMsg.getAt(3) << " " << replyMsg.getAt(4) << " " << replyMsg.getAt(5) << " " << replyMsg.getAt(6) << " " << replyMsg.getAt(7) << std::endl; }