Add transport mechanism in MeshPacket (#748)

This commit is contained in:
Jonathan Bennett 2025-08-09 08:53:48 -05:00 committed by GitHub
parent 13d8946c6d
commit e2c0831aa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1272,6 +1272,51 @@ message MeshPacket {
DELAYED_DIRECT = 2;
}
/*
* Enum to identify which transport mechanism this packet arrived over
*/
enum TransportMechanism {
/*
* The default case is that the node generated a packet itself
*/
TRANSPORT_INTERNAL = 0;
/*
* Arrived via the primary LoRa radio
*/
TRANSPORT_LORA = 1;
/*
* Arrived via a secondary LoRa radio
*/
TRANSPORT_LORA_ALT1 = 2;
/*
* Arrived via a tertiary LoRa radio
*/
TRANSPORT_LORA_ALT2 = 3;
/*
* Arrived via a quaternary LoRa radio
*/
TRANSPORT_LORA_ALT3 = 4;
/*
* Arrived via an MQTT connection
*/
TRANSPORT_MQTT = 5;
/*
* Arrived via Multicast UDP
*/
TRANSPORT_MULTICAST_UDP = 6;
/*
* Arrived via API connection
*/
TRANSPORT_API = 7;
}
/*
* The sending node number.
* Note: Our crypto implementation uses this field as well.
@ -1419,6 +1464,11 @@ message MeshPacket {
* Set by the firmware internally, clients are not supposed to set this.
*/
uint32 tx_after = 20;
/*
* Indicates which transport mechanism this packet arrived over
*/
TransportMechanism transport_mechanism = 21;
}
/*