diff options
Diffstat (limited to 'test/org/traccar')
4 files changed, 31 insertions, 2 deletions
diff --git a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java index 38ac1c43f..70e4e3e36 100644 --- a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java +++ b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class AplicomProtocolDecoderTest extends ProtocolTest { AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(new AplicomProtocol());
verifyAttributes(decoder, binary(
+ "46c30144f667c1711f00340007ff750058b8f77701037c06b8000000330033000000000b760000425e0100640000b3a90185d5823155000131070204000219641004"));
+
+ verifyAttributes(decoder, binary(
"46c30144f667c1711f00340007ff75005891601401025707b50236003b003b003500000a9300006bd50100640000a5250167d2f9034c01010107020400021a901004"));
verifyAttributes(decoder, binary(
diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java index 90a1470c6..27b41f4e8 100644 --- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java @@ -11,6 +11,12 @@ public class H02ProtocolDecoderTest extends ProtocolTest { H02ProtocolDecoder decoder = new H02ProtocolDecoder(new H02Protocol()); verifyPosition(decoder, buffer( + "*HQ,4210209006,V1,201812,A,2608.9437,N,08016.2521,W,000.80,000,150317,EFE7F9FF,310,260,0,0,6#")); + + verifyPosition(decoder, buffer( + "*HQ,4210209006,V1,201844,A,2608.9437,N,08016.2521,W,000.80,000,150317,FFFFF9FF,310,260,0,0,6#")); + + verifyPosition(decoder, buffer( "*HQ,4109179024,V19,103732,V,3853.2770,S,06205.8678,W,000.00,000,100217,,5492932630888,8954314165044716555?,FFFFFBFF#")); verifyAttributes(decoder, buffer( diff --git a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java index 9a70080ae..c76912f18 100644 --- a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java +++ b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java @@ -10,8 +10,8 @@ public class UlbotechProtocolDecoderTest extends ProtocolTest { UlbotechProtocolDecoder decoder = new UlbotechProtocolDecoder(new UlbotechProtocol()); - verifyPosition(decoder, binary( - "f8010108675210214191372010e042010e0292dcd601a999c9000c00900269030400420000040400d87d6e0506034f1754220b070d31056d410c0000310d00312f4a1005f000000200947df8")); + verifyAttributes(decoder, buffer( + "*TS01,868323025245751,134955140317,WFE:0#")); verifyPosition(decoder, binary( "f8010103515810532780699f7e2e3f010e015ee4c906bde45c00000000008b0304004000000404002c776005060373193622110b00240b00fee8ffff807dffff606d0b00fee9af000000af0000000b00feee7d78807dffffffff100101cc2af8")); diff --git a/test/org/traccar/protocol/Xt2400ProtocolDecoderTest.java b/test/org/traccar/protocol/Xt2400ProtocolDecoderTest.java new file mode 100644 index 000000000..27366ec1b --- /dev/null +++ b/test/org/traccar/protocol/Xt2400ProtocolDecoderTest.java @@ -0,0 +1,20 @@ +package org.traccar.protocol; + +import org.junit.Test; +import org.traccar.ProtocolTest; + +public class Xt2400ProtocolDecoderTest extends ProtocolTest { + + @Test + public void testDecode() throws Exception { + + Xt2400ProtocolDecoder decoder = new Xt2400ProtocolDecoder(new Xt2400Protocol()); + + decoder.setConfig("\n:wycfg pcr[0] 000f01030406070809570a131217141005\n"); + + /*verifyPosition(decoder, binary( + "0009c4fb9b0b58a771e4020742d9f8f1c4c300bc0000000011077c0015000000000001"));*/ + + } + +} |