Procházet zdrojové kódy

vds recv image update

shjung před 3 roky
rodič
revize
a7282b7064

+ 3 - 1
src/main/java/com/its/op/service/its/vds/VdsControlService.java

@@ -309,9 +309,11 @@ public class VdsControlService {
                         // 상태 정보(ACK) 등이 수신될수 있다.
                         byte[] head = receiveBytes(recvStream, 10);
                         if (head[0] == (byte) 0x00 && head[1] == (byte) 0x00 && head[5] == (byte) 0x16) {
+                            log.info("RECV IMAGE HEAD  FIRST: 10 Bytes. {}", SysUtils.byteArrayToHex(head));
                             int imageHeaderRemainLength = 172;  // 이미지 헤더 사이즈 만큼 더 읽어야 함
                             byte[] imageHead = receiveBytes(recvStream, imageHeaderRemainLength);
                             int imageSize = SysUtils.bytesToInt(imageHead, 159, ByteOrder.BIG_ENDIAN);
+                            log.info("RECV IMAGE HEAD SECOND: 172 Bytes. Image Size: {} Bytes.", imageSize);
                             if (imageSize > 0) {
                                 // 이미지 사이즈 만큼 이미지 데이터를 읽어온다.
                                 byte[] image = receiveBytes(recvStream, imageSize);
@@ -324,7 +326,7 @@ public class VdsControlService {
                             break;
                         } else {
                             int dataSize = SysUtils.bytesToInt(head, 6, ByteOrder.BIG_ENDIAN);
-                            log.info("RECV HEAD: {} Data Bytes Remain. {}", dataSize, SysUtils.byteArrayToHex(head));
+                            log.info("RECV HEAD: 10 Bytes, Data {} Bytes Remain. {}", dataSize, SysUtils.byteArrayToHex(head));
                             if (dataSize > 0) {
                                 byte[] data = receiveBytes(recvStream, dataSize);
                                 log.info("RECV DATA: {} Data Bytes. {}", dataSize, SysUtils.byteArrayToHex(data));