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//#include <yarp/dev/tests/ILocalization2DTest.h>
11
12#include <catch2/catch_amalgamated.hpp>
13#include <harness.h>
14
15using namespace yarp::dev;
16using namespace yarp::os;
17
18TEST_CASE("dev::fakeSerialPort", "[yarp::dev]")
19{
20 YARP_REQUIRE_PLUGIN("fakeSerialPort", "device");
21
22 Network::setLocalMode(true);
23
24 SECTION("Checking fakeSerialPort device")
25 {
28
29 //open the device
30 {
31
33 pdev_cfg.put("device", "fakeSerialPort");
34 pdev_cfg.put("comport", "fakePort");
35 pdev_cfg.put("baudrate", 9600);
37 REQUIRE(ddfake.view(iser));
39 }
40
41 iser->flush();
42 //yarp::dev::tests::exec_iLocalization2D_test_1(iser);
43
44 //"Close all polydrivers and check"
45 {
48 }
49 }
50
51 Network::setLocalMode(false);
52}
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:33
TEST_CASE("dev::fakeSerialPort", "[yarp::dev]")
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.