driver/src/sick_scan_services.cpp
bool sick_scan::SickScanServices::serviceCbColaMsg(sick_scan_srv::ColaMsgSrv::Request &service_request, sick_scan_srv::ColaMsgSrv::Response &service_response)
{
  std::string sopasCmd = service_request.request;
  std::vector<unsigned char> sopasReplyBin;
  std::string sopasReplyString;

  if(!sendSopasAndCheckAnswer(sopasCmd, sopasReplyBin, sopasReplyString))
  {
    ROS_ERROR_STREAM("## ERROR SickScanServices::sendSopasAndCheckAnswer failed on sending command\"" << sopasCmd << "\"");
    return false;
  }

  ROS_INFO_STREAM("SickScanServices: request: \"" << sopasCmd << "\"");
  ROS_INFO_STREAM("SickScanServices: response: \"" << sopasReplyString << "\"");

  service_response.response = sopasReplyString;
  return true;
}
/*!
 * Callback for service ColaMsg (ColaMsg, send a cola message to lidar).
 * @param[in] service_request ros service request to lidar
 * @param[out] service_response service response from lidar
 * @return true on success, false in case of errors.
 */
Callback for service ColaMsg (ColaMsg, send a cola message to lidar).
@param[in] service_request ros service request to lidar
@param[out] service_response service response from lidar
@return true on success, false in case of errors.
Callback for service ColaMsg ( ColaMsg send a cola message to lidar ) . @param [ in ] service_request ros service request to lidar @param [ out ] service_response service response from lidar @return true on success false in case of errors .
bool sick_scan::SickScanServices::serviceCbColaMsg(sick_scan_srv::ColaMsgSrv::Request &service_request, sick_scan_srv::ColaMsgSrv::Response &service_response)
{
  std::string sopasCmd = service_request.request;
  std::vector<unsigned char> sopasReplyBin;
  std::string sopasReplyString;
  if(!sendSopasAndCheckAnswer(sopasCmd, sopasReplyBin, sopasReplyString))
  {
    ROS_ERROR_STREAM("## ERROR SickScanServices::sendSopasAndCheckAnswer failed on sending command\"" << sopasCmd << "\"");
    return false;
  }
  ROS_INFO_STREAM("SickScanServices: request: \"" << sopasCmd << "\"");
  ROS_INFO_STREAM("SickScanServices: response: \"" << sopasReplyString << "\"");
  service_response.response = sopasReplyString;
  return true;
}
bool sick_scan :: SickScanServices :: serviceCbColaMsg ( sick_scan_srv :: ColaMsgSrv :: Request & service_request , sick_scan_srv :: ColaMsgSrv :: Response & service_response ) { std :: string sopasCmd = service_request . request ; std :: vector < unsigned char > sopasReplyBin ; std :: string sopasReplyString ; if ( ! sendSopasAndCheckAnswer ( sopasCmd , sopasReplyBin , sopasReplyString ) ) { ROS_ERROR_STREAM ( " \" " << sopasCmd << " \" " ) ; return false ; } ROS_INFO_STREAM ( " \" " << sopasCmd << " \" " ) ; ROS_INFO_STREAM ( " \" " << sopasReplyString << " \" " ) ; service_response . response = sopasReplyString ; return true ; }
Callback for service ColaMsg (ColaMsg, send a cola message to lidar).
Callback for service ColaMsg ( ColaMsg send a cola message to lidar ) .