CARLA
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
carla_msgs::msg::CarlaEgoVehicleControl Class Reference

This class represents the structure CarlaEgoVehicleControl defined by the user in the IDL file. More...

#include <CarlaEgoVehicleControl.h>

+ Collaboration diagram for carla_msgs::msg::CarlaEgoVehicleControl:

Public Member Functions

eProsima_user_DllExport void brake (float _brake)
 This function sets a value in member brake. More...
 
eProsima_user_DllExport float brake () const
 This function returns the value of member brake. More...
 
eProsima_user_DllExport float & brake ()
 This function returns a reference to member brake. More...
 
eProsima_user_DllExport CarlaEgoVehicleControl ()
 Default constructor. More...
 
eProsima_user_DllExport CarlaEgoVehicleControl (const CarlaEgoVehicleControl &x)
 Copy constructor. More...
 
eProsima_user_DllExport CarlaEgoVehicleControl (CarlaEgoVehicleControl &&x) noexcept
 Move constructor. More...
 
eProsima_user_DllExport void deserialize (eprosima::fastcdr::Cdr &cdr)
 This function deserializes an object using CDR serialization. More...
 
eProsima_user_DllExport void gear (int32_t _gear)
 This function sets a value in member gear. More...
 
eProsima_user_DllExport int32_t gear () const
 This function returns the value of member gear. More...
 
eProsima_user_DllExport int32_t & gear ()
 This function returns a reference to member gear. More...
 
eProsima_user_DllExport void hand_brake (bool _hand_brake)
 This function sets a value in member hand_brake. More...
 
eProsima_user_DllExport bool hand_brake () const
 This function returns the value of member hand_brake. More...
 
eProsima_user_DllExport bool & hand_brake ()
 This function returns a reference to member hand_brake. More...
 
eProsima_user_DllExport void header (const std_msgs::msg::Header &_header)
 This function copies the value in member header. More...
 
eProsima_user_DllExport void header (std_msgs::msg::Header &&_header)
 This function moves the value in member header. More...
 
eProsima_user_DllExport const std_msgs::msg::Headerheader () const
 This function returns a constant reference to member header. More...
 
eProsima_user_DllExport std_msgs::msg::Headerheader ()
 This function returns a reference to member header. More...
 
eProsima_user_DllExport void manual_gear_shift (bool _manual_gear_shift)
 This function sets a value in member manual_gear_shift. More...
 
eProsima_user_DllExport bool manual_gear_shift () const
 This function returns the value of member manual_gear_shift. More...
 
eProsima_user_DllExport bool & manual_gear_shift ()
 This function returns a reference to member manual_gear_shift. More...
 
eProsima_user_DllExport bool operator!= (const CarlaEgoVehicleControl &x) const
 Comparison operator. More...
 
eProsima_user_DllExport CarlaEgoVehicleControloperator= (const CarlaEgoVehicleControl &x)
 Copy assignment. More...
 
eProsima_user_DllExport CarlaEgoVehicleControloperator= (CarlaEgoVehicleControl &&x) noexcept
 Move assignment. More...
 
eProsima_user_DllExport bool operator== (const CarlaEgoVehicleControl &x) const
 Comparison operator. More...
 
eProsima_user_DllExport void reverse (bool _reverse)
 This function sets a value in member reverse. More...
 
eProsima_user_DllExport bool reverse () const
 This function returns the value of member reverse. More...
 
eProsima_user_DllExport bool & reverse ()
 This function returns a reference to member reverse. More...
 
eProsima_user_DllExport void serialize (eprosima::fastcdr::Cdr &cdr) const
 This function serializes an object using CDR serialization. More...
 
eProsima_user_DllExport void serializeKey (eprosima::fastcdr::Cdr &cdr) const
 This function serializes the key members of an object using CDR serialization. More...
 
eProsima_user_DllExport void steer (float _steer)
 This function sets a value in member steer. More...
 
eProsima_user_DllExport float steer () const
 This function returns the value of member steer. More...
 
eProsima_user_DllExport float & steer ()
 This function returns a reference to member steer. More...
 
eProsima_user_DllExport void throttle (float _throttle)
 This function sets a value in member throttle. More...
 
eProsima_user_DllExport float throttle () const
 This function returns the value of member throttle. More...
 
eProsima_user_DllExport float & throttle ()
 This function returns a reference to member throttle. More...
 
eProsima_user_DllExport ~CarlaEgoVehicleControl ()
 Default destructor. More...
 

Static Public Member Functions

static eProsima_user_DllExport size_t getCdrSerializedSize (const carla_msgs::msg::CarlaEgoVehicleControl &data, size_t current_alignment=0)
 This function returns the serialized size of a data depending on the buffer alignment. More...
 
static eProsima_user_DllExport size_t getKeyMaxCdrSerializedSize (size_t current_alignment=0)
 This function returns the maximum serialized size of the Key of an object depending on the buffer alignment. More...
 
static eProsima_user_DllExport size_t getMaxCdrSerializedSize (size_t current_alignment=0)
 This function returns the maximum serialized size of an object depending on the buffer alignment. More...
 
static eProsima_user_DllExport bool isKeyDefined ()
 This function tells you if the Key has been defined for this type. More...
 

Private Attributes

float m_brake
 
int32_t m_gear
 
bool m_hand_brake
 
std_msgs::msg::Header m_header
 
bool m_manual_gear_shift
 
bool m_reverse
 
float m_steer
 
float m_throttle
 

Detailed Description

This class represents the structure CarlaEgoVehicleControl defined by the user in the IDL file.

Definition at line 72 of file CarlaEgoVehicleControl.h.

Constructor & Destructor Documentation

◆ CarlaEgoVehicleControl() [1/3]

carla_msgs::msg::CarlaEgoVehicleControl::CarlaEgoVehicleControl ( )

Default constructor.

Definition at line 44 of file CarlaEgoVehicleControl.cpp.

◆ ~CarlaEgoVehicleControl()

carla_msgs::msg::CarlaEgoVehicleControl::~CarlaEgoVehicleControl ( )

Default destructor.

Definition at line 65 of file CarlaEgoVehicleControl.cpp.

◆ CarlaEgoVehicleControl() [2/3]

carla_msgs::msg::CarlaEgoVehicleControl::CarlaEgoVehicleControl ( const CarlaEgoVehicleControl x)

Copy constructor.

Parameters
xReference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied.

Definition at line 69 of file CarlaEgoVehicleControl.cpp.

References m_brake, m_gear, m_hand_brake, m_header, m_manual_gear_shift, m_reverse, m_steer, and m_throttle.

◆ CarlaEgoVehicleControl() [3/3]

carla_msgs::msg::CarlaEgoVehicleControl::CarlaEgoVehicleControl ( CarlaEgoVehicleControl &&  x)
noexcept

Move constructor.

Parameters
xReference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied.

Definition at line 82 of file CarlaEgoVehicleControl.cpp.

Member Function Documentation

◆ brake() [1/3]

void carla_msgs::msg::CarlaEgoVehicleControl::brake ( float  _brake)

This function sets a value in member brake.

Parameters
_brakeNew value for member brake

Definition at line 283 of file CarlaEgoVehicleControl.cpp.

Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().

+ Here is the caller graph for this function:

◆ brake() [2/3]

float carla_msgs::msg::CarlaEgoVehicleControl::brake ( ) const

This function returns the value of member brake.

Returns
Value of member brake

Definition at line 293 of file CarlaEgoVehicleControl.cpp.

◆ brake() [3/3]

float & carla_msgs::msg::CarlaEgoVehicleControl::brake ( )

This function returns a reference to member brake.

Returns
Reference to member brake

Definition at line 302 of file CarlaEgoVehicleControl.cpp.

◆ deserialize()

void carla_msgs::msg::CarlaEgoVehicleControl::deserialize ( eprosima::fastcdr::Cdr &  cdr)

This function deserializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 173 of file CarlaEgoVehicleControl.cpp.

Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::deserialize().

+ Here is the caller graph for this function:

◆ gear() [1/3]

void carla_msgs::msg::CarlaEgoVehicleControl::gear ( int32_t  _gear)

This function sets a value in member gear.

Parameters
_gearNew value for member gear

Definition at line 367 of file CarlaEgoVehicleControl.cpp.

Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().

+ Here is the caller graph for this function:

◆ gear() [2/3]

int32_t carla_msgs::msg::CarlaEgoVehicleControl::gear ( ) const

This function returns the value of member gear.

Returns
Value of member gear

Definition at line 377 of file CarlaEgoVehicleControl.cpp.

◆ gear() [3/3]

int32_t & carla_msgs::msg::CarlaEgoVehicleControl::gear ( )

This function returns a reference to member gear.

Returns
Reference to member gear

Definition at line 386 of file CarlaEgoVehicleControl.cpp.

◆ getCdrSerializedSize()

size_t carla_msgs::msg::CarlaEgoVehicleControl::getCdrSerializedSize ( const carla_msgs::msg::CarlaEgoVehicleControl data,
size_t  current_alignment = 0 
)
static

This function returns the serialized size of a data depending on the buffer alignment.

Parameters
dataData which is calculated its serialized size.
current_alignmentBuffer alignment.
Returns
Serialized size.

Definition at line 144 of file CarlaEgoVehicleControl.cpp.

References std_msgs::msg::Header::getCdrSerializedSize(), and header().

Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::getSerializedSizeProvider().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getKeyMaxCdrSerializedSize()

size_t carla_msgs::msg::CarlaEgoVehicleControl::getKeyMaxCdrSerializedSize ( size_t  current_alignment = 0)
static

This function returns the maximum serialized size of the Key of an object depending on the buffer alignment.

Parameters
current_alignmentBuffer alignment.
Returns
Maximum serialized size.

Definition at line 419 of file CarlaEgoVehicleControl.cpp.

References carla_msgs_msg_CarlaEgoVehicleControl_max_key_cdr_typesize.

Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::CarlaEgoVehicleControlPubSubType(), and carla_msgs::msg::CarlaEgoVehicleControlPubSubType::getKey().

+ Here is the caller graph for this function:

◆ getMaxCdrSerializedSize()

size_t carla_msgs::msg::CarlaEgoVehicleControl::getMaxCdrSerializedSize ( size_t  current_alignment = 0)
static

This function returns the maximum serialized size of an object depending on the buffer alignment.

Parameters
current_alignmentBuffer alignment.
Returns
Maximum serialized size.

Definition at line 137 of file CarlaEgoVehicleControl.cpp.

References carla_msgs_msg_CarlaEgoVehicleControl_max_cdr_typesize.

Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::CarlaEgoVehicleControlPubSubType().

+ Here is the caller graph for this function:

◆ hand_brake() [1/3]

void carla_msgs::msg::CarlaEgoVehicleControl::hand_brake ( bool  _hand_brake)

This function sets a value in member hand_brake.

Parameters
_hand_brakeNew value for member hand_brake

Definition at line 311 of file CarlaEgoVehicleControl.cpp.

Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().

+ Here is the caller graph for this function:

◆ hand_brake() [2/3]

bool carla_msgs::msg::CarlaEgoVehicleControl::hand_brake ( ) const

This function returns the value of member hand_brake.

Returns
Value of member hand_brake

Definition at line 321 of file CarlaEgoVehicleControl.cpp.

◆ hand_brake() [3/3]

bool & carla_msgs::msg::CarlaEgoVehicleControl::hand_brake ( )

This function returns a reference to member hand_brake.

Returns
Reference to member hand_brake

Definition at line 330 of file CarlaEgoVehicleControl.cpp.

◆ header() [1/4]

void carla_msgs::msg::CarlaEgoVehicleControl::header ( const std_msgs::msg::Header _header)

This function copies the value in member header.

Parameters
_headerNew value to be copied in member header

Definition at line 190 of file CarlaEgoVehicleControl.cpp.

Referenced by getCdrSerializedSize().

+ Here is the caller graph for this function:

◆ header() [2/4]

void carla_msgs::msg::CarlaEgoVehicleControl::header ( std_msgs::msg::Header &&  _header)

This function moves the value in member header.

Parameters
_headerNew value to be moved in member header

Definition at line 200 of file CarlaEgoVehicleControl.cpp.

◆ header() [3/4]

const std_msgs::msg::Header & carla_msgs::msg::CarlaEgoVehicleControl::header ( ) const

This function returns a constant reference to member header.

Returns
Constant reference to member header

Definition at line 210 of file CarlaEgoVehicleControl.cpp.

◆ header() [4/4]

std_msgs::msg::Header & carla_msgs::msg::CarlaEgoVehicleControl::header ( )

This function returns a reference to member header.

Returns
Reference to member header

Definition at line 219 of file CarlaEgoVehicleControl.cpp.

◆ isKeyDefined()

bool carla_msgs::msg::CarlaEgoVehicleControl::isKeyDefined ( )
static

This function tells you if the Key has been defined for this type.

Definition at line 426 of file CarlaEgoVehicleControl.cpp.

Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::CarlaEgoVehicleControlPubSubType().

+ Here is the caller graph for this function:

◆ manual_gear_shift() [1/3]

void carla_msgs::msg::CarlaEgoVehicleControl::manual_gear_shift ( bool  _manual_gear_shift)

This function sets a value in member manual_gear_shift.

Parameters
_manual_gear_shiftNew value for member manual_gear_shift

Definition at line 395 of file CarlaEgoVehicleControl.cpp.

Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().

+ Here is the caller graph for this function:

◆ manual_gear_shift() [2/3]

bool carla_msgs::msg::CarlaEgoVehicleControl::manual_gear_shift ( ) const

This function returns the value of member manual_gear_shift.

Returns
Value of member manual_gear_shift

Definition at line 405 of file CarlaEgoVehicleControl.cpp.

◆ manual_gear_shift() [3/3]

bool & carla_msgs::msg::CarlaEgoVehicleControl::manual_gear_shift ( )

This function returns a reference to member manual_gear_shift.

Returns
Reference to member manual_gear_shift

Definition at line 414 of file CarlaEgoVehicleControl.cpp.

◆ operator!=()

bool carla_msgs::msg::CarlaEgoVehicleControl::operator!= ( const CarlaEgoVehicleControl x) const

Comparison operator.

Parameters
xcarla_msgs::msg::CarlaEgoVehicleControl object to compare.

Definition at line 131 of file CarlaEgoVehicleControl.cpp.

◆ operator=() [1/2]

carla_msgs::msg::CarlaEgoVehicleControl & carla_msgs::msg::CarlaEgoVehicleControl::operator= ( const CarlaEgoVehicleControl x)

Copy assignment.

Parameters
xReference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied.

Definition at line 95 of file CarlaEgoVehicleControl.cpp.

References m_brake, m_gear, m_hand_brake, m_header, m_manual_gear_shift, m_reverse, m_steer, and m_throttle.

◆ operator=() [2/2]

carla_msgs::msg::CarlaEgoVehicleControl & carla_msgs::msg::CarlaEgoVehicleControl::operator= ( CarlaEgoVehicleControl &&  x)
noexcept

Move assignment.

Parameters
xReference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied.

Definition at line 110 of file CarlaEgoVehicleControl.cpp.

◆ operator==()

bool carla_msgs::msg::CarlaEgoVehicleControl::operator== ( const CarlaEgoVehicleControl x) const

Comparison operator.

Parameters
xcarla_msgs::msg::CarlaEgoVehicleControl object to compare.

Definition at line 125 of file CarlaEgoVehicleControl.cpp.

References m_brake, m_gear, m_hand_brake, m_header, m_manual_gear_shift, m_reverse, m_steer, and m_throttle.

◆ reverse() [1/3]

void carla_msgs::msg::CarlaEgoVehicleControl::reverse ( bool  _reverse)

This function sets a value in member reverse.

Parameters
_reverseNew value for member reverse

Definition at line 339 of file CarlaEgoVehicleControl.cpp.

Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().

+ Here is the caller graph for this function:

◆ reverse() [2/3]

bool carla_msgs::msg::CarlaEgoVehicleControl::reverse ( ) const

This function returns the value of member reverse.

Returns
Value of member reverse

Definition at line 349 of file CarlaEgoVehicleControl.cpp.

◆ reverse() [3/3]

bool & carla_msgs::msg::CarlaEgoVehicleControl::reverse ( )

This function returns a reference to member reverse.

Returns
Reference to member reverse

Definition at line 358 of file CarlaEgoVehicleControl.cpp.

◆ serialize()

void carla_msgs::msg::CarlaEgoVehicleControl::serialize ( eprosima::fastcdr::Cdr &  cdr) const

This function serializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 160 of file CarlaEgoVehicleControl.cpp.

Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::serialize().

+ Here is the caller graph for this function:

◆ serializeKey()

void carla_msgs::msg::CarlaEgoVehicleControl::serializeKey ( eprosima::fastcdr::Cdr &  cdr) const

This function serializes the key members of an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 431 of file CarlaEgoVehicleControl.cpp.

Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::getKey().

+ Here is the caller graph for this function:

◆ steer() [1/3]

void carla_msgs::msg::CarlaEgoVehicleControl::steer ( float  _steer)

This function sets a value in member steer.

Parameters
_steerNew value for member steer

Definition at line 255 of file CarlaEgoVehicleControl.cpp.

Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().

+ Here is the caller graph for this function:

◆ steer() [2/3]

float carla_msgs::msg::CarlaEgoVehicleControl::steer ( ) const

This function returns the value of member steer.

Returns
Value of member steer

Definition at line 265 of file CarlaEgoVehicleControl.cpp.

◆ steer() [3/3]

float & carla_msgs::msg::CarlaEgoVehicleControl::steer ( )

This function returns a reference to member steer.

Returns
Reference to member steer

Definition at line 274 of file CarlaEgoVehicleControl.cpp.

◆ throttle() [1/3]

void carla_msgs::msg::CarlaEgoVehicleControl::throttle ( float  _throttle)

This function sets a value in member throttle.

Parameters
_throttleNew value for member throttle

Definition at line 227 of file CarlaEgoVehicleControl.cpp.

Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().

+ Here is the caller graph for this function:

◆ throttle() [2/3]

float carla_msgs::msg::CarlaEgoVehicleControl::throttle ( ) const

This function returns the value of member throttle.

Returns
Value of member throttle

Definition at line 237 of file CarlaEgoVehicleControl.cpp.

◆ throttle() [3/3]

float & carla_msgs::msg::CarlaEgoVehicleControl::throttle ( )

This function returns a reference to member throttle.

Returns
Reference to member throttle

Definition at line 246 of file CarlaEgoVehicleControl.cpp.

Member Data Documentation

◆ m_brake

float carla_msgs::msg::CarlaEgoVehicleControl::m_brake
private

Definition at line 344 of file CarlaEgoVehicleControl.h.

Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().

◆ m_gear

int32_t carla_msgs::msg::CarlaEgoVehicleControl::m_gear
private

Definition at line 347 of file CarlaEgoVehicleControl.h.

Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().

◆ m_hand_brake

bool carla_msgs::msg::CarlaEgoVehicleControl::m_hand_brake
private

Definition at line 345 of file CarlaEgoVehicleControl.h.

Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().

◆ m_header

std_msgs::msg::Header carla_msgs::msg::CarlaEgoVehicleControl::m_header
private

Definition at line 341 of file CarlaEgoVehicleControl.h.

Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().

◆ m_manual_gear_shift

bool carla_msgs::msg::CarlaEgoVehicleControl::m_manual_gear_shift
private

Definition at line 348 of file CarlaEgoVehicleControl.h.

Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().

◆ m_reverse

bool carla_msgs::msg::CarlaEgoVehicleControl::m_reverse
private

Definition at line 346 of file CarlaEgoVehicleControl.h.

Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().

◆ m_steer

float carla_msgs::msg::CarlaEgoVehicleControl::m_steer
private

Definition at line 343 of file CarlaEgoVehicleControl.h.

Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().

◆ m_throttle

float carla_msgs::msg::CarlaEgoVehicleControl::m_throttle
private

Definition at line 342 of file CarlaEgoVehicleControl.h.

Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().


The documentation for this class was generated from the following files: