67 static constexpr const char*
s_tag{
"start_localization_service_RPC"};
71 static constexpr const char*
s_prototype{
"bool ILocalization2DMsgs::start_localization_service_RPC()"};
72 static constexpr const char*
s_help{
""};
125 static constexpr const char*
s_tag{
"stop_localization_service_RPC"};
129 static constexpr const char*
s_prototype{
"bool ILocalization2DMsgs::stop_localization_service_RPC()"};
183 static constexpr const char*
s_tag{
"get_localization_status_RPC"};
187 static constexpr const char*
s_prototype{
"return_get_localization_status ILocalization2DMsgs::get_localization_status_RPC()"};
241 static constexpr const char*
s_tag{
"get_estimated_poses_RPC"};
245 static constexpr const char*
s_prototype{
"return_get_estimated_poses ILocalization2DMsgs::get_estimated_poses_RPC()"};
299 static constexpr const char*
s_tag{
"get_current_position1_RPC"};
303 static constexpr const char*
s_prototype{
"return_get_current_position1 ILocalization2DMsgs::get_current_position1_RPC()"};
357 static constexpr const char*
s_tag{
"get_current_position2_RPC"};
361 static constexpr const char*
s_prototype{
"return_get_current_position2 ILocalization2DMsgs::get_current_position2_RPC()"};
415 static constexpr const char*
s_tag{
"get_estimated_odometry_RPC"};
419 static constexpr const char*
s_prototype{
"return_get_estimated_odometry ILocalization2DMsgs::get_estimated_odometry_RPC()"};
478 static constexpr const char*
s_tag{
"set_initial_pose1_RPC"};
482 static constexpr const char*
s_prototype{
"bool ILocalization2DMsgs::set_initial_pose1_RPC(const yarp::dev::Nav2D::Map2DLocation& loc)"};
542 static constexpr const char*
s_tag{
"set_initial_pose2_RPC"};
546 static constexpr const char*
s_prototype{
"bool ILocalization2DMsgs::set_initial_pose2_RPC(const yarp::dev::Nav2D::Map2DLocation& loc, const yarp::sig::Matrix& cov)"};
567 return write(writer);
582 if (!writeTag(writer)) {
585 if (!writeArgs(writer)) {
606 if (!readTag(reader)) {
609 if (!readArgs(reader)) {
640 return write(writer);
671 if (!reader.
readBool(return_helper)) {
700 return write(writer);
715 if (!writeTag(writer)) {
718 if (!writeArgs(writer)) {
739 if (!readTag(reader)) {
742 if (!readArgs(reader)) {
773 return write(writer);
804 if (!reader.
readBool(return_helper)) {
833 return write(writer);
848 if (!writeTag(writer)) {
851 if (!writeArgs(writer)) {
872 if (!readTag(reader)) {
875 if (!readArgs(reader)) {
906 return write(writer);
921 if (!writer.
write(return_helper)) {
937 if (!reader.
read(return_helper)) {
966 return write(writer);
981 if (!writeTag(writer)) {
984 if (!writeArgs(writer)) {
1005 if (!readTag(reader)) {
1008 if (!readArgs(reader)) {
1039 return write(writer);
1045 return read(reader);
1054 if (!writer.
write(return_helper)) {
1070 if (!reader.
read(return_helper)) {
1099 return write(writer);
1109 return read(reader);
1114 if (!writeTag(writer)) {
1117 if (!writeArgs(writer)) {
1138 if (!readTag(reader)) {
1141 if (!readArgs(reader)) {
1172 return write(writer);
1178 return read(reader);
1187 if (!writer.
write(return_helper)) {
1203 if (!reader.
read(return_helper)) {
1232 return write(writer);
1242 return read(reader);
1247 if (!writeTag(writer)) {
1250 if (!writeArgs(writer)) {
1271 if (!readTag(reader)) {
1274 if (!readArgs(reader)) {
1305 return write(writer);
1311 return read(reader);
1320 if (!writer.
write(return_helper)) {
1336 if (!reader.
read(return_helper)) {
1365 return write(writer);
1375 return read(reader);
1380 if (!writeTag(writer)) {
1383 if (!writeArgs(writer)) {
1404 if (!readTag(reader)) {
1407 if (!readArgs(reader)) {
1438 return write(writer);
1444 return read(reader);
1453 if (!writer.
write(return_helper)) {
1469 if (!reader.
read(return_helper)) {
1508 return write(writer);
1518 return read(reader);
1523 if (!writeTag(writer)) {
1526 if (!writeArgs(writer)) {
1550 if (!readTag(reader)) {
1553 if (!readArgs(reader)) {
1592 return write(writer);
1598 return read(reader);
1623 if (!reader.
readBool(return_helper)) {
1663 return write(writer);
1673 return read(reader);
1678 if (!writeTag(writer)) {
1681 if (!writeArgs(writer)) {
1708 if (!readTag(reader)) {
1711 if (!readArgs(reader)) {
1758 return write(writer);
1764 return read(reader);
1789 if (!reader.
readBool(return_helper)) {
1804 yarp().setOwner(*
this);
1809 if (!
yarp().canWrite()) {
1813 bool ok =
yarp().write(helper, helper);
1814 return ok ? helper.reply.return_helper :
bool{};
1819 if (!
yarp().canWrite()) {
1823 bool ok =
yarp().write(helper, helper);
1824 return ok ? helper.reply.return_helper :
bool{};
1829 if (!
yarp().canWrite()) {
1833 bool ok =
yarp().write(helper, helper);
1839 if (!
yarp().canWrite()) {
1843 bool ok =
yarp().write(helper, helper);
1849 if (!
yarp().canWrite()) {
1853 bool ok =
yarp().write(helper, helper);
1859 if (!
yarp().canWrite()) {
1863 bool ok =
yarp().write(helper, helper);
1869 if (!
yarp().canWrite()) {
1873 bool ok =
yarp().write(helper, helper);
1879 if (!
yarp().canWrite()) {
1883 bool ok =
yarp().write(helper, helper);
1884 return ok ? helper.reply.return_helper :
bool{};
1889 if (!
yarp().canWrite()) {
1893 bool ok =
yarp().write(helper, helper);
1894 return ok ? helper.reply.return_helper :
bool{};
1900 bool showAll = (functionName ==
"--all");
1901 std::vector<std::string> helpString;
1903 helpString.emplace_back(
"*** Available commands:");
1913 helpString.emplace_back(
"help");
1942 if (functionName ==
"help") {
1943 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
1944 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
1945 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");
1946 helpString.emplace_back(
"@return list of strings (one string per line)");
1949 if (helpString.empty()) {
1950 helpString.emplace_back(
"Command not found");
1958 constexpr size_t max_tag_len = 4;
1968 std::string tag = reader.
readTag(1);
1969 bool direct = (tag ==
"__direct__");
1973 while (tag_len <= max_tag_len && !reader.
isError()) {
2109 if (tag ==
"help") {
2110 std::string functionName;
2112 functionName =
"--all";
2114 auto help_strings = help(functionName);
2120 if (!writer.
writeTag(
"many", 1, 0)) {
2126 for (
const auto& help_string : help_strings) {
2142 std::string next_tag = reader.
readTag(1);
2143 if (next_tag.empty()) {
2146 tag.append(
"_").append(next_tag);
2147 tag_len = std::count(tag.begin(), tag.end(),
'_') + 1;
bool writeTag(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
return_get_current_position1 return_helper
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void call(ILocalization2DMsgs *ptr)
static constexpr const char * s_help
static constexpr size_t s_tag_len
return_get_current_position1(*)() funcptr_t
static constexpr const char * s_prototype
static constexpr size_t s_reply_len
static constexpr size_t s_cmd_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_tag
ILocalization2DMsgs_get_current_position1_RPC_helper()=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
return_get_current_position2 return_helper
~Reply() override=default
static constexpr const char * s_help
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_tag_len
void call(ILocalization2DMsgs *ptr)
return_get_current_position2(*)() funcptr_t
static constexpr size_t s_cmd_len
static constexpr const char * s_tag
ILocalization2DMsgs_get_current_position2_RPC_helper()=default
static constexpr size_t s_reply_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
~Command() override=default
return_get_estimated_odometry return_helper
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_tag_len
static constexpr size_t s_cmd_len
ILocalization2DMsgs_get_estimated_odometry_RPC_helper()=default
static constexpr const char * s_prototype
static constexpr const char * s_help
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_reply_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_tag
void call(ILocalization2DMsgs *ptr)
return_get_estimated_odometry(*)() funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
return_get_estimated_poses return_helper
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
return_get_estimated_poses(*)() funcptr_t
static constexpr size_t s_reply_len
ILocalization2DMsgs_get_estimated_poses_RPC_helper()=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_tag
void call(ILocalization2DMsgs *ptr)
static constexpr size_t s_tag_len
static constexpr const char * s_prototype
static constexpr size_t s_cmd_len
static constexpr const char * s_help
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_get_localization_status return_helper
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void call(ILocalization2DMsgs *ptr)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
ILocalization2DMsgs_get_localization_status_RPC_helper()=default
static constexpr const char * s_help
static constexpr const char * s_tag
static constexpr const char * s_prototype
static constexpr size_t s_cmd_len
return_get_localization_status(*)() funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_tag_len
static constexpr size_t s_reply_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Command() override=default
yarp::dev::Nav2D::Map2DLocation loc
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
bool(*)(const yarp::dev::Nav2D::Map2DLocation &) funcptr_t
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
void call(ILocalization2DMsgs *ptr)
static constexpr size_t s_cmd_len
static constexpr const char * s_prototype
static constexpr size_t s_tag_len
ILocalization2DMsgs_set_initial_pose1_RPC_helper()=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_tag
static constexpr size_t s_reply_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::Nav2D::Map2DLocation loc
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
~Command() override=default
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_cmd_len
void call(ILocalization2DMsgs *ptr)
bool(*)(const yarp::dev::Nav2D::Map2DLocation &, const yarp::sig::Matrix &) funcptr_t
static constexpr size_t s_tag_len
static constexpr const char * s_tag
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_reply_len
ILocalization2DMsgs_set_initial_pose2_RPC_helper()=default
static constexpr const char * s_help
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_prototype
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
static constexpr const char * s_tag
static constexpr size_t s_reply_len
static constexpr const char * s_prototype
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_tag_len
static constexpr size_t s_cmd_len
void call(ILocalization2DMsgs *ptr)
ILocalization2DMsgs_start_localization_service_RPC_helper()=default
static constexpr const char * s_help
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
~Command() override=default
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
static constexpr const char * s_prototype
static constexpr const char * s_help
static constexpr size_t s_reply_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_tag
void call(ILocalization2DMsgs *ptr)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_tag_len
ILocalization2DMsgs_stop_localization_service_RPC_helper()=default
static constexpr size_t s_cmd_len
virtual return_get_estimated_poses get_estimated_poses_RPC()
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_get_current_position1 get_current_position1_RPC()
virtual bool start_localization_service_RPC()
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual return_get_estimated_odometry get_estimated_odometry_RPC()
virtual return_get_localization_status get_localization_status_RPC()
virtual bool set_initial_pose1_RPC(const yarp::dev::Nav2D::Map2DLocation &loc)
virtual return_get_current_position2 get_current_position2_RPC()
virtual bool set_initial_pose2_RPC(const yarp::dev::Nav2D::Map2DLocation &loc, const yarp::sig::Matrix &cov)
virtual bool stop_localization_service_RPC()
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
IDL-friendly connection reader.
bool readNested(WirePortable &obj)
bool readString(std::string &str, bool *is_vocab=nullptr)
std::string readTag(size_t len=static_cast< size_t >(-1))
bool read(WirePortable &obj)
IDL-friendly connection writer.
bool writeBool(bool x, bool skip_tag=false) const
bool write(const WirePortable &obj) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeString(const std::string &str, bool skip_tag=false) const
bool writeListEnd() const
bool writeNested(const WirePortable &obj) const
bool writeListBegin(int tag, size_t len) const
The main, catch-all namespace for YARP.