YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
return_get_current_position2.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6// Autogenerated by Thrift Compiler (0.14.1-yarped)
7//
8// This is an automatically generated file.
9// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
10
12
13// Constructor with field values
16 const yarp::sig::Matrix& cov) :
17 WirePortable(),
18 ret(ret),
19 loc(loc),
20 cov(cov)
21{
22}
23
24// Read structure on a Wire
26{
27 if (!read_ret(reader)) {
28 return false;
29 }
30 if (!nested_read_loc(reader)) {
31 return false;
32 }
33 if (!nested_read_cov(reader)) {
34 return false;
35 }
36 if (reader.isError()) {
37 return false;
38 }
39 return true;
40}
41
42// Read structure on a Connection
44{
45 yarp::os::idl::WireReader reader(connection);
46 if (!reader.readListHeader(3)) {
47 return false;
48 }
49 if (!read(reader)) {
50 return false;
51 }
52 return true;
53}
54
55// Write structure on a Wire
57{
58 if (!write_ret(writer)) {
59 return false;
60 }
61 if (!nested_write_loc(writer)) {
62 return false;
63 }
64 if (!nested_write_cov(writer)) {
65 return false;
66 }
67 if (writer.isError()) {
68 return false;
69 }
70 return true;
71}
72
73// Write structure on a Connection
75{
76 yarp::os::idl::WireWriter writer(connection);
77 if (!writer.writeListHeader(3)) {
78 return false;
79 }
80 if (!write(writer)) {
81 return false;
82 }
83 return true;
84}
85
86// Convert to a printable string
88{
90 if (!yarp::os::Portable::copyPortable(*this, b)) {
91 return {};
92 }
93 return b.toString();
94}
95
96// read ret field
97bool return_get_current_position2::read_ret(yarp::os::idl::WireReader& reader)
98{
99 if (!reader.readBool(ret)) {
100 ret = false;
101 }
102 return true;
103}
104
105// write ret field
106bool return_get_current_position2::write_ret(const yarp::os::idl::WireWriter& writer) const
107{
108 if (!writer.writeBool(ret)) {
109 return false;
110 }
111 return true;
112}
113
114// read (nested) ret field
115bool return_get_current_position2::nested_read_ret(yarp::os::idl::WireReader& reader)
116{
117 if (!reader.readBool(ret)) {
118 ret = false;
119 }
120 return true;
121}
122
123// write (nested) ret field
124bool return_get_current_position2::nested_write_ret(const yarp::os::idl::WireWriter& writer) const
125{
126 if (!writer.writeBool(ret)) {
127 return false;
128 }
129 return true;
130}
131
132// read loc field
133bool return_get_current_position2::read_loc(yarp::os::idl::WireReader& reader)
134{
135 if (reader.noMore()) {
136 reader.fail();
137 return false;
138 }
139 if (!reader.read(loc)) {
140 reader.fail();
141 return false;
142 }
143 return true;
144}
145
146// write loc field
147bool return_get_current_position2::write_loc(const yarp::os::idl::WireWriter& writer) const
148{
149 if (!writer.write(loc)) {
150 return false;
151 }
152 return true;
153}
154
155// read (nested) loc field
156bool return_get_current_position2::nested_read_loc(yarp::os::idl::WireReader& reader)
157{
158 if (reader.noMore()) {
159 reader.fail();
160 return false;
161 }
162 if (!reader.readNested(loc)) {
163 reader.fail();
164 return false;
165 }
166 return true;
167}
168
169// write (nested) loc field
170bool return_get_current_position2::nested_write_loc(const yarp::os::idl::WireWriter& writer) const
171{
172 if (!writer.writeNested(loc)) {
173 return false;
174 }
175 return true;
176}
177
178// read cov field
179bool return_get_current_position2::read_cov(yarp::os::idl::WireReader& reader)
180{
181 if (reader.noMore()) {
182 reader.fail();
183 return false;
184 }
185 if (!reader.read(cov)) {
186 reader.fail();
187 return false;
188 }
189 return true;
190}
191
192// write cov field
193bool return_get_current_position2::write_cov(const yarp::os::idl::WireWriter& writer) const
194{
195 if (!writer.write(cov)) {
196 return false;
197 }
198 return true;
199}
200
201// read (nested) cov field
202bool return_get_current_position2::nested_read_cov(yarp::os::idl::WireReader& reader)
203{
204 if (reader.noMore()) {
205 reader.fail();
206 return false;
207 }
208 if (!reader.readNested(cov)) {
209 reader.fail();
210 return false;
211 }
212 return true;
213}
214
215// write (nested) cov field
216bool return_get_current_position2::nested_write_cov(const yarp::os::idl::WireWriter& writer) const
217{
218 if (!writer.writeNested(cov)) {
219 return false;
220 }
221 return true;
222}
bool ret
yarp::dev::Nav2D::Map2DLocation loc
bool read(yarp::os::idl::WireReader &reader) override
bool write(const yarp::os::idl::WireWriter &writer) const override
A simple collection of objects that can be described and transmitted in a portable way.
Definition Bottle.h:64
std::string toString() const override
Gives a human-readable textual representation of the bottle.
Definition Bottle.cpp:211
An interface for reading from a network connection.
An interface for writing to a network connection.
static bool copyPortable(const PortWriter &writer, PortReader &reader)
Copy one portable to another, via writing and reading.
Definition Portable.cpp:16
IDL-friendly connection reader.
Definition WireReader.h:27
bool readNested(WirePortable &obj)
bool read(WirePortable &obj)
IDL-friendly connection writer.
Definition WireWriter.h:28
bool writeBool(bool x, bool skip_tag=false) const
bool write(const WirePortable &obj) const
bool writeListHeader(int len) const
bool writeNested(const WirePortable &obj) const
A class for a Matrix.
Definition Matrix.h:39