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
YARP_WARNING_PUSH
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
Definition: system.h:334
yarp::dev::IVirtualAnalogSensor::updateVirtualAnalogSensorMeasure
virtual bool updateVirtualAnalogSensorMeasure(int ch, double &measure)=0
yarp::dev::IVirtualAnalogSensorRaw::updateVirtualAnalogSensorMeasureRaw
virtual bool updateVirtualAnalogSensorMeasureRaw(yarp::sig::Vector &measure)=0
Set a vector of torque values for virtual sensor.
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
contains the definition of a Vector type
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
A generic interface to a virtual sensors.
Definition: IVirtualAnalogSensor.h:84
yarp::dev::VAS_status::VAS_OK
@ VAS_OK
yarp::dev::IVirtualAnalogSensorRaw::updateVirtualAnalogSensorMeasureRaw
virtual bool updateVirtualAnalogSensorMeasureRaw(int ch, double &measure)=0
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
A generic interface to a virtual sensors.
Definition: IVirtualAnalogSensor.h:49
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
YARP_WARNING_POP
#define YARP_WARNING_POP
Ends a temporary alteration of the enabled warnings.
Definition: system.h:335
yarp::dev::VAS_status
VAS_status
Definition: IVirtualAnalogSensor.h:31
yarp
The main, catch-all namespace for 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
VOCAB_IVIRTUAL_ANALOG
constexpr yarp::conf::vocab32_t VOCAB_IVIRTUAL_ANALOG
Definition: IVirtualAnalogSensor.h:16
api.h