This class represents the structure CarlaEgoVehicleControl defined by the user in the IDL file. More...
#include <CarlaEgoVehicleControl.h>
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::Header & | header () const |
This function returns a constant reference to member header. More... | |
eProsima_user_DllExport std_msgs::msg::Header & | header () |
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 CarlaEgoVehicleControl & | operator= (const CarlaEgoVehicleControl &x) |
Copy assignment. More... | |
eProsima_user_DllExport CarlaEgoVehicleControl & | operator= (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 |
This class represents the structure CarlaEgoVehicleControl defined by the user in the IDL file.
Definition at line 72 of file CarlaEgoVehicleControl.h.
carla_msgs::msg::CarlaEgoVehicleControl::CarlaEgoVehicleControl | ( | ) |
Default constructor.
Definition at line 44 of file CarlaEgoVehicleControl.cpp.
carla_msgs::msg::CarlaEgoVehicleControl::~CarlaEgoVehicleControl | ( | ) |
Default destructor.
Definition at line 65 of file CarlaEgoVehicleControl.cpp.
carla_msgs::msg::CarlaEgoVehicleControl::CarlaEgoVehicleControl | ( | const CarlaEgoVehicleControl & | x | ) |
Copy constructor.
x | Reference 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.
|
noexcept |
Move constructor.
x | Reference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied. |
Definition at line 82 of file CarlaEgoVehicleControl.cpp.
void carla_msgs::msg::CarlaEgoVehicleControl::brake | ( | float | _brake | ) |
This function sets a value in member brake.
_brake | New value for member brake |
Definition at line 283 of file CarlaEgoVehicleControl.cpp.
Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().
float carla_msgs::msg::CarlaEgoVehicleControl::brake | ( | ) | const |
This function returns the value of member brake.
Definition at line 293 of file CarlaEgoVehicleControl.cpp.
float & carla_msgs::msg::CarlaEgoVehicleControl::brake | ( | ) |
This function returns a reference to member brake.
Definition at line 302 of file CarlaEgoVehicleControl.cpp.
void carla_msgs::msg::CarlaEgoVehicleControl::deserialize | ( | eprosima::fastcdr::Cdr & | cdr | ) |
This function deserializes an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 173 of file CarlaEgoVehicleControl.cpp.
Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::deserialize().
void carla_msgs::msg::CarlaEgoVehicleControl::gear | ( | int32_t | _gear | ) |
This function sets a value in member gear.
_gear | New value for member gear |
Definition at line 367 of file CarlaEgoVehicleControl.cpp.
Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().
int32_t carla_msgs::msg::CarlaEgoVehicleControl::gear | ( | ) | const |
This function returns the value of member gear.
Definition at line 377 of file CarlaEgoVehicleControl.cpp.
int32_t & carla_msgs::msg::CarlaEgoVehicleControl::gear | ( | ) |
This function returns a reference to member gear.
Definition at line 386 of file CarlaEgoVehicleControl.cpp.
|
static |
This function returns the serialized size of a data depending on the buffer alignment.
data | Data which is calculated its serialized size. |
current_alignment | Buffer alignment. |
Definition at line 144 of file CarlaEgoVehicleControl.cpp.
References std_msgs::msg::Header::getCdrSerializedSize(), and header().
Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::getSerializedSizeProvider().
|
static |
This function returns the maximum serialized size of the Key of an object depending on the buffer alignment.
current_alignment | Buffer alignment. |
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().
|
static |
This function returns the maximum serialized size of an object depending on the buffer alignment.
current_alignment | Buffer alignment. |
Definition at line 137 of file CarlaEgoVehicleControl.cpp.
References carla_msgs_msg_CarlaEgoVehicleControl_max_cdr_typesize.
Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::CarlaEgoVehicleControlPubSubType().
void carla_msgs::msg::CarlaEgoVehicleControl::hand_brake | ( | bool | _hand_brake | ) |
This function sets a value in member hand_brake.
_hand_brake | New value for member hand_brake |
Definition at line 311 of file CarlaEgoVehicleControl.cpp.
Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().
bool carla_msgs::msg::CarlaEgoVehicleControl::hand_brake | ( | ) | const |
This function returns the value of member hand_brake.
Definition at line 321 of file CarlaEgoVehicleControl.cpp.
bool & carla_msgs::msg::CarlaEgoVehicleControl::hand_brake | ( | ) |
This function returns a reference to member hand_brake.
Definition at line 330 of file CarlaEgoVehicleControl.cpp.
void carla_msgs::msg::CarlaEgoVehicleControl::header | ( | const std_msgs::msg::Header & | _header | ) |
This function copies the value in member header.
_header | New value to be copied in member header |
Definition at line 190 of file CarlaEgoVehicleControl.cpp.
Referenced by getCdrSerializedSize().
void carla_msgs::msg::CarlaEgoVehicleControl::header | ( | std_msgs::msg::Header && | _header | ) |
This function moves the value in member header.
_header | New value to be moved in member header |
Definition at line 200 of file CarlaEgoVehicleControl.cpp.
const std_msgs::msg::Header & carla_msgs::msg::CarlaEgoVehicleControl::header | ( | ) | const |
This function returns a constant reference to member header.
Definition at line 210 of file CarlaEgoVehicleControl.cpp.
std_msgs::msg::Header & carla_msgs::msg::CarlaEgoVehicleControl::header | ( | ) |
This function returns a reference to member header.
Definition at line 219 of file CarlaEgoVehicleControl.cpp.
|
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().
void carla_msgs::msg::CarlaEgoVehicleControl::manual_gear_shift | ( | bool | _manual_gear_shift | ) |
This function sets a value in member manual_gear_shift.
_manual_gear_shift | New value for member manual_gear_shift |
Definition at line 395 of file CarlaEgoVehicleControl.cpp.
Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().
bool carla_msgs::msg::CarlaEgoVehicleControl::manual_gear_shift | ( | ) | const |
This function returns the value of member manual_gear_shift.
Definition at line 405 of file CarlaEgoVehicleControl.cpp.
bool & carla_msgs::msg::CarlaEgoVehicleControl::manual_gear_shift | ( | ) |
This function returns a reference to member manual_gear_shift.
Definition at line 414 of file CarlaEgoVehicleControl.cpp.
bool carla_msgs::msg::CarlaEgoVehicleControl::operator!= | ( | const CarlaEgoVehicleControl & | x | ) | const |
Comparison operator.
x | carla_msgs::msg::CarlaEgoVehicleControl object to compare. |
Definition at line 131 of file CarlaEgoVehicleControl.cpp.
carla_msgs::msg::CarlaEgoVehicleControl & carla_msgs::msg::CarlaEgoVehicleControl::operator= | ( | const CarlaEgoVehicleControl & | x | ) |
Copy assignment.
x | Reference 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.
|
noexcept |
Move assignment.
x | Reference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied. |
Definition at line 110 of file CarlaEgoVehicleControl.cpp.
bool carla_msgs::msg::CarlaEgoVehicleControl::operator== | ( | const CarlaEgoVehicleControl & | x | ) | const |
Comparison operator.
x | carla_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.
void carla_msgs::msg::CarlaEgoVehicleControl::reverse | ( | bool | _reverse | ) |
This function sets a value in member reverse.
_reverse | New value for member reverse |
Definition at line 339 of file CarlaEgoVehicleControl.cpp.
Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().
bool carla_msgs::msg::CarlaEgoVehicleControl::reverse | ( | ) | const |
This function returns the value of member reverse.
Definition at line 349 of file CarlaEgoVehicleControl.cpp.
bool & carla_msgs::msg::CarlaEgoVehicleControl::reverse | ( | ) |
This function returns a reference to member reverse.
Definition at line 358 of file CarlaEgoVehicleControl.cpp.
void carla_msgs::msg::CarlaEgoVehicleControl::serialize | ( | eprosima::fastcdr::Cdr & | cdr | ) | const |
This function serializes an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 160 of file CarlaEgoVehicleControl.cpp.
Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::serialize().
void carla_msgs::msg::CarlaEgoVehicleControl::serializeKey | ( | eprosima::fastcdr::Cdr & | cdr | ) | const |
This function serializes the key members of an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 431 of file CarlaEgoVehicleControl.cpp.
Referenced by carla_msgs::msg::CarlaEgoVehicleControlPubSubType::getKey().
void carla_msgs::msg::CarlaEgoVehicleControl::steer | ( | float | _steer | ) |
This function sets a value in member steer.
_steer | New value for member steer |
Definition at line 255 of file CarlaEgoVehicleControl.cpp.
Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().
float carla_msgs::msg::CarlaEgoVehicleControl::steer | ( | ) | const |
This function returns the value of member steer.
Definition at line 265 of file CarlaEgoVehicleControl.cpp.
float & carla_msgs::msg::CarlaEgoVehicleControl::steer | ( | ) |
This function returns a reference to member steer.
Definition at line 274 of file CarlaEgoVehicleControl.cpp.
void carla_msgs::msg::CarlaEgoVehicleControl::throttle | ( | float | _throttle | ) |
This function sets a value in member throttle.
_throttle | New value for member throttle |
Definition at line 227 of file CarlaEgoVehicleControl.cpp.
Referenced by carla::ros2::CarlaSubscriberListenerImpl::on_data_available().
float carla_msgs::msg::CarlaEgoVehicleControl::throttle | ( | ) | const |
This function returns the value of member throttle.
Definition at line 237 of file CarlaEgoVehicleControl.cpp.
float & carla_msgs::msg::CarlaEgoVehicleControl::throttle | ( | ) |
This function returns a reference to member throttle.
Definition at line 246 of file CarlaEgoVehicleControl.cpp.
|
private |
Definition at line 344 of file CarlaEgoVehicleControl.h.
Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().
|
private |
Definition at line 347 of file CarlaEgoVehicleControl.h.
Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().
|
private |
Definition at line 345 of file CarlaEgoVehicleControl.h.
Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().
|
private |
Definition at line 341 of file CarlaEgoVehicleControl.h.
Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().
|
private |
Definition at line 348 of file CarlaEgoVehicleControl.h.
Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().
|
private |
Definition at line 346 of file CarlaEgoVehicleControl.h.
Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().
|
private |
Definition at line 343 of file CarlaEgoVehicleControl.h.
Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().
|
private |
Definition at line 342 of file CarlaEgoVehicleControl.h.
Referenced by CarlaEgoVehicleControl(), operator=(), and operator==().