meshtastic-protobuf/storeforward.proto

177 wiersze
3.0 KiB
Protocol Buffer
Czysty Zwykły widok Historia

2021-11-27 18:03:15 +00:00
syntax = "proto3";
option java_package = "com.geeksville.mesh";
2021-12-07 04:14:24 +00:00
option java_outer_classname = "StoreAndForwardProtos";
2021-11-27 18:03:15 +00:00
option optimize_for = LITE_RUNTIME;
option go_package = "github.com/meshtastic/gomeshproto";
2021-12-03 00:50:12 +00:00
message StoreAndForward {
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* 1 - 99 = From Router
* 101 - 199 = From Client
*/
enum RequestResponse {
2021-11-27 18:03:15 +00:00
/*
2021-12-03 00:50:12 +00:00
* Unset/unused
2021-11-27 18:03:15 +00:00
*/
2021-12-03 00:50:12 +00:00
UNSET = 0;
2021-11-27 18:03:15 +00:00
2021-12-09 01:04:10 +00:00
/*
* Router is an in error state.
*/
2021-12-03 00:50:12 +00:00
ROUTER_ERROR = 1;
2021-11-27 18:03:15 +00:00
2021-12-09 01:04:10 +00:00
/*
* Router heartbeat
*/
2021-12-03 00:50:12 +00:00
ROUTER_HEARTBEAT = 2;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Router has requested the client respond. This can work as a
* "are you there" message.
*/
ROUTER_PING = 3;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* The response to a "Ping"
*/
ROUTER_PONG = 4;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Router is currently busy. Please try again later.
*/
ROUTER_BUSY = 5;
2021-11-27 18:03:15 +00:00
2021-12-09 01:04:10 +00:00
/*
* Router is responding to a request for history.
*/
ROUTER_HISTORY = 6;
/*
* Client is an in error state.
*/
2021-12-03 00:50:12 +00:00
CLIENT_ERROR = 101;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Client has requested a replay from the router.
*/
CLIENT_HISTORY = 102;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Client has requested stats from the router.
*/
CLIENT_STATS = 103;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Client has requested the router respond. This can work as a
* "are you there" message.
*/
CLIENT_PING = 104;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* The response to a "Ping"
*/
CLIENT_PONG = 105;
2021-11-27 18:03:15 +00:00
2021-12-09 01:04:10 +00:00
/*
* Client has requested that the router abort processing the client's request
*/
CLIENT_ABORT = 106;
2021-12-03 00:50:12 +00:00
}
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
message Statistics {
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Number of messages we have ever seen
*/
uint32 MessagesTotal = 1;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Number of messages we have currently saved our history.
*/
uint32 MessagesSaved = 2;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Maximum number of messages we will save
*/
uint32 MessagesMax = 3;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Router uptime in seconds
*/
uint32 UpTime = 4;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Number of times any client sent a request to the S&F.
*/
uint32 Requests = 5;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Number of times the history was requested.
*/
uint32 RequestsHistory = 6;
2021-11-29 03:22:43 +00:00
2021-12-03 00:50:12 +00:00
/*
* Is the heartbeat enabled on the server?
*/
bool Heartbeat = 7;
2021-11-29 03:22:43 +00:00
2021-12-03 00:50:12 +00:00
/*
* Is the heartbeat enabled on the server?
*/
uint32 ReturnMax = 8;
2021-11-29 03:22:43 +00:00
2021-12-03 00:50:12 +00:00
/*
* Is the heartbeat enabled on the server?
*/
uint32 ReturnWindow = 9;
2021-11-29 03:22:43 +00:00
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
}
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
message History {
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Number of that will be sent to the client
*/
uint32 HistoryMessages = 1;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* The window of messages that was used to filter the history client requested
*/
uint32 Window = 2;
2021-11-27 18:03:15 +00:00
2021-12-09 01:04:10 +00:00
/*
* The window of messages that was used to filter the history client requested
*/
uint32 LastRequest = 3;
2021-12-03 00:50:12 +00:00
}
2021-11-27 18:03:15 +00:00
2021-12-09 01:04:10 +00:00
message Heartbeat {
/*
* Number of that will be sent to the client
*/
2021-12-09 02:34:08 +00:00
uint32 Period = 1;
/*
* If set, this is not the primary Store & Forward router on the mesh
*/
uint32 Secondary = 1;
2021-12-09 01:04:10 +00:00
}
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
RequestResponse rr = 1;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
Statistics stats = 2;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
History history = 3;
2021-11-27 18:03:15 +00:00
2021-12-09 01:04:10 +00:00
Heartbeat heartbeat = 4;
2021-12-03 00:50:12 +00:00
}