diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-07-30 16:40:30 +0200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-07-30 16:40:30 +0200 |
commit | c07bfc26823e9667d06d56d18e04c9be2c3a48b3 (patch) | |
tree | d6d85c6ef1dc860d1ffdc86106ffd9fc3ace23bc /test/org/traccar | |
parent | dc775e0e114737e3078270bf45d131446b8e6058 (diff) | |
download | traccar-server-c07bfc26823e9667d06d56d18e04c9be2c3a48b3.tar.gz traccar-server-c07bfc26823e9667d06d56d18e04c9be2c3a48b3.tar.bz2 traccar-server-c07bfc26823e9667d06d56d18e04c9be2c3a48b3.zip |
Add Enfora test case
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java b/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java index 427c092a9..a2bf3c0ab 100644 --- a/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java +++ b/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java @@ -14,12 +14,15 @@ public class SkypatrolProtocolDecoderTest { SkypatrolProtocolDecoder decoder = new SkypatrolProtocolDecoder(null); decoder.setDataManager(new TestDataManager()); - int[] buf1 = {0x00,0x05,0x02,0x10,0x04,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x0D,0x31,0x31,0x34,0x37,0x37,0x35,0x38,0x33,0x00,0xCB,0x00,0x00,0x00,0x00,0x0E,0x11,0x07,0x0C,0x01,0x01,0x84,0xD0,0x32,0xFB,0x38,0x41,0x37,0x00,0x00,0x00,0x00,0x16,0x07,0x2B,0x00,0x00,0x17,0x05,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x4E,0x0C,0x07,0x11,0x16,0x07,0x2C,0x10,0x59,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x03,0x10,0x02,0x60,0xB7,0x36,0x3B,0x63,0x06,0xC1,0x1A,0x00,0xB7,0x36,0x37,0xF2,0x06,0xBF,0x19,0xB7,0x36,0x37,0xF1,0x06,0xB5,0x0E,0xB7,0x36,0x38,0xB1,0x06,0xBB,0x0B,0xB7,0x36,0x3B,0x61,0x06,0xB8,0x0A,0xB7,0x36,0x37,0xF3,0x06,0xB7,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C}; - verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1)))); + verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( + new int[]{0x00,0x05,0x02,0x10,0x04,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x0D,0x31,0x31,0x34,0x37,0x37,0x35,0x38,0x33,0x00,0xCB,0x00,0x00,0x00,0x00,0x0E,0x11,0x07,0x0C,0x01,0x01,0x84,0xD0,0x32,0xFB,0x38,0x41,0x37,0x00,0x00,0x00,0x00,0x16,0x07,0x2B,0x00,0x00,0x17,0x05,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x4E,0x0C,0x07,0x11,0x16,0x07,0x2C,0x10,0x59,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x03,0x10,0x02,0x60,0xB7,0x36,0x3B,0x63,0x06,0xC1,0x1A,0x00,0xB7,0x36,0x37,0xF2,0x06,0xBF,0x19,0xB7,0x36,0x37,0xF1,0x06,0xB5,0x0E,0xB7,0x36,0x38,0xB1,0x06,0xBB,0x0B,0xB7,0x36,0x3B,0x61,0x06,0xB8,0x0A,0xB7,0x36,0x37,0xF3,0x06,0xB7,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C})))); //Enfora TT8750 - //int[] buf2 = {0x00,0x05,0x02,0x00,0x00,0x00,0xf1,0x14,0x30,0x35,0x30,0x30,0x31,0x39,0x30,0x31,0xd1,0xdf,0x00,0x2f,0x00,0x00,0x0d,0x01,0x87,0x12,0x01,0x15,0xe5,0x56,0xff,0x76,0x2a,0xa9,0x00,0x00,0x00,0x00,0x00,0xaa,0xe4,0x00,0x05,0xd2,0x00,0x0e,0xe1,0xbc,0x0e,0x01,0x0a,0x04,0x25,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x04,0x00,0x00,0x02,0x23,0x3c,0x09,0x6c,0x00,0xee,0x2a,0x00,0x23,0x3c,0x00,0x85,0x00,0xf0,0x22,0x23,0x3c,0x0b,0x05,0x00,0xf2,0x1d,0x23,0x3c,0x00,0x00,0x00,0xfb,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; - //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf2)))); + //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( + // new int[]{0x00,0x05,0x02,0x00,0x00,0x00,0xf1,0x14,0x30,0x35,0x30,0x30,0x31,0x39,0x30,0x31,0xd1,0xdf,0x00,0x2f,0x00,0x00,0x0d,0x01,0x87,0x12,0x01,0x15,0xe5,0x56,0xff,0x76,0x2a,0xa9,0x00,0x00,0x00,0x00,0x00,0xaa,0xe4,0x00,0x05,0xd2,0x00,0x0e,0xe1,0xbc,0x0e,0x01,0x0a,0x04,0x25,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x04,0x00,0x00,0x02,0x23,0x3c,0x09,0x6c,0x00,0xee,0x2a,0x00,0x23,0x3c,0x00,0x85,0x00,0xf0,0x22,0x23,0x3c,0x0b,0x05,0x00,0xf2,0x1d,0x23,0x3c,0x00,0x00,0x00,0xfb,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00})))); + + //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray( + // new int[]{0x00,0x04,0x02,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x30,0x31,0x31,0x37,0x32,0x32,0x30,0x30,0x31,0x31,0x38,0x35,0x31,0x37,0x38,0x20,0x31,0x32,0x20,0x24,0x47,0x50,0x52,0x4d,0x43,0x2c,0x32,0x32,0x34,0x38,0x33,0x39,0x2e,0x30,0x30,0x2c,0x41,0x2c,0x30,0x33,0x32,0x38,0x2e,0x34,0x33,0x38,0x38,0x30,0x36,0x2c,0x4e,0x2c,0x30,0x37,0x36,0x33,0x31,0x2e,0x36,0x30,0x37,0x37,0x31,0x37,0x2c,0x57,0x2c,0x30,0x2e,0x30,0x2c,0x30,0x2e,0x30,0x2c,0x31,0x39,0x30,0x37,0x31,0x34,0x2c,0x33,0x2e,0x38,0x2c,0x45,0x2c,0x41,0x2a,0x32,0x42,0x0d,0x0a,0x00})))); } |