Skip to content

Commit

Permalink
regenerate DENM files with rust-codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbusch committed Jun 17, 2024
1 parent 3e24b70 commit 28f0383
Show file tree
Hide file tree
Showing 292 changed files with 822 additions and 1,029 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,14 +42,13 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_AccelerationConfidence(const AccelerationConfidence_t& in, denm_msgs::AccelerationConfidence& out) {

etsi_its_primitives_conversion::toRos_INTEGER(in, out.value);
}

void toStruct_AccelerationConfidence(const denm_msgs::AccelerationConfidence& in, AccelerationConfidence_t& out) {

memset(&out, 0, sizeof(AccelerationConfidence_t));

etsi_its_primitives_conversion::toStruct_INTEGER(in.value, out);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,16 +42,15 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_AccelerationControl(const AccelerationControl_t& in, denm_msgs::AccelerationControl& out) {

etsi_its_primitives_conversion::toRos_BIT_STRING(in, out.value);
out.bits_unused = in.bits_unused;
}

void toStruct_AccelerationControl(const denm_msgs::AccelerationControl& in, AccelerationControl_t& out) {

memset(&out, 0, sizeof(AccelerationControl_t));

etsi_its_primitives_conversion::toStruct_BIT_STRING(in.value, out);
out.bits_unused = in.bits_unused;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,14 +42,13 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_AccidentSubCauseCode(const AccidentSubCauseCode_t& in, denm_msgs::AccidentSubCauseCode& out) {

etsi_its_primitives_conversion::toRos_INTEGER(in, out.value);
}

void toStruct_AccidentSubCauseCode(const denm_msgs::AccidentSubCauseCode& in, AccidentSubCauseCode_t& out) {

memset(&out, 0, sizeof(AccidentSubCauseCode_t));

etsi_its_primitives_conversion::toStruct_INTEGER(in.value, out);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -27,8 +28,8 @@ SOFTWARE.
#pragma once

#include <etsi_its_denm_coding/ActionID.h>
#include <etsi_its_denm_conversion/convertStationID.h>
#include <etsi_its_denm_conversion/convertSequenceNumber.h>
#include <etsi_its_denm_conversion/convertStationID.h>
#ifdef ROS1
#include <etsi_its_denm_msgs/ActionID.h>
namespace denm_msgs = etsi_its_denm_msgs;
Expand All @@ -41,17 +42,15 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_ActionID(const ActionID_t& in, denm_msgs::ActionID& out) {

toRos_StationID(in.originatingStationID, out.originating_station_id);
toRos_SequenceNumber(in.sequenceNumber, out.sequence_number);
}

void toStruct_ActionID(const denm_msgs::ActionID& in, ActionID_t& out) {

memset(&out, 0, sizeof(ActionID_t));

toStruct_StationID(in.originating_station_id, out.originatingStationID);
toStruct_SequenceNumber(in.sequence_number, out.sequenceNumber);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,14 +42,13 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_AdverseWeatherConditionAdhesionSubCauseCode(const AdverseWeatherCondition_AdhesionSubCauseCode_t& in, denm_msgs::AdverseWeatherConditionAdhesionSubCauseCode& out) {

etsi_its_primitives_conversion::toRos_INTEGER(in, out.value);
}

void toStruct_AdverseWeatherConditionAdhesionSubCauseCode(const denm_msgs::AdverseWeatherConditionAdhesionSubCauseCode& in, AdverseWeatherCondition_AdhesionSubCauseCode_t& out) {

memset(&out, 0, sizeof(AdverseWeatherCondition_AdhesionSubCauseCode_t));

etsi_its_primitives_conversion::toStruct_INTEGER(in.value, out);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,14 +42,13 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_AdverseWeatherConditionExtremeWeatherConditionSubCauseCode(const AdverseWeatherCondition_ExtremeWeatherConditionSubCauseCode_t& in, denm_msgs::AdverseWeatherConditionExtremeWeatherConditionSubCauseCode& out) {

etsi_its_primitives_conversion::toRos_INTEGER(in, out.value);
}

void toStruct_AdverseWeatherConditionExtremeWeatherConditionSubCauseCode(const denm_msgs::AdverseWeatherConditionExtremeWeatherConditionSubCauseCode& in, AdverseWeatherCondition_ExtremeWeatherConditionSubCauseCode_t& out) {

memset(&out, 0, sizeof(AdverseWeatherCondition_ExtremeWeatherConditionSubCauseCode_t));

etsi_its_primitives_conversion::toStruct_INTEGER(in.value, out);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,14 +42,13 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_AdverseWeatherConditionPrecipitationSubCauseCode(const AdverseWeatherCondition_PrecipitationSubCauseCode_t& in, denm_msgs::AdverseWeatherConditionPrecipitationSubCauseCode& out) {

etsi_its_primitives_conversion::toRos_INTEGER(in, out.value);
}

void toStruct_AdverseWeatherConditionPrecipitationSubCauseCode(const denm_msgs::AdverseWeatherConditionPrecipitationSubCauseCode& in, AdverseWeatherCondition_PrecipitationSubCauseCode_t& out) {

memset(&out, 0, sizeof(AdverseWeatherCondition_PrecipitationSubCauseCode_t));

etsi_its_primitives_conversion::toStruct_INTEGER(in.value, out);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,14 +42,13 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_AdverseWeatherConditionVisibilitySubCauseCode(const AdverseWeatherCondition_VisibilitySubCauseCode_t& in, denm_msgs::AdverseWeatherConditionVisibilitySubCauseCode& out) {

etsi_its_primitives_conversion::toRos_INTEGER(in, out.value);
}

void toStruct_AdverseWeatherConditionVisibilitySubCauseCode(const denm_msgs::AdverseWeatherConditionVisibilitySubCauseCode& in, AdverseWeatherCondition_VisibilitySubCauseCode_t& out) {

memset(&out, 0, sizeof(AdverseWeatherCondition_VisibilitySubCauseCode_t));

etsi_its_primitives_conversion::toStruct_INTEGER(in.value, out);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -27,12 +28,12 @@ SOFTWARE.
#pragma once

#include <etsi_its_denm_coding/AlacarteContainer.h>
#include <etsi_its_denm_conversion/convertLanePosition.h>
#include <etsi_its_denm_conversion/convertImpactReductionContainer.h>
#include <etsi_its_denm_conversion/convertTemperature.h>
#include <etsi_its_denm_conversion/convertRoadWorksContainerExtended.h>
#include <etsi_its_denm_conversion/convertLanePosition.h>
#include <etsi_its_denm_conversion/convertPositioningSolutionType.h>
#include <etsi_its_denm_conversion/convertRoadWorksContainerExtended.h>
#include <etsi_its_denm_conversion/convertStationaryVehicleContainer.h>
#include <etsi_its_denm_conversion/convertTemperature.h>
#ifdef ROS1
#include <etsi_its_denm_msgs/AlacarteContainer.h>
namespace denm_msgs = etsi_its_denm_msgs;
Expand All @@ -45,79 +46,59 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_AlacarteContainer(const AlacarteContainer_t& in, denm_msgs::AlacarteContainer& out) {

if (in.lanePosition) {
toRos_LanePosition(*in.lanePosition, out.lane_position);
out.lane_position_is_present = true;
}

if (in.impactReduction) {
toRos_ImpactReductionContainer(*in.impactReduction, out.impact_reduction);
out.impact_reduction_is_present = true;
}

if (in.externalTemperature) {
toRos_Temperature(*in.externalTemperature, out.external_temperature);
out.external_temperature_is_present = true;
}

if (in.roadWorks) {
toRos_RoadWorksContainerExtended(*in.roadWorks, out.road_works);
out.road_works_is_present = true;
}

if (in.positioningSolution) {
toRos_PositioningSolutionType(*in.positioningSolution, out.positioning_solution);
out.positioning_solution_is_present = true;
}

if (in.stationaryVehicle) {
toRos_StationaryVehicleContainer(*in.stationaryVehicle, out.stationary_vehicle);
out.stationary_vehicle_is_present = true;
}

}

void toStruct_AlacarteContainer(const denm_msgs::AlacarteContainer& in, AlacarteContainer_t& out) {

memset(&out, 0, sizeof(AlacarteContainer_t));

if (in.lane_position_is_present) {
LanePosition_t lane_position;
toStruct_LanePosition(in.lane_position, lane_position);
out.lanePosition = new LanePosition_t(lane_position);
out.lanePosition = (LanePosition_t*) calloc(1, sizeof(LanePosition_t));
toStruct_LanePosition(in.lane_position, *out.lanePosition);
}

if (in.impact_reduction_is_present) {
ImpactReductionContainer_t impact_reduction;
toStruct_ImpactReductionContainer(in.impact_reduction, impact_reduction);
out.impactReduction = new ImpactReductionContainer_t(impact_reduction);
out.impactReduction = (ImpactReductionContainer_t*) calloc(1, sizeof(ImpactReductionContainer_t));
toStruct_ImpactReductionContainer(in.impact_reduction, *out.impactReduction);
}

if (in.external_temperature_is_present) {
Temperature_t external_temperature;
toStruct_Temperature(in.external_temperature, external_temperature);
out.externalTemperature = new Temperature_t(external_temperature);
out.externalTemperature = (Temperature_t*) calloc(1, sizeof(Temperature_t));
toStruct_Temperature(in.external_temperature, *out.externalTemperature);
}

if (in.road_works_is_present) {
RoadWorksContainerExtended_t road_works;
toStruct_RoadWorksContainerExtended(in.road_works, road_works);
out.roadWorks = new RoadWorksContainerExtended_t(road_works);
out.roadWorks = (RoadWorksContainerExtended_t*) calloc(1, sizeof(RoadWorksContainerExtended_t));
toStruct_RoadWorksContainerExtended(in.road_works, *out.roadWorks);
}

if (in.positioning_solution_is_present) {
PositioningSolutionType_t positioning_solution;
toStruct_PositioningSolutionType(in.positioning_solution, positioning_solution);
out.positioningSolution = new PositioningSolutionType_t(positioning_solution);
out.positioningSolution = (PositioningSolutionType_t*) calloc(1, sizeof(PositioningSolutionType_t));
toStruct_PositioningSolutionType(in.positioning_solution, *out.positioningSolution);
}

if (in.stationary_vehicle_is_present) {
StationaryVehicleContainer_t stationary_vehicle;
toStruct_StationaryVehicleContainer(in.stationary_vehicle, stationary_vehicle);
out.stationaryVehicle = new StationaryVehicleContainer_t(stationary_vehicle);
out.stationaryVehicle = (StationaryVehicleContainer_t*) calloc(1, sizeof(StationaryVehicleContainer_t));
toStruct_StationaryVehicleContainer(in.stationary_vehicle, *out.stationaryVehicle);
}

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
MIT License
Copyright (c) 2023 Institute for Automotive Engineering (ika), RWTH Aachen University
Copyright (c) 2024 Instituto de Telecomunicações, Universidade de Aveiro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -27,8 +28,8 @@ SOFTWARE.
#pragma once

#include <etsi_its_denm_coding/Altitude.h>
#include <etsi_its_denm_conversion/convertAltitudeValue.h>
#include <etsi_its_denm_conversion/convertAltitudeConfidence.h>
#include <etsi_its_denm_conversion/convertAltitudeValue.h>
#ifdef ROS1
#include <etsi_its_denm_msgs/Altitude.h>
namespace denm_msgs = etsi_its_denm_msgs;
Expand All @@ -41,17 +42,15 @@ namespace denm_msgs = etsi_its_denm_msgs::msg;
namespace etsi_its_denm_conversion {

void toRos_Altitude(const Altitude_t& in, denm_msgs::Altitude& out) {

toRos_AltitudeValue(in.altitudeValue, out.altitude_value);
toRos_AltitudeConfidence(in.altitudeConfidence, out.altitude_confidence);
}

void toStruct_Altitude(const denm_msgs::Altitude& in, Altitude_t& out) {

memset(&out, 0, sizeof(Altitude_t));

toStruct_AltitudeValue(in.altitude_value, out.altitudeValue);
toStruct_AltitudeConfidence(in.altitude_confidence, out.altitudeConfidence);
}

}
}
Loading

0 comments on commit 28f0383

Please sign in to comment.