public SetBuzzerOutputForCardDetection ( Lando.LowLevel.Card card, bool shouldBuzzWhenCardDetected ) : Lando.LowLevel.ResultsTypes.ApduOperationResult | ||
card | Lando.LowLevel.Card | |
shouldBuzzWhenCardDetected | bool | |
return | Lando.LowLevel.ResultsTypes.ApduOperationResult |
public ApduOperationResult SetBuzzerOutputForCardDetection(Card card, bool shouldBuzzWhenCardDetected)
{
var bytesToSend = new byte[5];
bytesToSend[0] = 0xFF;
bytesToSend[1] = 0x00;
bytesToSend[2] = 0x52;
bytesToSend[3] = shouldBuzzWhenCardDetected ? (byte)0xFF : (byte)0x00;
bytesToSend[4] = 0x00;
const int responseCodeLength = 2;
ApduResponse response = SendAPDU(card, bytesToSend, responseCodeLength);
return ReturnCodeManager.IsApduSuccessful(response);
}
public void Execute(LowLevelCardReader lowLevelCardReader) { if (lowLevelCardReader == null) throw new ArgumentNullException("lowLevelCardReader"); lowLevelCardReader.SetBuzzerOutputForCardDetection(Card.Card, ShouldBuzzWhenCardDetected); }