Public Member Functions | Public Attributes
mtdevice.MTDevice Class Reference

MTDevice class. More...

List of all members.

Public Member Functions

def __init__
def auto_config
 Read configuration from device.
def ChangeBaudrate
 Change the baudrate, reset the device and reopen communication.
def configure
 High-level utility functions.
def GetOutputMode
 Get current output mode.
def GetOutputSettings
 Get current output mode.
def GoToConfig
 Place MT device in configuration mode.
def GoToMeasurement
 Place MT device in measurement mode.
def parse_MTData
 Parse a legacy MTData message.
def parse_MTData2
 Parse a new MTData2 message.
def read_data_msg
 Low-level MTData receiving function.
def read_measurement
 Read and parse a measurement packet.
def read_msg
 Low-level message receiving function.
def ReqAvailableScenarios
 Request the available XKF scenarios on the device.
def ReqConfiguration
 Ask for the current configuration of the MT device.
def ReqCurrentScenario
 Request the ID of the currently used XKF scenario.
def ReqDataLength
 Get data length.
def Reset
 High-level functions.
def RestoreFactoryDefaults
 Restore MT device configuration to factory defaults (soft version).
def SetBaudrate
 Set the baudrate of the device using the baudrate id.
def SetCurrentScenario
 Sets the XKF scenario to use.
def SetOutputMode
 Select which information to output.
def SetOutputSettings
 Select how to output the information.
def SetOutputSkipFactor
 Set the output skip factor.
def SetPeriod
 Set the period of sampling.
def write_ack
 Send a message and read confirmation.
def write_msg
 Low-level communication.

Public Attributes

 device
 serial interface to the device
 header
 header of the MTData message
 length
 length of the MTData message
 mode
 mode parameter of the IMU
 scenario_label
 current XKF id
 scenarios
 available XKF scenarios
 settings
 settings parameter of the IMU
 timeout
 timeout for communication

Detailed Description

MTDevice class.

XSens MT device communication object.

XSens MT device communication object.

Definition at line 16 of file mtdevice.py.


Constructor & Destructor Documentation

def mtdevice.MTDevice.__init__ (   self,
  port,
  baudrate = 115200,
  timeout = 0.001,
  autoconf = True,
  config_mode = False 
)
Open device.

Definition at line 19 of file mtdevice.py.


Member Function Documentation

Read configuration from device.

Read configuration from device.

Definition at line 379 of file mtdevice.py.

def mtdevice.MTDevice.ChangeBaudrate (   self,
  baudrate 
)

Change the baudrate, reset the device and reopen communication.

Change the baudrate, reset the device and reopen communication.

Definition at line 729 of file mtdevice.py.

def mtdevice.MTDevice.configure (   self,
  mode,
  settings,
  period = None,
  skipfactor = None 
)

High-level utility functions.

Configure the mode and settings of the MT device.

Configure the mode and settings of the MT device.

Definition at line 362 of file mtdevice.py.

Get current output mode.

Assume the device is in Config state.

Get current output mode.
Assume the device is in Config state.

Definition at line 204 of file mtdevice.py.

Get current output mode.

Assume the device is in Config state.

Get current output mode.
Assume the device is in Config state.

Definition at line 224 of file mtdevice.py.

Place MT device in configuration mode.

Place MT device in configuration mode.

Definition at line 183 of file mtdevice.py.

Place MT device in measurement mode.

Place MT device in measurement mode.

Definition at line 189 of file mtdevice.py.

def mtdevice.MTDevice.parse_MTData (   self,
  data,
  mode = None,
  settings = None 
)

Parse a legacy MTData message.

Read and parse a measurement packet.

Definition at line 627 of file mtdevice.py.

def mtdevice.MTDevice.parse_MTData2 (   self,
  data 
)

Parse a new MTData2 message.

Definition at line 405 of file mtdevice.py.

def mtdevice.MTDevice.read_data_msg (   self,
  buf = bytearray() 
)

Low-level MTData receiving function.

Take advantage of known message length.

Low-level MTData receiving function.
Take advantage of known message length.

Definition at line 69 of file mtdevice.py.

def mtdevice.MTDevice.read_measurement (   self,
  mode = None,
  settings = None 
)

Read and parse a measurement packet.

Definition at line 393 of file mtdevice.py.

Low-level message receiving function.

Low-level message receiving function.

Definition at line 105 of file mtdevice.py.

Request the available XKF scenarios on the device.

Assume the device is in Config state.

Request the available XKF scenarios on the device.
Assume the device is in Config state.

Definition at line 311 of file mtdevice.py.

Ask for the current configuration of the MT device.

Assume the device is in Config state.

Ask for the current configuration of the MT device.
Assume the device is in Config state.

Definition at line 274 of file mtdevice.py.

Request the ID of the currently used XKF scenario.

Assume the device is in Config state.

Request the ID of the currently used XKF scenario.
Assume the device is in Config state.

Definition at line 330 of file mtdevice.py.

Get data length.

Assume the device is in Config state.

Get data length.
Assume the device is in Config state.

Definition at line 263 of file mtdevice.py.

def mtdevice.MTDevice.Reset (   self)

High-level functions.

Reset MT device.

Reset MT device.

Definition at line 177 of file mtdevice.py.

Restore MT device configuration to factory defaults (soft version).

Restore MT device configuration to factory defaults (soft version).

Definition at line 195 of file mtdevice.py.

def mtdevice.MTDevice.SetBaudrate (   self,
  brid 
)

Set the baudrate of the device using the baudrate id.

Assume the device is in Config state.

Set the baudrate of the device using the baudrate id.
Assume the device is in Config state.

Definition at line 303 of file mtdevice.py.

def mtdevice.MTDevice.SetCurrentScenario (   self,
  scenario_id 
)

Sets the XKF scenario to use.

Assume the device is in Config state.

Sets the XKF scenario to use.
Assume the device is in Config state.

Definition at line 352 of file mtdevice.py.

def mtdevice.MTDevice.SetOutputMode (   self,
  mode 
)

Select which information to output.

Assume the device is in Config state.

Select which information to output.
Assume the device is in Config state.

Definition at line 214 of file mtdevice.py.

def mtdevice.MTDevice.SetOutputSettings (   self,
  settings 
)

Select how to output the information.

Assume the device is in Config state.

Select how to output the information.
Assume the device is in Config state.

Definition at line 234 of file mtdevice.py.

def mtdevice.MTDevice.SetOutputSkipFactor (   self,
  skipfactor 
)

Set the output skip factor.

Assume the device is in Config state.

Set the output skip factor.
Assume the device is in Config state.

Definition at line 254 of file mtdevice.py.

def mtdevice.MTDevice.SetPeriod (   self,
  period 
)

Set the period of sampling.

Assume the device is in Config state.

Set the period of sampling.
Assume the device is in Config state.

Definition at line 245 of file mtdevice.py.

def mtdevice.MTDevice.write_ack (   self,
  mid,
  data = [] 
)

Send a message and read confirmation.

Send a message a read confirmation.

Definition at line 159 of file mtdevice.py.

def mtdevice.MTDevice.write_msg (   self,
  mid,
  data = [] 
)

Low-level communication.

Low-level message sending function.

Low-level message sending function.

Definition at line 48 of file mtdevice.py.


Member Data Documentation

serial interface to the device

Definition at line 20 of file mtdevice.py.

header of the MTData message

Definition at line 25 of file mtdevice.py.

length of the MTData message

Definition at line 24 of file mtdevice.py.

mode parameter of the IMU

Definition at line 22 of file mtdevice.py.

current XKF id

current XKF label

Definition at line 333 of file mtdevice.py.

available XKF scenarios

Definition at line 313 of file mtdevice.py.

settings parameter of the IMU

Definition at line 23 of file mtdevice.py.

timeout for communication

Definition at line 21 of file mtdevice.py.


The documentation for this class was generated from the following file:


ethzasl_xsens_driver
Author(s):
autogenerated on Sun Oct 5 2014 23:52:44