YARP
Yet Another Robot Platform
BlobNetworkHeader.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
7
#ifndef BLOBHEADER_INC
8
#define BLOBHEADER_INC
9
10
#include <
yarp/conf/system.h
>
11
#include <
yarp/os/Bottle.h
>
12
#include <
yarp/os/NetInt32.h
>
13
14
namespace
yarp::wire_rep_utils
{
15
16
// translate to blobs for now; better translation requires type system
17
YARP_BEGIN_PACK
18
class
BlobNetworkHeader
{
19
public
:
20
yarp::os::NetInt32
listTag
;
21
yarp::os::NetInt32
listLen
;
22
yarp::os::NetInt32
blobLen
;
23
24
void
init
(
int
len) {
25
// state that the following data is a list containing 1 blob
26
listTag
=
BOTTLE_TAG_LIST
+
BOTTLE_TAG_BLOB
;
27
listLen
= 1;
28
blobLen
= len;
29
}
30
31
};
32
YARP_END_PACK
33
34
}
// namespace yarp::wire_rep_utils
35
36
#endif
Bottle.h
BOTTLE_TAG_BLOB
#define BOTTLE_TAG_BLOB
Definition:
Bottle.h:27
BOTTLE_TAG_LIST
#define BOTTLE_TAG_LIST
Definition:
Bottle.h:28
NetInt32.h
yarp::wire_rep_utils::BlobNetworkHeader
Definition:
BlobNetworkHeader.h:18
yarp::wire_rep_utils::BlobNetworkHeader::listLen
yarp::os::NetInt32 listLen
Definition:
BlobNetworkHeader.h:21
yarp::wire_rep_utils::BlobNetworkHeader::blobLen
yarp::os::NetInt32 blobLen
Definition:
BlobNetworkHeader.h:22
yarp::wire_rep_utils::BlobNetworkHeader::init
void init(int len)
Definition:
BlobNetworkHeader.h:24
yarp::wire_rep_utils::BlobNetworkHeader::listTag
yarp::os::NetInt32 listTag
Definition:
BlobNetworkHeader.h:20
yarp::os::NetInt32
std::int32_t NetInt32
Definition of the NetInt32 type.
Definition:
NetInt32.h:29
yarp::wire_rep_utils
Definition:
BlobNetworkHeader.h:14
system.h
YARP_END_PACK
#define YARP_END_PACK
Ends 1 byte packing for structs/classes.
Definition:
system.h:193
YARP_BEGIN_PACK
#define YARP_BEGIN_PACK
Starts 1 byte packing for structs/classes.
Definition:
system.h:192
YARP
3.7.2
src
libYARP_wire_rep_utils
src
yarp
wire_rep_utils
BlobNetworkHeader.h
Generated on Fri Jul 1 2022 03:02:49 for YARP by
1.9.4