aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gps103Protocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-17 16:28:36 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-17 16:28:36 +1200
commit3f6f92cedd969e741e65bb6e14737b98722b214e (patch)
tree97b19d441bb9f79c73db493d6ad52b2e422ec1ba /src/org/traccar/protocol/Gps103Protocol.java
parentb6ba5a8ac60e8013e22ed44b15ffdc5ad8097060 (diff)
downloadtrackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.tar.gz
trackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.tar.bz2
trackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.zip
Start re-factoring commands
Diffstat (limited to 'src/org/traccar/protocol/Gps103Protocol.java')
-rw-r--r--src/org/traccar/protocol/Gps103Protocol.java20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/org/traccar/protocol/Gps103Protocol.java b/src/org/traccar/protocol/Gps103Protocol.java
index 84275a556..3f04ede4e 100644
--- a/src/org/traccar/protocol/Gps103Protocol.java
+++ b/src/org/traccar/protocol/Gps103Protocol.java
@@ -23,16 +23,8 @@ import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.TrackerServer;
-import org.traccar.command.CommandType;
-import org.traccar.command.Duration;
-import org.traccar.command.FixPositioningCommand;
-import org.traccar.command.GpsCommand;
-import org.traccar.command.CommandTemplate;
-import org.traccar.command.CommandValueConversion;
-import org.traccar.command.StringCommandTemplate;
import java.util.List;
-import java.util.Map;
public class Gps103Protocol extends BaseProtocol {
@@ -40,19 +32,19 @@ public class Gps103Protocol extends BaseProtocol {
super("gps103");
}
- @Override
+ /*@Override
protected void initCommandsTemplates(Map<CommandType, CommandTemplate> templates) {
- templates.put(CommandType.STOP_POSITIONING, new StringCommandTemplate("**,imei:[%s],A", GpsCommand.UNIQUE_ID));
- templates.put(CommandType.FIX_POSITIONING, new StringCommandTemplate("**,imei:[%s],C,[%s]", GpsCommand.UNIQUE_ID, FixPositioningCommand.FREQUENCY)
+ templates.put(CommandType.STOP_POSITIONING, new StringCommandTemplate("**,imei:[%s],A", Command.UNIQUE_ID));
+ templates.put(CommandType.FIX_POSITIONING, new StringCommandTemplate("**,imei:[%s],C,[%s]", Command.UNIQUE_ID, FixPositioningCommand.FREQUENCY)
.addConverter(Duration.class, new CommandValueConversion<Duration>() {
@Override
public String convert(Duration value) {
return String.format("%02d%s", value.getValue(), value.getUnit().getCommandFormat());
}
}));
- templates.put(CommandType.RESUME_ENGINE, new StringCommandTemplate("**,imei:[%s],J", GpsCommand.UNIQUE_ID));
- templates.put(CommandType.STOP_ENGINE, new StringCommandTemplate("**,imei:[%s],K", GpsCommand.UNIQUE_ID));
- }
+ templates.put(CommandType.RESUME_ENGINE, new StringCommandTemplate("**,imei:[%s],J", Command.UNIQUE_ID));
+ templates.put(CommandType.STOP_ENGINE, new StringCommandTemplate("**,imei:[%s],K", Command.UNIQUE_ID));
+ }*/
@Override
public void initTrackerServers(List<TrackerServer> serverList) {