Return unique id for each message

This commit is contained in:
Jeremy Lakeman 2016-08-01 11:40:38 +09:30
parent 9e1b996232
commit c9c2a65a0a

View File

@ -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;
}
}
}