From 3b0d871ca1e0f8a2ed823f0696e2d7cf31ed2ebd Mon Sep 17 00:00:00 2001 From: Pavel Boldin Date: Sat, 8 Oct 2022 02:51:42 +0300 Subject: [PATCH] FromRadio: add QueueStatus payload Send amount of available places in the queue as well as last allocation result. Signed-off-by: Pavel Boldin --- mesh.options | 4 ++++ mesh.proto | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/mesh.options b/mesh.options index 59f66bc..35c753b 100644 --- a/mesh.options +++ b/mesh.options @@ -26,6 +26,10 @@ *MeshPacket.hop_limit int_size:8 *MeshPacket.channel int_size:8 +*QueueStatus.res int_size:8 +*QueueStatus.free int_size:8 +*QueueStatus.maxlen int_size:8 + *ToRadio.payload_variant anonymous_oneof:true *FromRadio.payload_variant anonymous_oneof:true diff --git a/mesh.proto b/mesh.proto index 7a20594..735058d 100644 --- a/mesh.proto +++ b/mesh.proto @@ -1192,6 +1192,20 @@ message LogRecord { Level level = 4; } +message QueueStatus { + /* Last attempt to queue status, ErrorCode */ + int32 res = 1; + + /* Free entries in the outgoing queue */ + uint32 free = 2; + + /* Maximum entries in the outgoing queue */ + uint32 maxlen = 3; + + /* What was mesh packet id that generated this response? */ + uint32 mesh_packet_id = 4; +} + /* * Packets from the radio to the phone will appear on the fromRadio characteristic. * It will support READ and NOTIFY. When a new packet arrives the device will BLE notify? @@ -1263,6 +1277,9 @@ message FromRadio { * One packet is sent for each channel */ Channel channel = 10; + + /* Queue status info */ + QueueStatus queueStatus = 11; } }