convertIntersectionGeometryList.h
Go to the documentation of this file.
1 
43 #pragma once
44 
45 #include <stdexcept>
46 
51 #ifdef ROS1
52 #include <etsi_its_mapem_ts_msgs/IntersectionGeometry.h>
53 #include <etsi_its_mapem_ts_msgs/IntersectionGeometryList.h>
54 namespace mapem_ts_msgs = etsi_its_mapem_ts_msgs;
55 #else
56 #include <etsi_its_mapem_ts_msgs/msg/intersection_geometry.hpp>
57 #include <etsi_its_mapem_ts_msgs/msg/intersection_geometry_list.hpp>
58 namespace mapem_ts_msgs = etsi_its_mapem_ts_msgs::msg;
59 #endif
60 
61 
63 
64 void toRos_IntersectionGeometryList(const mapem_ts_IntersectionGeometryList_t& in, mapem_ts_msgs::IntersectionGeometryList& out) {
65  for (int i = 0; i < in.list.count; ++i) {
66  mapem_ts_msgs::IntersectionGeometry el;
67  toRos_IntersectionGeometry(*(in.list.array[i]), el);
68  out.array.push_back(el);
69  }
70 }
71 
72 void toStruct_IntersectionGeometryList(const mapem_ts_msgs::IntersectionGeometryList& in, mapem_ts_IntersectionGeometryList_t& out) {
73  memset(&out, 0, sizeof(mapem_ts_IntersectionGeometryList_t));
74  for (int i = 0; i < in.array.size(); ++i) {
76  toStruct_IntersectionGeometry(in.array[i], *el);
77  if (asn_sequence_add(&out, el)) throw std::invalid_argument("Failed to add to A_SEQUENCE_OF");
78  }
79 }
80 
81 }
etsi_its_mapem_ts_conversion::toRos_IntersectionGeometryList
void toRos_IntersectionGeometryList(const mapem_ts_IntersectionGeometryList_t &in, mapem_ts_msgs::IntersectionGeometryList &out)
Definition: convertIntersectionGeometryList.h:64
etsi_its_mapem_ts_conversion::toStruct_IntersectionGeometry
void toStruct_IntersectionGeometry(const mapem_ts_msgs::IntersectionGeometry &in, mapem_ts_IntersectionGeometry_t &out)
Definition: convertIntersectionGeometry.h:98
etsi_its_mapem_ts_conversion::toStruct_IntersectionGeometryList
void toStruct_IntersectionGeometryList(const mapem_ts_msgs::IntersectionGeometryList &in, mapem_ts_IntersectionGeometryList_t &out)
Definition: convertIntersectionGeometryList.h:72
mapem_ts_IntersectionGeometry.h
mapem_ts_IntersectionGeometryList.h
convertIntersectionGeometry.h
mapem_ts_IntersectionGeometryList
etsi_its_mapem_ts_conversion
Definition: convertAllowedManeuvers.h:70
mapem_ts_IntersectionGeometry
etsi_its_mapem_ts_conversion::toRos_IntersectionGeometry
void toRos_IntersectionGeometry(const mapem_ts_IntersectionGeometry_t &in, mapem_ts_msgs::IntersectionGeometry &out)
Definition: convertIntersectionGeometry.h:75
asn_SEQUENCE_OF.h
asn_sequence_add
#define asn_sequence_add


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