From 500a312d968b5e0a59ba2218df09b9e4c22ea1d4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 23 Feb 2024 07:19:13 -0800 Subject: Support Vista Trax TS15 format --- src/main/java/org/traccar/protocol/TaipProtocolDecoder.java | 2 +- src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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<")); -- cgit v1.2.3