meshtastic-protobuf/storeforward.proto

196 wiersze
3.2 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;
2022-10-19 07:03:17 +00:00
option go_package = "github.com/meshtastic/go/generated";
2021-11-27 18:03:15 +00:00
2022-02-21 07:48:42 +00:00
/*
* TODO: REPLACE
*/
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 {
2022-02-21 07:48:42 +00:00
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
2022-02-21 07:48:42 +00:00
/*
* TODO: REPLACE
*/
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
*/
2021-12-09 07:14:03 +00:00
uint32 messages_total = 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.
*/
2021-12-09 07:14:03 +00:00
uint32 messages_saved = 2;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Maximum number of messages we will save
*/
2021-12-09 07:14:03 +00:00
uint32 messages_max = 3;
2021-11-27 18:03:15 +00:00
2021-12-03 00:50:12 +00:00
/*
* Router uptime in seconds
*/
2021-12-09 07:14:03 +00:00
uint32 up_time = 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.
*/
2021-12-09 07:14:03 +00:00
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.
*/
2021-12-09 07:14:03 +00:00
uint32 requests_history = 6;
2021-11-29 03:22:43 +00:00
2021-12-03 00:50:12 +00:00
/*
* Is the heartbeat enabled on the server?
*/
2021-12-09 07:14:03 +00:00
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?
*/
2021-12-09 07:14:03 +00:00
uint32 return_max = 8;
2021-11-29 03:22:43 +00:00
2021-12-03 00:50:12 +00:00
/*
* Is the heartbeat enabled on the server?
*/
2021-12-09 07:14:03 +00:00
uint32 return_window = 9;
2021-12-03 00:50:12 +00:00
}
2021-11-27 18:03:15 +00:00
2022-02-21 07:48:42 +00:00
/*
* TODO: REPLACE
*/
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
*/
2021-12-09 07:14:03 +00:00
uint32 history_messages = 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
*/
2021-12-09 07:14:03 +00:00
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
*/
2021-12-09 07:14:03 +00:00
uint32 last_request = 3;
2021-12-03 00:50:12 +00:00
}
2021-11-27 18:03:15 +00:00
2022-02-21 07:48:42 +00:00
/*
* TODO: REPLACE
*/
2021-12-09 01:04:10 +00:00
message Heartbeat {
/*
* Number of that will be sent to the client
*/
2021-12-09 07:14:03 +00:00
uint32 period = 1;
2021-12-09 02:34:08 +00:00
/*
* If set, this is not the primary Store & Forward router on the mesh
*/
2021-12-30 18:12:21 +00:00
uint32 secondary = 2;
2021-12-09 01:04:10 +00:00
}
2021-11-27 18:03:15 +00:00
2022-02-21 07:48:42 +00:00
/*
* TODO: REPLACE
*/
2021-12-03 00:50:12 +00:00
RequestResponse rr = 1;
2021-11-27 18:03:15 +00:00
2022-02-21 07:48:42 +00:00
/*
* TODO: REPLACE
*/
2021-12-03 00:50:12 +00:00
Statistics stats = 2;
2021-11-27 18:03:15 +00:00
2022-02-21 07:48:42 +00:00
/*
* TODO: REPLACE
*/
2021-12-03 00:50:12 +00:00
History history = 3;
2021-11-27 18:03:15 +00:00
2022-02-21 07:48:42 +00:00
/*
* TODO: REPLACE
*/
2021-12-09 01:04:10 +00:00
Heartbeat heartbeat = 4;
2021-12-03 00:50:12 +00:00
}