aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-11-14 16:28:57 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-11-14 16:28:57 -0800
commit88e5b090d7a71255a29fe6ad2ae1525c1c0a03be (patch)
tree60e4386c4284ff52643874ae6b77e21324dcc97a
parent7ce7c73a2461ac3b2dde98398a4458e86cfa89bf (diff)
downloadtrackermap-server-88e5b090d7a71255a29fe6ad2ae1525c1c0a03be.tar.gz
trackermap-server-88e5b090d7a71255a29fe6ad2ae1525c1c0a03be.tar.bz2
trackermap-server-88e5b090d7a71255a29fe6ad2ae1525c1c0a03be.zip
Rename protocol to Techto Cruz
-rw-r--r--setup/default.xml2
-rw-r--r--src/main/java/org/traccar/protocol/TechtoCruzProtocol.java (renamed from src/main/java/org/traccar/protocol/CruzTechoProtocol.java)6
-rw-r--r--src/main/java/org/traccar/protocol/TechtoCruzProtocolDecoder.java (renamed from src/main/java/org/traccar/protocol/CruzTechoProtocolDecoder.java)4
-rw-r--r--src/test/java/org/traccar/protocol/TechtoCruzProtocolDecoderTest.java (renamed from src/test/java/org/traccar/protocol/CruzTechoProtocolDecoderTest.java)4
4 files changed, 8 insertions, 8 deletions
diff --git a/setup/default.xml b/setup/default.xml
index d691bec62..f314413f1 100644
--- a/setup/default.xml
+++ b/setup/default.xml
@@ -299,6 +299,6 @@
<entry key='hoopo.port'>5231</entry>
<entry key='dualcam.port'>5232</entry>
<entry key='xexun2.port'>5233</entry>
- <entry key='cruztecho.port'>5234</entry>
+ <entry key='techtocruz.port'>5234</entry>
</properties>
diff --git a/src/main/java/org/traccar/protocol/CruzTechoProtocol.java b/src/main/java/org/traccar/protocol/TechtoCruzProtocol.java
index da54e118a..890a8abb1 100644
--- a/src/main/java/org/traccar/protocol/CruzTechoProtocol.java
+++ b/src/main/java/org/traccar/protocol/TechtoCruzProtocol.java
@@ -22,16 +22,16 @@ import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
-public class CruzTechoProtocol extends BaseProtocol {
+public class TechtoCruzProtocol extends BaseProtocol {
- public CruzTechoProtocol() {
+ public TechtoCruzProtocol() {
addServer(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
pipeline.addLast(new LineBasedFrameDecoder(1024));
pipeline.addLast(new StringEncoder());
pipeline.addLast(new StringDecoder());
- pipeline.addLast(new CruzTechoProtocolDecoder(CruzTechoProtocol.this));
+ pipeline.addLast(new TechtoCruzProtocolDecoder(TechtoCruzProtocol.this));
}
});
}
diff --git a/src/main/java/org/traccar/protocol/CruzTechoProtocolDecoder.java b/src/main/java/org/traccar/protocol/TechtoCruzProtocolDecoder.java
index 9809fa5a8..6b9f0edb6 100644
--- a/src/main/java/org/traccar/protocol/CruzTechoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TechtoCruzProtocolDecoder.java
@@ -27,9 +27,9 @@ import org.traccar.model.Position;
import java.net.SocketAddress;
import java.util.regex.Pattern;
-public class CruzTechoProtocolDecoder extends BaseProtocolDecoder {
+public class TechtoCruzProtocolDecoder extends BaseProtocolDecoder {
- public CruzTechoProtocolDecoder(Protocol protocol) {
+ public TechtoCruzProtocolDecoder(Protocol protocol) {
super(protocol);
}
diff --git a/src/test/java/org/traccar/protocol/CruzTechoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TechtoCruzProtocolDecoderTest.java
index 3dfe9ef62..8f4a7915d 100644
--- a/src/test/java/org/traccar/protocol/CruzTechoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TechtoCruzProtocolDecoderTest.java
@@ -3,12 +3,12 @@ package org.traccar.protocol;
import org.junit.Test;
import org.traccar.ProtocolTest;
-public class CruzTechoProtocolDecoderTest extends ProtocolTest {
+public class TechtoCruzProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CruzTechoProtocolDecoder(null);
+ var decoder = new TechtoCruzProtocolDecoder(null);
verifyPosition(decoder, text(
"$$A120,8612345678910,211005105836,A,FLEX,KCB 947C,000.0,0,-1.38047,S,36.93951,E,1648.4,243.140,21,28,12.1,3.7,0,1,0,0,0,*F6"));