YARP
Yet Another Robot Platform
LaserScan2D.cpp
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 #include <yarp/dev/LaserScan2D.h>
15 
16 namespace yarp {
17 namespace dev {
18 
19 // Default constructor
21  WirePortable(),
22  angle_min(0),
23  angle_max(0),
24  range_min(0),
25  range_max(0),
26  scans(),
27  status(0)
28 {
29 }
30 
31 // Constructor with field values
32 LaserScan2D::LaserScan2D(const double angle_min,
33  const double angle_max,
34  const double range_min,
35  const double range_max,
36  const yarp::sig::Vector& scans,
37  const std::int32_t status) :
38  WirePortable(),
39  angle_min(angle_min),
40  angle_max(angle_max),
41  range_min(range_min),
42  range_max(range_max),
43  scans(scans),
44  status(status)
45 {
46 }
47 
48 // Read structure on a Wire
50 {
51  if (!read_angle_min(reader)) {
52  return false;
53  }
54  if (!read_angle_max(reader)) {
55  return false;
56  }
57  if (!read_range_min(reader)) {
58  return false;
59  }
60  if (!read_range_max(reader)) {
61  return false;
62  }
63  if (!read_scans(reader)) {
64  return false;
65  }
66  if (!read_status(reader)) {
67  return false;
68  }
69  return !reader.isError();
70 }
71 
72 // Read structure on a Connection
74 {
75  yarp::os::idl::WireReader reader(connection);
76  if (!reader.readListHeader(6)) {
77  return false;
78  }
79  return read(reader);
80 }
81 
82 // Write structure on a Wire
84 {
85  if (!write_angle_min(writer)) {
86  return false;
87  }
88  if (!write_angle_max(writer)) {
89  return false;
90  }
91  if (!write_range_min(writer)) {
92  return false;
93  }
94  if (!write_range_max(writer)) {
95  return false;
96  }
97  if (!write_scans(writer)) {
98  return false;
99  }
100  if (!write_status(writer)) {
101  return false;
102  }
103  return !writer.isError();
104 }
105 
106 // Write structure on a Connection
108 {
109  yarp::os::idl::WireWriter writer(connection);
110  if (!writer.writeListHeader(6)) {
111  return false;
112  }
113  return write(writer);
114 }
115 
116 // Convert to a printable string
117 std::string LaserScan2D::toString() const
118 {
120  b.read(*this);
121  return b.toString();
122 }
123 
124 // Editor: default constructor
126 {
127  group = 0;
128  obj_owned = true;
129  obj = new LaserScan2D;
130  dirty_flags(false);
131  yarp().setOwner(*this);
132 }
133 
134 // Editor: constructor with base class
136 {
137  group = 0;
138  obj_owned = false;
139  edit(obj, false);
140  yarp().setOwner(*this);
141 }
142 
143 // Editor: destructor
145 {
146  if (obj_owned) {
147  delete obj;
148  }
149 }
150 
151 // Editor: edit
153 {
154  if (obj_owned) {
155  delete this->obj;
156  }
157  this->obj = &obj;
158  obj_owned = false;
159  dirty_flags(dirty);
160  return true;
161 }
162 
163 // Editor: validity check
165 {
166  return obj != nullptr;
167 }
168 
169 // Editor: state
171 {
172  return *obj;
173 }
174 
175 // Editor: grouping begin
177 {
178  group++;
179 }
180 
181 // Editor: grouping end
183 {
184  group--;
185  if (group == 0 && is_dirty) {
186  communicate();
187  }
188 }
189 // Editor: angle_min setter
191 {
192  will_set_angle_min();
193  obj->angle_min = angle_min;
194  mark_dirty_angle_min();
195  communicate();
196  did_set_angle_min();
197 }
198 
199 // Editor: angle_min getter
201 {
202  return obj->angle_min;
203 }
204 
205 // Editor: angle_min will_set
207 {
208  return true;
209 }
210 
211 // Editor: angle_min did_set
213 {
214  return true;
215 }
216 
217 // Editor: angle_max setter
219 {
220  will_set_angle_max();
221  obj->angle_max = angle_max;
222  mark_dirty_angle_max();
223  communicate();
224  did_set_angle_max();
225 }
226 
227 // Editor: angle_max getter
229 {
230  return obj->angle_max;
231 }
232 
233 // Editor: angle_max will_set
235 {
236  return true;
237 }
238 
239 // Editor: angle_max did_set
241 {
242  return true;
243 }
244 
245 // Editor: range_min setter
247 {
248  will_set_range_min();
249  obj->range_min = range_min;
250  mark_dirty_range_min();
251  communicate();
252  did_set_range_min();
253 }
254 
255 // Editor: range_min getter
257 {
258  return obj->range_min;
259 }
260 
261 // Editor: range_min will_set
263 {
264  return true;
265 }
266 
267 // Editor: range_min did_set
269 {
270  return true;
271 }
272 
273 // Editor: range_max setter
275 {
276  will_set_range_max();
277  obj->range_max = range_max;
278  mark_dirty_range_max();
279  communicate();
280  did_set_range_max();
281 }
282 
283 // Editor: range_max getter
285 {
286  return obj->range_max;
287 }
288 
289 // Editor: range_max will_set
291 {
292  return true;
293 }
294 
295 // Editor: range_max did_set
297 {
298  return true;
299 }
300 
301 // Editor: scans setter
303 {
304  will_set_scans();
305  obj->scans = scans;
306  mark_dirty_scans();
307  communicate();
308  did_set_scans();
309 }
310 
311 // Editor: scans getter
313 {
314  return obj->scans;
315 }
316 
317 // Editor: scans will_set
319 {
320  return true;
321 }
322 
323 // Editor: scans did_set
325 {
326  return true;
327 }
328 
329 // Editor: status setter
330 void LaserScan2D::Editor::set_status(const std::int32_t status)
331 {
332  will_set_status();
333  obj->status = status;
334  mark_dirty_status();
335  communicate();
336  did_set_status();
337 }
338 
339 // Editor: status getter
341 {
342  return obj->status;
343 }
344 
345 // Editor: status will_set
347 {
348  return true;
349 }
350 
351 // Editor: status did_set
353 {
354  return true;
355 }
356 
357 // Editor: clean
359 {
360  dirty_flags(false);
361 }
362 
363 // Editor: read
365 {
366  if (!isValid()) {
367  return false;
368  }
369  yarp::os::idl::WireReader reader(connection);
370  reader.expectAccept();
371  if (!reader.readListHeader()) {
372  return false;
373  }
374  int len = reader.getLength();
375  if (len == 0) {
376  yarp::os::idl::WireWriter writer(reader);
377  if (writer.isNull()) {
378  return true;
379  }
380  if (!writer.writeListHeader(1)) {
381  return false;
382  }
383  writer.writeString("send: 'help' or 'patch (param1 val1) (param2 val2)'");
384  return true;
385  }
386  std::string tag;
387  if (!reader.readString(tag)) {
388  return false;
389  }
390  if (tag == "help") {
391  yarp::os::idl::WireWriter writer(reader);
392  if (writer.isNull()) {
393  return true;
394  }
395  if (!writer.writeListHeader(2)) {
396  return false;
397  }
398  if (!writer.writeTag("many", 1, 0)) {
399  return false;
400  }
401  if (reader.getLength() > 0) {
402  std::string field;
403  if (!reader.readString(field)) {
404  return false;
405  }
406  if (field == "angle_min") {
407  if (!writer.writeListHeader(2)) {
408  return false;
409  }
410  if (!writer.writeString("double angle_min")) {
411  return false;
412  }
413  if (!writer.writeString("first angle of the scan [deg]")) {
414  return false;
415  }
416  }
417  if (field == "angle_max") {
418  if (!writer.writeListHeader(2)) {
419  return false;
420  }
421  if (!writer.writeString("double angle_max")) {
422  return false;
423  }
424  if (!writer.writeString("last angle of the scan [deg]")) {
425  return false;
426  }
427  }
428  if (field == "range_min") {
429  if (!writer.writeListHeader(2)) {
430  return false;
431  }
432  if (!writer.writeString("double range_min")) {
433  return false;
434  }
435  if (!writer.writeString("the minimum distance of the scan [m]")) {
436  return false;
437  }
438  }
439  if (field == "range_max") {
440  if (!writer.writeListHeader(2)) {
441  return false;
442  }
443  if (!writer.writeString("double range_max")) {
444  return false;
445  }
446  if (!writer.writeString("the maximum distance of the scan [m]")) {
447  return false;
448  }
449  }
450  if (field == "scans") {
451  if (!writer.writeListHeader(2)) {
452  return false;
453  }
454  if (!writer.writeString("yarp::sig::Vector scans")) {
455  return false;
456  }
457  if (!writer.writeString("the scan data, measured in [m]. The angular increment of each ray is obtained by (angle_max-angle_min)/num_of_elements. Invalid data are represented as std::inf.")) {
458  return false;
459  }
460  }
461  if (field == "status") {
462  if (!writer.writeListHeader(1)) {
463  return false;
464  }
465  if (!writer.writeString("std::int32_t status")) {
466  return false;
467  }
468  }
469  }
470  if (!writer.writeListHeader(7)) {
471  return false;
472  }
473  writer.writeString("*** Available fields:");
474  writer.writeString("angle_min");
475  writer.writeString("angle_max");
476  writer.writeString("range_min");
477  writer.writeString("range_max");
478  writer.writeString("scans");
479  writer.writeString("status");
480  return true;
481  }
482  bool nested = true;
483  bool have_act = false;
484  if (tag != "patch") {
485  if (((len - 1) % 2) != 0) {
486  return false;
487  }
488  len = 1 + ((len - 1) / 2);
489  nested = false;
490  have_act = true;
491  }
492  for (int i = 1; i < len; ++i) {
493  if (nested && !reader.readListHeader(3)) {
494  return false;
495  }
496  std::string act;
497  std::string key;
498  if (have_act) {
499  act = tag;
500  } else if (!reader.readString(act)) {
501  return false;
502  }
503  if (!reader.readString(key)) {
504  return false;
505  }
506  if (key == "angle_min") {
507  will_set_angle_min();
508  if (!obj->nested_read_angle_min(reader)) {
509  return false;
510  }
511  did_set_angle_min();
512  } else if (key == "angle_max") {
513  will_set_angle_max();
514  if (!obj->nested_read_angle_max(reader)) {
515  return false;
516  }
517  did_set_angle_max();
518  } else if (key == "range_min") {
519  will_set_range_min();
520  if (!obj->nested_read_range_min(reader)) {
521  return false;
522  }
523  did_set_range_min();
524  } else if (key == "range_max") {
525  will_set_range_max();
526  if (!obj->nested_read_range_max(reader)) {
527  return false;
528  }
529  did_set_range_max();
530  } else if (key == "scans") {
531  will_set_scans();
532  if (!obj->nested_read_scans(reader)) {
533  return false;
534  }
535  did_set_scans();
536  } else if (key == "status") {
537  will_set_status();
538  if (!obj->nested_read_status(reader)) {
539  return false;
540  }
541  did_set_status();
542  } else {
543  // would be useful to have a fallback here
544  }
545  }
546  reader.accept();
547  yarp::os::idl::WireWriter writer(reader);
548  if (writer.isNull()) {
549  return true;
550  }
551  writer.writeListHeader(1);
552  writer.writeVocab(yarp::os::createVocab('o', 'k'));
553  return true;
554 }
555 
556 // Editor: write
558 {
559  if (!isValid()) {
560  return false;
561  }
562  yarp::os::idl::WireWriter writer(connection);
563  if (!writer.writeListHeader(dirty_count + 1)) {
564  return false;
565  }
566  if (!writer.writeString("patch")) {
567  return false;
568  }
569  if (is_dirty_angle_min) {
570  if (!writer.writeListHeader(3)) {
571  return false;
572  }
573  if (!writer.writeString("set")) {
574  return false;
575  }
576  if (!writer.writeString("angle_min")) {
577  return false;
578  }
579  if (!obj->nested_write_angle_min(writer)) {
580  return false;
581  }
582  }
583  if (is_dirty_angle_max) {
584  if (!writer.writeListHeader(3)) {
585  return false;
586  }
587  if (!writer.writeString("set")) {
588  return false;
589  }
590  if (!writer.writeString("angle_max")) {
591  return false;
592  }
593  if (!obj->nested_write_angle_max(writer)) {
594  return false;
595  }
596  }
597  if (is_dirty_range_min) {
598  if (!writer.writeListHeader(3)) {
599  return false;
600  }
601  if (!writer.writeString("set")) {
602  return false;
603  }
604  if (!writer.writeString("range_min")) {
605  return false;
606  }
607  if (!obj->nested_write_range_min(writer)) {
608  return false;
609  }
610  }
611  if (is_dirty_range_max) {
612  if (!writer.writeListHeader(3)) {
613  return false;
614  }
615  if (!writer.writeString("set")) {
616  return false;
617  }
618  if (!writer.writeString("range_max")) {
619  return false;
620  }
621  if (!obj->nested_write_range_max(writer)) {
622  return false;
623  }
624  }
625  if (is_dirty_scans) {
626  if (!writer.writeListHeader(3)) {
627  return false;
628  }
629  if (!writer.writeString("set")) {
630  return false;
631  }
632  if (!writer.writeString("scans")) {
633  return false;
634  }
635  if (!obj->nested_write_scans(writer)) {
636  return false;
637  }
638  }
639  if (is_dirty_status) {
640  if (!writer.writeListHeader(3)) {
641  return false;
642  }
643  if (!writer.writeString("set")) {
644  return false;
645  }
646  if (!writer.writeString("status")) {
647  return false;
648  }
649  if (!obj->nested_write_status(writer)) {
650  return false;
651  }
652  }
653  return !writer.isError();
654 }
655 
656 // Editor: send if possible
657 void LaserScan2D::Editor::communicate()
658 {
659  if (group != 0) {
660  return;
661  }
662  if (yarp().canWrite()) {
663  yarp().write(*this);
664  clean();
665  }
666 }
667 
668 // Editor: mark dirty overall
669 void LaserScan2D::Editor::mark_dirty()
670 {
671  is_dirty = true;
672 }
673 
674 // Editor: angle_min mark_dirty
675 void LaserScan2D::Editor::mark_dirty_angle_min()
676 {
677  if (is_dirty_angle_min) {
678  return;
679  }
680  dirty_count++;
681  is_dirty_angle_min = true;
682  mark_dirty();
683 }
684 
685 // Editor: angle_max mark_dirty
686 void LaserScan2D::Editor::mark_dirty_angle_max()
687 {
688  if (is_dirty_angle_max) {
689  return;
690  }
691  dirty_count++;
692  is_dirty_angle_max = true;
693  mark_dirty();
694 }
695 
696 // Editor: range_min mark_dirty
697 void LaserScan2D::Editor::mark_dirty_range_min()
698 {
699  if (is_dirty_range_min) {
700  return;
701  }
702  dirty_count++;
703  is_dirty_range_min = true;
704  mark_dirty();
705 }
706 
707 // Editor: range_max mark_dirty
708 void LaserScan2D::Editor::mark_dirty_range_max()
709 {
710  if (is_dirty_range_max) {
711  return;
712  }
713  dirty_count++;
714  is_dirty_range_max = true;
715  mark_dirty();
716 }
717 
718 // Editor: scans mark_dirty
719 void LaserScan2D::Editor::mark_dirty_scans()
720 {
721  if (is_dirty_scans) {
722  return;
723  }
724  dirty_count++;
725  is_dirty_scans = true;
726  mark_dirty();
727 }
728 
729 // Editor: status mark_dirty
730 void LaserScan2D::Editor::mark_dirty_status()
731 {
732  if (is_dirty_status) {
733  return;
734  }
735  dirty_count++;
736  is_dirty_status = true;
737  mark_dirty();
738 }
739 
740 // Editor: dirty_flags
741 void LaserScan2D::Editor::dirty_flags(bool flag)
742 {
743  is_dirty = flag;
744  is_dirty_angle_min = flag;
745  is_dirty_angle_max = flag;
746  is_dirty_range_min = flag;
747  is_dirty_range_max = flag;
748  is_dirty_scans = flag;
749  is_dirty_status = flag;
750  dirty_count = flag ? 6 : 0;
751 }
752 
753 // read angle_min field
754 bool LaserScan2D::read_angle_min(yarp::os::idl::WireReader& reader)
755 {
756  if (!reader.readFloat64(angle_min)) {
757  reader.fail();
758  return false;
759  }
760  return true;
761 }
762 
763 // write angle_min field
764 bool LaserScan2D::write_angle_min(const yarp::os::idl::WireWriter& writer) const
765 {
766  if (!writer.writeFloat64(angle_min)) {
767  return false;
768  }
769  return true;
770 }
771 
772 // read (nested) angle_min field
773 bool LaserScan2D::nested_read_angle_min(yarp::os::idl::WireReader& reader)
774 {
775  if (!reader.readFloat64(angle_min)) {
776  reader.fail();
777  return false;
778  }
779  return true;
780 }
781 
782 // write (nested) angle_min field
783 bool LaserScan2D::nested_write_angle_min(const yarp::os::idl::WireWriter& writer) const
784 {
785  if (!writer.writeFloat64(angle_min)) {
786  return false;
787  }
788  return true;
789 }
790 
791 // read angle_max field
792 bool LaserScan2D::read_angle_max(yarp::os::idl::WireReader& reader)
793 {
794  if (!reader.readFloat64(angle_max)) {
795  reader.fail();
796  return false;
797  }
798  return true;
799 }
800 
801 // write angle_max field
802 bool LaserScan2D::write_angle_max(const yarp::os::idl::WireWriter& writer) const
803 {
804  if (!writer.writeFloat64(angle_max)) {
805  return false;
806  }
807  return true;
808 }
809 
810 // read (nested) angle_max field
811 bool LaserScan2D::nested_read_angle_max(yarp::os::idl::WireReader& reader)
812 {
813  if (!reader.readFloat64(angle_max)) {
814  reader.fail();
815  return false;
816  }
817  return true;
818 }
819 
820 // write (nested) angle_max field
821 bool LaserScan2D::nested_write_angle_max(const yarp::os::idl::WireWriter& writer) const
822 {
823  if (!writer.writeFloat64(angle_max)) {
824  return false;
825  }
826  return true;
827 }
828 
829 // read range_min field
830 bool LaserScan2D::read_range_min(yarp::os::idl::WireReader& reader)
831 {
832  if (!reader.readFloat64(range_min)) {
833  reader.fail();
834  return false;
835  }
836  return true;
837 }
838 
839 // write range_min field
840 bool LaserScan2D::write_range_min(const yarp::os::idl::WireWriter& writer) const
841 {
842  if (!writer.writeFloat64(range_min)) {
843  return false;
844  }
845  return true;
846 }
847 
848 // read (nested) range_min field
849 bool LaserScan2D::nested_read_range_min(yarp::os::idl::WireReader& reader)
850 {
851  if (!reader.readFloat64(range_min)) {
852  reader.fail();
853  return false;
854  }
855  return true;
856 }
857 
858 // write (nested) range_min field
859 bool LaserScan2D::nested_write_range_min(const yarp::os::idl::WireWriter& writer) const
860 {
861  if (!writer.writeFloat64(range_min)) {
862  return false;
863  }
864  return true;
865 }
866 
867 // read range_max field
868 bool LaserScan2D::read_range_max(yarp::os::idl::WireReader& reader)
869 {
870  if (!reader.readFloat64(range_max)) {
871  reader.fail();
872  return false;
873  }
874  return true;
875 }
876 
877 // write range_max field
878 bool LaserScan2D::write_range_max(const yarp::os::idl::WireWriter& writer) const
879 {
880  if (!writer.writeFloat64(range_max)) {
881  return false;
882  }
883  return true;
884 }
885 
886 // read (nested) range_max field
887 bool LaserScan2D::nested_read_range_max(yarp::os::idl::WireReader& reader)
888 {
889  if (!reader.readFloat64(range_max)) {
890  reader.fail();
891  return false;
892  }
893  return true;
894 }
895 
896 // write (nested) range_max field
897 bool LaserScan2D::nested_write_range_max(const yarp::os::idl::WireWriter& writer) const
898 {
899  if (!writer.writeFloat64(range_max)) {
900  return false;
901  }
902  return true;
903 }
904 
905 // read scans field
906 bool LaserScan2D::read_scans(yarp::os::idl::WireReader& reader)
907 {
908  if (!reader.read(scans)) {
909  reader.fail();
910  return false;
911  }
912  return true;
913 }
914 
915 // write scans field
916 bool LaserScan2D::write_scans(const yarp::os::idl::WireWriter& writer) const
917 {
918  if (!writer.write(scans)) {
919  return false;
920  }
921  return true;
922 }
923 
924 // read (nested) scans field
925 bool LaserScan2D::nested_read_scans(yarp::os::idl::WireReader& reader)
926 {
927  if (!reader.readNested(scans)) {
928  reader.fail();
929  return false;
930  }
931  return true;
932 }
933 
934 // write (nested) scans field
935 bool LaserScan2D::nested_write_scans(const yarp::os::idl::WireWriter& writer) const
936 {
937  if (!writer.writeNested(scans)) {
938  return false;
939  }
940  return true;
941 }
942 
943 // read status field
944 bool LaserScan2D::read_status(yarp::os::idl::WireReader& reader)
945 {
946  if (!reader.readI32(status)) {
947  reader.fail();
948  return false;
949  }
950  return true;
951 }
952 
953 // write status field
954 bool LaserScan2D::write_status(const yarp::os::idl::WireWriter& writer) const
955 {
956  if (!writer.writeI32(status)) {
957  return false;
958  }
959  return true;
960 }
961 
962 // read (nested) status field
963 bool LaserScan2D::nested_read_status(yarp::os::idl::WireReader& reader)
964 {
965  if (!reader.readI32(status)) {
966  reader.fail();
967  return false;
968  }
969  return true;
970 }
971 
972 // write (nested) status field
973 bool LaserScan2D::nested_write_status(const yarp::os::idl::WireWriter& writer) const
974 {
975  if (!writer.writeI32(status)) {
976  return false;
977  }
978  return true;
979 }
980 
981 } // namespace yarp
982 } // namespace dev
yarp::dev::LaserScan2D::Editor::will_set_range_min
virtual bool will_set_range_min()
Definition: LaserScan2D.cpp:262
yarp::os::Bottle
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
yarp::dev::LaserScan2D::Editor::set_scans
void set_scans(const yarp::sig::Vector &scans)
Definition: LaserScan2D.cpp:302
yarp::os::Bottle::toString
std::string toString() const override
Gives a human-readable textual representation of the bottle.
Definition: Bottle.cpp:214
yarp::os::idl::WireReader::readString
bool readString(std::string &str, bool *is_vocab=nullptr)
Definition: WireReader.cpp:339
yarp::os::createVocab
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
yarp::os::idl::WireWriter::writeFloat64
bool writeFloat64(yarp::conf::float64_t x) const
Definition: WireWriter.cpp:117
yarp::dev::LaserScan2D::angle_max
double angle_max
last angle of the scan [deg]
Definition: LaserScan2D.h:38
yarp::dev::LaserScan2D::status
std::int32_t status
Definition: LaserScan2D.h:51
yarp::dev::LaserScan2D::Editor::get_scans
const yarp::sig::Vector & get_scans() const
Definition: LaserScan2D.cpp:312
yarp::dev::LaserScan2D::Editor::did_set_range_max
virtual bool did_set_range_max()
Definition: LaserScan2D.cpp:296
yarp::os::Time::isValid
bool isValid()
Check if time is valid (non-zero).
Definition: Time.cpp:317
yarp::dev::LaserScan2D::Editor::stop_editing
void stop_editing()
Definition: LaserScan2D.cpp:182
yarp::dev::LaserScan2D::Editor::get_range_min
double get_range_min() const
Definition: LaserScan2D.cpp:256
yarp::dev::LaserScan2D::Editor::did_set_scans
virtual bool did_set_scans()
Definition: LaserScan2D.cpp:324
yarp::os::idl::WireWriter::writeString
bool writeString(const std::string &tag) const
Definition: WireWriter.cpp:166
yarp::dev::LaserScan2D
Definition: LaserScan2D.h:28
yarp::dev::LaserScan2D::Editor::will_set_angle_max
virtual bool will_set_angle_max()
Definition: LaserScan2D.cpp:234
yarp::os::idl::WireWriter::writeI32
bool writeI32(std::int32_t x) const
Definition: WireWriter.cpp:96
yarp::os::idl::WireWriter::isNull
bool isNull() const
Definition: WireWriter.cpp:50
yarp::dev::LaserScan2D::Editor::will_set_scans
virtual bool will_set_scans()
Definition: LaserScan2D.cpp:318
yarp::os::idl::WireWriter::isError
bool isError() const
Definition: WireWriter.cpp:136
yarp::os::idl::WireWriter::writeListHeader
bool writeListHeader(int len) const
Definition: WireWriter.cpp:183
yarp::os::idl::WireWriter::writeNested
bool writeNested(const WirePortable &obj) const
Definition: WireWriter.cpp:65
yarp::dev::LaserScan2D::Editor::state
LaserScan2D & state()
Definition: LaserScan2D.cpp:170
yarp::os::idl::WireWriter
IDL-friendly connection writer.
Definition: WireWriter.h:33
yarp::dev::LaserScan2D::Editor::set_angle_min
void set_angle_min(const double angle_min)
Definition: LaserScan2D.cpp:190
yarp::dev::LaserScan2D::Editor::set_range_max
void set_range_max(const double range_max)
Definition: LaserScan2D.cpp:274
yarp::dev::LaserScan2D::Editor::did_set_angle_min
virtual bool did_set_angle_min()
Definition: LaserScan2D.cpp:212
yarp::sig::VectorOf< double >
yarp::dev::LaserScan2D::Editor::write
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
Definition: LaserScan2D.cpp:557
LaserScan2D.h
yarp::dev::LaserScan2D::Editor::get_status
std::int32_t get_status() const
Definition: LaserScan2D.cpp:340
yarp::os::ConnectionWriter
An interface for writing to a network connection.
Definition: ConnectionWriter.h:40
yarp::os::idl::WireReader::expectAccept
void expectAccept()
Definition: WireReader.cpp:43
yarp::dev::LaserScan2D::Editor::set_angle_max
void set_angle_max(const double angle_max)
Definition: LaserScan2D.cpp:218
yarp::dev::LaserScan2D::Editor::did_set_status
virtual bool did_set_status()
Definition: LaserScan2D.cpp:352
yarp::dev::LaserScan2D::Editor::start_editing
void start_editing()
Definition: LaserScan2D.cpp:176
yarp::dev::LaserScan2D::Editor::get_range_max
double get_range_max() const
Definition: LaserScan2D.cpp:284
yarp::dev::LaserScan2D::Editor::did_set_angle_max
virtual bool did_set_angle_max()
Definition: LaserScan2D.cpp:240
yarp::os::idl::WireWriter::write
bool write(const WirePortable &obj) const
Definition: WireWriter.cpp:55
yarp::dev::LaserScan2D::range_max
double range_max
the maximum distance of the scan [m]
Definition: LaserScan2D.h:46
yarp::dev::LaserScan2D::Editor::edit
bool edit(LaserScan2D &obj, bool dirty=true)
Definition: LaserScan2D.cpp:152
yarp::dev::LaserScan2D::Editor::will_set_range_max
virtual bool will_set_range_max()
Definition: LaserScan2D.cpp:290
yarp::os::idl::WireReader::readNested
bool readNested(WirePortable &obj)
Definition: WireReader.cpp:91
yarp::dev::LaserScan2D::Editor::Editor
Editor()
Definition: LaserScan2D.cpp:125
yarp::os::idl::WireReader::read
bool read(WirePortable &obj)
Definition: WireReader.cpp:81
yarp::os::idl::WireWriter::writeTag
bool writeTag(const char *tag, int split, int len) const
Definition: WireWriter.cpp:141
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
yarp::os::idl::WireReader::fail
void fail()
Definition: WireReader.cpp:74
yarp::dev::LaserScan2D::Editor::will_set_status
virtual bool will_set_status()
Definition: LaserScan2D.cpp:346
yarp::dev::LaserScan2D::angle_min
double angle_min
first angle of the scan [deg]
Definition: LaserScan2D.h:34
yarp::os::Wire::yarp
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
Definition: Wire.h:34
yarp::dev::LaserScan2D::Editor::set_status
void set_status(const std::int32_t status)
Definition: LaserScan2D.cpp:330
yarp::dev::LaserScan2D::Editor::did_set_range_min
virtual bool did_set_range_min()
Definition: LaserScan2D.cpp:268
yarp::dev::LaserScan2D::Editor::get_angle_max
double get_angle_max() const
Definition: LaserScan2D.cpp:228
yarp::dev::LaserScan2D::Editor::~Editor
~Editor() override
Definition: LaserScan2D.cpp:144
yarp::os::idl::WireWriter::writeVocab
bool writeVocab(std::int32_t x) const
Definition: WireWriter.cpp:124
yarp::dev::LaserScan2D::Editor::read
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
Definition: LaserScan2D.cpp:364
yarp::os::idl::WireReader::accept
void accept()
Definition: WireReader.cpp:49
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::os::Bottle::read
bool read(ConnectionReader &reader) override
Set the bottle's value based on input from a network connection.
Definition: Bottle.cpp:243
yarp::dev::LaserScan2D::toString
std::string toString() const
Definition: LaserScan2D.cpp:117
yarp::dev::LaserScan2D::Editor::get_angle_min
double get_angle_min() const
Definition: LaserScan2D.cpp:200
yarp::os::idl::WireReader::getLength
int getLength() const
Definition: WireReader.h:153
yarp::dev::LaserScan2D::Editor::clean
void clean()
Definition: LaserScan2D.cpp:358
yarp::os::idl::WireReader::readI32
bool readI32(std::int32_t &x)
Definition: WireReader.cpp:178
yarp::dev::LaserScan2D::Editor::set_range_min
void set_range_min(const double range_min)
Definition: LaserScan2D.cpp:246
yarp::dev::LaserScan2D::LaserScan2D
LaserScan2D()
Definition: LaserScan2D.cpp:20
yarp::os::idl::WireReader::readFloat64
bool readFloat64(yarp::conf::float64_t &x)
Definition: WireReader.cpp:279
yarp::dev::LaserScan2D::scans
yarp::sig::Vector scans
the scan data, measured in [m].
Definition: LaserScan2D.h:50
yarp::dev::LaserScan2D::read
bool read(yarp::os::idl::WireReader &reader) override
Definition: LaserScan2D.cpp:49
yarp::dev::LaserScan2D::range_min
double range_min
the minimum distance of the scan [m]
Definition: LaserScan2D.h:42
yarp::dev::LaserScan2D::write
bool write(const yarp::os::idl::WireWriter &writer) const override
Definition: LaserScan2D.cpp:83
yarp::dev::LaserScan2D::Editor::isValid
bool isValid() const
Definition: LaserScan2D.cpp:164
yarp::dev::LaserScan2D::Editor::will_set_angle_min
virtual bool will_set_angle_min()
Definition: LaserScan2D.cpp:206
yarp::os::idl::WireReader::readListHeader
bool readListHeader()
Definition: WireReader.cpp:470
yarp::os::idl::WireReader::isError
bool isError()
Definition: WireReader.cpp:547