14 #include <SegmentationModule.h>
16 #include <yarp/os/idl/WireTypes.h>
18 class SegmentationModule_set_sigmaS_helper :
19 public yarp::os::Portable
22 explicit SegmentationModule_set_sigmaS_helper(
const double newValue);
23 bool write(yarp::os::ConnectionWriter& connection)
const override;
24 bool read(yarp::os::ConnectionReader& connection)
override;
29 SegmentationModule_set_sigmaS_helper::SegmentationModule_set_sigmaS_helper(
const double newValue) :
34 bool SegmentationModule_set_sigmaS_helper::write(yarp::os::ConnectionWriter& connection)
const
36 yarp::os::idl::WireWriter writer(connection);
37 if (!writer.writeListHeader(3)) {
40 if (!writer.writeTag(
"set_sigmaS", 1, 2)) {
43 if (!writer.writeFloat64(m_newValue)) {
49 bool SegmentationModule_set_sigmaS_helper::read(yarp::os::ConnectionReader& connection)
51 yarp::os::idl::WireReader reader(connection);
52 if (!reader.readListReturn()) {
58 class SegmentationModule_set_sigmaR_helper :
59 public yarp::os::Portable
62 explicit SegmentationModule_set_sigmaR_helper(
const double newValue);
63 bool write(yarp::os::ConnectionWriter& connection)
const override;
64 bool read(yarp::os::ConnectionReader& connection)
override;
69 SegmentationModule_set_sigmaR_helper::SegmentationModule_set_sigmaR_helper(
const double newValue) :
74 bool SegmentationModule_set_sigmaR_helper::write(yarp::os::ConnectionWriter& connection)
const
76 yarp::os::idl::WireWriter writer(connection);
77 if (!writer.writeListHeader(3)) {
80 if (!writer.writeTag(
"set_sigmaR", 1, 2)) {
83 if (!writer.writeFloat64(m_newValue)) {
89 bool SegmentationModule_set_sigmaR_helper::read(yarp::os::ConnectionReader& connection)
91 yarp::os::idl::WireReader reader(connection);
92 if (!reader.readListReturn()) {
98 class SegmentationModule_set_minRegion_helper :
99 public yarp::os::Portable
102 explicit SegmentationModule_set_minRegion_helper(
const double newValue);
103 bool write(yarp::os::ConnectionWriter& connection)
const override;
104 bool read(yarp::os::ConnectionReader& connection)
override;
109 SegmentationModule_set_minRegion_helper::SegmentationModule_set_minRegion_helper(
const double newValue) :
114 bool SegmentationModule_set_minRegion_helper::write(yarp::os::ConnectionWriter& connection)
const
116 yarp::os::idl::WireWriter writer(connection);
117 if (!writer.writeListHeader(3)) {
120 if (!writer.writeTag(
"set_minRegion", 1, 2)) {
123 if (!writer.writeFloat64(m_newValue)) {
129 bool SegmentationModule_set_minRegion_helper::read(yarp::os::ConnectionReader& connection)
131 yarp::os::idl::WireReader reader(connection);
132 if (!reader.readListReturn()) {
138 class SegmentationModule_set_gradWindRad_helper :
139 public yarp::os::Portable
142 explicit SegmentationModule_set_gradWindRad_helper(
const double newValue);
143 bool write(yarp::os::ConnectionWriter& connection)
const override;
144 bool read(yarp::os::ConnectionReader& connection)
override;
149 SegmentationModule_set_gradWindRad_helper::SegmentationModule_set_gradWindRad_helper(
const double newValue) :
154 bool SegmentationModule_set_gradWindRad_helper::write(yarp::os::ConnectionWriter& connection)
const
156 yarp::os::idl::WireWriter writer(connection);
157 if (!writer.writeListHeader(3)) {
160 if (!writer.writeTag(
"set_gradWindRad", 1, 2)) {
163 if (!writer.writeFloat64(m_newValue)) {
169 bool SegmentationModule_set_gradWindRad_helper::read(yarp::os::ConnectionReader& connection)
171 yarp::os::idl::WireReader reader(connection);
172 if (!reader.readListReturn()) {
178 class SegmentationModule_set_threshold_helper :
179 public yarp::os::Portable
182 explicit SegmentationModule_set_threshold_helper(
const double newValue);
183 bool write(yarp::os::ConnectionWriter& connection)
const override;
184 bool read(yarp::os::ConnectionReader& connection)
override;
189 SegmentationModule_set_threshold_helper::SegmentationModule_set_threshold_helper(
const double newValue) :
194 bool SegmentationModule_set_threshold_helper::write(yarp::os::ConnectionWriter& connection)
const
196 yarp::os::idl::WireWriter writer(connection);
197 if (!writer.writeListHeader(3)) {
200 if (!writer.writeTag(
"set_threshold", 1, 2)) {
203 if (!writer.writeFloat64(m_newValue)) {
209 bool SegmentationModule_set_threshold_helper::read(yarp::os::ConnectionReader& connection)
211 yarp::os::idl::WireReader reader(connection);
212 if (!reader.readListReturn()) {
218 class SegmentationModule_set_mixture_helper :
219 public yarp::os::Portable
222 explicit SegmentationModule_set_mixture_helper(
const double newValue);
223 bool write(yarp::os::ConnectionWriter& connection)
const override;
224 bool read(yarp::os::ConnectionReader& connection)
override;
229 SegmentationModule_set_mixture_helper::SegmentationModule_set_mixture_helper(
const double newValue) :
234 bool SegmentationModule_set_mixture_helper::write(yarp::os::ConnectionWriter& connection)
const
236 yarp::os::idl::WireWriter writer(connection);
237 if (!writer.writeListHeader(3)) {
240 if (!writer.writeTag(
"set_mixture", 1, 2)) {
243 if (!writer.writeFloat64(m_newValue)) {
249 bool SegmentationModule_set_mixture_helper::read(yarp::os::ConnectionReader& connection)
251 yarp::os::idl::WireReader reader(connection);
252 if (!reader.readListReturn()) {
258 class SegmentationModule_set_speedup_helper :
259 public yarp::os::Portable
262 explicit SegmentationModule_set_speedup_helper(
const SpeedUpLevelComm newSpeedLevel);
263 bool write(yarp::os::ConnectionWriter& connection)
const override;
264 bool read(yarp::os::ConnectionReader& connection)
override;
266 SpeedUpLevelComm m_newSpeedLevel;
269 SegmentationModule_set_speedup_helper::SegmentationModule_set_speedup_helper(
const SpeedUpLevelComm newSpeedLevel) :
270 m_newSpeedLevel{newSpeedLevel}
274 bool SegmentationModule_set_speedup_helper::write(yarp::os::ConnectionWriter& connection)
const
276 yarp::os::idl::WireWriter writer(connection);
277 if (!writer.writeListHeader(3)) {
280 if (!writer.writeTag(
"set_speedup", 1, 2)) {
283 if (!writer.writeI32(
static_cast<int32_t
>(m_newSpeedLevel))) {
289 bool SegmentationModule_set_speedup_helper::read(yarp::os::ConnectionReader& connection)
291 yarp::os::idl::WireReader reader(connection);
292 if (!reader.readListReturn()) {
298 class SegmentationModule_get_sigmaS_helper :
299 public yarp::os::Portable
302 explicit SegmentationModule_get_sigmaS_helper();
303 bool write(yarp::os::ConnectionWriter& connection)
const override;
304 bool read(yarp::os::ConnectionReader& connection)
override;
306 thread_local
static double s_return_helper;
309 thread_local
double SegmentationModule_get_sigmaS_helper::s_return_helper = {};
311 SegmentationModule_get_sigmaS_helper::SegmentationModule_get_sigmaS_helper()
313 s_return_helper = {};
316 bool SegmentationModule_get_sigmaS_helper::write(yarp::os::ConnectionWriter& connection)
const
318 yarp::os::idl::WireWriter writer(connection);
319 if (!writer.writeListHeader(2)) {
322 if (!writer.writeTag(
"get_sigmaS", 1, 2)) {
328 bool SegmentationModule_get_sigmaS_helper::read(yarp::os::ConnectionReader& connection)
330 yarp::os::idl::WireReader reader(connection);
331 if (!reader.readListReturn()) {
334 if (!reader.readFloat64(s_return_helper)) {
341 class SegmentationModule_get_sigmaR_helper :
342 public yarp::os::Portable
345 explicit SegmentationModule_get_sigmaR_helper();
346 bool write(yarp::os::ConnectionWriter& connection)
const override;
347 bool read(yarp::os::ConnectionReader& connection)
override;
349 thread_local
static double s_return_helper;
352 thread_local
double SegmentationModule_get_sigmaR_helper::s_return_helper = {};
354 SegmentationModule_get_sigmaR_helper::SegmentationModule_get_sigmaR_helper()
356 s_return_helper = {};
359 bool SegmentationModule_get_sigmaR_helper::write(yarp::os::ConnectionWriter& connection)
const
361 yarp::os::idl::WireWriter writer(connection);
362 if (!writer.writeListHeader(2)) {
365 if (!writer.writeTag(
"get_sigmaR", 1, 2)) {
371 bool SegmentationModule_get_sigmaR_helper::read(yarp::os::ConnectionReader& connection)
373 yarp::os::idl::WireReader reader(connection);
374 if (!reader.readListReturn()) {
377 if (!reader.readFloat64(s_return_helper)) {
384 class SegmentationModule_get_minRegion_helper :
385 public yarp::os::Portable
388 explicit SegmentationModule_get_minRegion_helper();
389 bool write(yarp::os::ConnectionWriter& connection)
const override;
390 bool read(yarp::os::ConnectionReader& connection)
override;
392 thread_local
static double s_return_helper;
395 thread_local
double SegmentationModule_get_minRegion_helper::s_return_helper = {};
397 SegmentationModule_get_minRegion_helper::SegmentationModule_get_minRegion_helper()
399 s_return_helper = {};
402 bool SegmentationModule_get_minRegion_helper::write(yarp::os::ConnectionWriter& connection)
const
404 yarp::os::idl::WireWriter writer(connection);
405 if (!writer.writeListHeader(2)) {
408 if (!writer.writeTag(
"get_minRegion", 1, 2)) {
414 bool SegmentationModule_get_minRegion_helper::read(yarp::os::ConnectionReader& connection)
416 yarp::os::idl::WireReader reader(connection);
417 if (!reader.readListReturn()) {
420 if (!reader.readFloat64(s_return_helper)) {
427 class SegmentationModule_get_gradWindRad_helper :
428 public yarp::os::Portable
431 explicit SegmentationModule_get_gradWindRad_helper();
432 bool write(yarp::os::ConnectionWriter& connection)
const override;
433 bool read(yarp::os::ConnectionReader& connection)
override;
435 thread_local
static double s_return_helper;
438 thread_local
double SegmentationModule_get_gradWindRad_helper::s_return_helper = {};
440 SegmentationModule_get_gradWindRad_helper::SegmentationModule_get_gradWindRad_helper()
442 s_return_helper = {};
445 bool SegmentationModule_get_gradWindRad_helper::write(yarp::os::ConnectionWriter& connection)
const
447 yarp::os::idl::WireWriter writer(connection);
448 if (!writer.writeListHeader(2)) {
451 if (!writer.writeTag(
"get_gradWindRad", 1, 2)) {
457 bool SegmentationModule_get_gradWindRad_helper::read(yarp::os::ConnectionReader& connection)
459 yarp::os::idl::WireReader reader(connection);
460 if (!reader.readListReturn()) {
463 if (!reader.readFloat64(s_return_helper)) {
470 class SegmentationModule_get_threshold_helper :
471 public yarp::os::Portable
474 explicit SegmentationModule_get_threshold_helper();
475 bool write(yarp::os::ConnectionWriter& connection)
const override;
476 bool read(yarp::os::ConnectionReader& connection)
override;
478 thread_local
static double s_return_helper;
481 thread_local
double SegmentationModule_get_threshold_helper::s_return_helper = {};
483 SegmentationModule_get_threshold_helper::SegmentationModule_get_threshold_helper()
485 s_return_helper = {};
488 bool SegmentationModule_get_threshold_helper::write(yarp::os::ConnectionWriter& connection)
const
490 yarp::os::idl::WireWriter writer(connection);
491 if (!writer.writeListHeader(2)) {
494 if (!writer.writeTag(
"get_threshold", 1, 2)) {
500 bool SegmentationModule_get_threshold_helper::read(yarp::os::ConnectionReader& connection)
502 yarp::os::idl::WireReader reader(connection);
503 if (!reader.readListReturn()) {
506 if (!reader.readFloat64(s_return_helper)) {
513 class SegmentationModule_get_mixture_helper :
514 public yarp::os::Portable
517 explicit SegmentationModule_get_mixture_helper();
518 bool write(yarp::os::ConnectionWriter& connection)
const override;
519 bool read(yarp::os::ConnectionReader& connection)
override;
521 thread_local
static double s_return_helper;
524 thread_local
double SegmentationModule_get_mixture_helper::s_return_helper = {};
526 SegmentationModule_get_mixture_helper::SegmentationModule_get_mixture_helper()
528 s_return_helper = {};
531 bool SegmentationModule_get_mixture_helper::write(yarp::os::ConnectionWriter& connection)
const
533 yarp::os::idl::WireWriter writer(connection);
534 if (!writer.writeListHeader(2)) {
537 if (!writer.writeTag(
"get_mixture", 1, 2)) {
543 bool SegmentationModule_get_mixture_helper::read(yarp::os::ConnectionReader& connection)
545 yarp::os::idl::WireReader reader(connection);
546 if (!reader.readListReturn()) {
549 if (!reader.readFloat64(s_return_helper)) {
556 class SegmentationModule_get_speedup_helper :
557 public yarp::os::Portable
560 explicit SegmentationModule_get_speedup_helper();
561 bool write(yarp::os::ConnectionWriter& connection)
const override;
562 bool read(yarp::os::ConnectionReader& connection)
override;
564 thread_local
static SpeedUpLevelComm s_return_helper;
567 thread_local SpeedUpLevelComm SegmentationModule_get_speedup_helper::s_return_helper = {};
569 SegmentationModule_get_speedup_helper::SegmentationModule_get_speedup_helper()
571 s_return_helper = {};
574 bool SegmentationModule_get_speedup_helper::write(yarp::os::ConnectionWriter& connection)
const
576 yarp::os::idl::WireWriter writer(connection);
577 if (!writer.writeListHeader(2)) {
580 if (!writer.writeTag(
"get_speedup", 1, 2)) {
586 bool SegmentationModule_get_speedup_helper::read(yarp::os::ConnectionReader& connection)
588 yarp::os::idl::WireReader reader(connection);
589 if (!reader.readListReturn()) {
593 SpeedUpLevelCommVocab cvrt1;
594 if (!reader.readEnum(ecast0, cvrt1)) {
598 s_return_helper =
static_cast<SpeedUpLevelComm
>(ecast0);
604 SegmentationModule::SegmentationModule()
606 yarp().setOwner(*
this);
609 void SegmentationModule::set_sigmaS(
const double newValue)
611 SegmentationModule_set_sigmaS_helper helper{newValue};
612 if (!yarp().canWrite()) {
613 yError(
"Missing server method '%s'?",
"void SegmentationModule::set_sigmaS(const double newValue)");
615 yarp().write(helper, helper);
618 void SegmentationModule::set_sigmaR(
const double newValue)
620 SegmentationModule_set_sigmaR_helper helper{newValue};
621 if (!yarp().canWrite()) {
622 yError(
"Missing server method '%s'?",
"void SegmentationModule::set_sigmaR(const double newValue)");
624 yarp().write(helper, helper);
627 void SegmentationModule::set_minRegion(
const double newValue)
629 SegmentationModule_set_minRegion_helper helper{newValue};
630 if (!yarp().canWrite()) {
631 yError(
"Missing server method '%s'?",
"void SegmentationModule::set_minRegion(const double newValue)");
633 yarp().write(helper, helper);
636 void SegmentationModule::set_gradWindRad(
const double newValue)
638 SegmentationModule_set_gradWindRad_helper helper{newValue};
639 if (!yarp().canWrite()) {
640 yError(
"Missing server method '%s'?",
"void SegmentationModule::set_gradWindRad(const double newValue)");
642 yarp().write(helper, helper);
645 void SegmentationModule::set_threshold(
const double newValue)
647 SegmentationModule_set_threshold_helper helper{newValue};
648 if (!yarp().canWrite()) {
649 yError(
"Missing server method '%s'?",
"void SegmentationModule::set_threshold(const double newValue)");
651 yarp().write(helper, helper);
654 void SegmentationModule::set_mixture(
const double newValue)
656 SegmentationModule_set_mixture_helper helper{newValue};
657 if (!yarp().canWrite()) {
658 yError(
"Missing server method '%s'?",
"void SegmentationModule::set_mixture(const double newValue)");
660 yarp().write(helper, helper);
663 void SegmentationModule::set_speedup(
const SpeedUpLevelComm newSpeedLevel)
665 SegmentationModule_set_speedup_helper helper{newSpeedLevel};
666 if (!yarp().canWrite()) {
667 yError(
"Missing server method '%s'?",
"void SegmentationModule::set_speedup(const SpeedUpLevelComm newSpeedLevel)");
669 yarp().write(helper, helper);
672 double SegmentationModule::get_sigmaS()
674 SegmentationModule_get_sigmaS_helper helper{};
675 if (!yarp().canWrite()) {
676 yError(
"Missing server method '%s'?",
"double SegmentationModule::get_sigmaS()");
678 bool ok = yarp().write(helper, helper);
679 return ok ? SegmentationModule_get_sigmaS_helper::s_return_helper :
double{};
682 double SegmentationModule::get_sigmaR()
684 SegmentationModule_get_sigmaR_helper helper{};
685 if (!yarp().canWrite()) {
686 yError(
"Missing server method '%s'?",
"double SegmentationModule::get_sigmaR()");
688 bool ok = yarp().write(helper, helper);
689 return ok ? SegmentationModule_get_sigmaR_helper::s_return_helper :
double{};
692 double SegmentationModule::get_minRegion()
694 SegmentationModule_get_minRegion_helper helper{};
695 if (!yarp().canWrite()) {
696 yError(
"Missing server method '%s'?",
"double SegmentationModule::get_minRegion()");
698 bool ok = yarp().write(helper, helper);
699 return ok ? SegmentationModule_get_minRegion_helper::s_return_helper :
double{};
702 double SegmentationModule::get_gradWindRad()
704 SegmentationModule_get_gradWindRad_helper helper{};
705 if (!yarp().canWrite()) {
706 yError(
"Missing server method '%s'?",
"double SegmentationModule::get_gradWindRad()");
708 bool ok = yarp().write(helper, helper);
709 return ok ? SegmentationModule_get_gradWindRad_helper::s_return_helper :
double{};
712 double SegmentationModule::get_threshold()
714 SegmentationModule_get_threshold_helper helper{};
715 if (!yarp().canWrite()) {
716 yError(
"Missing server method '%s'?",
"double SegmentationModule::get_threshold()");
718 bool ok = yarp().write(helper, helper);
719 return ok ? SegmentationModule_get_threshold_helper::s_return_helper :
double{};
722 double SegmentationModule::get_mixture()
724 SegmentationModule_get_mixture_helper helper{};
725 if (!yarp().canWrite()) {
726 yError(
"Missing server method '%s'?",
"double SegmentationModule::get_mixture()");
728 bool ok = yarp().write(helper, helper);
729 return ok ? SegmentationModule_get_mixture_helper::s_return_helper :
double{};
732 SpeedUpLevelComm SegmentationModule::get_speedup()
734 SegmentationModule_get_speedup_helper helper{};
735 if (!yarp().canWrite()) {
736 yError(
"Missing server method '%s'?",
"SpeedUpLevelComm SegmentationModule::get_speedup()");
738 bool ok = yarp().write(helper, helper);
739 return ok ? SegmentationModule_get_speedup_helper::s_return_helper : SpeedUpLevelComm{};
743 std::vector<std::string> SegmentationModule::help(
const std::string& functionName)
745 bool showAll = (functionName ==
"--all");
746 std::vector<std::string> helpString;
748 helpString.emplace_back(
"*** Available commands:");
749 helpString.emplace_back(
"set_sigmaS");
750 helpString.emplace_back(
"set_sigmaR");
751 helpString.emplace_back(
"set_minRegion");
752 helpString.emplace_back(
"set_gradWindRad");
753 helpString.emplace_back(
"set_threshold");
754 helpString.emplace_back(
"set_mixture");
755 helpString.emplace_back(
"set_speedup");
756 helpString.emplace_back(
"get_sigmaS");
757 helpString.emplace_back(
"get_sigmaR");
758 helpString.emplace_back(
"get_minRegion");
759 helpString.emplace_back(
"get_gradWindRad");
760 helpString.emplace_back(
"get_threshold");
761 helpString.emplace_back(
"get_mixture");
762 helpString.emplace_back(
"get_speedup");
763 helpString.emplace_back(
"help");
765 if (functionName ==
"set_sigmaS") {
766 helpString.emplace_back(
"void set_sigmaS(const double newValue) ");
768 if (functionName ==
"set_sigmaR") {
769 helpString.emplace_back(
"void set_sigmaR(const double newValue) ");
771 if (functionName ==
"set_minRegion") {
772 helpString.emplace_back(
"void set_minRegion(const double newValue) ");
774 if (functionName ==
"set_gradWindRad") {
775 helpString.emplace_back(
"void set_gradWindRad(const double newValue) ");
777 if (functionName ==
"set_threshold") {
778 helpString.emplace_back(
"void set_threshold(const double newValue) ");
780 if (functionName ==
"set_mixture") {
781 helpString.emplace_back(
"void set_mixture(const double newValue) ");
783 if (functionName ==
"set_speedup") {
784 helpString.emplace_back(
"void set_speedup(const SpeedUpLevelComm newSpeedLevel) ");
786 if (functionName ==
"get_sigmaS") {
787 helpString.emplace_back(
"double get_sigmaS() ");
789 if (functionName ==
"get_sigmaR") {
790 helpString.emplace_back(
"double get_sigmaR() ");
792 if (functionName ==
"get_minRegion") {
793 helpString.emplace_back(
"double get_minRegion() ");
795 if (functionName ==
"get_gradWindRad") {
796 helpString.emplace_back(
"double get_gradWindRad() ");
798 if (functionName ==
"get_threshold") {
799 helpString.emplace_back(
"double get_threshold() ");
801 if (functionName ==
"get_mixture") {
802 helpString.emplace_back(
"double get_mixture() ");
804 if (functionName ==
"get_speedup") {
805 helpString.emplace_back(
"SpeedUpLevelComm get_speedup() ");
807 if (functionName ==
"help") {
808 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
809 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
810 helpString.emplace_back(
"@param functionName name of command for which to get a detailed description. If none or '--all' is provided, print list of available commands");
811 helpString.emplace_back(
"@return list of strings (one string per line)");
814 if (helpString.empty()) {
815 helpString.emplace_back(
"Command not found");
821 bool SegmentationModule::read(yarp::os::ConnectionReader& connection)
823 yarp::os::idl::WireReader reader(connection);
824 reader.expectAccept();
825 if (!reader.readListHeader()) {
830 std::string tag = reader.readTag();
831 bool direct = (tag ==
"__direct__");
833 tag = reader.readTag();
835 while (!reader.isError()) {
836 if (tag ==
"set_sigmaS") {
838 if (!reader.readFloat64(newValue)) {
842 set_sigmaS(newValue);
843 yarp::os::idl::WireWriter writer(reader);
844 if (!writer.isNull()) {
845 if (!writer.writeListHeader(0)) {
852 if (tag ==
"set_sigmaR") {
854 if (!reader.readFloat64(newValue)) {
858 set_sigmaR(newValue);
859 yarp::os::idl::WireWriter writer(reader);
860 if (!writer.isNull()) {
861 if (!writer.writeListHeader(0)) {
868 if (tag ==
"set_minRegion") {
870 if (!reader.readFloat64(newValue)) {
874 set_minRegion(newValue);
875 yarp::os::idl::WireWriter writer(reader);
876 if (!writer.isNull()) {
877 if (!writer.writeListHeader(0)) {
884 if (tag ==
"set_gradWindRad") {
886 if (!reader.readFloat64(newValue)) {
890 set_gradWindRad(newValue);
891 yarp::os::idl::WireWriter writer(reader);
892 if (!writer.isNull()) {
893 if (!writer.writeListHeader(0)) {
900 if (tag ==
"set_threshold") {
902 if (!reader.readFloat64(newValue)) {
906 set_threshold(newValue);
907 yarp::os::idl::WireWriter writer(reader);
908 if (!writer.isNull()) {
909 if (!writer.writeListHeader(0)) {
916 if (tag ==
"set_mixture") {
918 if (!reader.readFloat64(newValue)) {
922 set_mixture(newValue);
923 yarp::os::idl::WireWriter writer(reader);
924 if (!writer.isNull()) {
925 if (!writer.writeListHeader(0)) {
932 if (tag ==
"set_speedup") {
933 SpeedUpLevelComm newSpeedLevel;
935 SpeedUpLevelCommVocab cvrt3;
936 if (!reader.readEnum(ecast2, cvrt3)) {
940 newSpeedLevel =
static_cast<SpeedUpLevelComm
>(ecast2);
942 set_speedup(newSpeedLevel);
943 yarp::os::idl::WireWriter writer(reader);
944 if (!writer.isNull()) {
945 if (!writer.writeListHeader(0)) {
952 if (tag ==
"get_sigmaS") {
953 SegmentationModule_get_sigmaS_helper::s_return_helper = get_sigmaS();
954 yarp::os::idl::WireWriter writer(reader);
955 if (!writer.isNull()) {
956 if (!writer.writeListHeader(1)) {
959 if (!writer.writeFloat64(SegmentationModule_get_sigmaS_helper::s_return_helper)) {
966 if (tag ==
"get_sigmaR") {
967 SegmentationModule_get_sigmaR_helper::s_return_helper = get_sigmaR();
968 yarp::os::idl::WireWriter writer(reader);
969 if (!writer.isNull()) {
970 if (!writer.writeListHeader(1)) {
973 if (!writer.writeFloat64(SegmentationModule_get_sigmaR_helper::s_return_helper)) {
980 if (tag ==
"get_minRegion") {
981 SegmentationModule_get_minRegion_helper::s_return_helper = get_minRegion();
982 yarp::os::idl::WireWriter writer(reader);
983 if (!writer.isNull()) {
984 if (!writer.writeListHeader(1)) {
987 if (!writer.writeFloat64(SegmentationModule_get_minRegion_helper::s_return_helper)) {
994 if (tag ==
"get_gradWindRad") {
995 SegmentationModule_get_gradWindRad_helper::s_return_helper = get_gradWindRad();
996 yarp::os::idl::WireWriter writer(reader);
997 if (!writer.isNull()) {
998 if (!writer.writeListHeader(1)) {
1001 if (!writer.writeFloat64(SegmentationModule_get_gradWindRad_helper::s_return_helper)) {
1008 if (tag ==
"get_threshold") {
1009 SegmentationModule_get_threshold_helper::s_return_helper = get_threshold();
1010 yarp::os::idl::WireWriter writer(reader);
1011 if (!writer.isNull()) {
1012 if (!writer.writeListHeader(1)) {
1015 if (!writer.writeFloat64(SegmentationModule_get_threshold_helper::s_return_helper)) {
1022 if (tag ==
"get_mixture") {
1023 SegmentationModule_get_mixture_helper::s_return_helper = get_mixture();
1024 yarp::os::idl::WireWriter writer(reader);
1025 if (!writer.isNull()) {
1026 if (!writer.writeListHeader(1)) {
1029 if (!writer.writeFloat64(SegmentationModule_get_mixture_helper::s_return_helper)) {
1036 if (tag ==
"get_speedup") {
1037 SegmentationModule_get_speedup_helper::s_return_helper = get_speedup();
1038 yarp::os::idl::WireWriter writer(reader);
1039 if (!writer.isNull()) {
1040 if (!writer.writeListHeader(1)) {
1043 if (!writer.writeI32(
static_cast<int32_t
>(SegmentationModule_get_speedup_helper::s_return_helper))) {
1050 if (tag ==
"help") {
1051 std::string functionName;
1052 if (!reader.readString(functionName)) {
1053 functionName =
"--all";
1055 auto help_strings = help(functionName);
1056 yarp::os::idl::WireWriter writer(reader);
1057 if (!writer.isNull()) {
1058 if (!writer.writeListHeader(2)) {
1061 if (!writer.writeTag(
"many", 1, 0)) {
1064 if (!writer.writeListBegin(BOTTLE_TAG_INT32,
static_cast<uint32_t
>(help_strings.size()))) {
1067 for (
const auto& help_string : help_strings) {
1068 if (!writer.writeString(help_string)) {
1072 if (!writer.writeListEnd()) {
1079 if (reader.noMore()) {
1083 std::string next_tag = reader.readTag();
1084 if (next_tag ==
"") {
1087 tag.append(
"_").append(next_tag);