YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
DeviceBundler_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#include <yarp/os/Property.h>
9#include <yarp/os/Network.h>
10#include <iostream>
11
12#include <catch2/catch_amalgamated.hpp>
13#include <harness.h>
14
15TEST_CASE("dev::DeviceBundlerTest", "[yarp::dev]")
16{
17 YARP_REQUIRE_PLUGIN("deviceBundler", "device");
18 YARP_REQUIRE_PLUGIN("fakeBattery", "device");
19 YARP_REQUIRE_PLUGIN("battery_nws_yarp", "device");
20
22 const bool verboseDebug = true;
23
24 SECTION("Test the DeviceBundler")
25 {
28
29 p.put("device", "deviceBundler");
30 p.put("wrapper_device", "battery_nws_yarp");
31 p.put("name", "/battery_nws_yarp");
32 p.put("attached_device", "fakeBattery");
33 REQUIRE(pd.open(p));
35 REQUIRE(pd.close());
36 }
37
39}
TEST_CASE("dev::DeviceBundlerTest", "[yarp::dev]")
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.
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