fix carla collision event name
This commit is contained in:
parent
4ee75c4bc0
commit
8fc7af31fe
|
@ -13,7 +13,7 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @file CarlaCollisionEvent.cpp
|
* @file CarlaCarlaCollisionEvent.cpp
|
||||||
* This source file contains the definition of the described types in the IDL file.
|
* This source file contains the definition of the described types in the IDL file.
|
||||||
*
|
*
|
||||||
* This file was generated by the tool gen.
|
* This file was generated by the tool gen.
|
||||||
|
@ -36,14 +36,14 @@ using namespace eprosima::fastcdr::exception;
|
||||||
|
|
||||||
#define carla_msgs_msg_geometry_msgs_msg_Vector3_max_cdr_typesize 24ULL;
|
#define carla_msgs_msg_geometry_msgs_msg_Vector3_max_cdr_typesize 24ULL;
|
||||||
#define carla_msgs_msg_std_msgs_msg_Header_max_cdr_typesize 268ULL;
|
#define carla_msgs_msg_std_msgs_msg_Header_max_cdr_typesize 268ULL;
|
||||||
#define carla_msgs_msg_CollisionEvent_max_cdr_typesize 296ULL;
|
#define carla_msgs_msg_CarlaCollisionEvent_max_cdr_typesize 296ULL;
|
||||||
#define carla_msgs_msg_std_msgs_msg_Time_max_cdr_typesize 8ULL;
|
#define carla_msgs_msg_std_msgs_msg_Time_max_cdr_typesize 8ULL;
|
||||||
#define carla_msgs_msg_geometry_msgs_msg_Vector3_max_key_cdr_typesize 0ULL;
|
#define carla_msgs_msg_geometry_msgs_msg_Vector3_max_key_cdr_typesize 0ULL;
|
||||||
#define carla_msgs_msg_std_msgs_msg_Header_max_key_cdr_typesize 0ULL;
|
#define carla_msgs_msg_std_msgs_msg_Header_max_key_cdr_typesize 0ULL;
|
||||||
#define carla_msgs_msg_CollisionEvent_max_key_cdr_typesize 0ULL;
|
#define carla_msgs_msg_CarlaCollisionEvent_max_key_cdr_typesize 0ULL;
|
||||||
#define carla_msgs_msg_std_msgs_msg_Time_max_key_cdr_typesize 0ULL;
|
#define carla_msgs_msg_std_msgs_msg_Time_max_key_cdr_typesize 0ULL;
|
||||||
|
|
||||||
carla_msgs::msg::CollisionEvent::CollisionEvent()
|
carla_msgs::msg::CarlaCollisionEvent::CarlaCollisionEvent()
|
||||||
{
|
{
|
||||||
// std_msgs::msg::Header m_header
|
// std_msgs::msg::Header m_header
|
||||||
// unsigned long m_other_actor_id
|
// unsigned long m_other_actor_id
|
||||||
|
@ -51,28 +51,28 @@ carla_msgs::msg::CollisionEvent::CollisionEvent()
|
||||||
// geometry_msgs::msg::Vector3 m_normal_impulse
|
// geometry_msgs::msg::Vector3 m_normal_impulse
|
||||||
}
|
}
|
||||||
|
|
||||||
carla_msgs::msg::CollisionEvent::~CollisionEvent()
|
carla_msgs::msg::CarlaCollisionEvent::~CarlaCollisionEvent()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
carla_msgs::msg::CollisionEvent::CollisionEvent(
|
carla_msgs::msg::CarlaCollisionEvent::CarlaCollisionEvent(
|
||||||
const CollisionEvent& x)
|
const CarlaCollisionEvent& x)
|
||||||
{
|
{
|
||||||
m_header = x.m_header;
|
m_header = x.m_header;
|
||||||
m_other_actor_id = x.m_other_actor_id;
|
m_other_actor_id = x.m_other_actor_id;
|
||||||
m_normal_impulse = x.m_normal_impulse;
|
m_normal_impulse = x.m_normal_impulse;
|
||||||
}
|
}
|
||||||
|
|
||||||
carla_msgs::msg::CollisionEvent::CollisionEvent(
|
carla_msgs::msg::CarlaCollisionEvent::CarlaCollisionEvent(
|
||||||
CollisionEvent&& x) noexcept
|
CarlaCollisionEvent&& x) noexcept
|
||||||
{
|
{
|
||||||
m_header = std::move(x.m_header);
|
m_header = std::move(x.m_header);
|
||||||
m_other_actor_id = x.m_other_actor_id;
|
m_other_actor_id = x.m_other_actor_id;
|
||||||
m_normal_impulse = std::move(x.m_normal_impulse);
|
m_normal_impulse = std::move(x.m_normal_impulse);
|
||||||
}
|
}
|
||||||
|
|
||||||
carla_msgs::msg::CollisionEvent& carla_msgs::msg::CollisionEvent::operator =(
|
carla_msgs::msg::CarlaCollisionEvent& carla_msgs::msg::CarlaCollisionEvent::operator =(
|
||||||
const CollisionEvent& x)
|
const CarlaCollisionEvent& x)
|
||||||
{
|
{
|
||||||
m_header = x.m_header;
|
m_header = x.m_header;
|
||||||
m_other_actor_id = x.m_other_actor_id;
|
m_other_actor_id = x.m_other_actor_id;
|
||||||
|
@ -81,8 +81,8 @@ carla_msgs::msg::CollisionEvent& carla_msgs::msg::CollisionEvent::operator =(
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
carla_msgs::msg::CollisionEvent& carla_msgs::msg::CollisionEvent::operator =(
|
carla_msgs::msg::CarlaCollisionEvent& carla_msgs::msg::CarlaCollisionEvent::operator =(
|
||||||
CollisionEvent&& x) noexcept
|
CarlaCollisionEvent&& x) noexcept
|
||||||
{
|
{
|
||||||
m_header = std::move(x.m_header);
|
m_header = std::move(x.m_header);
|
||||||
m_other_actor_id = x.m_other_actor_id;
|
m_other_actor_id = x.m_other_actor_id;
|
||||||
|
@ -91,27 +91,27 @@ carla_msgs::msg::CollisionEvent& carla_msgs::msg::CollisionEvent::operator =(
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool carla_msgs::msg::CollisionEvent::operator ==(
|
bool carla_msgs::msg::CarlaCollisionEvent::operator ==(
|
||||||
const CollisionEvent& x) const
|
const CarlaCollisionEvent& x) const
|
||||||
{
|
{
|
||||||
return (m_header == x.m_header && m_other_actor_id == x.m_other_actor_id && m_normal_impulse == x.m_normal_impulse);
|
return (m_header == x.m_header && m_other_actor_id == x.m_other_actor_id && m_normal_impulse == x.m_normal_impulse);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool carla_msgs::msg::CollisionEvent::operator !=(
|
bool carla_msgs::msg::CarlaCollisionEvent::operator !=(
|
||||||
const CollisionEvent& x) const
|
const CarlaCollisionEvent& x) const
|
||||||
{
|
{
|
||||||
return !(*this == x);
|
return !(*this == x);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t carla_msgs::msg::CollisionEvent::getMaxCdrSerializedSize(
|
size_t carla_msgs::msg::CarlaCollisionEvent::getMaxCdrSerializedSize(
|
||||||
size_t current_alignment)
|
size_t current_alignment)
|
||||||
{
|
{
|
||||||
static_cast<void>(current_alignment);
|
static_cast<void>(current_alignment);
|
||||||
return carla_msgs_msg_CollisionEvent_max_cdr_typesize;
|
return carla_msgs_msg_CarlaCollisionEvent_max_cdr_typesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t carla_msgs::msg::CollisionEvent::getCdrSerializedSize(
|
size_t carla_msgs::msg::CarlaCollisionEvent::getCdrSerializedSize(
|
||||||
const carla_msgs::msg::CollisionEvent& data,
|
const carla_msgs::msg::CarlaCollisionEvent& data,
|
||||||
size_t current_alignment)
|
size_t current_alignment)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
|
@ -122,7 +122,7 @@ size_t carla_msgs::msg::CollisionEvent::getCdrSerializedSize(
|
||||||
return current_alignment - initial_alignment;
|
return current_alignment - initial_alignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
void carla_msgs::msg::CollisionEvent::serialize(
|
void carla_msgs::msg::CarlaCollisionEvent::serialize(
|
||||||
eprosima::fastcdr::Cdr& scdr) const
|
eprosima::fastcdr::Cdr& scdr) const
|
||||||
{
|
{
|
||||||
scdr << m_header;
|
scdr << m_header;
|
||||||
|
@ -130,7 +130,7 @@ void carla_msgs::msg::CollisionEvent::serialize(
|
||||||
scdr << m_normal_impulse;
|
scdr << m_normal_impulse;
|
||||||
}
|
}
|
||||||
|
|
||||||
void carla_msgs::msg::CollisionEvent::deserialize(
|
void carla_msgs::msg::CarlaCollisionEvent::deserialize(
|
||||||
eprosima::fastcdr::Cdr& dcdr)
|
eprosima::fastcdr::Cdr& dcdr)
|
||||||
{
|
{
|
||||||
dcdr >> m_header;
|
dcdr >> m_header;
|
||||||
|
@ -142,7 +142,7 @@ void carla_msgs::msg::CollisionEvent::deserialize(
|
||||||
* @brief This function copies the value in member header
|
* @brief This function copies the value in member header
|
||||||
* @param _header New value to be copied in member header
|
* @param _header New value to be copied in member header
|
||||||
*/
|
*/
|
||||||
void carla_msgs::msg::CollisionEvent::header(
|
void carla_msgs::msg::CarlaCollisionEvent::header(
|
||||||
const std_msgs::msg::Header& _header)
|
const std_msgs::msg::Header& _header)
|
||||||
{
|
{
|
||||||
m_header = _header;
|
m_header = _header;
|
||||||
|
@ -152,7 +152,7 @@ void carla_msgs::msg::CollisionEvent::header(
|
||||||
* @brief This function moves the value in member header
|
* @brief This function moves the value in member header
|
||||||
* @param _header New value to be moved in member header
|
* @param _header New value to be moved in member header
|
||||||
*/
|
*/
|
||||||
void carla_msgs::msg::CollisionEvent::header(
|
void carla_msgs::msg::CarlaCollisionEvent::header(
|
||||||
std_msgs::msg::Header&& _header)
|
std_msgs::msg::Header&& _header)
|
||||||
{
|
{
|
||||||
m_header = std::move(_header);
|
m_header = std::move(_header);
|
||||||
|
@ -162,7 +162,7 @@ void carla_msgs::msg::CollisionEvent::header(
|
||||||
* @brief This function returns a constant reference to member header
|
* @brief This function returns a constant reference to member header
|
||||||
* @return Constant reference to member header
|
* @return Constant reference to member header
|
||||||
*/
|
*/
|
||||||
const std_msgs::msg::Header& carla_msgs::msg::CollisionEvent::header() const
|
const std_msgs::msg::Header& carla_msgs::msg::CarlaCollisionEvent::header() const
|
||||||
{
|
{
|
||||||
return m_header;
|
return m_header;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ const std_msgs::msg::Header& carla_msgs::msg::CollisionEvent::header() const
|
||||||
* @brief This function returns a reference to member header
|
* @brief This function returns a reference to member header
|
||||||
* @return Reference to member header
|
* @return Reference to member header
|
||||||
*/
|
*/
|
||||||
std_msgs::msg::Header& carla_msgs::msg::CollisionEvent::header()
|
std_msgs::msg::Header& carla_msgs::msg::CarlaCollisionEvent::header()
|
||||||
{
|
{
|
||||||
return m_header;
|
return m_header;
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ std_msgs::msg::Header& carla_msgs::msg::CollisionEvent::header()
|
||||||
* @brief This function sets a value in member other_actor_id
|
* @brief This function sets a value in member other_actor_id
|
||||||
* @param _other_actor_id New value for member other_actor_id
|
* @param _other_actor_id New value for member other_actor_id
|
||||||
*/
|
*/
|
||||||
void carla_msgs::msg::CollisionEvent::other_actor_id(
|
void carla_msgs::msg::CarlaCollisionEvent::other_actor_id(
|
||||||
uint32_t _other_actor_id)
|
uint32_t _other_actor_id)
|
||||||
{
|
{
|
||||||
m_other_actor_id = _other_actor_id;
|
m_other_actor_id = _other_actor_id;
|
||||||
|
@ -190,7 +190,7 @@ void carla_msgs::msg::CollisionEvent::other_actor_id(
|
||||||
* @brief This function returns the value of member other_actor_id
|
* @brief This function returns the value of member other_actor_id
|
||||||
* @return Value of member other_actor_id
|
* @return Value of member other_actor_id
|
||||||
*/
|
*/
|
||||||
uint32_t carla_msgs::msg::CollisionEvent::other_actor_id() const
|
uint32_t carla_msgs::msg::CarlaCollisionEvent::other_actor_id() const
|
||||||
{
|
{
|
||||||
return m_other_actor_id;
|
return m_other_actor_id;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ uint32_t carla_msgs::msg::CollisionEvent::other_actor_id() const
|
||||||
* @brief This function returns a reference to member other_actor_id
|
* @brief This function returns a reference to member other_actor_id
|
||||||
* @return Reference to member other_actor_id
|
* @return Reference to member other_actor_id
|
||||||
*/
|
*/
|
||||||
uint32_t& carla_msgs::msg::CollisionEvent::other_actor_id()
|
uint32_t& carla_msgs::msg::CarlaCollisionEvent::other_actor_id()
|
||||||
{
|
{
|
||||||
return m_other_actor_id;
|
return m_other_actor_id;
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ uint32_t& carla_msgs::msg::CollisionEvent::other_actor_id()
|
||||||
* @brief This function copies the value in member normal_impulse
|
* @brief This function copies the value in member normal_impulse
|
||||||
* @param _normal_impulse New value to be copied in member normal_impulse
|
* @param _normal_impulse New value to be copied in member normal_impulse
|
||||||
*/
|
*/
|
||||||
void carla_msgs::msg::CollisionEvent::normal_impulse(
|
void carla_msgs::msg::CarlaCollisionEvent::normal_impulse(
|
||||||
const geometry_msgs::msg::Vector3& _normal_impulse)
|
const geometry_msgs::msg::Vector3& _normal_impulse)
|
||||||
{
|
{
|
||||||
m_normal_impulse = _normal_impulse;
|
m_normal_impulse = _normal_impulse;
|
||||||
|
@ -218,7 +218,7 @@ void carla_msgs::msg::CollisionEvent::normal_impulse(
|
||||||
* @brief This function moves the value in member normal_impulse
|
* @brief This function moves the value in member normal_impulse
|
||||||
* @param _normal_impulse New value to be moved in member normal_impulse
|
* @param _normal_impulse New value to be moved in member normal_impulse
|
||||||
*/
|
*/
|
||||||
void carla_msgs::msg::CollisionEvent::normal_impulse(
|
void carla_msgs::msg::CarlaCollisionEvent::normal_impulse(
|
||||||
geometry_msgs::msg::Vector3&& _normal_impulse)
|
geometry_msgs::msg::Vector3&& _normal_impulse)
|
||||||
{
|
{
|
||||||
m_normal_impulse = std::move(_normal_impulse);
|
m_normal_impulse = std::move(_normal_impulse);
|
||||||
|
@ -228,7 +228,7 @@ void carla_msgs::msg::CollisionEvent::normal_impulse(
|
||||||
* @brief This function returns a constant reference to member normal_impulse
|
* @brief This function returns a constant reference to member normal_impulse
|
||||||
* @return Constant reference to member normal_impulse
|
* @return Constant reference to member normal_impulse
|
||||||
*/
|
*/
|
||||||
const geometry_msgs::msg::Vector3& carla_msgs::msg::CollisionEvent::normal_impulse() const
|
const geometry_msgs::msg::Vector3& carla_msgs::msg::CarlaCollisionEvent::normal_impulse() const
|
||||||
{
|
{
|
||||||
return m_normal_impulse;
|
return m_normal_impulse;
|
||||||
}
|
}
|
||||||
|
@ -237,24 +237,24 @@ const geometry_msgs::msg::Vector3& carla_msgs::msg::CollisionEvent::normal_impul
|
||||||
* @brief This function returns a reference to member normal_impulse
|
* @brief This function returns a reference to member normal_impulse
|
||||||
* @return Reference to member normal_impulse
|
* @return Reference to member normal_impulse
|
||||||
*/
|
*/
|
||||||
geometry_msgs::msg::Vector3& carla_msgs::msg::CollisionEvent::normal_impulse()
|
geometry_msgs::msg::Vector3& carla_msgs::msg::CarlaCollisionEvent::normal_impulse()
|
||||||
{
|
{
|
||||||
return m_normal_impulse;
|
return m_normal_impulse;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t carla_msgs::msg::CollisionEvent::getKeyMaxCdrSerializedSize(
|
size_t carla_msgs::msg::CarlaCollisionEvent::getKeyMaxCdrSerializedSize(
|
||||||
size_t current_alignment)
|
size_t current_alignment)
|
||||||
{
|
{
|
||||||
static_cast<void>(current_alignment);
|
static_cast<void>(current_alignment);
|
||||||
return carla_msgs_msg_CollisionEvent_max_key_cdr_typesize;
|
return carla_msgs_msg_CarlaCollisionEvent_max_key_cdr_typesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool carla_msgs::msg::CollisionEvent::isKeyDefined()
|
bool carla_msgs::msg::CarlaCollisionEvent::isKeyDefined()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void carla_msgs::msg::CollisionEvent::serializeKey(
|
void carla_msgs::msg::CarlaCollisionEvent::serializeKey(
|
||||||
eprosima::fastcdr::Cdr& scdr) const
|
eprosima::fastcdr::Cdr& scdr) const
|
||||||
{
|
{
|
||||||
(void) scdr;
|
(void) scdr;
|
||||||
|
|
|
@ -68,64 +68,64 @@ class Cdr;
|
||||||
namespace carla_msgs {
|
namespace carla_msgs {
|
||||||
namespace msg {
|
namespace msg {
|
||||||
/*!
|
/*!
|
||||||
* @brief This class represents the structure CollisionEvent defined by the user in the IDL file.
|
* @brief This class represents the structure CarlaCollisionEvent defined by the user in the IDL file.
|
||||||
* @ingroup CARLACOLLISIONEVENT
|
* @ingroup CARLACOLLISIONEVENT
|
||||||
*/
|
*/
|
||||||
class CollisionEvent
|
class CarlaCollisionEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Default constructor.
|
* @brief Default constructor.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport CollisionEvent();
|
eProsima_user_DllExport CarlaCollisionEvent();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Default destructor.
|
* @brief Default destructor.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport ~CollisionEvent();
|
eProsima_user_DllExport ~CarlaCollisionEvent();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Copy constructor.
|
* @brief Copy constructor.
|
||||||
* @param x Reference to the object carla_msgs::msg::CollisionEvent that will be copied.
|
* @param x Reference to the object carla_msgs::msg::CarlaCollisionEvent that will be copied.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport CollisionEvent(
|
eProsima_user_DllExport CarlaCollisionEvent(
|
||||||
const CollisionEvent& x);
|
const CarlaCollisionEvent& x);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Move constructor.
|
* @brief Move constructor.
|
||||||
* @param x Reference to the object carla_msgs::msg::CollisionEvent that will be copied.
|
* @param x Reference to the object carla_msgs::msg::CarlaCollisionEvent that will be copied.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport CollisionEvent(
|
eProsima_user_DllExport CarlaCollisionEvent(
|
||||||
CollisionEvent&& x) noexcept;
|
CarlaCollisionEvent&& x) noexcept;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Copy assignment.
|
* @brief Copy assignment.
|
||||||
* @param x Reference to the object carla_msgs::msg::CollisionEvent that will be copied.
|
* @param x Reference to the object carla_msgs::msg::CarlaCollisionEvent that will be copied.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport CollisionEvent& operator =(
|
eProsima_user_DllExport CarlaCollisionEvent& operator =(
|
||||||
const CollisionEvent& x);
|
const CarlaCollisionEvent& x);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Move assignment.
|
* @brief Move assignment.
|
||||||
* @param x Reference to the object carla_msgs::msg::CollisionEvent that will be copied.
|
* @param x Reference to the object carla_msgs::msg::CarlaCollisionEvent that will be copied.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport CollisionEvent& operator =(
|
eProsima_user_DllExport CarlaCollisionEvent& operator =(
|
||||||
CollisionEvent&& x) noexcept;
|
CarlaCollisionEvent&& x) noexcept;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Comparison operator.
|
* @brief Comparison operator.
|
||||||
* @param x carla_msgs::msg::CollisionEvent object to compare.
|
* @param x carla_msgs::msg::CarlaCollisionEvent object to compare.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport bool operator ==(
|
eProsima_user_DllExport bool operator ==(
|
||||||
const CollisionEvent& x) const;
|
const CarlaCollisionEvent& x) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Comparison operator.
|
* @brief Comparison operator.
|
||||||
* @param x carla_msgs::msg::CollisionEvent object to compare.
|
* @param x carla_msgs::msg::CarlaCollisionEvent object to compare.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport bool operator !=(
|
eProsima_user_DllExport bool operator !=(
|
||||||
const CollisionEvent& x) const;
|
const CarlaCollisionEvent& x) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief This function copies the value in member header
|
* @brief This function copies the value in member header
|
||||||
|
@ -213,7 +213,7 @@ namespace carla_msgs {
|
||||||
* @return Serialized size.
|
* @return Serialized size.
|
||||||
*/
|
*/
|
||||||
eProsima_user_DllExport static size_t getCdrSerializedSize(
|
eProsima_user_DllExport static size_t getCdrSerializedSize(
|
||||||
const carla_msgs::msg::CollisionEvent& data,
|
const carla_msgs::msg::CarlaCollisionEvent& data,
|
||||||
size_t current_alignment = 0);
|
size_t current_alignment = 0);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -29,20 +29,20 @@ using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t;
|
||||||
|
|
||||||
namespace carla_msgs {
|
namespace carla_msgs {
|
||||||
namespace msg {
|
namespace msg {
|
||||||
CollisionEventPubSubType::CollisionEventPubSubType()
|
CarlaCollisionEventPubSubType::CarlaCollisionEventPubSubType()
|
||||||
{
|
{
|
||||||
setName("carla_msgs::msg::dds_::CollisionEvent_");
|
setName("carla_msgs::msg::dds_::CarlaCollisionEvent_");
|
||||||
auto type_size = CollisionEvent::getMaxCdrSerializedSize();
|
auto type_size = CarlaCollisionEvent::getMaxCdrSerializedSize();
|
||||||
type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */
|
type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */
|
||||||
m_typeSize = static_cast<uint32_t>(type_size) + 4; /*encapsulation*/
|
m_typeSize = static_cast<uint32_t>(type_size) + 4; /*encapsulation*/
|
||||||
m_isGetKeyDefined = CollisionEvent::isKeyDefined();
|
m_isGetKeyDefined = CarlaCollisionEvent::isKeyDefined();
|
||||||
size_t keyLength = CollisionEvent::getKeyMaxCdrSerializedSize() > 16 ?
|
size_t keyLength = CarlaCollisionEvent::getKeyMaxCdrSerializedSize() > 16 ?
|
||||||
CollisionEvent::getKeyMaxCdrSerializedSize() : 16;
|
CarlaCollisionEvent::getKeyMaxCdrSerializedSize() : 16;
|
||||||
m_keyBuffer = reinterpret_cast<unsigned char*>(malloc(keyLength));
|
m_keyBuffer = reinterpret_cast<unsigned char*>(malloc(keyLength));
|
||||||
memset(m_keyBuffer, 0, keyLength);
|
memset(m_keyBuffer, 0, keyLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
CollisionEventPubSubType::~CollisionEventPubSubType()
|
CarlaCollisionEventPubSubType::~CarlaCollisionEventPubSubType()
|
||||||
{
|
{
|
||||||
if (m_keyBuffer != nullptr)
|
if (m_keyBuffer != nullptr)
|
||||||
{
|
{
|
||||||
|
@ -50,11 +50,11 @@ namespace carla_msgs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CollisionEventPubSubType::serialize(
|
bool CarlaCollisionEventPubSubType::serialize(
|
||||||
void* data,
|
void* data,
|
||||||
SerializedPayload_t* payload)
|
SerializedPayload_t* payload)
|
||||||
{
|
{
|
||||||
CollisionEvent* p_type = static_cast<CollisionEvent*>(data);
|
CarlaCollisionEvent* p_type = static_cast<CarlaCollisionEvent*>(data);
|
||||||
|
|
||||||
// Object that manages the raw buffer.
|
// Object that manages the raw buffer.
|
||||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->max_size);
|
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->max_size);
|
||||||
|
@ -79,14 +79,14 @@ namespace carla_msgs {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CollisionEventPubSubType::deserialize(
|
bool CarlaCollisionEventPubSubType::deserialize(
|
||||||
SerializedPayload_t* payload,
|
SerializedPayload_t* payload,
|
||||||
void* data)
|
void* data)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Convert DATA to pointer of your type
|
//Convert DATA to pointer of your type
|
||||||
CollisionEvent* p_type = static_cast<CollisionEvent*>(data);
|
CarlaCollisionEvent* p_type = static_cast<CarlaCollisionEvent*>(data);
|
||||||
|
|
||||||
// Object that manages the raw buffer.
|
// Object that manages the raw buffer.
|
||||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->length);
|
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->length);
|
||||||
|
@ -109,28 +109,28 @@ namespace carla_msgs {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::function<uint32_t()> CollisionEventPubSubType::getSerializedSizeProvider(
|
std::function<uint32_t()> CarlaCollisionEventPubSubType::getSerializedSizeProvider(
|
||||||
void* data)
|
void* data)
|
||||||
{
|
{
|
||||||
return [data]() -> uint32_t
|
return [data]() -> uint32_t
|
||||||
{
|
{
|
||||||
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CollisionEvent*>(data))) +
|
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CarlaCollisionEvent*>(data))) +
|
||||||
4u /*encapsulation*/;
|
4u /*encapsulation*/;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void* CollisionEventPubSubType::createData()
|
void* CarlaCollisionEventPubSubType::createData()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(new CollisionEvent());
|
return reinterpret_cast<void*>(new CarlaCollisionEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollisionEventPubSubType::deleteData(
|
void CarlaCollisionEventPubSubType::deleteData(
|
||||||
void* data)
|
void* data)
|
||||||
{
|
{
|
||||||
delete(reinterpret_cast<CollisionEvent*>(data));
|
delete(reinterpret_cast<CarlaCollisionEvent*>(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CollisionEventPubSubType::getKey(
|
bool CarlaCollisionEventPubSubType::getKey(
|
||||||
void* data,
|
void* data,
|
||||||
InstanceHandle_t* handle,
|
InstanceHandle_t* handle,
|
||||||
bool force_md5)
|
bool force_md5)
|
||||||
|
@ -140,16 +140,16 @@ namespace carla_msgs {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CollisionEvent* p_type = static_cast<CollisionEvent*>(data);
|
CarlaCollisionEvent* p_type = static_cast<CarlaCollisionEvent*>(data);
|
||||||
|
|
||||||
// Object that manages the raw buffer.
|
// Object that manages the raw buffer.
|
||||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(m_keyBuffer),
|
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(m_keyBuffer),
|
||||||
CollisionEvent::getKeyMaxCdrSerializedSize());
|
CarlaCollisionEvent::getKeyMaxCdrSerializedSize());
|
||||||
|
|
||||||
// Object that serializes the data.
|
// Object that serializes the data.
|
||||||
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS);
|
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS);
|
||||||
p_type->serializeKey(ser);
|
p_type->serializeKey(ser);
|
||||||
if (force_md5 || CollisionEvent::getKeyMaxCdrSerializedSize() > 16)
|
if (force_md5 || CarlaCollisionEvent::getKeyMaxCdrSerializedSize() > 16)
|
||||||
{
|
{
|
||||||
m_md5.init();
|
m_md5.init();
|
||||||
m_md5.update(m_keyBuffer, static_cast<unsigned int>(ser.getSerializedDataLength()));
|
m_md5.update(m_keyBuffer, static_cast<unsigned int>(ser.getSerializedDataLength()));
|
||||||
|
|
|
@ -41,18 +41,18 @@ namespace carla_msgs
|
||||||
{
|
{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief This class represents the TopicDataType of the type CollisionEvent defined by the user in the IDL file.
|
* @brief This class represents the TopicDataType of the type CarlaCollisionEvent defined by the user in the IDL file.
|
||||||
* @ingroup CARLACOLLISIONEVENT
|
* @ingroup CARLACOLLISIONEVENT
|
||||||
*/
|
*/
|
||||||
class CollisionEventPubSubType : public eprosima::fastdds::dds::TopicDataType
|
class CarlaCollisionEventPubSubType : public eprosima::fastdds::dds::TopicDataType
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef CollisionEvent type;
|
typedef CarlaCollisionEvent type;
|
||||||
|
|
||||||
eProsima_user_DllExport CollisionEventPubSubType();
|
eProsima_user_DllExport CarlaCollisionEventPubSubType();
|
||||||
|
|
||||||
eProsima_user_DllExport virtual ~CollisionEventPubSubType() override;
|
eProsima_user_DllExport virtual ~CarlaCollisionEventPubSubType() override;
|
||||||
|
|
||||||
eProsima_user_DllExport virtual bool serialize(
|
eProsima_user_DllExport virtual bool serialize(
|
||||||
void* data,
|
void* data,
|
||||||
|
|
Loading…
Reference in New Issue