YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IAxisInfoTest.h
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#ifndef IAXISINFOTEST_H
7#define IAXISINFOTEST_H
8
10#include <catch2/catch_amalgamated.hpp>
11
12using namespace yarp::dev;
13using namespace yarp::os;
14
16{
17 inline void exec_iAxisInfo_test_1(IAxisInfo* iinfo)
18 {
19 REQUIRE(iinfo !=nullptr);
20
21 bool b;
22
23 int ax;
24 b = iinfo->getAxes(&ax);
25 CHECK(b);
26 CHECK(ax != 0);
27
28 std::string name;
29 b = iinfo->getAxisName(0,name);
30 CHECK(b);
31 CHECK(name == std::string("joint0"));
32
34 b = iinfo->getJointType(0, type);
35 CHECK(b);
37 }
38}
39
40#endif
define control board standard interfaces
Interface for getting information about specific axes, if available.
Definition IAxisInfo.h:36
virtual bool getAxisName(int axis, std::string &name)=0
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool getJointType(int axis, yarp::dev::JointTypeEnum &type)
Definition IAxisInfo.h:63
A mini-server for performing network communication in the background.
void exec_iAxisInfo_test_1(IAxisInfo *iinfo)
For streams capable of holding different kinds of content, check what they actually have.
@ VOCAB_JOINTTYPE_REVOLUTE
Definition IAxisInfo.h:24
An interface to the operating system, including Port based communication.