YARP
Yet Another Robot Platform
IVirtualAnalogSensor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2019 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_IVIRTUALANALOGSENSOR_H
10 #define YARP_DEV_IVIRTUALANALOGSENSOR_H
11 
12 #include <yarp/os/Vocab.h>
13 #include <yarp/dev/api.h>
14 #include <yarp/sig/Vector.h>
15 
17 
19 namespace yarp {
20  namespace dev {
21  class IVirtualAnalogSensor;
22  class IVirtualAnalogSensorRaw;
23  }
24 }
25 
26 namespace yarp {
27 namespace dev {
31 {
32  VAS_OK = 0,
33  VAS_ERROR = 1, // generic error
34  VAS_OVF = 2, // overflow
35  VAS_TIMEOUT = 3
36 };
38 } // namespace dev
39 } // namespace yarp
40 
49 {
50 public:
51 
53 
58  virtual VAS_status getVirtualAnalogSensorStatus(int ch)=0;
59 
64  virtual int getVirtualAnalogSensorChannels()=0;
65 
71  virtual bool updateVirtualAnalogSensorMeasure(yarp::sig::Vector &measure)=0;
72  virtual bool updateVirtualAnalogSensorMeasure(int ch, double &measure)=0;
73 
74 };
75 
84 {
85 public:
86 
88 
93  virtual VAS_status getVirtualAnalogSensorStatusRaw(int ch) = 0;
94 
99  virtual int getVirtualAnalogSensorChannelsRaw() = 0;
100 
106  virtual bool updateVirtualAnalogSensorMeasureRaw(yarp::sig::Vector &measure) = 0;
107  virtual bool updateVirtualAnalogSensorMeasureRaw(int ch, double &measure) = 0;
108 
109 };
110 
111 #endif // YARP_DEV_IVIRTUALANALOGSENSOR_H
#define YARP_dev_API
Definition: api.h:19
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
Definition: system.h:334
#define YARP_DISABLE_CLASS_ENUM_API_WARNING
Definition: system.h:349
std::int32_t vocab32_t
Definition: numeric.h:52
Provides:
Definition: Vector.h:32
#define YARP_WARNING_POP
Ends a temporary alteration of the enabled warnings.
Definition: system.h:335
The main, catch-all namespace for YARP.
Definition: numeric.h:47
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
A generic interface to a virtual sensors.
contains the definition of a Vector type
constexpr yarp::conf::vocab32_t VOCAB_IVIRTUAL_ANALOG
A generic interface to a virtual sensors.