bool srvCallback_ElmoRecorderConfig(cob_srvs::ElmoRecorderConfig::Request &req, cob_srvs::ElmoRecorderConfig::Response &res ){ if(m_bisInitialized) { m_CanCtrlPltf->evalCanBuffer(); res.success = m_CanCtrlPltf->ElmoRecordings(0, req.recordinggap, ""); res.message = "Successfully configured all motors for instant record"; } return true; }
bool srvCallback_ElmoRecorderReadout(cob_srvs::ElmoRecorderReadout::Request &req, cob_srvs::ElmoRecorderReadout::Response &res ){ if(m_bisInitialized) { m_CanCtrlPltf->evalCanBuffer(); res.success = m_CanCtrlPltf->ElmoRecordings(1, req.subindex, req.fileprefix); if(res.success == 0) res.message = "Successfully requested reading out of Recorded data"; else if(res.success == 1) res.message = "Recorder hasn't been configured well yet"; else if(res.success == 2) res.message = "A previous transmission is still in progress"; } return true; }
bool srvCallback_ElmoRecorderConfig(cob_base_drive_chain::ElmoRecorderConfig::Request &req, cob_base_drive_chain::ElmoRecorderConfig::Response &res ){ if(m_bisInitialized) { #ifdef __SIM__ res.success = true; #else m_CanCtrlPltf->evalCanBuffer(); res.success = m_CanCtrlPltf->ElmoRecordings(0, req.recordinggap, ""); #endif res.message = "Successfully configured all motors for instant record"; } return true; }
bool srvCallback_ElmoRecorderReadout(cob_base_drive_chain::ElmoRecorderReadout::Request &req, cob_base_drive_chain::ElmoRecorderReadout::Response &res ){ if(m_bisInitialized) { #ifdef __SIM__ res.success = true; #else m_CanCtrlPltf->evalCanBuffer(); res.success = m_CanCtrlPltf->ElmoRecordings(1, req.subindex, req.fileprefix); #endif if(res.success == 0) { res.message = "Successfully requested reading out of Recorded data"; m_bReadoutElmo = true; ROS_WARN("CPU consuming evalCanBuffer used for ElmoReadout activated"); } else if(res.success == 1) res.message = "Recorder hasn't been configured well yet"; else if(res.success == 2) res.message = "A previous transmission is still in progress"; } return true; }