YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IMotor.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_IMOTOR_H
7#define YARP_DEV_IMOTOR_H
8
9#include <yarp/os/Vocab.h>
10#include <yarp/os/Log.h>
11#include <yarp/dev/api.h>
13
14namespace yarp::dev {
15class IMotorRaw;
16class IMotor;
17}
18
25{
26public:
30 virtual ~IMotorRaw() {}
31
38
45 virtual yarp::dev::ReturnValue getTemperatureRaw(int m, double* val)=0;
46
53
61 virtual yarp::dev::ReturnValue getTemperatureLimitRaw(int m, double *temp)=0;
62
70 virtual yarp::dev::ReturnValue setTemperatureLimitRaw(int m, const double temp)=0;
71
78 virtual yarp::dev::ReturnValue getGearboxRatioRaw(int m, double *val) =0;
79
86 virtual yarp::dev::ReturnValue setGearboxRatioRaw(int m, const double val) =0;
87};
88
95{
96public:
100 virtual ~IMotor() {}
101
108
115 virtual yarp::dev::ReturnValue getTemperature(int m, double *val)=0;
116
123
131 virtual yarp::dev::ReturnValue getTemperatureLimit(int m, double *temp)=0;
132
140 virtual yarp::dev::ReturnValue setTemperatureLimit(int m, const double temp)=0;
141
148 virtual yarp::dev::ReturnValue getGearboxRatio(int m, double *val) =0;
149
156 virtual yarp::dev::ReturnValue setGearboxRatio(int m, const double val) =0;
157};
158
159// interface IMotorEncoders gets
165
166
167#endif // YARP_DEV_IMOTOR_H
constexpr yarp::conf::vocab32_t VOCAB_TEMPERATURES
Definition IMotor.h:163
constexpr yarp::conf::vocab32_t VOCAB_TEMPERATURE_LIMIT
Definition IMotor.h:164
constexpr yarp::conf::vocab32_t VOCAB_TEMPERATURE
Definition IMotor.h:161
constexpr yarp::conf::vocab32_t VOCAB_GEARBOX_RATIO
Definition IMotor.h:162
constexpr yarp::conf::vocab32_t VOCAB_MOTORS_NUMBER
Definition IMotor.h:160
Control board, encoder interface.
Definition IMotor.h:25
virtual ~IMotorRaw()
Destructor.
Definition IMotor.h:30
virtual yarp::dev::ReturnValue setGearboxRatioRaw(int m, const double val)=0
Set the gearbox ratio for a specific motor.
virtual yarp::dev::ReturnValue setTemperatureLimitRaw(int m, const double temp)=0
Set the temperature limit for a specific motor.
virtual yarp::dev::ReturnValue getNumberOfMotorsRaw(int *num)=0
Get the number of available motors.
virtual yarp::dev::ReturnValue getTemperaturesRaw(double *vals)=0
Get temperature of all the motors.
virtual yarp::dev::ReturnValue getTemperatureRaw(int m, double *val)=0
Get temperature of a motor.
virtual yarp::dev::ReturnValue getTemperatureLimitRaw(int m, double *temp)=0
Retrieves the current temperature limit for a specific motor.
virtual yarp::dev::ReturnValue getGearboxRatioRaw(int m, double *val)=0
Get the gearbox ratio for a specific motor.
Control board, encoder interface.
Definition IMotor.h:95
virtual yarp::dev::ReturnValue getTemperatureLimit(int m, double *temp)=0
Retrieves the current temperature limit for a specific motor.
virtual yarp::dev::ReturnValue setGearboxRatio(int m, const double val)=0
Set the gearbox ratio for a specific motor.
virtual yarp::dev::ReturnValue getTemperature(int m, double *val)=0
Get temperature of a motor.
virtual ~IMotor()
Destructor.
Definition IMotor.h:100
virtual yarp::dev::ReturnValue getGearboxRatio(int m, double *val)=0
Get the gearbox ratio for a specific motor.
virtual yarp::dev::ReturnValue getNumberOfMotors(int *num)=0
Get the number of available motors.
virtual yarp::dev::ReturnValue setTemperatureLimit(int m, const double temp)=0
Set the temperature limit for a specific motor.
virtual yarp::dev::ReturnValue getTemperatures(double *vals)=0
Get temperature of all the 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