Main MRPT website
>
C++ reference for MRPT 1.9.9
xSens_MT4
xcommunication
include
xsens
messagelocation.h
Go to the documentation of this file.
1
/* +------------------------------------------------------------------------+
2
| Mobile Robot Programming Toolkit (MRPT) |
3
| http://www.mrpt.org/ |
4
| |
5
| Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6
| See: http://www.mrpt.org/Authors - All rights reserved. |
7
| Released under BSD License. See details in http://www.mrpt.org/License |
8
+------------------------------------------------------------------------+ */
9
#ifndef MESSAGELOCATION_H
10
#define MESSAGELOCATION_H
11
12
/*! \brief Stores the location of a message in a buffer using a start position
13
* and a size
14
*/
15
class
MessageLocation
16
{
17
public
:
18
/** The offset of the first byte of the message or -1 if no message */
19
int
m_startPos
;
20
/** The size of the message, when less than 0 it indicates the expected
21
* message size */
22
int
m_size
;
23
24
/*! \brief Constructor, initializes by default to an invalid message
25
\param start The offset of the first byte of the message
26
\param size The size of the message
27
\sa isValid() \sa m_startPos \sa m_size \sa
28
IProtocolHandler::findMessage
29
*/
30
MessageLocation
(
int
start
= -1,
int
size
= 0)
31
:
m_startPos
(
start
),
m_size
(
size
)
32
{
33
}
34
35
/*! \brief Returns whether the stored message information describes a valid
36
* message
37
*/
38
inline
bool
isValid
()
const
{
return
m_startPos
>= 0 &&
m_size
> 0; }
39
};
40
41
#endif // file guard
start
GLuint start
Definition:
glext.h:3528
MessageLocation::m_startPos
int m_startPos
The offset of the first byte of the message or -1 if no message.
Definition:
messagelocation.h:19
MessageLocation::MessageLocation
MessageLocation(int start=-1, int size=0)
Constructor, initializes by default to an invalid message.
Definition:
messagelocation.h:30
MessageLocation
Stores the location of a message in a buffer using a start position and a size.
Definition:
messagelocation.h:15
MessageLocation::m_size
int m_size
The size of the message, when less than 0 it indicates the expected message size.
Definition:
messagelocation.h:22
MessageLocation::isValid
bool isValid() const
Returns whether the stored message information describes a valid message.
Definition:
messagelocation.h:38
size
GLsizeiptr size
Definition:
glext.h:3923
Page generated by
Doxygen 1.8.17
for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST