YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
joypadControlClient_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
8
9#include <yarp/os/Network.h>
10#include <yarp/sig/Image.h>
11#include <yarp/sig/Vector.h>
12#include <yarp/dev/PolyDriver.h>
14#include <yarp/os/Time.h>
15
16#include <string>
17
18#include <catch2/catch_amalgamated.hpp>
19#include <harness.h>
20
21using namespace yarp::os;
22using namespace yarp::dev;
23using namespace yarp::sig;
24
25
26TEST_CASE("dev::JoypadControlClientTest", "[yarp::dev]")
27{
28 #if defined(DISABLE_FAILING_TESTS)
29 YARP_SKIP_TEST("Skipping failing tests")
30 #endif
31
32 YARP_REQUIRE_PLUGIN("fakeJoypad", "device");
33 YARP_REQUIRE_PLUGIN("JoypadControlClient", "device");
34 YARP_REQUIRE_PLUGIN("JoypadControlServer", "device");
35
36 Network::setLocalMode(true);
37
38 SECTION("Test the frameGrabber_nwc_yarp device with a frameGrabber_nws_yarp device")
39 {
46
47 p_nws.put("device","JoypadControlServer");
48 p_nws.put("use_separate_ports", true);
49 p_nws.put("name", "/joyServer");
50 p_fake.put("device","fakeJoypad");
54
57 bool result_att = ww_nws->attach(&dd_fake);
59
60 p_nwc.put("device", "JoypadControlClient");
61 p_nwc.put("remote", "/joyServer");
62 p_nwc.put("local", "/joyclient");
64
65 IJoypadController* ijoy = nullptr;
66 REQUIRE(dd_nwc.view(ijoy));
67
69
71
73
77 }
78
79 Network::setLocalMode(false);
80}
contains the definition of a Vector type
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)
TEST_CASE("dev::JoypadControlClientTest", "[yarp::dev]")
void exec_iJoypadController_test_1(yarp::dev::IJoypadController *iJoy)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.