YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
PidEnums.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_PIDENUMS_H
7#define YARP_DEV_PIDENUMS_H
8
9#include <yarp/os/Vocab.h>
10#include <yarp/conf/system.h>
11#include <yarp/dev/api.h>
12
13namespace yarp::dev {
15{
44};
45
47{
48 int32_t vocab = static_cast<yarp::conf::vocab32_t>(type);
49 std::string dc = yarp::os::Vocab32::decode(vocab);
50 if (dc[3] >= '0' && dc[3] <= '9')
51 return dc[3] - '1'; // returns 0 for '1', 1 for '2', etc.
52 return 0;
53}
54
58{
60 METRIC = 1,
61};
62
73} // namespace yarp::dev
74
75#endif // YARP_DEV_PIDENUMS_H
std::int32_t vocab32_t
Definition numeric.h:78
For streams capable of holding different kinds of content, check what they actually have.
PidOutputUnitsEnum
Definition PidEnums.h:64
size_t PidControlTypeEnum2Index(PidControlTypeEnum type)
Definition PidEnums.h:46
PidControlTypeEnum
Definition PidEnums.h:15
PidFeedbackUnitsEnum
Definition PidEnums.h:58
std::string decode(NetInt32 code)
Convert a vocabulary identifier into a string.
Definition Vocab32.cpp:33
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition Vocab32.h:27
#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