diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-09-02 02:48:59 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-09-02 10:49:39 +1200 |
commit | 5cbf84b30f9b55f7c199289782b28ac71e0b8776 (patch) | |
tree | b650948136349577b894222dedb17cf0fcb1c676 /src/org/traccar/protocol/RuptelaProtocolDecoder.java | |
parent | bfcf42c5d55083bec83451400a432c7004f063c5 (diff) | |
download | trackermap-server-5cbf84b30f9b55f7c199289782b28ac71e0b8776.tar.gz trackermap-server-5cbf84b30f9b55f7c199289782b28ac71e0b8776.tar.bz2 trackermap-server-5cbf84b30f9b55f7c199289782b28ac71e0b8776.zip |
Implement custom command for Ruptela
Diffstat (limited to 'src/org/traccar/protocol/RuptelaProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/RuptelaProtocolDecoder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/org/traccar/protocol/RuptelaProtocolDecoder.java index a9cea8c64..224c027f3 100644 --- a/src/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -34,7 +34,8 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { super(protocol); } - private static final int COMMAND_RECORDS = 0x01; + public static final int MSG_RECORDS = 1; + public static final int MSG_SMS_VIA_GPRS = 108; @Override protected Object decode( @@ -52,7 +53,7 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { int type = buf.readUnsignedByte(); - if (type == COMMAND_RECORDS) { + if (type == MSG_RECORDS) { List<Position> positions = new LinkedList<>(); buf.readUnsignedByte(); // records left |