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>
16
17#include <catch2/catch_amalgamated.hpp>
18#include <harness.h>
19
20using namespace yarp::dev;
21using namespace yarp::dev::Nav2D;
22using namespace yarp::sig;
23using namespace yarp::os;
24
25TEST_CASE("dev::Map2DnwcTest", "[yarp::dev]")
26{
27 YARP_REQUIRE_PLUGIN("map2D_nws_yarp", "device");
28 YARP_REQUIRE_PLUGIN("map2D_nwc_yarp", "device");
29 YARP_REQUIRE_PLUGIN("map2DStorage", "device");
30
31 Network::setLocalMode(true);
32
33 SECTION("Checking map2D_nwc_yarp <-> map2D_nws_yarp communication and yarp::dev::Nav2D::IMap2D methods")
34 {
38 IMap2D* imap = nullptr;
39
41 {
43 pmapserver_cfg.put("device", "map2D_nws_yarp");
46
48 pmapstorage_cfg.put("device", "map2DStorage");
51
54 bool result_att = ww_nws->attach(&ddmapstorage);
56
58 pmapclient_cfg.put("device", "map2D_nwc_yarp");
59 pmapclient_cfg.put("local", "/mapClientTest");
60 pmapclient_cfg.put("remote", "/map2D_nws_yarp");
64 }
65
66 //execute tests
71
72 //"Close all polydrivers and check"
73 {
79 }
80 }
81
82 Network::setLocalMode(false);
83}
contains the definition of a Map2DArea type
contains the definition of a Map2DLocation type
IMap2D Interface.
Definition IMap2D.h:31
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_3(IMap2D *imap)
Definition IMap2DTest.h:331
void exec_iMap2D_test_1(IMap2D *imap)
Definition IMap2DTest.h:35
void exec_params_test(yarp::dev::PolyDriver *pdrv)
void exec_iMap2D_test_4(IMap2D *imap)
Definition IMap2DTest.h:462
void exec_iMap2D_test_2(IMap2D *imap)
Definition IMap2DTest.h:108
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.
Definition OSTestMsg.cpp:13