convertManeuverConstraints.h
Go to the documentation of this file.
1 
44 #pragma once
45 
50 #ifdef ROS1
51 #include <etsi_its_mcm_uulm_msgs/ManeuverConstraints.h>
52 namespace mcm_uulm_msgs = etsi_its_mcm_uulm_msgs;
53 #else
54 #include <etsi_its_mcm_uulm_msgs/msg/maneuver_constraints.hpp>
55 namespace mcm_uulm_msgs = etsi_its_mcm_uulm_msgs::msg;
56 #endif
57 
58 
60 
61 void toRos_ManeuverConstraints(const mcm_uulm_ManeuverConstraints_t& in, mcm_uulm_msgs::ManeuverConstraints& out) {
62  if (in.maneuverType) {
63  toRos_ManeuverType(*in.maneuverType, out.maneuver_type);
64  out.maneuver_type_is_present = true;
65  }
66  toRos_LongitudinalManeuverWaypointContainer(in.longitudinalManeuverWaypointContainer, out.longitudinal_maneuver_waypoint_container);
67  if (in.maneuverCorridor) {
68  toRos_Polygon(*in.maneuverCorridor, out.maneuver_corridor);
69  out.maneuver_corridor_is_present = true;
70  }
71 }
72 
73 void toStruct_ManeuverConstraints(const mcm_uulm_msgs::ManeuverConstraints& in, mcm_uulm_ManeuverConstraints_t& out) {
74  memset(&out, 0, sizeof(mcm_uulm_ManeuverConstraints_t));
75  if (in.maneuver_type_is_present) {
77  toStruct_ManeuverType(in.maneuver_type, *out.maneuverType);
78  }
79  toStruct_LongitudinalManeuverWaypointContainer(in.longitudinal_maneuver_waypoint_container, out.longitudinalManeuverWaypointContainer);
80  if (in.maneuver_corridor_is_present) {
81  out.maneuverCorridor = (mcm_uulm_Polygon_t*) calloc(1, sizeof(mcm_uulm_Polygon_t));
82  toStruct_Polygon(in.maneuver_corridor, *out.maneuverCorridor);
83  }
84 }
85 
86 }
etsi_its_mcm_uulm_conversion
Definition: convertAdviceResponse.h:59
etsi_its_mcm_uulm_conversion::toRos_Polygon
void toRos_Polygon(const mcm_uulm_Polygon_t &in, mcm_uulm_msgs::Polygon &out)
Definition: convertPolygon.h:61
etsi_its_mcm_uulm_conversion::toRos_ManeuverConstraints
void toRos_ManeuverConstraints(const mcm_uulm_ManeuverConstraints_t &in, mcm_uulm_msgs::ManeuverConstraints &out)
Definition: convertManeuverConstraints.h:61
etsi_its_mcm_uulm_conversion::toRos_ManeuverType
void toRos_ManeuverType(const mcm_uulm_ManeuverType_t &in, mcm_uulm_msgs::ManeuverType &out)
Definition: convertManeuverType.h:64
mcm_uulm_ManeuverConstraints::maneuverType
mcm_uulm_ManeuverType_t * maneuverType
etsi_its_mcm_uulm_conversion::toStruct_ManeuverType
void toStruct_ManeuverType(const mcm_uulm_msgs::ManeuverType &in, mcm_uulm_ManeuverType_t &out)
Definition: convertManeuverType.h:68
etsi_its_mcm_uulm_conversion::toRos_LongitudinalManeuverWaypointContainer
void toRos_LongitudinalManeuverWaypointContainer(const mcm_uulm_LongitudinalManeuverWaypointContainer_t &in, mcm_uulm_msgs::LongitudinalManeuverWaypointContainer &out)
Definition: convertLongitudinalManeuverWaypointContainer.h:61
mcm_uulm_ManeuverConstraints.h
etsi_its_mcm_uulm_conversion::toStruct_LongitudinalManeuverWaypointContainer
void toStruct_LongitudinalManeuverWaypointContainer(const mcm_uulm_msgs::LongitudinalManeuverWaypointContainer &in, mcm_uulm_LongitudinalManeuverWaypointContainer_t &out)
Definition: convertLongitudinalManeuverWaypointContainer.h:69
etsi_its_mcm_uulm_conversion::toStruct_ManeuverConstraints
void toStruct_ManeuverConstraints(const mcm_uulm_msgs::ManeuverConstraints &in, mcm_uulm_ManeuverConstraints_t &out)
Definition: convertManeuverConstraints.h:73
convertLongitudinalManeuverWaypointContainer.h
convertPolygon.h
convertManeuverType.h
mcm_uulm_Polygon
mcm_uulm_ManeuverConstraints::maneuverCorridor
struct mcm_uulm_Polygon * maneuverCorridor
mcm_uulm_ManeuverConstraints
mcm_uulm_ManeuverConstraints::longitudinalManeuverWaypointContainer
mcm_uulm_LongitudinalManeuverWaypointContainer_t longitudinalManeuverWaypointContainer
mcm_uulm_ManeuverType_t
long mcm_uulm_ManeuverType_t
etsi_its_mcm_uulm_conversion::toStruct_Polygon
void toStruct_Polygon(const mcm_uulm_msgs::Polygon &in, mcm_uulm_Polygon_t &out)
Definition: convertPolygon.h:69


etsi_its_mcm_uulm_conversion
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:29:22