package mixconfig.tools.dataretention.smartcard.commands;

import mixconfig.tools.dataretention.smartcard.ApduConstants;
import mixconfig.tools.dataretention.smartcard.Helpers;

public class GetLogEntryCommand extends AbstractCommand {

	public GetLogEntryCommand(int index) {
		instruction = ApduConstants.INSTRUCTION_GET_ANONCARDAPPLET_LOG_ENTRY;
		byte[] tmp = Helpers.shortToBytes((short) index);
		p1 = tmp[0];
		p2 = tmp[1];

		expectedReturnDataLength = 2;
	}

	public int getLength() {
		return Helpers.bytesToShort(rawResponse);
	}

}
