YARP
Yet Another Robot Platform
Loading...
Searching...
No Matches
Vocab64.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2025-2025 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-License-Identifier: BSD-3-Clause
4
*/
5
6
#ifndef YARP_OS_VOCAB64_H
7
#define YARP_OS_VOCAB64_H
8
9
#include <
yarp/os/NetInt64.h
>
10
11
#include <string>
12
13
namespace
yarp::os
{
14
15
// We need a constexpr for efficient switching.
26
constexpr
yarp::conf::vocab64_t
createVocab64
(
char
a,
char
b = 0,
char
c
= 0,
char
d = 0,
27
char
e
= 0,
char
f
= 0,
char
g = 0,
char
h = 0)
28
{
29
return
(
static_cast<
yarp::conf::vocab64_t
>
(a)) +
30
(
static_cast<
yarp::conf::vocab64_t
>
(b) << 8) +
31
(
static_cast<
yarp::conf::vocab64_t
>
(
c
) << 16) +
32
(
static_cast<
yarp::conf::vocab64_t
>
(d) << 24) +
33
(
static_cast<
yarp::conf::vocab64_t
>
(
e
) << 32) +
34
(
static_cast<
yarp::conf::vocab64_t
>
(
f
) << 40) +
35
(
static_cast<
yarp::conf::vocab64_t
>
(g) << 48) +
36
(
static_cast<
yarp::conf::vocab64_t
>
(h) << 56);
37
}
38
59
namespace
Vocab64 {
60
68
YARP_os_API
NetInt64
encode64
(
const
std::string& str);
69
75
YARP_os_API
std::string
decode64
(
NetInt64
code);
76
77
}
// namespace Vocab64
78
79
}
// namespace yarp::os
80
81
#endif
// YARP_OS_VOCAB64_H
NetInt64.h
yarp::os::BufferedPort
A mini-server for performing network communication in the background.
Definition
BufferedPort.h:60
yarp::conf::vocab64_t
std::int64_t vocab64_t
Definition
numeric.h:79
yarp::os::Vocab64::encode64
NetInt64 encode64(const std::string &str)
Convert a string into a vocabulary identifier.
Definition
Vocab64.cpp:10
yarp::os::Vocab64::decode64
std::string decode64(NetInt64 code)
Convert a vocabulary identifier into a string.
Definition
Vocab64.cpp:48
yarp::os
An interface to the operating system, including Port based communication.
Definition
AbstractCarrier.h:13
yarp::os::createVocab64
constexpr yarp::conf::vocab64_t createVocab64(char a, char b=0, char c=0, char d=0, char e=0, char f=0, char g=0, char h=0)
Create a vocab from chars.
Definition
Vocab64.h:26
yarp::os::NetInt64
std::int64_t NetInt64
Definition of the NetInt64 type.
Definition
NetInt64.h:29
YARP_os_API
#define YARP_os_API
Definition
api.h:18
YARP
4.0.0+20250814.3+git8c5a8e3c5
src
libYARP_os
src
yarp
os
Vocab64.h
Generated on Sun Aug 24 2025 02:50:18 for YARP by
1.9.8