|
|
@ -482,17 +482,17 @@ void resegment_test_1()
|
|
|
|
|
|
|
|
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
len = rlc1.read_pdu(retx1.msg, 11); // 4 byte header + 5 data
|
|
|
|
len = rlc1.read_pdu(retx1.msg, 9); // 4 byte header + 5 data
|
|
|
|
retx1.N_bytes = len;
|
|
|
|
retx1.N_bytes = len;
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
|
|
|
|
|
|
|
|
assert(9 == rlc1.get_buffer_state()); // 4 byte header + 5 data
|
|
|
|
assert(9 == rlc1.get_buffer_state());
|
|
|
|
|
|
|
|
|
|
|
|
// Read the remaining segment
|
|
|
|
// Read the remaining segment
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
len = rlc1.read_pdu(retx2.msg, 11); // 4 byte header + 5 data
|
|
|
|
len = rlc1.read_pdu(retx2.msg, 9); // 4 byte header + 5 data
|
|
|
|
retx2.N_bytes = len;
|
|
|
|
retx2.N_bytes = len;
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
@ -591,16 +591,16 @@ void resegment_test_2()
|
|
|
|
|
|
|
|
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
retx1.N_bytes = rlc1.read_pdu(retx1.msg, 18); // 6 byte header + 10 data
|
|
|
|
retx1.N_bytes = rlc1.read_pdu(retx1.msg, 16); // 6 byte header + 10 data
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
|
|
|
|
|
|
|
|
assert(16 == rlc1.get_buffer_state()); // 6 byte header + 10 data
|
|
|
|
assert(16 == rlc1.get_buffer_state());
|
|
|
|
|
|
|
|
|
|
|
|
// Read the remaining segment
|
|
|
|
// Read the remaining segment
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
retx2.N_bytes = rlc1.read_pdu(retx2.msg, 18); // 6 byte header + 10 data
|
|
|
|
retx2.N_bytes = rlc1.read_pdu(retx2.msg, 16); // 6 byte header + 10 data
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx2.msg, retx2.N_bytes);
|
|
|
|
rlc2.write_pdu(retx2.msg, retx2.N_bytes);
|
|
|
@ -696,14 +696,14 @@ void resegment_test_3()
|
|
|
|
|
|
|
|
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
retx1.N_bytes = rlc1.read_pdu(retx1.msg, 16); // 4 byte header + 10 data
|
|
|
|
retx1.N_bytes = rlc1.read_pdu(retx1.msg, 14); // 4 byte header + 10 data
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
|
|
|
|
|
|
|
|
// Read the remaining segment
|
|
|
|
// Read the remaining segment
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
retx2.N_bytes = rlc1.read_pdu(retx2.msg, 16); // 4 byte header + 10 data
|
|
|
|
retx2.N_bytes = rlc1.read_pdu(retx2.msg, 14); // 4 byte header + 10 data
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx2.msg, retx2.N_bytes);
|
|
|
|
rlc2.write_pdu(retx2.msg, retx2.N_bytes);
|
|
|
@ -799,14 +799,14 @@ void resegment_test_4()
|
|
|
|
|
|
|
|
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
retx1.N_bytes = rlc1.read_pdu(retx1.msg, 23); // 6 byte header + 15 data
|
|
|
|
retx1.N_bytes = rlc1.read_pdu(retx1.msg, 21); // 6 byte header + 15 data
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
|
|
|
|
|
|
|
|
// Read the remaining segment
|
|
|
|
// Read the remaining segment
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
retx2.N_bytes = rlc1.read_pdu(retx2.msg, 23); // 6 byte header + 15 data
|
|
|
|
retx2.N_bytes = rlc1.read_pdu(retx2.msg, 21); // 6 byte header + 15 data
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx2.msg, retx2.N_bytes);
|
|
|
|
rlc2.write_pdu(retx2.msg, retx2.N_bytes);
|
|
|
@ -902,14 +902,14 @@ void resegment_test_5()
|
|
|
|
|
|
|
|
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
// Read the retx PDU from RLC1 and force resegmentation
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
byte_buffer_t retx1;
|
|
|
|
retx1.N_bytes = rlc1.read_pdu(retx1.msg, 29); // 7 byte header + 20 data
|
|
|
|
retx1.N_bytes = rlc1.read_pdu(retx1.msg, 27); // 7 byte header + 20 data
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
|
|
|
|
|
|
|
|
// Read the remaining segment
|
|
|
|
// Read the remaining segment
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
retx2.N_bytes = rlc1.read_pdu(retx2.msg, 29); // 7 byte header + 20 data
|
|
|
|
retx2.N_bytes = rlc1.read_pdu(retx2.msg, 27); // 7 byte header + 20 data
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx2.msg, retx2.N_bytes);
|
|
|
|
rlc2.write_pdu(retx2.msg, retx2.N_bytes);
|
|
|
@ -1023,11 +1023,11 @@ void resegment_test_6()
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
rlc2.write_pdu(retx1.msg, retx1.N_bytes);
|
|
|
|
|
|
|
|
|
|
|
|
assert(157 == rlc1.get_buffer_state());
|
|
|
|
assert(155 == rlc1.get_buffer_state());
|
|
|
|
|
|
|
|
|
|
|
|
// Read the remaining segment
|
|
|
|
// Read the remaining segment
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
byte_buffer_t retx2;
|
|
|
|
len = rlc1.read_pdu(retx2.msg, 159);
|
|
|
|
len = rlc1.read_pdu(retx2.msg, 157);
|
|
|
|
retx2.N_bytes = len;
|
|
|
|
retx2.N_bytes = len;
|
|
|
|
|
|
|
|
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|
// Write the retx PDU to RLC2
|
|
|
|