diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-17 16:28:36 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-17 16:28:36 +1200 |
commit | 3f6f92cedd969e741e65bb6e14737b98722b214e (patch) | |
tree | 97b19d441bb9f79c73db493d6ad52b2e422ec1ba /src/org/traccar/protocol/Gt06Protocol.java | |
parent | b6ba5a8ac60e8013e22ed44b15ffdc5ad8097060 (diff) | |
download | trackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.tar.gz trackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.tar.bz2 trackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.zip |
Start re-factoring commands
Diffstat (limited to 'src/org/traccar/protocol/Gt06Protocol.java')
-rw-r--r-- | src/org/traccar/protocol/Gt06Protocol.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/Gt06Protocol.java b/src/org/traccar/protocol/Gt06Protocol.java index d4bd48288..82d706e20 100644 --- a/src/org/traccar/protocol/Gt06Protocol.java +++ b/src/org/traccar/protocol/Gt06Protocol.java @@ -23,9 +23,6 @@ import org.traccar.BaseProtocol; import org.traccar.TrackerServer; import org.traccar.database.ActiveDevice; import org.traccar.helper.Crc; -import org.traccar.command.CommandType; -import org.traccar.command.NoParameterCommand; -import org.traccar.command.CommandTemplate; import java.util.List; import java.util.Map; @@ -36,11 +33,11 @@ public class Gt06Protocol extends BaseProtocol { super("gt06"); } - @Override + /*@Override protected void initCommandsTemplates(Map<CommandType, CommandTemplate> templates) { templates.put(CommandType.STOP_ENGINE, new Gt06CommandTemplate("DYD#")); templates.put(CommandType.RESUME_ENGINE, new Gt06CommandTemplate("HFYD#")); - } + }*/ @Override public void initTrackerServers(List<TrackerServer> serverList) { @@ -53,7 +50,7 @@ public class Gt06Protocol extends BaseProtocol { }); } - class Gt06CommandTemplate implements CommandTemplate<NoParameterCommand> { + /*class Gt06CommandTemplate implements CommandTemplate<NoParameterCommand> { private String commandContent; @@ -65,7 +62,7 @@ public class Gt06Protocol extends BaseProtocol { public Object applyTo(ActiveDevice activeDevice, NoParameterCommand command) { int serverFlagBit = 0x0; int commandLength = serverFlagBit + commandContent.length(); - int packetLength = 0x80 /*Protocol Number */ + commandContent.length() /* Information Content */ + 2 /*Information Serial Number */+ 2 /*Error Check */; + int packetLength = 0x80 /*Protocol Number + commandContent.length() /* Information Content + 2 /*Information Serial Number + 2 /*Error Check ; int informationSerialNumber = 1; @@ -90,6 +87,6 @@ public class Gt06Protocol extends BaseProtocol { return response; } - } + }*/ } |