diff options
-rw-r--r-- | setup/default.xml | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/AustinNBProtocol.java (renamed from src/org/traccar/protocol/GlobeKeeperProtocol.java) | 8 | ||||
-rw-r--r-- | src/org/traccar/protocol/AustinNBProtocolDecoder.java (renamed from src/org/traccar/protocol/GlobeKeeperProtocolDecoder.java) | 6 | ||||
-rw-r--r-- | test/org/traccar/protocol/AustinProtocolDecoderTest.java (renamed from test/org/traccar/protocol/GlobeKeeperProtocolDecoderTest.java) | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/setup/default.xml b/setup/default.xml index 6bab81401..6786d1166 100644 --- a/setup/default.xml +++ b/setup/default.xml @@ -230,7 +230,7 @@ <entry key='t57.port'>5155</entry> <entry key='spot.port'>5156</entry> <entry key='m2c.port'>5157</entry> - <entry key='globekeeper.port'>5158</entry> + <entry key='austinnb.port'>5158</entry> <entry key='opengts.port'>5159</entry> <entry key='cautela.port'>5160</entry> <entry key='continental.port'>5161</entry> diff --git a/src/org/traccar/protocol/GlobeKeeperProtocol.java b/src/org/traccar/protocol/AustinNBProtocol.java index 9231c067c..c250e9b3d 100644 --- a/src/org/traccar/protocol/GlobeKeeperProtocol.java +++ b/src/org/traccar/protocol/AustinNBProtocol.java @@ -24,10 +24,10 @@ import org.traccar.TrackerServer; import java.util.List; -public class GlobeKeeperProtocol extends BaseProtocol { +public class AustinNBProtocol extends BaseProtocol { - public GlobeKeeperProtocol() { - super("globekeeper"); + public AustinNBProtocol() { + super("austinnb"); } @Override @@ -37,7 +37,7 @@ public class GlobeKeeperProtocol extends BaseProtocol { protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("stringEncoder", new StringEncoder()); pipeline.addLast("stringDecoder", new StringDecoder()); - pipeline.addLast("objectDecoder", new GlobeKeeperProtocolDecoder(GlobeKeeperProtocol.this)); + pipeline.addLast("objectDecoder", new AustinNBProtocolDecoder(AustinNBProtocol.this)); } }); } diff --git a/src/org/traccar/protocol/GlobeKeeperProtocolDecoder.java b/src/org/traccar/protocol/AustinNBProtocolDecoder.java index c4daf4409..4c37ac9a2 100644 --- a/src/org/traccar/protocol/GlobeKeeperProtocolDecoder.java +++ b/src/org/traccar/protocol/AustinNBProtocolDecoder.java @@ -25,9 +25,9 @@ import org.traccar.model.Position; import java.net.SocketAddress; import java.util.regex.Pattern; -public class GlobeKeeperProtocolDecoder extends BaseProtocolDecoder { +public class AustinNBProtocolDecoder extends BaseProtocolDecoder { - public GlobeKeeperProtocolDecoder(GlobeKeeperProtocol protocol) { + public AustinNBProtocolDecoder(AustinNBProtocol protocol) { super(protocol); } @@ -60,8 +60,8 @@ public class GlobeKeeperProtocolDecoder extends BaseProtocolDecoder { position.setTime(parser.nextDateTime()); position.setValid(true); - position.setLongitude(Double.parseDouble(parser.next().replace(',', '.'))); position.setLatitude(Double.parseDouble(parser.next().replace(',', '.'))); + position.setLongitude(Double.parseDouble(parser.next().replace(',', '.'))); return position; } diff --git a/test/org/traccar/protocol/GlobeKeeperProtocolDecoderTest.java b/test/org/traccar/protocol/AustinProtocolDecoderTest.java index 918fd9083..6d59357fb 100644 --- a/test/org/traccar/protocol/GlobeKeeperProtocolDecoderTest.java +++ b/test/org/traccar/protocol/AustinProtocolDecoderTest.java @@ -3,12 +3,12 @@ package org.traccar.protocol; import org.junit.Test; import org.traccar.ProtocolTest; -public class GlobeKeeperProtocolDecoderTest extends ProtocolTest { +public class AustinNBProtocolDecoderTest extends ProtocolTest { @Test public void testDecode() throws Exception { - GlobeKeeperProtocolDecoder decoder = new GlobeKeeperProtocolDecoder(new GlobeKeeperProtocol()); + AustinNBProtocolDecoder decoder = new AustinNBProtocolDecoder(new AustinNBProtocol()); verifyPosition(decoder, text( "48666666666;2017-01-01 16:31:01;52,1133308410645;21,1000003814697;310;120;2292;1")); |