YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
map2D_nwc_test.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
7#include <yarp/dev/IMap2D.h>
10#include <yarp/os/Network.h>
11#include <yarp/os/LogStream.h>
12#include <yarp/dev/PolyDriver.h>
15
16#include <catch2/catch_amalgamated.hpp>
17#include <harness.h>
18
19using namespace yarp::dev;
20using namespace yarp::dev::Nav2D;
21using namespace yarp::sig;
22using namespace yarp::os;
23
24TEST_CASE("dev::Map2DnwcTest", "[yarp::dev]")
25{
26 YARP_REQUIRE_PLUGIN("map2D_nws_yarp", "device");
27 YARP_REQUIRE_PLUGIN("map2D_nwc_yarp", "device");
28 YARP_REQUIRE_PLUGIN("map2DStorage", "device");
29
30 Network::setLocalMode(true);
31
32 SECTION("Checking map2D_nwc_yarp <-> map2D_nws_yarp communication and yarp::dev::Nav2D::IMap2D methods")
33 {
37 IMap2D* imap = nullptr;
38
40 {
42 pmapserver_cfg.put("device", "map2D_nws_yarp");
44
46 pmapstorage_cfg.put("device", "map2DStorage");
48
51 bool result_att = ww_nws->attach(&ddmapstorage);
53
55 pmapclient_cfg.put("device", "map2D_nwc_yarp");
56 pmapclient_cfg.put("local", "/mapClientTest");
57 pmapclient_cfg.put("remote", "/map2D_nws_yarp");
60 }
61
62 //execute tests
65
66 //"Close all polydrivers and check"
67 {
73 }
74 }
75
76 Network::setLocalMode(false);
77}
contains the definition of a Map2DArea type
contains the definition of a Map2DLocation type
IMap2D Interface.
Definition IMap2D.h:30
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.
A mini-server for performing network communication in the background.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A class for storing options and configuration information.
Definition Property.h:33
TEST_CASE("dev::Map2DnwcTest", "[yarp::dev]")
void exec_iMap2D_test_1(IMap2D *imap)
Definition IMap2DTest.h:20
void exec_iMap2D_test_2(IMap2D *imap)
Definition IMap2DTest.h:72
For streams capable of holding different kinds of content, check what they actually have.
void delay(double seconds)
Wait for a certain number of seconds.
Definition Time.cpp:111
An interface to the operating system, including Port based communication.