C
RF C
R
ONTACTLESS
ARD
RFCRParseCardPayload()
RFCRParseCardPayload()
240
M
X
800 S
P
ERIES
ROGRAMMERS
M
EADER
ODULE
Parses the Card Payload Data to the CardPayload structure.
Prototype
int RFCRParseCardPayload(CardPayload* payLoad, char* buff, int len);
Parameters
payload
Pointer to CardPayload structure to store the data
buff
Pointer to Card Payload Packet data
len
Size of the Card Payload Packet data in buff
Return Values
1
Success
not 1
Any return value that is not 1 (either < = 0 or >1) are considered
errors.
The CardPayload structure is:
typedef struct {
char status;// see below
char cardType;// see below
short trk1Start;// index to beginning of Track 1 data
short trk1Length;// length of Track 1 data
short trk2Start;// index to beginning of Track 2 data
short trk2Length;// length of Track 2 data
unsigned char crc1;// LSB of CRC
unsigned char crc2;// MSB of CRC
} CardPayload;
Please refer to the Omni 7xxx and M
Manual, VPN 23309 for the latest status code and the card type values.
Track 1 and Track 2 data will contain the Start and End Sentinels.
G
UIDE
x
800 Contactless Modules Programmers