Skip to content

Commit e2c0831

Browse files
authored
Add transport mechanism in MeshPacket (#748)
1 parent 13d8946 commit e2c0831

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

meshtastic/mesh.proto

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,51 @@ message MeshPacket {
12721272
DELAYED_DIRECT = 2;
12731273
}
12741274

1275+
/*
1276+
* Enum to identify which transport mechanism this packet arrived over
1277+
*/
1278+
enum TransportMechanism {
1279+
/*
1280+
* The default case is that the node generated a packet itself
1281+
*/
1282+
TRANSPORT_INTERNAL = 0;
1283+
1284+
/*
1285+
* Arrived via the primary LoRa radio
1286+
*/
1287+
TRANSPORT_LORA = 1;
1288+
1289+
/*
1290+
* Arrived via a secondary LoRa radio
1291+
*/
1292+
TRANSPORT_LORA_ALT1 = 2;
1293+
1294+
/*
1295+
* Arrived via a tertiary LoRa radio
1296+
*/
1297+
TRANSPORT_LORA_ALT2 = 3;
1298+
1299+
/*
1300+
* Arrived via a quaternary LoRa radio
1301+
*/
1302+
TRANSPORT_LORA_ALT3 = 4;
1303+
1304+
/*
1305+
* Arrived via an MQTT connection
1306+
*/
1307+
TRANSPORT_MQTT = 5;
1308+
1309+
/*
1310+
* Arrived via Multicast UDP
1311+
*/
1312+
TRANSPORT_MULTICAST_UDP = 6;
1313+
1314+
/*
1315+
* Arrived via API connection
1316+
*/
1317+
TRANSPORT_API = 7;
1318+
}
1319+
12751320
/*
12761321
* The sending node number.
12771322
* Note: Our crypto implementation uses this field as well.
@@ -1419,6 +1464,11 @@ message MeshPacket {
14191464
* Set by the firmware internally, clients are not supposed to set this.
14201465
*/
14211466
uint32 tx_after = 20;
1467+
1468+
/*
1469+
* Indicates which transport mechanism this packet arrived over
1470+
*/
1471+
TransportMechanism transport_mechanism = 21;
14221472
}
14231473

14241474
/*

0 commit comments

Comments
 (0)