-
Notifications
You must be signed in to change notification settings - Fork 1
/
pcounter.proto
75 lines (61 loc) · 1.62 KB
/
pcounter.proto
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
syntax = "proto3";
package pcounter;
option go_package="github.com/synerex/proto_pcounter";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
// People Counter Service message
message PCounter
{ string device_id = 1;
string hostname = 2;
string location = 3;
string timezone = 4;
string mac = 5;
string hardware = 6;
string protocol = 7;
string ip = 8;
string ip_vpn = 9;
google.protobuf.Timestamp ts= 10;
repeated PEvent data = 11; // message has several event data.
}
message PEvent
{
string typ = 1; // one of "counter, fillLevel, dwellTime"
string id = 2;
uint32 seq = 3; // sequence number (onr)
uint32 height = 4;
string dir = 5; // direction
google.protobuf.Timestamp ts= 6;
google.protobuf.Timestamp ts_exit = 7;
uint32 fillLevel = 8;
float dwellTime = 9;
float expDwellTime = 10;
uint32 object_id = 11;
}
message PCounters
{
repeated PCounter pcs = 1; // multiple counter data for fast transfer
}
// Area counter
message ACounter
{
google.protobuf.Timestamp ts = 1;
string areaName = 2;
uint32 areaId = 3;
int32 count = 4; // current people number (reset required)
}
message ACounters
{
repeated ACounter acs = 1; // multiple counter data for fast transfer
uint32 intervalSec = 2; // 0 = raw, other = seconds of interval
}
// retrieve message
message Retrieve
{
google.protobuf.Timestamp from = 1;
google.protobuf.Duration duration = 2;
string query = 3;
oneof result {
PCounters pc_res = 4;
ACounters ac_res = 5;
}
}