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>
11
12namespace yarp::dev {
13class ICurrentControlRaw;
14class ICurrentControl;
15}
16
23{
24public:
28 virtual ~ICurrentControl() {}
29
35 virtual bool getNumberOfMotors(int *ax) = 0;
36
42 virtual bool getCurrent(int m, double *curr) = 0;
43
48 virtual bool getCurrents(double *currs) = 0;
49
58 virtual bool getCurrentRange(int m, double *min, double *max) = 0;
59
67 virtual bool getCurrentRanges(double *min, double *max) = 0;
68
73 virtual bool setRefCurrents(const double *currs) = 0;
74
80 virtual bool setRefCurrent(int m, double curr) = 0;
81
88 virtual bool setRefCurrents(const int n_motor, const int *motors, const double *currs) = 0;
89
94 virtual bool getRefCurrents(double *currs) = 0;
95
101 virtual bool getRefCurrent(int m, double *curr) = 0;
102};
103
110{
111public:
116
122 virtual bool getNumberOfMotorsRaw(int *number) = 0;
123
129 virtual bool getCurrentRaw(int m, double *curr)=0;
130
135 virtual bool getCurrentsRaw(double *currs)=0;
136
145 virtual bool getCurrentRangeRaw(int m, double *min, double *max)=0;
146
154 virtual bool getCurrentRangesRaw(double *min, double *max)=0;
155
160 virtual bool setRefCurrentsRaw(const double *currs)=0;
161
167 virtual bool setRefCurrentRaw(int m, double curr)=0;
168
175 virtual bool setRefCurrentsRaw(const int n_motor, const int *motors, const double *currs) = 0;
176
181 virtual bool getRefCurrentsRaw(double *currs)=0;
182
188 virtual bool getRefCurrentRaw(int m, double *curr)=0;
189};
190
191// Interface name
193// methods names
194
200
201#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 bool getNumberOfMotorsRaw(int *number)=0
Retrieves the number of controlled motors from the current physical interface.
virtual bool setRefCurrentsRaw(const double *currs)=0
Set the reference value of the currents for all motors.
virtual bool getCurrentRangesRaw(double *min, double *max)=0
Get the full scale of the current measurements for all motors motor (e.g.
virtual bool getCurrentsRaw(double *currs)=0
Get the instantaneous current measurement for all motors.
virtual bool getRefCurrentsRaw(double *currs)=0
Get the reference value of the currents for all motors.
virtual ~ICurrentControlRaw()
Destructor.
virtual bool 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 bool getCurrentRaw(int m, double *curr)=0
Get the instantaneous current measurement for a single motor.
virtual bool setRefCurrentRaw(int m, double curr)=0
Set the reference value of the current for a single motor.
virtual bool getCurrentRangeRaw(int m, double *min, double *max)=0
Get the full scale of the current measurement for a given motor (e.g.
virtual bool getRefCurrentRaw(int m, double *curr)=0
Get the reference value of the current for a single motor.
Interface for control boards implementing current control.
virtual bool getCurrents(double *currs)=0
Get the instantaneous current measurement for all motors.
virtual bool setRefCurrent(int m, double curr)=0
Set the reference value of the current for a single motor.
virtual ~ICurrentControl()
Destructor.
virtual bool 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 bool getRefCurrents(double *currs)=0
Get the reference value of the currents for all motors.
virtual bool getNumberOfMotors(int *ax)=0
Retrieves the number of controlled axes from the current physical interface.
virtual bool setRefCurrents(const double *currs)=0
Set the reference value of the currents for all motors.
virtual bool getCurrent(int m, double *curr)=0
Get the instantaneous current measurement for a single motor.
virtual bool getCurrentRange(int m, double *min, double *max)=0
Get the full scale of the current measurement for a given motor (e.g.
virtual bool getRefCurrent(int m, double *curr)=0
Get the reference value of the current for a single motor.
virtual bool getCurrentRanges(double *min, double *max)=0
Get the full scale of the current measurements for all motors motor (e.g.
std::int32_t vocab32_t
Definition numeric.h:78
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition Vocab.h:27
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18