YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
fakeSerialPort_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
7#include <yarp/os/Network.h>
10
12
13#include <catch2/catch_amalgamated.hpp>
14#include <harness.h>
15
16using namespace yarp::dev;
17using namespace yarp::os;
18
19TEST_CASE("dev::fakeSerialPort", "[yarp::dev]")
20{
21 YARP_REQUIRE_PLUGIN("fakeSerialPort", "device");
22
23 Network::setLocalMode(true);
24
25 SECTION("Checking fakeSerialPort device")
26 {
29
30 //open the device
31 {
32
34 pdev_cfg.put("device", "fakeSerialPort");
35 pdev_cfg.put("comport", "fakePort");
36 pdev_cfg.put("baudrate", 9600);
39
40 REQUIRE(ddfake.view(iser));
42 }
43
44 iser->flush();
45 //yarp::dev::tests::exec_iLocalization2D_test_1(iser);
46
47 //"Close all polydrivers and check"
48 {
51 }
52 }
53
54 Network::setLocalMode(false);
55}
A generic interface to serial port devices.
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.
A class for storing options and configuration information.
Definition Property.h:32
TEST_CASE("dev::fakeSerialPort", "[yarp::dev]")
void exec_params_test(yarp::dev::PolyDriver *pdrv)
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.