aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/RuptelaProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/RuptelaProtocol.java')
-rw-r--r--src/org/traccar/protocol/RuptelaProtocol.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/RuptelaProtocol.java b/src/org/traccar/protocol/RuptelaProtocol.java
index d9ce4430b..d806c4c01 100644
--- a/src/org/traccar/protocol/RuptelaProtocol.java
+++ b/src/org/traccar/protocol/RuptelaProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
+import org.traccar.model.Command;
import java.util.List;
@@ -27,6 +28,8 @@ public class RuptelaProtocol extends BaseProtocol {
public RuptelaProtocol() {
super("ruptela");
+ setSupportedCommands(
+ Command.TYPE_CUSTOM);
}
@Override
@@ -35,6 +38,7 @@ public class RuptelaProtocol extends BaseProtocol {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 0, 2, 2, 0));
+ pipeline.addLast("objectEncoder", new RuptelaProtocolEncoder());
pipeline.addLast("objectDecoder", new RuptelaProtocolDecoder(RuptelaProtocol.this));
}
});