cola_encoder.h
Go to the documentation of this file.
1 /*
2  * @brief cola_encoder encodes service requests to cola telegrams, parses cola responses and
3  * converts them to service responses.
4  *
5  * Copyright (C) 2019 Ing.-Buero Dr. Michael Lehning, Hildesheim
6  * Copyright (C) 2019 SICK AG, Waldkirch
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  * All rights reserved.
21  *
22  * Redistribution and use in source and binary forms, with or without
23  * modification, are permitted provided that the following conditions are met:
24  *
25  * * Redistributions of source code must retain the above copyright
26  * notice, this list of conditions and the following disclaimer.
27  * * Redistributions in binary form must reproduce the above copyright
28  * notice, this list of conditions and the following disclaimer in the
29  * documentation and/or other materials provided with the distribution.
30  * * Neither the name of SICK AG nor the names of its
31  * contributors may be used to endorse or promote products derived from
32  * this software without specific prior written permission
33  * * Neither the name of Ing.-Buero Dr. Michael Lehning nor the names of its
34  * contributors may be used to endorse or promote products derived from
35  * this software without specific prior written permission
36  *
37  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
38  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
40  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
41  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
43  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
44  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
45  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
47  * POSSIBILITY OF SUCH DAMAGE.
48  *
49  * Authors:
50  * Michael Lehning <michael.lehning@lehning.de>
51  *
52  * Copyright 2019 SICK AG
53  * Copyright 2019 Ing.-Buero Dr. Michael Lehning
54  *
55  */
56 #ifndef __SIM_LOC_COLA_ENCODER_H_INCLUDED
57 #define __SIM_LOC_COLA_ENCODER_H_INCLUDED
58 
59 #include <string>
60 #include <vector>
61 #include "sick_scan/ros_wrapper.h"
62 #include "sick_scan/cola_parser.h"
63 
64 namespace sick_scan
65 {
71  {
72  public:
73 
79  static std::string encodeServiceRequest(const sick_scan::SickDevSetLidarConfigSrv::Request& service_request);
80 
87  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickDevSetLidarConfigSrv::Response& service_response);
88 
94  static std::string encodeServiceRequest(const sick_scan::SickDevGetLidarConfigSrv::Request& service_request);
95 
102  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickDevGetLidarConfigSrv::Response& service_response);
103 
109  static std::string encodeServiceRequest(const sick_scan::SickLocSetMapSrv::Request& service_request);
110 
117  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSetMapSrv::Response& service_response);
118 
124  static std::string encodeServiceRequest(const sick_scan::SickLocMapSrv::Request& service_request);
125 
132  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocMapSrv::Response& service_response);
133 
139  static std::string encodeServiceRequest(const sick_scan::SickLocMapStateSrv::Request& service_request);
140 
147  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocMapStateSrv::Response& service_response);
148 
154  static std::string encodeServiceRequest(const sick_scan::SickLocInitializePoseSrv::Request& service_request);
155 
162  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocInitializePoseSrv::Response& service_response);
163 
169  static std::string encodeServiceRequest(const sick_scan::SickLocInitialPoseSrv::Request& service_request);
170 
177  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocInitialPoseSrv::Response& service_response);
178 
179 
185  static std::string encodeServiceRequest(const sick_scan::SickLocSetReflectorsForSupportActiveSrv::Request& service_request);
186 
193  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSetReflectorsForSupportActiveSrv::Response& service_response);
194 
200  static std::string encodeServiceRequest(const sick_scan::SickLocReflectorsForSupportActiveSrv::Request& service_request);
201 
208  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocReflectorsForSupportActiveSrv::Response& service_response);
209 
215  static std::string encodeServiceRequest(const sick_scan::SickLocSetOdometryActiveSrv::Request& service_request);
216 
223  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSetOdometryActiveSrv::Response& service_response);
224 
230  static std::string encodeServiceRequest(const sick_scan::SickLocOdometryActiveSrv::Request& service_request);
231 
238  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocOdometryActiveSrv::Response& service_response);
239 
245  static std::string encodeServiceRequest(const sick_scan::SickLocSetOdometryPortSrv::Request& service_request);
246 
253  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSetOdometryPortSrv::Response& service_response);
254 
260  static std::string encodeServiceRequest(const sick_scan::SickLocOdometryPortSrv::Request& service_request);
261 
268  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocOdometryPortSrv::Response& service_response);
269 
275  static std::string encodeServiceRequest(const sick_scan::SickLocSetOdometryRestrictYMotionSrv::Request& service_request);
276 
283  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSetOdometryRestrictYMotionSrv::Response& service_response);
284 
290  static std::string encodeServiceRequest(const sick_scan::SickLocOdometryRestrictYMotionSrv::Request& service_request);
291 
298  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocOdometryRestrictYMotionSrv::Response& service_response);
299 
305  static std::string encodeServiceRequest(const sick_scan::SickLocSetAutoStartActiveSrv::Request& service_request);
306 
313  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSetAutoStartActiveSrv::Response& service_response);
314 
320  static std::string encodeServiceRequest(const sick_scan::SickLocAutoStartActiveSrv::Request& service_request);
321 
328  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocAutoStartActiveSrv::Response& service_response);
329 
335  static std::string encodeServiceRequest(const sick_scan::SickLocSetAutoStartSavePoseIntervalSrv::Request& service_request);
336 
343  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSetAutoStartSavePoseIntervalSrv::Response& service_response);
344 
350  static std::string encodeServiceRequest(const sick_scan::SickLocAutoStartSavePoseIntervalSrv::Request& service_request);
351 
358  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocAutoStartSavePoseIntervalSrv::Response& service_response);
359 
365  static std::string encodeServiceRequest(const sick_scan::SickLocSetRingBufferRecordingActiveSrv::Request& service_request);
366 
373  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSetRingBufferRecordingActiveSrv::Response& service_response);
374 
380  static std::string encodeServiceRequest(const sick_scan::SickLocRingBufferRecordingActiveSrv::Request& service_request);
381 
388  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocRingBufferRecordingActiveSrv::Response& service_response);
389 
395  static std::string encodeServiceRequest(const sick_scan::SickDevGetLidarIdentSrv::Request& service_request);
396 
403  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickDevGetLidarIdentSrv::Response& service_response);
404 
410  static std::string encodeServiceRequest(const sick_scan::SickDevGetLidarStateSrv::Request& service_request);
411 
418  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickDevGetLidarStateSrv::Response& service_response);
419 
425  static std::string encodeServiceRequest(const sick_scan::SickGetSoftwareVersionSrv::Request& service_request);
426 
433  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickGetSoftwareVersionSrv::Response& service_response);
434 
440  static std::string encodeServiceRequest(const sick_scan::SickLocAutoStartSavePoseSrv::Request& service_request);
441 
448  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocAutoStartSavePoseSrv::Response& service_response);
449 
455  static std::string encodeServiceRequest(const sick_scan::SickLocForceUpdateSrv::Request& service_request);
456 
463  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocForceUpdateSrv::Response& service_response);
464 
470  static std::string encodeServiceRequest(const sick_scan::SickLocSaveRingBufferRecordingSrv::Request& service_request);
471 
478  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocSaveRingBufferRecordingSrv::Response& service_response);
479 
485  static std::string encodeServiceRequest(const sick_scan::SickLocStartDemoMappingSrv::Request& service_request);
486 
493  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocStartDemoMappingSrv::Response& service_response);
494 
500  static std::string encodeServiceRequest(const sick_scan::SickReportUserMessageSrv::Request& service_request);
501 
508  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickReportUserMessageSrv::Response& service_response);
509 
515  static std::string encodeServiceRequest(const sick_scan::SickSavePermanentSrv::Request& service_request);
516 
523  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickSavePermanentSrv::Response& service_response);
524 
530  static std::string encodeServiceRequest(const sick_scan::SickLocResultPortSrv::Request& service_request);
531 
538  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocResultPortSrv::Response& service_response);
539 
545  static std::string encodeServiceRequest(const sick_scan::SickLocResultModeSrv::Request& service_request);
546 
553  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocResultModeSrv::Response& service_response);
554 
560  static std::string encodeServiceRequest(const sick_scan::SickLocResultEndiannessSrv::Request& service_request);
561 
568  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocResultEndiannessSrv::Response& service_response);
569 
575  static std::string encodeServiceRequest(const sick_scan::SickLocResultStateSrv::Request& service_request);
576 
583  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocResultStateSrv::Response& service_response);
584 
590  static std::string encodeServiceRequest(const sick_scan::SickLocResultPoseIntervalSrv::Request& service_request);
591 
598  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickLocResultPoseIntervalSrv::Response& service_response);
599 
605  static std::string encodeServiceRequest(const sick_scan::SickDevSetIMUActiveSrv::Request& service_request);
606 
613  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickDevSetIMUActiveSrv::Response& service_response);
614 
620  static std::string encodeServiceRequest(const sick_scan::SickDevIMUActiveSrv::Request& service_request);
621 
628  static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg& cola_response, sick_scan::SickDevIMUActiveSrv::Response& service_response);
629 
630  }; // class ColaEncoder
631 
632 } // namespace sick_scan
633 #endif // __SIM_LOC_COLA_ENCODER_H_INCLUDED
class ColaEncoder encodes service requests to cola telegrams, parses cola responses and converts them...
Definition: cola_encoder.h:70
static std::string encodeServiceRequest(const sick_scan::SickDevSetLidarConfigSrv::Request &service_request)
static bool parseServiceResponse(const sick_scan::SickLocColaTelegramMsg &cola_response, sick_scan::SickDevSetLidarConfigSrv::Response &service_response)


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Wed May 5 2021 03:05:47