Checksum : 0x30 LL 0xA0 LL 0x02 0x01 cksumtype 0xA1 LL 0x04 LL Checksum
9293949596979899100101102
ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() ); try { bb = checksum.encode( bb ); // Check the length assertEquals( 0x11, bb.limit() ); String encodedPdu = Strings.dumpBytes( bb.array() );
8384858687888990919293
Checksum chk = new Checksum( ChecksumType.CRC32, new byte[] { 0x01, 0x02, 0x03 } ); ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() ); chk.encode( encoded ); byte[] expectedResult = new byte[] { 0x30, 0x0c, ( byte ) 0xA0, 0x03,
106107108109110111112113114115116
{ Checksum chk = new Checksum( ChecksumType.CRC32, null ); ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() ); chk.encode( encoded ); byte[] expectedResult = new byte[] { 0x30, 0x09, ( byte ) 0xA0,
8081828384858687888990
ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() ); try { bb = checksum.encode( bb ); // Check the length assertEquals( 0x11, bb.limit() ); String encodedPdu = Strings.dumpBytes(bb.array());
7879808182838485868788
Checksum chk = new Checksum( ChecksumType.CRC32, new byte[] { 0x01, 0x02, 0x03 } ); ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() ); chk.encode( encoded ); byte[] expectedResult = new byte[] { 0x30, 0x0c, (byte)0xA0, 0x03,
101102103104105106107108109110111