convertPathPoint.h
Go to the documentation of this file.
1 
43 #pragma once
44 
48 #ifdef ROS1
49 #include <etsi_its_cam_msgs/PathPoint.h>
50 namespace cam_msgs = etsi_its_cam_msgs;
51 #else
52 #include <etsi_its_cam_msgs/msg/path_point.hpp>
53 namespace cam_msgs = etsi_its_cam_msgs::msg;
54 #endif
55 
56 
57 namespace etsi_its_cam_conversion {
58 
59 void toRos_PathPoint(const cam_PathPoint_t& in, cam_msgs::PathPoint& out) {
60  toRos_DeltaReferencePosition(in.pathPosition, out.path_position);
61  if (in.pathDeltaTime) {
62  toRos_PathDeltaTime(*in.pathDeltaTime, out.path_delta_time);
63  out.path_delta_time_is_present = true;
64  }
65 }
66 
67 void toStruct_PathPoint(const cam_msgs::PathPoint& in, cam_PathPoint_t& out) {
68  memset(&out, 0, sizeof(cam_PathPoint_t));
69  toStruct_DeltaReferencePosition(in.path_position, out.pathPosition);
70  if (in.path_delta_time_is_present) {
71  out.pathDeltaTime = (cam_PathDeltaTime_t*) calloc(1, sizeof(cam_PathDeltaTime_t));
72  toStruct_PathDeltaTime(in.path_delta_time, *out.pathDeltaTime);
73  }
74 }
75 
76 }
etsi_its_cam_conversion::toStruct_DeltaReferencePosition
void toStruct_DeltaReferencePosition(const cam_msgs::DeltaReferencePosition &in, cam_DeltaReferencePosition_t &out)
Definition: convertDeltaReferencePosition.h:67
etsi_its_cam_conversion
Definition: convertAccelerationConfidence.h:54
cam_PathPoint.h
etsi_its_cam_conversion::toRos_DeltaReferencePosition
void toRos_DeltaReferencePosition(const cam_DeltaReferencePosition_t &in, cam_msgs::DeltaReferencePosition &out)
Definition: convertDeltaReferencePosition.h:61
convertPathDeltaTime.h
etsi_its_cam_conversion::toRos_PathDeltaTime
void toRos_PathDeltaTime(const cam_PathDeltaTime_t &in, cam_msgs::PathDeltaTime &out)
Definition: convertPathDeltaTime.h:56
etsi_its_cam_conversion::toStruct_PathPoint
void toStruct_PathPoint(const cam_msgs::PathPoint &in, cam_PathPoint_t &out)
Definition: convertPathPoint.h:67
cam_PathPoint::pathDeltaTime
cam_PathDeltaTime_t * pathDeltaTime
cam_PathPoint::pathPosition
cam_DeltaReferencePosition_t pathPosition
convertDeltaReferencePosition.h
etsi_its_cam_conversion::toRos_PathPoint
void toRos_PathPoint(const cam_PathPoint_t &in, cam_msgs::PathPoint &out)
Definition: convertPathPoint.h:59
cam_PathPoint
etsi_its_cam_conversion::toStruct_PathDeltaTime
void toStruct_PathDeltaTime(const cam_msgs::PathDeltaTime &in, cam_PathDeltaTime_t &out)
Definition: convertPathDeltaTime.h:60
cam_PathDeltaTime_t
long cam_PathDeltaTime_t


etsi_its_cam_conversion
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:28:48