2021-11-27 18:03:15 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2023-01-17 11:03:10 +00:00
|
|
|
package meshtastic;
|
|
|
|
|
2022-12-06 16:14:04 +00:00
|
|
|
option csharp_namespace = "Meshtastic.Protobufs";
|
2023-05-20 09:29:34 +00:00
|
|
|
option go_package = "github.com/meshtastic/go/generated";
|
|
|
|
option java_outer_classname = "StoreAndForwardProtos";
|
|
|
|
option java_package = "com.geeksville.mesh";
|
2023-01-21 15:26:47 +00:00
|
|
|
option swift_prefix = "";
|
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 {
|
|
|
|
/*
|
2022-12-21 11:49:16 +00:00
|
|
|
* 001 - 063 = From Router
|
|
|
|
* 064 - 127 = From Client
|
2021-12-03 00:50:12 +00:00
|
|
|
*/
|
|
|
|
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;
|
|
|
|
|
2022-12-21 14:12:13 +00:00
|
|
|
/*
|
|
|
|
* Router is responding to a request for stats.
|
|
|
|
*/
|
|
|
|
ROUTER_STATS = 7;
|
|
|
|
|
2024-02-11 13:18:38 +00:00
|
|
|
/*
|
|
|
|
* Router sends a text message from its history that was a direct message.
|
|
|
|
*/
|
|
|
|
ROUTER_TEXT_DIRECT = 8;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Router sends a text message from its history that was a broadcast.
|
|
|
|
*/
|
|
|
|
ROUTER_TEXT_BROADCAST = 9;
|
|
|
|
|
2021-12-09 01:04:10 +00:00
|
|
|
/*
|
|
|
|
* Client is an in error state.
|
|
|
|
*/
|
2022-12-21 11:49:16 +00:00
|
|
|
CLIENT_ERROR = 64;
|
2021-11-27 18:03:15 +00:00
|
|
|
|
2021-12-03 00:50:12 +00:00
|
|
|
/*
|
|
|
|
* Client has requested a replay from the router.
|
|
|
|
*/
|
2022-12-21 11:49:16 +00:00
|
|
|
CLIENT_HISTORY = 65;
|
2021-11-27 18:03:15 +00:00
|
|
|
|
2021-12-03 00:50:12 +00:00
|
|
|
/*
|
|
|
|
* Client has requested stats from the router.
|
|
|
|
*/
|
2022-12-21 11:49:16 +00:00
|
|
|
CLIENT_STATS = 66;
|
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.
|
|
|
|
*/
|
2022-12-21 11:49:16 +00:00
|
|
|
CLIENT_PING = 67;
|
2021-11-27 18:03:15 +00:00
|
|
|
|
2021-12-03 00:50:12 +00:00
|
|
|
/*
|
|
|
|
* The response to a "Ping"
|
|
|
|
*/
|
2022-12-21 11:49:16 +00:00
|
|
|
CLIENT_PONG = 68;
|
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 {
|
|
|
|
/*
|
|
|
|
* 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
|
|
|
/*
|
2024-02-10 11:38:35 +00:00
|
|
|
* Maximum number of messages the server will return.
|
2021-12-03 00:50:12 +00:00
|
|
|
*/
|
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
|
|
|
/*
|
2024-02-10 11:38:35 +00:00
|
|
|
* Maximum history window in minutes the server will return messages from.
|
2021-12-03 00:50:12 +00:00
|
|
|
*/
|
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 {
|
|
|
|
/*
|
|
|
|
* 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
|
|
|
/*
|
2024-02-10 11:38:35 +00:00
|
|
|
* Index in the packet history of the last message sent in a previous request to the server.
|
|
|
|
* Will be sent to the client before sending the history and can be set in a subsequent request to avoid getting packets the server already sent to the client.
|
2021-12-09 01:04:10 +00:00
|
|
|
*/
|
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 {
|
|
|
|
/*
|
2024-02-10 11:38:35 +00:00
|
|
|
* Period in seconds that the heartbeat is sent out that will be sent to the client
|
2021-12-09 01:04:10 +00:00
|
|
|
*/
|
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
|
|
|
|
*/
|
2022-12-21 11:49:16 +00:00
|
|
|
oneof variant {
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
Statistics stats = 2;
|
2021-11-27 18:03:15 +00:00
|
|
|
|
2022-12-21 11:49:16 +00:00
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
History history = 3;
|
2021-11-27 18:03:15 +00:00
|
|
|
|
2022-12-21 11:49:16 +00:00
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
Heartbeat heartbeat = 4;
|
2021-12-09 01:04:10 +00:00
|
|
|
|
2022-12-21 11:49:16 +00:00
|
|
|
/*
|
2024-02-10 11:38:35 +00:00
|
|
|
* Text from history message.
|
2022-12-21 11:49:16 +00:00
|
|
|
*/
|
2024-02-10 11:38:35 +00:00
|
|
|
bytes text = 5;
|
2022-12-21 11:49:16 +00:00
|
|
|
}
|
2024-03-29 09:23:22 +00:00
|
|
|
}
|