YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FrameTransformSet_nws_yarp_test.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
8#include <yarp/os/Property.h>
9#include <yarp/os/Network.h>
10#include <iostream>
11
13
14#include <catch2/catch_amalgamated.hpp>
15#include <harness.h>
16
17TEST_CASE("dev::frameTransformSet_nws_yarp", "[yarp::dev]")
18{
19 #if defined(DISABLE_FAILING_TESTS)
20 YARP_SKIP_TEST("Skipping failing tests")
21 #endif
22
23 YARP_REQUIRE_PLUGIN("frameTransformSet_nws_yarp", "device");
24
26 const bool verboseDebug = true;
27
28 SECTION("test the frameTransformSet_nws_yarp alone")
29 {
32
33 p.put("device", "frameTransformSet_nws_yarp");
34 REQUIRE(pd.open(p));
35
37
38 REQUIRE(pd.close());
39 }
40
41 SECTION("test the frameTransformSet_nws_yarp")
42 {
47
48 p_dev.put("device", "frameTransformStorage");
49 REQUIRE(pd_dev.open(p_dev));
50 p_nws.put("device", "frameTransformSet_nws_yarp");
51 REQUIRE(pd_nws.open(p_nws));
52
54
55 {yarp::dev::WrapperSingle* ww_nws=nullptr; pd_nws.view(ww_nws);
56 REQUIRE(ww_nws);
57 bool result_att = ww_nws->attach(&pd_dev);
58 REQUIRE(result_att); }
59
61
62 REQUIRE(pd_nws.close());
63 REQUIRE(pd_dev.close());
64 }
65
67}
TEST_CASE("dev::frameTransformSet_nws_yarp", "[yarp::dev]")
bool view(T *&x)
Get an interface to the device driver.
virtual bool attach(PolyDriver *driver)=0
Attach to another object.
A container for a device driver.
Definition PolyDriver.h:23
bool close() override
Close the DeviceDriver.
bool open(const std::string &txt)
Construct and configure a device by its common name.
Helper interface for an object that can wrap/or "attach" to a single other device.
static bool setLocalMode(bool flag)
Chooses whether communication is process-local.
Definition Network.cpp:1049
A class for storing options and configuration information.
Definition Property.h:33
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
Definition Property.cpp:987
void delay(double seconds)
Wait for a certain number of seconds.
Definition Time.cpp:111