YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
RGBDSensor_nws_yarp_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
6#include <yarp/os/Network.h>
11
12#include <catch2/catch_amalgamated.hpp>
13#include <harness.h>
14
15using namespace yarp::dev;
16using namespace yarp::sig;
17using namespace yarp::os;
18
19TEST_CASE("dev::rgbdSensor_nws_yarpTest", "[yarp::dev]")
20{
21 YARP_REQUIRE_PLUGIN("fakeDepthCamera", "device");
22 YARP_REQUIRE_PLUGIN("rgbdSensor_nws_yarp", "device");
23
24 Network::setLocalMode(true);
25
26 SECTION("Checking rgbdSensor_nws_yarp device")
27 {
29
31 {
33 nws_cfg.put("device", "rgbdSensor_nws_yarp");
34 nws_cfg.put("name", "/rgbd_nws");
36 }
37
38 //Close all polydrivers and check
40 }
41
42 SECTION("Test the rgbdSensor_nws_yarp device with fakeDepthCamera device attached")
43 {
48
49 //open
50 p_nws.put("device", "rgbdSensor_nws_yarp");
51 p_nws.put("name", "/rgbd_nws");
52 p_fake.put("device", "fakeDepthCamera");
55
57
58 //attach
59 {
62 bool result_att = ww_nws->attach(&dd_fake);
64 }
65
66 //Wait some time
68
69 //Close all polydrivers and check
70 {
73 }
74 }
75
76 Network::setLocalMode(false);
77}
TEST_CASE("dev::rgbdSensor_nws_yarpTest", "[yarp::dev]")
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)
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
An interface to the operating system, including Port based communication.