aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorChristoph Krey <krey.christoph@gmail.com>2017-06-23 19:46:58 +0200
committerChristoph Krey <krey.christoph@gmail.com>2017-06-23 19:46:58 +0200
commita0f389cf98e42a1794355be2a44167f61ad43557 (patch)
treec1633d3ab862c7319b3681fa4b750060f894e978 /src/org/traccar/protocol
parenta24f48627b914b6a8fe60bc3b5f76abc4f6fc574 (diff)
downloadtraccar-server-a0f389cf98e42a1794355be2a44167f61ad43557.tar.gz
traccar-server-a0f389cf98e42a1794355be2a44167f61ad43557.tar.bz2
traccar-server-a0f389cf98e42a1794355be2a44167f61ad43557.zip
add Command.TYPE_POSITION_SINGLE to Tk103 protocol
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/Tk103Protocol.java2
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolEncoder.java3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Tk103Protocol.java b/src/org/traccar/protocol/Tk103Protocol.java
index 6fc00195e..1d3497bfb 100644
--- a/src/org/traccar/protocol/Tk103Protocol.java
+++ b/src/org/traccar/protocol/Tk103Protocol.java
@@ -1,4 +1,5 @@
/*
+ * Copyright 2017 Christoph Krey (c@ckrey.de)
* Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -32,6 +33,7 @@ public class Tk103Protocol extends BaseProtocol {
public Tk103Protocol() {
super("tk103");
setSupportedDataCommands(
+ Command.TYPE_POSITION_SINGLE,
Command.TYPE_ENGINE_STOP,
Command.TYPE_ENGINE_RESUME);
}
diff --git a/src/org/traccar/protocol/Tk103ProtocolEncoder.java b/src/org/traccar/protocol/Tk103ProtocolEncoder.java
index ce995a65f..d3005296a 100644
--- a/src/org/traccar/protocol/Tk103ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolEncoder.java
@@ -1,4 +1,5 @@
/*
+ * Copyright 2017 Christoph Krey (c@ckrey.de)
* Copyright 2017 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,6 +26,8 @@ public class Tk103ProtocolEncoder extends StringProtocolEncoder {
protected Object encodeCommand(Command command) {
switch (command.getType()) {
+ case Command.TYPE_POSITION_SINGLE:
+ return formatCommand(command, "({%s}AP00)", Command.KEY_UNIQUE_ID);
case Command.TYPE_ENGINE_STOP:
return formatCommand(command, "({%s}AV011)", Command.KEY_UNIQUE_ID);
case Command.TYPE_ENGINE_RESUME: