Main MRPT website > C++ reference for MRPT 1.5.7
xsbaud.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-2017, 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 XSBAUD_H
10 #define XSBAUD_H
11 
12 #include "xstypesconfig.h"
13 
14 
15 /*! \addtogroup enums Global enumerations
16  @{
17 */
18 
19 #include "xsbaudcode.h"
20 #include "xsbaudrate.h"
21 
22 /*! @} */
23 
24 typedef enum XsBaudCode XsBaudCode;
25 typedef enum XsBaudRate XsBaudRate;
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 
36 #ifdef __cplusplus
37 } // extern "C"
38 
39 /*! \namespace XsBaud
40  \brief Namespace for Baud rate and Baud code constants and conversions
41 */
42 namespace XsBaud {
43  /*! \copydoc XsBaud_codeToRate */
44  inline XsBaudRate codeToRate(XsBaudCode baudcode)
45  {
46  return XsBaud_codeToRate(baudcode);
47  }
48  /*! \copydoc XsBaud_rateToCode */
49  inline XsBaudCode rateToCode(XsBaudRate baudrate)
50  {
51  return XsBaud_rateToCode(baudrate);
52  }
53  /*! \copydoc XsBaud_rateToNumeric */
54  inline int rateToNumeric(XsBaudRate baudrate)
55  {
56  return XsBaud_rateToNumeric(baudrate);
57  }
58  /*! \copydoc XsBaud_numericToRate*/
59  inline XsBaudRate numericToRate(int numeric)
60  {
61  return XsBaud_numericToRate(numeric);
62  }
63 }
64 
65 #endif
66 
67 #endif // file guard
XSTYPES_DLL_API XsBaudRate XsBaud_numericToRate(int numeric)
XSTYPES_DLL_API XsBaudCode XsBaud_rateToCode(XsBaudRate baudrate)
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9
enum XsBaudCode XsBaudCode
Definition: xsbaud.h:24
XsBaudRate
Communication speed.
Definition: xsbaudrate.h:27
enum XsBaudRate XsBaudRate
Definition: xsbaud.h:25
XSTYPES_DLL_API int XsBaud_rateToNumeric(XsBaudRate baudrate)
XSTYPES_DLL_API XsBaudRate XsBaud_codeToRate(XsBaudCode baudcode)



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019