using System; using System.Runtime.InteropServices; namespace DeviceCenter { public class CHCNetSDK { #region HCNetSDK.dll macro definition //macro definition #region common use /*******************Global Error Code**********************/ public const int NET_DVR_NOERROR = 0; //No Error public const int NET_DVR_PASSWORD_ERROR = 1;//Username or Password error public const int NET_DVR_NOENOUGHPRI = 2;//Don't have enough authority public const int NET_DVR_NOINIT = 3;//have not Initialized public const int NET_DVR_CHANNEL_ERROR = 4;//Channel number error public const int NET_DVR_OVER_MAXLINK = 5;//Number of clients connecting to DVR beyonds the Maximum public const int NET_DVR_VERSIONNOMATCH = 6;//Version is not matched public const int NET_DVR_NETWORK_FAIL_CONNECT = 7;//Connect to server failed public const int NET_DVR_NETWORK_SEND_ERROR = 8;//Send data to server failed public const int NET_DVR_NETWORK_RECV_ERROR = 9;//Receive data from server failed public const int NET_DVR_NETWORK_RECV_TIMEOUT = 10;//Receive data from server timeout public const int NET_DVR_NETWORK_ERRORDATA = 11;//Transferred data has error public const int NET_DVR_ORDER_ERROR = 12;//Wrong Sequence of invoking API public const int NET_DVR_OPERNOPERMIT = 13;//No such authority. public const int NET_DVR_COMMANDTIMEOUT = 14;//Execute command timeout public const int NET_DVR_ERRORSERIALPORT = 15;//Serial port number error public const int NET_DVR_ERRORALARMPORT = 16;//Alarm port error public const int NET_DVR_PARAMETER_ERROR = 17;//Parameters error public const int NET_DVR_CHAN_EXCEPTION = 18;//Server channel in error status public const int NET_DVR_NODISK = 19;//No hard disk public const int NET_DVR_ERRORDISKNUM = 20;//Hard disk number error public const int NET_DVR_DISK_FULL = 21;//Server's hard disk is full public const int NET_DVR_DISK_ERROR = 22;//Server's hard disk error public const int NET_DVR_NOSUPPORT = 23;//Server doesn't support public const int NET_DVR_BUSY = 24;//Server is busy public const int NET_DVR_MODIFY_FAIL = 25;//Server modification failed public const int NET_DVR_PASSWORD_FORMAT_ERROR = 26;///Input format of Password error public const int NET_DVR_DISK_FORMATING = 27;//Hard disk is formating, cannot execute. public const int NET_DVR_DVRNORESOURCE = 28;//DVR don't have enough resource public const int NET_DVR_DVROPRATEFAILED = 29;//DVR Operation failed public const int NET_DVR_OPENHOSTSOUND_FAIL = 30;//Open PC audio failed public const int NET_DVR_DVRVOICEOPENED = 31;///Server's talk channel is occupied public const int NET_DVR_TIMEINPUTERROR = 32;//Time input is not correct public const int NET_DVR_NOSPECFILE = 33;//Can't playback the file that does not exist in Server public const int NET_DVR_CREATEFILE_ERROR = 34;//Create file error public const int NET_DVR_FILEOPENFAIL = 35;///Open file error public const int NET_DVR_OPERNOTFINISH = 36; //The previous operation is not finished yet public const int NET_DVR_GETPLAYTIMEFAIL = 37;//Get current playing time error public const int NET_DVR_PLAYFAIL = 38;//Playback error public const int NET_DVR_FILEFORMAT_ERROR = 39;//Wrong file format public const int NET_DVR_DIR_ERROR = 40;//Wrong directory public const int NET_DVR_ALLOC_RESOURCE_ERROR = 41;//Assign resource error public const int NET_DVR_AUDIO_MODE_ERROR = 42;//Audio card mode error public const int NET_DVR_NOENOUGH_BUF = 43;///Buffer is too small public const int NET_DVR_CREATESOCKET_ERROR = 44;//Create SOCKET error public const int NET_DVR_SETSOCKET_ERROR = 45;//Setup SOCKET error public const int NET_DVR_MAX_NUM = 46;//Reach the maximum number public const int NET_DVR_USERNOTEXIST = 47;//User does not exist public const int NET_DVR_WRITEFLASHERROR = 48;//Write to FLASH error public const int NET_DVR_UPGRADEFAIL = 49;//DVR update failed public const int NET_DVR_CARDHAVEINIT = 50;//Decoding Card has been initialized already public const int NET_DVR_PLAYERFAILED = 51;//Invoke API of player library error public const int NET_DVR_MAX_USERNUM = 52;//Reach the maximum number of Users public const int NET_DVR_GETLOCALIPANDMACFAIL = 53;//Failed to get Client software's IP or MAC address public const int NET_DVR_NOENCODEING = 54;//No encoding on this channel public const int NET_DVR_IPMISMATCH = 55;//IP address is not matched public const int NET_DVR_MACMISMATCH = 56;//MAC address is not matched public const int NET_DVR_USER_LOCKED = 153; /*******************END**********************/ public const int NET_DVR_DEV_ADDRESS_MAX_LEN = 129; //device address max length public const int NET_DVR_LOGIN_USERNAME_MAX_LEN = 64; //login username max length public const int NET_DVR_LOGIN_PASSWD_MAX_LEN = 64; //login password max length public const int SERIALNO_LEN = 48; //serial number length public const int STREAM_ID_LEN = 32; public const int MAX_AUDIO_V40 = 8; public const int LOG_INFO_LEN = 11840; // log append information public const int MAX_NAMELEN = 16; //DVR's local Username public const int MAX_DOMAIN_NAME = 64; // max domain name length public const int MAX_ETHERNET = 2; // device public const int NAME_LEN = 32;// name length public const int PASSWD_LEN = 16;//password length public const int MAX_RIGHT = 32; //Authority permitted by Device (1- 12 for local authority, 13- 32 for remote authority) public const int MACADDR_LEN = 6;//mac adress length public const int DEV_TYPE_NAME_LEN = 24; public const int MAX_ANALOG_CHANNUM = 32; //32 analog channels in total public const int MAX_IP_CHANNEL = 32; //9000 DVR can connect 32 IP channels public const int MAX_CHANNUM_V30 = (MAX_ANALOG_CHANNUM + MAX_IP_CHANNEL); //64 public const int MAX_CHANNUM_V40 = 512; public const int MAX_IP_DEVICE_V40 = 64; //Maximum number of IP devices that can be added, the value is 64, including IVMS-2000 public const int DEV_ID_LEN = 32; public const int MAX_IP_DEVICE = 32;//9000 DVR can connect 32 IP devices public const int MAX_IP_ALARMIN_V40 = 4096;//Maximum number of alarm input channels that can be added public const int MAX_IP_ALARMOUT_V40 = 4096;//Maximum number of alarm output channels that can be added public const int MAX_IP_ALARMIN = 128;//Maximum number of alarm input channels that can be added public const int MAX_IP_ALARMOUT = 64;//Maximum number of alarm output channels that can be added public const int URL_LEN = 240; //URL length public const int MAX_AUDIOOUT_PRO_TYPE = 8; public const int ACS_ABILITY = 0x801; //acs ability public const int NET_DVR_CLEAR_ACS_PARAM = 2118; //clear acs host parameters public const int NET_DVR_GET_ACS_EVENT = 2514; //clear acs host parameters #endregion #region acs event upload public const int COMM_ALARM_ACS = 0x5002; //access card alarm public const int NET_SDK_GET_NEXT_STATUS_SUCCESS = 1000; public const int NET_SDK_GET_NEXT_STATUS_NEED_WAIT = 1001; public const int NET_SDK_GET_NEXT_STATUS_FINISH = 1002; public const int NET_SDK_GET_NEXT_STATUS_FAILED = 1003; /* Alarm */ // Main Type public const int MAJOR_ALARM = 0x1; // Hypo- Type public const int MINOR_ALARMIN_SHORT_CIRCUIT = 0x400; // region short circuit public const int MINOR_ALARMIN_BROKEN_CIRCUIT = 0x401; // region broken circuit public const int MINOR_ALARMIN_EXCEPTION = 0x402; // region exception public const int MINOR_ALARMIN_RESUME = 0x403; // region resume public const int MINOR_HOST_DESMANTLE_ALARM = 0x404; // host desmantle alarm public const int MINOR_HOST_DESMANTLE_RESUME = 0x405; // host desmantle resume public const int MINOR_CARD_READER_DESMANTLE_ALARM = 0x406; // card reader desmantle alarm public const int MINOR_CARD_READER_DESMANTLE_RESUME = 0x407; // card reader desmantle resume public const int MINOR_CASE_SENSOR_ALARM = 0x408; // case sensor alarm public const int MINOR_CASE_SENSOR_RESUME = 0x409; // case sensor resume public const int MINOR_STRESS_ALARM = 0x40a; // stress alarm public const int MINOR_OFFLINE_ECENT_NEARLY_FULL = 0x40b; // offline ecent nearly full public const int MINOR_CARD_MAX_AUTHENTICATE_FAIL = 0x40c; // card max authenticate fall public const int MINOR_SD_CARD_FULL = 0x40d; // SD card is full public const int MINOR_LINKAGE_CAPTURE_PIC = 0x40e; // lingage capture picture public const int MINOR_SECURITY_MODULE_DESMANTLE_ALARM = 0x40f; //Door control security module desmantle alarm public const int MINOR_SECURITY_MODULE_DESMANTLE_RESUME = 0x410; //Door control security module desmantle resume public const int MINOR_POS_START_ALARM = 0x411; // POS Start public const int MINOR_POS_END_ALARM = 0x412; // POS end public const int MINOR_FACE_IMAGE_QUALITY_LOW = 0x413; // face image quality low public const int MINOR_FINGE_RPRINT_QUALITY_LOW = 0x414; // finger print quality low public const int MINOR_FIRE_IMPORT_SHORT_CIRCUIT = 0x415; // Fire import short circuit public const int MINOR_FIRE_IMPORT_BROKEN_CIRCUIT = 0x416; // Fire import broken circuit public const int MINOR_FIRE_IMPORT_RESUME = 0x417; // Fire import resume public const int MINOR_FIRE_BUTTON_TRIGGER = 0x418; // fire button trigger public const int MINOR_FIRE_BUTTON_RESUME = 0x419; // fire button resume public const int MINOR_MAINTENANCE_BUTTON_TRIGGER = 0x41a; // maintenance button trigger public const int MINOR_MAINTENANCE_BUTTON_RESUME = 0x41b; // maintenance button resume public const int MINOR_EMERGENCY_BUTTON_TRIGGER = 0x41c; // emergency button trigger public const int MINOR_EMERGENCY_BUTTON_RESUME = 0x41d; // emergency button resume public const int MINOR_DISTRACT_CONTROLLER_ALARM = 0x41e; // distract controller alarm public const int MINOR_DISTRACT_CONTROLLER_RESUME = 0x41f; // distract controller resume public const int MINOR_CHANNEL_CONTROLLER_DESMANTLE_ALARM = 0x422; //channel controller desmantle alarm public const int MINOR_CHANNEL_CONTROLLER_DESMANTLE_RESUME = 0x423; //channel controller desmantle resume public const int MINOR_CHANNEL_CONTROLLER_FIRE_IMPORT_ALARM = 0x424; //channel controller fire import alarm public const int MINOR_CHANNEL_CONTROLLER_FIRE_IMPORT_RESUME = 0x425; //channel controller fire import resume public const int MINOR_PRINTER_OUT_OF_PAPER = 0x440; //printer no paper public const int MINOR_LEGAL_EVENT_NEARLY_FULL = 0x442; //Legal event nearly full /* Exception*/ // Main Type public const int MAJOR_EXCEPTION = 0x2; // Hypo- Type public const int MINOR_NET_BROKEN = 0x27; // Network disconnected public const int MINOR_RS485_DEVICE_ABNORMAL = 0x3a; // RS485 connect status exception public const int MINOR_RS485_DEVICE_REVERT = 0x3b; // RS485 connect status exception recovery public const int MINOR_DEV_POWER_ON = 0x400; // device power on public const int MINOR_DEV_POWER_OFF = 0x401; // device power off public const int MINOR_WATCH_DOG_RESET = 0x402; // watch dog reset public const int MINOR_LOW_BATTERY = 0x403; // low battery public const int MINOR_BATTERY_RESUME = 0x404; // battery resume public const int MINOR_AC_OFF = 0x405; // AC off public const int MINOR_AC_RESUME = 0x406; // AC resume public const int MINOR_NET_RESUME = 0x407; // Net resume public const int MINOR_FLASH_ABNORMAL = 0x408; // FLASH abnormal public const int MINOR_CARD_READER_OFFLINE = 0x409; // card reader offline public const int MINOR_CARD_READER_RESUME = 0x40a; // card reader resume public const int MINOR_INDICATOR_LIGHT_OFF = 0x40b; // Indicator Light Off public const int MINOR_INDICATOR_LIGHT_RESUME = 0x40c; // Indicator Light Resume public const int MINOR_CHANNEL_CONTROLLER_OFF = 0x40d; // channel controller off public const int MINOR_CHANNEL_CONTROLLER_RESUME = 0x40e; // channel controller resume public const int MINOR_SECURITY_MODULE_OFF = 0x40f; // Door control security module off public const int MINOR_SECURITY_MODULE_RESUME = 0x410; // Door control security module resume public const int MINOR_BATTERY_ELECTRIC_LOW = 0x411; // battery electric low public const int MINOR_BATTERY_ELECTRIC_RESUME = 0x412; // battery electric resume public const int MINOR_LOCAL_CONTROL_NET_BROKEN = 0x413; // Local control net broken public const int MINOR_LOCAL_CONTROL_NET_RSUME = 0x414; // Local control net resume public const int MINOR_MASTER_RS485_LOOPNODE_BROKEN = 0x415; // Master RS485 loop node broken public const int MINOR_MASTER_RS485_LOOPNODE_RESUME = 0x416; // Master RS485 loop node resume public const int MINOR_LOCAL_CONTROL_OFFLINE = 0x417; // Local control offline public const int MINOR_LOCAL_CONTROL_RESUME = 0x418; // Local control resume public const int MINOR_LOCAL_DOWNSIDE_RS485_LOOPNODE_BROKEN = 0x419; // Local downside RS485 loop node broken public const int MINOR_LOCAL_DOWNSIDE_RS485_LOOPNODE_RESUME = 0x41a; // Local downside RS485 loop node resume public const int MINOR_DISTRACT_CONTROLLER_ONLINE = 0x41b; // distract controller online public const int MINOR_DISTRACT_CONTROLLER_OFFLINE = 0x41c; // distract controller offline public const int MINOR_ID_CARD_READER_NOT_CONNECT = 0x41d; // Id card reader not connected(intelligent dedicated) public const int MINOR_ID_CARD_READER_RESUME = 0x41e; //Id card reader connection restored(intelligent dedicated) public const int MINOR_FINGER_PRINT_MODULE_NOT_CONNECT = 0x41f; // fingerprint module is not connected(intelligent dedicated) public const int MINOR_FINGER_PRINT_MODULE_RESUME = 0x420; // The fingerprint module connection restored(intelligent dedicated) public const int MINOR_CAMERA_NOT_CONNECT = 0x421; // Camera not connected public const int MINOR_CAMERA_RESUME = 0x422; // Camera connection restored public const int MINOR_COM_NOT_CONNECT = 0x423; // COM not connected public const int MINOR_COM_RESUME = 0x424;// COM connection restored public const int MINOR_DEVICE_NOT_AUTHORIZE = 0x425; // device are not authorized public const int MINOR_PEOPLE_AND_ID_CARD_DEVICE_ONLINE = 0x426; // people and ID card device online public const int MINOR_PEOPLE_AND_ID_CARD_DEVICE_OFFLINE = 0x427;// people and ID card device offline public const int MINOR_LOCAL_LOGIN_LOCK = 0x428; // local login lock public const int MINOR_LOCAL_LOGIN_UNLOCK = 0x429; //local login unlock public const int MINOR_SUBMARINEBACK_COMM_BREAK = 0x42a; //submarineback communicate break public const int MINOR_SUBMARINEBACK_COMM_RESUME = 0x42b; //submarineback communicate resume public const int MINOR_MOTOR_SENSOR_EXCEPTION = 0x42c; //motor sensor exception public const int MINOR_CAN_BUS_EXCEPTION = 0x42d; //can bus exception public const int MINOR_CAN_BUS_RESUME = 0x42e; //can bus resume public const int MINOR_GATE_TEMPERATURE_OVERRUN = 0x42f; //gate temperature over run public const int MINOR_IR_EMITTER_EXCEPTION = 0x430; //IR emitter exception public const int MINOR_IR_EMITTER_RESUME = 0x431; //IR emitter resume public const int MINOR_LAMP_BOARD_COMM_EXCEPTION = 0x432; //lamp board communicate exception public const int MINOR_LAMP_BOARD_COMM_RESUME = 0x433; //lamp board communicate resume public const int MINOR_IR_ADAPTOR_COMM_EXCEPTION = 0x434; //IR adaptor communicate exception public const int MINOR_IR_ADAPTOR_COMM_RESUME = 0x435; //IR adaptor communicate resume public const int MINOR_PRINTER_ONLINE = 0x436; //printer online public const int MINOR_PRINTER_OFFLINE = 0x437; //printer offline public const int MINOR_4G_MOUDLE_ONLINE = 0x438; //4G module online public const int MINOR_4G_MOUDLE_OFFLINE = 0x439; //4G module offline /* Operation */ // Main Type public const int MAJOR_OPERATION = 0x3; // Hypo- Type public const int MINOR_LOCAL_UPGRADE = 0x5a; // Upgrade (local) public const int MINOR_REMOTE_LOGIN = 0x70; // Login (remote) public const int MINOR_REMOTE_LOGOUT = 0x71; // Logout (remote) public const int MINOR_REMOTE_ARM = 0x79; // On guard (remote) public const int MINOR_REMOTE_DISARM = 0x7a; // Disarm (remote) public const int MINOR_REMOTE_REBOOT = 0x7b; // Reboot (remote) public const int MINOR_REMOTE_UPGRADE = 0x7e; // upgrade (remote) public const int MINOR_REMOTE_CFGFILE_OUTPUT = 0x86; // Export Configuration (remote) public const int MINOR_REMOTE_CFGFILE_INTPUT = 0x87; // Import Configuration (remote) public const int MINOR_REMOTE_ALARMOUT_OPEN_MAN = 0xd6; // remote mamual open alarmout public const int MINOR_REMOTE_ALARMOUT_CLOSE_MAN = 0xd7; // remote mamual close alarmout public const int MINOR_REMOTE_OPEN_DOOR = 0x400; // remote open door public const int MINOR_REMOTE_CLOSE_DOOR = 0x401; // remote close door (controlled) public const int MINOR_REMOTE_ALWAYS_OPEN = 0x402; // remote always open door (free) public const int MINOR_REMOTE_ALWAYS_CLOSE = 0x403; // remote always close door (forbiden) public const int MINOR_REMOTE_CHECK_TIME = 0x404; // remote check time public const int MINOR_NTP_CHECK_TIME = 0x405; // ntp check time public const int MINOR_REMOTE_CLEAR_CARD = 0x406; // remote clear card public const int MINOR_REMOTE_RESTORE_CFG = 0x407; // remote restore configure public const int MINOR_ALARMIN_ARM = 0x408; // alarm in arm public const int MINOR_ALARMIN_DISARM = 0x409; // alarm in disarm public const int MINOR_LOCAL_RESTORE_CFG = 0x40a; // local configure restore public const int MINOR_REMOTE_CAPTURE_PIC = 0x40b; // remote capture picture public const int MINOR_MOD_NET_REPORT_CFG = 0x40c; // modify net report cfg public const int MINOR_MOD_GPRS_REPORT_PARAM = 0x40d; // modify GPRS report param public const int MINOR_MOD_REPORT_GROUP_PARAM = 0x40e; // modify report group param public const int MINOR_UNLOCK_PASSWORD_OPEN_DOOR = 0x40f; // unlock password open door public const int MINOR_AUTO_RENUMBER = 0x410; // auto renumber public const int MINOR_AUTO_COMPLEMENT_NUMBER = 0x411; // auto complement number public const int MINOR_NORMAL_CFGFILE_INPUT = 0x412; // normal cfg file input public const int MINOR_NORMAL_CFGFILE_OUTTPUT = 0x413; // normal cfg file output public const int MINOR_CARD_RIGHT_INPUT = 0x414; // card right input public const int MINOR_CARD_RIGHT_OUTTPUT = 0x415; // card right output public const int MINOR_LOCAL_USB_UPGRADE = 0x416; // local USB upgrade public const int MINOR_REMOTE_VISITOR_CALL_LADDER = 0x417; // visitor call ladder public const int MINOR_REMOTE_HOUSEHOLD_CALL_LADDER = 0x418; // household call ladder public const int MINOR_REMOTE_ACTUAL_GUARD = 0x419; //remote actual guard public const int MINOR_REMOTE_ACTUAL_UNGUARD = 0x41a; //remote actual unguard public const int MINOR_REMOTE_CONTROL_NOT_CODE_OPER_FAILED = 0x41b; //remote control not code operate failed public const int MINOR_REMOTE_CONTROL_CLOSE_DOOR = 0x41c; //remote control close door public const int MINOR_REMOTE_CONTROL_OPEN_DOOR = 0x41d; //remote control open door public const int MINOR_REMOTE_CONTROL_ALWAYS_OPEN_DOOR = 0x41e; //remote control always open door /* Additional Log Info*/ // Main Type public const int MAJOR_EVENT = 0x5;/*event*/ // Hypo- Type public const int MINOR_LEGAL_CARD_PASS = 0x01; // legal card pass public const int MINOR_CARD_AND_PSW_PASS = 0x02; // swipe and password pass public const int MINOR_CARD_AND_PSW_FAIL = 0x03; // swipe and password fail public const int MINOR_CARD_AND_PSW_TIMEOUT = 0x04; // swipe and password timeout public const int MINOR_CARD_AND_PSW_OVER_TIME = 0x05; // swipe and password over time public const int MINOR_CARD_NO_RIGHT = 0x06; // card no right public const int MINOR_CARD_INVALID_PERIOD = 0x07; // invalid period public const int MINOR_CARD_OUT_OF_DATE = 0x08; // card out of date public const int MINOR_INVALID_CARD = 0x09; // invalid card public const int MINOR_ANTI_SNEAK_FAIL = 0x0a; // anti sneak fail public const int MINOR_INTERLOCK_DOOR_NOT_CLOSE = 0x0b; // interlock door doesn't close public const int MINOR_NOT_BELONG_MULTI_GROUP = 0x0c; // card no belong multi group public const int MINOR_INVALID_MULTI_VERIFY_PERIOD = 0x0d; // invalid multi verify period public const int MINOR_MULTI_VERIFY_SUPER_RIGHT_FAIL = 0x0e; // have no super right in multi verify mode public const int MINOR_MULTI_VERIFY_REMOTE_RIGHT_FAIL = 0x0f; // have no remote right in multi verify mode public const int MINOR_MULTI_VERIFY_SUCCESS = 0x10; // success in multi verify mode public const int MINOR_LEADER_CARD_OPEN_BEGIN = 0x11; // leader card begin to open public const int MINOR_LEADER_CARD_OPEN_END = 0x12; // leader card end to open public const int MINOR_ALWAYS_OPEN_BEGIN = 0x13; // always open begin public const int MINOR_ALWAYS_OPEN_END = 0x14; // always open end public const int MINOR_LOCK_OPEN = 0x15; // lock open public const int MINOR_LOCK_CLOSE = 0x16; // lock close public const int MINOR_DOOR_BUTTON_PRESS = 0x17; // press door open button public const int MINOR_DOOR_BUTTON_RELEASE = 0x18; // release door open button public const int MINOR_DOOR_OPEN_NORMAL = 0x19; // door open normal public const int MINOR_DOOR_CLOSE_NORMAL = 0x1a; // door close normal public const int MINOR_DOOR_OPEN_ABNORMAL = 0x1b; // open door abnormal public const int MINOR_DOOR_OPEN_TIMEOUT = 0x1c; // open door timeout public const int MINOR_ALARMOUT_ON = 0x1d; // alarm out turn on public const int MINOR_ALARMOUT_OFF = 0x1e; // alarm out turn off public const int MINOR_ALWAYS_CLOSE_BEGIN = 0x1f; // always close begin public const int MINOR_ALWAYS_CLOSE_END = 0x20; // always close end public const int MINOR_MULTI_VERIFY_NEED_REMOTE_OPEN = 0x21; // need remote open in multi verify mode public const int MINOR_MULTI_VERIFY_SUPERPASSWD_VERIFY_SUCCESS = 0x22; // superpasswd verify success in multi verify mode public const int MINOR_MULTI_VERIFY_REPEAT_VERIFY = 0x23; // repeat verify in multi verify mode public const int MINOR_MULTI_VERIFY_TIMEOUT = 0x24; // timeout in multi verify mode public const int MINOR_DOORBELL_RINGING = 0x25; // doorbell ringing public const int MINOR_FINGERPRINT_COMPARE_PASS = 0x26; // fingerprint compare pass public const int MINOR_FINGERPRINT_COMPARE_FAIL = 0x27; // fingerprint compare fail public const int MINOR_CARD_FINGERPRINT_VERIFY_PASS = 0x28; // card and fingerprint verify pass public const int MINOR_CARD_FINGERPRINT_VERIFY_FAIL = 0x29; // card and fingerprint verify fail public const int MINOR_CARD_FINGERPRINT_VERIFY_TIMEOUT = 0x2a; // card and fingerprint verify timeout public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_PASS = 0x2b; // card and fingerprint and passwd verify pass public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_FAIL = 0x2c; // card and fingerprint and passwd verify fail public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_TIMEOUT = 0x2d; // card and fingerprint and passwd verify timeout public const int MINOR_FINGERPRINT_PASSWD_VERIFY_PASS = 0x2e; // fingerprint and passwd verify pass public const int MINOR_FINGERPRINT_PASSWD_VERIFY_FAIL = 0x2f; // fingerprint and passwd verify fail public const int MINOR_FINGERPRINT_PASSWD_VERIFY_TIMEOUT = 0x30; // fingerprint and passwd verify timeout public const int MINOR_FINGERPRINT_INEXISTENCE = 0x31; // fingerprint inexistence public const int MINOR_CARD_PLATFORM_VERIFY = 0x32; // card platform verify public const int MINOR_CALL_CENTER = 0x33; // call center public const int MINOR_FIRE_RELAY_TURN_ON_DOOR_ALWAYS_OPEN = 0x34; // fire relay turn on door always open public const int MINOR_FIRE_RELAY_RECOVER_DOOR_RECOVER_NORMAL = 0x35; // fire relay recover door recover normal public const int MINOR_FACE_AND_FP_VERIFY_PASS = 0x36; // face and finger print verify pass public const int MINOR_FACE_AND_FP_VERIFY_FAIL = 0x37; // face and finger print verify fail public const int MINOR_FACE_AND_FP_VERIFY_TIMEOUT = 0x38; // face and finger print verify timeout public const int MINOR_FACE_AND_PW_VERIFY_PASS = 0x39; // face and password verify pass public const int MINOR_FACE_AND_PW_VERIFY_FAIL = 0x3a; // face and password verify fail public const int MINOR_FACE_AND_PW_VERIFY_TIMEOUT = 0x3b; // face and password verify timeout public const int MINOR_FACE_AND_CARD_VERIFY_PASS = 0x3c; // face and card verify pass public const int MINOR_FACE_AND_CARD_VERIFY_FAIL = 0x3d; // face and card verify fail public const int MINOR_FACE_AND_CARD_VERIFY_TIMEOUT = 0x3e; // face and card verify timeout public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_PASS = 0x3f; // face and password and finger print verify pass public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_FAIL = 0x40; // face and password and finger print verify fail public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_TIMEOUT = 0x41; // face and password and finger print verify timeout public const int MINOR_FACE_CARD_AND_FP_VERIFY_PASS = 0x42; // face and card and finger print verify pass public const int MINOR_FACE_CARD_AND_FP_VERIFY_FAIL = 0x43; // face and card and finger print verify fail public const int MINOR_FACE_CARD_AND_FP_VERIFY_TIMEOUT = 0x44; // face and card and finger print verify timeout public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_PASS = 0x45; // employee and finger print verify pass public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_FAIL = 0x46; // employee and finger print verify fail public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_TIMEOUT = 0x47; // employee and finger print verify timeout public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_PASS = 0x48; // employee and finger print and password verify pass public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_FAIL = 0x49; // employee and finger print and password verify fail public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_TIMEOUT = 0x4a; // employee and finger print and password verify timeout public const int MINOR_FACE_VERIFY_PASS = 0x4b; // face verify pass public const int MINOR_FACE_VERIFY_FAIL = 0x4c; // face verify fail public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_PASS = 0x4d; // employee no and face verify pass public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_FAIL = 0x4e; // employee no and face verify fail public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_TIMEOUT = 0x4f; // employee no and face verify time out public const int MINOR_FACE_RECOGNIZE_FAIL = 0x50; // face recognize fail public const int MINOR_FIRSTCARD_AUTHORIZE_BEGIN = 0x51; // first card authorize begin public const int MINOR_FIRSTCARD_AUTHORIZE_END = 0x52; // first card authorize end public const int MINOR_DOORLOCK_INPUT_SHORT_CIRCUIT = 0x53; // door lock input short circuit public const int MINOR_DOORLOCK_INPUT_BROKEN_CIRCUIT = 0x54; // door lock input broken circuit public const int MINOR_DOORLOCK_INPUT_EXCEPTION = 0x55; // door lock input exception public const int MINOR_DOORCONTACT_INPUT_SHORT_CIRCUIT = 0x56; // door contact input short circuit public const int MINOR_DOORCONTACT_INPUT_BROKEN_CIRCUIT = 0x57; // door contact input broken circuit public const int MINOR_DOORCONTACT_INPUT_EXCEPTION = 0x58; // door contact input exception public const int MINOR_OPENBUTTON_INPUT_SHORT_CIRCUIT = 0x59; // open button input short circuit public const int MINOR_OPENBUTTON_INPUT_BROKEN_CIRCUIT = 0x5a; // open button input broken circuit public const int MINOR_OPENBUTTON_INPUT_EXCEPTION = 0x5b; // open button input exception public const int MINOR_DOORLOCK_OPEN_EXCEPTION = 0x5c; // door lock open exception public const int MINOR_DOORLOCK_OPEN_TIMEOUT = 0x5d; // door lock open timeout public const int MINOR_FIRSTCARD_OPEN_WITHOUT_AUTHORIZE = 0x5e; // first card open without authorize public const int MINOR_CALL_LADDER_RELAY_BREAK = 0x5f; // call ladder relay break public const int MINOR_CALL_LADDER_RELAY_CLOSE = 0x60; // call ladder relay close public const int MINOR_AUTO_KEY_RELAY_BREAK = 0x61; // auto key relay break public const int MINOR_AUTO_KEY_RELAY_CLOSE = 0x62; // auto key relay close public const int MINOR_KEY_CONTROL_RELAY_BREAK = 0x63; // key control relay break public const int MINOR_KEY_CONTROL_RELAY_CLOSE = 0x64; // key control relay close public const int MINOR_EMPLOYEENO_AND_PW_PASS = 0x65; // minor employee no and password pass public const int MINOR_EMPLOYEENO_AND_PW_FAIL = 0x66; // minor employee no and password fail public const int MINOR_EMPLOYEENO_AND_PW_TIMEOUT = 0x67; // minor employee no and password timeout public const int MINOR_HUMAN_DETECT_FAIL = 0x68; // human detect fail public const int MINOR_PEOPLE_AND_ID_CARD_COMPARE_PASS = 0x69; // the comparison with people and id card success public const int MINOR_PEOPLE_AND_ID_CARD_COMPARE_FAIL = 0x70; // the comparison with people and id card failed public const int MINOR_CERTIFICATE_BLACK_LIST = 0x71; // black list public const int MINOR_LEGAL_MESSAGE = 0x72; // legal message public const int MINOR_ILLEGAL_MESSAGE = 0x73; // illegal messag public const int MINOR_MAC_DETECT = 0x74; // mac detect public const int MINOR_DOOR_OPEN_OR_DORMANT_FAIL = 0x75; //door open or dormant fail public const int MINOR_AUTH_PLAN_DORMANT_FAIL = 0x76; //auth plan dormant fail public const int MINOR_CARD_ENCRYPT_VERIFY_FAIL = 0x77; //card encrypt verify fail public const int MINOR_SUBMARINEBACK_REPLY_FAIL = 0x78; //submarineback reply fail public const int MINOR_DOOR_OPEN_OR_DORMANT_OPEN_FAIL = 0x82; //door open or dormant open fail public const int MINOR_DOOR_OPEN_OR_DORMANT_LINKAGE_OPEN_FAIL = 0x84; //door open or dormant linkage open fail public const int MINOR_TRAILING = 0x85; //trailing public const int MINOR_HEART_BEAT = 0x83; //heart beat event public const int MINOR_REVERSE_ACCESS = 0x86; //reverse access public const int MINOR_FORCE_ACCESS = 0x87; //force access public const int MINOR_CLIMBING_OVER_GATE = 0x88; //climbing over gate public const int MINOR_PASSING_TIMEOUT = 0x89; //passing timeout public const int MINOR_INTRUSION_ALARM = 0x8a; //intrusion alarm public const int MINOR_FREE_GATE_PASS_NOT_AUTH = 0x8b; //free gate pass not auth public const int MINOR_DROP_ARM_BLOCK = 0x8c; //drop arm block public const int MINOR_DROP_ARM_BLOCK_RESUME = 0x8d; //drop arm block resume public const int MINOR_LOCAL_FACE_MODELING_FAIL = 0x8e; //device upgrade with module failed public const int MINOR_STAY_EVENT = 0x8f; //stay event public const int MINOR_PASSWORD_MISMATCH = 0x97; //password mismatch public const int MINOR_EMPLOYEE_NO_NOT_EXIST = 0x98; //employee no not exist public const int MINOR_COMBINED_VERIFY_PASS = 0x99; //combined verify pass public const int MINOR_COMBINED_VERIFY_TIMEOUT = 0x9a; //combined verify timeout public const int MINOR_VERIFY_MODE_MISMATCH = 0x9b; //verify mode mismatch #endregion #region card parameters configuration public const int CARD_PARAM_CARD_VALID = 0x00000001; //card valid parameter public const int CARD_PARAM_VALID = 0x00000002; //valid period parameter public const int CARD_PARAM_CARD_TYPE = 0x00000004; //card type parameter public const int CARD_PARAM_DOOR_RIGHT = 0x00000008; //door right parameter public const int CARD_PARAM_LEADER_CARD = 0x00000010; //leader card parameter public const int CARD_PARAM_SWIPE_NUM = 0x00000020; //max swipe time parameter public const int CARD_PARAM_GROUP = 0x00000040; //belong group parameter public const int CARD_PARAM_PASSWORD = 0x00000080; //card password parameter public const int CARD_PARAM_RIGHT_PLAN = 0x00000100; //card right plan parameter public const int CARD_PARAM_SWIPED_NUM = 0x00000200; //has swiped card time parameter public const int CARD_PARAM_EMPLOYEE_NO = 0x00000400; //employee no public const int ACS_CARD_NO_LEN = 32; //access card No. len public const int MAX_DOOR_NUM_256 = 256; //max door num public const int MAX_GROUP_NUM_128 = 128; //The largest number of grou public const int CARD_PASSWORD_LEN = 8; // card password len public const int MAX_CARD_RIGHT_PLAN_NUM = 4; //max card right plan number public const int MAX_DOOR_CODE_LEN = 8; //room code length public const int MAX_LOCK_CODE_LEN = 8; //lock code length public const int MAX_CASE_SENSOR_NUM = 8; //max case sensor number public const int MAX_CARD_READER_NUM_512 = 512; //max card reader num public const int MAX_ALARMHOST_ALARMIN_NUM = 512; //Max number of alarm host alarm input ports public const int MAX_ALARMHOST_ALARMOUT_NUM = 512; //Max number of alarm host alarm output ports public const int NET_DVR_GET_ACS_WORK_STATUS_V50 = 2180; //Access door host working condition (V50) public const int NET_DVR_GET_CARD_CFG_V50 = 2178; //Parameters to acquire new CARDS (V50) public const int NET_DVR_SET_CARD_CFG_V50 = 2179; //Setting up the new parameters (V50) #endregion public const int NET_DVR_GET_TIMECFG = 118;//get device time public const int NET_DVR_SET_TIMECFG = 119;//set device time public const int NET_DVR_GET_AUDIOIN_VOLUME_CFG = 6355; //get audio in volume public const int NET_DVR_SET_AUDIOIN_VOLUME_CFG = 6356; //set audio in volume public const int NET_DVR_GET_AUDIOOUT_VOLUME_CFG = 6369; //get audio out volume public const int NET_DVR_SET_AUDIOOUT_VOLUME_CFG = 6370; //set audio out volume #region door parameters configuration public const int DOOR_NAME_LEN = 32;//door name len public const int STRESS_PASSWORD_LEN = 8;//stress password len public const int SUPER_PASSWORD_LEN = 8;//super password len public const int UNLOCK_PASSWORD_LEN = 8; public const int MAX_DOOR_NUM = 32; public const int MAX_GROUP_NUM = 32; public const int LOCAL_CONTROLLER_NAME_LEN = 32; public const int NET_DVR_GET_DOOR_CFG = 2108; //get door parameter public const int NET_DVR_SET_DOOR_CFG = 2109; //set door parameter #endregion #region GetAcsEvent public const int NET_SDK_MONITOR_ID_LEN = 64; public const int WM_MSG_ADD_ACS_EVENT_TOLIST = 1002; public const int WM_MSG_GET_ACS_EVENT_FINISH = 1003; #endregion #region group configuration public const int GROUP_NAME_LEN = 32; public const int NET_DVR_GET_GROUP_CFG = 2112; //get group parameter public const int NET_DVR_SET_GROUP_CFG = 2113; //set group parameter #endregion #region user parameters configuration public const int MAX_ALARMHOST_VIDEO_CHAN = 64; public const int NET_DVR_GET_DEVICECFG_V40 = 1100;//Get extended device parameters public const int NET_DVR_SET_DEVICECFG_V40 = 1101;//Set extended device parameters #endregion #region cardreader configuration public const int CARD_READER_DESCRIPTION = 32; //card reader description public const int NET_DVR_GET_CARD_READER_CFG_V50 = 2505; //get card reader configure v50 public const int NET_DVR_SET_CARD_READER_CFG_V50 = 2506; //set card reader configure v50 #endregion #region face configuration public const int MAX_FACE_NUM = 2; //max face number public const int NET_DVR_GET_FACE_PARAM_CFG = 2507; //get face param configure public const int NET_DVR_SET_FACE_PARAM_CFG = 2508; //set face param configure public const int NET_DVR_DEL_FACE_PARAM_CFG = 2509; //delete face param configure public const int NET_DVR_CAPTURE_FACE_INFO = 2510; //capture face information #endregion #region fingerprint configuration public const int MAX_FINGER_PRINT_LEN = 768; //max finger print len public const int MAX_FINGER_PRINT_NUM = 10; //max finger print num public const int ERROR_MSG_LEN = 32; public const int NET_SDK_EMPLOYEE_NO_LEN = 32; public const int NET_DVR_GET_FINGERPRINT_CFG = 2150; //get fingerprint parameter public const int NET_DVR_SET_FINGERPRINT_CFG = 2151; //set fingerprint parameter public const int NET_DVR_DEL_FINGERPRINT_CFG = 2152; //delete fingerprint parameter public const int NET_DVR_GET_FINGERPRINT_CFG_V50 = 2183; //get fingerprint parameter V50 public const int NET_DVR_SET_FINGERPRINT_CFG_V50 = 2184; //set fingerprint parameter V50 public const int NET_DVR_CAPTURE_FINGERPRINT_INFO = 2504; #endregion #region plan configuration public const int MAX_DAYS = 7; //The number of days in a week public const int MAX_TIMESEGMENT_V30 = 8; //Maximum number of time segments in 9000 DVR's guard schedule public const int HOLIDAY_GROUP_NAME_LEN = 32; //holiday group name len public const int MAX_HOLIDAY_PLAN_NUM = 16; //holiday max plan number public const int TEMPLATE_NAME_LEN = 32; //plan template name len public const int MAX_HOLIDAY_GROUP_NUM = 16; //plan template max group number public const int NET_DVR_GET_WEEK_PLAN_CFG = 2100; //get door status week plan config public const int NET_DVR_SET_WEEK_PLAN_CFG = 2101; //set door status week plan config public const int NET_DVR_GET_DOOR_STATUS_HOLIDAY_PLAN = 2102; //get door status holiday week plan config public const int NET_DVR_SET_DOOR_STATUS_HOLIDAY_PLAN = 2103; //set door status holiday week plan config public const int NET_DVR_GET_DOOR_STATUS_HOLIDAY_GROUP = 2104; //get door holiday group parameter public const int NET_DVR_SET_DOOR_STATUS_HOLIDAY_GROUP = 2105; //set door holiday group parameter public const int NET_DVR_GET_DOOR_STATUS_PLAN_TEMPLATE = 2106; //get door status plan template parameter public const int NET_DVR_SET_DOOR_STATUS_PLAN_TEMPLATE = 2107; //set door status plan template parameter public const int NET_DVR_GET_VERIFY_WEEK_PLAN = 2124; //get reader card verfy week plan public const int NET_DVR_SET_VERIFY_WEEK_PLAN = 2125; //set reader card verfy week plan public const int NET_DVR_GET_CARD_RIGHT_WEEK_PLAN = 2126; //get card right week plan public const int NET_DVR_SET_CARD_RIGHT_WEEK_PLAN = 2127; //set card right week plan public const int NET_DVR_GET_VERIFY_HOLIDAY_PLAN = 2128; //get card reader verify holiday plan public const int NET_DVR_SET_VERIFY_HOLIDAY_PLAN = 2129; //set card reader verify holiday plan public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_PLAN = 2130; //get card right holiday plan public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_PLAN = 2131; //set card right holiday plan public const int NET_DVR_GET_VERIFY_HOLIDAY_GROUP = 2132; //get card reader verify holiday group public const int NET_DVR_SET_VERIFY_HOLIDAY_GROUP = 2133; //set card reader verify holiday group public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_GROUP = 2134; //get card right holiday group public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_GROUP = 2135; //set card right holiday group public const int NET_DVR_GET_VERIFY_PLAN_TEMPLATE = 2136; //get card reader verify plan template public const int NET_DVR_SET_VERIFY_PLAN_TEMPLATE = 2137; //set card reader verify plan template public const int NET_DVR_GET_CARD_RIGHT_PLAN_TEMPLATE = 2138; //get card right plan template public const int NET_DVR_SET_CARD_RIGHT_PLAN_TEMPLATE = 2139; //set card right plan template // V50 public const int NET_DVR_GET_CARD_RIGHT_WEEK_PLAN_V50 = 2304; //Access card right V50 weeks plan parameters public const int NET_DVR_SET_CARD_RIGHT_WEEK_PLAN_V50 = 2305; //Set card right V50 weeks plan parameters public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_PLAN_V50 = 2310; //Access card right parameters V50 holiday plan public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_PLAN_V50 = 2311; //Set card right parameters V50 holiday plan public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_GROUP_V50 = 2316; //Access card right parameters V50 holiday group public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_GROUP_V50 = 2317; //Set card right parameters V50 holiday group public const int NET_DVR_GET_CARD_RIGHT_PLAN_TEMPLATE_V50 = 2322; //Access card right parameters V50 plan template public const int NET_DVR_SET_CARD_RIGHT_PLAN_TEMPLATE_V50 = 2323; //Set card right parameters V50 plan template #endregion #region card reader verification mode and door status planning parameters configuration public const int NET_DVR_GET_DOOR_STATUS_PLAN = 2110; //get door status plan parameter public const int NET_DVR_SET_DOOR_STATUS_PLAN = 2111; //set door status plan parameter public const int NET_DVR_GET_CARD_READER_PLAN = 2142; //get card reader verify plan parameter public const int NET_DVR_SET_CARD_READER_PLAN = 2143; //get card reader verify plan parameter #endregion #region card number associated with the user information parameter configuration public const int NET_DVR_GET_CARD_USERINFO_CFG = 2163; //get card userinfo cfg public const int NET_DVR_SET_CARD_USERINFO_CFG = 2164; //set card userinfo cfg #endregion #region event card linkage public const int NET_DVR_GET_EVENT_CARD_LINKAGE_CFG_V50 = 2181; //get event card linkage cfg public const int NET_DVR_SET_EVENT_CARD_LINKAGE_CFG_V50 = 2182; //set event card linkage cfg #endregion public const int NET_DVR_DEL_FINGERPRINT_CFG_V50 = 2517; //delete fingerprint parameter V50 public const int NET_DVR_GET_EVENT_CARD_LINKAGE_CFG_V51 = 2518; //get event card linkage cfg V51 public const int NET_DVR_SET_EVENT_CARD_LINKAGE_CFG_V51 = 2519; //set event card linkage cfg V51 public const int NET_DVR_JSON_CONFIG = 2550; public const int NET_DVR_FACE_DATA_RECORD = 2551; public const int NET_DVR_FACE_DATA_SEARCH = 2552; public const int NET_DVR_FACE_DATA_MODIFY = 2553; public const int NET_DVR_CAPTURE_DATA_SEARCH = 2554; #region net configuration public const int NET_DVR_GET_NETCFG_V30 = 1000;//Get network parameter configuration public const int NET_DVR_SET_NETCFG_V30 = 1001;//Set network parameter configuration public const int NET_DVR_GET_NETCFG_V50 = 1015; //Get network parameter configuration (V50) public const int NET_DVR_SET_NETCFG_V50 = 1016; //Set network parameter configuration (V50) #endregion #region video call public const int NET_DVR_VIDEO_CALL_SIGNAL_PROCESS = 16032; //video call signal process #endregion #endregion // HCNetSDK.dll macro definition #region ACS_FACE_PARAM public const int WM_MSG_SET_FACE_PARAM_FINISH = 1002; public const int WM_MSG_GET_FACE_PARAM_FINISH = 1003; public const int WM_MSG_ADD_FACE_PARAM_TOLIST = 1004; #endregion #region HCNetSDK.dll structure definition //structure definition #region common use [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_DATE { public ushort wYear; //year public byte byMonth; //month public byte byDay; //day } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_SIMPLE_DAYTIME { public byte byHour; //hour public byte byMinute; //minute public byte bySecond; //second public byte byRes; } // Time correction structure [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_TIME { public int dwYear; public int dwMonth; public int dwDay; public int dwHour; public int dwMinute; public int dwSecond; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_TIME_EX { public ushort wYear; public byte byMonth; public byte byDay; public byte byHour; public byte byMinute; public byte bySecond; public byte byRes; } // Long config callback type public enum NET_SDK_CALLBACK_TYPE { NET_SDK_CALLBACK_TYPE_STATUS = 0, // Status NET_SDK_CALLBACK_TYPE_PROGRESS, // Progress NET_SDK_CALLBACK_TYPE_DATA // Data } // Long config status value public enum NET_SDK_CALLBACK_STATUS_NORMAL { NET_SDK_CALLBACK_STATUS_SUCCESS = 1000, // Success NET_SDK_CALLBACK_STATUS_PROCESSING, // Processing NET_SDK_CALLBACK_STATUS_FAILED, // Failed NET_SDK_CALLBACK_STATUS_EXCEPTION, // Exception NET_SDK_CALLBACK_STATUS_LANGUAGE_MISMATCH, // Language mismatch NET_SDK_CALLBACK_STATUS_DEV_TYPE_MISMATCH, // Device type mismatch NET_DVR_CALLBACK_STATUS_SEND_WAIT, // send wait } public enum LONG_CFG_SEND_DATA_TYPE_ENUM { ENUM_DVR_VEHICLE_CHECK = 1, //vehicle Black list check ENUM_MSC_SEND_DATA = 2, //screen control data type ENUM_ACS_SEND_DATA = 3, //access card data type ENUM_TME_CARD_SEND_DATA = 4, //Parking Card data type ENUM_TME_VEHICLE_SEND_DATA = 5, //TME Vehicle Info data type ENUM_DVR_DEBUG_CMD = 6, //Debug Cmd ENUM_DVR_SCREEN_CTRL_CMD = 7, //Screen interactive ENUM_CVR_PASSBACK_SEND_DATA = 8, //CVR get passback task executable data type ENUM_ACS_INTELLIGENT_IDENTITY_DATA = 9, //intelligent identity data type ENUM_VIDEO_INTERCOM_SEND_DATA = 10, //video intercom send data ENUM_SEND_JSON_DATA = 11 //send json data } public enum ENUM_UPGRADE_TYPE { ENUM_UPGRADE_DVR = 0, //other device ENUM_UPGRADE_ACS = 1, //acs device } public enum NET_SDK_GET_NEXT_STATUS { NET_SDK_GET_NEXT_STATUS_SUCCESS = 1000, // Get data successfully, Call API NET_DVR_RemoteConfigGetNext after processing this data. NET_SDK_GET_NETX_STATUS_NEED_WAIT, // Need wait, keep calling NET_DVR_RemoteConfigGetNext NET_SDK_GET_NEXT_STATUS_FINISH, // Get data finish, call API NET_DVR_StopRemoteConfig NET_SDK_GET_NEXT_STATUS_FAILED, // Get data failed, call API NET_DVR_StopRemoteConfig } public enum LONG_CFG_RECV_DATA_TYPE_ENUM { ENUM_DVR_ERROR_CODE = 1, //Error code ENUM_MSC_RECV_DATA = 2, //screen control data type ENUM_ACS_RECV_DATA = 3 //ACS control data type } public enum ACS_DEV_SUBEVENT_ENUM { EVENT_ACS_HOST_ANTI_DISMANTLE = 0, EVENT_ACS_OFFLINE_ECENT_NEARLY_FULL, EVENT_ACS_NET_BROKEN, EVENT_ACS_NET_RESUME, EVENT_ACS_LOW_BATTERY, EVENT_ACS_BATTERY_RESUME, EVENT_ACS_AC_OFF, EVENT_ACS_AC_RESUME, EVENT_ACS_SD_CARD_FULL, EVENT_ACS_LINKAGE_CAPTURE_PIC, EVENT_ACS_IMAGE_QUALITY_LOW, EVENT_ACS_FINGER_PRINT_QUALITY_LOW, EVENT_ACS_BATTERY_ELECTRIC_LOW, EVENT_ACS_BATTERY_ELECTRIC_RESUME, EVENT_ACS_FIRE_IMPORT_SHORT_CIRCUIT, EVENT_ACS_FIRE_IMPORT_BROKEN_CIRCUIT, EVENT_ACS_FIRE_IMPORT_RESUME, EVENT_ACS_MASTER_RS485_LOOPNODE_BROKEN, EVENT_ACS_MASTER_RS485_LOOPNODE_RESUME, EVENT_ACS_LOCAL_CONTROL_OFFLINE, EVENT_ACS_LOCAL_CONTROL_RESUME, EVENT_ACS_LOCAL_DOWNSIDE_RS485_LOOPNODE_BROKEN, EVENT_ACS_LOCAL_DOWNSIDE_RS485_LOOPNODE_RESUME, EVENT_ACS_DISTRACT_CONTROLLER_ONLINE, EVENT_ACS_DISTRACT_CONTROLLER_OFFLINE, EVENT_ACS_FIRE_BUTTON_TRIGGER, EVENT_ACS_FIRE_BUTTON_RESUME, EVENT_ACS_MAINTENANCE_BUTTON_TRIGGER, EVENT_ACS_MAINTENANCE_BUTTON_RESUME, EVENT_ACS_EMERGENCY_BUTTON_TRIGGER, EVENT_ACS_EMERGENCY_BUTTON_RESUME, EVENT_ACS_MAC_DETECT } public enum ACS_ALARM_SUBEVENT_ENUM { EVENT_ACS_ALARMIN_SHORT_CIRCUIT = 0, EVENT_ACS_ALARMIN_BROKEN_CIRCUIT, EVENT_ACS_ALARMIN_EXCEPTION, EVENT_ACS_ALARMIN_RESUME, EVENT_ACS_CASE_SENSOR_ALARM, EVENT_ACS_CASE_SENSOR_RESUME } public enum ACS_DOOR_SUBEVENT_ENUM { EVENT_ACS_LEADER_CARD_OPEN_BEGIN = 0, EVENT_ACS_LEADER_CARD_OPEN_END, EVENT_ACS_ALWAYS_OPEN_BEGIN, EVENT_ACS_ALWAYS_OPEN_END, EVENT_ACS_ALWAYS_CLOSE_BEGIN, EVENT_ACS_ALWAYS_CLOSE_END, EVENT_ACS_LOCK_OPEN, EVENT_ACS_LOCK_CLOSE, EVENT_ACS_DOOR_BUTTON_PRESS, EVENT_ACS_DOOR_BUTTON_RELEASE, EVENT_ACS_DOOR_OPEN_NORMAL, EVENT_ACS_DOOR_CLOSE_NORMAL, EVENT_ACS_DOOR_OPEN_ABNORMAL, EVENT_ACS_DOOR_OPEN_TIMEOUT, EVENT_ACS_REMOTE_OPEN_DOOR, EVENT_ACS_REMOTE_CLOSE_DOOR, EVENT_ACS_REMOTE_ALWAYS_OPEN, EVENT_ACS_REMOTE_ALWAYS_CLOSE, EVENT_ACS_NOT_BELONG_MULTI_GROUP, EVENT_ACS_INVALID_MULTI_VERIFY_PERIOD, EVENT_ACS_MULTI_VERIFY_SUPER_RIGHT_FAIL, EVENT_ACS_MULTI_VERIFY_REMOTE_RIGHT_FAIL, EVENT_ACS_MULTI_VERIFY_SUCCESS, EVENT_ACS_MULTI_VERIFY_NEED_REMOTE_OPEN, EVENT_ACS_MULTI_VERIFY_SUPERPASSWD_VERIFY_SUCCESS, EVENT_ACS_MULTI_VERIFY_REPEAT_VERIFY_FAIL, EVENT_ACS_MULTI_VERIFY_TIMEOUT, EVENT_ACS_REMOTE_CAPTURE_PIC, EVENT_ACS_DOORBELL_RINGING, EVENT_ACS_SECURITY_MODULE_DESMANTLE_ALARM, EVENT_ACS_CALL_CENTER, EVENT_ACS_FIRSTCARD_AUTHORIZE_BEGIN, EVENT_ACS_FIRSTCARD_AUTHORIZE_END, EVENT_ACS_DOORLOCK_INPUT_SHORT_CIRCUIT, EVENT_ACS_DOORLOCK_INPUT_BROKEN_CIRCUIT, EVENT_ACS_DOORLOCK_INPUT_EXCEPTION, EVENT_ACS_DOORCONTACT_INPUT_SHORT_CIRCUIT, EVENT_ACS_DOORCONTACT_INPUT_BROKEN_CIRCUIT, EVENT_ACS_DOORCONTACT_INPUT_EXCEPTION, EVENT_ACS_OPENBUTTON_INPUT_SHORT_CIRCUIT, EVENT_ACS_OPENBUTTON_INPUT_BROKEN_CIRCUIT, EVENT_ACS_OPENBUTTON_INPUT_EXCEPTION, EVENT_ACS_DOORLOCK_OPEN_EXCEPTION, EVENT_ACS_DOORLOCK_OPEN_TIMEOUT, EVENT_ACS_FIRSTCARD_OPEN_WITHOUT_AUTHORIZE, EVENT_ACS_CALL_LADDER_RELAY_BREAK, EVENT_ACS_CALL_LADDER_RELAY_CLOSE, EVENT_ACS_AUTO_KEY_RELAY_BREAK, EVENT_ACS_AUTO_KEY_RELAY_CLOSE, EVENT_ACS_KEY_CONTROL_RELAY_BREAK, EVENT_ACS_KEY_CONTROL_RELAY_CLOSE, EVENT_ACS_REMOTE_VISITOR_CALL_LADDER, EVENT_ACS_REMOTE_HOUSEHOLD_CALL_LADDER, EVENT_ACS_LEGAL_MESSAGE, EVENT_ACS_ILLEGAL_MESSAGE } public enum ACS_CARD_READER_SUBEVENT_ENUM { EVENT_ACS_STRESS_ALARM = 0, EVENT_ACS_CARD_READER_DESMANTLE_ALARM, EVENT_ACS_LEGAL_CARD_PASS, EVENT_ACS_CARD_AND_PSW_PASS, EVENT_ACS_CARD_AND_PSW_FAIL, EVENT_ACS_CARD_AND_PSW_TIMEOUT, EVENT_ACS_CARD_MAX_AUTHENTICATE_FAIL, EVENT_ACS_CARD_NO_RIGHT, EVENT_ACS_CARD_INVALID_PERIOD, EVENT_ACS_CARD_OUT_OF_DATE, EVENT_ACS_INVALID_CARD, EVENT_ACS_ANTI_SNEAK_FAIL, EVENT_ACS_INTERLOCK_DOOR_NOT_CLOSE, EVENT_ACS_FINGERPRINT_COMPARE_PASS, EVENT_ACS_FINGERPRINT_COMPARE_FAIL, EVENT_ACS_CARD_FINGERPRINT_VERIFY_PASS, EVENT_ACS_CARD_FINGERPRINT_VERIFY_FAIL, EVENT_ACS_CARD_FINGERPRINT_VERIFY_TIMEOUT, EVENT_ACS_CARD_FINGERPRINT_PASSWD_VERIFY_PASS, EVENT_ACS_CARD_FINGERPRINT_PASSWD_VERIFY_FAIL, EVENT_ACS_CARD_FINGERPRINT_PASSWD_VERIFY_TIMEOUT, EVENT_ACS_FINGERPRINT_PASSWD_VERIFY_PASS, EVENT_ACS_FINGERPRINT_PASSWD_VERIFY_FAIL, EVENT_ACS_FINGERPRINT_PASSWD_VERIFY_TIMEOUT, EVENT_ACS_FINGERPRINT_INEXISTENCE, EVENT_ACS_FACE_VERIFY_PASS, EVENT_ACS_FACE_VERIFY_FAIL, EVENT_ACS_FACE_AND_FP_VERIFY_PASS, EVENT_ACS_FACE_AND_FP_VERIFY_FAIL, EVENT_ACS_FACE_AND_FP_VERIFY_TIMEOUT, EVENT_ACS_FACE_AND_PW_VERIFY_PASS, EVENT_ACS_FACE_AND_PW_VERIFY_FAIL, EVENT_ACS_FACE_AND_PW_VERIFY_TIMEOUT, EVENT_ACS_FACE_AND_CARD_VERIFY_PASS, EVENT_ACS_FACE_AND_CARD_VERIFY_FAIL, EVENT_ACS_FACE_AND_CARD_VERIFY_TIMEOUT, EVENT_ACS_FACE_AND_PW_AND_FP_VERIFY_PASS, EVENT_ACS_FACE_AND_PW_AND_FP_VERIFY_FAIL, EVENT_ACS_FACE_AND_PW_AND_FP_VERIFY_TIMEOUT, EVENT_ACS_FACE_AND_CARD_AND_FP_VERIFY_PASS, EVENT_ACS_FACE_AND_CARD_AND_FP_VERIFY_FAIL, EVENT_ACS_FACE_AND_CARD_AND_FP_VERIFY_TIMEOUT, EVENT_ACS_EMPLOYEENO_AND_FP_VERIFY_PASS, EVENT_ACS_EMPLOYEENO_AND_FP_VERIFY_FAIL, EVENT_ACS_EMPLOYEENO_AND_FP_VERIFY_TIMEOUT, EVENT_ACS_EMPLOYEENO_AND_FP_AND_PW_VERIFY_PASS, EVENT_ACS_EMPLOYEENO_AND_FP_AND_PW_VERIFY_FAIL, EVENT_ACS_EMPLOYEENO_AND_FP_AND_PW_VERIFY_TIMEOUT, EVENT_ACS_EMPLOYEENO_AND_FACE_VERIFY_PASS, EVENT_ACS_EMPLOYEENO_AND_FACE_VERIFY_FAIL, EVENT_ACS_EMPLOYEENO_AND_FACE_VERIFY_TIMEOUT, EVENT_ACS_FACE_RECOGNIZE_FAIL, EVENT_ACS_EMPLOYEENO_AND_PW_PASS, EVENT_ACS_EMPLOYEENO_AND_PW_FAIL, EVENT_ACS_EMPLOYEENO_AND_PW_TIMEOUT, EVENT_ACS_HUMAN_DETECT_FAIL } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_XML_CONFIG_INPUT { public uint dwSize; //size of NET_DVR_XML_CONFIG_INPUT public IntPtr lpRequestUrl; //command string public uint dwRequestUrlLen; //command string length public IntPtr lpInBuffer; //input buffer ,XML format public uint dwInBufferSize; //input buffer length public uint dwRecvTimeOut; //receive timeout,unit:ms,0 represent 5s [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] byRes; //reserve } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_XML_CONFIG_OUTPUT { public uint dwSize; //size of NET_DVR_XML_CONFIG_OUTPUT public IntPtr lpOutBuffer; //output buffer,XMLformat public uint dwOutBufferSize; //input buffer length public uint dwReturnedXMLSize; //the real receive Xml size public IntPtr lpStatusBuffer; //return status(XML format),no assignment with success, If you don't care about it ,just set it NULL public uint dwStatusSize; //status length(unit byte) [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] byRes; //reserve } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_JSON_DATA_CFG { public uint dwSize; //size of NET_DVR_JSON_DATA_CFG public IntPtr lpJsonData; //Json data public uint dwJsonDataSize; //Json data size public IntPtr lpPicData; //picture data public uint dwPicDataSize; //picture data size public uint dwInfraredFacePicSize; //infrared picture data size public IntPtr lpInfraredFacePicBuffer; //infrared picture data [MarshalAs(UnmanagedType.ByValArray, SizeConst = 248)] public byte[] byRes; //reserve } #endregion #region acs event upload [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct NET_DVR_LOG_V30 { public NET_DVR_TIME strLogTime; public uint dwMajorType;//Main type 1- alarm; 2- abnormal; 3- operation; 0xff- all public uint dwMinorType; //Hypo- Type 0- all; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)] public byte[] sPanelUser;//user ID for local panel operation [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)] public byte[] sNetUser;//user ID for network operation public NET_DVR_IPADDR struRemoteHostAddr;//remote host IP public uint dwParaType;//parameter type, for 9000 series MINOR_START_VT/MINOR_STOP_VT, channel of the voice talking public uint dwChannel;//channel number public uint dwDiskNumber;//HD number public uint dwAlarmInPort;//alarm input port public uint dwAlarmOutPort;//alarm output port public uint dwInfoLen; [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = LOG_INFO_LEN)] public string sInfo; } // ACS event informations public struct NET_DVR_ACS_EVENT_INFO { public uint dwSize; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; // card No, 0 means invalid public byte byCardType; // card type,1-ordinary card,2-disable card,3-black list card, 4-patrol card,5-stress card,6-super card,7-client card, 0 means invalid public byte byWhiteListNo; // white list No, 1-8, 0 means invalid public byte byReportChannel; // report channel, 1-alarmin updata, 2-center group 1, 3-center group 2, 0 means invalid public byte byCardReaderKind; // card reader type: 0-invalid, 1-IC card reader, 2-Id card reader, 3-Qr code reader, 4-Fingerprint head public uint dwCardReaderNo; // card reader No, 0 means invalid public uint dwDoorNo; // door No(floor No), 0 means invalid public uint dwVerifyNo; // mutilcard verify No. 0 means invalid public uint dwAlarmInNo; // alarm in No, 0 means invalid public uint dwAlarmOutNo; // alarm out No 0 means invalid public uint dwCaseSensorNo; // case sensor No 0 means invalid public uint dwRs485No; // RS485 channel,0 means invalid public uint dwMultiCardGroupNo; // multicard group No. public ushort wAccessChannel; // Staff channel number public byte byDeviceNo; // device No,0 means invalid public byte byDistractControlNo; // distract control,0 means invalid public uint dwEmployeeNo; // employee No,0 means invalid public ushort wLocalControllerID; // On the controller number, 0 - access the host, 1-64 on behalf of the local controller public byte byInternetAccess; // Internet access ID (1-uplink network port 1, 2-uplink network port 2,3- downstream network interface 1 public byte byType; // protection zone type, 0-real time, 1-24 hours, 2-delay, 3-internal, 4-the key, 5-fire, 6-perimeter, 7-24 hours of silent // 8-24 hours auxiliary, 9-24 hours vibration, 10-door emergency open, 11-door emergency shutdown, 0xff-null [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byMACAddr; // mac addr 0 means invalid public byte bySwipeCardType;// swipe card type, 0-invalid,1-Qr code [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 13, ArraySubType = UnmanagedType.I1)] public byte[] byRes; } // Entrance guard alarm information structure public struct NET_DVR_ACS_ALARM_INFO { public uint dwSize; public uint dwMajor; // alarm major, reference to macro public uint dwMinor; // alarm minor, reference to macro public NET_DVR_TIME struTime; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)] public byte[] sNetUser; // net operator user public NET_DVR_IPADDR struRemoteHostAddr; // remote host address public NET_DVR_ACS_EVENT_INFO struAcsEventInfo; public uint dwPicDataLen; // picture length, when 0 ,means has no picture public IntPtr pPicData; // picture data [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)] public byte[] byRes; } //Alarm Device Infor [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct NET_DVR_ALARMER { public byte byUserIDValid; /* Whether userID is valid, 0- invalid 1- valid. */ public byte bySerialValid; /* Whether serial number is valid, 0- invalid 1- valid. */ public byte byVersionValid; /* Whether version number is valid, 0- invalid 1- valid. */ public byte byDeviceNameValid; /* Whether device name is valid, 0- invalid 1- valid. */ public byte byMacAddrValid; /* Whether MAC address is valid, 0- invalid 1- valid. */ public byte byLinkPortValid; /* Whether login port number is valid, 0- invalid 1- valid. */ public byte byDeviceIPValid; /* Whether device IP is valid, 0- invalid 1- valid.*/ public byte bySocketIPValid; /* Whether socket IP is valid, 0- invalid 1- valid. */ public int lUserID; /* NET_DVR_Login () effective when establishing alarm upload channel*/ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] sSerialNumber; /* Serial number. */ public uint dwDeviceVersion; /* Version number, 2 high byte means the major version, 2 low byte means the minor version*/ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = NAME_LEN)] public string sDeviceName; /* Device name. */ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byMacAddr; /* MAC address */ public ushort wLinkPort; /* link port */ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 128)] public string sDeviceIP; /* IP address */ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 128)] public string sSocketIP; /* alarm push- mode socket IP address. */ public byte byIpProtocol; /* IP protocol: 0- IPV4; 1- IPV6. */ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; } //Alarm protection structure parameters [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_SETUPALARM_PARAM { public uint dwSize; public byte byLevel; //Arming priority: 0-high, 1-middle, 2-low public byte byAlarmInfoType;//Upload alarm information types(Intelligent traffic camera support):0- old(NET_DVR_PLATE_RESULT),1- new(NET_ITS_PLATE_RESULT) public byte byRetAlarmTypeV40; //0- Ret NET_DVR_ALARMINFO_V30 or Older, 1- if Device Support NET_DVR_ALARMINFO_V40, Ret NET_DVR_ALARMINFO_V40, else Ret NET_DVR_ALARMINFO_V30 Or NET_DVR_ALARMINFO public byte byRetDevInfoVersion; //CVR alarm 0-COMM_ALARM_DEVICE, 1-COMM_ALARM_DEVICE_V40 public byte byRetVQDAlarmType; //Exptected VQD alarm type,0-upload NET_DVR_VQD_DIAGNOSE_INFO,1-upload NET_DVR_VQD_ALARM //1-(INTER_FACE_DETECTION),0-(INTER_FACESNAP_RESULT) public byte byFaceAlarmDetection; //Bit0 - indicates whether the secondary protection to upload pictures: 0 - upload, 1 - do not upload //Bit1 - said open data upload confirmation mechanism; 0 - don't open, 1 - to open public byte bySupport; //broken Net Http //bit0-Vehicle Detection(IPC) (0 - not continuingly, 1 - continuingly) //bit1-PDC(IPC) (0 - not continuingly, 1 - continuingly) //bit2-HeatMap(IPC) (0 - not continuingly, 1 - continuingly) public byte byBrokenNetHttp; public ushort wTaskNo;//Tasking number and the (field dwTaskNo corresponding data upload NET_DVR_VEHICLE_RECOG_RESULT the same time issued a task structure NET_DVR_VEHICLE_RECOG_COND corresponding fields in dwTaskNo public byte byDeployType;//deploy type:0-client deploy,1-real time deploy [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public byte byAlarmTypeURL;//bit0-(NET_DVR_FACESNAP_RESULT),0-binary,1-URL public byte byCustomCtrl;//Bit0- Support the copilot face picture upload: 0-Upload,1-Do not upload } #endregion #region card parameters configuration [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_VALID_PERIOD_CFG { public byte byEnable; //whether to enable , 0-disable 1-enable [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public NET_DVR_TIME_EX struBeginTime; //valid begin time public NET_DVR_TIME_EX struEndTime; //valid end time [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CARD_CFG_V50 { public uint dwSize; public uint dwModifyParamType; // 需要修改的卡参数,设置卡参数时有效,按位表示,每位代表一种参数,1为需要修改,0为不修改 // #define CARD_PARAM_CARD_VALID 0x00000001 //卡是否有效参数 // #define CARD_PARAM_VALID 0x00000002 //有效期参数 // #define CARD_PARAM_CARD_TYPE 0x00000004 //卡类型参数 // #define CARD_PARAM_DOOR_RIGHT 0x00000008 //门权限参数 // #define CARD_PARAM_LEADER_CARD 0x00000010 //首卡参数 // #define CARD_PARAM_SWIPE_NUM 0x00000020 //最大刷卡次数参数 // #define CARD_PARAM_GROUP 0x00000040 //所属群组参数 // #define CARD_PARAM_PASSWORD 0x00000080 //卡密码参数 // #define CARD_PARAM_RIGHT_PLAN 0x00000100 //卡权限计划参数 // #define CARD_PARAM_SWIPED_NUM 0x00000200 //已刷卡次数 // #define CARD_PARAM_EMPLOYEE_NO 0x00000400 //工号 // #define CARD_PARAM_NAME 0x00000800 //姓名 // #define CARD_PARAM_DEPARTMENT_NO 0x00001000 //部门编号 // #define CARD_SCHEDULE_PLAN_NO 0x00002000 //排班计划编号 // #define CARD_SCHEDULE_PLAN_TYPE 0x00004000 //排班计划类型 // #define CARD_ROOM_NUMBER 0x00008000 //房间号 // #define CARD_SIM_NO 0x00010000 //SIM卡号(手机号) // #define CARD_FLOOR_NUMBER 0x00020000 //楼层号 // #define CARD_USER_TYPE 0x00040000 //用户类型 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; //卡号 public byte byCardValid; //卡是否有效,0-无效,1-有效(用于删除卡,设置时置为0进行删除,获取时此字段始终为1) public byte byCardType; //卡类型,1-普通卡,2-残疾人卡,3-黑名单卡,4-巡更卡,5-胁迫卡,6-超级卡,7-来宾卡,8-解除卡,9-员工卡,10-应急卡,11-应急管理卡(用于授权临时卡权限,本身不能开门),默认普通卡 public byte byLeaderCard; //是否为首卡,1-是,0-否 public byte byUserType; // 0 – 普通用户1 - 管理员用户; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_NUM_256, ArraySubType = UnmanagedType.I1)] public byte[] byDoorRight; //门权限(楼层权限、锁权限),按位表示,1为有权限,0为无权限,从低位到高位表示对门(锁)1-N是否有权限 public NET_DVR_VALID_PERIOD_CFG struValid; //有效期参数 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_GROUP_NUM_128, ArraySubType = UnmanagedType.I1)] public byte[] byBelongGroup; //所属群组,按字节表示,1-属于,0-不属于 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CARD_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardPassword; //卡密码 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_NUM_256 * MAX_CARD_RIGHT_PLAN_NUM, ArraySubType = UnmanagedType.U2)] public ushort[] wCardRightPlan; //卡权限计划,取值为计划模板编号,同个门(锁)不同计划模板采用权限或的方式处理 public uint dwMaxSwipeTime; //最大刷卡次数,0为无次数限制(开锁次数) public uint dwSwipeTime; //已刷卡次数 public ushort wRoomNumber; //房间号 public ushort wFloorNumber; //层号 public uint dwEmployeeNo; //工号(用户ID) [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byName; //姓名 public ushort wDepartmentNo; //部门编号 public ushort wSchedulePlanNo; //排班计划编号 public byte bySchedulePlanType; //排班计划类型:0-无意义、1-个人、2-部门 public byte byRightType; //下发权限类型:0-普通发卡权限、1-二维码权限、2-蓝牙权限(可视对讲设备二维码权限配置项:房间号、卡号(虚拟卡号)、最大刷卡次数(开锁次数)、有效期参数;蓝牙权限:卡号(萤石APP账号)、其他参数配置与普通发卡权限一致) [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; public uint dwLockID; //锁ID [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LOCK_CODE_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byLockCode; //锁代码 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_CODE_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byRoomCode; //房间代码 //按位表示,0-无权限,1-有权限 //第0位表示:弱电报警 //第1位表示:开门提示音 //第2位表示:限制客卡 //第3位表示:通道 //第4位表示:反锁开门 //第5位表示:巡更功能 public uint dwCardRight; //卡权限 public uint dwPlanTemplate; //计划模板(每天)各时间段是否启用,按位表示,0--不启用,1-启用 public uint dwCardUserId; //持卡人ID public byte byCardModelType; //0-空,1- MIFARE S50,2- MIFARE S70,3- FM1208 CPU卡,4- FM1216 CPU卡,5-国密CPU卡,6-身份证,7- NFC [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 51, ArraySubType = UnmanagedType.I1)] public byte[] byRes3; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)] public byte[] bySIMNum; //SIM卡号(手机号) public void Init() { byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN]; byDoorRight = new byte[CHCNetSDK.MAX_DOOR_NUM_256]; byBelongGroup = new byte[CHCNetSDK.MAX_GROUP_NUM_128]; byCardPassword = new byte[CHCNetSDK.CARD_PASSWORD_LEN]; wCardRightPlan = new ushort[CHCNetSDK.MAX_DOOR_NUM_256 * CHCNetSDK.MAX_CARD_RIGHT_PLAN_NUM]; byName = new byte[CHCNetSDK.NAME_LEN]; byRes2 = new byte[3]; byLockCode = new byte[CHCNetSDK.MAX_LOCK_CODE_LEN]; byRoomCode = new byte[CHCNetSDK.MAX_DOOR_CODE_LEN]; byRes3 = new byte[83]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CARD_CFG_COND { public uint dwSize; public uint dwCardNum; //card number, 0xffffffff means to get all card information when getting public byte byCheckCardNo; //whether to verify card No. 0-not to verify, 1-verify [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public ushort wLocalControllerID; //On-site controller serial number, said to the local controller issued offline card parameters, 0 is access control host [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; public uint dwLockID; //lock ID [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)] public byte[] byRes3; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CARD_CFG_SEND_DATA { public uint dwSize; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; //card No public uint dwCardUserId; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FACE_PARAM_COND { public uint dwSize; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; //card No [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; //enable card reader:0-invalid,1-valid public uint dwFaceNum; //face number public byte byFaceID; //face id:1-2,0xff present this card all face [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 127, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byCardNo = new byte[ACS_CARD_NO_LEN]; byEnableCardReader = new byte[MAX_CARD_READER_NUM_512]; byRes = new byte[127]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FACE_PARAM_CFG { public uint dwSize; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; //card No public uint dwFaceLen; //face length public IntPtr pFaceBuffer; //face buffer [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; //enable card reader:0-invalid,1-valid public byte byFaceID; //face id:1-2,0xff present this card all face public byte byFaceDataType; //face data type:0-module(default),1-picture [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 126, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byCardNo = new byte[ACS_CARD_NO_LEN]; byEnableCardReader = new byte[MAX_CARD_READER_NUM_512]; byRes = new byte[126]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FACE_PARAM_STATUS { public uint dwSize; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; //card No [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byCardReaderRecvStatus; //card reader receive status:0-fail,1-success,2-face of poor quality,3-memory full,4-face already exist,5-illegal face ID [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ERROR_MSG_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byErrorMsg; //error message:when byCardReaderRecvStatus is 4,present face already exist correspond card number public uint dwCardReaderNo; //card reader No public byte byTotalStatus; //total status:0-not set all card readers face,1-set all card readers face public byte byFaceID; //face id:1-2 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 130, ArraySubType = UnmanagedType.I1)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CAPTURE_FACE_COND { public uint dwSize; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CAPTURE_FACE_CFG { public uint dwSize; public uint dwFaceTemplate1Size; public IntPtr pFaceTemplate1Buffer; public uint dwFaceTemplate2Size; public IntPtr pFaceTemplate2Buffer; public uint dwFacePicSize; public IntPtr pFacePicBuffer; public byte byFaceQuality1; public byte byFaceQuality2; public byte byCaptureProgress; [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 125, ArraySubType = UnmanagedType.I1)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_ACS_PARAM_TYPE { public uint dwSize; public uint dwParamType; //parameter type,bitwise representation //#define ACS_PARAM_DOOR_STATUS_WEEK_PLAN 0x00000001 //door status week plan //#define ACS_PARAM_VERIFY_WEEK_PALN 0x00000002 //card reader week plan //#define ACS_PARAM_CARD_RIGHT_WEEK_PLAN 0x00000004 //card right week plan //#define ACS_PARAM_DOOR_STATUS_HOLIDAY_PLAN 0x00000008 //door status holiday plan //#define ACS_PARAM_VERIFY_HOLIDAY_PALN 0x00000010 //card reader holiday plan //#define ACS_PARAM_CARD_RIGHT_HOLIDAY_PLAN 0x00000020 //card right holiday plan //#define ACS_PARAM_DOOR_STATUS_HOLIDAY_GROUP 0x00000040 //door status holiday group plan //#define ACS_PARAM_VERIFY_HOLIDAY_GROUP 0x00000080 //card reader verify holiday group plan //#define ACS_PARAM_CARD_RIGHT_HOLIDAY_GROUP 0x00000100 //card right holiday group plan //#define ACS_PARAM_DOOR_STATUS_PLAN_TEMPLATE 0x00000200 // door status plan template //#define ACS_PARAM_VERIFY_PALN_TEMPLATE 0x00000400 //card reader verify plan template //#define ACS_PARAM_CARD_RIGHT_PALN_TEMPLATE 0x00000800 //card right plan template //#define ACS_PARAM_CARD 0x00001000 //card configure //#define ACS_PARAM_GROUP 0x00002000 //group configure //#define ACS_PARAM_ANTI_SNEAK_CFG 0x00004000 //anti-sneak configure //#define ACS_PAPAM_EVENT_CARD_LINKAGE 0x00008000 //event linkage card //#define ACS_PAPAM_CARD_PASSWD_CFG 0x00010000 //open door by password public ushort wLocalControllerID; //On-site controller serial number[1,64],0 represent guard host [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30)] public byte[] byRes; } #endregion #region door parameters configuration [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_DOOR_CFG { public uint dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = DOOR_NAME_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byDoorName;//door name public byte byMagneticType;//magnetic type, 0-always close 1-always open public byte byOpenButtonType;//open button type, 0-always close 1-always open public byte byOpenDuration;//open duration time, 1-255s(ladder control relay action time) public byte byDisabledOpenDuration;//disable open duration , 1-255s public byte byMagneticAlarmTimeout;//magnetic alarm time out , 0-255s,0 means not to alarm public byte byEnableDoorLock;//whether to enable door lock, 0-disable, 1-enable public byte byEnableLeaderCard;//whether to enable leader card , 0-disable, 1-enable public byte byLeaderCardMode;//First card mode, 0 - first card function is not enabled, and 1 - the first card normally open mode, 2 - the first card authorization mode (using this field, the byEnableLeaderCard is invalid ) public uint dwLeaderCardOpenDuration;//leader card open duration 1-1440min [MarshalAs(UnmanagedType.ByValArray, SizeConst = STRESS_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byStressPassword;//stress ppassword [MarshalAs(UnmanagedType.ByValArray, SizeConst = SUPER_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)] public byte[] bySuperPassword; //super password [MarshalAs(UnmanagedType.ByValArray, SizeConst = UNLOCK_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byUnlockPassword; public byte byUseLocalController; //Read-only, whether the connection on the local controller, 0 - no, 1 - yes public byte byRes1; public ushort wLocalControllerID; //Read-only, on-site controller serial number, 1-64, 0 on behalf of unregistered public ushort wLocalControllerDoorNumber; //Read-only, on-site controller door number, 1-4, 0 represents the unregistered public ushort wLocalControllerStatus; //Read-only, on-site controller online status: 0 - offline, 1 - online, 2 - loop of RS485 serial port 1 on 1, 3 - loop of RS485 serial port 2 on 2, 4 - loop of RS485 serial port 1, 5 - loop of RS485 serial port 2, 6 - loop 3 of RS485 serial port 1, 7 - the loop on the RS485 serial port on the 3 4 2, 8 - loop on the RS485 serial port 1, 9 - loop 4 of RS485 serial port 2 (read-only) public byte byLockInputCheck; //Whether to enable the door input detection (1 public byte, 0 is not enabled, 1 is enabled, is not enabled by default) public byte byLockInputType; //Door lock input type public byte byDoorTerminalMode; //Gate terminal working mode public byte byOpenButton; //Whether to enable the open button public byte byLadderControlDelayTime; //ladder control delay time,1-255min [MarshalAs(UnmanagedType.ByValArray, SizeConst = 43, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; public void Init() { byDoorName = new byte[DOOR_NAME_LEN]; byStressPassword = new byte[STRESS_PASSWORD_LEN]; bySuperPassword = new byte[SUPER_PASSWORD_LEN]; byUnlockPassword = new byte[UNLOCK_PASSWORD_LEN]; byRes2 = new byte[43]; } } #endregion #region group parameters configuration [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_GROUP_CFG { public uint dwSize; public byte byEnable; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public NET_DVR_VALID_PERIOD_CFG struValidPeriodCfg; [MarshalAs(UnmanagedType.ByValArray, SizeConst = GROUP_NAME_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byGroupName; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; } #endregion #region user parameters configuration [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_ALARM_DEVICE_USER { public uint dwSize; //Structure size [MarshalAs(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)] public byte[] sUserName; [MarshalAs(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)] public byte[] sPassword; public NET_DVR_IPADDR struUserIP;//User IP (0 stands for no IP restriction) [MarshalAs(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byAMCAddr; public byte byUserType; //0- general user, 1- administrator user public byte byAlarmOnRight;//Arming authority public byte byAlarmOffRight; //Disarming authority public byte byBypassRight; //Bypass authority [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.I1)] public byte[] byOtherRight;//Other authority // 0 -- log // 1 -- reboot/shutdown // 2 -- set parameter // 3 -- get parameter // 4 -- resume // 5 -- siren // 6 -- PTZ // 7 -- remote upgrade // 8 -- preview // 9 -- manual record // 10 --remote playback [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_ALARMHOST_VIDEO_CHAN / 8, ArraySubType = UnmanagedType.I1)] public byte[] byNetPreviewRight;// preview channels,eg. bit0-channel 1,0-no permission 1-permission enable [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_ALARMHOST_VIDEO_CHAN / 8, ArraySubType = UnmanagedType.I1)] public byte[] byNetRecordRight; // record channels,eg. bit0-channel 1,0-no permission 1-permission enable [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_ALARMHOST_VIDEO_CHAN / 8, ArraySubType = UnmanagedType.I1)] public byte[] byNetPlaybackRight; // playback channels,eg. bit0-channel 1,0-no permission 1-permission enable [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_ALARMHOST_VIDEO_CHAN / 8, ArraySubType = UnmanagedType.I1)] public byte[] byNetPTZRight; // PTZ channels,eg. bit0-channel 1,0-no permission 1-permission enable [MarshalAs(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)] public byte[] sOriginalPassword; // Original password [MarshalAs(UnmanagedType.ByValArray, SizeConst = 152, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; } #endregion #region cardreader configuration [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CARD_READER_CFG_V50 { public uint dwSize; public byte byEnable; //whether to enable, 1-enable, 0-disable public byte byCardReaderType; //card reader type,1-DS-K110XM/MK/C/CK,2-DS-K192AM/AMP,3-DS-K192BM/BMP,4-DS-K182AM/AMP,5-DS-K182BM/BMP,6-DS-K182AMF/ACF,7-wiegand or 485 not online,8- DS-K1101M/MK,9- DS-K1101C/CK,10- DS-K1102M/MK/M-A //11- DS-K1102C/CK,12- DS-K1103M/MK,13- DS-K1103C/CK,14- DS-K1104M/MK,15- DS-K1104C/CK,16- DS-K1102S/SK/S-A,17- DS-K1102G/GK,18- DS-K1100S-B,19- DS-K1102EM/EMK,20- DS-K1102E/EK, //21- DS-K1200EF,22- DS-K1200MF,23- DS-K1200CF,24- DS-K1300EF,25- DS-K1300MF,26- DS-K1300CF,27- DS-K1105E,28- DS-K1105M,29- DS-K1105C,30- DS-K182AMF,31- DS-K196AMF,32-DS-K194AMP //33-DS-K1T200EF/EF-C/MF/MF-C/CF/CF-C,34-DS-K1T300EF/EF-C/MF/MF-C/CF/CF-C,35-DS-K1T105E/E-C/M/M-C/C/C-C,36-DS-K1T803F/MF/SF/EF,37-DS-K1A801F/MF/SF/EF,38-DS-K1107M/MK,39-DS-K1107E/EK, //40-DS-K1107S/SK,41-DS-K1108M/MK,42-DS-K1108E/EK,43-DS-K1108S/SK,44-DS-K1200F,45-DS-K1S110-I,46-DS-K1T200M-PG/PGC,47-DS-K1T200M-PZ/PZC,48-DS-K1109H public byte byOkLedPolarity; //OK LED polarity,0-negative,1-positive public byte byErrorLedPolarity; //Error LED polarity,0-negative,1-positive public byte byBuzzerPolarity; //buzzer polarity,0-negative,1-positive public byte bySwipeInterval; //swipe interval, unit: second public byte byPressTimeout; //press time out, unit:second public byte byEnableFailAlarm; //whether to enable fail alarm, 0-disable 1-enable public byte byMaxReadCardFailNum; //max reader card fail time public byte byEnableTamperCheck; //whether to support tamper check, 0-disable ,1-enable public byte byOfflineCheckTime; //offline check time, Uint second public byte byFingerPrintCheckLevel; //fingerprint check lever,1-1/10,2-1/100,3-1/1000,4-1/10000,5-1/100000,6-1/1000000,7-1/10000000,8-1/100000000,9-3/100,10-3/1000,11-3/10000,12-3/100000,13-3/1000000,14-3/10000000,15-3/100000000,16-Automatic Normal,17-Automatic Secure,18-Automatic More Secure public byte byUseLocalController; //read only,weather connect with local control:0-no,1-yes public byte byRes1; public ushort wLocalControllerID; //read only,local controller ID, byUseLocalController=1 effective,1-64,0 present not register public ushort wLocalControllerReaderID; //read only,local controller reader ID,byUseLocalController=1 effective,0 present not register public ushort wCardReaderChannel; //read only,card reader channel,byUseLocalController=1 effective,0-wiegand or offline,1-RS485A,2-RS485B public byte byFingerPrintImageQuality; //finger print image quality,0-no effective,1-weak qualification(V1),2-moderate qualification(V1),3-strong qualification(V1),4-strongest qualification(V1),5-weak qualification(V2),6-moderate qualification(V2),7-strong qualification(V2),8-strongest qualification(V2) public byte byFingerPrintContrastTimeOut; //finger print contrast time out,0-no effective,1-20 present:1s-20s,0xff-infinite public byte byFingerPrintRecogizeInterval; //finger print recognize interval,0-no effective,1-10 present:1s-10s,0xff-no delay public byte byFingerPrintMatchFastMode; //finger print match fast mode,0-no effective,1-5 present:fast mode 1-fast mode 5,0xff-auto public byte byFingerPrintModuleSensitive; //finger print module sensitive,0-no effective,1-8 present:sensitive level 1-sensitive level 8 public byte byFingerPrintModuleLightCondition; //finger print module light condition,0-no effective,1-out door,2-in door public byte byFaceMatchThresholdN; //range 0-100 public byte byFaceQuality; //face quality,range 0-100 public byte byFaceRecogizeTimeOut; //face recognize time out,1-20 present:1s-20s,0xff-infinite public byte byFaceRecogizeInterval; //face recognize interval,0-no effective,1-10 present:1s-10s,0xff-no delay public ushort wCardReaderFunction; //read only,card reader function [MarshalAs(UnmanagedType.ByValArray, SizeConst = CARD_READER_DESCRIPTION, ArraySubType = UnmanagedType.I1)] public byte[] byCardReaderDescription; //read only,card reader description public ushort wFaceImageSensitometry; //face image sensitometry,range 0-65535 public byte byLivingBodyDetect; //living body detect,0-no effective,1-disable,2-enable public byte byFaceMatchThreshold1; //range 0-100 public ushort wBuzzerTime; //buzzer time,range 0-5999(s) 0 present yowl [MarshalAs(UnmanagedType.ByValArray, SizeConst = 254, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byCardReaderDescription = new byte[CARD_READER_DESCRIPTION]; byRes = new byte[254]; } } #endregion #region fingerprint configuration [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_CFG { public uint dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; //card NO public uint dwFingerPrintLen; //fingerprint len [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; //the card reader which finger print send to,according to the values,0-not send,1-send public byte byFingerPrintID; //finger print ID,[1,10] public byte byFingerType; //finger type 0-normal,1-stress [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_FINGER_PRINT_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byFingerData; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byCardNo = new byte[ACS_CARD_NO_LEN]; byEnableCardReader = new byte[MAX_CARD_READER_NUM_512]; byRes1 = new byte[30]; byFingerData = new byte[MAX_FINGER_PRINT_LEN]; byRes = new byte[64]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_STATUS { public uint dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byCardReaderRecvStatus; //Fingerprint reader state, press the public bytes, 0 - failure, 1 -, 2 - the fingerprint module is not online, 3 - try again or poor quality of fingerprint, 4 - memory is full, 5 - existing the fingerprints, 6 - existing the fingerprint ID, illegal fingerprint ID, 7-8 - don't need to configure the fingerprint module public byte byFingerPrintID; //finger print ID,[1,10] public byte byFingerType; //finger type 0-normal,1-stress public byte byTotalStatus; // public byte byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ERROR_MSG_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byErrorMsg; //Issued false information, when the byCardReaderRecvStatus is 5, said existing fingerprint matching card number public uint dwCardReaderNo; //Grain number card reader, can be used to return issued by mistake [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byCardNo = new byte[ACS_CARD_NO_LEN]; byCardReaderRecvStatus = new byte[MAX_CARD_READER_NUM_512]; byErrorMsg = new byte[ERROR_MSG_LEN]; byRes = new byte[24]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_INFO_COND { public uint dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; //which card reader to send,according to the values public uint dwFingerPrintNum; //the number send or get. if get,0xffffffff means all public byte byFingerPrintID; //finger print ID,[1,10], 0xff means all public byte byCallbackMode; // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 26, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public void Init() { byCardNo = new byte[ACS_CARD_NO_LEN]; byEnableCardReader = new byte[MAX_CARD_READER_NUM_512]; byRes1 = new byte[26]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_CFG_V50 { public uint dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; //card NO public uint dwFingerPrintLen; //fingerprint len [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; //the card reader which finger print send to,according to the values,0-not send,1-send public byte byFingerPrintID; //finger print ID,[1,10] public byte byFingerType; //finger type 0-normal,1-stress [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_FINGER_PRINT_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byFingerData; [MarshalAs(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byEmployeeNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_NUM_256, ArraySubType = UnmanagedType.I1)] public byte[] byLeaderFP; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byCardNo = new byte[ACS_CARD_NO_LEN]; byEnableCardReader = new byte[MAX_CARD_READER_NUM_512]; byRes1 = new byte[30]; byFingerData = new byte[MAX_FINGER_PRINT_LEN]; byEmployeeNo = new byte[NET_SDK_EMPLOYEE_NO_LEN]; byLeaderFP = new byte[MAX_DOOR_NUM_256]; byRes = new byte[128]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_STATUS_V50 { public uint dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byCardReaderRecvStatus; //Fingerprint reader state, press the public bytes, 0 - failure, 1 -, 2 - the fingerprint module is not online, 3 - try again or poor quality of fingerprint, 4 - memory is full, 5 - existing the fingerprints, 6 - existing the fingerprint ID, illegal fingerprint ID, 7-8 - don't need to configure the fingerprint module public byte byFingerPrintID; //finger print ID,[1,10] public byte byFingerType; //finger type 0-normal,1-stress public byte byTotalStatus; // public byte byRecvStatus; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ERROR_MSG_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byErrorMsg; //Issued false information, when the byCardReaderRecvStatus is 5, said existing fingerprint matching card number public uint dwCardReaderNo; //Grain number card reader, can be used to return issued by mistake [MarshalAs(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byEmployeeNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byErrorEmployeeNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byCardNo = new byte[ACS_CARD_NO_LEN]; byCardReaderRecvStatus = new byte[MAX_CARD_READER_NUM_512]; byErrorMsg = new byte[ERROR_MSG_LEN]; byEmployeeNo = new byte[NET_SDK_EMPLOYEE_NO_LEN]; byErrorEmployeeNo = new byte[NET_SDK_EMPLOYEE_NO_LEN]; byRes = new byte[128]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_INFO_COND_V50 { public uint dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; //which card reader to send,according to the values public uint dwFingerPrintNum; //the number send or get. if get,0xffffffff means all public byte byFingerPrintID; //finger print ID,[1,10], 0xff means all public byte byCallbackMode; // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; [MarshalAs(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byEmployeeNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public void Init() { byCardNo = new byte[ACS_CARD_NO_LEN]; byEnableCardReader = new byte[MAX_CARD_READER_NUM_512]; byRes2 = new byte[2]; byEmployeeNo = new byte[NET_SDK_EMPLOYEE_NO_LEN]; byRes1 = new byte[128]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_BYCARD { [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; //be enable card reader,according to the values [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_FINGER_PRINT_NUM, ArraySubType = UnmanagedType.I1)] public byte[] byFingerPrintID; //finger print ID,according to the values,0-not delete,1-delete [MarshalAs(UnmanagedType.ByValArray, SizeConst = 34, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_BYREADER { public uint dwCardReaderNo; public byte byClearAllCard; //clear all card,0-delete by card,1-delete all card [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 548, ArraySubType = UnmanagedType.I1)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_INFO_CTRL_BYCARD { public uint dwSize; public byte byMode; //delete mode,0-delete by card,1-delete by reader [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] byRes1; public NET_DVR_FINGER_PRINT_BYCARD struByCard; //delete by card [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_INFO_CTRL_BYREADER { public uint dwSize; public byte byMode; //delete mode,0-delete by card,1-delete by reader [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] byRes1; public NET_DVR_FINGER_PRINT_BYREADER struByReader; //delete by reader [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_BYCARD_V50 { [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; //be enable card reader,according to the values [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_FINGER_PRINT_NUM, ArraySubType = UnmanagedType.I1)] public byte[] byFingerPrintID; //finger print ID,according to the values,0-not delete,1-delete [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byEmployeeNo; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_BYREADER_V50 { public uint dwCardReaderNo; public byte byClearAllCard; //clear all card,0-delete by card,1-delete all card [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byEmployeeNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 516, ArraySubType = UnmanagedType.I1)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_INFO_CTRL_BYCARD_V50 { public uint dwSize; public byte byMode; //delete mode,0-delete by card,1-delete by reader [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] byRes1; public NET_DVR_FINGER_PRINT_BYCARD_V50 struByCard; //delete by card [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_INFO_CTRL_BYREADER_V50 { public uint dwSize; public byte byMode; //delete mode,0-delete by card,1-delete by reader [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] byRes1; public NET_DVR_FINGER_PRINT_BYREADER_V50 struByReader; //delete by reader [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FINGER_PRINT_INFO_STATUS_V50 { public uint dwSize; public uint dwCardReaderNo; //card reader no public byte byStatus; //status:0-invalid,1-processing,2-failed,3-success [MarshalAs(UnmanagedType.ByValArray, SizeConst = 63)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CAPTURE_FINGERPRINT_COND { public int dwSize; public byte byFingerPrintPicType; //图片类型:0-无意义 public byte byFingerNo; //手指编号,范围1-10 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 126)] public byte[] byRes; public void init() { byRes = new byte[126]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CAPTURE_FINGERPRINT_CFG { public int dwSize; public int dwFingerPrintDataSize; //指纹数据大小 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_FINGER_PRINT_LEN)] public byte[] byFingerData; //指纹数据内容 public int dwFingerPrintPicSize; //指纹图片大小,等于0时,代表无指纹图片数据 public IntPtr pFingerPrintPicBuffer; //指纹图片缓存 public byte byFingerNo; //手指编号,范围1-10 public byte byFingerPrintQuality; //指纹质量,范围1-100 [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 62)] public byte[] byRes; public void init() { byFingerData = new byte[CHCNetSDK.MAX_FINGER_PRINT_LEN]; byRes = new byte[62]; } } //[StructLayoutAttribute(LayoutKind.Sequential)] //public const int DEL_FINGER_PRINT_MODE_LEN = 588; //联合体大小 //public union NET_DVR_DEL_FINGER_PRINT_MODE //{ // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 588, ArraySubType = UnmanagedType.I1)] // public byte[] uLen; // public NET_DVR_FINGER_PRINT_BYCARD struByCard; //delete by card // public NET_DVR_FINGER_PRINT_BYREADER struByReader; //delete by reader //} //[StructLayoutAttribute(LayoutKind.Sequential)] //public struct NET_DVR_FINGER_PRINT_INFO_CTRL //{ // public uint dwSize; // public byte byMode; //delete mode,0-delete by card,1-delete by reader // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] // public byte[] byRes1; // public NET_DVR_DEL_FINGER_PRINT_MODE struProcessMode; //delete mode // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)] // public byte[] byRes; //} #endregion #region Acs_Face_Param [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FAILED_FACE_INFO { public int dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN)] public byte[] byCardNo; public byte byErrorCode; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 127)] public byte[] byRes; } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FACE_PARAM_CTRL_ByCard { public int dwSize; public byte byMode;//0 del by card,1 del by card reader [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public NET_DVR_FACE_PARAM_BYCARD struProcessMode; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byRes1 = new byte[3]; byRes = new byte[64]; struProcessMode = new NET_DVR_FACE_PARAM_BYCARD(); struProcessMode.Init(); } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FACE_PARAM_CTRL_ByReader { public int dwSize; public byte byMode; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public NET_DVR_FACE_PARAM_BYREADER struProcessMode; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byRes1 = new byte[3]; byRes = new byte[64]; struProcessMode = new NET_DVR_FACE_PARAM_BYREADER(); struProcessMode.Init(); } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FACE_PARAM_BYCARD { [MarshalAs(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)] public byte[] byEnableCardReader; [MarshalAs(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_FACE_NUM, ArraySubType = UnmanagedType.I1)] public byte[] byFaceID; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 42, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public void Init() { byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN]; byEnableCardReader = new byte[CHCNetSDK.MAX_CARD_READER_NUM_512]; byFaceID = new byte[CHCNetSDK.MAX_FACE_NUM]; byRes1 = new byte[42]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_FACE_PARAM_BYREADER { public int dwCardReaderNo; public byte byClearAllCard; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byCardNo; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 548, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byRes1 = new byte[3]; byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN]; byRes = new byte[548]; } } #endregion #region plan configuration [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_TIME_SEGMENT { public NET_DVR_SIMPLE_DAYTIME struBeginTime; //begin time public NET_DVR_SIMPLE_DAYTIME struEndTime; //end time } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_SINGLE_PLAN_SEGMENT { public byte byEnable; //whether to enable, 1-enable, 0-disable public byte byDoorStatus; //door status(control ladder status),0-invaild, 1-always open(free), 2-always close(forbidden), 3-ordinary status(used by door plan) public byte byVerifyMode; //verify method, 0-invaild, 1-swipe card, 2-swipe card +password(used by card verify ) 3-swipe card(used by card verify) 4-swipe card or password(used by card verify) //5-fingerprint, 6-fingerprint and passwd, 7-fingerprint or swipe card, 8-fingerprint and swipe card, 9-fingerprint and passwd and swipe card, //10-face or finger print or swipe card or password,11-face and finger print,12-face and password,13-face and swipe card,14-face,15-employee no and password, //16-finger print or password,17-employee no and finger print,18-employee no and finger print and password, //19-face and finger print and swipe card,20-face and password and finger print,21-employee no and face,22-face or face and swipe card [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public NET_DVR_TIME_SEGMENT struTimeSegment; //time segment parameter public void Init() { byRes = new byte[5]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_WEEK_PLAN_CFG { public uint dwSize; public byte byEnable; //whether to enable, 1-enable, 0-disable [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)] public NET_DVR_SINGLE_PLAN_SEGMENT[] struPlanCfg; //week plan parameter [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; public void Init() { struPlanCfg = new NET_DVR_SINGLE_PLAN_SEGMENT[MAX_DAYS * MAX_TIMESEGMENT_V30]; foreach (NET_DVR_SINGLE_PLAN_SEGMENT singlStruPlanCfg in struPlanCfg) { singlStruPlanCfg.Init(); } byRes1 = new byte[3]; byRes2 = new byte[16]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_HOLIDAY_PLAN_CFG { public uint dwSize; public byte byEnable; //whether to enable, 1-enable, 0-disable [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; public NET_DVR_DATE struBeginDate; //holiday begin date public NET_DVR_DATE struEndDate; //holiday end date [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)] public NET_DVR_SINGLE_PLAN_SEGMENT[] struPlanCfg; //time segment parameter [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] byRes2; public void Init() { struPlanCfg = new NET_DVR_SINGLE_PLAN_SEGMENT[MAX_TIMESEGMENT_V30]; foreach (NET_DVR_SINGLE_PLAN_SEGMENT singlStruPlanCfg in struPlanCfg) { singlStruPlanCfg.Init(); } byRes1 = new byte[3]; byRes2 = new byte[16]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_HOLIDAY_GROUP_CFG { public uint dwSize; public byte byEnable; //whether to enable, 1-enable, 0-disable [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = HOLIDAY_GROUP_NAME_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byGroupName; //holiday group name [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_HOLIDAY_PLAN_NUM, ArraySubType = UnmanagedType.U4)] public uint[] dwHolidayPlanNo; //holiday plan No. fill in from the front side, invalid when meet zero. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; public void Init() { byGroupName = new byte[HOLIDAY_GROUP_NAME_LEN]; dwHolidayPlanNo = new uint[MAX_HOLIDAY_PLAN_NUM]; byRes1 = new byte[3]; byRes2 = new byte[32]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_PLAN_TEMPLATE { public uint dwSize; public byte byEnable; //whether to enable, 1-enable, 0-disable [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)] public byte[] byRes1; [MarshalAs(UnmanagedType.ByValArray, SizeConst = TEMPLATE_NAME_LEN, ArraySubType = UnmanagedType.I1)] public byte[] byTemplateName; //template name public uint dwWeekPlanNo; //week plan no. 0 invalid [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_HOLIDAY_GROUP_NUM, ArraySubType = UnmanagedType.U4)] public uint[] dwHolidayGroupNo; //holiday group. fill in from the front side, invalid when meet zero. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)] public byte[] byRes2; public void Init() { byTemplateName = new byte[TEMPLATE_NAME_LEN]; dwHolidayGroupNo = new uint[MAX_HOLIDAY_GROUP_NUM]; byRes1 = new byte[3]; byRes2 = new byte[32]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_HOLIDAY_PLAN_COND { public uint dwSize; public uint dwHolidayPlanNumber; //Holiday plan number public ushort wLocalControllerID; //On the controller serial number [1, 64] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 106, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byRes = new byte[106]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_WEEK_PLAN_COND { public uint dwSize; public uint dwWeekPlanNumber; //Week plan number public ushort wLocalControllerID; //On the controller serial number [1, 64] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 106, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byRes = new byte[106]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_HOLIDAY_GROUP_COND { public uint dwSize; public uint dwHolidayGroupNumber; //Holiday group number public ushort wLocalControllerID; //On the controller serial number [1, 64] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 106, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byRes = new byte[106]; } } [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_PLAN_TEMPLATE_COND { public uint dwSize; public uint dwPlanTemplateNumber; //Plan template number, starting from 1, the maximum value from the entrance guard capability sets public ushort wLocalControllerID; //On the controller serial number[1,64], 0 is invalid [MarshalAs(UnmanagedType.ByValArray, SizeConst = 106, ArraySubType = UnmanagedType.I1)] public byte[] byRes; public void Init() { byRes = new byte[106]; } } #endregion #region card reader verification mode and door status planning parameters configuration [StructLayout(LayoutKind.Sequential)] public struct NET_DVR_DOOR_STATUS_PLAN { public uint dwSize; public uint dwTemplateNo; // plan template No. 0 means cancel relation,resolve default status(ordinary status) [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] byRes; public void Init() { byRes = new byte[64]; } } [StructLayout(LayoutKind.Sequential)] public struct NET_DVR_CARD_READER_PLAN { public uint dwSize; public uint dwTemplateNo; // plan template No. 0 means cancel relation,resolve default status(swipe card) [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public byte[] byRes; public void Init() { byRes = new byte[64]; } } #endregion #region card number associated with the user information parameter configuration [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_CARD_USER_INFO_CFG { public uint dwSize; [MarshalAs(UnmanagedType.ByValArray, SizeConst = NAME_LEN)] public byte[] byUsername;// user name [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public byte[] byRes2; // byRes2[0]--user number for alarm host } #endregion #region user login managed [StructLayoutAttribute(LayoutKind.Sequential)] public struct NET_DVR_DEVICEINFO_V30 { [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)] public byte[] sSerialNumber; //serial number public byte byAlarmInPortNum; //Number of Alarm input public byte byAlarmOutPortNum; //Number of Alarm Output public byte byDiskNum; //Number of Hard Disk public byte byDVRType; //DVR Type, 1: DVR 2: ATM DVR 3: DVS ...... public byte byChanNum; //Number of Analog Channel public byte byStartChan; //The first Channel No. E.g. DVS- 1, DVR- 1 public byte byAudioChanNum; //Number of Audio Channel public byte byIPChanNum; //Maximum number of IP Channel low public byte byZeroChanNum; //Zero channel encoding number//2010- 01- 16 public byte byMainProto; //Main stream transmission protocol 0- private, 1- rtsp,2-both private and rtsp public byte bySubProto; //Sub stream transmission protocol 0- private, 1- rtsp,2-both private and rtsp public byte bySupport; //Ability, the 'AND' result by bit: 0- not support; 1- support //bySupport & 0x1, smart search //bySupport & 0x2, backup //bySupport & 0x4, get compression configuration ability //bySupport & 0x8, multi network adapter //bySupport & 0x10, support remote SADP //bySupport & 0x20 support Raid card //bySupport & 0x40 support IPSAN directory search public byte bySupport1; //Ability expand, the 'AND' result by bit: 0- not support; 1- support //bySupport1 & 0x1, support snmp v30 //bySupport1& 0x2,support distinguish download and playback //bySupport1 & 0x4, support deployment level //bySupport1 & 0x8, support vca alarm time extension //bySupport1 & 0x10, support muti disks(more than 33) //bySupport1 & 0x20, support rtsp over http //bySupport1 & 0x40, support delay preview //bySuppory1 & 0x80 support NET_DVR_IPPARACFG_V40, in addition support License plate of the new alarm information public byte bySupport2; //Ability expand, the 'AND' result by bit: 0- not support; 1- support //bySupport & 0x1, decoder support get stream by URL //bySupport2 & 0x2, support FTPV40 //bySupport2 & 0x4, support ANR //bySupport2 & 0x20, support get single item of device status //bySupport2 & 0x40, support stream encryt public ushort wDevType; //device type public byte bySupport3; //Support epresent by bit, 0 - not support 1 - support //bySupport3 & 0x1-muti stream support //bySupport3 & 0x8 support use delay preview parameter when delay preview //bySupport3 & 0x10 support the interface of getting alarmhost main status V40 public byte byMultiStreamProto; //support multi stream, represent by bit, 0-not support ;1- support; bit1-stream 3 ;bit2-stream 4, bit7-main stream, bit8-sub stream public byte byStartDChan; //Start digital channel public byte byStartDTalkChan; //Start digital talk channel public byte byHighDChanNum; //Digital channel number high public byte bySupport4; //Support epresent by bit, 0 - not support 1 - support //bySupport4 & 0x4 whether support video wall unified interface // bySupport4 & 0x80 Support device upload center alarm enable public byte byLanguageType; //support language type by bit,0-support,1-not support //byLanguageType 0 -old device //byLanguageType & 0x1 support chinese //byLanguageType & 0x2 support english public byte byVoiceInChanNum; //voice in chan num public byte byStartVoiceInChanNo; //start voice in chan num public byte bySupport5; //0-no support,1-support,bit0-muti stream //bySupport5 &0x01support wEventTypeEx //bySupport5 &0x04support sence expend public byte bySupport6; public byte byMirrorChanNum; //mirror channel num,