From d330393bcae1a3b6a6ea2210dd1646ffe056222b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 8 Mar 2014 13:46:32 +1300 Subject: Handle Teltonika 12 codec --- src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/org') 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 parseLocation(Channel channel, ChannelBuffer buf) { List positions = new LinkedList(); @@ -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++) { -- cgit v1.2.3