YARP
Yet Another Robot Platform
IAnalogSensor.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_IANALOGSENSOR_H
11 #define YARP_DEV_IANALOGSENSOR_H
12 
13 #include <yarp/os/Vocab.h>
14 #include <yarp/dev/api.h>
15 #include <yarp/sig/Vector.h>
16 
18 
21 namespace yarp {
22 namespace dev {
23 
31 {
32 public:
33  enum
34  {
35  AS_OK=0,
36  AS_ERROR=1,
37  AS_OVF=2,
38  AS_TIMEOUT=3
39  };
40 
41  virtual ~IAnalogSensor();
42 
48  virtual int read(yarp::sig::Vector &out)=0;
49 
55  virtual int getState(int ch)=0;
56 
61  virtual int getChannels()=0;
62 
67  virtual int calibrateSensor()=0;
68 
74  virtual int calibrateSensor(const yarp::sig::Vector& value)=0;
75 
81  virtual int calibrateChannel(int ch)=0;
82 
89  virtual int calibrateChannel(int ch, double value)=0;
90 };
91 
92 } // namespace dev
93 } // namespace yarp
94 
95 #endif // YARP_DEV_IANALOGSENSOR_H
api.h
yarp::os::createVocab
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
yarp::sig::file::read
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
Definition: ImageFile.cpp:656
Vector.h
yarp::sig::VectorOf< double >
yarp::dev::IAnalogSensor
Definition: IAnalogSensor.h:30
yarp
Definition: environment.h:18
yarp::conf::vocab32_t
std::int32_t vocab32_t
Definition: numeric.h:52
Vocab.h
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
VOCAB_IANALOG
constexpr yarp::conf::vocab32_t VOCAB_IANALOG
Definition: IAnalogSensor.h:17