1 """Constant and messages definition for MT communication.""" 5 """State of the device""" 13 """Values for the message id (MID)""" 22 GoToMeasurement = 0x10
36 ReqHardwareVersion = 0x1E
38 HardwareVersion = 0x1F
48 RestoreFactoryDef = 0x0E
56 SetGnssPlatform = 0x76
60 SetTransmitDelay = 0xDC
68 SetSyncSettings = 0x2C
72 ReqConfiguration = 0x0C
78 SetExtOutputMode = 0x86
80 SetOutputConfiguration = 0xC0
82 SetStringOutputType = 0x8E
84 SetAlignmentRotation = 0xEC
88 SetOutputSettings = 0xD2
90 SetOutputSkipFactor = 0xD4
102 ResetOrientation = 0xA4
110 ReqAvailableFilterProfiles = ReqAvailableScenarios = 0x62
112 AvailableFilterProfiles = AvailableScenarios = 0x63
114 SetFilterProfile = SetCurrentScenario = 0x64
116 SetGravityMagnitude = 0x66
127 """Deprecated message Ids.""" 143 SetSyncInSettings = 0xD6
145 SetSyncOutSettings = 0xD8
149 SetOutputSkipFactor = 0xD4
151 SetObjectAlignment = 0xE0
158 SetLeverArmGPS = 0x68
160 SetMagneticDeclination = 0x6A
163 SetProcessingFlags = 0x20
167 '''Return the name of the first found member of class cls with given 169 for k, v
in cls.__dict__.items():
176 '''Return the name of a message given the message id.''' 188 """Baudrate information and conversion.""" 211 """Get baudrate id for a given baudrate.""" 219 """Get baudrate for a given baudrate id.""" 221 if baudrate_id == brid:
227 """Values for the output mode.""" 240 """Values for the output settings.""" 241 Timestamp_None = 0x00000000
242 Timestamp_SampleCnt = 0x00000001
243 Timestamp_UTCTime = 0x00000002
244 OrientMode_Quaternion = 0x00000000
245 OrientMode_Euler = 0x00000004
246 OrientMode_Matrix = 0x00000008
247 CalibMode_AccGyrMag = 0x00000000
248 CalibMode_GyrMag = 0x00000010
249 CalibMode_AccMag = 0x00000020
250 CalibMode_Mag = 0x00000030
251 CalibMode_AccGyr = 0x00000040
252 CalibMode_Gyr = 0x00000050
253 CalibMode_Acc = 0x00000060
254 CalibMode_Mask = 0x00000070
255 DataFormat_Float = 0x00000000
256 DataFormat_12_20 = 0x00000100
257 DataFormat_16_32 = 0x00000200
258 DataFormat_Double = 0x00000300
259 AuxiliaryMode_NoAIN1 = 0x00000400
260 AuxiliaryMode_NoAIN2 = 0x00000800
261 PositionMode_LLA_WGS84 = 0x00000000
262 VelocityMode_MS_XYZ = 0x00000000
263 Coordinates_NED = 0x80000000
267 """Values for the XDI groups.""" 270 OrientationData = 0x2000
272 Acceleration = 0x4000
275 AngularVelocity = 0x8000
277 SensorComponentReadout = 0xA000
297 return 'Timeout: %s' % self.
message 302 0:
"Operation was performed successfully",
303 1:
"No bus communication possible",
304 2:
"InitBus and/or SetBID are not issued",
305 3:
"Period sent is invalid",
306 4:
"The message is invalid or not implemented",
307 16:
"A slave did not respond to WaitForSetBID",
308 17:
"An incorrect answer received after WaitForSetBID",
309 18:
"After four bus-scans still undetected Motion Trackers",
310 20:
"No reply to SetBID message during SetBID procedure",
311 21:
"Other than SetBIDAck received",
312 24:
"Timer overflow - period too short to collect all data from " 314 25:
"Motion Tracker responds with other than SlaveData message",
315 26:
"Total bytes of data of Motion Trackers including sample counter " 317 27:
"Timer overflows during measurement",
318 28:
"Timer overflows during measurement",
319 29:
"No correct response from Motion Tracker during measurement",
320 30:
"Timer overflows during measurement",
321 32:
"Baud rate does not comply with valid range",
322 33:
"An invalid parameter is supplied",
323 35:
"TX PC Buffer is full",
324 36:
"TX PC Buffer overflow, cannot fit full message",
325 37:
"Wireless subsystem failed",
326 40:
"The device generated an error, try updating the firmware",
327 41:
"The device generates more data than the bus communication can " 328 "handle (baud rate may be too low)",
329 42:
"The sample buffer of the device was full during a communication " 331 43:
"The external trigger is not behaving as configured",
332 44:
"The sample stream detected an error in the ordering of sample " 334 45:
"A dip in the power supply was detected and recovered from",
335 46:
"A current limiter has been activated, shutting down the device",
336 47:
"Device temperature is not within operational limits",
337 48:
"Battery level reached lower limit",
338 49:
"Specified filter profile ID is not available on the device or " 339 "the user is trying to duplicate an existing filter profile type",
340 50:
"The settings stored in the device's non volatile memory are " 342 51:
"Request for control of the device was denied",
343 256:
"A generic error occurred",
344 257:
"Operation not implemented in this version (yet)",
345 258:
"A timeout occurred",
346 259:
"Operation aborted because of no data read",
347 260:
"Checksum fault occurred",
348 261:
"No internal memory available",
349 262:
"The requested item was not found",
350 263:
"Unexpected message received (e.g. no acknowledge message " 352 264:
"Invalid id supplied",
353 265:
"Operation is invalid at this point",
354 266:
"Insufficient buffer space available",
355 267:
"The specified i/o device can not be opened",
356 268:
"The specified i/o device can not be opened",
357 269:
"An I/O device is already opened with this object",
358 270:
"End of file is reached",
359 271:
"A required settings file could not be opened or is missing some " 361 272:
"No data is available",
362 273:
"Tried to change a read-only value",
363 274:
"Tried to supply a NULL value where it is not allowed",
364 275:
"Insufficient data was supplied to a function",
365 276:
"Busy processing, try again later",
366 277:
"Invalid instance called",
367 278:
"A trusted data stream proves to contain corrupted data",
368 279:
"Failure during read of settings",
369 280:
"Could not find any MVN-compatible hardware",
370 281:
"Found only one responding Xbus Master",
371 282:
"No xsens devices found",
372 283:
"One or more sensors are not where they were expected",
373 284:
"Not enough sensors were found",
374 285:
"Failure during initialization of Fusion Engine",
375 286:
"Something else was received than was requested",
376 287:
"No file opened for reading/writing",
377 288:
"No serial port opened for reading/writing",
378 289:
"No file or serial port opened for reading/writing",
379 290:
"A required port could not be found",
380 291:
"The low-level port handler failed to initialize",
381 292:
"A calibration routine failed",
382 293:
"The in-config check of the device failed",
383 294:
"The operation is once only and has already been performed",
384 295:
"The single connected device is configured as a slave",
385 296:
"More than one master was detected",
386 297:
"A device was detected that was neither master nor slave",
387 298:
"No master detected",
388 299:
"A device is not sending enough data",
389 300:
"The version of the object is too low for the requested " 391 301:
"The object has an unrecognised version, so it's not safe to " 392 "perform the operation",
393 302:
"The process was aborted by an external event, usually a user " 394 "action or process termination",
395 303:
"The requested functionality is not supported by the device",
396 304:
"A packet counter value was missed",
397 305:
"An error occurred while trying to put the device in measurement " 399 306:
"A device could not start recording",
400 311:
"Radio channel is in use by another system",
401 312:
"Motion tracker disconnected unexpectedly",
402 313:
"Too many motion trackers connected",
403 314:
"A device could not be put in config mode",
404 315:
"Device has gone out of range",
405 316:
"Device is back in range, resuming normal operation",
406 317:
"The device was disconnected",
407 400:
"The device is shutting down " 413 'Unknown error: 0x%02X' % code)
416 return 'Error message 0x%02X: %s' % (self.
code, self.
message)
def get_BR(cls, baudrate_id)
def get_BRID(cls, baudrate)
def __init__(self, message)
def __init__(self, message)