YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
13namespace yarp::dev {
14
21{
22public:
23 virtual ~IGenericSensor();
24
30 virtual bool read(yarp::sig::Vector &out) = 0;
31
37 virtual bool getChannels(int *nc) = 0;
38
45 virtual bool calibrate(int ch, double v) = 0;
46};
47
48} // namespace yarp::dev
49
50#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.
For streams capable of holding different kinds of content, check what they actually have.
#define YARP_dev_API
Definition api.h:18