From 56d3b15ce871d6fdf95f138737c4d6aa5f898452 Mon Sep 17 00:00:00 2001 From: uhuruhashimoto Date: Sun, 5 Mar 2023 22:35:03 -0500 Subject: [PATCH] nbrinfo protobuf --- meshtastic/neighborinfo.options | 4 +++ meshtastic/neighborinfo.proto | 48 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 meshtastic/neighborinfo.options create mode 100644 meshtastic/neighborinfo.proto diff --git a/meshtastic/neighborinfo.options b/meshtastic/neighborinfo.options new file mode 100644 index 0000000..30691ad --- /dev/null +++ b/meshtastic/neighborinfo.options @@ -0,0 +1,4 @@ +# 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 new file mode 100644 index 0000000..0b01521 --- /dev/null +++ b/meshtastic/neighborinfo.proto @@ -0,0 +1,48 @@ +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; + /* + * Time at packet transmission (in millis, Unix epoch) + */ + fixed32 tx_time = 2; + + /* + * 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