aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/PretraceProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-22 15:25:10 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-22 15:25:10 +1200
commitd42c74bbbdf6264b2b301c277eee9fb36de435ba (patch)
tree00aa19c733ec419e0cd1118a64832abee3d67d5d /src/org/traccar/protocol/PretraceProtocol.java
parent5a582f6316511199d43b4c15e7d1759932f9874b (diff)
downloadtrackermap-server-d42c74bbbdf6264b2b301c277eee9fb36de435ba.tar.gz
trackermap-server-d42c74bbbdf6264b2b301c277eee9fb36de435ba.tar.bz2
trackermap-server-d42c74bbbdf6264b2b301c277eee9fb36de435ba.zip
Implement Pretrace commands
Diffstat (limited to 'src/org/traccar/protocol/PretraceProtocol.java')
-rw-r--r--src/org/traccar/protocol/PretraceProtocol.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/PretraceProtocol.java b/src/org/traccar/protocol/PretraceProtocol.java
index 456807c1b..811c387f6 100644
--- a/src/org/traccar/protocol/PretraceProtocol.java
+++ b/src/org/traccar/protocol/PretraceProtocol.java
@@ -21,6 +21,7 @@ import org.traccar.BaseProtocol;
import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
+import org.traccar.model.Command;
import java.util.List;
@@ -28,6 +29,9 @@ public class PretraceProtocol extends BaseProtocol {
public PretraceProtocol() {
super("pretrace");
+ setSupportedDataCommands(
+ Command.TYPE_CUSTOM,
+ Command.TYPE_POSITION_PERIODIC);
}
@Override
@@ -38,6 +42,7 @@ public class PretraceProtocol extends BaseProtocol {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ')'));
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectEncoder", new PretraceProtocolEncoder());
pipeline.addLast("objectDecoder", new PretraceProtocolDecoder(PretraceProtocol.this));
}
});