From 4d9da7a6454bcb1e565aedfb56e9277b58186ea3 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 8 Aug 2024 06:52:25 -0500 Subject: [PATCH] Add client notification fromradio message --- meshtastic/mesh.options | 2 ++ meshtastic/mesh.proto | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 7075e2da..828238e0 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -45,6 +45,8 @@ *FileInfo.file_name max_size:228 +*ClientNotification.message max_size:400 + # MyMessage.name max_size:40 # or fixed_length or fixed_count, or max_count diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index c8bd2eff..5b599cd6 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1508,9 +1508,41 @@ message FromRadio { * File system manifest messages */ FileInfo fileInfo = 15; + + /* + * Notification message to the client + */ + ClientNotification clientNotification = 16; } } +/* + * A notification message from the device to the client + * To be used for important messages that should to be displayed to the user + * in the form of push notifications or validation messages when saving + * invalid configuration. + */ +message ClientNotification { + /* + * The id of the packet we're notifying in response to + */ + optional uint32 reply_id = 1; + + /* + * Seconds since 1970 - or 0 for unknown/unset + */ + fixed32 time = 2; + + /* + * The level type of notification + */ + LogRecord.Level level = 3; + /* + * The message body of the notification + */ + string message = 4; +} + /* * Individual File info for the device */