lib
xspublic
xstypes
xsbaudrate.h
Go to the documentation of this file.
1
2
// Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
3
// All rights reserved.
4
//
5
// Redistribution and use in source and binary forms, with or without modification,
6
// are permitted provided that the following conditions are met:
7
//
8
// 1. Redistributions of source code must retain the above copyright notice,
9
// this list of conditions, and the following disclaimer.
10
//
11
// 2. Redistributions in binary form must reproduce the above copyright notice,
12
// this list of conditions, and the following disclaimer in the documentation
13
// and/or other materials provided with the distribution.
14
//
15
// 3. Neither the names of the copyright holders nor the names of their contributors
16
// may be used to endorse or promote products derived from this software without
17
// specific prior written permission.
18
//
19
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22
// THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
// SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
24
// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
26
// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
28
// SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
29
// OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
30
// ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
31
//
32
33
34
// Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
35
// All rights reserved.
36
//
37
// Redistribution and use in source and binary forms, with or without modification,
38
// are permitted provided that the following conditions are met:
39
//
40
// 1. Redistributions of source code must retain the above copyright notice,
41
// this list of conditions, and the following disclaimer.
42
//
43
// 2. Redistributions in binary form must reproduce the above copyright notice,
44
// this list of conditions, and the following disclaimer in the documentation
45
// and/or other materials provided with the distribution.
46
//
47
// 3. Neither the names of the copyright holders nor the names of their contributors
48
// may be used to endorse or promote products derived from this software without
49
// specific prior written permission.
50
//
51
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
52
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
53
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
54
// THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55
// SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
56
// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
58
// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
59
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
60
// SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
61
// OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
62
// ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
63
//
64
65
#ifndef XSBAUDRATE_H
66
#define XSBAUDRATE_H
67
68
#ifdef _WIN32
69
#include <windows.h>
70
#else
71
#include <termios.h>
72
#ifndef B460800
73
#undef B230400
74
#define B230400 0010003
75
#define B460800 0010004
76
#define B921600 0010007
77
#endif
78
#endif
79
83
#ifdef _WIN32
84
85
//AUTO namespace xstypes {
87
enum
XsBaudRate
88
{
89
XBR_Invalid
= 0,
90
XBR_4800
= CBR_4800,
91
XBR_9600
= CBR_9600,
92
XBR_14k4
= CBR_14400,
93
XBR_19k2
= CBR_19200,
94
XBR_28k8
= 28800,
95
XBR_38k4
= CBR_38400,
96
XBR_57k6
= CBR_57600,
97
XBR_76k8
= 76800,
98
XBR_115k2
= CBR_115200,
99
XBR_230k4
= 230400,
100
XBR_460k8
= 460800,
101
XBR_921k6
= 921600,
102
XBR_2000k
= 2000000,
103
XBR_3500k
= 3500000,
104
XBR_4000k = 4000000
105
};
106
//AUTO }
107
108
#else
109
111
enum
XSNOCOMEXPORT
XsBaudRate
112
{
113
114
// support high baudrates on MAC OS X
115
#ifndef SWIG
116
#ifndef B2000000
117
#define B2000000 2000000
118
#endif
119
#ifndef B3500000
120
#define B3500000 3500000
121
#endif
122
#ifndef B4000000
123
#define B4000000 4000000
124
#endif
125
#endif
126
XBR_Invalid
= 0,
127
128
XBR_4800
= B4800,
129
XBR_9600
= B9600,
130
XBR_14k4
= 0,
131
XBR_19k2
= B19200,
132
XBR_28k8
= 0,
133
XBR_38k4
= B38400,
134
XBR_57k6
= B57600,
135
XBR_76k8
= 0,
136
XBR_115k2
= B115200,
137
XBR_230k4
=
B230400
,
138
XBR_460k8
=
B460800
,
139
XBR_921k6
=
B921600
,
140
#ifndef SWIG
141
XBR_2000k
=
B2000000
,
142
XBR_3500k
=
B3500000
,
143
XBR_4000k =
B4000000
144
#else
145
XBR_2000k
= 2000000,
146
XBR_3500k
= 3500000,
147
XBR_4000k = 4000000
148
#endif
149
};
151
typedef
enum
XsBaudRate
XsBaudRate
;
152
#endif
153
155
#endif
B3500000
#define B3500000
Definition:
xsbaudrate.h:120
XBR_3500k
XBR_3500k
3500k0 (3500000 bps)
Definition:
xsbaudrate.h:142
XBR_28k8
XBR_28k8
28k8 is set to 0 on purpose
Definition:
xsbaudrate.h:132
XBR_115k2
XBR_115k2
115k2 (115200 bps)
Definition:
xsbaudrate.h:136
XBR_19k2
XBR_19k2
19k2 (19200 bps)
Definition:
xsbaudrate.h:131
B460800
#define B460800
Definition:
xsbaudrate.h:75
XBR_9600
XBR_9600
9k6 (9600 bps)
Definition:
xsbaudrate.h:129
XBR_76k8
XBR_76k8
76k8 is set to 0 on purpose
Definition:
xsbaudrate.h:135
XsBaudRate
enum XsBaudRate XsBaudRate
Communication speed.
Definition:
xsbaud.h:81
XBR_38k4
XBR_38k4
38k4 (38400 bps)
Definition:
xsbaudrate.h:133
XBR_4800
XBR_4800
4k8 (4800 bps)
Definition:
xsbaudrate.h:128
B4000000
#define B4000000
Definition:
xsbaudrate.h:123
B2000000
#define B2000000
Definition:
xsbaudrate.h:117
XBR_2000k
XBR_2000k
2000k0 (2000000 bps)
Definition:
xsbaudrate.h:141
XBR_14k4
XBR_14k4
14k4 is set to 0 on purpose
Definition:
xsbaudrate.h:130
XBR_460k8
XBR_460k8
460k8 (460800 bps)
Definition:
xsbaudrate.h:138
XBR_921k6
XBR_921k6
921k6 (921600 bps)
Definition:
xsbaudrate.h:139
B230400
#define B230400
Definition:
xsbaudrate.h:74
XBR_230k4
XBR_230k4
230k4 (230400 bps)
Definition:
xsbaudrate.h:137
XBR_Invalid
XBR_Invalid
Not a valid baud rate.
Definition:
xsbaudrate.h:126
B921600
#define B921600
Definition:
xsbaudrate.h:76
XBR_57k6
XBR_57k6
57k6 (57600 bps)
Definition:
xsbaudrate.h:134
xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:20