diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-07-16 17:24:19 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-07-16 17:24:19 +1200 |
commit | d8da0a28c50993e275b5ce9028d9e21ab23944aa (patch) | |
tree | 53f3409ec40f9d4502ee0721d2ed27c66401c251 /src/org/traccar/protocol/T800xProtocol.java | |
parent | 40bd91fd8a798c33212150afdccf95e5f5ea52c5 (diff) | |
download | trackermap-server-d8da0a28c50993e275b5ce9028d9e21ab23944aa.tar.gz trackermap-server-d8da0a28c50993e275b5ce9028d9e21ab23944aa.tar.bz2 trackermap-server-d8da0a28c50993e275b5ce9028d9e21ab23944aa.zip |
Implement T800X custom commands
Diffstat (limited to 'src/org/traccar/protocol/T800xProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/T800xProtocol.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/T800xProtocol.java b/src/org/traccar/protocol/T800xProtocol.java index f98dfc943..05650124c 100644 --- a/src/org/traccar/protocol/T800xProtocol.java +++ b/src/org/traccar/protocol/T800xProtocol.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder; import org.traccar.BaseProtocol; import org.traccar.TrackerServer; +import org.traccar.model.Command; import java.util.List; @@ -27,6 +28,8 @@ public class T800xProtocol extends BaseProtocol { public T800xProtocol() { super("t800x"); + setSupportedCommands( + Command.TYPE_CUSTOM); } @Override @@ -35,6 +38,7 @@ public class T800xProtocol extends BaseProtocol { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 3, 2, -5, 0)); + pipeline.addLast("objectEncoder", new T800xProtocolEncoder()); pipeline.addLast("objectDecoder", new T800xProtocolDecoder(T800xProtocol.this)); } }); |