convertPathPredictedList.h
Go to the documentation of this file.
1 
47 #pragma once
48 
49 #include <stdexcept>
50 
55 #ifdef ROS1
56 #include <etsi_its_denm_ts_msgs/PathPredicted2.h>
57 #include <etsi_its_denm_ts_msgs/PathPredictedList.h>
58 namespace denm_ts_msgs = etsi_its_denm_ts_msgs;
59 #else
60 #include <etsi_its_denm_ts_msgs/msg/path_predicted2.hpp>
61 #include <etsi_its_denm_ts_msgs/msg/path_predicted_list.hpp>
62 namespace denm_ts_msgs = etsi_its_denm_ts_msgs::msg;
63 #endif
64 
65 
67 
68 void toRos_PathPredictedList(const denm_ts_PathPredictedList_t& in, denm_ts_msgs::PathPredictedList& out) {
69  for (int i = 0; i < in.list.count; ++i) {
70  denm_ts_msgs::PathPredicted2 el;
71  toRos_PathPredicted2(*(in.list.array[i]), el);
72  out.array.push_back(el);
73  }
74 }
75 
76 void toStruct_PathPredictedList(const denm_ts_msgs::PathPredictedList& in, denm_ts_PathPredictedList_t& out) {
77  memset(&out, 0, sizeof(denm_ts_PathPredictedList_t));
78  for (int i = 0; i < in.array.size(); ++i) {
80  toStruct_PathPredicted2(in.array[i], *el);
81  if (asn_sequence_add(&out, el)) throw std::invalid_argument("Failed to add to A_SEQUENCE_OF");
82  }
83 }
84 
85 }
denm_ts_PathPredictedList
etsi_its_denm_ts_conversion
Definition: convertAcceleration3dWithConfidence.h:69
denm_ts_PathPredicted2.h
denm_ts_PathPredicted2
etsi_its_denm_ts_conversion::toStruct_PathPredictedList
void toStruct_PathPredictedList(const denm_ts_msgs::PathPredictedList &in, denm_ts_PathPredictedList_t &out)
Definition: convertPathPredictedList.h:76
denm_ts_PathPredictedList.h
etsi_its_denm_ts_conversion::toRos_PathPredictedList
void toRos_PathPredictedList(const denm_ts_PathPredictedList_t &in, denm_ts_msgs::PathPredictedList &out)
Definition: convertPathPredictedList.h:68
convertPathPredicted2.h
etsi_its_denm_ts_conversion::toStruct_PathPredicted2
void toStruct_PathPredicted2(const denm_ts_msgs::PathPredicted2 &in, denm_ts_PathPredicted2_t &out)
Definition: convertPathPredicted2.h:86
asn_SEQUENCE_OF.h
etsi_its_denm_ts_conversion::toRos_PathPredicted2
void toRos_PathPredicted2(const denm_ts_PathPredicted2_t &in, denm_ts_msgs::PathPredicted2 &out)
Definition: convertPathPredicted2.h:80
asn_sequence_add
#define asn_sequence_add


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