#ifndef _HIK_NET_SDK_WITH_NVR_H_ #define _HIK_NET_SDK_WITH_NVR_H_ #ifndef LIBRARY_SUPPORT_ONLY_HEIKA #include "hk-net-sdk.h" #if defined(_WIN32) || defined(_WIN64) #if (defined HK_NET_LIBRARY) #define HK_NDSWN_BOOL_API __declspec(dllexport) bool __stdcall #define HK_NDSWN_INT_API __declspec(dllexport) int __stdcall #else #define HK_NDSWN_BOOL_API __declspec(dllimport) bool __stdcall #define HK_NDSWN_INT_API __declspec(dllimport) int __stdcall #endif #define CALLBACK __stdcall #else #define HK_NDSWN_BOOL_API bool #define HK_NDSWN_INT_API int #define CALLBACK #endif #ifdef __cplusplus extern "C" { #endif //总的初始化与反初始化接口,无论设备多少只调用一次 #ifndef _HK_NDSWN_INIT_TYPE #define _HK_NDSWN_INIT_TYPE enum NDSWN_INIT_TYPE{ NDSWN_INIT_MODE_NVR = 0, NDSWN_INIT_MODE_SDK = 1 }; #endif HK_NDSWN_BOOL_API hk_ndswn_init(); HK_NDSWN_BOOL_API hk_ndswn_uninit(); HK_NDSWN_INT_API hk_ndswn_login(NDSWN_INIT_TYPE em_type, const char *pc_ip, unsigned short us_port, const char *pc_username, const char *pc_password); HK_NDSWN_BOOL_API hk_ndswn_logout(int i_user_id); //获取NVR通道列表 HK_NDSWN_BOOL_API hk_ndswn_get_channels_config(int i_user_id, STRU_NDSWN_CHANNEL *pst_ip_channels, unsigned int *pui_cnt); #ifndef _HK_NDSWN_DEVICE_TYPE_ #define _HK_NDSWN_DEVICE_TYPE_ enum EU_NDSWN_DEVICE_TYPE{ NDSWN_DEVICE_TYPE_VI = 1, NDSWN_DEVICE_TYPE_IR = 2, }; #endif HK_NDSWN_BOOL_API hk_ndswn_login_device(int i_user_id, int i_channel, EU_NDSWN_DEVICE_TYPE e_type, const char *pc_ip, unsigned short us_port, const char *pc_username, const char *pc_password); //设置与获取测温规则 HK_NDSWN_BOOL_API hk_ndswn_set_rules(int i_user_id, int i_channel, int i_preset, STRU_NDSWN_RULE *pc_rules, unsigned int ui_lens); HK_NDSWN_BOOL_API hk_ndswn_get_rules(int i_user_id, int i_channel, int i_preset, STRU_NDSWN_RULE *pc_rules, unsigned int *pui_lens); //设置与获取报警规则 HK_NDSWN_BOOL_API hk_ndswn_set_alarms(int i_user_id, int i_channel, int i_preset, STRU_NDSWN_ALARM *pc_alarms, unsigned int ui_lens); HK_NDSWN_BOOL_API hk_ndswn_get_alarms(int i_user_id, int i_channel, int i_preset, STRU_NDSWN_ALARM *pc_alarms, unsigned int *pui_lens); //设置与获取区域报警规则 HK_NDSWN_BOOL_API hk_ndswn_set_diff_alarms(int i_user_id, int i_channel, int i_preset, STRU_NDSWN_DIFF_ALARM *pc_diff_alarms, unsigned int ui_lens); HK_NDSWN_BOOL_API hk_ndswn_get_diff_alarms(int i_user_id, int i_channel, int i_preset, STRU_NDSWN_DIFF_ALARM *pc_diff_alarms, unsigned int *pui_lens); HK_NDSWN_BOOL_API hk_ndswn_set_realtime_temperature_callback(int i_user_id, NDSWN_REALTIME_TEMPERATURE_CB_FUNC p_fun, void *p_user); //开启与关闭测温 HK_NDSWN_BOOL_API hk_ndswn_start_realtime_temperature(int i_user_id); HK_NDSWN_BOOL_API hk_ndswn_stop_realtime_temperature(int i_user_id); //设置布防回调 HK_NDSWN_BOOL_API hk_ndswn_set_temperature_alarm_callback(int i_user_id, NDSWN_REALTIME_TEMPERATURE_ALARM_CB_FUNC p_fun, void *p_user); //开启与关闭布防 HK_NDSWN_BOOL_API hk_ndswn_start_realtime_alarm(int i_user_id); HK_NDSWN_BOOL_API hk_ndswn_stop_realtime_alarm(int i_user_id); //抓图jpg HK_NDSWN_BOOL_API hk_ndswn_capture_jpg(int i_user_id, int i_channel, const char *pc_path); //抓温度图 HK_NDSWN_BOOL_API hk_ndswn_capture_jpg_with_temperature(int i_user_id, int i_channel, const char *pc_path); //预置位操作 HK_NDSWN_BOOL_API hk_ndswn_set_preset(int i_user_id, int i_channel, int i_preset); HK_NDSWN_BOOL_API hk_ndswn_del_preset(int i_user_id, int i_channel, int i_preset); HK_NDSWN_BOOL_API hk_ndswn_clear_preset(int i_user_id, int i_channel); HK_NDSWN_BOOL_API hk_ndswn_goto_preset(int i_user_id, int i_channel, int i_preset); enum NDSWN_PTZ_CONTROL{ NDSWN_PTZ_TILT_UP = 0, //上 NDSWN_PTZ_TILT_DOWN = 1,//下 NDSWN_PTZ_PAN_LEFT = 2,//左 NDSWN_PTZ_PAN_RIGHT = 3,//右 NDSWN_PTZ_UP_LEFT = 4,//左上 NDSWN_PTZ_UP_RIGHT = 5,//右上 NDSWN_PTZ_DOWN_LEFT = 6,//左下 NDSWN_PTZ_DOWN_RIGHT = 7,//右下 NDSWN_PTZ_PAN_AUTO = 8,//左右自动扫描 }; //云台控制 HK_NDSWN_BOOL_API hk_ndswn_ptz_control(int i_user_id, int i_channel, NDSWN_PTZ_CONTROL en_cmd, int i_speed, int i_stop); //调焦- HK_NDSWN_BOOL_API hk_ndswn_zoom_in(int i_user_id, int i_channel, int i_stop); //调焦+ HK_NDSWN_BOOL_API hk_ndswn_zoom_out(int i_user_id, int i_channel, int i_stop); //聚焦- HK_NDSWN_BOOL_API hk_ndswn_focus_near(int i_user_id, int i_channel, int i_stop); //聚焦+ HK_NDSWN_BOOL_API hk_ndswn_focus_far(int i_user_id, int i_channel, int i_stop); //光圈- HK_NDSWN_BOOL_API hk_ndswn_iris_close(int i_user_id, int i_channel, int i_stop); //光圈+ HK_NDSWN_BOOL_API hk_ndswn_iris_open(int i_user_id, int i_channel, int i_stop); //---------------------PlayBack---------------------------- //获取NVR文件列表 HK_NDSWN_BOOL_API hk_ndswn_get_file_list(int i_user_id, unsigned int channel, HK_NVR_FILE_COND st_condtion, HK_NVR_FILE_INFO *pst_file_list, unsigned int *ui_cnt); //文件名回放 HK_NDSWN_BOOL_API hk_ndswn_play_back_by_name(int i_user_id, char *pc_name, int *i_handle); //时间回放 HK_NDSWN_BOOL_API hk_ndswn_play_back_by_time(int i_user_id, unsigned int channel, HK_NVR_FILE_COND st_condition, int *i_handle); //停止 HK_NDSWN_BOOL_API hk_ndswn_play_back_stop(int i_user_id, int i_handle); //回放数据帧回调 HK_NDSWN_BOOL_API hk_ndswn_play_back_set_callback(int i_user_id, PLAY_BACK_VIDEO_CB_FUNC cb_func, void *p_user); //回放控制 //enum{ // PLAYBACK_START = 0,//开始播放 // PLAYBACK_STOP = 1,//停止播放 // PLAYBACK_PAUSE = 2,//暂停播放 // PLAYBACK_RESTART = 3,//恢复播放 // PLAYBACK_FAST = 4,//快放 // PLAYBACK_SLOW = 5,//慢放 // PLAYBACK_NORMAL = 6,//正常速度 //}; HK_NDSWN_BOOL_API hk_ndswn_play_back_control(int i_user_id, unsigned int i_handle, int i_control); #ifdef __cplusplus } #endif #endif #endif