YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
audioPlayerWrapper_test.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
7
8#include <yarp/os/Network.h>
9#include <yarp/sig/Image.h>
10#include <yarp/sig/Vector.h>
11#include <yarp/dev/PolyDriver.h>
13#include <yarp/os/Time.h>
14
15#include <string>
16
17#include <catch2/catch_amalgamated.hpp>
18#include <harness.h>
19
20using namespace yarp::os;
21using namespace yarp::dev;
22using namespace yarp::sig;
23
24
25TEST_CASE("dev::audioPlayerWrapper", "[yarp::dev]")
26{
27 YARP_REQUIRE_PLUGIN("fakeFrameGrabber", "device");
28 YARP_REQUIRE_PLUGIN("AudioPlayerWrapper", "device");
29
30 Network::setLocalMode(true);
31
32 SECTION("Test the audioPlayerWrapper device with a no device attached")
33 {
36
37 p_nws.put("device", "AudioPlayerWrapper");
40
42
44 }
45
46 SECTION("Test the audioPlayerWrapper device with a fakeSpeaker device")
47 {
52
53 p_nws.put("device","AudioPlayerWrapper");
54 p_fake.put("device","fakeSpeaker");
58
61 bool result_att = ww_nws->attach(&dd_fake);
63
65
68 }
69
70 Network::setLocalMode(false);
71}
contains the definition of a Vector type
TEST_CASE("dev::audioPlayerWrapper", "[yarp::dev]")
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:33
static void delaySystem(double seconds)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.