YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IControlLimitsTest.h
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
6#ifndef ICONTROLLIMITSTEST_H
7#define ICONTROLLIMITSTEST_H
8
9#include <memory>
10#include <numeric>
11#include <vector>
12
13#include <yarp/dev/IAxisInfo.h>
15#include <catch2/catch_amalgamated.hpp>
16
17using namespace yarp::dev;
18using namespace yarp::os;
19
20namespace yarp::dev::tests
21{
23 {
24 REQUIRE(ilims != nullptr);
25 REQUIRE(iinfo != nullptr);
26
27 bool b;
28 int ax;
29
30 b = iinfo->getAxes(&ax);
31 CHECK(b);
32 REQUIRE(ax > 0);
33
34 double min=0;
35 double max=0;
36 b = ilims->getLimits (0, &min, &max);
37 CHECK(b);
38
39 b = ilims->getVelLimits(0, &min, &max);
40 CHECK(b);
41
42 b = ilims->setLimits(0, min, max);
43 CHECK(b);
44
45 b = ilims->setVelLimits(0, min, max);
46 CHECK(b);
47 }
48}
49
50#endif
define control board standard interfaces
define control board standard interfaces
Interface for getting information about specific axes, if available.
Definition IAxisInfo.h:36
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
Interface for control devices, commands to get/set position and veloity limits.
A mini-server for performing network communication in the background.
void exec_iControlLimits_test1(IControlLimits *ilims, IAxisInfo *iinfo)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.