YARP
Yet Another Robot Platform
IVirtualAnalogSensor.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_DEV_IVIRTUALANALOGSENSOR_H
7 #define YARP_DEV_IVIRTUALANALOGSENSOR_H
8 
9 #include <yarp/os/Vocab.h>
10 #include <yarp/dev/api.h>
11 #include <yarp/sig/Vector.h>
12 
14 
16 namespace yarp {
17  namespace dev {
18  class IVirtualAnalogSensor;
19  class IVirtualAnalogSensorRaw;
20  }
21 }
22 
23 namespace yarp {
24 namespace dev {
28 {
29  VAS_OK = 0,
30  VAS_ERROR = 1, // generic error
31  VAS_OVF = 2, // overflow
32  VAS_TIMEOUT = 3
33 };
35 } // namespace dev
36 } // namespace yarp
37 
46 {
47 public:
48 
50 
56 
62 
69  virtual bool updateVirtualAnalogSensorMeasure(int ch, double &measure)=0;
70 
71 };
72 
81 {
82 public:
83 
85 
91 
97 
104  virtual bool updateVirtualAnalogSensorMeasureRaw(int ch, double &measure) = 0;
105 
106 };
107 
108 #endif // YARP_DEV_IVIRTUALANALOGSENSOR_H
constexpr yarp::conf::vocab32_t VOCAB_IVIRTUAL_ANALOG
contains the definition of a Vector type
A generic interface to a virtual sensors.
virtual int getVirtualAnalogSensorChannelsRaw()=0
Get the number of channels of the virtual sensor.
virtual bool updateVirtualAnalogSensorMeasureRaw(yarp::sig::Vector &measure)=0
Set a vector of torque values for virtual sensor.
virtual bool updateVirtualAnalogSensorMeasureRaw(int ch, double &measure)=0
virtual VAS_status getVirtualAnalogSensorStatusRaw(int ch)=0
Check the status of a given channel.
A generic interface to a virtual sensors.
virtual VAS_status getVirtualAnalogSensorStatus(int ch)=0
Check the status of a given channel.
virtual bool updateVirtualAnalogSensorMeasure(yarp::sig::Vector &measure)=0
Set a vector of torque values for virtual sensor.
virtual bool updateVirtualAnalogSensorMeasure(int ch, double &measure)=0
virtual int getVirtualAnalogSensorChannels()=0
Get the number of channels of the virtual sensor.
std::int32_t vocab32_t
Definition: numeric.h:78
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition: Vocab.h:28
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_WARNING_POP
Ends a temporary alteration of the enabled warnings.
Definition: system.h:332
#define YARP_DISABLE_CLASS_ENUM_API_WARNING
Definition: system.h:346
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
Definition: system.h:331
#define YARP_dev_API
Definition: api.h:18