MedM DeviceKit
MedMDeviceManager Class Reference

MedM Device Manager is where you can control devices list. More...

#import <MedMDeviceManager.h>

Inheritance diagram for MedMDeviceManager:

Instance Methods

(id< DeviceAddingCancellationToken > _Nonnull) - addDevice::
 Start device adding. More...
 
(id< DeviceAddingCancellationToken > _Nonnull) - addMFIDevice::
 Start MFI device adding Opens system MFI device adding dialogue and waits till user add device there. More...
 
(id< DeviceAddingCancellationToken > _Nonnull) - addDeviceManually:::
 Start manual device adding. More...
 
(BOOL) - addDevicePostponed:::
 Add device for postponed adding. More...
 
(NSArray< DeviceInfo * > *_Nonnull) - getDevicesList
 Get the list of added devices. More...
 
(void) - removeDevice:
 Remove device from the list of added devices. More...
 
(void) - removeDeviceByAddress:
 Remove device from the list of added devices. More...
 
(NSArray< NSNumber * > *_Nonnull) - getSupportedSKUs
 Get list of SKUs supported by this DeviceKit. More...
 
(NSArray< MeasurementTypeObj *> *_Nonnull) - getSupportedMeasurementTypes:
 Get list of measurement types for the device identified by the SKU. More...
 
(NSString *_Nonnull) - getDeviceModelName:
 Get device model name for the provided sku. More...
 
(NSString *_Nonnull) - getDeviceManufacturer:
 Get device manufacturer for the provided sku. More...
 
(NSArray< DeviceSetting * > *_Nonnull) - getSettings::
 

Detailed Description

MedM Device Manager is where you can control devices list.

MedM Device Manager allows you to add devices found in scanner, remove devices, list devices, etc.

Method Documentation

◆ addDevice::()

- (id<DeviceAddingCancellationToken> _Nonnull) addDevice: (id< AddDeviceCallback > _Nullable)  addDeviceCallback
: (DeviceInfo *_Nonnull)  device 

Start device adding.

Parameters
addDeviceCallbackcallback to receive the result when the add operation is finished
devicedevice to pair
Returns
Cancellation token – could be used to cancel asynchronous add operation

◆ addDeviceManually:::()

- (id<DeviceAddingCancellationToken> _Nonnull) addDeviceManually: (id< AddDeviceCallback >_Nullable)  pairCallback
: (NSString *_Nonnull)  address
: (NSNumber *_Nonnull)  sku 

Start manual device adding.

This is exactly the same as addDevice, but doesn't require DeviceInfo as argument.

Parameters
addressdevice bluetooth address
skudevice sku
pairCallbackcallback to receive the result when the add operation is finished
Returns
Cancellation token – could be used to cancel asynchronous add operation

◆ addDevicePostponed:::()

- (BOOL) addDevicePostponed: (NSNumber *_Nonnull)  sku
: (PostponedAddFilter *_Nonnull)  filter
: (NSError *_Nullable *_Nullable)  error 

Add device for postponed adding.

The device would be added once it's found for the first time in collector. The feature is available only for specific licences. Make sure your license includes it.

Parameters
skudevice sku
filterfilter to identify the exact device
Exceptions
MedMDeviceKitExceptionpossible codes: DeviceKitFeatureUnavailable, DeviceKitFailedToAddPostponedDevice

◆ addMFIDevice::()

- (id<DeviceAddingCancellationToken> _Nonnull) addMFIDevice: (id< AddDeviceCallback > _Nullable)  addDeviceCallback
: (NSError *_Nullable *_Nullable)  error 

Start MFI device adding Opens system MFI device adding dialogue and waits till user add device there.

Then waits for the device to connect to the phone. (Some devices connect only after measurement)

Parameters
addDeviceCallbackcallback to receive the result when the add operation is finished
Returns
Cancellation token – could be used to cancel asynchronous add operation
Exceptions
MedMDeviceKitExceptionpossible codes: DeviceKitFeatureUnavailable

◆ getDeviceManufacturer:()

- (NSString* _Nonnull) getDeviceManufacturer: (NSNumber *_Nonnull)  sku

Get device manufacturer for the provided sku.

Parameters
skudevice sku
Returns
device manufacturer name

◆ getDeviceModelName:()

- (NSString* _Nonnull) getDeviceModelName: (NSNumber *_Nonnull)  sku

Get device model name for the provided sku.

Parameters
skudevice sku
Returns
device model name

◆ getDevicesList()

- (NSArray< DeviceInfo * > *) getDevicesList

Get the list of added devices.

Returns
An array of added devices. DeviceInfo fields that would be provided are SKU, Address, Name, Title, BatteryLevel, LastBatterySyncTime

◆ getSettings::()

- (NSArray<DeviceSetting*>* _Nonnull) getSettings: (NSNumber *_Nonnull)  sku
: (NSString *_Nonnull)  address 

◆ getSupportedMeasurementTypes:()

- (NSArray<MeasurementTypeObj * > *_Nonnull) getSupportedMeasurementTypes: (NSNumber *_Nonnull)  sku

Get list of measurement types for the device identified by the SKU.

Parameters
skudevice sku
Returns
List of measurement types

◆ getSupportedSKUs()

- (NSArray< NSNumber * > *) getSupportedSKUs

Get list of SKUs supported by this DeviceKit.

Returns
List of supported SKUs

◆ removeDevice:()

- (void) removeDevice: (DeviceInfo *_Nonnull)  device

Remove device from the list of added devices.

Parameters
devicedevice to remove

◆ removeDeviceByAddress:()

- (void) removeDeviceByAddress: (NSString *_Nonnull)  deviceAddress

Remove device from the list of added devices.

Parameters
deviceAddressbluetooth address of the device to remove

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