TR515 User’s Manual
14
Get specified record (‘G’, 47H)
Possible error codes: 04, 06, 07
Command G
NNNN
Reply A
NNNN,ccc…c,E,YYYY/MM/DD,hh:mm:sscc
NNNN
- record number (starti ng from 0000) in Hex form ,
ccc…c
- ID-code, E-
event (0: OUT, 1: I N),
YYYY
- year,
MM
-month, DD-date, hh-hour,
mm
- minute,
ss
- second, cc- checksum
This command is used to retrieve the database record with a specified
number. Rec ord number must be s upplied in Hex format, l eading zeroes must
be preserved or error 04 will be returned. Record numbers start from 0000.
Specifying rec ord number beyond N-1 (where N i s t he num ber of r ecords in the
database returned by the N-command) will cause error 06.
Returned data string contains the record number, ID-code of the ID-card
that was used to create this record, event c ode (i.e. which but ton was pressed) ,
and the date and time of rec ord creation.
The TR515 verifies all dat abase rec ords befor e sendi ng them out t o the PC.
This is done becaus e t he FLA SH m em ory m ay ac tual ly cont ain a garbage data.
There is a special M-command that lets you initialize the database in such a
way that it appears to be 100% full (you can “rec over” entire database m emory
contents then). Naturally, some database records may turn out to contain
invalid data.
Database record val idity is verified on a field-by-fi eld bas is. Should t he fiel d
turn out to be invalid, its contents are substituted for a “safe” default data:
• ID-code
. If ID-code turns out to contain illegal characters (i.e. with
codes outside of 20H-7FH range), then these characters are
substit uted for “_”. I f ID-code length is out side of valid marg ins (<1 or
>40) then entire ID-code is substituted for the following code:
“0000000000” (ten ‘0’ characters)
• Date
. If the date is invalid (i.e. December, 32
nd
) then default date
(1999/01/01) is used
• Time
. If the time is invalid (i.e. 24: 00:00) then default time is used
• Event
. if Event code exceeds 1, then this field is substituted for “0”.