ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
clocktimeconverter.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2017-2020 German Aerospace Center (DLR).
3  * Eclipse ADORe, Automated Driving Open Research https://eclipse.org/adore
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License 2.0 which is available at
7  * http://www.eclipse.org/legal/epl-2.0.
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  * Matthias Nichting - initial implementation
13  ********************************************************************************/
14 
15 #include <rosgraph_msgs/Clock.h>
16 
17 namespace adore
18 {
19  namespace if_ROS
20  {
25  {
26  void operator()(rosgraph_msgs::ClockConstPtr cl, std::pair<uint32_t,uint32_t>& value)
27  {
28  value.first = cl->clock.sec;
29  value.second = cl->clock.nsec;
30  }
31  void operator()(const rosgraph_msgs::Clock& cl, std::pair<uint32_t,uint32_t>& value)
32  {
33  value.first = cl.clock.sec;
34  value.second = cl.clock.nsec;
35  }
36  rosgraph_msgs::Clock operator()(const std::pair<uint32_t,uint32_t>& value)
37  {
38  rosgraph_msgs::Clock cl;
39  cl.clock.sec = value.first;
40  cl.clock.nsec = value.second;
41  return cl;
42  }
43 
44 
45  };
46  }
47 }
Definition: areaofeffectconverter.h:20
Definition: clocktimeconverter.h:25
rosgraph_msgs::Clock operator()(const std::pair< uint32_t, uint32_t > &value)
Definition: clocktimeconverter.h:36
void operator()(rosgraph_msgs::ClockConstPtr cl, std::pair< uint32_t, uint32_t > &value)
Definition: clocktimeconverter.h:26
void operator()(const rosgraph_msgs::Clock &cl, std::pair< uint32_t, uint32_t > &value)
Definition: clocktimeconverter.h:31