MTUSDKNET API will invoke the callback function in this chapter to provide the requested data and/or a detailed response. These events will be called in a class that implements the IConfigurationCallback Delegates interface.
This event is called when certain asynchronous IDeviceConfiguration operations need to be have a MAC included with the request.
Copy
IResult OnCalculateMAC(
byte macType,
byte[] data);macType
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.
public void OnProgres(int progress);
Return Value: None
This event is called to update the host when an asynchronous IDeviceConfiguration operation is completed.
Copy
Return Value: None
Example:
Copy
For the complete documentation index, see . This page is also available as .
Type of Mac algorithm. For DynaFlex, use 0.
data
Contains the data of the payload to MAC.
progress
The progress of the configuration operation. Range: 0 - 100
public void OnResult(
StatusCode status,
byte[] data);status
An enumerated Library Status Codes.
data
Contains the data for the event.
class OnConfigCallbackClass implements IConfigurationCallBack
{
public IResult OnCalculateMAC(byte macType, byte[] data)
{
// Event handler
}
public void OnProgress(int progress)
{
// Event handler
}
public void OnResult(StatusCode status, byte[] data)
{
// Event handler
}
}
OnConfigCallbackClass configCallBack = new OnConfigCallbackClass();