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 
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
yarp::dev::VAS_status::VAS_TIMEOUT
@ VAS_TIMEOUT
YARP_WARNING_PUSH
#define YARP_WARNING_PUSH
Definition: system.h:334
yarp::dev::IVirtualAnalogSensorRaw::updateVirtualAnalogSensorMeasureRaw
virtual bool updateVirtualAnalogSensorMeasureRaw(yarp::sig::Vector &measure)=0
Set a vector of torque values for virtual sensor.
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_DISABLE_CLASS_ENUM_API_WARNING
#define YARP_DISABLE_CLASS_ENUM_API_WARNING
Definition: system.h:349
yarp::dev::IVirtualAnalogSensor::~IVirtualAnalogSensor
virtual ~IVirtualAnalogSensor()
Definition: IVirtualAnalogSensor.h:52
Vector.h
yarp::dev::VAS_status::VAS_OVF
@ VAS_OVF
yarp::dev::IVirtualAnalogSensor::updateVirtualAnalogSensorMeasure
virtual bool updateVirtualAnalogSensorMeasure(yarp::sig::Vector &measure)=0
Set a vector of torque values for virtual sensor.
yarp::dev::IVirtualAnalogSensorRaw::getVirtualAnalogSensorStatusRaw
virtual VAS_status getVirtualAnalogSensorStatusRaw(int ch)=0
Check the status of a given channel.
yarp::dev::IVirtualAnalogSensorRaw
Definition: IVirtualAnalogSensor.h:83
yarp::dev::VAS_status::VAS_OK
@ VAS_OK
yarp::dev::VAS_status::VAS_ERROR
@ VAS_ERROR
yarp::sig::VectorOf< double >
yarp::dev::IVirtualAnalogSensorRaw::~IVirtualAnalogSensorRaw
virtual ~IVirtualAnalogSensorRaw()
Definition: IVirtualAnalogSensor.h:87
yarp::dev::IVirtualAnalogSensor::getVirtualAnalogSensorChannels
virtual int getVirtualAnalogSensorChannels()=0
Get the number of channels of the virtual sensor.
yarp::dev::IVirtualAnalogSensorRaw::getVirtualAnalogSensorChannelsRaw
virtual int getVirtualAnalogSensorChannelsRaw()=0
Get the number of channels of the virtual sensor.
yarp::dev::IVirtualAnalogSensor
Definition: IVirtualAnalogSensor.h:48
YARP_WARNING_POP
#define YARP_WARNING_POP
Definition: system.h:335
yarp::dev::VAS_status
VAS_status
Definition: IVirtualAnalogSensor.h:30
yarp
Definition: environment.h:18
yarp::conf::vocab32_t
std::int32_t vocab32_t
Definition: numeric.h:52
yarp::dev::IVirtualAnalogSensor::getVirtualAnalogSensorStatus
virtual VAS_status getVirtualAnalogSensorStatus(int ch)=0
Check the status of a given channel.
Vocab.h
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
VOCAB_IVIRTUAL_ANALOG
constexpr yarp::conf::vocab32_t VOCAB_IVIRTUAL_ANALOG
Definition: IVirtualAnalogSensor.h:16