YARP
Yet Another Robot Platform
LaserScan2D.h
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
11#ifndef YARP_THRIFT_GENERATOR_STRUCT_LASERSCAN2D_H
12#define YARP_THRIFT_GENERATOR_STRUCT_LASERSCAN2D_H
13
14#include <yarp/dev/api.h>
15
16#include <yarp/os/Wire.h>
18#include <yarp/sig/Vector.h>
19
20namespace yarp::dev {
21
24{
25public:
26 // Fields
30 double angle_min{0.0};
34 double angle_max{0.0};
38 double range_min{0.0};
42 double range_max{0.0};
47 std::int32_t status{0};
48
49 // Default constructor
50 LaserScan2D() = default;
51
52 // Constructor with field values
53 LaserScan2D(const double angle_min,
54 const double angle_max,
55 const double range_min,
56 const double range_max,
57 const yarp::sig::Vector& scans,
58 const std::int32_t status);
59
60 // Read structure on a Wire
61 bool read(yarp::os::idl::WireReader& reader) override;
62
63 // Read structure on a Connection
64 bool read(yarp::os::ConnectionReader& connection) override;
65
66 // Write structure on a Wire
67 bool write(const yarp::os::idl::WireWriter& writer) const override;
68
69 // Write structure on a Connection
70 bool write(yarp::os::ConnectionWriter& connection) const override;
71
72 // Convert to a printable string
73 std::string toString() const;
74
75 // If you want to serialize this class without nesting, use this helper
77
78private:
79 // read/write angle_min field
80 bool read_angle_min(yarp::os::idl::WireReader& reader);
81 bool write_angle_min(const yarp::os::idl::WireWriter& writer) const;
82 bool nested_read_angle_min(yarp::os::idl::WireReader& reader);
83 bool nested_write_angle_min(const yarp::os::idl::WireWriter& writer) const;
84
85 // read/write angle_max field
86 bool read_angle_max(yarp::os::idl::WireReader& reader);
87 bool write_angle_max(const yarp::os::idl::WireWriter& writer) const;
88 bool nested_read_angle_max(yarp::os::idl::WireReader& reader);
89 bool nested_write_angle_max(const yarp::os::idl::WireWriter& writer) const;
90
91 // read/write range_min field
92 bool read_range_min(yarp::os::idl::WireReader& reader);
93 bool write_range_min(const yarp::os::idl::WireWriter& writer) const;
94 bool nested_read_range_min(yarp::os::idl::WireReader& reader);
95 bool nested_write_range_min(const yarp::os::idl::WireWriter& writer) const;
96
97 // read/write range_max field
98 bool read_range_max(yarp::os::idl::WireReader& reader);
99 bool write_range_max(const yarp::os::idl::WireWriter& writer) const;
100 bool nested_read_range_max(yarp::os::idl::WireReader& reader);
101 bool nested_write_range_max(const yarp::os::idl::WireWriter& writer) const;
102
103 // read/write scans field
104 bool read_scans(yarp::os::idl::WireReader& reader);
105 bool write_scans(const yarp::os::idl::WireWriter& writer) const;
106 bool nested_read_scans(yarp::os::idl::WireReader& reader);
107 bool nested_write_scans(const yarp::os::idl::WireWriter& writer) const;
108
109 // read/write status field
110 bool read_status(yarp::os::idl::WireReader& reader);
111 bool write_status(const yarp::os::idl::WireWriter& writer) const;
112 bool nested_read_status(yarp::os::idl::WireReader& reader);
113 bool nested_write_status(const yarp::os::idl::WireWriter& writer) const;
114};
115
116} // namespace yarp::dev
117
118#endif // YARP_THRIFT_GENERATOR_STRUCT_LASERSCAN2D_H
contains the definition of a Vector type
yarp::os::idl::Unwrapped< LaserScan2D > unwrapped
Definition: LaserScan2D.h:76
An interface for reading from a network connection.
An interface for writing to a network connection.
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
Definition: WirePortable.h:21
IDL-friendly connection reader.
Definition: WireReader.h:27
IDL-friendly connection writer.
Definition: WireWriter.h:28
std::string toString(const T &value)
convert an arbitrary type to string.
For streams capable of holding different kinds of content, check what they actually have.
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
Definition: ImageFile.cpp:915
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:1091
#define YARP_dev_API
Definition: api.h:18