派生自 development/c++

zhangjixing
2019-01-18 9f08028f23d9e5cbfa159bec1e07d63b141a6809
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef DISPATHDATATYPE_HPP
#define DISPATHDATATYPE_HPP
 
#include <string>
#include <QVector>
#include <QDateTime>
 
typedef struct {
    int Year;
    int Month;
    int Day;
    int Hour;
    int Minute;
    int Second;
} TimeSt, *pTimeSt;
 
typedef struct {
    std::string strDevID;
    int nChannelID;
    TimeSt startTime;
    TimeSt endTime;
    std::string srcPath;
} ChannelLoadFileManage, *pChannelLoadFileManage;
 
 
//typedef struct
//{
//    int nChn;//通道号
//    QDateTime tCurrentTime;//正在处理的文件开始时间
//    bool bFinishFlag;//完成标志
//}ChnFinishFlag;
 
//typedef struct
//{
//    int nDuration;//每次下载的时长,单位小时
//    int nTotalChn;//总通道数
//    QVector<ChnFinishFlag> vChnInfo;//每个通道的完成信息
//}DevChnInfo;
 
typedef struct {
    std::string src_path;
} getCutFileManage, *pgetCutFileManage;
 
typedef struct {
    std::string src_path;
    std::string dst_path;
    int total;
} finishCutFileManage, *pfinishCutFileManage;
 
typedef struct {
    std::string src_path;
    std::string en_sdk;
    int pos;
    int total;
    std::string str_addr;
    std::string str_det_thr;
    std::string str_cmp_thr;
    std::string strDevID;
    int nChannelID;
} getsdkHdlManage, *pgetsdkHdlManage;
 
typedef struct {
    std::string src_path;
    int pos;
} finishSdkHdlManage, *pfinishSdkHdlManage;
 
 
static std::vector<int> chnString2Vec(std::string str_list) {
    std::vector<int> result;
    char *property_list = const_cast<char *>(str_list.c_str());
    const char *c_Analyse = ",";
    char *t_property;
 
    char *t_save = NULL;
    t_property = strtok_r(property_list, c_Analyse, &t_save);
 
    while (t_property) {
        std::string str_pro(t_property);
 
        result.push_back(atoi(str_pro.c_str()));
 
        t_property = strtok_r(t_save, c_Analyse, &t_save);
 
    }
    return result;
}
 
 
#endif // DISPATHDATATYPE_HPP