Document MT0605P.E
© Xsens Technologies B.V.
MTi User Manual
12
2.6.3
Using the Software Development Kit (SDK)
This chapter gives an introduction to the Xsens Device API (XDA). It serves as a starting point for
members of a software development department interested in assessing the basis of the SDK and
knowing about the background considerations. The main objective of the SDK is to facilitate easy
development of user-specific host applications based on Xsens motion trackers.
The MT SDK 4.x (and the MT Software Suite) are designed for the MTi 10-series and MTi 100-series.
The communication protocol is the same as in previous versions of the SDK. Obviously, new
functionality has been introduced. In some functions and messages a new term is introduced to point
specifically to the MTi 10-series and MTi 100-series. This term is MkIV (or Mk4 in functions) and is an
abbreviation for Mark IV: the 4
th
generation MTi.
2.6.3.1
Using the Source code and Dynamic Library
The MT SDK consists of Source code and a Dynamic Library. Source code is made available in C,
since this language can be handled by many other programming languages, such as C++, Java and
Python. Since C++ is a more convenient language
to use for first-time users of the MT SDK (lower risk
of making mistakes, easier to handle complex
functions), Xsens also supplies a C++ wrapper
around the C-compiled library. Depicted on the
right is a schematic overview of the MT SDK. As
can be seen, the host application developer can
choose to use a COM, C, C# or C++ interface.
However, only the C interface is delivered as a
compiled dynamic library. For the C# and C++
interface the source code of the wrapper classes
are supplied as part of the SDK. The interfaces are
discussed in more detail in the following sections.
Note that conceptually XDA makes no distinction
between the cases that the data source is real-time
data stream from a device or if it is a recorded file
data stream.
Using the Xsens XBus low-level communication
protocol is discussed in section 2.6.4.
Device management and global control functions
are grouped in the XsControl object. To access
functionality for a specific device the XsDevice
object is available. Typical steps are:
1. Enter a serial key with XsControl::setSerialKey
2. Scan for Xsens devices with XsScanner::scanPorts
3. Open port with XsControl::openPort and get device object with XsControl::device
4. Configure device with XsDevice functions
5. Start measuring
Figure 1: Xsens Device API