CONTACTLESS RF CARD READER MODULE
RFCRParseCardPayload()
240 M
X
800 SERIES PROGRAMMERS GUIDE
RFCRParseCardPayload()
Parses the Card Payload Data to the CardPayload structure.
Prototype
int RFCRParseCardPayload(CardPayload* payLoad, char* buff, int len);
Parameters
Return Values
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
x
800 Contactless Modules Programmers
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.
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
1 Success
not 1 Any return value that is not 1 (either < = 0 or >1) are considered
errors.