This interface invokes a callback function to receive data and/or a detailed response. To use, a class must implements the IConfigurationCallback Delegates interface.
This event is called when certain asynchronous IDeviceConfiguration operations need to have a MAC included with the request.
(IResult*) OnCalculateMAC: (unsigned char) macType
data: (NSData*) data;Parameter
Description
macType
Type of Mac algorithm. For DynaFlex, use 0.
data
Contains the data of the payload to MAC.
Return Value:
Returns an IResult* that contains the calculated MAC.
This event is called to update the host on the progress of an asynchronous IDeviceConfiguration operation.
Return Value: None
This event is called to update the host when an asynchronous IDeviceConfiguration operation is completed.
Return Value: None
Example:
(void) OnProgress: (int) Progress;Parameter
Description
progress
The progress of the configuration operation. Range:
0 - 100
(void) OnResult: (MTU_StatusCode) status
data: (NSData*) data;Parameter
Description
status
An enumerated MTU_StatusCode.
data
Contains the data for the event.
interface MTUSDK_DynaFlex : <IConfigurationCallback>
func OnCalculateMAC(_ macType: UInt8, data: Data) -> IResult
{
// Event handler
}
func onProgress(_ progressValue: Int32)
{
// Event handler
}
func onResult(_ status: MTU_StatusCode, data: Data)
{
// Event handler
}