aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Arnavi4Protocol.java
diff options
context:
space:
mode:
authorIvan Muratov <binakot@gmail.com>2017-07-13 08:45:18 +0300
committerIvan Muratov <binakot@gmail.com>2017-07-13 08:45:18 +0300
commit93227f9bffdfce2f1d60a61ea88f4eb152dfada5 (patch)
treec55745c3ebf2c09acd2d784f828c79e2f3e588c6 /src/org/traccar/protocol/Arnavi4Protocol.java
parent85f7eae47ec4bf6b269305a05a696f9acce31fd5 (diff)
parent358b591bc457786927ac1466e10181bbffbcf56b (diff)
downloadtrackermap-server-93227f9bffdfce2f1d60a61ea88f4eb152dfada5.tar.gz
trackermap-server-93227f9bffdfce2f1d60a61ea88f4eb152dfada5.tar.bz2
trackermap-server-93227f9bffdfce2f1d60a61ea88f4eb152dfada5.zip
Merge branch 'arnavi4_impl'
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);
+ }
+
+}