aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Arnavi4Protocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Arnavi4Protocol.java')
-rw-r--r--src/org/traccar/protocol/Arnavi4Protocol.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Arnavi4Protocol.java b/src/org/traccar/protocol/Arnavi4Protocol.java
new file mode 100644
index 000000000..227397980
--- /dev/null
+++ b/src/org/traccar/protocol/Arnavi4Protocol.java
@@ -0,0 +1,33 @@
+package org.traccar.protocol;
+
+import org.jboss.netty.bootstrap.ServerBootstrap;
+import org.jboss.netty.channel.ChannelPipeline;
+import org.traccar.BaseProtocol;
+import org.traccar.TrackerServer;
+
+import java.nio.ByteOrder;
+import java.util.List;
+
+/**
+ * Created by Ivan Muratov @binakot on 11.07.2017.
+ */
+public class Arnavi4Protocol extends BaseProtocol {
+
+ public Arnavi4Protocol() {
+ super("arnavi4");
+ }
+
+ @Override
+ public void initTrackerServers(List<TrackerServer> serverList) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new Arnavi4FrameDecoder());
+ pipeline.addLast("objectDecoder", new Arnavi4ProtocolDecoder(Arnavi4Protocol.this));
+ }
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
+ }
+
+}