| | |
| | | #ifndef DBCONNECTSTRUCT |
| | | #define DBCONNECTSTRUCT |
| | | |
| | | //#include <vector> |
| | | |
| | | //#include <QImage> |
| | | #include <QString> |
| | | #include <QDateTime> |
| | | #include <QVector> |
| | | struct Record_Storage_Dev |
| | | { |
| | | Record_Storage_Dev() |
| | | { |
| | | #include <map> |
| | | |
| | | struct Record_Storage_Dev { |
| | | Record_Storage_Dev() { |
| | | n_id = 0; |
| | | str_storage_dev_id = ""; |
| | | str_dev_name = ""; |
| | |
| | | QDateTime tim_start_time;//开始下载的文件的时间 |
| | | int n_duration;//每次下载的时间长度,单位:小时 |
| | | QString str_brand;//品牌 |
| | | QString str_reserved;//预留 |
| | | QString str_reserved;//截图地址 |
| | | }; |
| | | |
| | | struct Record_Cam_Dev |
| | | { |
| | | Record_Cam_Dev() |
| | | { |
| | | struct Record_Cam_Dev { |
| | | Record_Cam_Dev() { |
| | | n_id = 0; |
| | | str_name = ""; |
| | | str_addr = ""; |
| | |
| | | str_password = ""; |
| | | str_brand = ""; |
| | | str_reserved = ""; |
| | | n_type = -1; |
| | | type = -1; |
| | | } |
| | | |
| | | int n_id;//自增id |
| | |
| | | QString str_password;//摄像机密码 |
| | | QString str_brand;//摄像机品牌 |
| | | QString str_reserved;//预留 |
| | | int n_type;//预留 |
| | | int type;// 0 rtsp, 1 gb28181 |
| | | }; |
| | | |
| | | struct Record_Cam_Chn |
| | | { |
| | | struct Record_Cam_Chn { |
| | | |
| | | Record_Cam_Chn() |
| | | { |
| | | Record_Cam_Chn() { |
| | | n_id = 0; |
| | | str_storage_dev_id = ""; |
| | | n_chn = 0; |
| | |
| | | QString str_reserved;//预留 |
| | | }; |
| | | |
| | | struct Record_Load_File_info |
| | | { |
| | | struct Record_Load_File_info { |
| | | |
| | | // Record_Load_File_info() |
| | | // { |
| | |
| | | QString str_reserved;//预留 |
| | | }; |
| | | |
| | | struct Record_Cut_Video_info |
| | | { |
| | | struct Record_Cut_Video_info { |
| | | |
| | | // Record_Cut_Video_info() |
| | | // { |
| | |
| | | QString str_reserved;//预留 |
| | | }; |
| | | |
| | | struct Record_Sdk_Hdl_info |
| | | { |
| | | struct Record_Sdk_Hdl_info { |
| | | |
| | | // Record_Sdk_Hdl_info() |
| | | // { |
| | |
| | | QString str_reserved;//预留 |
| | | }; |
| | | |
| | | struct Record_Chn_Sdk |
| | | { |
| | | struct Record_Chn_Sdk { |
| | | |
| | | Record_Chn_Sdk() |
| | | { |
| | | Record_Chn_Sdk() { |
| | | n_id = 0; |
| | | str_storage_dev_id = ""; |
| | | n_chn = 0; |
| | |
| | | QString str_reserved;//预留 |
| | | }; |
| | | |
| | | struct Record_Cam_Sdk |
| | | { |
| | | struct Record_Cam_Sdk { |
| | | |
| | | Record_Cam_Sdk() |
| | | { |
| | | Record_Cam_Sdk() { |
| | | n_id = 0; |
| | | str_cam_dev_id = ""; |
| | | str_sdks = ""; |
| | |
| | | QString str_reserved;//预留 |
| | | }; |
| | | |
| | | struct Record_Config |
| | | { |
| | | Record_Config() |
| | | { |
| | | 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 = 0; |
| | | n_cut_max_duration = 20; |
| | | n_cut_min_duration = 5; |
| | | n_dev_type = 0; |
| | | str_reserved = ""; |
| | | dev_id = ""; |
| | | dev_name= ""; |
| | | dev_name = ""; |
| | | } |
| | | |
| | | QString str_alarm_ip;//报警服务器ip |
| | |
| | | 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_nCamId=0; |
| | | struct LActRuleWeekRecord { |
| | | LActRuleWeekRecord() { |
| | | m_strCamId = ""; |
| | | m_nSdkType = 0; |
| | | m_nType = 0; |
| | | m_strBegin = ""; |
| | | m_strEnd = ""; |
| | | } |
| | | int m_nCamId; |
| | | |
| | | QString m_strCamId; |
| | | int m_nSdkType; |
| | | int m_nType; //周几 |
| | | QString m_strBegin; |
| | | QString m_strEnd; |
| | | }; |
| | | struct ActRule |
| | | { |
| | | ActRule() |
| | | { |
| | | nCamId = 0; |
| | | |
| | | |
| | | struct SdkRule { |
| | | SdkRule() { |
| | | nIsRun = 0; |
| | | nSdkType = 0; |
| | | strCamId = ""; |
| | | strAreas = ""; |
| | | strLine = ""; |
| | | strImageUrl = ""; |
| | | nTriggertolerance = 0; |
| | | nTriggerDelay=0; |
| | | fSensitivity = 0.5; |
| | | nAlarmPeopleNum = 0; |
| | | strExAreas=""; |
| | | strLine=""; |
| | | nTriggerTolerance = 0; |
| | | nTriggerDelay = 0; |
| | | nQuality = 0; |
| | | nThreshold = 0; |
| | | nAlarmNumUpperLimit = 0; |
| | | nAlarmNumLowerLimit = 0; |
| | | fSensitivity = 0; |
| | | strExAreas = ""; |
| | | strLine = ""; |
| | | strAddr = ""; |
| | | } |
| | | int nCamId; |
| | | |
| | | int nSdkType; |
| | | QString strCamId; |
| | | QString strAreas; //监测区域 |
| | | QString strExAreas; |
| | | QString strLine; //分割线 |
| | | QString strExLine; |
| | | QString strImageUrl; //划区域的图片路径 |
| | | int nTriggertolerance; |
| | | QString strBroadcast; |
| | | QString strAddr; |
| | | int nTriggerTolerance; |
| | | int nTriggerDelay; //延迟时间(秒) |
| | | float fSensitivity;//灵敏度 |
| | | int nAlarmPeopleNum; //报警人数(人员拥挤) |
| | | }; |
| | | struct RuleCfg |
| | | { |
| | | int nQuality; |
| | | int nThreshold;//阈值 |
| | | float fSensitivity; |
| | | int nAlarmNumUpperLimit; //报警人数(人员拥挤) |
| | | int nAlarmNumLowerLimit; |
| | | int nIsRun; |
| | | |
| | | QVector<LActRuleWeekRecord> weekRuleVec; |
| | | ActRule actRule; |
| | | std::string strCamId; |
| | | std::string strRtsp; |
| | | std::string strAdrr; |
| | | 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 |