mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-31 08:25:22 +00:00
Return unique id for each message
This commit is contained in:
parent
9e1b996232
commit
c9c2a65a0a
@ -80,4 +80,14 @@ public class MeshMSMessage {
|
||||
this.ackOffset = ack_offset;
|
||||
}
|
||||
|
||||
public long getId(){
|
||||
switch (type){
|
||||
default:
|
||||
return offset;
|
||||
case MESSAGE_RECEIVED:
|
||||
return -offset;
|
||||
case ACK_RECEIVED:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user