All pages
Powered by GitBook
1 of 1

Loading...

IDeviceConfiguration

Create an instance of the IDeviceConfiguration using IDevice.getDeviceConfiguration. Then use the function calls described in this chapter.

Generally, these functions will run in one of two modes:

  • Asynchronous functions return data in the event handlers.

  • Synchronous functions return data in the return value. If the data is not available immediately, the call will block until a wait time has elapsed.

deleteFile

This function deletes a file from the device.

(int) deleteFile: (NSData*) fileID

Return Value:

Returns 0 if the asynchronous configuration operation started. Otherwise, returns a non 0 value.

This function retrieves a challenge token from the device. A challenge token consists of a random nonce or timestamp. A challenge token must be used within the time allowed by the device (generally 5 minutes) after issued. Only one token can be active at a time. Attempts to use a token for requests other than the one specified will cause the token to be revoked/erased.

Return Value:

Returns a byte array containing the challenge token.

This function retrieves device configuration information. For an example, see appendix 15.24A.6 IDeviceConfiguration Walk Through.

Return Value:

Returns an array of bytes containing the configuration information.

This function retrieves device specific information.

Return Value:

Returns a string value device information.

This function retrieves file information based on file ID. The response file data will be returned via the callback.

Return Value:

Returns 0 if the asynchronous configuration operation started. Otherwise, returns a non 0 value.

This function retrieves key information.

Return Value:

Returns an array of bytes containing the key information.

This function sends a file to the device.

Return Value:

Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

This function sends an image to the device.

Return Value:

Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

This function sends a file to the device using a secure command structure.

Return Value:

Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

This function sets device configuration information. For an example, see appendix 15.24A.6 IDeviceConfiguration Walk Through.

Return Value:

Returns 0 if the asynchronous configuration operation started. Otherwise, returns a non 0 value.

This function sets which image is to be displayed when the device is idle. The image is displayed after a device reset.

Return Value:

Returns 0 if the asynchronous configuration operation started. Otherwise, returns a non 0 value.

This function updates the device firmware.

Return Value:

Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

This function updates key information in the device.

Return Value:

Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

Parameter

Description

fileID

Byte array for the file ID. For DynaFlex, use a 4-byte file id. 0x02000000 = Custom idle page image 1

0x02000001 = Custom idle page image 2 0x02000002 = Custom idle page image 3 0x02000003 = Custom idle page image 4

Parameter

Description

data

Byte array containing the request ID to be protected.

Parameter

Description

configType

Type of configuration. For DynaFlex, this is the first number of the Property OID.

· 0x01 = Device Settings

· 0x02 = Device Information

data

Configuration data to be sent to the device. For DynaFlex, this is the remainder of the constructed OID. For constructing the OID see D998200383 DynaFlex Family Programmer’s Manual (COMMANDS)

Parameter

Description

infoType

Enumerated information type.

InfoType

Parameter

Description

fileID

Byte array for the file ID. For DynaFlex, use a 4-byte file id.

callback

Name of a class or structure that implements the IConfigurationCallback Delegates events.

Parameter

Description

keyType

Type of key. For DynaFlex, use 0.

data

Key data to be sent to the device. For DynaFlex, this is the 2-byte key slot number.

Parameter

Description

fileID

Byte array for the file ID. For DynaFlex, use a 4-byte file id.

data

File contents to be sent to the device.

callback

Name of a class or structure that implements the IConfigurationCallback Delegates events.

Parameter

Description

imageID

Value for the image ID. For DynaFlex, use:

1, 2, 3, or 4

data

File contents to be sent to the device.

Images must be BMP format, 160KB or smaller with no compression, maximum 320px by 240px, with color depth 16 color, 256 color, 16-bit color, or 24-bit color. Images smaller than the maximum size are centered on the display. Note images at full screen size must be 16-bit color or lower to meet the size requirement.

For details see DynaFlex Family Programmer’s Manual

callback

Name of a class or structure that implements the IConfigurationCallback Delegates events.

Parameter

Description

fileID

Byte array for the file ID. For DynaFlex, use a 4-byte file id.

data

File contents to be sent to the device.

callback

Name of a class or structure that implements the IConfigurationCallback Delegates events.

Parameter

Description

configType

Type of configuration. For DynaFlex, this is the first number of the Property OID.

· 0x01 = Device Settings

· 0x02 = Device Information

data

Configuration data to be sent to the device. For DynaFlex, this is the remainder of the constructed OID and value. For constructing the OID see D998200383 DynaFlex Family Programmer’s Manual (COMMANDS)

callback

Name of a class or structure that implements the IConfigurationCallback Delegates events.

Parameter

Description

imageID

Value for the image ID.

For DynaFlex, use:

0, 1, 2, 3, or 4

0 restores the image to the “Welcome” screen.

callback

Completion handler. If the operation is successful, the completion handler will return true, otherwise false.

typedef void(^BooleanCallback)(Boolean resultFlag);

Parameter

Description

configType

Type of firmware. For DynaFlex, use:

1 = Main App

2 = Wireless App

3 = Bluetooth LE App

data

Firmware image to be sent to the device.

callback

Name of a class or structure that implements the IConfigurationCallback Delegates events.

Parameter

Description

keyType

Type of key.

data

Key data to be sent to the device.

callback

Name of a class or structure that implements the IConfigurationCallback Delegates events.

getChallengeToken

getConfigInfo

getDeviceInfo

getFile

getKeyInfo

sendFile

sendImage

sendSecureFile

setConfigInfo

setDisplayImage

updateFirmware

updateKeyInfo

(NSData*) getChallengeToken: (NSData*) data;
(NSData*) getConfigInfo: (byte) configType 
                data: (NSData*) data;
(NSString*) getDeviceInfo: (MTU_InfoType) infoType;
(int) getFile: (NSData*) fileID 
                callback: (nullable id<IConfigurationCallback>) callback;
(NSData*) getKeyInfo: (byte) keyType 
                data: (NSData*) data;
(int) sendFile: (NSData*) fileID 
        data: (NSData*) data
        callback: (nullable id<IConfigurationCallback>) callback;
(int) sendImage: (byte) imageID 
                                data: (NSData*) data 
                callback: (nullable id<IConfigurationCallback>) callback;
(int) sendSecureFile: (NSData*) fileID 
                                data: (NSData*) data 
                callback: (nullable id<IConfigurationCallback>) callback;
(int) setConfigInfo: (byte) configType 
                data: (NSData*) data 
        callback: (nullable id<IConfigurationCallback>) callback;
(int) setDisplayImage: (byte) imageID; 
(void) setDisplayImage: (byte) imageID 
    completionHandler: (BooleanCallback) callback;
(int) updateFirmware: (ushort) configType 
                data: (NSData*) data
        callback: (nullable id<IConfigurationCallback>) callback;
(int) updateKeyInfo: (byte) keyType 
                data: (NSData*) data 
        callback: (nullable id<IConfigurationCallback>) callback;