Main MRPT website > C++ reference for MRPT 1.5.9
xsbaudrate.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 XSBAUDRATE_H
10 #define XSBAUDRATE_H
11 
12 #ifdef _WIN32
13 # include <windows.h>
14 #else
15 # include <termios.h>
16 # ifndef B460800
17 # undef B230400
18 # define B230400 0010003
19 # define B460800 0010004
20 # define B921600 0010007
21 # endif
22 #endif
23 
24 /*! \brief Communication speed. */
25 #ifdef _WIN32
26 
27 enum XsBaudRate {
28  XBR_Invalid = 0, //!< Not a valid baud rate
29  XBR_4800 = CBR_4800, //!< 4k8 (4800 bps)
30  XBR_9600 = CBR_9600, //!< 9k6 (9600 bps)
31 // XBR_14k4 = CBR_14400,
32  XBR_19k2 = CBR_19200, //!< 19k2 (19200 bps)
33 // XBR_28k8 = 28800,
34  XBR_38k4 = CBR_38400, //!< 38k4 (38400 bps)
35  XBR_57k6 = CBR_57600, //!< 57k6 (57600 bps)
36  XBR_115k2 = CBR_115200, //!< 115k2 (115200 bps)
37  XBR_230k4 = 230400, //!< 230k4 (230400 bps)
38  XBR_460k8 = 460800, //!< 460k8 (460800 bps)
39  XBR_921k6 = 921600, //!< 921k6 (921600 bps)
40  XBR_2000k = 2000000, //!< 2000k0 (2000000 bps)
41  XBR_4000k = 4000000 //!< 4000k0 (4000000 bps)
42 };
43 
44 #else
45 
46 enum XSNOCOMEXPORT XsBaudRate {
47  XBR_Invalid = 0, //!< Not a valid baud rate
48 
49  #ifndef B2000000
50  #define B2000000 2000000
51  #endif
52  #ifndef B4000000
53  #define B4000000 4000000
54  #endif
55 
56  XBR_4800 = B4800, //!< 4k8 (4800 bps)
57  XBR_9600 = B9600, //!< 9k6 (9600 bps)
58 // XBR_14k4 = B14400,
59  XBR_19k2 = B19200, //!< 19k2 (19200 bps)
60 // XBR_28k8 = B28800,
61  XBR_38k4 = B38400, //!< 38k4 (38400 bps)
62  XBR_57k6 = B57600, //!< 57k6 (57600 bps)
63  XBR_115k2 = B115200, //!< 115k2 (115200 bps)
64  XBR_230k4 = B230400, //!< 230k4 (230400 bps)
65  XBR_460k8 = B460800, //!< 460k8 (460800 bps)
66  XBR_921k6 = B921600, //!< 921k6 (921600 bps)
67  XBR_2000k = B2000000, //!< 2000k0 (2000000 bps)
68  XBR_4000k = B4000000 //!< 4000k0 (4000000 bps)
69 };
70 
71 #endif
72 
73 #endif
2000k0 (2000000 bps)
Definition: xsbaudrate.h:40
9k6 (9600 bps)
Definition: xsbaudrate.h:30
Not a valid baud rate.
Definition: xsbaudrate.h:28
4k8 (4800 bps)
Definition: xsbaudrate.h:29
57k6 (57600 bps)
Definition: xsbaudrate.h:35
38k4 (38400 bps)
Definition: xsbaudrate.h:34
230k4 (230400 bps)
Definition: xsbaudrate.h:37
921k6 (921600 bps)
Definition: xsbaudrate.h:39
4000k0 (4000000 bps)
Definition: xsbaudrate.h:41
19k2 (19200 bps)
Definition: xsbaudrate.h:32
XsBaudRate
Communication speed.
Definition: xsbaudrate.h:27
460k8 (460800 bps)
Definition: xsbaudrate.h:38
115k2 (115200 bps)
Definition: xsbaudrate.h:36



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020