diff options
author | Edward Valley <ed.valley@yandex.com> | 2019-07-02 23:47:55 -0400 |
---|---|---|
committer | Edward Valley <ed.valley@yandex.com> | 2019-07-02 23:47:55 -0400 |
commit | 53871f6f1ed5d40a6895dd6d84fb5d201a9110a3 (patch) | |
tree | 74efe9c8ef23698f29f858eec964c7895dc33f39 /src/test | |
parent | c51119948fcd7b1f77f174310cc1b3cfaa031fd7 (diff) | |
download | traccar-server-53871f6f1ed5d40a6895dd6d84fb5d201a9110a3.tar.gz traccar-server-53871f6f1ed5d40a6895dd6d84fb5d201a9110a3.tar.bz2 traccar-server-53871f6f1ed5d40a6895dd6d84fb5d201a9110a3.zip |
Add Laipac protocol decoder tests
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java index 31a0434bc..1426e5c35 100644 --- a/src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java @@ -15,10 +15,10 @@ public class LaipacProtocolDecoderTest extends ProtocolTest { verifyNull(decoder, text( "$AVSYS,99999999,V1.50,SN0000103,32768*15")); - + verifyNull(decoder, text( "$ECHK,99999999,0*35")); - + verifyNull(decoder, text( "$AVSYS,MSG00002,14406,7046811160,64*1A")); @@ -85,10 +85,10 @@ public class LaipacProtocolDecoderTest extends ProtocolTest { verifyPosition(decoder, text( "$AVRMC,MSG00002,125517,R,5053.0442,N,00557.8694,E,0.00,0.00,240614,H,4076,167,1,0,0,0D7AB913,020408*75")); - + verifyPosition(decoder, text( "$AVRMC,MSG00002,043104,p,5114.4664,N,00534.3308,E,0.00,0.00,280614,0,4115,495,1,0,0,0D48C3DC,020408*52")); - + verifyPosition(decoder, text( "$AVRMC,MSG00002,050601,P,5114.4751,N,00534.3175,E,0.00,0.00,280614,0,4115,495,1,0,0,0D48C3DC,020408*7D")); @@ -120,6 +120,13 @@ public class LaipacProtocolDecoderTest extends ProtocolTest { verifyPosition(decoder, text( "$AVRMC,358174067149865,143747,R,5050.1124,N,00420.0542,E,1.34,161.96,190318,a,3416,119,1,0,0*7D")); + //Zero LAC, CID, MCC, MNC + verifyPosition(decoder, text( + "$AVRMC,358174067149865,143747,P,5050.1124,N,00420.0542,E,1.34,161.96,190318,A,3416,119,1,0,0,0,0*5F")); + + //New unknown parameters + verifyPosition(decoder, text( + "$AVRMC,358174067149865,143747,P,5050.1124,N,00420.0542,E,1.34,161.96,190318,A,3416,119,1,0,0,0,0,0,0*5F")); } } |