#ifndef DBCONNECTSTRUCT
|
#define DBCONNECTSTRUCT
|
|
|
//#include <QImage>
|
#include <QString>
|
#include <QDateTime>
|
#include <QVector>
|
#include <map>
|
struct Record_Storage_Dev
|
{
|
Record_Storage_Dev()
|
{
|
n_id = 0;
|
str_storage_dev_id = "";
|
str_dev_name = "";
|
n_total_chn = 0;
|
str_all_chn_num = "";
|
str_addr = "";
|
str_longitude = "";
|
str_latitude = "";
|
str_ip = "";
|
n_port = 0;
|
str_username = "";
|
str_password = "";
|
tim_start_time = QDateTime();
|
n_duration = 1;
|
str_brand = "";
|
str_reserved = "";
|
}
|
|
int n_id;//自增id
|
QString str_storage_dev_id;//磁盘阵列id
|
QString str_dev_name;//设备名称
|
int n_total_chn;//该设备的总可用通道
|
QString str_all_chn_num;//每个通道的通道号
|
QString str_addr;//设备地址描述
|
QString str_longitude;//设备地址经度
|
QString str_latitude;//设备地址维度
|
QString str_ip;//ip地址
|
int n_port;//ip端口
|
QString str_username;//设备的用户名
|
QString str_password;//设备的密码
|
QDateTime tim_start_time;//开始下载的文件的时间
|
int n_duration;//每次下载的时间长度,单位:小时
|
QString str_brand;//品牌
|
QString str_reserved;//截图地址
|
};
|
|
struct Record_Cam_Dev
|
{
|
Record_Cam_Dev()
|
{
|
n_id = 0;
|
str_name = "";
|
str_addr = "";
|
str_longitude = "";
|
str_latitude = "";
|
str_cam_dev_id = "";
|
str_ip = "";
|
n_port = 0;
|
str_username = "";
|
str_password = "";
|
str_brand = "";
|
str_reserved = "";
|
}
|
|
int n_id;//自增id
|
QString str_cam_dev_id;//摄像机id
|
QString str_name;//通道对应的摄像机名称
|
QString str_addr;//通道对应的摄像机地址描述
|
QString str_longitude;//通道对应的摄像机地址经度
|
QString str_latitude;//通道对应的摄像机地址维度
|
QString str_ip;//摄像机ip
|
int n_port;//摄像机port
|
QString str_username;//摄像机用户名
|
QString str_password;//摄像机密码
|
QString str_brand;//摄像机品牌
|
QString str_reserved;//预留
|
};
|
|
struct Record_Cam_Chn
|
{
|
|
Record_Cam_Chn()
|
{
|
n_id = 0;
|
str_storage_dev_id = "";
|
n_chn = 0;
|
str_name = "";
|
str_addr = "";
|
str_longitude = "";
|
str_latitude = "";
|
tim_do_time = QDateTime();
|
tim_update_time = QDateTime();
|
// str_cam_dev_id = "";
|
// str_ip = "";
|
// n_port = 0;
|
// str_username = "";
|
// str_password = "";
|
// str_brand = "";
|
str_reserved = "";
|
}
|
|
|
int n_id;//自增id
|
QString str_storage_dev_id;//磁盘阵列id
|
int n_chn;//通道号
|
QString str_name;//通道对应的摄像机名称
|
QString str_addr;//通道对应的摄像机地址描述
|
QString str_longitude;//通道对应的摄像机地址经度
|
QString str_latitude;//通道对应的摄像机地址维度
|
QDateTime tim_do_time;//即将下载的文件的开始时间
|
QDateTime tim_update_time;//记录更新时间
|
// QString str_cam_dev_id;//摄像机id
|
// QString str_ip;//摄像机ip
|
// int n_port;//摄像机port
|
// QString str_username;//摄像机用户名
|
// QString str_password;//摄像机密码
|
// QString str_brand;//摄像机品牌
|
QString str_reserved;//预留
|
};
|
|
struct Record_Load_File_info
|
{
|
|
// Record_Load_File_info()
|
// {
|
// n_id = 0;
|
// str_storage_dev_id = "";
|
// n_chn = 0;
|
// tim_do_time = QDateTime();
|
// b_finish_flag = 0;
|
// str_load_file_path = "";
|
// tim_update_time = QDateTime();
|
// str_reserved = "";
|
// }
|
|
int n_id;//自增id
|
QString str_storage_dev_id;//磁盘阵列id
|
int n_chn;//通道号
|
QDateTime tim_do_time;//正在下载的文件的开始时间
|
int b_finish_flag;//下载完成标志
|
QString str_load_file_path;//下载文件保存路径
|
QDateTime tim_update_time;//记录更新时间
|
QString str_reserved;//预留
|
};
|
|
struct Record_Cut_Video_info
|
{
|
|
// Record_Cut_Video_info()
|
// {
|
// n_id = 0;
|
// str_storage_dev_id = "";
|
// n_chn = 0;
|
// str_src_path = "";
|
// str_dst_path = "";
|
// n_total = 0;
|
// b_finish_flag = 0;
|
// tim_update_time = QDateTime();
|
// str_reserved = "";
|
// }
|
|
int n_id;//自增id
|
QString str_storage_dev_id;//磁盘阵列id
|
int n_chn;//通道号
|
QString str_src_path;//下载文件保存路径
|
QString str_dst_path;//裁剪完的文件保存路径
|
int n_total;//裁剪后的视频总数
|
int b_finish_flag;//下载完成标志
|
QDateTime tim_update_time;//记录更新时间
|
QString str_reserved;//预留
|
};
|
|
struct Record_Sdk_Hdl_info
|
{
|
|
// Record_Sdk_Hdl_info()
|
// {
|
// n_id = 0;
|
// str_storage_dev_id = "";
|
// n_chn = 0;
|
// str_src_path = "";
|
// n_total = 0;
|
// n_pos = 0;
|
// str_reserved = "";
|
// }
|
|
int n_id;//自增id
|
QString str_storage_dev_id;//磁盘阵列id
|
int n_chn;//通道号
|
QString str_src_path;//裁剪后,待sdk处理的文件路径
|
int n_total;//裁剪后的视频总数
|
int n_pos;//处理完的文件的序号
|
QString str_reserved;//预留
|
};
|
|
struct Record_Chn_Sdk
|
{
|
|
Record_Chn_Sdk()
|
{
|
n_id = 0;
|
str_storage_dev_id = "";
|
n_chn = 0;
|
str_sdks = "";
|
str_det_thr = "";
|
str_cmp_thr = "";
|
// str_cam_dev_id = "";
|
str_reserved = "";
|
}
|
|
int n_id;//自增id
|
QString str_storage_dev_id;//磁盘阵列id
|
int n_chn;//通道号
|
QString str_sdks;//该通道要使用的sdk种类,人脸-1,yolo-2,车牌-3,其他-4
|
QString str_det_thr;//该通道要使用的检测阈值,人脸阈值-1,yolo阈值-2,车牌阈值-3,其他阈值-4
|
QString str_cmp_thr;//该通道要使用的比对阈值,人脸阈值-1,yolo阈值-2,车牌阈值-3,其他阈值-4
|
// QString str_cam_dev_id;//摄像机id
|
QString str_reserved;//预留
|
};
|
|
struct Record_Cam_Sdk
|
{
|
|
Record_Cam_Sdk()
|
{
|
n_id = 0;
|
str_cam_dev_id = "";
|
str_sdks = "";
|
str_det_thr = "";
|
str_cmp_thr = "";
|
str_reserved = "";
|
}
|
|
int n_id;//自增id
|
QString str_cam_dev_id;//摄像机id
|
QString str_sdks;//该通道要使用的sdk种类,人脸-1,车牌-2,yolo-3,其他-4
|
QString str_det_thr;//该通道要使用的检测阈值,人脸阈值-1,车牌阈值-2,yolo阈值-3,其他阈值-4
|
QString str_cmp_thr;//该通道要使用的比对阈值,人脸阈值-1,车牌阈值-2,yolo阈值-3,其他阈值-4
|
QString str_reserved;//预留
|
};
|
|
struct Record_Config
|
{
|
Record_Config()
|
{
|
str_alarm_ip = "";
|
n_alarm_port = 0;
|
str_web_pic_ip = "";
|
n_web_pic_port = 0;
|
str_es_pic_ip = "";
|
n_es_pic_port = 0;
|
n_cut_max_duration = 20;
|
n_cut_min_duration = 5;
|
n_dev_type = 0;
|
str_reserved = "";
|
dev_id = "";
|
dev_name= "";
|
}
|
|
QString str_alarm_ip;//报警服务器ip
|
int n_alarm_port;//报警服务器端口
|
QString str_web_pic_ip;//web端图片服务器ip
|
int n_web_pic_port;//web端图片服务器端口
|
QString str_es_pic_ip;//ES端图片服务器ip
|
int n_es_pic_port;//ES端图片服务器端口
|
int n_cut_max_duration;//裁剪视频最长
|
int n_cut_min_duration;//裁剪视频最duan
|
int n_dev_type;//0:no dev; 1:storage; 2:camera
|
QString str_reserved;//预留
|
QString dev_id;
|
QString dev_name;
|
};
|
|
struct LActRuleWeekRecord
|
{
|
LActRuleWeekRecord()
|
{
|
m_strCamId="";
|
m_nSdkType=0;
|
m_nType = 0;
|
m_strBegin = "";
|
m_strEnd = "";
|
}
|
QString m_strCamId;
|
int m_nSdkType;
|
int m_nType; //周几
|
QString m_strBegin;
|
QString m_strEnd;
|
};
|
|
|
struct SdkRule
|
{
|
SdkRule()
|
{
|
nIsRun=0;
|
nSdkType = 0 ;
|
strCamId = "";
|
strAreas = "";
|
strLine = "";
|
strImageUrl = "";
|
nTriggerTolerance = 0;
|
nTriggerDelay=0;
|
nQuality=0;
|
nThreshold=0;
|
nAlarmNumUpperLimit = 0;
|
nAlarmNumLowerLimit = 0;
|
fSensitivity=0;
|
strExAreas="";
|
strLine="";
|
strAddr="";
|
}
|
int nSdkType;
|
QString strCamId;
|
QString strAreas; //监测区域
|
QString strExAreas;
|
QString strLine; //分割线
|
QString strExLine;
|
QString strImageUrl; //划区域的图片路径
|
QString strBroadcast;
|
QString strAddr;
|
int nTriggerTolerance;
|
int nTriggerDelay; //延迟时间(秒)
|
int nQuality;
|
int nThreshold;//阈值
|
float fSensitivity;
|
int nAlarmNumUpperLimit; //报警人数(人员拥挤)
|
int nAlarmNumLowerLimit;
|
int nIsRun;
|
|
std::vector<LActRuleWeekRecord> weekRuleVec;
|
};
|
typedef std::map<int,SdkRule> SdkRuleMap;
|
enum SdkType
|
{
|
SdkTypeStart=0,
|
FaceSdk,
|
CarSdk,
|
YoloSdk, //人体
|
PerimeterSdk,
|
CrowdSdk, //人员拥挤
|
KeepRightSdk,
|
PerHubSdk, //人员异常7
|
PerStaticSdk, //个体静止8
|
SdkTypeEnd
|
|
};
|
|
#endif // DBCONNECTSTRUCT
|