YARP
Yet Another Robot Platform
Map2D_nws_yarp.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#ifndef YARP_DEV_MAP2D_NWS_YARP
7#define YARP_DEV_MAP2D_NWS_YARP
8
9#include <vector>
10#include <iostream>
11#include <string>
12#include <sstream>
13#include <mutex>
14
15#include <yarp/os/Network.h>
16#include <yarp/os/Port.h>
17#include <yarp/os/Bottle.h>
18#include <yarp/os/Time.h>
19#include <yarp/os/Property.h>
20
23#include <yarp/os/RpcServer.h>
24#include <yarp/sig/Vector.h>
25#include <yarp/dev/IMap2D.h>
26#include <yarp/dev/MapGrid2D.h>
28#include <yarp/dev/Map2DArea.h>
29#include <yarp/dev/Map2DPath.h>
32
33#include <yarp/dev/PolyDriver.h>
35#include <yarp/dev/api.h>
36
37#include "Map2DServerImpl.h"
38
57{
58public:
61 bool open(yarp::os::Searchable& params) override;
62 bool close() override;
63 bool detach() override;
64 bool attach(yarp::dev::PolyDriver* driver) override;
65
66private:
67 //thrift
68 IMap2DRPCd m_RPC;
69
70 //drivers and interfaces
71 yarp::dev::Nav2D::IMap2D* m_iMap2D = nullptr;
73
74private:
75 std::mutex m_mutex;
76 std::string m_rpcPortName;
77 yarp::os::RpcServer m_rpcPort;
78
79 bool read(yarp::os::ConnectionReader& connection) override;
80};
81
82#endif // YARP_DEV_MAP2D_NWS_YARP
contains the definition of a Map2DArea type
contains the definition of a Map2DLocation type
contains the definition of a Map2DPath type
contains the definition of a map type
contains the definition of a Vector type
map2D_nws_yarp: A device capable of read/save collections of maps from disk, and make them accessible...
Map2D_nws_yarp()
Map2D_nws_yarp.
bool detach() override
Detach the object (you must have first called attach).
bool attach(yarp::dev::PolyDriver *driver) override
Attach to another object.
bool open(yarp::os::Searchable &params) override
Open the DeviceDriver.
bool close() override
Close the DeviceDriver.
Interface implemented by all device drivers.
Definition: DeviceDriver.h:30
IMap2D Interface.
Definition: IMap2D.h:29
A container for a device driver.
Definition: PolyDriver.h:23
Helper interface for an object that can wrap/or "attach" to a single other device.
Definition: WrapperSingle.h:31
An interface for reading from a network connection.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:24
A port that is specialized as an RPC server.
Definition: RpcServer.h:23
A base class for nested structures that can be searched.
Definition: Searchable.h:63