Card information structure
struct{
DWORD dwSize;
BYTE byCardNo[ACS_CARD_NO_LEN/*32*/];
BYTE byCardType;
BYTE byLeaderCard;
BYTE byUserType;
BYTE byRes;
BYTE byDoorRight[MAX_DOOR_NUM_256/*256*/];
NET_DVR_VALID_PERIOD_CFG struValid;
BYTE byBelongGroup[MAX_GROUP_NUM_128/*128*/];
BYTE byCardPassword[CARD_PASSWORD_LEN/*8*/];
WORD wCardRightPlan[MAX_DOOR_NUM_256/*256*/];
DWORD dwMaxSwipeTimes;
DWORD dwSwipeTimes;
DWORD dwEmployeeNo;
BYTE byName[NAME_LEN/*32*/];
BYTE byRes[260];
}NET_DVR_CARD_RECORD, *LPNET_DVR_CARD_RECORD;
Structure size.
Card No., see the special card No. as follows:
0xFFFFFFFFFFFFFFFF: Illegal card No.
0xFFFFFFFFFFFFFFFE: Duress card No.
0xFFFFFFFFFFFFFFFD: Super card No.
0xFFFFFFFFFFFFFFFC to 0xFFFFFFFFFFFFFFF1: Reserved special card No. range
0xFFFFFFFFFFFFFFF0: Maximum valid card No.
Card type, 1-normal card (default); 2-disabled card; 3-blocklist card; 4-patrol card; 5-duress card; 6-super card; 7- visitor card; 8-dismissing card; 9-employee card; 10-emergency card; 11-emergency management card (for assigning permission for temporary card, it cannot open door).
Whether it is the first card: 1-yes, 0-no.
User type: 0-normal user, 1-admin user
Reserved, set to 0.
Door (elevator, lock) control permission, which is represented by bit, bit1-door (elevator, lock) 1, bit2-door (elevator, lock) 2, ..., value of bit: 1-with permission, 0-no permission.
Expiry date, refer to the structure NET_DVR_VALID_PERIOD_CFG for details.
Whether it belongs to a group, which is represented by bit, bit1-group 1, bit2-group 2, ..., bit value: 1-yes; 0-no.
Card password.
Access permission control schedule No., the default schedule No. is 1 (all-day template); if this member is not configured, there is no access permission at any time.
Maximum card swiping times: 0-no limit.
Card swiped times.
Employee ID., which is between 1 and 99999999, it cannot be 0 and cannot be duplicated.
Name
Reserved, set to 0.
Different cards (byCardNo) must link with different employee IDs (dwEmployeeNo), if one employee ID is linked to multiple cards, error will occur.