YARP
Yet Another Robot Platform
IGenericSensor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_DEV_IGENERICSENSOR_H
11 #define YARP_DEV_IGENERICSENSOR_H
12 
13 #include <yarp/dev/api.h>
14 #include <yarp/sig/Vector.h>
15 
16 namespace yarp {
17 namespace dev {
18 
25 {
26 public:
27  virtual ~IGenericSensor();
28 
34  virtual bool read(yarp::sig::Vector &out) = 0;
35 
41  virtual bool getChannels(int *nc) = 0;
42 
49  virtual bool calibrate(int ch, double v) = 0;
50 };
51 
52 } // namespace dev
53 } // namespace yarp
54 
55 #endif // YARP_DEV_IGENERICSENSOR_H
yarp::dev::IGenericSensor
A generic interface to sensors – gyro, a/d converters etc.
Definition: IGenericSensor.h:25
Vector.h
contains the definition of a Vector type
yarp::sig::VectorOf< double >
yarp::dev::IGenericSensor::read
virtual bool read(yarp::sig::Vector &out)=0
Read a vector from the sensor.
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
yarp::dev::IGenericSensor::~IGenericSensor
virtual ~IGenericSensor()
yarp::dev::IGenericSensor::calibrate
virtual bool calibrate(int ch, double v)=0
Calibrate the sensor, single channel.
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
api.h
yarp::dev::IGenericSensor::getChannels
virtual bool getChannels(int *nc)=0
Get the number of channels of the sensor.