aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authoranton2920 <anton2920@gmail.com>2022-09-04 14:21:12 +0100
committeranton2920 <anton2920@gmail.com>2022-09-07 09:48:46 +0100
commit210e2cd641bf89d9b86d247a237739d026208bcf (patch)
tree330a9324cf5e2bd3fc7eb6ac8da326a98085713b /src/main/java/org/traccar/protocol
parent3ae99730940f0f108a0c655f0cb52c109ca57885 (diff)
downloadtrackermap-server-210e2cd641bf89d9b86d247a237739d026208bcf.tar.gz
trackermap-server-210e2cd641bf89d9b86d247a237739d026208bcf.tar.bz2
trackermap-server-210e2cd641bf89d9b86d247a237739d026208bcf.zip
Added files for G1rus protocol
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/G1rusProtocol.java24
-rw-r--r--src/main/java/org/traccar/protocol/G1rusProtocolDecoder.java18
2 files changed, 42 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/G1rusProtocol.java b/src/main/java/org/traccar/protocol/G1rusProtocol.java
new file mode 100644
index 000000000..0d77a8add
--- /dev/null
+++ b/src/main/java/org/traccar/protocol/G1rusProtocol.java
@@ -0,0 +1,24 @@
+package org.traccar.protocol;
+
+import io.netty.handler.codec.string.StringDecoder;
+import io.netty.handler.codec.string.StringEncoder;
+import org.traccar.BaseProtocol;
+import org.traccar.PipelineBuilder;
+import org.traccar.TrackerServer;
+import org.traccar.config.Config;
+
+import javax.inject.Inject;
+
+public class G1rusProtocol extends BaseProtocol {
+
+ @Inject
+ public G1rusProtocol(Config config) {
+ addServer(new TrackerServer(config, getName(), false) {
+ @Override
+ protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
+ pipeline.addLast(new StringEncoder());
+ pipeline.addLast(new G1rusProtocolDecoder(G1rusProtocol.this));
+ }
+ });
+ }
+}
diff --git a/src/main/java/org/traccar/protocol/G1rusProtocolDecoder.java b/src/main/java/org/traccar/protocol/G1rusProtocolDecoder.java
new file mode 100644
index 000000000..f6251d6c2
--- /dev/null
+++ b/src/main/java/org/traccar/protocol/G1rusProtocolDecoder.java
@@ -0,0 +1,18 @@
+package org.traccar.protocol;
+
+import io.netty.channel.Channel;
+import org.traccar.BaseProtocolDecoder;
+import org.traccar.Protocol;
+
+import java.net.SocketAddress;
+
+public class G1rusProtocolDecoder extends BaseProtocolDecoder {
+ public G1rusProtocolDecoder(Protocol protocol) {
+ super(protocol);
+ }
+
+ @Override
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
+ }
+}