CARLA
 
载入中...
搜索中...
未找到
NavSatStatus.cpp
浏览该文件的文档.
1// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/*!
16 * @file NavSatStatus.cpp
17 * This source file contains the definition of the described types in the IDL file.
18 *
19 * This file was generated by the tool gen.
20 */
21
22#ifdef _WIN32
23// Remove linker warning LNK4221 on Visual Studio
24namespace {
25char dummy;
26} // namespace
27#endif // _WIN32
28
29#include "NavSatStatus.h"
30#include <fastcdr/Cdr.h>
31
32#include <fastcdr/exceptions/BadParamException.h>
33using namespace eprosima::fastcdr::exception;
34
35#include <utility>
36
37#define sensor_msgs_msg_NavSatStatus_max_cdr_typesize 4ULL;
38#define sensor_msgs_msg_NavSatStatus_max_key_cdr_typesize 0ULL;
39
41{
42 // octet m_status
43 m_status = 0;
44 // unsigned short m_service
45 m_service = 0;
46}
47
51
53 const NavSatStatus& x)
54{
55 m_status = x.m_status;
56 m_service = x.m_service;
57}
58
60 NavSatStatus&& x) noexcept
61{
62 m_status = x.m_status;
63 m_service = x.m_service;
64}
65
67 const NavSatStatus& x)
68{
69 m_status = x.m_status;
70 m_service = x.m_service;
71
72 return *this;
73}
74
76 NavSatStatus&& x) noexcept
77{
78 m_status = x.m_status;
79 m_service = x.m_service;
80
81 return *this;
82}
83
85 const NavSatStatus& x) const
86{
87 return (m_status == x.m_status && m_service == x.m_service);
88}
89
91 const NavSatStatus& x) const
92{
93 return !(*this == x);
94}
95
97 size_t current_alignment)
98{
99 static_cast<void>(current_alignment);
101}
102
105 size_t current_alignment)
106{
107 (void)data;
108 size_t initial_alignment = current_alignment;
109 current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1);
110 current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2);
111
112 return current_alignment - initial_alignment;
113}
114
116 eprosima::fastcdr::Cdr& scdr) const
117{
118 scdr << m_status;
119 scdr << m_service;
120}
121
123 eprosima::fastcdr::Cdr& dcdr)
124{
125 dcdr >> m_status;
126 dcdr >> m_service;
127}
128
129/*!
130 * @brief This function sets a value in member status
131 * @param _status New value for member status
132 */
134 uint8_t _status)
135{
136 m_status = _status;
137}
138
139/*!
140 * @brief This function returns the value of member status
141 * @return Value of member status
142 */
144{
145 return m_status;
146}
147
148/*!
149 * @brief This function returns a reference to member status
150 * @return Reference to member status
151 */
153{
154 return m_status;
155}
156
157/*!
158 * @brief This function sets a value in member service
159 * @param _service New value for member service
160 */
162 uint16_t _service)
163{
164 m_service = _service;
165}
166
167/*!
168 * @brief This function returns the value of member service
169 * @return Value of member service
170 */
172{
173 return m_service;
174}
175
176/*!
177 * @brief This function returns a reference to member service
178 * @return Reference to member service
179 */
181{
182 return m_service;
183}
184
186 size_t current_alignment)
187{
188 static_cast<void>(current_alignment);
190}
191
193{
194 return false;
195}
196
198 eprosima::fastcdr::Cdr& scdr) const
199{
200 (void) scdr;
201}
#define sensor_msgs_msg_NavSatStatus_max_cdr_typesize
Definition NavSatFix.cpp:38
#define sensor_msgs_msg_NavSatStatus_max_key_cdr_typesize
Definition NavSatFix.cpp:43
This class represents the structure NavSatStatus defined by the user in the IDL file.
eProsima_user_DllExport NavSatStatus & operator=(const NavSatStatus &x)
Copy assignment.
eProsima_user_DllExport bool operator==(const NavSatStatus &x) const
Comparison operator.
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 ali...
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
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.
eProsima_user_DllExport NavSatStatus()
Default constructor.
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
static eProsima_user_DllExport bool isKeyDefined()
This function tells you if the Key has been defined for this type
eProsima_user_DllExport uint8_t status() const
This function returns the value of member status
eProsima_user_DllExport bool operator!=(const NavSatStatus &x) const
Comparison operator.
eProsima_user_DllExport ~NavSatStatus()
Default destructor.
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
eProsima_user_DllExport uint16_t service() const
This function returns the value of member service
static eProsima_user_DllExport size_t getCdrSerializedSize(const sensor_msgs::msg::NavSatStatus &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.