YARP
Yet Another Robot Platform
IVirtualAnalogSensor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 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 
59 
65 
72  virtual bool updateVirtualAnalogSensorMeasure(int ch, double &measure)=0;
73 
74 };
75 
84 {
85 public:
86 
88 
94 
100 
107  virtual bool updateVirtualAnalogSensorMeasureRaw(int ch, double &measure) = 0;
108 
109 };
110 
111 #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:52
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
The main, catch-all namespace for YARP.
Definition: environment.h:18
#define YARP_WARNING_POP
Ends a temporary alteration of the enabled warnings.
Definition: system.h:335
#define YARP_DISABLE_CLASS_ENUM_API_WARNING
Definition: system.h:349
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
Definition: system.h:334
#define YARP_dev_API
Definition: api.h:19