30
Core Implementation NEO2: Objective-C
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Length Track 1: %i"
, cardData.
track1Length]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Length Track 2: %i"
, cardData.
track2Length]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Length Track 3: %i"
, cardData.
track3Length]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Encoded Track 1: %@"
, cardData.
encTrack1.description]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Encoded Track 2: %@"
, cardData.
encTrack2.description]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Encoded Track 3: %@"
, cardData.
encTrack3.description]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Hash Track 1: %@"
, cardData.
hashTrack1.description]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Hash Track 2: %@"
, cardData.
hashTrack2.description]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"Hash Track 3: %@"
, cardData.
hashTrack3.description]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"KSN: %@"
, cardData.KSN.description]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"
\
nSessionID: %@"
,
cardData.sessionID
.description]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"
\
nReader Serial Number: %@"
,
cardData.RSN]];
[
self
appendMessageToResults:[NSString stringWithFormat:
@"
\
nRead Status: %2X"
,
cardData.
readStatus]];
if
(cardData.unencryptedTags != nil) [
self
appendMessageToResults:[NSString stringWithFormat:
@"
Unencrytped Tags: %@"
, cardData.unencryptedTags.description]];
if
(cardData.encryptedTags != nil) [
self
appendMessageToResults:[NSString stringWithFormat:
@"
Encrypted Tags: %@"
, cardData.encryptedTags.description]];
if
(cardData.maskedTags != nil) [
self
appendMessageToResults:[NSString stringWithFormat:
@"
Masked Tags: %@"
, cardData.maskedTags.description]];
NSLog(
@"Track 1: %@"
, cardData.track1);
NSLog(
@"Track 2: %@"
, cardData.track2);
NSLog(
@"Track 3: %@"
, cardData.track3);
NSLog(
@"Encoded Track 1: %@"
, cardData.encTrack1.description);
NSLog(
@"Encoded Track 2: %@"
, cardData.encTrack2.description);
NSLog(
@"Encoded Track 3: %@"
, cardData.encTrack3.description);
NSLog(
@"Hash Track 1: %@"
, cardData.hashTrack1.description);
NSLog(
@"Hash Track 2: %@"
, cardData.hashTrack2.description);
NSLog(
@"Hash Track 3: %@"
, cardData.hashTrack3.description);
NSLog(
@"SessionID: %@"
, cardData.sessionID.description);
NSLog(
@"nReader Serial Number: %@"
, cardData.RSN);
NSLog(
@"Read Status: %2X"
, cardData.readStatus);
NSLog(
@"KSN: %@"
, cardData.KSN.description);
return
;
}
break
;
case
EVENT_MSR_CANCEL_KEY:
{
[
self
appendMessageToResults:[NSString stringWithFormat:
@"(Event) MSR Cancel Key received: %@"
,
cardData.encTrack1]];
return
;
}
break
;
case
EVENT_MSR_BACKSPACE_KEY:
{
[
self
appendMessageToResults:[NSString stringWithFormat:
@"(Event) MSR Backspace Key received:
%@"
, cardData.encTrack1]];
return
;
}
break
;
case
EVENT_MSR_ENTER_KEY:
{
[
self
appendMessageToResults:[NSString stringWithFormat:
@"(Event) MSR Enter Key received: %@"
,
cardData.encTrack1]];
return
;
}
break
;
case
EVENT_MSR_UNKNOWN:
{
[
self
appendMessageToResults:[NSString stringWithFormat:
@"(Event) MSR unknown event, data: %@"
,
cardData.encTrack1]];
return
;
}
break
;
case
EVENT_MSR_TIMEOUT:
{
[
self
appendMessageToResults:
@"(Event) MSR TIMEOUT"
];
return
;
}
default
:
#80152504-001 IDTech iOS SDK Guide for NEO2