MedM DeviceKit
MedMDeviceKit Class Reference

Main MedM DeviceKit entry point. More...

#import <MedMDeviceKit.h>

Inheritance diagram for MedMDeviceKit:

Class Methods

(BOOL) + init:error:
 Initialize MedM DeviceKit. More...
 
(MedMScanner *_Nullable) + getScanner:
 Gets the scanner. More...
 
(MedMDeviceManager *_Nullable) + getDeviceManager:
 Gets the device manager. More...
 
(MedMCollector *_Nullable) + getCollector:
 Gets the collector. More...
 
(MedMDeviceKitConfig *_Nullable) + getConfig:
 Gets current DeviceKit configuration. More...
 
(BOOL) + setConfig:error:
 Sets DeviceKit configuration. More...
 
(NSString *_Nonnull) + getVersion
 Gets the kit version identifier. More...
 

Detailed Description

Main MedM DeviceKit entry point.

There are essential entry points to use DeviceKit:

  • init you have to initialize Kit before usage.

  • getScanner is where you search Bluetooth environment for new devices.

  • getDeviceManager is where you can control devices list: add devices found with scanner, remove devices, list devices, etc.

  • getCollector is where you receive data from controlled devices.

Sample usage:

#import "MedMDeviceKit/MedMDeviceKit.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
@synthesize m_savedDevicesList;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[MedMDeviceKit init];
[self LoadDeviceList];
return YES;
}
- (void)LoadDeviceList {
NSArray *devices = [[MedMDeviceKit getDeviceManager] getDevicesList];
for (DeviceInfo *device in devices) {
[self.m_savedDevicesList addObject:device];
}
}
@end

Method Documentation

◆ getCollector:()

+ (MedMCollector* _Nullable) getCollector: (NSError *_Nullable *_Nullable)  error

Gets the collector.

The collector is an object that controls communication with devices and receives medical data.

Exceptions
MedMDeviceKitExceptionpossible codes: DeviceKitNotInitialized
See also
MedMDeviceKit::init(NSString*)

◆ getConfig:()

+ (MedMDeviceKitConfig* _Nullable) getConfig: (NSError *_Nullable *_Nullable)  error

Gets current DeviceKit configuration.

Returns
current configuration
Exceptions
MedMDeviceKitExceptionpossible codes: DeviceKitNotInitialized
See also
MedMDeviceKit::init(NSString*)

◆ getDeviceManager:()

+ (MedMDeviceManager* _Nullable) getDeviceManager: (NSError *_Nullable *_Nullable)  error

Gets the device manager.

The device manager is an object that manages list of connected devices.

Exceptions
MedMDeviceKitExceptionpossible codes: DeviceKitNotInitialized
See also
MedMDeviceKit::init(NSString*)

◆ getScanner:()

+ (MedMScanner* _Nullable) getScanner: (NSError *_Nullable *_Nullable)  error

Gets the scanner.

The scanner is an object that searches new Bluetooth devices to connect.

Exceptions
MedMDeviceKitExceptionpossible codes: DeviceKitNotInitialized
See also
MedMDeviceKit::init(NSString*)

◆ getVersion()

+ (NSString *) getVersion

Gets the kit version identifier.

◆ init:error:()

+ (BOOL) init: (NSString *_Nonnull)  licenseKey
error: (NSError *_Nullable *_Nullable)  error 

Initialize MedM DeviceKit.

Called 'initialize' in swift

Exceptions
NSErrorpossible codes: DeviceKitKeyInvalid, DeviceKitBuildExpired, DeviceKitLicenseExpired, DeviceKitUnsupportedBundle, DeviceKitInitializationFailed, DeviceKitFeatureUnavailable

◆ setConfig:error:()

+ (BOOL) setConfig: (MedMDeviceKitConfig *_Nonnull)  config
error: (NSError *_Nullable *_Nullable)  error 

Sets DeviceKit configuration.

Note that notification is persistent between app launches.

Exceptions
MedMDeviceKitExceptionpossible codes: DeviceKitNotInitialized
See also
MedMDeviceKit::init(NSString*)

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