forked from meshtastic/protobufs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
storeforward.proto
195 lines (157 loc) · 3.25 KB
/
storeforward.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
syntax = "proto3";
option java_package = "com.geeksville.mesh";
option java_outer_classname = "StoreAndForwardProtos";
option optimize_for = LITE_RUNTIME;
option go_package = "github.com/meshtastic/gomeshproto";
/*
* TODO: REPLACE
*/
message StoreAndForward {
/*
* 1 - 99 = From Router
* 101 - 199 = From Client
*/
enum RequestResponse {
/*
* Unset/unused
*/
UNSET = 0;
/*
* Router is an in error state.
*/
ROUTER_ERROR = 1;
/*
* Router heartbeat
*/
ROUTER_HEARTBEAT = 2;
/*
* Router has requested the client respond. This can work as a
* "are you there" message.
*/
ROUTER_PING = 3;
/*
* The response to a "Ping"
*/
ROUTER_PONG = 4;
/*
* Router is currently busy. Please try again later.
*/
ROUTER_BUSY = 5;
/*
* Router is responding to a request for history.
*/
ROUTER_HISTORY = 6;
/*
* Client is an in error state.
*/
CLIENT_ERROR = 101;
/*
* Client has requested a replay from the router.
*/
CLIENT_HISTORY = 102;
/*
* Client has requested stats from the router.
*/
CLIENT_STATS = 103;
/*
* Client has requested the router respond. This can work as a
* "are you there" message.
*/
CLIENT_PING = 104;
/*
* The response to a "Ping"
*/
CLIENT_PONG = 105;
/*
* Client has requested that the router abort processing the client's request
*/
CLIENT_ABORT = 106;
}
/*
* TODO: REPLACE
*/
message Statistics {
/*
* Number of messages we have ever seen
*/
uint32 messages_total = 1;
/*
* Number of messages we have currently saved our history.
*/
uint32 messages_saved = 2;
/*
* Maximum number of messages we will save
*/
uint32 messages_max = 3;
/*
* Router uptime in seconds
*/
uint32 up_time = 4;
/*
* Number of times any client sent a request to the S&F.
*/
uint32 requests = 5;
/*
* Number of times the history was requested.
*/
uint32 requests_history = 6;
/*
* Is the heartbeat enabled on the server?
*/
bool heartbeat = 7;
/*
* Is the heartbeat enabled on the server?
*/
uint32 return_max = 8;
/*
* Is the heartbeat enabled on the server?
*/
uint32 return_window = 9;
}
/*
* TODO: REPLACE
*/
message History {
/*
* Number of that will be sent to the client
*/
uint32 history_messages = 1;
/*
* The window of messages that was used to filter the history client requested
*/
uint32 window = 2;
/*
* The window of messages that was used to filter the history client requested
*/
uint32 last_request = 3;
}
/*
* TODO: REPLACE
*/
message Heartbeat {
/*
* Number of that will be sent to the client
*/
uint32 period = 1;
/*
* If set, this is not the primary Store & Forward router on the mesh
*/
uint32 secondary = 2;
}
/*
* TODO: REPLACE
*/
RequestResponse rr = 1;
/*
* TODO: REPLACE
*/
Statistics stats = 2;
/*
* TODO: REPLACE
*/
History history = 3;
/*
* TODO: REPLACE
*/
Heartbeat heartbeat = 4;
}