sick_scan_services.h
Go to the documentation of this file.
1 /*
2  * @brief Implementation of ROS services for sick_scan
3  *
4  * Copyright (C) 2021, Ing.-Buero Dr. Michael Lehning, Hildesheim
5  * Copyright (C) 2021, SICK AG, Waldkirch
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in the
15  * documentation and/or other materials provided with the distribution.
16  * * Neither the name of Osnabrück University nor the names of its
17  * contributors may be used to endorse or promote products derived from
18  * this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  * Created on: 12.01.2021
33  *
34  * Authors:
35  * Michael Lehning <michael.lehning@lehning.de>
36  *
37  * Based on the TiM communication example by SICK AG.
38  *
39  */
40 
41 #ifndef SICK_SCAN_SERVICES_H_
42 #define SICK_SCAN_SERVICES_H_
43 
46 #include "sick_scan/ColaMsgSrv.h"
47 #include "sick_scan/ECRChangeArrSrv.h"
48 #include "sick_scan/LIDoutputstateSrv.h"
49 
50 namespace sick_scan
51 {
52 
54  {
55  public:
56 
57  SickScanServices(ros::NodeHandle* nh = 0, sick_scan::SickScanCommonTcp* common_tcp = 0, bool cola_binary = true);
58 
59  virtual ~SickScanServices();
60 
67  bool serviceCbColaMsg(sick_scan::ColaMsgSrv::Request &service_request, sick_scan::ColaMsgSrv::Response &service_response);
68 
76  bool serviceCbECRChangeArr(sick_scan::ECRChangeArrSrv::Request &service_request, sick_scan::ECRChangeArrSrv::Response &service_response);
77 
85  bool serviceCbLIDoutputstate(sick_scan::LIDoutputstateSrv::Request &service_request, sick_scan::LIDoutputstateSrv::Response &service_response);
86 
87  protected:
88 
96  bool sendSopasAndCheckAnswer(const std::string& sopasCmd, std::vector<unsigned char>& sopasReplyBin, std::string& sopasReplyString);
97 
98  /*
99  * Member data
100  */
101 
107 
108  }; /* class SickScanServices */
109 
110 } /* namespace sick_scan */
111 #endif /* SICK_SCAN_SERVICES_H_ */
sick_scan::SickScanServices::~SickScanServices
virtual ~SickScanServices()
Definition: sick_scan_services.cpp:54
sick_scan::SickScanServices::m_srv_server_LIDoutputstate
ros::ServiceServer m_srv_server_LIDoutputstate
service "LIDoutputstate", &sick_scan::SickScanServices::serviceCbLIDoutputstate
Definition: sick_scan_services.h:106
sick_scan::SickScanServices
Definition: sick_scan_services.h:53
sick_scan::SickScanServices::m_srv_server_ECRChangeArr
ros::ServiceServer m_srv_server_ECRChangeArr
service "ECRChangeArr", &sick_scan::SickScanServices::serviceCbECRChangeArr
Definition: sick_scan_services.h:105
sick_scan::SickScanServices::serviceCbLIDoutputstate
bool serviceCbLIDoutputstate(sick_scan::LIDoutputstateSrv::Request &service_request, sick_scan::LIDoutputstateSrv::Response &service_response)
Definition: sick_scan_services.cpp:156
sick_scan::SickScanServices::SickScanServices
SickScanServices(ros::NodeHandle *nh=0, sick_scan::SickScanCommonTcp *common_tcp=0, bool cola_binary=true)
Definition: sick_scan_services.cpp:43
sick_scan::SickScanServices::serviceCbColaMsg
bool serviceCbColaMsg(sick_scan::ColaMsgSrv::Request &service_request, sick_scan::ColaMsgSrv::Response &service_response)
Definition: sick_scan_services.cpp:105
sick_scan::SickScanServices::m_common_tcp
sick_scan::SickScanCommonTcp * m_common_tcp
common tcp handler
Definition: sick_scan_services.h:103
sick_scan_common.h
ros::ServiceServer
sick_scan_common_tcp.h
sick_scan
Definition: abstract_parser.cpp:50
sick_scan::SickScanCommonTcp
Definition: sick_scan_common_tcp.h:68
sick_scan::SickScanServices::serviceCbECRChangeArr
bool serviceCbECRChangeArr(sick_scan::ECRChangeArrSrv::Request &service_request, sick_scan::ECRChangeArrSrv::Response &service_response)
Definition: sick_scan_services.cpp:131
sick_scan::SickScanServices::sendSopasAndCheckAnswer
bool sendSopasAndCheckAnswer(const std::string &sopasCmd, std::vector< unsigned char > &sopasReplyBin, std::string &sopasReplyString)
Definition: sick_scan_services.cpp:65
sick_scan::SickScanServices::m_cola_binary
bool m_cola_binary
cola ascii or cola binary messages
Definition: sick_scan_services.h:102
sick_scan::SickScanServices::m_srv_server_ColaMsg
ros::ServiceServer m_srv_server_ColaMsg
service "ColaMsg", &sick_scan::SickScanServices::serviceCbColaMsg
Definition: sick_scan_services.h:104
ros::NodeHandle


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Thu Sep 8 2022 02:30:19