driver/src/sick_scan_services.cpp
bool sick_scan::SickScanServices::serviceCbLIDoutputstate(sick_scan_srv::LIDoutputstateSrv::Request &service_request, sick_scan_srv::LIDoutputstateSrv::Response &service_response)
{
  std::string sopasCmd = std::string("sEN LIDoutputstate ") + (service_request.active ? "1" : "0");
  std::vector<unsigned char> sopasReplyBin;
  std::string sopasReplyString;

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

  ROS_INFO_STREAM("SickScanServices: request: \"" << sopasCmd << "\"");
  ROS_INFO_STREAM("SickScanServices: response: \"" << sopasReplyString << "\"");
  
  return true;
}
/*!
 * Callback for service messages (LIDoutputstate, Request status change of monitoring fields on event).
 * Sends a cola telegram "sEN LIDoutputstate {0|1}" and receives the response from the lidar device.
 * @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 messages (LIDoutputstate, Request status change of monitoring fields on event).
Sends a cola telegram "sEN LIDoutputstate {0|1}" and receives the response from the lidar device.
@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 messages ( LIDoutputstate Request status change of monitoring fields on event ) . Sends a cola telegram " sEN LIDoutputstate { 0|1 } " and receives the response from the lidar device . @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::serviceCbLIDoutputstate(sick_scan_srv::LIDoutputstateSrv::Request &service_request, sick_scan_srv::LIDoutputstateSrv::Response &service_response)
{
  std::string sopasCmd = std::string("sEN LIDoutputstate ") + (service_request.active ? "1" : "0");
  std::vector<unsigned char> sopasReplyBin;
  std::string sopasReplyString;
  service_response.success = false;
  if(!sendSopasAndCheckAnswer(sopasCmd, sopasReplyBin, sopasReplyString))
  {
    ROS_ERROR_STREAM("## ERROR SickScanServices::sendSopasAndCheckAnswer failed on sending command\"" << sopasCmd << "\"");
    return false;
  }
  service_response.success = true;
  ROS_INFO_STREAM("SickScanServices: request: \"" << sopasCmd << "\"");
  ROS_INFO_STREAM("SickScanServices: response: \"" << sopasReplyString << "\"");
  return true;
}
bool sick_scan :: SickScanServices :: serviceCbLIDoutputstate ( sick_scan_srv :: LIDoutputstateSrv :: Request & service_request , sick_scan_srv :: LIDoutputstateSrv :: Response & service_response ) { std :: string sopasCmd = std :: string ( " " ) + ( service_request . active ? " " : " " ) ; std :: vector < unsigned char > sopasReplyBin ; std :: string sopasReplyString ; service_response . success = false ; if ( ! sendSopasAndCheckAnswer ( sopasCmd , sopasReplyBin , sopasReplyString ) ) { ROS_ERROR_STREAM ( " \" " << sopasCmd << " \" " ) ; return false ; } service_response . success = true ; ROS_INFO_STREAM ( " \" " << sopasCmd << " \" " ) ; ROS_INFO_STREAM ( " \" " << sopasReplyString << " \" " ) ; return true ; }
Callback for service messages (LIDoutputstate, Request status change of monitoring fields on event).
Callback for service messages ( LIDoutputstate Request status change of monitoring fields on event ) .