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
13#include <catch2/catch_amalgamated.hpp>
14#include <harness.h>
15
16TEST_CASE("dev::DeviceBundlerTest", "[yarp::dev]")
17{
18 YARP_REQUIRE_PLUGIN("deviceBundler", "device");
19 YARP_REQUIRE_PLUGIN("fakeBattery", "device");
20 YARP_REQUIRE_PLUGIN("battery_nws_yarp", "device");
21
23 const bool verboseDebug = true;
24
25 SECTION("Test the DeviceBundler")
26 {
29
30 p.put("device", "deviceBundler");
31 p.put("wrapper_device", "battery_nws_yarp");
32 p.put("name", "/battery_nws_yarp");
33 p.put("attached_device", "fakeBattery");
34 REQUIRE(pd.open(p));
37 REQUIRE(pd.close());
38 }
39
41}
TEST_CASE("dev::DeviceBundlerTest", "[yarp::dev]")
A container for a device driver.
Definition PolyDriver.h:23
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.
static bool setLocalMode(bool flag)
Chooses whether communication is process-local.
Definition Network.cpp:1137
A class for storing options and configuration information.
Definition Property.h:32
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
Definition Property.cpp:980
void exec_params_test(yarp::dev::PolyDriver *pdrv)
void delay(double seconds)
Wait for a certain number of seconds.
Definition Time.cpp:111