convertTracesExtended.h
Go to the documentation of this file.
1 
46 #pragma once
47 
48 #include <stdexcept>
49 
54 #ifdef ROS1
55 #include <etsi_its_denm_ts_msgs/PathExtended.h>
56 #include <etsi_its_denm_ts_msgs/TracesExtended.h>
57 namespace denm_ts_msgs = etsi_its_denm_ts_msgs;
58 #else
59 #include <etsi_its_denm_ts_msgs/msg/path_extended.hpp>
60 #include <etsi_its_denm_ts_msgs/msg/traces_extended.hpp>
61 namespace denm_ts_msgs = etsi_its_denm_ts_msgs::msg;
62 #endif
63 
64 
66 
67 void toRos_TracesExtended(const denm_ts_TracesExtended_t& in, denm_ts_msgs::TracesExtended& out) {
68  for (int i = 0; i < in.list.count; ++i) {
69  denm_ts_msgs::PathExtended el;
70  toRos_PathExtended(*(in.list.array[i]), el);
71  out.array.push_back(el);
72  }
73 }
74 
75 void toStruct_TracesExtended(const denm_ts_msgs::TracesExtended& in, denm_ts_TracesExtended_t& out) {
76  memset(&out, 0, sizeof(denm_ts_TracesExtended_t));
77  for (int i = 0; i < in.array.size(); ++i) {
79  toStruct_PathExtended(in.array[i], *el);
80  if (asn_sequence_add(&out, el)) throw std::invalid_argument("Failed to add to A_SEQUENCE_OF");
81  }
82 }
83 
84 }
etsi_its_denm_ts_conversion
Definition: convertAcceleration3dWithConfidence.h:69
convertPathExtended.h
denm_ts_TracesExtended.h
denm_ts_PathExtended.h
etsi_its_denm_ts_conversion::toRos_PathExtended
void toRos_PathExtended(const denm_ts_PathExtended_t &in, denm_ts_msgs::PathExtended &out)
Definition: convertPathExtended.h:73
etsi_its_denm_ts_conversion::toStruct_TracesExtended
void toStruct_TracesExtended(const denm_ts_msgs::TracesExtended &in, denm_ts_TracesExtended_t &out)
Definition: convertTracesExtended.h:75
etsi_its_denm_ts_conversion::toStruct_PathExtended
void toStruct_PathExtended(const denm_ts_msgs::PathExtended &in, denm_ts_PathExtended_t &out)
Definition: convertPathExtended.h:78
denm_ts_TracesExtended
asn_SEQUENCE_OF.h
asn_sequence_add
#define asn_sequence_add
denm_ts_PathExtended
etsi_its_denm_ts_conversion::toRos_TracesExtended
void toRos_TracesExtended(const denm_ts_TracesExtended_t &in, denm_ts_msgs::TracesExtended &out)
Definition: convertTracesExtended.h:67


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