Xsens DOT iOS SDK  ©2022 Xsens Technologies - Version: 2022.0.0
XsensDotDevice Class Reference

#import <XsensDotDevice.h>

Inheritance diagram for XsensDotDevice:

Instance Methods

(void) - parseAdvertisementData:
 
(void) - parseMacAddress:
 
(BOOL) - isEqual:
 
(CBPeripheralState) - state
 
(BOOL) - stateIsConnected
 
(BOOL) - isInitialized
 
(BOOL) - isSynced
 
(NSString *) - peripheralName
 
(NSString *) - displayName
 
(NSString *) - displayAddress
 
(NSArray< XsensDotFilterProfile * > *) - filterProfilesList
 
(void) - setDidParsePlotDataBlock:
 
(void) - setDeviceName:
 
(void) - startIdentifying
 
(void) - powerOff
 
(void) - readStatisticsInfo
 
(BOOL) - statisticsFeatureEnable
 
(void) - setDidPowerOffBlock:
 
(void) - setOutputRate:filterIndex:
 
(void) - readRSSI:
 
(void) - startMfm
 
(NSString *) - stopMfm
 
(void) - writeMfmResult:
 
(void) - setDidMFMProgress:
 
(void) - setDidMFMResult:
 
(void) - setFirmwareUpdate:
 
(void) - setPowerSavingTimeout:xSecond:yMinutes:ySeconds:
 
(BOOL) - startHeadingReset
 
(BOOL) - startHeadingRevert
 
(void) - setDidreadRotLocal:
 
(void) - dumpCrashInfoData
 
(void) - clearCrashInfoData
 
(void) - startSync:type:
 
(void) - stopSync
 
(void) - getRecordingStatus
 
(BOOL) - startRecording:
 
(BOOL) - stopRecording
 
(BOOL) - getFlashInfo
 
(void) - setFlashInfoDoneBlock:
 
(BOOL) - getRecordingTime
 
(BOOL) - eraseData
 
(void) - setEraseDataDoneBlock:
 
(BOOL) - getExportFileInfo
 
(void) - setExportFileInfoDone:
 
(BOOL) - startExportFileData
 
(BOOL) - stopExportFileData
 
(void) - setDidParseExportFileDataBlock:
 
(void) - setDidButtonCallbackBlock:
 
(BOOL) - isProductV2
 
(BOOL) - isProductV1
 
(BOOL) - enableUsbPowerOn:
 
(BOOL) - isUsbPowerOnEnabled
 

Class Methods

(instancetype) + deviceWithPeripheral:
 

Properties

CBPeripheral * peripheral
 
id< XsensDotCBPeripherialServiceExploreDelegateexplorieDelegate
 
NSString * uuid
 
NSString * macAddress
 
NSNumber * RSSI
 
XsensDotBatteryInfobattery
 
XsensDotFirmwareVersionfirmwareVersion
 
NSString * serialNumber
 
BOOL plotMeasureEnable
 
XSBleDevicePayloadMode plotMeasureMode
 
BOOL plotLogEnable
 
BOOL isSupportHeadingReset
 
XSHeadingStatus headingStatus
 
void(^ headingResetResult )(int result)
 
UInt8 timeoutXMinutes
 
UInt8 timeoutXSeconds
 
UInt8 timeoutYMinutes
 
UInt8 timeoutYSeconds
 
NSUInteger totalSpace
 
NSUInteger usedSpace
 
XsensDotRecordingrecording
 
NSData * exportDataFormat
 
BOOL exportLogEnable
 
int outputRate
 
int filterIndex
 
void(^ getStorageStatusWithTime )(NSUInteger time)
 

Detailed Description

XsensDotDevice represents an Xsens DOT sensor object, including basic information and operations, data measurement and data logging.

Method Documentation

◆ clearCrashInfoData

- (void) clearCrashInfoData

Clear crash data

clearCrashInfoData is 150ms later then dumpCrashInfoData .

Provided by category XsensDotDevice(Instruction).

◆ deviceWithPeripheral:

+ (instancetype) deviceWithPeripheral: (CBPeripheral *)  peripheral

Constructor with a peripheral

Parameters
peripheralCBPeripheral object

◆ displayAddress

- (NSString *) displayAddress

The mac address

◆ displayName

- (NSString *) displayName

The tag name

◆ dumpCrashInfoData

- (void) dumpCrashInfoData

Dump crash data

Provided by category XsensDotDevice(Instruction).

◆ enableUsbPowerOn:

- (BOOL) enableUsbPowerOn: (BOOL)  isEnable

Enable the DOT sensor to power on by USB plugin aditionally.

Parameters
isEnableThe BOOL value

Provided by category XsensDotDevice(Instruction).

◆ eraseData

- (BOOL) eraseData

Earse recording Data

Returns
If firmware support recording feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ filterProfilesList

- (NSArray <XsensDotFilterProfile *> *) filterProfilesList

The support filter profile list

◆ getExportFileInfo

- (BOOL) getExportFileInfo

Get the export file information , this will be initialize RecordingFile.timeStamap

Returns
If firmware support recording feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ getFlashInfo

- (BOOL) getFlashInfo

Get sensor flash information, after called it will be initializing totalSpace and usedSpace

Returns
If firmware support recording feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ getRecordingStatus

- (void) getRecordingStatus

Get Recording Status, after call this method the recording.recordingStatus will be update

Provided by category XsensDotDevice(Instruction).

◆ getRecordingTime

- (BOOL) getRecordingTime

If recording.recordingStatus == XSRecordingIsRecording ,and will be get the recording.recordingDate, recording.recordingTime ,recording.remainingTime

Returns
If firmware support recording feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ isEqual:

- (BOOL) isEqual: (XsensDotDevice *)  object

Judge the XsensDotDevice object if it's equal

Parameters
objectThe XsensDotDevice object

◆ isInitialized

- (BOOL) isInitialized

The flag that the connection is initialized

◆ isProductV1

- (BOOL) isProductV1

The sensor's hardware is V1

Provided by category XsensDotDevice(Instruction).

◆ isProductV2

- (BOOL) isProductV2

The sensor's hardware is V2

Provided by category XsensDotDevice(Instruction).

◆ isSynced

- (BOOL) isSynced

The flag that the sensor is synced

◆ isUsbPowerOnEnabled

- (BOOL) isUsbPowerOnEnabled

check if the USB plugin power on is enabled or not.

Provided by category XsensDotDevice(Instruction).

◆ parseAdvertisementData:

- (void) parseAdvertisementData: (NSDictionary *)  advertisementData

Parse BLE advertisement data

Parameters
advertisementDataAdvertisement data

◆ parseMacAddress:

- (void) parseMacAddress: (NSData *)  macAddressData

Parse mac address

Parameters
macAddressDataMac address data

◆ peripheralName

- (NSString *) peripheralName

The peripheral name

◆ powerOff

- (void) powerOff

Power off the sensor

Provided by category XsensDotDevice(Instruction).

◆ readRSSI:

- (void) readRSSI: (void(^)(NSNumber *signal))  block

Read the sensor signal strength

Parameters
blockReturn block after read the RSSI

After read the RSSI the RSSI propertity will also be updated

Provided by category XsensDotDevice(Instruction).

◆ readStatisticsInfo

- (void) readStatisticsInfo

Read statistics info

Provided by category XsensDotDevice(Instruction).

◆ setDeviceName:

- (void) setDeviceName: (NSString *)  name

Set the sensor tag name

Parameters
nameThe tag name

Provided by category XsensDotDevice(Instruction).

◆ setDidButtonCallbackBlock:

- (void) setDidButtonCallbackBlock: (void(^)(int timestamp))  block

Button callback block

Parameters
blockThe timestamp block

Provided by category XsensDotDevice(Instruction).

◆ setDidMFMProgress:

- (void) setDidMFMProgress: (void(^)(NSString *address, int progress))  block

Set the progress block when start mfm

Parameters
blockThe block from mfm data parse

Provided by category XsensDotDevice(Instruction).

◆ setDidMFMResult:

- (void) setDidMFMResult: (void(^)(NSString *address, XSDotMFMResultTpye type))  block

Set the result block when mfm has been done

Parameters
blockThe block from mfm process done

Provided by category XsensDotDevice(Instruction).

◆ setDidParseExportFileDataBlock:

- (void) setDidParseExportFileDataBlock: (void(^)(XsensDotPlotData *_Nonnull plotData))  block

The block of startExportFileData

Parameters
blockReturn the XsensDotPlotData object

Provided by category XsensDotDevice(Instruction).

◆ setDidParsePlotDataBlock:

- (void) setDidParsePlotDataBlock: (void(^)(XsensDotPlotData *_Nonnull plotData))  block

The plotting(real-time streaming) data block, after set plotMeasureEnable = YES, this will outout plotData

Parameters
blockReturn the XsensDotPlotData data

Provided by category XsensDotDevice(Instruction).

◆ setDidPowerOffBlock:

- (void) setDidPowerOffBlock: (void(^)(void))  block

The block when sensor did power off

Parameters
blockThe return block

Provided by category XsensDotDevice(Instruction).

◆ setDidreadRotLocal:

- (void) setDidreadRotLocal: (void(^)(float *_Nonnull rotLocal))  block

Read Rot local block

Parameters
blockReturn block

Provided by category XsensDotDevice(Instruction).

◆ setEraseDataDoneBlock:

- (void) setEraseDataDoneBlock: (void(^)(int success))  block

The eraseData done block

Parameters
blockReturn the success result

Provided by category XsensDotDevice(Instruction).

◆ setExportFileInfoDone:

- (void) setExportFileInfoDone: (void(^)(BOOL success))  block

The getExportFileInfo done block

Parameters
blockReturn the success result

Provided by category XsensDotDevice(Instruction).

◆ setFirmwareUpdate:

- (void) setFirmwareUpdate: (NSString *)  file

Start firmeare update

Parameters
fileThe firmeware file

Provided by category XsensDotDevice(Instruction).

◆ setFlashInfoDoneBlock:

- (void) setFlashInfoDoneBlock: (void(^)(XSFlashInfoStatus status))  block

The getFlashInfo done block

Parameters
blockThe XSFlashInfoStatus object

Provided by category XsensDotDevice(Instruction).

◆ setOutputRate:filterIndex:

- (void) setOutputRate: (int)  outputRate
filterIndex: (int)  filterIndex 

Set the outputRate and filterIndex

Parameters
outputRateoutputRate
filterIndexfilterIndex

Provided by category XsensDotDevice(Instruction).

◆ setPowerSavingTimeout:xSecond:yMinutes:ySeconds:

- (void) setPowerSavingTimeout: (UInt8)  xMinutes
xSecond: (UInt8)  xSeconds
yMinutes: (UInt8)  yMinutes
ySeconds: (UInt8)  ySeconds 

Set power saving time

Parameters
xMinutesThe advertisement minutes
xSecondsThe advertisement seconds
yMinutesThe connection minutes
ySecondsThe connection seconds

Provided by category XsensDotDevice(Instruction).

◆ startExportFileData

- (BOOL) startExportFileData

Start export recording file data, when call this method, Please ensure two prerequisites

  1. set device.exportDataFormat
  2. set recording.exportFileList recording export status in this block: recording.updateExportingStatus
Returns
If firmware support recording feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ startHeadingReset

- (BOOL) startHeadingReset

Start heading reset

Returns
If firmware support heading reset feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ startHeadingRevert

- (BOOL) startHeadingRevert

Start heading revert

Returns
If firmware support heading reset feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ startIdentifying

- (void) startIdentifying

Start identifying

Provided by category XsensDotDevice(Instruction).

◆ startMfm

- (void) startMfm

Start MFM

Provided by category XsensDotDevice(Instruction).

◆ startRecording:

- (BOOL) startRecording: (UInt16)  recordingTime

Start recording

Parameters
recordingTimeThe recording time that you want

If no clear time, please set it to 0xFFFF, the recording will always do until storage is full

Returns
If firmware support recording feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ startSync:type:

- (void) startSync: (NSString *)  address
type: (UInt8)  type 

Start synchronization

Parameters
addressThe sensor macAddress
typeThe sync type

Provided by category XsensDotDevice(Instruction).

◆ state

- (CBPeripheralState) state

The current bluetooth state

◆ stateIsConnected

- (BOOL) stateIsConnected

The flag that BLE is connected

◆ statisticsFeatureEnable

- (BOOL) statisticsFeatureEnable

The flat of support statistics feature

Provided by category XsensDotDevice(Instruction).

◆ stopExportFileData

- (BOOL) stopExportFileData

Stop export recording file data, Recording export status in this block: recording.updateExportingStatus

Returns
If firmware support recording feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ stopMfm

- (NSString *) stopMfm

Stop MFM

Returns
The mtb file path

Provided by category XsensDotDevice(Instruction).

◆ stopRecording

- (BOOL) stopRecording

Stop recording

Returns
If firmware support recording feature this will be YES, otherwise it's NO

Provided by category XsensDotDevice(Instruction).

◆ stopSync

- (void) stopSync

Stop Synchronization

Provided by category XsensDotDevice(Instruction).

◆ writeMfmResult:

- (void) writeMfmResult: (NSData *)  mfmData

Write mtb data to firmware

Parameters
mfmDataThe mtb data

Provided by category XsensDotDevice(Instruction).

Property Documentation

◆ battery

- (XsensDotBatteryInfo*) battery
readwritenonatomicstrong

The XsensDotBatteryInfo object

◆ explorieDelegate

- (id<XsensDotCBPeripherialServiceExploreDelegate>) explorieDelegate
readwritenonatomicweak

The delegate object that will expore services

◆ exportDataFormat

- (NSData*) exportDataFormat
readwritenonatomicstrong

The recording export data format

Examples :UInt8 bytes[4] = { XSRecordingDataTimestamp, XSRecordingDataEulerAngles, XSRecordingDataAcceleration, XSRecordingDataAngularVelocity }; NSData *exportData = [NSData dataWithBytes:bytes length:sizeof(bytes)];

◆ exportLogEnable

- (BOOL) exportLogEnable
readwritenonatomicassign

The log enable flag when start export recording data, if YES this will save log file to app's folder.

◆ filterIndex

- (int) filterIndex
readwritenonatomicassign

The property of outoutRate

Currently only support 0 and 1

◆ firmwareVersion

- (XsensDotFirmwareVersion*) firmwareVersion
readwritenonatomicstrong

◆ getStorageStatusWithTime

- (void(^ getStorageStatusWithTime) (NSUInteger time))
readwritenonatomiccopy

Before recording start when you give a time to check sensor storage status. Unit is minute.

◆ headingResetResult

- (void(^ headingResetResult) (int result))
readwritenonatomiccopy

The heading result block after do heading reset or revert

The result != 0 means heading reset success otherwise heading reset fail.

◆ headingStatus

- (XSHeadingStatus) headingStatus
readwritenonatomicassign

The current heading status

◆ isSupportHeadingReset

- (BOOL) isSupportHeadingReset
readwritenonatomicassign

The flag of support heading reset feature

◆ macAddress

- (NSString*) macAddress
readnonatomicstrong

Mac address

◆ outputRate

- (int) outputRate
readwritenonatomicassign

The property of outoutRate

Should be 1Hz, 4Hz, 10Hz, 12Hz, 15Hz, 20Hz, 30Hz and 60Hz 120Hz(only for recording modes).

◆ peripheral

- (CBPeripheral*) peripheral
readnonatomicstrong

The CBPeripheral object

◆ plotLogEnable

- (BOOL) plotLogEnable
readwritenonatomicassign

The plotting(real- time streaming) log enable flag

◆ plotMeasureEnable

- (BOOL) plotMeasureEnable
readwritenonatomicassign

The plotting(real- time streaming) enable flag

◆ plotMeasureMode

- (XSBleDevicePayloadMode) plotMeasureMode
readwritenonatomicassign

The current payload mode

◆ recording

- (XsensDotRecording*) recording
readwritenonatomicstrong

The XsensDotRecording object

◆ RSSI

- (NSNumber*) RSSI
readwritenonatomicstrong

The RSSI signal after XsensDotConnectionManager scan

◆ serialNumber

- (NSString*) serialNumber
readwritenonatomicstrong

The Serial number

◆ timeoutXMinutes

- (UInt8) timeoutXMinutes
readwritenonatomicassign

The Advertisement timeout minutes

◆ timeoutXSeconds

- (UInt8) timeoutXSeconds
readwritenonatomicassign

The Advertisement timeout seconds

◆ timeoutYMinutes

- (UInt8) timeoutYMinutes
readwritenonatomicassign

The Connection timeout minutes

◆ timeoutYSeconds

- (UInt8) timeoutYSeconds
readwritenonatomicassign

The Connection timeout seconds

◆ totalSpace

- (NSUInteger) totalSpace
readwritenonatomicassign

The Sensor total storage space

◆ usedSpace

- (NSUInteger) usedSpace
readwritenonatomicassign

The Sensor used storage space in recording mode.

◆ uuid

- (NSString*) uuid
readnonatomicstrong

uuid


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