From 4aaa9fd28ed0c5bf171f5f968a3f5afc9ee7c8c7 Mon Sep 17 00:00:00 2001 From: uhuruhashimoto Date: Mon, 6 Mar 2023 15:08:24 -0500 Subject: [PATCH] moved nbrinfo into the mesh module --- meshtastic/deviceonly.proto | 1 - meshtastic/mesh.options | 4 ++- meshtastic/mesh.proto | 43 +++++++++++++++++++++++++++ meshtastic/neighborinfo.options | 4 --- meshtastic/neighborinfo.proto | 52 --------------------------------- 5 files changed, 46 insertions(+), 58 deletions(-) delete mode 100644 meshtastic/neighborinfo.options delete mode 100644 meshtastic/neighborinfo.proto diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index c54a2b9..2bab282 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -11,7 +11,6 @@ option swift_prefix = ""; import "meshtastic/channel.proto"; import "meshtastic/localonly.proto"; import "meshtastic/mesh.proto"; -import "meshtastic/neighborinfo.proto"; /* * This message is never sent over the wire, but it is used for serializing DB diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 35c753b..378e4d3 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -47,4 +47,6 @@ *Compressed.data max_size:237 *Waypoint.name max_size:30 -*Waypoint.description max_size:100 \ No newline at end of file +*Waypoint.description max_size:100 + +*NeighborInfo.neighbors max_count:10 \ No newline at end of file diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index d4bcd6b..0b10243 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1366,3 +1366,46 @@ message Compressed { */ bytes data = 2; } + +/* +* Full info on edges for a single node +*/ +message NeighborInfo { + /* + * The node ID of the node sending info on its neighbors + */ + uint32 node_id = 1; + /* + * The node ID of the node sending info on its neighbors + */ + uint32 last_sent_by_id = 2; + /* + * Time at packet transmission (in millis, Unix epoch) + */ + fixed32 tx_time = 3; + + /* + * The list of neighbors + */ + repeated Neighbor neighbors = 4; +} + +/* +* A single edge in the mesh +*/ +message Neighbor { + /* + * Node ID of neighbor + */ + uint32 node_id = 1; + + /* + * SNR of last heard message + */ + float snr = 2; + + /* + * Time of last heard message (in millis, Unix epoch) + */ + fixed32 rx_time = 3; +} diff --git a/meshtastic/neighborinfo.options b/meshtastic/neighborinfo.options deleted file mode 100644 index 30691ad..0000000 --- a/meshtastic/neighborinfo.options +++ /dev/null @@ -1,4 +0,0 @@ -# options for nanopb -# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options - -*NeighborInfo.neighbors max_count:10 \ No newline at end of file diff --git a/meshtastic/neighborinfo.proto b/meshtastic/neighborinfo.proto deleted file mode 100644 index 31c922d..0000000 --- a/meshtastic/neighborinfo.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package meshtastic; - -option java_package = "com.geeksville.mesh"; -option java_outer_classname = "NeighborInfoProtos"; -option go_package = "github.com/meshtastic/go/generated"; -option csharp_namespace = "Meshtastic.Protobufs"; -option swift_prefix = ""; - -/* -* Full info on edges for a single node -*/ -message NeighborInfo { - /* - * The node ID of the node sending info on its neighbors - */ - uint32 node_id = 1; - /* - * The node ID of the node sending info on its neighbors - */ - uint32 last_sent_by_id = 2; - /* - * Time at packet transmission (in millis, Unix epoch) - */ - fixed32 tx_time = 3; - - /* - * The list of neighbors - */ - repeated Neighbor neighbors = 4; -} - -/* -* A single edge in the mesh -*/ -message Neighbor { - /* - * Node ID of neighbor - */ - uint32 node_id = 1; - - /* - * SNR of last heard message - */ - float snr = 2; - - /* - * Time of last heard message (in millis, Unix epoch) - */ - fixed32 rx_time = 3; -} \ No newline at end of file