aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-07 17:27:39 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-07 17:27:39 +1300
commit2232f5387b7d2126a86f725231454b687f3913d0 (patch)
tree7ce2ccb8074ae71f7433dfea837ac6e3e467877b /test
parent68e178c43d8619b8b13aa78828c75e788d4d2621 (diff)
downloadtraccar-server-2232f5387b7d2126a86f725231454b687f3913d0.tar.gz
traccar-server-2232f5387b7d2126a86f725231454b687f3913d0.tar.bz2
traccar-server-2232f5387b7d2126a86f725231454b687f3913d0.zip
Update binary test cases
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/protocol/AplicomProtocolDecoderTest.java8
-rw-r--r--test/org/traccar/protocol/AtrackProtocolDecoderTest.java20
-rw-r--r--test/org/traccar/protocol/CellocatorProtocolDecoderTest.java12
-rw-r--r--test/org/traccar/protocol/EelinkProtocolDecoderTest.java24
-rw-r--r--test/org/traccar/protocol/EnforaProtocolDecoderTest.java21
-rw-r--r--test/org/traccar/protocol/GalileoProtocolDecoderTest.java12
-rw-r--r--test/org/traccar/protocol/GatorProtocolDecoderTest.java16
7 files changed, 56 insertions, 57 deletions
diff --git a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
index ad2b2ab38..cdbc4dab9 100644
--- a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
@@ -13,11 +13,11 @@ public class AplicomProtocolDecoderTest {
AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(new TestDataManager(), null, null);
- int[] buf1 = {0x44,0xC2,0x01,0x43,0x72,0x07,0x29,0xD6,0x84,0x00,0x43,0x03,0x1f,0xff,0x71,0x91,0xC0,0x45,0x0e,0xf9,0x06,0x45,0x0e,0xf9,0x06,0x03,0xb2,0x0b,0x80,0x03,0xb2,0x0b,0x80,0x06,0x64,0x65,0xb3,0x87,0x0c,0xe3,0x0f,0x01,0x0c,0xe3,0x0c,0xe3,0x00,0x32,0x00,0x00,0x15,0x20,0x00,0x00,0x00,0x03,0x0a,0xa2,0x00,0x00,0x3b,0x13,0x00,0x00,0x00,0x32,0x03,0x00,0x00,0x0b,0xcb,0x17,0xac,0xff,0x00,0x99,0x00,0x01,0x86,0xa0,0x02};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "44C20143720729D6840043031fff7191C0450ef906450ef90603b20b8003b20b80066465b3870ce30f010ce30ce3003200001520000000030aa200003b13000000320300000bcb17acff0099000186a002"))));
- int[] buf2 = {0x44,0x01,0x29,0xD6,0x84,0x00,0x2b,0x07,0x00,0xC0,0x45,0x0e,0xf9,0x06,0x45,0x0e,0xf9,0x06,0x03,0xb2,0x0b,0x80,0x03,0xb2,0x0b,0x80,0x06,0x64,0x65,0xb3,0x87,0x0c,0xe3,0x0f,0x01,0x0c,0xe3,0x0c,0xe3,0x00,0x00,0x3b,0x13,0x03,0x00,0x00,0x0b,0xcb,0x17,0xa};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf2))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "440129D684002b0700C0450ef906450ef90603b20b8003b20b80066465b3870ce30f010ce30ce300003b130300000bcb170a"))));
}
diff --git a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
index 6c6d10771..c06845df7 100644
--- a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
@@ -14,21 +14,21 @@ public class AtrackProtocolDecoderTest {
AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(new TestDataManager(), null, null);
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0xfe,0x02,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x00,0x01}))));
+ assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "fe0200014104d8f196820001"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x40,0x50,0x99,0x3f,0x00,0x5c,0x00,0x02,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x52,0x56,0x66,0xc2,0x52,0x56,0x8c,0x3c,0x52,0x56,0x8c,0x63,0xff,0xc8,0x33,0x84,0x02,0x69,0x88,0x85,0x00,0x00,0x02,0x00,0x00,0x09,0xcf,0x03,0xde,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x52,0x56,0x66,0xc2,0x52,0x56,0x8c,0x5a,0x52,0x56,0x8c,0x63,0xff,0xc8,0x33,0x84,0x02,0x69,0x88,0x85,0x00,0x00,0x02,0x00,0x00,0x09,0xcf,0x03,0xde,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00}))));
+ verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "4050993f005c000200014104d8f19682525666c252568c3c52568c63ffc8338402698885000002000009cf03de0100000000000007d007d000525666c252568c5a52568c63ffc8338402698885000002000009cf03de0100000000000007d007d000"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x40,0x50,0x1e,0x58,0x00,0x33,0x01,0xe0,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x52,0x5e,0xcd,0x5d,0x52,0x5e,0xe3,0x44,0x52,0x5e,0xe3,0x5e,0xff,0xc8,0x88,0x15,0x02,0x6a,0xb4,0xd7,0x00,0x00,0x02,0x00,0x00,0x10,0x44,0x03,0xde,0x01,0x00,0x0b,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00}))));
+ verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "40501e58003301e000014104d8f19682525ecd5d525ee344525ee35effc88815026ab4d70000020000104403de01000b0000000007d007d000"))));
// 7-byte date
- //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- // new int[] {0x02,0x03,0xb4,0x94,0x00,0x3c,0x00,0xeb,0x00,0x01,0x41,0x04,0xd8,0xdd,0x3a,0x3e,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x00,0x30,0x7f,0x28,0x03,0x05,0x74,0xd3,0x00,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x16,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00}))));
+ //verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ // "0203b494003c00eb00014104d8dd3a3e07de011b0b1f0307de011b0b1f0307de011b0b1f0300307f28030574d30000020000000600160100020000000007d007d000"))));
- //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- // new int[] {0x40,0x50,0xd2,0xc5,0x00,0xda,0x05,0x52,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x53,0x07,0x55,0x51,0x53,0x07,0x55,0x50,0x53,0x07,0x55,0x81,0xff,0xbb,0xa6,0x6a,0x02,0x31,0x29,0x5c,0x00,0x19,0x02,0x00,0x00,0x00,0xda,0x00,0x0a,0x01,0x00,0x83,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x08,0x0e,0x09,0x00,0x85,0x53,0x07,0x55,0x60,0x53,0x07,0x55,0x5f,0x53,0x07,0x55,0x82,0xff,0xbb,0xb0,0x41,0x02,0x31,0x3b,0x4b,0x00,0x18,0x02,0x00,0x00,0x00,0xe0,0x00,0x0c,0x01,0x00,0x85,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x08,0x0d,0x00,0x00,0x86,0x53,0x07,0x55,0x6f,0x53,0x07,0x55,0x6e,0x53,0x07,0x55,0x82,0xff,0xbb,0xbb,0xea,0x02,0x31,0x4b,0x49,0x00,0x24,0x02,0x00,0x00,0x00,0xe5,0x00,0x0a,0x01,0x00,0x7b,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x08,0x0d,0x02,0x00,0x85,0x53,0x07,0x55,0x7e,0x53,0x07,0x55,0x7d,0x53,0x07,0x55,0x82,0xff,0xbb,0xc9,0x87,0x02,0x31,0x59,0x82,0x00,0x25,0x02,0x00,0x00,0x00,0xea,0x00,0x09,0x01,0x00,0x7a,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00,0x00,0x00,0x00,0x00,0x13,0x00,0x18,0x0d,0x08,0x00,0x7b}))));
+ //verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ // "4050d2c500da055200014104d8f19682530755515307555053075581ffbba66a0231295c001902000000da000a0100830000000007d007d000000000001200080e090085530755605307555f53075582ffbbb04102313b4b001802000000e0000c0100850000000007d007d000000000001200080d0000865307556f5307556e53075582ffbbbbea02314b49002402000000e5000a01007b0000000007d007d000000000001200080d0200855307557e5307557d53075582ffbbc98702315982002502000000ea000901007a0000000007d007d000000000001300180d08007b"))));
}
diff --git a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
index 3064afe02..3825430e3 100644
--- a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
@@ -14,14 +14,14 @@ public class CellocatorProtocolDecoderTest {
CellocatorProtocolDecoder decoder = new CellocatorProtocolDecoder(new TestDataManager(), null, null);
- int[] buf1 = {0x4D,0x43,0x47,0x50,0x00,0x06,0x00,0x00,0x00,0x08,0x1A,0x02,0x02,0x12,0x04,0x00,0x00,0x00,0x21,0x00,0x62,0x30,0x00,0x00,0x00,0x6B,0x00,0xE1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE5,0xA1,0x00,0x04,0x02,0x06,0x61,0x4E,0xA3,0x03,0x18,0x1A,0x57,0x03,0x4E,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x25,0x07,0x14,0x03,0xD6,0x07,0x49};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf1))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "4D4347500006000000081A02021204000000210062300000006B00E100000000000000000000E5A100040206614EA303181A57034E1200000000000000001525071403D60749"))));
- int[] buf2 = {0x4d,0x43,0x47,0x50,0x00,0x01,0x01,0x00,0x00,0x08,0x01,0x1f,0x04,0x18,0x04,0x00,0x00,0x00,0x20,0x01,0x00,0x00,0x00,0x00,0x00,0x5e,0x75,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x85,0x00,0x04,0x02,0x04,0xda,0x4d,0xa3,0x03,0x67,0x19,0x57,0x03,0xe8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x14,0x15,0x10,0x07,0xdd,0x07,0xf7};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf2))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "4d434750000101000008011f041804000000200100000000005e750000000000000000000000548500040204da4da30367195703e80300000000000000002014151007dd07f7"))));
- int[] buf3 = {0x4d,0x43,0x47,0x50,0x00,0x5e,0x93,0x01,0x00,0x08,0x01,0x02,0x04,0x18,0x04,0x00,0x00,0x00,0x20,0x0f,0x20,0x00,0x00,0x00,0x00,0x5e,0x75,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5a,0xf4,0x00,0x04,0x02,0x04,0xda,0x4d,0xa3,0x03,0x67,0x19,0x57,0x03,0xe8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x1a,0x11,0x1e,0x08,0xdd,0x07,0x60};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf3))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "4d434750005e930100080102041804000000200f20000000005e7500000000000000000000005af400040204da4da30367195703e8030000000000000000021a111e08dd0760"))));
}
diff --git a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
index 60d48fead..58f8d71ad 100644
--- a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
@@ -14,18 +14,18 @@ public class EelinkProtocolDecoderTest {
EelinkProtocolDecoder decoder = new EelinkProtocolDecoder(new TestDataManager(), null, null);
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x67,0x67,0x01,0x00,0x0b,0x00,0x1b,0x03,0x54,0x18,0x80,0x46,0x61,0x83,0x49,0x01}))));
-
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x67,0x67,0x03,0x00,0x04,0x00,0x1A,0x00,0x01}))));
-
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x67,0x67,0x07,0x00,0x88,0x00,0x10,0x50,0xE2,0x28,0x14,0x00,0xFF,0xFF,0xFF,0xFF,0x02,0x33,0x44,0x55,0x66,0x03,0x33,0x44,0x55,0x66,0x04,0x33,0x44,0x55,0x66,0x05,0xAA,0x00,0x00,0x00,0x07,0x33,0x44,0x55,0x66,0x0A,0x33,0x44,0x55,0x66,0x0B,0x33,0x44,0x55,0x66,0x0C,0x4E,0x20,0x00,0x00,0x0D,0xAA,0x00,0x00,0x00,0x0E,0x33,0x44,0x55,0x66,0x0F,0x33,0x44,0x55,0x66,0x10,0xAA,0xAA,0x00,0x00,0x11,0x33,0x44,0x55,0x66,0x1C,0x33,0x44,0x55,0x66,0x1F,0x33,0x44,0x55,0x66,0x21,0x33,0x44,0x55,0x66,0x42,0x33,0x44,0x55,0x66,0x46,0x33,0x44,0x55,0x66,0x4D,0x33,0x44,0x55,0x66,0x5C,0x33,0x44,0x55,0x66,0x5E,0x33,0x44,0x55,0x66,0x88,0x00,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,0x00,0x8B,0x00,0x00,0x00,0x00}))));
-
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x67,0x67,0x02,0x00,0x1b,0x03,0xc5,0x53,0x80,0x86,0xdf,0x01,0x90,0xc1,0x79,0x0b,0x34,0x82,0xdf,0x0f,0x01,0x57,0x02,0x08,0x00,0x01,0x3b,0xeb,0x00,0x34,0x24,0x01}))));
-
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "676701000b001b035418804661834901"))));
+
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "6767030004001A0001"))));
+
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "6767070088001050E2281400FFFFFFFF02334455660333445566043344556605AA00000007334455660A334455660B334455660C4E2000000DAA0000000E334455660F3344556610AAAA000011334455661C334455661F334455662133445566423344556646334455664D334455665C334455665E33445566880000000089000000008A000000008B00000000"))));
+
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "676702001b03c5538086df0190c1790b3482df0f0157020800013beb00342401"))));
+
}
}
diff --git a/test/org/traccar/protocol/EnforaProtocolDecoderTest.java b/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
index 4dd559d42..5c1a015be 100644
--- a/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
@@ -15,22 +15,21 @@ public class EnforaProtocolDecoderTest {
public void testDecode() throws Exception {
EnforaProtocolDecoder decoder = new EnforaProtocolDecoder(new TestDataManager(), null, null);
- ChannelBufferFactory factory = new HeapChannelBufferFactory();
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x00,0x0A,0x08,0x00,0x20,0x20,0x20,0x20,0x20,0x30,0x31,0x31,0x30,0x37,0x30,0x30,0x30,0x30,0x35,0x37,0x30,0x32,0x36,0x37}))));
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "000A08002020202020303131303730303030353730323637"))));
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x00,0x3B,0x00,0x05,0x02,0x00,0x00,0x00,0x00,0x08,0x20,0x20,0x20,0x20,0x20,0x20,0x30,0x31,0x31,0x30,0x37,0x30,0x30,0x30,0x30,0x35,0x37,0x30,0x32,0x36,0x37,0x20,0x38,0x3A,0x00,0x00,0x00,0x00,0x0D,0x00,0x50,0x84,0x01,0x35,0x8E,0x64,0x00,0x32,0xB3,0x77,0x00,0x00,0x03,0x67,0xB0,0x00,0x00,0xA8,0x04}))));
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "003B000502000000000820202020202030313130373030303035373032363720383A000000000D00508401358E640032B37700000367B00000A804"))));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x00,0x71,0x00,0x04,0x02,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x30,0x31,0x32,0x33,0x34,0x35,0x20,0x31,0x33,0x20,0x24,0x47,0x50,0x52,0x4D,0x43,0x2C,0x32,0x32,0x33,0x31,0x35,0x32,0x2E,0x30,0x30,0x2C,0x41,0x2C,0x33,0x35,0x30,0x39,0x2E,0x38,0x36,0x30,0x35,0x39,0x34,0x2C,0x4E,0x2C,0x30,0x33,0x33,0x32,0x32,0x2E,0x37,0x34,0x33,0x38,0x38,0x37,0x2C,0x45,0x2C,0x30,0x2E,0x30,0x2C,0x30,0x2E,0x30,0x2C,0x30,0x32,0x30,0x36,0x31,0x32,0x2C,0x2C,0x2C,0x41,0x2A,0x35,0x32,0x0D,0x0A}))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "007100040200202020202020202020382020202020202031323334353637383930313233343520313320244750524D432C3232333135322E30302C412C333530392E3836303539342C4E2C30333332322E3734333838372C452C302E302C302E302C3032303631322C2C2C412A35320D0A"))));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x00,0x76,0x00,0x04,0x02,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x30,0x31,0x31,0x38,0x39,0x32,0x30,0x30,0x30,0x36,0x30,0x38,0x31,0x38,0x39,0x20,0x31,0x33,0x20,0x24,0x47,0x50,0x52,0x4D,0x43,0x2C,0x31,0x37,0x31,0x38,0x34,0x31,0x2E,0x30,0x30,0x2C,0x41,0x2C,0x33,0x35,0x30,0x39,0x2E,0x38,0x35,0x32,0x34,0x31,0x30,0x2C,0x4E,0x2C,0x30,0x33,0x33,0x32,0x32,0x2E,0x37,0x35,0x39,0x31,0x31,0x33,0x2C,0x45,0x2C,0x30,0x2E,0x30,0x2C,0x30,0x2E,0x30,0x2C,0x31,0x37,0x30,0x37,0x31,0x32,0x2C,0x33,0x2E,0x34,0x2C,0x57,0x2C,0x41,0x2A,0x32,0x35,0x0D,0x0A,0x00}))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "007600040200202020202020202020382020202020202030313138393230303036303831383920313320244750524D432C3137313834312E30302C412C333530392E3835323431302C4E2C30333332322E3735393131332C452C302E302C302E302C3137303731322C332E342C572C412A32350D0A00"))));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x00,0x6a,0x00,0x0a,0x08,0x10,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x33,0x33,0x20,0x20,0x20,0x20,0x20,0x20,0x38,0x36,0x31,0x30,0x37,0x34,0x30,0x32,0x31,0x37,0x31,0x39,0x36,0x35,0x36,0x20,0x20,0x47,0x50,0x52,0x4d,0x43,0x2c,0x31,0x36,0x31,0x32,0x34,0x38,0x2e,0x30,0x30,0x2c,0x41,0x2c,0x33,0x34,0x33,0x32,0x2e,0x36,0x39,0x32,0x31,0x31,0x2c,0x53,0x2c,0x30,0x35,0x38,0x33,0x31,0x2e,0x30,0x32,0x32,0x31,0x37,0x2c,0x57,0x2c,0x30,0x2e,0x30,0x34,0x38,0x2c,0x2c,0x32,0x32,0x30,0x38,0x31,0x34,0x2c,0x2c,0x2c,0x41,0x2a,0x37,0x34}))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "006a000a081000202020202020202020333320202020202038363130373430323137313936353620204750524d432c3136313234382e30302c412c333433322e36393231312c532c30353833312e30323231372c572c302e3034382c2c3232303831342c2c2c412a3734"))));
}
diff --git a/test/org/traccar/protocol/GalileoProtocolDecoderTest.java b/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
index 4ece965a6..abe41b839 100644
--- a/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
@@ -15,14 +15,14 @@ public class GalileoProtocolDecoderTest {
GalileoProtocolDecoder decoder = new GalileoProtocolDecoder(new TestDataManager(), null, null);
- int[] buf1 = {0x01,0x13,(byte)0x80,0x03,0x38,0x36,0x38,0x32,0x30,0x34,0x30,0x30,0x31,0x35,0x34,0x39,0x30,0x38,0x37,0x04,0x32,0x00,(byte)0x85,(byte)0x90};
- assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf1))));
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "011380033836383230343030313534393038370432008590"))));
- int[] buf2 = {0x01,0xcf,0x03,0x04,0x46,0xba,0x10,0x63,0x03,0x20,0xa7,0x05,0x4c,0x53,0x30,0x08,0xf8,0x6c,0x8e,0x03,0x10,0x06,0x2c,0x04,0x33,0x47,0x04,0x9e,0x02,0x34,0x40,0x00,0x35,0x09,0x40,0x01,0x32,0x41,0x50,0x6b,0x42,0x8f,0x10,0x43,0x22,0x44,0xae,0xea,0x57,0x20,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x9a,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x71,0x24,0x20,0xce,0x1c,0x4b,0x53,0x30,0x09,0xb4,0xf0,0x67,0x03,0x04,0x3d,0xf4,0x03,0x33,0x81,0x03,0x7b,0x0a,0x34,0x38,0x00,0x35,0x0a,0x40,0x09,0x32,0x41,0xdb,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xc0,0x5e,0xf8,0x1f,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x88,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x70,0x24,0x20,0xc1,0x1c,0x4b,0x53,0x30,0x0a,0x54,0xf1,0x67,0x03,0xc4,0x50,0xf4,0x03,0x33,0x6e,0x03,0x4e,0x0a,0x34,0x39,0x00,0x35,0x08,0x40,0x09,0x32,0x41,0xdd,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0x91,0xea,0xf7,0x1f,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0xc2,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x6f,0x24,0x20,0xb3,0x1c,0x4b,0x53,0x30,0x0c,0xec,0xf2,0x67,0x03,0x38,0x65,0xf4,0x03,0x33,0x6a,0x03,0x30,0x0a,0x34,0x38,0x00,0x35,0x07,0x40,0x09,0x32,0x41,0xe6,0x6b,0x42,0x90,0x10,0x43,0x25,0x44,0xb4,0x46,0x58,0x20,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0xf7,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x6e,0x24,0x20,0xa6,0x1c,0x4b,0x53,0x30,0x0c,0x9c,0xf4,0x67,0x03,0x88,0x78,0xf4,0x03,0x33,0x7b,0x03,0x37,0x0a,0x34,0x38,0x00,0x35,0x07,0x40,0x09,0x32,0x41,0xb5,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xba,0x46,0xf8,0x1f,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0xc6,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x6d,0x24,0x20,0x99,0x1c,0x4b,0x53,0x30,0x0b,0xc8,0xf5,0x67,0x03,0x50,0x8c,0xf4,0x03,0x33,0x8d,0x03,0x6e,0x0a,0x34,0x37,0x00,0x35,0x08,0x40,0x09,0x32,0x41,0xd6,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xb4,0xea,0x57,0x20,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x84,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x6c,0x24,0x20,0x8c,0x1c,0x4b,0x53,0x30,0x08,0xc8,0xf5,0x67,0x03,0x70,0xa0,0xf4,0x03,0x33,0x87,0x03,0x92,0x0a,0x34,0x3a,0x00,0x35,0x0e,0x40,0x09,0x32,0x41,0xc7,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xc0,0xfe,0xf7,0x1f,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x8d,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x6b,0x24,0x20,0x7f,0x1c,0x4b,0x53,0x30,0x09,0xa4,0xf5,0x67,0x03,0x38,0xb4,0xf4,0x03,0x33,0x76,0x03,0x92,0x0a,0x34,0x3c,0x00,0x35,0x0a,0x40,0x09,0x32,0x41,0xd0,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0x91,0x46,0xa8,0x1f,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x8a,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x6a,0x24,0x20,0x72,0x1c,0x4b,0x53,0x30,0x0b,0x9c,0xf5,0x67,0x03,0xec,0xc7,0xf4,0x03,0x33,0x71,0x03,0x81,0x0a,0x34,0x3a,0x00,0x35,0x08,0x40,0x09,0x32,0x41,0xca,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xd1,0x2e,0x58,0x20,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x99,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x69,0x24,0x20,0x65,0x1c,0x4b,0x53,0x30,0x0a,0x64,0xf6,0x67,0x03,0x58,0xdb,0xf4,0x03,0x33,0x7a,0x03,0x49,0x0a,0x34,0x39,0x00,0x35,0x08,0x40,0x09,0x32,0x41,0xe5,0x6b,0x42,0x90,0x10,0x43,0x25,0x44,0xae,0xd2,0xf7,0x1f,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0xb2,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x68,0x24,0x20,0x58,0x1c,0x4b,0x53,0x30,0x09,0x4c,0xf8,0x67,0x03,0xe0,0xee,0xf4,0x03,0x33,0x81,0x03,0x0c,0x0a,0x34,0x3a,0x00,0x35,0x09,0x40,0x09,0x32,0x41,0xf9,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xcb,0x2e,0x18,0x21,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x92,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x67,0x24,0x20,0x4b,0x1c,0x4b,0x53,0x30,0x09,0xf8,0xfa,0x67,0x03,0x28,0x02,0xf5,0x03,0x33,0x7b,0x03,0xfc,0x09,0x34,0x3b,0x00,0x35,0x0a,0x40,0x09,0x32,0x41,0xd8,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xc0,0xea,0x77,0x21,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x9e,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x66,0x24,0x20,0x3e,0x1c,0x4b,0x53,0x30,0x09,0xa0,0xfd,0x67,0x03,0x68,0x15,0xf5,0x03,0x33,0x84,0x03,0xfd,0x09,0x34,0x3c,0x00,0x35,0x0a,0x40,0x09,0x32,0x41,0xa8,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xae,0x2e,0x58,0x20,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0xa8,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x65,0x24,0x20,0x31,0x1c,0x4b,0x53,0x30,0x09,0x44,0x00,0x68,0x03,0xb0,0x28,0xf5,0x03,0x33,0x80,0x03,0xff,0x09,0x34,0x3d,0x00,0x35,0x09,0x40,0x09,0x32,0x41,0xdc,0x6b,0x42,0x8e,0x10,0x43,0x25,0x44,0xa8,0xfe,0xa7,0x1f,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0xe2,0x6b,0x53,0x00,0x00,0x04,0x46,0xba,0x10,0x64,0x24,0x20,0x24,0x1c,0x4b,0x53,0x30,0x08,0xf0,0x02,0x68,0x03,0x08,0x3c,0xf5,0x03,0x33,0x8b,0x03,0xf9,0x09,0x34,0x3c,0x00,0x35,0x0d,0x40,0x09,0x32,0x41,0xd3,0x6b,0x42,0x8f,0x10,0x43,0x25,0x44,0xc0,0xea,0xa7,0x1f,0x45,0xf9,0x00,0x46,0x04,0xa0,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0xab,0x6b,0x53,0x00,0x00,0xff,0x3f};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf2))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "01cf030446ba10630320a7054c533008f86c8e0310062c043347049e02344000350940013241506b428f10432244aeea572045f9004604a0500000510000529a6b5300000446ba10712420ce1c4b533009b4f06703043df4033381037b0a343800350a40093241db6b428f10432544c05ef81f45f9004604a050000051000052886b5300000446ba10702420c11c4b53300a54f16703c450f403336e034e0a343900350840093241dd6b428f1043254491eaf71f45f9004604a050000051000052c26b5300000446ba106f2420b31c4b53300cecf267033865f403336a03300a343800350740093241e66b429010432544b446582045f9004604a050000051000052f76b5300000446ba106e2420a61c4b53300c9cf467038878f403337b03370a343800350740093241b56b428f10432544ba46f81f45f9004604a050000051000052c66b5300000446ba106d2420991c4b53300bc8f56703508cf403338d036e0a343700350840093241d66b428f10432544b4ea572045f9004604a050000051000052846b5300000446ba106c24208c1c4b533008c8f5670370a0f403338703920a343a00350e40093241c76b428f10432544c0fef71f45f9004604a0500000510000528d6b5300000446ba106b24207f1c4b533009a4f5670338b4f403337603920a343c00350a40093241d06b428f104325449146a81f45f9004604a0500000510000528a6b5300000446ba106a2420721c4b53300b9cf56703ecc7f403337103810a343a00350840093241ca6b428f10432544d12e582045f9004604a050000051000052996b5300000446ba10692420651c4b53300a64f6670358dbf403337a03490a343900350840093241e56b429010432544aed2f71f45f9004604a050000051000052b26b5300000446ba10682420581c4b5330094cf86703e0eef4033381030c0a343a00350940093241f96b428f10432544cb2e182145f9004604a050000051000052926b5300000446ba106724204b1c4b533009f8fa67032802f503337b03fc09343b00350a40093241d86b428f10432544c0ea772145f9004604a0500000510000529e6b5300000446ba106624203e1c4b533009a0fd67036815f503338403fd09343c00350a40093241a86b428f10432544ae2e582045f9004604a050000051000052a86b5300000446ba10652420311c4b53300944006803b028f503338003ff09343d00350940093241dc6b428e10432544a8fea71f45f9004604a050000051000052e26b5300000446ba10642420241c4b533008f0026803083cf503338b03f909343c00350d40093241d36b428f10432544c0eaa71f45f9004604a050000051000052ab6b530000ff3f"))));
- int[] buf3 = {0x01,0x1e,0x83,0x04,0x32,0x00,0x10,0x27,0x02,0x20,0xdb,0xd2,0xf0,0x51,0x30,0x0a,0x90,0xcf,0x74,0x03,0x28,0xac,0x59,0x03,0x33,0x00,0x00,0x00,0x00,0x34,0x76,0x00,0x35,0x12,0x40,0x01,0x2a,0x41,0xe9,0x2e,0x42,0x50,0x0f,0x43,0x1f,0x44,0x00,0x06,0xc8,0x14,0x45,0x0f,0x00,0x46,0x00,0x20,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x00,0x00,0x53,0x00,0x00,0x54,0x00,0x00,0x55,0x00,0x00,0x56,0x00,0x00,0x57,0x00,0x00,0x58,0x00,0x00,0x60,0x00,0x00,0x61,0x00,0x00,0x62,0x00,0x00,0xa0,0x00,0xa1,0x00,0xa2,0x00,0xa3,0x00,0xa4,0x00,0xa5,0x00,0xa6,0x00,0xa7,0x00,0xa8,0x00,0xa9,0x00,0xaa,0x00,0xab,0x00,0xac,0x00,0xad,0x00,0xae,0x00,0xaf,0x00,0xb0,0x00,0x00,0xb1,0x00,0x00,0xb2,0x00,0x00,0xb3,0x00,0x00,0xb4,0x00,0x00,0xb5,0x00,0x00,0xb6,0x00,0x00,0xb7,0x00,0x00,0xb8,0x00,0x00,0xb9,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc1,0x00,0x00,0x00,0x00,0xc2,0x00,0x00,0x00,0x00,0xc3,0x00,0x00,0x00,0x00,0xc4,0x00,0xc5,0x00,0xc6,0x00,0xc7,0x00,0xc8,0x00,0xc9,0x00,0xca,0x00,0xcb,0x00,0xcc,0x00,0xcd,0x00,0xce,0x00,0xcf,0x00,0xd0,0x00,0xd1,0x00,0xd2,0x00,0xd4,0x71,0x02,0x00,0x00,0xd6,0x00,0x00,0xd7,0x00,0x00,0xd8,0x00,0x00,0xd9,0x00,0x00,0xda,0x00,0x00,0xdb,0x00,0x00,0x00,0x00,0xdc,0x00,0x00,0x00,0x00,0xdd,0x00,0x00,0x00,0x00,0xde,0x00,0x00,0x00,0x00,0xdf,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf1,0x00,0x00,0x00,0x00,0xf2,0x00,0x00,0x00,0x00,0xf3,0x00,0x00,0x00,0x00,0x04,0x32,0x00,0x10,0x26,0x02,0x20,0xbd,0xd2,0xf0,0x51,0x30,0x05,0x90,0xcf,0x74,0x03,0x28,0xac,0x59,0x03,0x33,0x00,0x00,0x00,0x00,0x34,0x76,0x00,0x35,0x14,0x40,0x09,0x0a,0x41,0xf0,0x2e,0x42,0x7b,0x0f,0x43,0x1f,0x44,0xff,0x0d,0xb8,0x14,0x45,0x0f,0x00,0x46,0x00,0x00,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x00,0x00,0x53,0x00,0x00,0x54,0x00,0x00,0x55,0x00,0x00,0x56,0x00,0x00,0x57,0x00,0x00,0x58,0x00,0x00,0x60,0x00,0x00,0x61,0x00,0x00,0x62,0x00,0x00,0xa0,0x00,0xa1,0x00,0xa2,0x00,0xa3,0x00,0xa4,0x00,0xa5,0x00,0xa6,0x00,0xa7,0x00,0xa8,0x00,0xa9,0x00,0xaa,0x00,0xab,0x00,0xac,0x00,0xad,0x00,0xae,0x00,0xaf,0x00,0xb0,0x00,0x00,0xb1,0x00,0x00,0xb2,0x00,0x00,0xb3,0x00,0x00,0xb4,0x00,0x00,0xb5,0x00,0x00,0xb6,0x00,0x00,0xb7,0x00,0x00,0xb8,0x00,0x00,0xb9,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc1,0x00,0x00,0x00,0x00,0xc2,0x00,0x00,0x00,0x00,0xc3,0x00,0x00,0x00,0x00,0xc4,0x00,0xc5,0x00,0xc6,0x00,0xc7,0x00,0xc8,0x00,0xc9,0x00,0xca,0x00,0xcb,0x00,0xcc,0x00,0xcd,0x00,0xce,0x00,0xcf,0x00,0xd0,0x00,0xd1,0x00,0xd2,0x00,0xd4,0x71,0x02,0x00,0x00,0xd6,0x00,0x00,0xd7,0x00,0x00,0xd8,0x00,0x00,0xd9,0x00,0x00,0xda,0x00,0x00,0xdb,0x00,0x00,0x00,0x00,0xdc,0x00,0x00,0x00,0x00,0xdd,0x00,0x00,0x00,0x00,0xde,0x00,0x00,0x00,0x00,0xdf,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf1,0x00,0x00,0x00,0x00,0xf2,0x00,0x00,0x00,0x00,0xf3,0x00,0x00,0x00,0x00,0x04,0x32,0x00,0x10,0x25,0x02,0x20,0x8e,0xd2,0xf0,0x51,0x30,0x0e,0xd8,0xd0,0x74,0x03,0x04,0xac,0x59,0x03,0x33,0x00,0x00,0x00,0x00,0x34,0xa5,0x00,0x35,0x0a,0x40,0x01,0x2a,0x41,0xec,0x2e,0x42,0x2d,0x0f,0x43,0x1f,0x44,0x00,0x16,0xb8,0x14,0x45,0x0f,0x00,0x46,0x00,0x20,0x50,0x00,0x00,0x51,0x00,0x00,0x52,0x00,0x00,0x53,0x00,0x00,0x54,0x00,0x00,0x55,0x00,0x00,0x56,0x00,0x00,0x57,0x00,0x00,0x58,0x00,0x00,0x60,0x00,0x00,0x61,0x00,0x00,0x62,0x00,0x00,0xa0,0x00,0xa1,0x00,0xa2,0x00,0xa3,0x00,0xa4,0x00,0xa5,0x00,0xa6,0x00,0xa7,0x00,0xa8,0x00,0xa9,0x00,0xaa,0x00,0xab,0x00,0xac,0x00,0xad,0x00,0xae,0x00,0xaf,0x00,0xb0,0x00,0x00,0xb1,0x00,0x00,0xb2,0x00,0x00,0xb3,0x00,0x00,0xb4,0x00,0x00,0xb5,0x00,0x00,0xb6,0x00,0x00,0xb7,0x00,0x00,0xb8,0x00,0x00,0xb9,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0xc1,0x00,0x00,0x00,0x00,0xc2,0x00,0x00,0x00,0x00,0xc3,0x00,0x00,0x00,0x00,0xc4,0x00,0xc5,0x00,0xc6,0x00,0xc7,0x00,0xc8,0x00,0xc9,0x00,0xca,0x00,0xcb,0x00,0xcc,0x00,0xcd,0x00,0xce,0x00,0xcf,0x00,0xd0,0x00,0xd1,0x00,0xd2,0x00,0xd4,0x4d,0x02,0x00,0x00,0xd6,0x00,0x00,0xd7,0x00,0x00,0xd8,0x00,0x00,0xd9,0x00,0x00,0xda,0x00,0x00,0xdb,0x00,0x00,0x00,0x00,0xdc,0x00,0x00,0x00,0x00,0xdd,0x00,0x00,0x00,0x00,0xde,0x00,0x00,0x00,0x00,0xdf,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0xf1,0x00,0x00,0x00,0x00,0xf2,0x00,0x00,0x00,0x00,0xf3,0x00,0x00,0x00,0x00,0x62,0x2e};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertArray(buf3))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ "011e8304320010270220dbd2f051300a90cf740328ac59033300000000347600351240012a41e92e42500f431f440006c814450f00460020500000510000520000530000540000550000560000570000580000600000610000620000a000a100a200a300a400a500a600a700a800a900aa00ab00ac00ad00ae00af00b00000b10000b20000b30000b40000b50000b60000b70000b80000b90000c000000000c100000000c200000000c300000000c400c500c600c700c800c900ca00cb00cc00cd00ce00cf00d000d100d200d471020000d60000d70000d80000d90000da0000db00000000dc00000000dd00000000de00000000df00000000f000000000f100000000f200000000f30000000004320010260220bdd2f051300590cf740328ac59033300000000347600351440090a41f02e427b0f431f44ff0db814450f00460000500000510000520000530000540000550000560000570000580000600000610000620000a000a100a200a300a400a500a600a700a800a900aa00ab00ac00ad00ae00af00b00000b10000b20000b30000b40000b50000b60000b70000b80000b90000c000000000c100000000c200000000c300000000c400c500c600c700c800c900ca00cb00cc00cd00ce00cf00d000d100d200d471020000d60000d70000d80000d90000da0000db00000000dc00000000dd00000000de00000000df00000000f000000000f100000000f200000000f300000000043200102502208ed2f051300ed8d0740304ac5903330000000034a500350a40012a41ec2e422d0f431f440016b814450f00460020500000510000520000530000540000550000560000570000580000600000610000620000a000a100a200a300a400a500a600a700a800a900aa00ab00ac00ad00ae00af00b00000b10000b20000b30000b40000b50000b60000b70000b80000b90000c000000000c100000000c200000000c300000000c400c500c600c700c800c900ca00cb00cc00cd00ce00cf00d000d100d200d44d020000d60000d70000d80000d90000da0000db00000000dc00000000dd00000000de00000000df00000000f000000000f100000000f200000000f300000000622e"))));
}
diff --git a/test/org/traccar/protocol/GatorProtocolDecoderTest.java b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
index 75c2847ca..24cf1ed1f 100644
--- a/test/org/traccar/protocol/GatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
@@ -13,17 +13,17 @@ public class GatorProtocolDecoderTest {
GatorProtocolDecoder decoder = new GatorProtocolDecoder(new TestDataManager(), null, null);
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x24,0x24,0x80,0x00,0x26,0x00,0x09,0x63,0x2d,0x14,0x11,0x21,0x07,0x27,0x02,0x05,0x92,0x26,0x18,0x01,0x04,0x36,0x75,0x00,0x00,0x00,0x00,0xc0,0x47,0x00,0x07,0x9c,0x0c,0x34,0x00,0x0a,0xd8,0x0b,0x00,0xff,0x00,0x0a,0x0d}))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "24248000260009632d141121072702059226180104367500000000c04700079c0c34000ad80b00ff000a0d"))));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x24,0x24,0x81,0x00,0x23,0x0C,0xA2,0x32,0x85,0x10,0x03,0x06,0x14,0x59,0x07,0x02,0x23,0x46,0x90,0x11,0x35,0x29,0x47,0x00,0x00,0x00,0x00,0xC0,0x40,0x01,0x01,0x2C,0x0E,0x11,0x00,0x00,0x00,0x21,0xCB,0x0D}))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "24248100230CA23285100306145907022346901135294700000000C04001012C0E1100000021CB0D"))));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x24,0x24,0x80,0x00,0x23,0xc2,0x63,0x1e,0x00,0x11,0x12,0x20,0x10,0x49,0x09,0x83,0x32,0x68,0x64,0x87,0x03,0x80,0x41,0x00,0x00,0x00,0x00,0xc0,0x47,0x00,0x00,0x00,0x0b,0x4e,0x00,0x00,0x00,0x00,0x55,0x0d}))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "2424800023c2631e00111220104909833268648703804100000000c0470000000b4e00000000550d"))));
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
- new int[] {0x24,0x24,0x80,0x00,0x26,0x00,0x09,0x63,0x2d,0x14,0x11,0x21,0x07,0x27,0x02,0x05,0x92,0x26,0x18,0x01,0x04,0x36,0x75,0x00,0x00,0x00,0x00,0xc0,0x47,0x00,0x07,0x9c,0x0c,0x34,0x00,0x0a,0xd8,0x0b,0x00,0xff,0x00,0x0a,0x0d}))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ "24248000260009632d141121072702059226180104367500000000c04700079c0c34000ad80b00ff000a0d"))));
}