YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
simulatedWorld_nwc_yarp_test.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026-2026 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
7
9
10#include <yarp/os/Network.h>
11#include <yarp/sig/Image.h>
12#include <yarp/sig/Vector.h>
13#include <yarp/dev/PolyDriver.h>
15#include <yarp/os/Time.h>
16
17#include <string>
18
20#include <catch2/catch_amalgamated.hpp>
21#include <harness.h>
22
23using namespace yarp::os;
24using namespace yarp::dev;
25using namespace yarp::sig;
26
27
28TEST_CASE("dev::SimulatedWorld_nwc_yarp", "[yarp::dev]")
29{
30 YARP_REQUIRE_PLUGIN("fakeSimulatedWorld", "device");
31 YARP_REQUIRE_PLUGIN("simulatedWorld_nwc_yarp", "device");
32 YARP_REQUIRE_PLUGIN("simulatedWorld_nws_yarp", "device");
33
34 Network::setLocalMode(true);
35
36 SECTION("Test the simulatedWorld_nwc_yarp device with a simulatedWorld_nws_yarp device")
37 {
44
45 p_nws.put("device","simulatedWorld_nws_yarp");
46 p_nws.put("name", "/simulatedWorld_nws");
47 p_fake.put("device","fakeSimulatedWorld");
51
54 bool result_att = ww_nws->attach(&dd_fake);
56
57 p_nwc.put("device", "simulatedWorld_nwc_yarp");
58 p_nwc.put("remote", "/simulatedWorld_nws");
59 p_nwc.put("local", "/simulatedWorld_nwc");
62
63 ISimulatedWorld* isim = nullptr;
64 REQUIRE(dd_nwc.view(isim));
65
67
69
71
75 }
76
77 Network::setLocalMode(false);
78}
contains the definition of a Vector type
ISimulatedWorld Interface.
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
static void delaySystem(double seconds)
void exec_ISimulatedWorld_test_1(ISimulatedWorld *isim)
void exec_params_test(yarp::dev::PolyDriver *pdrv)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.
Definition OSTestMsg.cpp:13
TEST_CASE("dev::SimulatedWorld_nwc_yarp", "[yarp::dev]")