diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-12-07 15:01:12 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-07 15:01:12 +1300 |
commit | 4d903ef0ef21cd6575ed9a55426b18f6b94e63ef (patch) | |
tree | d3467073a73fec96cccae3b1c864a6adcf23e669 /src/org/traccar/protocol/Tk103Protocol.java | |
parent | e3f7a20c29a38dae64ffe0ab7724cc9df29a03f1 (diff) | |
parent | b9c78ab2c6ac9f2e7598743114864aae04404ac1 (diff) | |
download | trackermap-server-4d903ef0ef21cd6575ed9a55426b18f6b94e63ef.tar.gz trackermap-server-4d903ef0ef21cd6575ed9a55426b18f6b94e63ef.tar.bz2 trackermap-server-4d903ef0ef21cd6575ed9a55426b18f6b94e63ef.zip |
Merge pull request #3643 from ValeraVi/t580w
T580w protocol implementation
Diffstat (limited to 'src/org/traccar/protocol/Tk103Protocol.java')
-rw-r--r-- | src/org/traccar/protocol/Tk103Protocol.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Tk103Protocol.java b/src/org/traccar/protocol/Tk103Protocol.java index 07a68e2d8..6ef9c0a56 100644 --- a/src/org/traccar/protocol/Tk103Protocol.java +++ b/src/org/traccar/protocol/Tk103Protocol.java @@ -22,7 +22,6 @@ import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.handler.codec.string.StringDecoder; import org.jboss.netty.handler.codec.string.StringEncoder; import org.traccar.BaseProtocol; -import org.traccar.CharacterDelimiterFrameDecoder; import org.traccar.TrackerServer; import org.traccar.model.Command; @@ -33,6 +32,14 @@ public class Tk103Protocol extends BaseProtocol { public Tk103Protocol() { super("tk103"); setSupportedDataCommands( + Command.TYPE_CUSTOM, + Command.TYPE_GET_DEVICE_STATUS, + Command.TYPE_IDENTIFICATION, + Command.TYPE_MODE_DEEP_SLEEP, + Command.TYPE_MODE_POWER_SAVING, + Command.TYPE_ALARM_SOS, + Command.TYPE_SET_CONNECTION, + Command.TYPE_SOS_NUMBER, Command.TYPE_POSITION_SINGLE, Command.TYPE_POSITION_PERIODIC, Command.TYPE_POSITION_STOP, @@ -48,7 +55,7 @@ public class Tk103Protocol extends BaseProtocol { serverList.add(new TrackerServer(new ServerBootstrap(), getName()) { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { - pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ')')); + pipeline.addLast("frameDecoder", new Tk103FrameDecoder()); pipeline.addLast("stringDecoder", new StringDecoder()); pipeline.addLast("stringEncoder", new StringEncoder()); pipeline.addLast("objectEncoder", new Tk103ProtocolEncoder()); |