YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ICurrentControl.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 YARP_DEV_ICURRENTCONTROL_H
7#define YARP_DEV_ICURRENTCONTROL_H
8
9#include <yarp/os/Vocab.h>
10#include <yarp/dev/api.h>
12
13namespace yarp::dev {
14class ICurrentControlRaw;
15class ICurrentControl;
16}
17
24{
25public:
29 virtual ~ICurrentControl() {}
30
37
43 virtual yarp::dev::ReturnValue getCurrent(int m, double *curr) = 0;
44
49 virtual yarp::dev::ReturnValue getCurrents(double *currs) = 0;
50
59 virtual yarp::dev::ReturnValue getCurrentRange(int m, double *min, double *max) = 0;
60
68 virtual yarp::dev::ReturnValue getCurrentRanges(double *min, double *max) = 0;
69
74 virtual yarp::dev::ReturnValue setRefCurrents(const double *currs) = 0;
75
81 virtual yarp::dev::ReturnValue setRefCurrent(int m, double curr) = 0;
82
89 virtual yarp::dev::ReturnValue setRefCurrents(const int n_motor, const int *motors, const double *currs) = 0;
90
95 virtual yarp::dev::ReturnValue getRefCurrents(double *currs) = 0;
96
102 virtual yarp::dev::ReturnValue getRefCurrent(int m, double *curr) = 0;
103};
104
111{
112public:
117
124
130 virtual yarp::dev::ReturnValue getCurrentRaw(int m, double *curr)=0;
131
136 virtual yarp::dev::ReturnValue getCurrentsRaw(double *currs)=0;
137
146 virtual yarp::dev::ReturnValue getCurrentRangeRaw(int m, double *min, double *max)=0;
147
155 virtual yarp::dev::ReturnValue getCurrentRangesRaw(double *min, double *max)=0;
156
161 virtual yarp::dev::ReturnValue setRefCurrentsRaw(const double *currs)=0;
162
168 virtual yarp::dev::ReturnValue setRefCurrentRaw(int m, double curr)=0;
169
176 virtual yarp::dev::ReturnValue setRefCurrentsRaw(const int n_motor, const int *motors, const double *currs) = 0;
177
183
189 virtual yarp::dev::ReturnValue getRefCurrentRaw(int m, double *curr)=0;
190};
191
192// Interface name
194// methods names
195
201
202#endif // YARP_DEV_ICURRENTCONTROL_H
constexpr yarp::conf::vocab32_t VOCAB_CURRENT_REF_GROUP
constexpr yarp::conf::vocab32_t VOCAB_CURRENT_REFS
constexpr yarp::conf::vocab32_t VOCAB_CURRENT_RANGE
constexpr yarp::conf::vocab32_t VOCAB_CURRENTCONTROL_INTERFACE
constexpr yarp::conf::vocab32_t VOCAB_CURRENT_REF
constexpr yarp::conf::vocab32_t VOCAB_CURRENT_RANGES
Interface for control boards implementing current control.
virtual yarp::dev::ReturnValue getRefCurrentRaw(int m, double *curr)=0
Get the reference value of the current for a single motor.
virtual yarp::dev::ReturnValue setRefCurrentsRaw(const double *currs)=0
Set the reference value of the currents for all motors.
virtual yarp::dev::ReturnValue getRefCurrentsRaw(double *currs)=0
Get the reference value of the currents for all motors.
virtual yarp::dev::ReturnValue getCurrentRangesRaw(double *min, double *max)=0
Get the full scale of the current measurements for all motors motor (e.g.
virtual yarp::dev::ReturnValue getNumberOfMotorsRaw(int *number)=0
Retrieves the number of controlled motors from the current physical interface.
virtual yarp::dev::ReturnValue getCurrentRaw(int m, double *curr)=0
Get the instantaneous current measurement for a single motor.
virtual ~ICurrentControlRaw()
Destructor.
virtual yarp::dev::ReturnValue getCurrentRangeRaw(int m, double *min, double *max)=0
Get the full scale of the current measurement for a given motor (e.g.
virtual yarp::dev::ReturnValue setRefCurrentsRaw(const int n_motor, const int *motors, const double *currs)=0
Set the reference value of the current for a group of motors.
virtual yarp::dev::ReturnValue setRefCurrentRaw(int m, double curr)=0
Set the reference value of the current for a single motor.
virtual yarp::dev::ReturnValue getCurrentsRaw(double *currs)=0
Get the instantaneous current measurement for all motors.
Interface for control boards implementing current control.
virtual yarp::dev::ReturnValue getNumberOfMotors(int *ax)=0
Retrieves the number of controlled axes from the current physical interface.
virtual ~ICurrentControl()
Destructor.
virtual yarp::dev::ReturnValue setRefCurrent(int m, double curr)=0
Set the reference value of the current for a single motor.
virtual yarp::dev::ReturnValue setRefCurrents(const double *currs)=0
Set the reference value of the currents for all motors.
virtual yarp::dev::ReturnValue getCurrent(int m, double *curr)=0
Get the instantaneous current measurement for a single motor.
virtual yarp::dev::ReturnValue setRefCurrents(const int n_motor, const int *motors, const double *currs)=0
Set the reference value of the current for a group of motors.
virtual yarp::dev::ReturnValue getCurrentRange(int m, double *min, double *max)=0
Get the full scale of the current measurement for a given motor (e.g.
virtual yarp::dev::ReturnValue getCurrentRanges(double *min, double *max)=0
Get the full scale of the current measurements for all motors motor (e.g.
virtual yarp::dev::ReturnValue getRefCurrent(int m, double *curr)=0
Get the reference value of the current for a single motor.
virtual yarp::dev::ReturnValue getRefCurrents(double *currs)=0
Get the reference value of the currents for all motors.
virtual yarp::dev::ReturnValue getCurrents(double *currs)=0
Get the instantaneous current measurement for all motors.
std::int32_t vocab32_t
Definition numeric.h:78
For streams capable of holding different kinds of content, check what they actually have.
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition Vocab32.h:27
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18