aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-02-23 07:19:13 -0800
committerAnton Tananaev <anton@traccar.org>2024-02-23 07:19:13 -0800
commit500a312d968b5e0a59ba2218df09b9e4c22ea1d4 (patch)
treeb57b17caf92582bb21ad9a643ce9d80aaf17ac83
parentae0e26dde0aca09c4471bb7ec4fa3479bba5d0ad (diff)
downloadtrackermap-server-500a312d968b5e0a59ba2218df09b9e4c22ea1d4.tar.gz
trackermap-server-500a312d968b5e0a59ba2218df09b9e4c22ea1d4.tar.bz2
trackermap-server-500a312d968b5e0a59ba2218df09b9e4c22ea1d4.zip
Support Vista Trax TS15 format
-rw-r--r--src/main/java/org/traccar/protocol/TaipProtocolDecoder.java2
-rw-r--r--src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/TaipProtocolDecoder.java b/src/main/java/org/traccar/protocol/TaipProtocolDecoder.java
index e953756b5..448d7ffca 100644
--- a/src/main/java/org/traccar/protocol/TaipProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TaipProtocolDecoder.java
@@ -48,7 +48,7 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder {
.groupEnd("?")
.number("(d{5})") // seconds
.or()
- .expression("(?:RGP|RCQ|RCV|RBR|RUS00),?") // type
+ .expression("(?:RGP|RCQ|RCV|RBR|RUS00|RPI),?") // type
.number("(dd)?") // event
.number("(dd)(dd)(dd)") // date (mmddyy)
.number("(dd)(dd)(dd)") // time (hhmmss)
diff --git a/src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java
index 3ad234b19..197e30c15 100644
--- a/src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java
@@ -11,6 +11,12 @@ public class TaipProtocolDecoderTest extends ProtocolTest {
var decoder = inject(new TaipProtocolDecoder(null));
+ verifyAttributes(decoder, text(
+ ">RUS00,010170000000+0000000+000000000000001009999000011060074755268EF,0001139503871486,01,ZZZZZZZZZZ;ID=11817;#LOG:6AE4;*2C<"));
+
+ verifyPosition(decoder, text(
+ ">RPI041220132203-2683525-065204060150001050000101511140022118857EF27;ID=0000;#LOG:DECB;*07<"));
+
verifyPosition(decoder, text(
">RCQ00151123235718-2782354-06407582055121FF0013501CDCC6313011100001514;#0805;ID=SIA056;*15<"));