aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-03-08 13:46:32 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-03-08 13:46:32 +1300
commitd330393bcae1a3b6a6ea2210dd1646ffe056222b (patch)
tree8d4179fdb18280ff367e9199ca897aaef64464f8 /src
parentf9187c8d4c8b9e147fcfbdf6ffaddbdfccddc88d (diff)
downloadtrackermap-server-d330393bcae1a3b6a6ea2210dd1646ffe056222b.tar.gz
trackermap-server-d330393bcae1a3b6a6ea2210dd1646ffe056222b.tar.bz2
trackermap-server-d330393bcae1a3b6a6ea2210dd1646ffe056222b.zip
Handle Teltonika 12 codec
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index 3874828ba..876a1e4ff 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -63,6 +63,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
private static final int CODEC_GH3000 = 0x07;
private static final int CODEC_FM4X00 = 0x08;
+ private static final int CODEC_12 = 0x0C;
private List<Position> parseLocation(Channel channel, ChannelBuffer buf) {
List<Position> positions = new LinkedList<Position>();
@@ -70,6 +71,12 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
buf.skipBytes(4); // marker
buf.readUnsignedInt(); // data length
int codec = buf.readUnsignedByte(); // codec
+
+ if (codec == CODEC_12) {
+ // TODO: decode serial port data
+ return null;
+ }
+
int count = buf.readUnsignedByte();
for (int i = 0; i < count; i++) {