Set original hop limit in header flags

This commit is contained in:
GUVWAF
2023-10-13 21:00:12 +02:00
parent 3776064b80
commit 44dc270c8a
14 changed files with 77 additions and 78 deletions

View File

@@ -563,12 +563,13 @@ typedef struct _meshtastic_MeshPacket {
int32_t rx_rssi;
/* Describe if this message is delayed */
meshtastic_MeshPacket_Delayed delayed;
/* Node number of the node that should be used as the next hop in routing.
Only the last byte is sent in the packet header. */
uint32_t next_hop;
/* Node number of the node that is currently relaying this packet.
Only the last byte is sent in the packet header. */
uint32_t current_relayer;
/* Last byte of the node number of the node that should be used as the next hop in routing. */
uint8_t next_hop;
/* Last byte of the node number of the node that will relay/relayed this packet. */
uint8_t relay_node;
/* The hop limit setting of the original transmitter.
Useful to determine the amount of hops a packet traveled upon reception, which is this value minus the `hop_limit` with which it arrived. */
uint32_t original_hop_limit;
} meshtastic_MeshPacket;
/* The bluetooth to device link:
@@ -864,7 +865,7 @@ extern "C" {
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
#define meshtastic_Waypoint_init_default {0, 0, 0, 0, 0, "", "", 0}
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0}
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, 0}
#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0}
#define meshtastic_MyNodeInfo_init_default {0, 0, 0}
#define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN}
@@ -882,7 +883,7 @@ extern "C" {
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
#define meshtastic_Waypoint_init_zero {0, 0, 0, 0, 0, "", "", 0}
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0}
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, 0}
#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0}
#define meshtastic_MyNodeInfo_init_zero {0, 0, 0}
#define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN}
@@ -961,7 +962,8 @@ extern "C" {
#define meshtastic_MeshPacket_rx_rssi_tag 12
#define meshtastic_MeshPacket_delayed_tag 13
#define meshtastic_MeshPacket_next_hop_tag 14
#define meshtastic_MeshPacket_current_relayer_tag 15
#define meshtastic_MeshPacket_relay_node_tag 15
#define meshtastic_MeshPacket_original_hop_limit_tag 16
#define meshtastic_NodeInfo_num_tag 1
#define meshtastic_NodeInfo_user_tag 2
#define meshtastic_NodeInfo_position_tag 3
@@ -1118,7 +1120,8 @@ X(a, STATIC, SINGULAR, UENUM, priority, 11) \
X(a, STATIC, SINGULAR, INT32, rx_rssi, 12) \
X(a, STATIC, SINGULAR, UENUM, delayed, 13) \
X(a, STATIC, SINGULAR, UINT32, next_hop, 14) \
X(a, STATIC, SINGULAR, UINT32, current_relayer, 15)
X(a, STATIC, SINGULAR, UINT32, relay_node, 15) \
X(a, STATIC, SINGULAR, UINT32, original_hop_limit, 16)
#define meshtastic_MeshPacket_CALLBACK NULL
#define meshtastic_MeshPacket_DEFAULT NULL
#define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data
@@ -1283,7 +1286,7 @@ extern const pb_msgdesc_t meshtastic_DeviceMetadata_msg;
#define meshtastic_DeviceMetadata_size 46
#define meshtastic_FromRadio_size 510
#define meshtastic_LogRecord_size 81
#define meshtastic_MeshPacket_size 333
#define meshtastic_MeshPacket_size 334
#define meshtastic_MqttClientProxyMessage_size 501
#define meshtastic_MyNodeInfo_size 18
#define meshtastic_NeighborInfo_size 268