aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/PretraceProtocol.java
diff options
context:
space:
mode:
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));
}
});