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

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

#include <Time.h>

+ Collaboration diagram for builtin_interfaces::msg::Time:

Public Member Functions

eProsima_user_DllExport void deserialize (eprosima::fastcdr::Cdr &cdr)
 This function deserializes an object using CDR serialization. More...
 
eProsima_user_DllExport void nanosec (uint32_t _nanosec)
 This function sets a value in member nanosec. More...
 
eProsima_user_DllExport uint32_t nanosec () const
 This function returns the value of member nanosec. More...
 
eProsima_user_DllExport uint32_t & nanosec ()
 This function returns a reference to member nanosec. More...
 
eProsima_user_DllExport bool operator!= (const Time &x) const
 Comparison operator. More...
 
eProsima_user_DllExport Timeoperator= (const Time &x)
 Copy assignment. More...
 
eProsima_user_DllExport Timeoperator= (Time &&x) noexcept
 Move assignment. More...
 
eProsima_user_DllExport bool operator== (const Time &x) const
 Comparison operator. More...
 
eProsima_user_DllExport void sec (int32_t _sec)
 This function sets a value in member sec. More...
 
eProsima_user_DllExport int32_t sec () const
 This function returns the value of member sec. More...
 
eProsima_user_DllExport int32_t & sec ()
 This function returns a reference to member sec. 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 Time ()
 Default constructor. More...
 
eProsima_user_DllExport Time (const Time &x)
 Copy constructor. More...
 
eProsima_user_DllExport Time (Time &&x) noexcept
 Move constructor. More...
 
eProsima_user_DllExport ~Time ()
 Default destructor. More...
 

Static Public Member Functions

static eProsima_user_DllExport size_t getCdrSerializedSize (const builtin_interfaces::msg::Time &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

uint32_t m_nanosec
 
int32_t m_sec
 

Detailed Description

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

Definition at line 71 of file ros2/types/Time.h.

Constructor & Destructor Documentation

◆ Time() [1/3]

builtin_interfaces::msg::Time::Time ( )

Default constructor.

Definition at line 40 of file Time.cpp.

◆ ~Time()

builtin_interfaces::msg::Time::~Time ( )

Default destructor.

Definition at line 48 of file Time.cpp.

◆ Time() [2/3]

builtin_interfaces::msg::Time::Time ( const Time x)

Copy constructor.

Parameters
xReference to the object builtin_interfaces::msg::Time that will be copied.

Definition at line 52 of file Time.cpp.

References m_nanosec, and m_sec.

◆ Time() [3/3]

builtin_interfaces::msg::Time::Time ( Time &&  x)
noexcept

Move constructor.

Parameters
xReference to the object builtin_interfaces::msg::Time that will be copied.

Definition at line 59 of file Time.cpp.

Member Function Documentation

◆ deserialize()

void builtin_interfaces::msg::Time::deserialize ( eprosima::fastcdr::Cdr &  cdr)

This function deserializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 122 of file Time.cpp.

Referenced by builtin_interfaces::msg::TimePubSubType::deserialize().

+ Here is the caller graph for this function:

◆ getCdrSerializedSize()

size_t builtin_interfaces::msg::Time::getCdrSerializedSize ( const builtin_interfaces::msg::Time 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 103 of file Time.cpp.

Referenced by rosgraph::msg::Clock::getCdrSerializedSize(), std_msgs::msg::Header::getCdrSerializedSize(), and builtin_interfaces::msg::TimePubSubType::getSerializedSizeProvider().

+ Here is the caller graph for this function:

◆ getKeyMaxCdrSerializedSize()

size_t builtin_interfaces::msg::Time::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 185 of file Time.cpp.

References builtin_interfaces_msg_Time_max_key_cdr_typesize.

Referenced by builtin_interfaces::msg::TimePubSubType::getKey(), and builtin_interfaces::msg::TimePubSubType::TimePubSubType().

+ Here is the caller graph for this function:

◆ getMaxCdrSerializedSize()

size_t builtin_interfaces::msg::Time::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 96 of file Time.cpp.

References builtin_interfaces_msg_Time_max_cdr_typesize.

Referenced by builtin_interfaces::msg::TimePubSubType::TimePubSubType().

+ Here is the caller graph for this function:

◆ isKeyDefined()

bool builtin_interfaces::msg::Time::isKeyDefined ( )
static

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

Definition at line 192 of file Time.cpp.

Referenced by builtin_interfaces::msg::TimePubSubType::TimePubSubType().

+ Here is the caller graph for this function:

◆ nanosec() [1/3]

void builtin_interfaces::msg::Time::nanosec ( uint32_t  _nanosec)

◆ nanosec() [2/3]

uint32_t builtin_interfaces::msg::Time::nanosec ( ) const

This function returns the value of member nanosec.

Returns
Value of member nanosec

Definition at line 171 of file Time.cpp.

◆ nanosec() [3/3]

uint32_t & builtin_interfaces::msg::Time::nanosec ( )

This function returns a reference to member nanosec.

Returns
Reference to member nanosec

Definition at line 180 of file Time.cpp.

◆ operator!=()

bool builtin_interfaces::msg::Time::operator!= ( const Time x) const

Comparison operator.

Parameters
xbuiltin_interfaces::msg::Time object to compare.

Definition at line 90 of file Time.cpp.

◆ operator=() [1/2]

builtin_interfaces::msg::Time & builtin_interfaces::msg::Time::operator= ( const Time x)

Copy assignment.

Parameters
xReference to the object builtin_interfaces::msg::Time that will be copied.

Definition at line 66 of file Time.cpp.

References m_nanosec, and m_sec.

◆ operator=() [2/2]

builtin_interfaces::msg::Time & builtin_interfaces::msg::Time::operator= ( Time &&  x)
noexcept

Move assignment.

Parameters
xReference to the object builtin_interfaces::msg::Time that will be copied.

Definition at line 75 of file Time.cpp.

References m_sec.

◆ operator==()

bool builtin_interfaces::msg::Time::operator== ( const Time x) const

Comparison operator.

Parameters
xbuiltin_interfaces::msg::Time object to compare.

Definition at line 84 of file Time.cpp.

References m_nanosec, and m_sec.

◆ sec() [1/3]

void builtin_interfaces::msg::Time::sec ( int32_t  _sec)

◆ sec() [2/3]

int32_t builtin_interfaces::msg::Time::sec ( ) const

This function returns the value of member sec.

Returns
Value of member sec

Definition at line 143 of file Time.cpp.

◆ sec() [3/3]

int32_t & builtin_interfaces::msg::Time::sec ( )

This function returns a reference to member sec.

Returns
Reference to member sec

Definition at line 152 of file Time.cpp.

◆ serialize()

void builtin_interfaces::msg::Time::serialize ( eprosima::fastcdr::Cdr &  cdr) const

This function serializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 115 of file Time.cpp.

Referenced by builtin_interfaces::msg::TimePubSubType::serialize().

+ Here is the caller graph for this function:

◆ serializeKey()

void builtin_interfaces::msg::Time::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 197 of file Time.cpp.

Referenced by builtin_interfaces::msg::TimePubSubType::getKey().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_nanosec

uint32_t builtin_interfaces::msg::Time::m_nanosec
private

Definition at line 221 of file ros2/types/Time.h.

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

◆ m_sec

int32_t builtin_interfaces::msg::Time::m_sec
private

Definition at line 220 of file ros2/types/Time.h.

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


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