xscontrollerconfig.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 #define XSENS_NO_AUTOLIB
66 // include this file in Visual Studio using C/C++->Advanced->Force Includes (the /FI option)
67 #ifndef XSCONTROLLER_CONFIG_H
68 #define XSCONTROLLER_CONFIG_H
69 
70 // define to build with Journaller
71 #ifndef HAVE_JOURNALLER
72  //#define HAVE_JOURNALLER
73 #endif
74 
76 // generic preprocessor defines
77 
78 // make sure both _WIN32 and WIN32 are defined if either of them is.
79 #if defined(_WIN32) || defined(_M_IX86)
80  #ifndef WIN32
81  #define WIN32
82  #endif
83  #ifndef XSENS_WINDOWS
84  #define XSENS_WINDOWS
85  #endif
86 #endif
87 
88 #ifdef WIN32
89  #ifndef _WIN32
90  #define _WIN32
91  #define XSENS_WINDOWS
92  #endif
93 #endif
94 
95 #ifdef _WIN32
96  #define USE_WINUSB
97 #else
98  #define XSENS_NO_PORT_NUMBERS
99 #endif
100 
101 // make things as secure as possible without modifying the code...
102 #ifndef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
103  #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
104 #endif
105 #ifndef _CRT_SECURE_NO_WARNINGS
106  #define _CRT_SECURE_NO_WARNINGS
107 #endif
108 
109 #ifdef __GNUC__
110  #include <limits.h>
111  #if __WORDSIZE == 64
112  #define XSENS_64BIT
113  #else
114  #define XSENS_32BIT
115  #endif
116 #endif
117 
118 #if defined(_WIN64) || defined(_M_X64) || defined(_M_IA64)
119  #ifndef XSENS_64BIT
120  #define XSENS_64BIT
121  #endif
122  #ifndef XSENS_WINDOWS
123  #define XSENS_WINDOWS
124  #endif
125  #ifndef WIN64
126  #define WIN64
127  #endif
128 #else
129  #ifndef XSENS_32BIT
130  #define XSENS_32BIT
131  #endif
132 #endif
133 
134 // all xsens libraries should use unicode
135 #ifndef UNICODE
136  #define UNICODE
137 #endif
138 
139 // use XSENS_32BIT and XSENS_64BIT to check for 32/64 bit builds in your application
140 // on non-windows systems these should be defined in this file
141 
142 #ifndef XDA_DLL_API
143  #ifdef XDA_DLL_EXPORT
144  #ifdef _WIN32
145  //# pragma message("XDA_DLL_API export in xscontrollerconfig.h")
146  #define XDA_DLL_API __declspec(dllexport)
147  #else
148  //# pragma message("XDA_DLL_API linux export in xscontrollerconfig.h")
149  #define XDA_DLL_API __attribute__((visibility("default")))
150  #endif
151  #else // ifdef XDA_DLL_EXPORT
152  #ifdef XDA_STATIC_LIB
153  //# pragma message("XDA_DLL_API static in xscontrollerconfig.h")
154  #define XDA_DLL_API
155  #else
156  #ifdef _WIN32
157  //# pragma message("XDA_DLL_API import in xscontrollerconfig.h")
158  #define XDA_DLL_API __declspec(dllimport)
159  #else
160  //# pragma message("XDA_DLL_API import/static for linux in xscontrollerconfig.h")
161  #define XDA_DLL_API
162  #endif
163  #endif
164  #endif // ifdef XDA_DLL_EXPORT - else
165 #endif // ifndef XDA_DLL_API
166 
167 /*
168  Configuration | Runtime | DebInfo | Defines
169  --------------+---------------------------------------
170  Debug | MDd | Yes | XSENS_DEBUG;_DEBUG
171  RelWithDeb | MD | Yes | XSENS_DEBUG;XSENS_RELEASE;_DEBUG
172  Release | MD | No | XSENS_RELEASE;NDEBUG
173 
174  The common way to setup configuration-dependent defines:
175  #if defined(XSENS_DEBUG)
177  #if defined(XSENS_RELEASE)
179  #else
181  #endif
182  #else
184  #endif
185 */
186 
188 // more generic preprocessor defines
189 #ifndef XSENS_DISABLE_COPY
190 #define XSENS_DISABLE_COPY(className) \
192  private: \
193  className(className const &) = delete; \
194  className &operator = (className const &) = delete
195 #endif
196 
197 #ifdef __cplusplus
198  #ifdef HAVE_JOURNALLER
199  #include <xscommon/journaller.h>
200  #else
201  class Journaller;
202  #endif
203  extern Journaller* gJournal;
204 #endif
205 
206 #if defined(HAVE_JOURNALLER) && (defined(XSENS_DEBUG) || defined(XS_LOG_ALWAYS))
207  #define XSEXITLOGC(j) JournalValueJanitor<XsResultValue> _xsExitLogC(j, m_lastResult, std::string(__FUNCTION__) + " exit, lastResult = ")
208  #define XSEXITLOGD(j) XSEXITLOGC(j) //JournalValueJanitor<int> _xsExitLogD(j, d->m_lastResult, std::string(__FUNCTION__) + " exit, lastResult = ")
209  #define XSEXITLOGN(j) JournalValueJanitor<std::string> _xsExitLogN(j, std::string(), std::string(__FUNCTION__) + " exit")
210  #ifndef DIDLOG
211  #define DIDLOG(d) JLHEXLOG_BARE(d)
212  #endif
213 #else
214  #define XSEXITLOGC(j) ((void) 0)
215  #define XSEXITLOGD(j) ((void) 0)
216  #define XSEXITLOGN(j) ((void) 0)
217  #ifndef DIDLOG
218  #define DIDLOG(d) ""
219  #endif
220 
221  #if !defined(HAVE_JOURNALLER) && !defined(JLDEBUG)
222  #define JLTRACE(...) ((void)0)
223  #define JLTRACE_NODEC(...) ((void)0)
224  #define JLTRACEG(...) ((void)0)
225  #define JLDEBUG(...) ((void)0)
226  #define JLDEBUG_NODEC(...) ((void)0)
227  #define JLDEBUGG(...) ((void)0)
228  #define JLALERT(...) ((void)0)
229  #define JLALERT_NODEC(...) ((void)0)
230  #define JLALERTG(...) ((void)0)
231  #define JLERROR(...) ((void)0)
232  #define JLERROR_NODEC(...) ((void)0)
233  #define JLERRORG(...) ((void)0)
234  #define JLFATAL(...) ((void)0)
235  #define JLFATAL_NODEC(...) ((void)0)
236  #define JLFATALG(...) ((void)0)
237  #define JLWRITE(...) ((void)0)
238  #define JLWRITE_NODEC(...) ((void)0)
239  #define JLWRITEG(...) ((void)0)
240  #define JLFINALVALUE(...) ((void)0)
241  #define JLWRITEFINAL(...) ((void)0)
242  #define JLWRITEFINALG(...) ((void)0)
243  #define JLDEBUGFINAL(...) ((void)0)
244  #define JLDEBUGFINALG(...) ((void)0)
245  #endif
246 
247 #endif
248 
249 #ifndef XSNOEXPORT
250  #define XSNOEXPORT
251 #endif
252 #ifndef XSNOLINUXEXPORT
253  #define XSNOLINUXEXPORT
254 #endif
255 
256 #endif
journaller.h
Journaller
A journalling class for debugging applications.
Definition: journaller.h:79
gJournal
Journaller * gJournal
Definition: configure_outputs.cpp:4


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:20