Lando.LowLevel.LowLevelCardReader.UpdateLedAndBuzzer C# (CSharp) Method

UpdateLedAndBuzzer() public method

public UpdateLedAndBuzzer ( Lando.LowLevel.Card card, byte ledState, byte t1, byte t2, byte repetitionNumber, byte buzzer ) : Lando.LowLevel.ResultsTypes.ApduOperationResult
card Lando.LowLevel.Card
ledState byte
t1 byte
t2 byte
repetitionNumber byte
buzzer byte
return Lando.LowLevel.ResultsTypes.ApduOperationResult
        public ApduOperationResult UpdateLedAndBuzzer(Card card, byte ledState, byte t1, byte t2, byte repetitionNumber, byte buzzer)
        {
            var bytesToSend = new byte[9];
            bytesToSend[0] = 0xFF;
            bytesToSend[1] = 0x00;
            bytesToSend[2] = 0x40;
            bytesToSend[3] = ledState;
            bytesToSend[4] = 0x04;
            bytesToSend[5] = t1;
            bytesToSend[6] = t2;
            bytesToSend[7] = repetitionNumber;
            bytesToSend[8] = buzzer;

            const int responseCodeLength = 2;

            ApduResponse response = SendAPDU(card, bytesToSend, responseCodeLength);

            return ReturnCodeManager.IsApduSuccessful(response);
        }

Usage Example

Exemplo n.º 1
0
        public void Execute(LowLevelCardReader lowLevelCardReader)
        {
            if (lowLevelCardReader == null) throw new ArgumentNullException("lowLevelCardReader");

            lowLevelCardReader.UpdateLedAndBuzzer(
                Card.Card, Status.GetLedState(),
                Status.GetT1(), Status.GetT2(),
                Status.GetRepetition(),
                Status.GetBuzzerLink());
        }