YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
LLM_nwc_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/dev/ILLM.h>
7#include <yarp/os/Network.h>
12
13#include <catch2/catch_amalgamated.hpp>
14#include <harness.h>
15
16using namespace yarp::dev;
17using namespace yarp::os;
18
19TEST_CASE("dev::LLM_nwc_yarp", "[yarp::dev]")
20{
21 YARP_REQUIRE_PLUGIN("fakeLLMDevice", "device");
22 YARP_REQUIRE_PLUGIN("LLM_nws_yarp", "device");
23 YARP_REQUIRE_PLUGIN("LLM_nwc_yarp", "device");
24
25 Network::setLocalMode(true);
26
27 SECTION("Checking LLM_nwc device")
28 {
29 yarp::dev::ILLM* illm=nullptr;
33
35 {
37 pnws_cfg.put("device", "LLM_nws_yarp");
38 pnws_cfg.put("name", "/LLM_nws");
41
43 pdev_cfg.put("device", "fakeLLMDevice");
46
49 bool result_att = ww_nws->attach(&ddfake);
51
53 pnwc_cfg.put("device", "LLM_nwc_yarp");
54 pnwc_cfg.put("local", "/LLM_nwc/rpc");
55 pnwc_cfg.put("remote", "/LLM_nws/rpc:i");
58 REQUIRE(ddnwc.view(illm));
59 }
60
62
63 //"Close all polydrivers and check"
64 {
65 CHECK(ddnwc.close());
67 CHECK(ddnws.close());
70 }
71 }
72
73 Network::setLocalMode(false);
74}
TEST_CASE("dev::LLM_nwc_yarp", "[yarp::dev]")
ILLM interface.
Definition ILLM.h:26
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:32
void exec_params_test(yarp::dev::PolyDriver *pdrv)
void exec_iLLM_test_1(yarp::dev::ILLM *illm)
Definition ILLMTest.h:17
For streams capable of holding different kinds of content, check what they actually have.
void delay(double seconds)
Wait for a certain number of seconds.
Definition Time.cpp:111
An interface to the operating system, including Port based communication.