YARP
Yet Another Robot Platform
IGenericSensor.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_DEV_IGENERICSENSOR_H
8 #define YARP_DEV_IGENERICSENSOR_H
9 
10 #include <yarp/dev/api.h>
11 #include <yarp/sig/Vector.h>
12 
13 namespace yarp {
14 namespace dev {
15 
22 {
23 public:
24  virtual ~IGenericSensor();
25 
31  virtual bool read(yarp::sig::Vector &out) = 0;
32 
38  virtual bool getChannels(int *nc) = 0;
39 
46  virtual bool calibrate(int ch, double v) = 0;
47 };
48 
49 } // namespace dev
50 } // namespace yarp
51 
52 #endif // YARP_DEV_IGENERICSENSOR_H
contains the definition of a Vector type
A generic interface to sensors – gyro, a/d converters etc.
virtual bool read(yarp::sig::Vector &out)=0
Read a vector from the sensor.
virtual bool getChannels(int *nc)=0
Get the number of channels of the sensor.
virtual bool calibrate(int ch, double v)=0
Calibrate the sensor, single channel.
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18