YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
16namespace yarp::dev {
17class IVirtualAnalogSensor;
18class IVirtualAnalogSensorRaw;
19}
20
21namespace yarp::dev {
25{
26 VAS_OK = 0,
27 VAS_ERROR = 1, // generic error
28 VAS_OVF = 2, // overflow
29 VAS_TIMEOUT = 3
30};
32} // namespace yarp::dev
33
42{
43public:
44
46
52
58
65 virtual bool updateVirtualAnalogSensorMeasure(int ch, double &measure)=0;
66
67};
68
77{
78public:
79
81
87
93
100 virtual bool updateVirtualAnalogSensorMeasureRaw(int ch, double &measure) = 0;
101
102};
103
104#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
For streams capable of holding different kinds of content, check what they actually have.
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:27
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:334
#define YARP_DISABLE_CLASS_ENUM_API_WARNING
Definition system.h:348
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
Definition system.h:333
#define YARP_dev_API
Definition api.h:18