YARP
Yet Another Robot Platform
SensorStreamingData.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 // Autogenerated by Thrift Compiler (0.12.0-yarped)
10 //
11 // This is an automatically generated file.
12 // It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
13 
14 #ifndef YARP_THRIFT_GENERATOR_STRUCT_SENSORSTREAMINGDATA_H
15 #define YARP_THRIFT_GENERATOR_STRUCT_SENSORSTREAMINGDATA_H
16 
17 #include <yarp/os/Wire.h>
18 #include <yarp/os/idl/WireTypes.h>
19 #include <SensorMeasurements.h>
20 
23 {
24 public:
25  // Fields
36 
37  // Default constructor
39 
40  // Constructor with field values
51 
52  // Read structure on a Wire
53  bool read(yarp::os::idl::WireReader& reader) override;
54 
55  // Read structure on a Connection
56  bool read(yarp::os::ConnectionReader& connection) override;
57 
58  // Write structure on a Wire
59  bool write(const yarp::os::idl::WireWriter& writer) const override;
60 
61  // Write structure on a Connection
62  bool write(yarp::os::ConnectionWriter& connection) const override;
63 
64  // Convert to a printable string
65  std::string toString() const;
66 
67  // If you want to serialize this class without nesting, use this helper
69 
70  class Editor :
71  public yarp::os::Wire,
73  {
74  public:
75  // Editor: default constructor
76  Editor();
77 
78  // Editor: constructor with base class
80 
81  // Editor: destructor
82  ~Editor() override;
83 
84  // Editor: Deleted constructors and operator=
85  Editor(const Editor& rhs) = delete;
86  Editor(Editor&& rhs) = delete;
87  Editor& operator=(const Editor& rhs) = delete;
88  Editor& operator=(Editor&& rhs) = delete;
89 
90  // Editor: edit
91  bool edit(SensorStreamingData& obj, bool dirty = true);
92 
93  // Editor: validity check
94  bool isValid() const;
95 
96  // Editor: state
98 
99  // Editor: start editing
100  void start_editing();
101 
102 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2
103  YARP_DEPRECATED_MSG("Use start_editing() instead")
104  void begin()
105  {
106  start_editing();
107  }
108 #endif // YARP_NO_DEPRECATED
109 
110  // Editor: stop editing
111  void stop_editing();
112 
113 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2
114  YARP_DEPRECATED_MSG("Use stop_editing() instead")
115  void end()
116  {
117  stop_editing();
118  }
119 #endif // YARP_NO_DEPRECATED
120 
121  // Editor: ThreeAxisGyroscopes field
124  virtual bool will_set_ThreeAxisGyroscopes();
125  virtual bool did_set_ThreeAxisGyroscopes();
126 
127  // Editor: ThreeAxisLinearAccelerometers field
132 
133  // Editor: ThreeAxisMagnetometers field
136  virtual bool will_set_ThreeAxisMagnetometers();
137  virtual bool did_set_ThreeAxisMagnetometers();
138 
139  // Editor: OrientationSensors field
142  virtual bool will_set_OrientationSensors();
143  virtual bool did_set_OrientationSensors();
144 
145  // Editor: TemperatureSensors field
148  virtual bool will_set_TemperatureSensors();
149  virtual bool did_set_TemperatureSensors();
150 
151  // Editor: SixAxisForceTorqueSensors field
154  virtual bool will_set_SixAxisForceTorqueSensors();
155  virtual bool did_set_SixAxisForceTorqueSensors();
156 
157  // Editor: ContactLoadCellArrays field
160  virtual bool will_set_ContactLoadCellArrays();
161  virtual bool did_set_ContactLoadCellArrays();
162 
163  // Editor: EncoderArrays field
165  const SensorMeasurements& get_EncoderArrays() const;
166  virtual bool will_set_EncoderArrays();
167  virtual bool did_set_EncoderArrays();
168 
169  // Editor: SkinPatches field
171  const SensorMeasurements& get_SkinPatches() const;
172  virtual bool will_set_SkinPatches();
173  virtual bool did_set_SkinPatches();
174 
175  // Editor: PositionSensors field
178  virtual bool will_set_PositionSensors();
179  virtual bool did_set_PositionSensors();
180 
181  // Editor: clean
182  void clean();
183 
184  // Editor: read
185  bool read(yarp::os::ConnectionReader& connection) override;
186 
187  // Editor: write
188  bool write(yarp::os::ConnectionWriter& connection) const override;
189 
190  private:
191  // Editor: state
192  SensorStreamingData* obj;
193  bool obj_owned;
194  int group;
195 
196  // Editor: dirty variables
197  bool is_dirty;
198  bool is_dirty_ThreeAxisGyroscopes;
199  bool is_dirty_ThreeAxisLinearAccelerometers;
200  bool is_dirty_ThreeAxisMagnetometers;
201  bool is_dirty_OrientationSensors;
202  bool is_dirty_TemperatureSensors;
203  bool is_dirty_SixAxisForceTorqueSensors;
204  bool is_dirty_ContactLoadCellArrays;
205  bool is_dirty_EncoderArrays;
206  bool is_dirty_SkinPatches;
207  bool is_dirty_PositionSensors;
208  int dirty_count;
209 
210  // Editor: send if possible
211  void communicate();
212 
213  // Editor: mark dirty overall
214  void mark_dirty();
215 
216  // Editor: mark dirty single fields
217  void mark_dirty_ThreeAxisGyroscopes();
218  void mark_dirty_ThreeAxisLinearAccelerometers();
219  void mark_dirty_ThreeAxisMagnetometers();
220  void mark_dirty_OrientationSensors();
221  void mark_dirty_TemperatureSensors();
222  void mark_dirty_SixAxisForceTorqueSensors();
223  void mark_dirty_ContactLoadCellArrays();
224  void mark_dirty_EncoderArrays();
225  void mark_dirty_SkinPatches();
226  void mark_dirty_PositionSensors();
227 
228  // Editor: dirty_flags
229  void dirty_flags(bool flag);
230  };
231 
232 private:
233  // read/write ThreeAxisGyroscopes field
234  bool read_ThreeAxisGyroscopes(yarp::os::idl::WireReader& reader);
235  bool write_ThreeAxisGyroscopes(const yarp::os::idl::WireWriter& writer) const;
236  bool nested_read_ThreeAxisGyroscopes(yarp::os::idl::WireReader& reader);
237  bool nested_write_ThreeAxisGyroscopes(const yarp::os::idl::WireWriter& writer) const;
238 
239  // read/write ThreeAxisLinearAccelerometers field
240  bool read_ThreeAxisLinearAccelerometers(yarp::os::idl::WireReader& reader);
241  bool write_ThreeAxisLinearAccelerometers(const yarp::os::idl::WireWriter& writer) const;
242  bool nested_read_ThreeAxisLinearAccelerometers(yarp::os::idl::WireReader& reader);
243  bool nested_write_ThreeAxisLinearAccelerometers(const yarp::os::idl::WireWriter& writer) const;
244 
245  // read/write ThreeAxisMagnetometers field
246  bool read_ThreeAxisMagnetometers(yarp::os::idl::WireReader& reader);
247  bool write_ThreeAxisMagnetometers(const yarp::os::idl::WireWriter& writer) const;
248  bool nested_read_ThreeAxisMagnetometers(yarp::os::idl::WireReader& reader);
249  bool nested_write_ThreeAxisMagnetometers(const yarp::os::idl::WireWriter& writer) const;
250 
251  // read/write OrientationSensors field
252  bool read_OrientationSensors(yarp::os::idl::WireReader& reader);
253  bool write_OrientationSensors(const yarp::os::idl::WireWriter& writer) const;
254  bool nested_read_OrientationSensors(yarp::os::idl::WireReader& reader);
255  bool nested_write_OrientationSensors(const yarp::os::idl::WireWriter& writer) const;
256 
257  // read/write TemperatureSensors field
258  bool read_TemperatureSensors(yarp::os::idl::WireReader& reader);
259  bool write_TemperatureSensors(const yarp::os::idl::WireWriter& writer) const;
260  bool nested_read_TemperatureSensors(yarp::os::idl::WireReader& reader);
261  bool nested_write_TemperatureSensors(const yarp::os::idl::WireWriter& writer) const;
262 
263  // read/write SixAxisForceTorqueSensors field
264  bool read_SixAxisForceTorqueSensors(yarp::os::idl::WireReader& reader);
265  bool write_SixAxisForceTorqueSensors(const yarp::os::idl::WireWriter& writer) const;
266  bool nested_read_SixAxisForceTorqueSensors(yarp::os::idl::WireReader& reader);
267  bool nested_write_SixAxisForceTorqueSensors(const yarp::os::idl::WireWriter& writer) const;
268 
269  // read/write ContactLoadCellArrays field
270  bool read_ContactLoadCellArrays(yarp::os::idl::WireReader& reader);
271  bool write_ContactLoadCellArrays(const yarp::os::idl::WireWriter& writer) const;
272  bool nested_read_ContactLoadCellArrays(yarp::os::idl::WireReader& reader);
273  bool nested_write_ContactLoadCellArrays(const yarp::os::idl::WireWriter& writer) const;
274 
275  // read/write EncoderArrays field
276  bool read_EncoderArrays(yarp::os::idl::WireReader& reader);
277  bool write_EncoderArrays(const yarp::os::idl::WireWriter& writer) const;
278  bool nested_read_EncoderArrays(yarp::os::idl::WireReader& reader);
279  bool nested_write_EncoderArrays(const yarp::os::idl::WireWriter& writer) const;
280 
281  // read/write SkinPatches field
282  bool read_SkinPatches(yarp::os::idl::WireReader& reader);
283  bool write_SkinPatches(const yarp::os::idl::WireWriter& writer) const;
284  bool nested_read_SkinPatches(yarp::os::idl::WireReader& reader);
285  bool nested_write_SkinPatches(const yarp::os::idl::WireWriter& writer) const;
286 
287  // read/write PositionSensors field
288  bool read_PositionSensors(yarp::os::idl::WireReader& reader);
289  bool write_PositionSensors(const yarp::os::idl::WireWriter& writer) const;
290  bool nested_read_PositionSensors(yarp::os::idl::WireReader& reader);
291  bool nested_write_PositionSensors(const yarp::os::idl::WireWriter& writer) const;
292 };
293 
294 #endif // YARP_THRIFT_GENERATOR_STRUCT_SENSORSTREAMINGDATA_H
SensorStreamingData::Editor::will_set_PositionSensors
virtual bool will_set_PositionSensors()
Definition: SensorStreamingData.cpp:491
SensorStreamingData::Editor::set_SixAxisForceTorqueSensors
void set_SixAxisForceTorqueSensors(const SensorMeasurements &SixAxisForceTorqueSensors)
Definition: SensorStreamingData.cpp:363
SensorStreamingData::Editor::Editor
Editor(Editor &&rhs)=delete
SensorStreamingData::Editor::did_set_EncoderArrays
virtual bool did_set_EncoderArrays()
Definition: SensorStreamingData.cpp:441
SensorStreamingData::Editor::get_ContactLoadCellArrays
const SensorMeasurements & get_ContactLoadCellArrays() const
Definition: SensorStreamingData.cpp:401
SensorStreamingData::Editor::will_set_OrientationSensors
virtual bool will_set_OrientationSensors()
Definition: SensorStreamingData.cpp:323
SensorStreamingData::TemperatureSensors
SensorMeasurements TemperatureSensors
Definition: SensorStreamingData.h:30
WireTypes.h
SensorStreamingData::Editor::will_set_ThreeAxisGyroscopes
virtual bool will_set_ThreeAxisGyroscopes()
Definition: SensorStreamingData.cpp:239
SensorStreamingData::SixAxisForceTorqueSensors
SensorMeasurements SixAxisForceTorqueSensors
Definition: SensorStreamingData.h:31
SensorStreamingData::read
bool read(yarp::os::idl::WireReader &reader) override
Definition: SensorStreamingData.cpp:58
SensorStreamingData::Editor::read
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
Definition: SensorStreamingData.cpp:509
Wire.h
SensorStreamingData::Editor::Editor
Editor(const Editor &rhs)=delete
SensorStreamingData::Editor::set_PositionSensors
void set_PositionSensors(const SensorMeasurements &PositionSensors)
Definition: SensorStreamingData.cpp:475
SensorStreamingData::SensorStreamingData
SensorStreamingData()
Definition: SensorStreamingData.cpp:17
yarp::os::PortWriter
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:27
SensorStreamingData::Editor::did_set_OrientationSensors
virtual bool did_set_OrientationSensors()
Definition: SensorStreamingData.cpp:329
yarp::os::idl::WireWriter
IDL-friendly connection writer.
Definition: WireWriter.h:33
SensorStreamingData::Editor::Editor
Editor()
Definition: SensorStreamingData.cpp:158
SensorStreamingData::Editor::did_set_PositionSensors
virtual bool did_set_PositionSensors()
Definition: SensorStreamingData.cpp:497
SensorStreamingData::Editor::get_TemperatureSensors
const SensorMeasurements & get_TemperatureSensors() const
Definition: SensorStreamingData.cpp:345
SensorStreamingData::ThreeAxisGyroscopes
SensorMeasurements ThreeAxisGyroscopes
Definition: SensorStreamingData.h:26
SensorStreamingData::Editor::~Editor
~Editor() override
Definition: SensorStreamingData.cpp:177
SensorStreamingData::Editor::did_set_ThreeAxisLinearAccelerometers
virtual bool did_set_ThreeAxisLinearAccelerometers()
Definition: SensorStreamingData.cpp:273
SensorStreamingData::Editor::will_set_ThreeAxisMagnetometers
virtual bool will_set_ThreeAxisMagnetometers()
Definition: SensorStreamingData.cpp:295
SensorStreamingData::Editor::will_set_ThreeAxisLinearAccelerometers
virtual bool will_set_ThreeAxisLinearAccelerometers()
Definition: SensorStreamingData.cpp:267
SensorMeasurements
Definition: SensorMeasurements.h:23
SensorStreamingData::Editor::will_set_EncoderArrays
virtual bool will_set_EncoderArrays()
Definition: SensorStreamingData.cpp:435
SensorStreamingData::Editor::get_ThreeAxisLinearAccelerometers
const SensorMeasurements & get_ThreeAxisLinearAccelerometers() const
Definition: SensorStreamingData.cpp:261
SensorStreamingData::Editor::did_set_SkinPatches
virtual bool did_set_SkinPatches()
Definition: SensorStreamingData.cpp:469
yarp::os::ConnectionWriter
An interface for writing to a network connection.
Definition: ConnectionWriter.h:40
SensorStreamingData::EncoderArrays
SensorMeasurements EncoderArrays
Definition: SensorStreamingData.h:33
SensorStreamingData::Editor::set_ThreeAxisGyroscopes
void set_ThreeAxisGyroscopes(const SensorMeasurements &ThreeAxisGyroscopes)
Definition: SensorStreamingData.cpp:223
SensorStreamingData::Editor::will_set_ContactLoadCellArrays
virtual bool will_set_ContactLoadCellArrays()
Definition: SensorStreamingData.cpp:407
SensorStreamingData::Editor::get_SkinPatches
const SensorMeasurements & get_SkinPatches() const
Definition: SensorStreamingData.cpp:457
SensorStreamingData::Editor::start_editing
void start_editing()
Definition: SensorStreamingData.cpp:209
SensorStreamingData::ThreeAxisLinearAccelerometers
SensorMeasurements ThreeAxisLinearAccelerometers
Definition: SensorStreamingData.h:27
SensorStreamingData::Editor
Definition: SensorStreamingData.h:73
yarp::os::idl::Unwrapped
Definition: Unwrapped.h:22
SensorStreamingData::ContactLoadCellArrays
SensorMeasurements ContactLoadCellArrays
Definition: SensorStreamingData.h:32
SensorStreamingData::Editor::get_PositionSensors
const SensorMeasurements & get_PositionSensors() const
Definition: SensorStreamingData.cpp:485
SensorStreamingData::Editor::did_set_SixAxisForceTorqueSensors
virtual bool did_set_SixAxisForceTorqueSensors()
Definition: SensorStreamingData.cpp:385
SensorStreamingData::Editor::set_TemperatureSensors
void set_TemperatureSensors(const SensorMeasurements &TemperatureSensors)
Definition: SensorStreamingData.cpp:335
SensorStreamingData::Editor::did_set_ContactLoadCellArrays
virtual bool did_set_ContactLoadCellArrays()
Definition: SensorStreamingData.cpp:413
SensorStreamingData::Editor::get_EncoderArrays
const SensorMeasurements & get_EncoderArrays() const
Definition: SensorStreamingData.cpp:429
SensorStreamingData::write
bool write(const yarp::os::idl::WireWriter &writer) const override
Definition: SensorStreamingData.cpp:104
yarp::os::idl::WirePortable
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
Definition: WirePortable.h:26
yarp::os::Wire
Base class for IDL client/server.
Definition: Wire.h:22
SensorMeasurements.h
SensorStreamingData::Editor::operator=
Editor & operator=(const Editor &rhs)=delete
SensorStreamingData::Editor::stop_editing
void stop_editing()
Definition: SensorStreamingData.cpp:215
SensorStreamingData::OrientationSensors
SensorMeasurements OrientationSensors
Definition: SensorStreamingData.h:29
SensorStreamingData::Editor::did_set_ThreeAxisMagnetometers
virtual bool did_set_ThreeAxisMagnetometers()
Definition: SensorStreamingData.cpp:301
yarp::os::idl::WireReader
IDL-friendly connection reader.
Definition: WireReader.h:33
yarp::os::ConnectionReader
An interface for reading from a network connection.
Definition: ConnectionReader.h:40
SensorStreamingData::Editor::set_ContactLoadCellArrays
void set_ContactLoadCellArrays(const SensorMeasurements &ContactLoadCellArrays)
Definition: SensorStreamingData.cpp:391
SensorStreamingData::Editor::isValid
bool isValid() const
Definition: SensorStreamingData.cpp:197
SensorStreamingData::Editor::state
SensorStreamingData & state()
Definition: SensorStreamingData.cpp:203
SensorStreamingData::PositionSensors
SensorMeasurements PositionSensors
Definition: SensorStreamingData.h:35
YARP_DEPRECATED_MSG
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
Definition: compiler.h:2883
SensorStreamingData::ThreeAxisMagnetometers
SensorMeasurements ThreeAxisMagnetometers
Definition: SensorStreamingData.h:28
SensorStreamingData::Editor::did_set_ThreeAxisGyroscopes
virtual bool did_set_ThreeAxisGyroscopes()
Definition: SensorStreamingData.cpp:245
SensorStreamingData::Editor::get_SixAxisForceTorqueSensors
const SensorMeasurements & get_SixAxisForceTorqueSensors() const
Definition: SensorStreamingData.cpp:373
SensorStreamingData::Editor::set_SkinPatches
void set_SkinPatches(const SensorMeasurements &SkinPatches)
Definition: SensorStreamingData.cpp:447
SensorStreamingData::toString
std::string toString() const
Definition: SensorStreamingData.cpp:150
SensorStreamingData
Definition: SensorStreamingData.h:23
SensorStreamingData::Editor::set_ThreeAxisLinearAccelerometers
void set_ThreeAxisLinearAccelerometers(const SensorMeasurements &ThreeAxisLinearAccelerometers)
Definition: SensorStreamingData.cpp:251
SensorStreamingData::Editor::begin
void begin()
Definition: SensorStreamingData.h:104
SensorStreamingData::Editor::set_ThreeAxisMagnetometers
void set_ThreeAxisMagnetometers(const SensorMeasurements &ThreeAxisMagnetometers)
Definition: SensorStreamingData.cpp:279
SensorStreamingData::Editor::will_set_SixAxisForceTorqueSensors
virtual bool will_set_SixAxisForceTorqueSensors()
Definition: SensorStreamingData.cpp:379
SensorStreamingData::Editor::will_set_SkinPatches
virtual bool will_set_SkinPatches()
Definition: SensorStreamingData.cpp:463
SensorStreamingData::Editor::get_OrientationSensors
const SensorMeasurements & get_OrientationSensors() const
Definition: SensorStreamingData.cpp:317
SensorStreamingData::Editor::did_set_TemperatureSensors
virtual bool did_set_TemperatureSensors()
Definition: SensorStreamingData.cpp:357
SensorStreamingData::Editor::edit
bool edit(SensorStreamingData &obj, bool dirty=true)
Definition: SensorStreamingData.cpp:185
SensorStreamingData::Editor::write
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
Definition: SensorStreamingData.cpp:747
SensorStreamingData::Editor::set_EncoderArrays
void set_EncoderArrays(const SensorMeasurements &EncoderArrays)
Definition: SensorStreamingData.cpp:419
SensorStreamingData::Editor::operator=
Editor & operator=(Editor &&rhs)=delete
SensorStreamingData::Editor::get_ThreeAxisGyroscopes
const SensorMeasurements & get_ThreeAxisGyroscopes() const
Definition: SensorStreamingData.cpp:233
SensorStreamingData::unwrapped
yarp::os::idl::Unwrapped< SensorStreamingData > unwrapped
Definition: SensorStreamingData.h:68
SensorStreamingData::Editor::clean
void clean()
Definition: SensorStreamingData.cpp:503
SensorStreamingData::Editor::will_set_TemperatureSensors
virtual bool will_set_TemperatureSensors()
Definition: SensorStreamingData.cpp:351
SensorStreamingData::Editor::set_OrientationSensors
void set_OrientationSensors(const SensorMeasurements &OrientationSensors)
Definition: SensorStreamingData.cpp:307
SensorStreamingData::Editor::end
void end()
Definition: SensorStreamingData.h:115
SensorStreamingData::Editor::get_ThreeAxisMagnetometers
const SensorMeasurements & get_ThreeAxisMagnetometers() const
Definition: SensorStreamingData.cpp:289
SensorStreamingData::SkinPatches
SensorMeasurements SkinPatches
Definition: SensorStreamingData.h:34