diff options
Diffstat (limited to 'test/org/traccar/protocol/SiwiProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/SiwiProtocolDecoderTest.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/SiwiProtocolDecoderTest.java b/test/org/traccar/protocol/SiwiProtocolDecoderTest.java new file mode 100644 index 000000000..c5c93b7d0 --- /dev/null +++ b/test/org/traccar/protocol/SiwiProtocolDecoderTest.java @@ -0,0 +1,33 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class SiwiProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + SiwiProtocolDecoder decoder = new SiwiProtocolDecoder(new SiwiProtocol()); + + verifyPosition(decoder, text( + "$SIWI,2845,1320,Q,10,airtelgprs.com,1,1,0,0,876578,43,9,A,19.0123456,72.65347,45,0,055929,071107,22,5,1,0,3700,1210,0,2500,1230,321,0,1.1,4.0,1!")); + + verifyPosition(decoder, text( + "$SIWI,9803849,953,R,9,,0,1,1,0,0,0,8,A,19.066145,73.002278,213,178,122738,210217,28,5,12,6,4066,1,0,2,0,0,0,1.0,3.1CHKS_4.82,0")); + + verifyPosition(decoder, text( + "$EIT,9803849,953,R,9,,0,1,1,0,0,0,8,A,19.066145,73.002278,213,178,122738,210217,28,5,12,6,4066,1,0,2,0,0,0,1.0,3.1CHKS_4.82,0")); + + verifyPosition(decoder, text( + "$SIWI,9803849,954,E,0,,0,1,1,0,0,0,0,V,0.000000,0.000000,0,0,122855,210217,29,5,12,5,4104,1,0,2,0,0,0,1.0,3.1CHKS_4.82,0")); + + verifyPosition(decoder, text( + "$SIWI,2845,1320,A,0,,1,1,0,0,876578,43,10,A,19.0123456,72.65347,45,0,055929,071107,22,5,1,0,3700,1210,0,2500,1230,321,0,1.1,4.0,1!")); + + verifyPosition(decoder, text( + "$SIWI,9803849,956,E,0,,0,1,1,0,0,0,3,V,19.066935,73.003383,0,111,123037,210217,28,5,12,5,4071,1,0,2,0,0,0,1.0,3.1CHKS_4.82,0")); + + } + +} |