diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-12-02 09:02:06 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-12-02 09:02:06 -0800 |
commit | 8a918e12f4a899a4ffdb67c58d57daefb94c5ab4 (patch) | |
tree | 7962538b6f65e32d1a2a999f31b5cd4366b1a7e5 /src | |
parent | 972f237cd98dc477a1b497fed8270e3bdd6b6813 (diff) | |
download | traccar-server-8a918e12f4a899a4ffdb67c58d57daefb94c5ab4.tar.gz traccar-server-8a918e12f4a899a4ffdb67c58d57daefb94c5ab4.tar.bz2 traccar-server-8a918e12f4a899a4ffdb67c58d57daefb94c5ab4.zip |
Support empty vendor
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/protocol/ItsProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java b/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java index d76d9c92e..4746f7dd5 100644 --- a/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java @@ -41,7 +41,7 @@ public class ItsProtocolDecoder extends BaseProtocolDecoder { .text("$") .expression(",?[^,]+,") // event .groupBegin() - .expression("[^,]+,") // vendor + .expression("[^,]*,") // vendor .expression("[^,]+,") // firmware version .expression("(..),") // status .number("(d+),").optional() // event diff --git a/src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java index c6c13c810..dedb30242 100644 --- a/src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java @@ -15,6 +15,9 @@ public class ItsProtocolDecoderTest extends ProtocolTest { "$LGN,,869867037009679,3.2AIH,9.99546000,N,76.35886167,E")); verifyPosition(decoder, text( + "$NRM,,3.2AIH,NR,01,L,869867037003854,,1,02122019,074801,9.99553167,N,76.35911000,E,0.0,125.73,18,103.7,0.10,0.10,CellOne Kerala,0,1,13.1,4.2,0,C,19,404,72,08FE,0940,13,08FE,093E,11,08FE,7DA7,07,08FE,093F,07,08FE,7DA6,0100,00,0,0,003372,6897.214,,,,,5_5_3_5_0,B74BBD72*")); + + verifyPosition(decoder, text( "$,ID01,SAT,1.0.0,NR,1,L,868345034056903,DL3CAB1021,1,27052019,040234,28.359895,N,76.927879,E,0.0,285.6,12,254.9,1.4,0.7,IDEA,1,1,12.6,3.8,0,25,404,04,0138,0927,4ECD,0138,41,1C2B,0138,37,D77A,0138,34,D843,0138,33,0000,00,0.03,0.00,000091,A3,*")); verifyPosition(decoder, text( |