|
@@ -17,6 +17,27 @@ import java.util.concurrent.TimeUnit;
|
|
|
//@SpringBootTest
|
|
|
public class TsiCommConsumerApplicationTests {
|
|
|
|
|
|
+ @Test
|
|
|
+ void tt() {
|
|
|
+ int MAX_DATA_SIZE = 8155;
|
|
|
+ int length = 8155 * 5 + 0;
|
|
|
+ int ii;
|
|
|
+ int current, total, dataSize;
|
|
|
+
|
|
|
+ total = (length / MAX_DATA_SIZE) + 1;
|
|
|
+ if (0 == (length % MAX_DATA_SIZE)) {
|
|
|
+ total--;
|
|
|
+ }
|
|
|
+ current = 1;
|
|
|
+ for (ii = 0; ii < total; ii++) {
|
|
|
+ dataSize = MAX_DATA_SIZE;
|
|
|
+ if ((ii+1) * MAX_DATA_SIZE > length) {
|
|
|
+ dataSize = length - (MAX_DATA_SIZE * ii);
|
|
|
+ }
|
|
|
+ log.info("LENGTH: {}, CURRENT: {}, TOTAL: {}, INDEX: {}, DATA: {}", length, current, total, ii*MAX_DATA_SIZE, dataSize);
|
|
|
+ current++;
|
|
|
+ }
|
|
|
+ }
|
|
|
@Test
|
|
|
public void nodeAdd() {
|
|
|
int directionCode = 16;
|