aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/Tk103Protocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/Tk103Protocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/Tk103Protocol.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/Tk103Protocol.java b/src/main/java/org/traccar/protocol/Tk103Protocol.java
index bca16928f..cf09886f5 100644
--- a/src/main/java/org/traccar/protocol/Tk103Protocol.java
+++ b/src/main/java/org/traccar/protocol/Tk103Protocol.java
@@ -24,9 +24,12 @@ import org.traccar.TrackerServer;
import org.traccar.config.Config;
import org.traccar.model.Command;
+import javax.inject.Inject;
+
public class Tk103Protocol extends BaseProtocol {
- public Tk103Protocol() {
+ @Inject
+ public Tk103Protocol(Config config) {
setSupportedDataCommands(
Command.TYPE_CUSTOM,
Command.TYPE_GET_DEVICE_STATUS,
@@ -46,7 +49,7 @@ public class Tk103Protocol extends BaseProtocol {
Command.TYPE_ENGINE_STOP,
Command.TYPE_ENGINE_RESUME,
Command.TYPE_OUTPUT_CONTROL);
- addServer(new TrackerServer(false, getName()) {
+ addServer(new TrackerServer(config, getName(), false) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
pipeline.addLast(new Tk103FrameDecoder());
@@ -56,7 +59,7 @@ public class Tk103Protocol extends BaseProtocol {
pipeline.addLast(new Tk103ProtocolDecoder(Tk103Protocol.this));
}
});
- addServer(new TrackerServer(true, getName()) {
+ addServer(new TrackerServer(config, getName(), true) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
pipeline.addLast(new StringDecoder());