MRPT  1.9.9
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-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 XSBAUD_H
10 #define XSBAUD_H
11 
12 #include "xstypesconfig.h"
13 
14 /*! \addtogroup enums Global enumerations
15  @{
16 */
17 
18 #include "xsbaudcode.h"
19 #include "xsbaudrate.h"
20 
21 /*! @} */
22 
23 typedef enum XsBaudCode XsBaudCode;
24 typedef enum XsBaudRate XsBaudRate;
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 
35 #ifdef __cplusplus
36 } // extern "C"
37 
38 /*! \namespace XsBaud
39  \brief Namespace for Baud rate and Baud code constants and conversions
40 */
41 namespace XsBaud
42 {
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:23
XsBaudRate
Communication speed.
Definition: xsbaudrate.h:27
enum XsBaudRate XsBaudRate
Definition: xsbaud.h:24
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.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020