/*
 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
 * SPDX-License-Identifier: BSD-3-Clause
 */

// Autogenerated by Thrift Compiler (0.14.1-yarped)
//
// This is an automatically generated file.
// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.

#include <INavigation2DMsgs.h>

#include <yarp/os/idl/WireTypes.h>

// stop_navigation_RPC helper class declaration
class INavigation2DMsgs_stop_navigation_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_stop_navigation_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"stop_navigation_RPC"};
    static constexpr size_t s_tag_len{3};
    static constexpr size_t s_cmd_len{3};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::stop_navigation_RPC()"};
    static constexpr const char* s_help{""};
};

// resume_navigation_RPC helper class declaration
class INavigation2DMsgs_resume_navigation_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_resume_navigation_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"resume_navigation_RPC"};
    static constexpr size_t s_tag_len{3};
    static constexpr size_t s_cmd_len{3};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::resume_navigation_RPC()"};
    static constexpr const char* s_help{""};
};

// suspend_navigation_RPC helper class declaration
class INavigation2DMsgs_suspend_navigation_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_suspend_navigation_RPC_helper() = default;
    explicit INavigation2DMsgs_suspend_navigation_RPC_helper(const double time_s);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        explicit Command(const double time_s);

        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);

        double time_s{0.0};
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)(const double);
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"suspend_navigation_RPC"};
    static constexpr size_t s_tag_len{3};
    static constexpr size_t s_cmd_len{4};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::suspend_navigation_RPC(const double time_s)"};
    static constexpr const char* s_help{""};
};

// recompute_current_navigation_path_RPC helper class declaration
class INavigation2DMsgs_recompute_current_navigation_path_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_recompute_current_navigation_path_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"recompute_current_navigation_path_RPC"};
    static constexpr size_t s_tag_len{5};
    static constexpr size_t s_cmd_len{5};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::recompute_current_navigation_path_RPC()"};
    static constexpr const char* s_help{""};
};

// get_navigation_status_RPC helper class declaration
class INavigation2DMsgs_get_navigation_status_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_get_navigation_status_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        return_get_navigation_status return_helper{};
    };

    using funcptr_t = return_get_navigation_status (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"get_navigation_status_RPC"};
    static constexpr size_t s_tag_len{4};
    static constexpr size_t s_cmd_len{4};
    static constexpr size_t s_reply_len{2};
    static constexpr const char* s_prototype{"return_get_navigation_status INavigation2DMsgs::get_navigation_status_RPC()"};
    static constexpr const char* s_help{""};
};

// get_current_nav_waypoint_RPC helper class declaration
class INavigation2DMsgs_get_current_nav_waypoint_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_get_current_nav_waypoint_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        return_get_current_nav_waypoint return_helper{};
    };

    using funcptr_t = return_get_current_nav_waypoint (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"get_current_nav_waypoint_RPC"};
    static constexpr size_t s_tag_len{5};
    static constexpr size_t s_cmd_len{5};
    static constexpr size_t s_reply_len{2};
    static constexpr const char* s_prototype{"return_get_current_nav_waypoint INavigation2DMsgs::get_current_nav_waypoint_RPC()"};
    static constexpr const char* s_help{""};
};

// get_all_navigation_waypoints_RPC helper class declaration
class INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper() = default;
    explicit INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper(const yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        explicit Command(const yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type);

        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);

        yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type{};
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        return_get_all_nav_waypoints return_helper{};
    };

    using funcptr_t = return_get_all_nav_waypoints (*)(const yarp::dev::Nav2D::TrajectoryTypeEnum);
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"get_all_navigation_waypoints_RPC"};
    static constexpr size_t s_tag_len{5};
    static constexpr size_t s_cmd_len{6};
    static constexpr size_t s_reply_len{2};
    static constexpr const char* s_prototype{"return_get_all_nav_waypoints INavigation2DMsgs::get_all_navigation_waypoints_RPC(const yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type)"};
    static constexpr const char* s_help{""};
};

// get_current_navigation_map_RPC helper class declaration
class INavigation2DMsgs_get_current_navigation_map_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_get_current_navigation_map_RPC_helper() = default;
    explicit INavigation2DMsgs_get_current_navigation_map_RPC_helper(const yarp::dev::Nav2D::NavigationMapTypeEnum map_type);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        explicit Command(const yarp::dev::Nav2D::NavigationMapTypeEnum map_type);

        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);

        yarp::dev::Nav2D::NavigationMapTypeEnum map_type{};
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        return_get_current_nav_map return_helper{};
    };

    using funcptr_t = return_get_current_nav_map (*)(const yarp::dev::Nav2D::NavigationMapTypeEnum);
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"get_current_navigation_map_RPC"};
    static constexpr size_t s_tag_len{5};
    static constexpr size_t s_cmd_len{6};
    static constexpr size_t s_reply_len{2};
    static constexpr const char* s_prototype{"return_get_current_nav_map INavigation2DMsgs::get_current_navigation_map_RPC(const yarp::dev::Nav2D::NavigationMapTypeEnum map_type)"};
    static constexpr const char* s_help{""};
};

// goto_target_by_absolute_location_RPC helper class declaration
class INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper() = default;
    explicit INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper(const yarp::dev::Nav2D::Map2DLocation& loc);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        explicit Command(const yarp::dev::Nav2D::Map2DLocation& loc);

        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);

        yarp::dev::Nav2D::Map2DLocation loc{};
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)(const yarp::dev::Nav2D::Map2DLocation&);
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"goto_target_by_absolute_location_RPC"};
    static constexpr size_t s_tag_len{6};
    static constexpr size_t s_cmd_len{7};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::goto_target_by_absolute_location_RPC(const yarp::dev::Nav2D::Map2DLocation& loc)"};
    static constexpr const char* s_help{""};
};

// goto_target_by_relative_location1_RPC helper class declaration
class INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper() = default;
    INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper(const double x, const double y);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        Command(const double x, const double y);

        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);

        double x{0.0};
        double y{0.0};
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)(const double, const double);
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"goto_target_by_relative_location1_RPC"};
    static constexpr size_t s_tag_len{6};
    static constexpr size_t s_cmd_len{8};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::goto_target_by_relative_location1_RPC(const double x, const double y)"};
    static constexpr const char* s_help{""};
};

// goto_target_by_relative_location2_RPC helper class declaration
class INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper() = default;
    INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper(const double x, const double y, const double theta);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        Command(const double x, const double y, const double theta);

        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);

        double x{0.0};
        double y{0.0};
        double theta{0.0};
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)(const double, const double, const double);
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"goto_target_by_relative_location2_RPC"};
    static constexpr size_t s_tag_len{6};
    static constexpr size_t s_cmd_len{9};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::goto_target_by_relative_location2_RPC(const double x, const double y, const double theta)"};
    static constexpr const char* s_help{""};
};

// get_absolute_location_of_current_target_RPC helper class declaration
class INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        return_get_abs_loc_of_curr_target return_helper{};
    };

    using funcptr_t = return_get_abs_loc_of_curr_target (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"get_absolute_location_of_current_target_RPC"};
    static constexpr size_t s_tag_len{7};
    static constexpr size_t s_cmd_len{7};
    static constexpr size_t s_reply_len{2};
    static constexpr const char* s_prototype{"return_get_abs_loc_of_curr_target INavigation2DMsgs::get_absolute_location_of_current_target_RPC()"};
    static constexpr const char* s_help{""};
};

// get_relative_location_of_current_target_RPC helper class declaration
class INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        return_get_rel_loc_of_curr_target return_helper{};
    };

    using funcptr_t = return_get_rel_loc_of_curr_target (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"get_relative_location_of_current_target_RPC"};
    static constexpr size_t s_tag_len{7};
    static constexpr size_t s_cmd_len{7};
    static constexpr size_t s_reply_len{4};
    static constexpr const char* s_prototype{"return_get_rel_loc_of_curr_target INavigation2DMsgs::get_relative_location_of_current_target_RPC()"};
    static constexpr const char* s_help{""};
};

// goto_target_by_absolute_location_and_set_name_RPC helper class declaration
class INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper() = default;
    INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper(const yarp::dev::Nav2D::Map2DLocation& loc, const std::string& name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        Command(const yarp::dev::Nav2D::Map2DLocation& loc, const std::string& name);

        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);

        yarp::dev::Nav2D::Map2DLocation loc{};
        std::string name{};
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)(const yarp::dev::Nav2D::Map2DLocation&, const std::string&);
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"goto_target_by_absolute_location_and_set_name_RPC"};
    static constexpr size_t s_tag_len{9};
    static constexpr size_t s_cmd_len{11};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::goto_target_by_absolute_location_and_set_name_RPC(const yarp::dev::Nav2D::Map2DLocation& loc, const std::string& name)"};
    static constexpr const char* s_help{""};
};

// apply_velocity_command_RPC helper class declaration
class INavigation2DMsgs_apply_velocity_command_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_apply_velocity_command_RPC_helper() = default;
    INavigation2DMsgs_apply_velocity_command_RPC_helper(const double x_vel, const double y_vel, const double theta_vel, const double timeout);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        Command(const double x_vel, const double y_vel, const double theta_vel, const double timeout);

        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);

        double x_vel{0.0};
        double y_vel{0.0};
        double theta_vel{0.0};
        double timeout{0.0};
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        bool return_helper{false};
    };

    using funcptr_t = bool (*)(const double, const double, const double, const double);
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"apply_velocity_command_RPC"};
    static constexpr size_t s_tag_len{4};
    static constexpr size_t s_cmd_len{8};
    static constexpr size_t s_reply_len{1};
    static constexpr const char* s_prototype{"bool INavigation2DMsgs::apply_velocity_command_RPC(const double x_vel, const double y_vel, const double theta_vel, const double timeout)"};
    static constexpr const char* s_help{""};
};

// get_last_velocity_command_RPC helper class declaration
class INavigation2DMsgs_get_last_velocity_command_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_get_last_velocity_command_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        return_get_last_velocity_command return_helper{};
    };

    using funcptr_t = return_get_last_velocity_command (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"get_last_velocity_command_RPC"};
    static constexpr size_t s_tag_len{5};
    static constexpr size_t s_cmd_len{5};
    static constexpr size_t s_reply_len{4};
    static constexpr const char* s_prototype{"return_get_last_velocity_command INavigation2DMsgs::get_last_velocity_command_RPC()"};
    static constexpr const char* s_help{""};
};

// get_name_of_current_target_RPC helper class declaration
class INavigation2DMsgs_get_name_of_current_target_RPC_helper :
        public yarp::os::Portable
{
public:
    INavigation2DMsgs_get_name_of_current_target_RPC_helper() = default;
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    class Command :
            public yarp::os::idl::WirePortable
    {
    public:
        Command() = default;
        ~Command() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool writeTag(const yarp::os::idl::WireWriter& writer) const;
        bool writeArgs(const yarp::os::idl::WireWriter& writer) const;

        bool read(yarp::os::idl::WireReader& reader) override;
        bool readTag(yarp::os::idl::WireReader& reader);
        bool readArgs(yarp::os::idl::WireReader& reader);
    };

    class Reply :
            public yarp::os::idl::WirePortable
    {
    public:
        Reply() = default;
        ~Reply() override = default;

        bool write(yarp::os::ConnectionWriter& connection) const override;
        bool read(yarp::os::ConnectionReader& connection) override;

        bool write(const yarp::os::idl::WireWriter& writer) const override;
        bool read(yarp::os::idl::WireReader& reader) override;

        return_get_name_of_current_target return_helper{};
    };

    using funcptr_t = return_get_name_of_current_target (*)();
    void call(INavigation2DMsgs* ptr);

    Command cmd;
    Reply reply;

    static constexpr const char* s_tag{"get_name_of_current_target_RPC"};
    static constexpr size_t s_tag_len{6};
    static constexpr size_t s_cmd_len{6};
    static constexpr size_t s_reply_len{2};
    static constexpr const char* s_prototype{"return_get_name_of_current_target INavigation2DMsgs::get_name_of_current_target_RPC()"};
    static constexpr const char* s_help{""};
};

// stop_navigation_RPC helper class implementation
bool INavigation2DMsgs_stop_navigation_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_stop_navigation_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_stop_navigation_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->stop_navigation_RPC();
}

// resume_navigation_RPC helper class implementation
bool INavigation2DMsgs_resume_navigation_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_resume_navigation_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_resume_navigation_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->resume_navigation_RPC();
}

// suspend_navigation_RPC helper class implementation
INavigation2DMsgs_suspend_navigation_RPC_helper::INavigation2DMsgs_suspend_navigation_RPC_helper(const double time_s) :
        cmd{time_s}
{
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

INavigation2DMsgs_suspend_navigation_RPC_helper::Command::Command(const double time_s) :
        time_s{time_s}
{
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeFloat64(time_s)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(time_s)) {
        reader.fail();
        return false;
    }
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_suspend_navigation_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_suspend_navigation_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->suspend_navigation_RPC(cmd.time_s);
}

// recompute_current_navigation_path_RPC helper class implementation
bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->recompute_current_navigation_path_RPC();
}

// get_navigation_status_RPC helper class implementation
bool INavigation2DMsgs_get_navigation_status_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.write(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_get_navigation_status_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.read(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_get_navigation_status_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->get_navigation_status_RPC();
}

// get_current_nav_waypoint_RPC helper class implementation
bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.write(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.read(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->get_current_nav_waypoint_RPC();
}

// get_all_navigation_waypoints_RPC helper class implementation
INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper(const yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type) :
        cmd{trajectory_type}
{
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::Command(const yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type) :
        trajectory_type{trajectory_type}
{
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeVocab32(static_cast<yarp::conf::vocab32_t>(trajectory_type))) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    yarp::conf::vocab32_t ecast2;
    if (!reader.readVocab32(ecast2)) {
        reader.fail();
        return false;
    }
    trajectory_type = static_cast<yarp::dev::Nav2D::TrajectoryTypeEnum>(ecast2);
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.write(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.read(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->get_all_navigation_waypoints_RPC(cmd.trajectory_type);
}

// get_current_navigation_map_RPC helper class implementation
INavigation2DMsgs_get_current_navigation_map_RPC_helper::INavigation2DMsgs_get_current_navigation_map_RPC_helper(const yarp::dev::Nav2D::NavigationMapTypeEnum map_type) :
        cmd{map_type}
{
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::Command(const yarp::dev::Nav2D::NavigationMapTypeEnum map_type) :
        map_type{map_type}
{
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeVocab32(static_cast<yarp::conf::vocab32_t>(map_type))) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    yarp::conf::vocab32_t ecast3;
    if (!reader.readVocab32(ecast3)) {
        reader.fail();
        return false;
    }
    map_type = static_cast<yarp::dev::Nav2D::NavigationMapTypeEnum>(ecast3);
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.write(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_get_current_navigation_map_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.read(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_get_current_navigation_map_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->get_current_navigation_map_RPC(cmd.map_type);
}

// goto_target_by_absolute_location_RPC helper class implementation
INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper(const yarp::dev::Nav2D::Map2DLocation& loc) :
        cmd{loc}
{
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::Command(const yarp::dev::Nav2D::Map2DLocation& loc) :
        loc{loc}
{
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeNested(loc)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readNested(loc)) {
        reader.fail();
        return false;
    }
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->goto_target_by_absolute_location_RPC(cmd.loc);
}

// goto_target_by_relative_location1_RPC helper class implementation
INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper(const double x, const double y) :
        cmd{x, y}
{
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::Command(const double x, const double y) :
        x{x},
        y{y}
{
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeFloat64(x)) {
        return false;
    }
    if (!writer.writeFloat64(y)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(x)) {
        reader.fail();
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(y)) {
        reader.fail();
        return false;
    }
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->goto_target_by_relative_location1_RPC(cmd.x, cmd.y);
}

// goto_target_by_relative_location2_RPC helper class implementation
INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper(const double x, const double y, const double theta) :
        cmd{x, y, theta}
{
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::Command(const double x, const double y, const double theta) :
        x{x},
        y{y},
        theta{theta}
{
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeFloat64(x)) {
        return false;
    }
    if (!writer.writeFloat64(y)) {
        return false;
    }
    if (!writer.writeFloat64(theta)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(x)) {
        reader.fail();
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(y)) {
        reader.fail();
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(theta)) {
        reader.fail();
        return false;
    }
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->goto_target_by_relative_location2_RPC(cmd.x, cmd.y, cmd.theta);
}

// get_absolute_location_of_current_target_RPC helper class implementation
bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.write(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.read(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->get_absolute_location_of_current_target_RPC();
}

// get_relative_location_of_current_target_RPC helper class implementation
bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.write(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.read(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->get_relative_location_of_current_target_RPC();
}

// goto_target_by_absolute_location_and_set_name_RPC helper class implementation
INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper(const yarp::dev::Nav2D::Map2DLocation& loc, const std::string& name) :
        cmd{loc, name}
{
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::Command(const yarp::dev::Nav2D::Map2DLocation& loc, const std::string& name) :
        loc{loc},
        name{name}
{
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeNested(loc)) {
        return false;
    }
    if (!writer.writeString(name)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readNested(loc)) {
        reader.fail();
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readString(name)) {
        reader.fail();
        return false;
    }
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->goto_target_by_absolute_location_and_set_name_RPC(cmd.loc, cmd.name);
}

// apply_velocity_command_RPC helper class implementation
INavigation2DMsgs_apply_velocity_command_RPC_helper::INavigation2DMsgs_apply_velocity_command_RPC_helper(const double x_vel, const double y_vel, const double theta_vel, const double timeout) :
        cmd{x_vel, y_vel, theta_vel, timeout}
{
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::Command(const double x_vel, const double y_vel, const double theta_vel, const double timeout) :
        x_vel{x_vel},
        y_vel{y_vel},
        theta_vel{theta_vel},
        timeout{timeout}
{
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeFloat64(x_vel)) {
        return false;
    }
    if (!writer.writeFloat64(y_vel)) {
        return false;
    }
    if (!writer.writeFloat64(theta_vel)) {
        return false;
    }
    if (!writer.writeFloat64(timeout)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(x_vel)) {
        reader.fail();
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(y_vel)) {
        reader.fail();
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(theta_vel)) {
        reader.fail();
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readFloat64(timeout)) {
        reader.fail();
        return false;
    }
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.writeBool(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_apply_velocity_command_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.readBool(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_apply_velocity_command_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->apply_velocity_command_RPC(cmd.x_vel, cmd.y_vel, cmd.theta_vel, cmd.timeout);
}

// get_last_velocity_command_RPC helper class implementation
bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.write(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_get_last_velocity_command_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.read(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_get_last_velocity_command_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->get_last_velocity_command_RPC();
}

// get_name_of_current_target_RPC helper class implementation
bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    return cmd.write(connection);
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    return reply.read(connection);
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Command::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(s_cmd_len)) {
        return false;
    }
    return write(writer);
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Command::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }
    return read(reader);
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Command::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writeTag(writer)) {
        return false;
    }
    if (!writeArgs(writer)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Command::writeTag(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.writeTag(s_tag, 1, s_tag_len)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Command::writeArgs(const yarp::os::idl::WireWriter& writer [[maybe_unused]]) const
{
    return true;
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Command::read(yarp::os::idl::WireReader& reader)
{
    if (!readTag(reader)) {
        return false;
    }
    if (!readArgs(reader)) {
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Command::readTag(yarp::os::idl::WireReader& reader)
{
    std::string tag = reader.readTag();
    if (reader.isError()) {
        return false;
    }
    if (tag != s_tag) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Command::readArgs(yarp::os::idl::WireReader& reader)
{
    if (!reader.noMore()) {
        reader.fail();
        return false;
    }
    return true;
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Reply::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    return write(writer);
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Reply::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    return read(reader);
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Reply::write(const yarp::os::idl::WireWriter& writer) const
{
    if (!writer.isNull()) {
        if (!writer.writeListHeader(s_reply_len)) {
            return false;
        }
        if (!writer.write(return_helper)) {
            return false;
        }
    }
    return true;
}

bool INavigation2DMsgs_get_name_of_current_target_RPC_helper::Reply::read(yarp::os::idl::WireReader& reader)
{
    if (!reader.readListReturn()) {
        return false;
    }
    if (reader.noMore()) {
        reader.fail();
        return false;
    }
    if (!reader.read(return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

void INavigation2DMsgs_get_name_of_current_target_RPC_helper::call(INavigation2DMsgs* ptr)
{
    reply.return_helper = ptr->get_name_of_current_target_RPC();
}

// Constructor
INavigation2DMsgs::INavigation2DMsgs()
{
    yarp().setOwner(*this);
}

bool INavigation2DMsgs::stop_navigation_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_stop_navigation_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_stop_navigation_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

bool INavigation2DMsgs::resume_navigation_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_resume_navigation_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_resume_navigation_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

bool INavigation2DMsgs::suspend_navigation_RPC(const double time_s)
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_suspend_navigation_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_suspend_navigation_RPC_helper helper{time_s};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

bool INavigation2DMsgs::recompute_current_navigation_path_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_recompute_current_navigation_path_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

return_get_navigation_status INavigation2DMsgs::get_navigation_status_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_get_navigation_status_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_get_navigation_status_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : return_get_navigation_status{};
}

return_get_current_nav_waypoint INavigation2DMsgs::get_current_nav_waypoint_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_get_current_nav_waypoint_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : return_get_current_nav_waypoint{};
}

return_get_all_nav_waypoints INavigation2DMsgs::get_all_navigation_waypoints_RPC(const yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type)
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper helper{trajectory_type};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : return_get_all_nav_waypoints{};
}

return_get_current_nav_map INavigation2DMsgs::get_current_navigation_map_RPC(const yarp::dev::Nav2D::NavigationMapTypeEnum map_type)
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_get_current_navigation_map_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_get_current_navigation_map_RPC_helper helper{map_type};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : return_get_current_nav_map{};
}

bool INavigation2DMsgs::goto_target_by_absolute_location_RPC(const yarp::dev::Nav2D::Map2DLocation& loc)
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper helper{loc};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

bool INavigation2DMsgs::goto_target_by_relative_location1_RPC(const double x, const double y)
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper helper{x, y};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

bool INavigation2DMsgs::goto_target_by_relative_location2_RPC(const double x, const double y, const double theta)
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper helper{x, y, theta};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

return_get_abs_loc_of_curr_target INavigation2DMsgs::get_absolute_location_of_current_target_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : return_get_abs_loc_of_curr_target{};
}

return_get_rel_loc_of_curr_target INavigation2DMsgs::get_relative_location_of_current_target_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : return_get_rel_loc_of_curr_target{};
}

bool INavigation2DMsgs::goto_target_by_absolute_location_and_set_name_RPC(const yarp::dev::Nav2D::Map2DLocation& loc, const std::string& name)
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper helper{loc, name};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

bool INavigation2DMsgs::apply_velocity_command_RPC(const double x_vel, const double y_vel, const double theta_vel, const double timeout)
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_apply_velocity_command_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_apply_velocity_command_RPC_helper helper{x_vel, y_vel, theta_vel, timeout};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : bool{};
}

return_get_last_velocity_command INavigation2DMsgs::get_last_velocity_command_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_get_last_velocity_command_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_get_last_velocity_command_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : return_get_last_velocity_command{};
}

return_get_name_of_current_target INavigation2DMsgs::get_name_of_current_target_RPC()
{
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", INavigation2DMsgs_get_name_of_current_target_RPC_helper::s_prototype);
    }
    INavigation2DMsgs_get_name_of_current_target_RPC_helper helper{};
    bool ok = yarp().write(helper, helper);
    return ok ? helper.reply.return_helper : return_get_name_of_current_target{};
}

// help method
std::vector<std::string> INavigation2DMsgs::help(const std::string& functionName)
{
    bool showAll = (functionName == "--all");
    std::vector<std::string> helpString;
    if (showAll) {
        helpString.emplace_back("*** Available commands:");
        helpString.emplace_back(INavigation2DMsgs_stop_navigation_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_resume_navigation_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_suspend_navigation_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_get_navigation_status_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_get_current_navigation_map_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_apply_velocity_command_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_get_last_velocity_command_RPC_helper::s_tag);
        helpString.emplace_back(INavigation2DMsgs_get_name_of_current_target_RPC_helper::s_tag);
        helpString.emplace_back("help");
    } else {
        if (functionName == INavigation2DMsgs_stop_navigation_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_stop_navigation_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_resume_navigation_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_resume_navigation_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_suspend_navigation_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_suspend_navigation_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_get_navigation_status_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_get_navigation_status_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_get_current_navigation_map_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_get_current_navigation_map_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_apply_velocity_command_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_apply_velocity_command_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_get_last_velocity_command_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_get_last_velocity_command_RPC_helper::s_prototype);
        }
        if (functionName == INavigation2DMsgs_get_name_of_current_target_RPC_helper::s_tag) {
            helpString.emplace_back(INavigation2DMsgs_get_name_of_current_target_RPC_helper::s_prototype);
        }
        if (functionName == "help") {
            helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
            helpString.emplace_back("Return list of available commands, or help message for a specific function");
            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");
            helpString.emplace_back("@return list of strings (one string per line)");
        }
    }
    if (helpString.empty()) {
        helpString.emplace_back("Command not found");
    }
    return helpString;
}

// read from ConnectionReader
bool INavigation2DMsgs::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    reader.expectAccept();
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }

    std::string tag = reader.readTag();
    bool direct = (tag == "__direct__");
    if (direct) {
        tag = reader.readTag();
    }
    while (!reader.isError()) {
        if (tag == INavigation2DMsgs_stop_navigation_RPC_helper::s_tag) {
            INavigation2DMsgs_stop_navigation_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_resume_navigation_RPC_helper::s_tag) {
            INavigation2DMsgs_resume_navigation_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_suspend_navigation_RPC_helper::s_tag) {
            INavigation2DMsgs_suspend_navigation_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_recompute_current_navigation_path_RPC_helper::s_tag) {
            INavigation2DMsgs_recompute_current_navigation_path_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_get_navigation_status_RPC_helper::s_tag) {
            INavigation2DMsgs_get_navigation_status_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_get_current_nav_waypoint_RPC_helper::s_tag) {
            INavigation2DMsgs_get_current_nav_waypoint_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper::s_tag) {
            INavigation2DMsgs_get_all_navigation_waypoints_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_get_current_navigation_map_RPC_helper::s_tag) {
            INavigation2DMsgs_get_current_navigation_map_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper::s_tag) {
            INavigation2DMsgs_goto_target_by_absolute_location_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper::s_tag) {
            INavigation2DMsgs_goto_target_by_relative_location1_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper::s_tag) {
            INavigation2DMsgs_goto_target_by_relative_location2_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper::s_tag) {
            INavigation2DMsgs_get_absolute_location_of_current_target_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper::s_tag) {
            INavigation2DMsgs_get_relative_location_of_current_target_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper::s_tag) {
            INavigation2DMsgs_goto_target_by_absolute_location_and_set_name_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_apply_velocity_command_RPC_helper::s_tag) {
            INavigation2DMsgs_apply_velocity_command_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_get_last_velocity_command_RPC_helper::s_tag) {
            INavigation2DMsgs_get_last_velocity_command_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == INavigation2DMsgs_get_name_of_current_target_RPC_helper::s_tag) {
            INavigation2DMsgs_get_name_of_current_target_RPC_helper helper;
            if (!helper.cmd.readArgs(reader)) {
                return false;
            }

            helper.call(this);

            yarp::os::idl::WireWriter writer(reader);
            if (!helper.reply.write(writer)) {
                return false;
            }
            reader.accept();
            return true;
        }
        if (tag == "help") {
            std::string functionName;
            if (!reader.readString(functionName)) {
                functionName = "--all";
            }
            auto help_strings = help(functionName);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.writeTag("many", 1, 0)) {
                    return false;
                }
                if (!writer.writeListBegin(BOTTLE_TAG_INT32, static_cast<uint32_t>(help_strings.size()))) {
                    return false;
                }
                for (const auto& help_string : help_strings) {
                    if (!writer.writeString(help_string)) {
                        return false;
                    }
                }
                if (!writer.writeListEnd()) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (reader.noMore()) {
            reader.fail();
            return false;
        }
        std::string next_tag = reader.readTag();
        if (next_tag.empty()) {
            break;
        }
        tag.append("_").append(next_tag);
    }
    return false;
}
