chenke
2017-08-09 2a12817d4ae31a591f788f3fbb82916e385e9e2d
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
#include "ev_proto.h"
#include "face_daemon_proto.h"
#include <netinet/in.h>
 
void EVPHeader::hton()
{
    cmd = htons(cmd);
    size = htonl(size);
}
 
void EVPHeader::ntoh()
{
    cmd = ntohs(cmd);
    size = ntohl(size);
}
 
void EVP_Status::hton()
{
    status = htons(status);
}
 
void EVP_Status::ntoh()
{
    status = ntohs(status);
}
 
void EVP_VariableBuffer::hton()
{
    type = htons(type);
}
 
void EVP_VariableBuffer::ntoh()
{
    type = ntohs(type);
}
 
void FDP_Image::hton()
{
    db_id = htonl(db_id);
    mb_type = htons(mb_type);
    width = htons(width);
    height = htons(height);
    size = htons(size);
}
 
void FDP_Image::ntoh()
{
    db_id = ntohl(db_id);
    mb_type = ntohs(mb_type);
    width = ntohs(width);
    height = ntohs(height);
    size = ntohs(size);
}
 
void FDP_FaceDetectPB::hton()
{
    db_id = htonl(db_id);
    camera_id = htons(camera_id);
}
 
void FDP_FaceDetectPB::ntoh()
{
    db_id = ntohl(db_id);
    camera_id = ntohs(camera_id);
}
 
void FDP_FaceDetectResult::hton()
{
    db_id = htonl(db_id);
    st_id = htonl(st_id);
    confidence = htons(confidence);
    camera_id = htons(camera_id);
    st_track_id = htonl(st_track_id);
}
 
void FDP_FaceDetectResult::ntoh()
{
    db_id = ntohl(db_id);
    st_id = ntohl(st_id);
    confidence = ntohs(confidence);
    camera_id = ntohs(camera_id);
    st_track_id = ntohl(st_track_id);
}