SKManager Class Reference
Inherits from | NSObject |
---|---|
Declared in | SKManager.h |
Overview
The purpose of the SKManager class is to handle the communication with the blukii SmartKey’s. It is impelemented according to the singelton design pattern and the application can get the shared object with the corresponding method [SKManager sharedManager]. Its highly recommended to implement the SKManagerDelegate protocol for a class which uses the SKManager. Otherwise that class will not get any feedback about the communication with the SmartKey or anything else what is triggered by the SKManager.
Properties
delegate
This is the delegate which receives the delegate method calls for the SKManagerDelegate protocol.
@property id<SKManagerDelegate> delegate
Declared In
SKManager.h
Get the SKManager Object
+ sharedManager
This method returns the shared SKManager object. At first call it will instantiate and return the object which will be returned each repeated call.
+ (id)sharedManager
Declared In
SKManager.h
Generall
– resetSecuritySettings
The invocation of this method forces a reset of the complete security settings in the SKManager.
- (void)resetSecuritySettings
Discussion
Its possible, in case of an security dependent error, that the SKManager will invoke this method independent e.g. during a configuration process or if a modified SmartKey has been detected.
Declared In
SKManager.h
Search and link
– requestSmartKeysWithTimeout:repeated:
Trigger a new SmartKey search request to search for near located SmartKey’s.
- (BOOL)requestSmartKeysWithTimeout:(int)ms repeated:(bool)repeat
Parameters
ms |
Interval in milliseconds which determines how long the search request will last. |
---|---|
repeat |
Indicates whether the request should repeat (true) or not (false). |
Return Value
True if the request has been triggered, false if the SKManager has an activ connection.
Discussion
As a result of the request the SKManager will invoke SKManagerReceivedSmartKeys: when the time in ms is expired. Requesting SmartKey’s is not possible when the SKManager has an activ connection to the linked SmartKey. In that case the invocation of requestSmartKeysWithTimeout:repeated: has no effect and the delegate method will not be called.
See Also
Declared In
SKManager.h
– cancleSmartKeyRequest
Immediately stop a pending SmartKey search request which has been started with requestSmartKeysWithTimeout:repeated:.
- (void)cancleSmartKeyRequest
Declared In
SKManager.h
– linkSmartKey:
This method links a SmartKey to the SKManager. That means that every followed operation which needs a linked SmartKey and is triggered from the SKManager will use this SmartKey as personal SmartKey until resetSecuritySettings has been called or until a security depented operation failed.
- (SKManagerStatusCodes)linkSmartKey:(SmartKey *)sk
Parameters
sk |
The SmartKey object which will be linked to the SKManager |
---|
Return Value
There are the following possible SKManagerStatusCodes for the return value:
See Also
Declared In
SKManager.h
Communication
– connectToSmartKey:
Sends a connection request to the SmartKey.
- (SKManagerStatusCodes)connectToSmartKey:(BOOL)powerSaving
Parameters
powerSaving |
true: Power-Saving active, false: Power-Saving inactiv |
---|
Return Value
There are the following possible SKManagerStatusCodes for the return value:
- SKManagerStatusCodesSuccess -> The connection request was successful
- SKManagerStatusCodesOperationFailed -> The SmartKey is not connectable or not located currently
Discussion
When the linked SmartKey doesn’t accept the request within the next 5 seconds after the connection request is set, the connection delegate method will be invoked as failed.
Declared In
SKManager.h
– reconnectSmartKey
Forces a reconnect if the linked SmartKey is currently connected.
- (SKManagerStatusCodes)reconnectSmartKey
Return Value
If the reconnect has been initiated successfully the return value will be SKManagerStatusCodesSuccess. Otherwise it returns the correspondent SKManagerStatusCodes value
See Also
Declared In
SKManager.h
– disconnectFromSmartKey
Forces a disconnect from the linked SmartKey.
- (void)disconnectFromSmartKey
Declared In
SKManager.h
– connectionStatus
Returns the current connection status of the linked SmartKey.
- (SKManagerStatusCodes)connectionStatus
Return Value
There are the following possible SKManagerStatusCodes for the return value:
- SKManagerStatusCodesNoSmartKeyLinked
- SKManagerStatusCodesLinkedSmartKeyNotConnected
- SKManagerStatusCodesLinkedSmartKeyNotReady
- SKManagerStatusCodesLinkedSmartKeyReady
Declared In
SKManager.h
– readConfigState
Initiate a update for the config state of the linked SmartKey.
- (SKManagerStatusCodes)readConfigState
Return Value
If the update request has been initiated successfully the return value will be SKManagerStatusCodesSuccess. Otherwise it returns the correspondent SKManagerStatusCodes value
Declared In
SKManager.h
– readBatteryLevel
Initiate a update for the battery level of the linked SmartKey.
- (SKManagerStatusCodes)readBatteryLevel
Return Value
If the update request has been initiated successfully the return value will be SKManagerStatusCodesSuccess. Otherwise it returns the correspondent SKManagerStatusCodes value.
Declared In
SKManager.h
Configuration
– configurateConvenienceMode
This method tries to start a configuration process for the linked SmartKey. If the linked SmartKey is currently in the Service-Mode it can be configured with this method as SmartKey with the security state: Convenience.
- (SKManagerStatusCodes)configurateConvenienceMode
Return Value
If the configuration has been initiated successfully the return value will be SKManagerStatusCodesSuccess. Otherwise it returns the correspondent SKManagerStatusCodes value.
Discussion
The SKManager will invoke SKManagerConfigurationDone: when the configuration process has been done successfully or if the timeout which is about 20 seconds will running out before.
Declared In
SKManager.h
– configuratePairingModeWithPairingKey:
This method tries to start a configuration process for the linked SmartKey. If the linked SmartKey is currently in the Service-Mode it can be configured with this method as SmartKey with the security state: Pairing.
- (SKManagerStatusCodes)configuratePairingModeWithPairingKey:(SKPairingKey *)key
Parameters
key |
The pairing key which will be set on the SmartKey if the configuration process succeeds. |
---|
Return Value
If the configuration has been initiated successfully the return value will be SKManagerStatusCodesSuccess. Otherwise it returns the correspondent SKManagerStatusCodes value.
Discussion
The SKManager will invoke the SKManagerConfigurationDone: method when the configuration process has been done successfully or if the timeout which is about 20 seconds will running out before.
Declared In
SKManager.h
– configurateSecureModeWithPairingKey:
This method tries to start a configuration process for the linked SmartKey. If the linked SmartKey is currently in the Service-Mode it can be configured with this method as SmartKey with the security state: Secure.
- (SKManagerStatusCodes)configurateSecureModeWithPairingKey:(SKPairingKey *)key
Parameters
key |
The pairing key which will be set on the SmartKey if the configuration process succeeds. |
---|
Return Value
If the configuration has been initiated successfully the return value will be SKManagerStatusCodesSuccess. Otherwise it returns the correspondent SKManagerStatusCodes value.
Discussion
The SKManager will invoke the SKManagerConfigurationDone: method when the configuration process has been done successfully or if the timeout which is about 20 seconds will running out before.
Declared In
SKManager.h
– resetConfig
Try to send the command which forces a resets of the security configuration on the SmartKey.
- (SKManagerStatusCodes)resetConfig
Return Value
If the reset config request has been initiated successfully the return value will be SKManagerStatusCodesSuccess. Otherwise it returns the correspondent SKManagerStatusCodes value
Discussion
Resetting the SmartKey’s configuration is only possible if the resetConfig method will be sent within the first 30 seconds after a power on reset of the SmartKey.(e.g due to a battery replacement). After a succeeded reset the SmartKey needs a new configuration before it can be used furthermore. The corresponding delegate method will inform about the result of the request.
Declared In
SKManager.h
Authentication
– initiateAuthenticationChallenge
This method tries to initiate a authentication challenge with the linked SmartKey.
- (SKManagerStatusCodes)initiateAuthenticationChallenge
Return Value
If the initiation of the challenge is successful the return value will be SKManagerStatusCodesSuccess. Otherwise it returns the correspondent SKManagerStatusCodes value
Discussion
The authentication challenge can only be initiated if the linked SmartKey is configurated complete and correctly in secure mode.
Declared In
SKManager.h