convertProtectedCommunicationZone.h
Go to the documentation of this file.
1 
70 #pragma once
71 
79 #ifdef ROS1
80 #include <etsi_its_cam_ts_msgs/ProtectedCommunicationZone.h>
81 namespace cam_ts_msgs = etsi_its_cam_ts_msgs;
82 #else
83 #include <etsi_its_cam_ts_msgs/msg/protected_communication_zone.hpp>
84 namespace cam_ts_msgs = etsi_its_cam_ts_msgs::msg;
85 #endif
86 
87 
89 
90 void toRos_ProtectedCommunicationZone(const cam_ts_ProtectedCommunicationZone_t& in, cam_ts_msgs::ProtectedCommunicationZone& out) {
91  toRos_ProtectedZoneType(in.protectedZoneType, out.protected_zone_type);
92  if (in.expiryTime) {
93  toRos_TimestampIts(*in.expiryTime, out.expiry_time);
94  out.expiry_time_is_present = true;
95  }
96  toRos_Latitude(in.protectedZoneLatitude, out.protected_zone_latitude);
97  toRos_Longitude(in.protectedZoneLongitude, out.protected_zone_longitude);
98  if (in.protectedZoneRadius) {
99  toRos_ProtectedZoneRadius(*in.protectedZoneRadius, out.protected_zone_radius);
100  out.protected_zone_radius_is_present = true;
101  }
102  if (in.protectedZoneId) {
103  toRos_ProtectedZoneId(*in.protectedZoneId, out.protected_zone_id);
104  out.protected_zone_id_is_present = true;
105  }
106 }
107 
108 void toStruct_ProtectedCommunicationZone(const cam_ts_msgs::ProtectedCommunicationZone& in, cam_ts_ProtectedCommunicationZone_t& out) {
109  memset(&out, 0, sizeof(cam_ts_ProtectedCommunicationZone_t));
110  toStruct_ProtectedZoneType(in.protected_zone_type, out.protectedZoneType);
111  if (in.expiry_time_is_present) {
112  out.expiryTime = (cam_ts_TimestampIts_t*) calloc(1, sizeof(cam_ts_TimestampIts_t));
113  toStruct_TimestampIts(in.expiry_time, *out.expiryTime);
114  }
115  toStruct_Latitude(in.protected_zone_latitude, out.protectedZoneLatitude);
116  toStruct_Longitude(in.protected_zone_longitude, out.protectedZoneLongitude);
117  if (in.protected_zone_radius_is_present) {
119  toStruct_ProtectedZoneRadius(in.protected_zone_radius, *out.protectedZoneRadius);
120  }
121  if (in.protected_zone_id_is_present) {
123  toStruct_ProtectedZoneId(in.protected_zone_id, *out.protectedZoneId);
124  }
125 }
126 
127 }
convertTimestampIts.h
convertProtectedZoneId.h
etsi_its_cam_ts_conversion::toStruct_TimestampIts
void toStruct_TimestampIts(const cam_ts_msgs::TimestampIts &in, cam_ts_TimestampIts_t &out)
Definition: convertTimestampIts.h:78
ASN__PRIMITIVE_TYPE_s
cam_ts_ProtectedCommunicationZone::protectedZoneRadius
cam_ts_ProtectedZoneRadius_t * protectedZoneRadius
cam_ts_ProtectedCommunicationZone::protectedZoneLongitude
cam_ts_Longitude_t protectedZoneLongitude
etsi_its_cam_ts_conversion::toRos_ProtectedZoneRadius
void toRos_ProtectedZoneRadius(const cam_ts_ProtectedZoneRadius_t &in, cam_ts_msgs::ProtectedZoneRadius &out)
Definition: convertProtectedZoneRadius.h:64
cam_ts_ProtectedCommunicationZone::expiryTime
cam_ts_TimestampIts_t * expiryTime
etsi_its_cam_ts_conversion::toRos_ProtectedZoneType
void toRos_ProtectedZoneType(const cam_ts_ProtectedZoneType_t &in, cam_ts_msgs::ProtectedZoneType &out)
Definition: convertProtectedZoneType.h:69
cam_ts_ProtectedCommunicationZone::protectedZoneType
cam_ts_ProtectedZoneType_t protectedZoneType
cam_ts_ProtectedZoneRadius_t
long cam_ts_ProtectedZoneRadius_t
etsi_its_cam_ts_conversion::toStruct_Latitude
void toStruct_Latitude(const cam_ts_msgs::Latitude &in, cam_ts_Latitude_t &out)
Definition: convertLatitude.h:77
cam_ts_ProtectedCommunicationZone::protectedZoneLatitude
cam_ts_Latitude_t protectedZoneLatitude
etsi_its_cam_ts_conversion::toRos_ProtectedCommunicationZone
void toRos_ProtectedCommunicationZone(const cam_ts_ProtectedCommunicationZone_t &in, cam_ts_msgs::ProtectedCommunicationZone &out)
Definition: convertProtectedCommunicationZone.h:90
etsi_its_cam_ts_conversion::toRos_Longitude
void toRos_Longitude(const cam_ts_Longitude_t &in, cam_ts_msgs::Longitude &out)
Definition: convertLongitude.h:76
etsi_its_cam_ts_conversion::toRos_TimestampIts
void toRos_TimestampIts(const cam_ts_TimestampIts_t &in, cam_ts_msgs::TimestampIts &out)
Definition: convertTimestampIts.h:74
etsi_its_cam_ts_conversion
Definition: convertAccelerationComponent.h:69
etsi_its_cam_ts_conversion::toRos_ProtectedZoneId
void toRos_ProtectedZoneId(const cam_ts_ProtectedZoneId_t &in, cam_ts_msgs::ProtectedZoneId &out)
Definition: convertProtectedZoneId.h:63
cam_ts_ProtectedCommunicationZone.h
convertProtectedZoneType.h
cam_ts_ProtectedCommunicationZone
convertLongitude.h
convertProtectedZoneRadius.h
etsi_its_cam_ts_conversion::toStruct_ProtectedCommunicationZone
void toStruct_ProtectedCommunicationZone(const cam_ts_msgs::ProtectedCommunicationZone &in, cam_ts_ProtectedCommunicationZone_t &out)
Definition: convertProtectedCommunicationZone.h:108
etsi_its_cam_ts_conversion::toStruct_Longitude
void toStruct_Longitude(const cam_ts_msgs::Longitude &in, cam_ts_Longitude_t &out)
Definition: convertLongitude.h:80
etsi_its_cam_ts_conversion::toStruct_ProtectedZoneType
void toStruct_ProtectedZoneType(const cam_ts_msgs::ProtectedZoneType &in, cam_ts_ProtectedZoneType_t &out)
Definition: convertProtectedZoneType.h:73
etsi_its_cam_ts_conversion::toStruct_ProtectedZoneId
void toStruct_ProtectedZoneId(const cam_ts_msgs::ProtectedZoneId &in, cam_ts_ProtectedZoneId_t &out)
Definition: convertProtectedZoneId.h:67
etsi_its_cam_ts_conversion::toStruct_ProtectedZoneRadius
void toStruct_ProtectedZoneRadius(const cam_ts_msgs::ProtectedZoneRadius &in, cam_ts_ProtectedZoneRadius_t &out)
Definition: convertProtectedZoneRadius.h:68
cam_ts_ProtectedCommunicationZone::protectedZoneId
cam_ts_ProtectedZoneId_t * protectedZoneId
convertLatitude.h
etsi_its_cam_ts_conversion::toRos_Latitude
void toRos_Latitude(const cam_ts_Latitude_t &in, cam_ts_msgs::Latitude &out)
Definition: convertLatitude.h:73
cam_ts_ProtectedZoneId_t
long cam_ts_ProtectedZoneId_t


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