There is a single method that will receive all callback information from the SDK. It uses DeviceState to determine which action to take.
private void MessageCallBack(IDTechSDK.IDT_DEVICE_Types type, DeviceState state, byte[] data, IDTTransactionData cardData, EMV_Callback emvCallback, RETURN_CODE transactionResultCode)
{
switch (state)
{
case DeviceState.ToConnect:
break;
case DeviceState.DefaultDeviceTypeChange:
break;
case DeviceState.Connected:
break;
case DeviceState.Disconnected:
break;
case DeviceState.ConnectionFailed:
break;
case DeviceState.TransactionData:
break;
case DeviceState.DataReceived:
break;
case DeviceState.DataSent:
break;
case DeviceState.CommandTimeout:
break;
case DeviceState.ToSwipe:
break;
case DeviceState.MSRDecodeError:
break;
case DeviceState.ToTap:
break;
case DeviceState.SwipeTimeout:
break;
case DeviceState.TransactionCancelled:
break;
case DeviceState.DeviceTimeout:
break;
case DeviceState.TransactionFailed:
break;
case DeviceState.EMVCallback:
break;
default:
break;
}
}