Professional Documents
Culture Documents
2 EndSession
End session. Function definition:
DWORD EndSession (void);
Parameter: no
Return Value: Refer to Remark 1.
3. ChangeLogUser
Change operator. Function definition:
void ChangeLogUser (LPSTR LogUser);
Parameter:
LogUser [in]: User Name, with it lock system will record opeators
Return Value: no
4. NewKey
Issue new guest card, this funciton will erase existing guest cards, unlocking with the new
guest card, original guest cards will be terminated.
Function definition:
int NewKey(LONG Port ,LPSTR RoomNo,LPSTR CommonDoor,LPSTR
LiftFloor,LPSTR TimeStr,LPSTR Holder,LPSTR IDNo, LONG breakfast, LONG overflag,
LONG *CardNo);
Parameter:
Port [in]: Port of Encoder, Refer to Remark 4.
RoomNo [in]: Room Number, it must be the room number which set by lock system.
CommonDoor [in]: Common door, assign common door code, separate with comma
when one more common doors authorized, Example.: 001,002,003means
authrize 3 common doors of 001,002,003. Null allowed
LiftFloor [in]: Lift Floor, assign floor code, separate with comma when one more floors
authorized, Example.: 0001,0002,0003means authrize 3 floors of
0001,0002,0003. Null allowed
TimeStr [in]: Start and end time, format: yyyymmddhhnnyyyymmddhhnn, Example.:
200801011230200801051230means from 12:30 1 st, Jan.,2008 to 12:30 5th ,
1
July, 2011
Jan., 2008.
Holder [in]: Card holders name, Null allowed.
IDNo [in]: ID number of card holder, Null allowed.
breakfast [in]: Int, Breakfast flag. 1 - Yes, 0 No.
Overfla [in]: Int, Replace the data in current card or not. 1 - replace, erase automatically
current card if it is not a new card (must be Guest card); 0 do not
replace, return if it is not a new card.
Cardno [out]: Pointer to long int, receive card number (the sole code assigned when issue
card). Null allowed.
Return Value: Refer to Remark 1.
5. DupKey
Duplicate Guest card, when it is issued, the original guest card will not be affectted, both
them will unlocking, and their effective time is same.
Function definition:
int DupKey(LONG Port ,LPSTR RoomNo,LPSTR CommonDoor,LPSTR
LiftFloor,LPSTR TimeStr,LPSTR Holder,LPSTR IDNo, LONG breakfast, LONG overflag,
LONG *CardNo);
Parameter:
Refer to NewKey Function definition
Return Value: Refer to Remark 1.
6. ReadKeyCard
Read Card. Function definition:
int ReadKeyCard (LONG Port ,LPSTR RoomNo,LPSTR CommonDoor,LPSTR
LiftFloor,LPSTR TimeStr, LPSTR Holder, LPSTR IDNo,LONG *CardNo, LONG *Status, LONG
*Breakfast);
Parameter:
Port [in]: Port of Encoder, Refer to Remark 4.
RoomNo [out]: Receive returned room number. Null allowed
CommonDoor [out]: Receive returned authorized common door. Null allowed.
LiftFloor[out]: Receive returned authorized Lift Floor. Null allowed.
TimeStr[out]: Receive the cards validity term. Null allowed.
Holder [out]: Receive returned card holders name. Null allowed.
IDNo [out]: Receive returned ID number of card holder. Null allowed.
CardNo [out]: Pointer to long int, receive returned card number. Null allowed.
Status [out]: Pinter to int, Receive returned state of card.Refer to Remark3. Null
allowed.
Breakfast [out]: Pinter to int, Receive returned breakfast flag. Null allowed.
Return Value: refer to Remark 1.
7 EraseKeyCard
Erase card, at the same time, renew data in database. Function definition:
int EraseKeyCard (LONG Port,LONG CardNo);
2
July, 2011
Parameter:
Port [in]: Port of encoder. Refer to Remark 4.
CardNo [in]: Card number, 0 allowed. If parameter is o,then read card number
automatically and erase it.
Return Value: refer to Remark 1.
8. CheckOut
Check out, only renew data in database, do not erase card. Function definition:
int CheckOut (LPSTR RoomNo, LONG CardNo);
Parameter:
RoomNo [in]: Room number
CardNo [in]: Card number, 0allowed, If the parameter is 0, then all guest cards for
the room will be marked check-out
Return Value: Refer to Remark 1
9. ReadCardID
Read Card ID. Function definition:
int ReadCardID (LONG Port ,LONG *CardID);
Parameter:
Port [in]: Port of Encoder, Refer to Remark 4.
CardID [out]: Pointer to long int, receive returned card ID. Null allowed.
Return Value: refer to Remark 1.
Remark: 1. Return Value of Functions
0x00000000 - Successful Operation
0x8010000C - IC car not find
0x80100069 - Card removed
0x81100001 - Password erro
0x81100002 - Card damaged
0x81300001 - Communication erro
0xFFFF0001 - Card type erro
0xFFFF0002 - Card replaced
0xFFFF0003 - Blank card
0xFFFF0004 - Illegle card
0xFFFF0005 - Group Card
0xFFFF0006 - Blank group card
0xFFFF0007 - Not blank card
0xFFFF0008 - COM Port open erro
0xFFFF0009 - COM port communication erro.
0xFFFF1001 - Initialization function was not invoked
0xFFFF1002 - Defined guest not exist.
0xFFFF1003 - Card info not exist 0xFFFF1004 - Not guest ard
0xFFFF1005 - Wrong room no.
0xFFFF1006 - Wrong common door
0xFFFF3000 - SQL execution erro 0xFFFF3001 - SQL connect erro
0xFFFF3002 - System Parameter not exist 0xFFFF3003 - Wrong Serial Number
0xFFFF4000 - Interface authentication code not exist
3
July, 2011
4
July, 2011
4, NewKey
Funcin: emitir nueva tarjeta de husped, esta funcin registra la tarjeta de cliente actual en
uso, despus de la emisin de la nueva tarjeta de invitado para abrir la puerta del original
No se utilizarn huspedes de la tarjeta.
Prototipo de la funcin:
int NewKey (LARGO Puerto, LPSTR RoomNo, LPSTR CommonDoor, LPSTR LiftFloor,
LPSTR TimeStr, Titular LPSTR, LPSTR idno, desayuno LARGO, overflag LARGO, LARGO
* Cardno);
Parmetros de la funcin:
Puerto [en]: emisin de interfaz de la mquina, vase la nota 4.
RoomNo [en]: el nmero de habitacin, debe ser fijado por el sistema bloquea el nmero de
habitacin.
CommonDoor [en]: canal, especifique el cdigo de canal, se autoriza a mltiples canales estn
divididos por comas.
Por ejemplo: "001002003" indica autorizados 001002003 tres canales. Puede ser NULL.
LiftFloor [en]: piso ascensor, cdigos pisos designados autorizar varios pisos estn separados
por comas.
Por ejemplo: "0001,0002,0003" indica autorizados 0001,0002,0003 tres plantas. Puede ser
NULL.
TimeStr [en]: inicio y hora de finalizacin, el formato yyyymmddhhnnyyyymmddhhnn,
Por ejemplo: "200801011230200801051230" representa a las 12:30 el 1 de enero de 2008 se
reparte al 2008
Sobre las 12:30 el 5 de enero.
Holder [en]: nombre del titular de la tarjeta, puede ser NULL.
Idno [en]: nmero de identificacin del titular, puede ser NULL.
desayuno [en]: plstico, bandera desayuno 1 - a 0 - no.
Overfla [en]: ciruga plstica, si desea sobrescribir el contenido de la tarjeta actual.
1- cubre la tarjeta actual no es una nueva tarjeta se cancela automticamente (debe ser la
tarjeta de husped).
0 - No cubra, no se devuelve la nueva tarjeta.
Cardno [out]: puntero entero largo, recibiendo el nmero de tarjeta (despus de emitir
asignado cdigo de tarjeta nica). Puede ser NULL.
Devoluciones: Ver Nota 1.
5, DupKey
Funcin: "Copiar" tarjeta de cliente, la nueva edicin de tarjetas de clientes con la tarjeta de
6
July, 2011
9
July, 2011