shjung 11 months ago
parent
commit
d37908b41d

+ 0 - 1
conf/sig-comm-server.pid

@@ -1 +0,0 @@
-14508

+ 1 - 4
src/main/java/com/sig/comm/server/entity/TbRegionCenter.java

@@ -2,7 +2,6 @@ package com.sig.comm.server.entity;
 
 import com.sig.comm.server.dto.NetState;
 import com.sig.comm.server.dto.RegionCenter;
-import io.netty.channel.Channel;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
@@ -35,9 +34,7 @@ public class TbRegionCenter implements Serializable {
     private int minIntNo;
     private int maxIntNo;
     private int intCount;
-    private Channel channel = null;
-    private Channel dupChannel = null;
-    private int  netState;
+
     public RegionCenter toDto() {
         return RegionCenter.builder()
                 .idx(0)

+ 2 - 2
src/main/java/com/sig/comm/server/repository/ApplicationRepository.java

@@ -111,7 +111,7 @@ public class ApplicationRepository {
             }
         }
         catch (Exception e) {
-            log.error("ApplicationRepository.initCtlrInfo: Exception: {}.", e.toString());
+            log.error("ApplicationRepository.initCenterMap: Exception: {}.", e.toString());
         }
     }
     private void initIntMap() {
@@ -124,7 +124,7 @@ public class ApplicationRepository {
             }
         }
         catch (Exception e) {
-            log.error("ApplicationRepository.initCtlrInfo: Exception: {}.", e.toString());
+            log.error("ApplicationRepository.initIntMap: Exception: {}.", e.toString());
         }
     }
 

+ 76 - 77
src/main/java/com/sig/comm/server/xnet/server/process/response/SigSignalMap.java

@@ -65,7 +65,6 @@ public class SigSignalMap implements SigCommResponse {
                 mapData.init();
 
                 if (lcType == SigMapData.ESIGMAP_LC_TYPE_2004) {
-                    log.info("INT_NO: {}, RING_NO: {}, PLAN_TP: {}", intNo, ringNo, planTp);
                     res = SigMapData.signalMapDecompress(buffer, idx, compSize, mapData);
                 }
                 else {
@@ -139,82 +138,82 @@ public class SigSignalMap implements SigCommResponse {
         return result;
     }
 
-    public boolean responseTEST(RecvPacketDto packet) {
-        boolean result = true;
-        try {
-            final int recordSize = 262; // 2 + 1+1+1+1+1 + 255 = 262
-            if (!packet.getPacket().checkDataLength(recordSize)) {
-                log.error("[{}], SigPhaseChange.response: Data Length Error: Req({}), Cur({}). will be closed.",
-                        packet.getCenter().getLogKey(), packet.getPacket().getReqDataLength(recordSize), packet.getPacket().getCurDataLength());
-                return false;
-            }
-
-            int res;
-            SigMapData mapData = new SigMapData();
-            String regionCd = packet.getCenter().getRegionCd();
-            int idx;
-            byte[] buffer = packet.getPacket().getBuffer();
-            for (int ii = 0; ii < packet.getPacket().getCount(); ii++) {
-                idx = SigProtocolConst.SIG_HEAD_SIZE + (ii * (7 + SigMapData.MAX_COMPRESS_DATA_SIZE));
-
-                int intNo = ((buffer[idx++] & 0xFF) << 8) | (buffer[idx++] & 0xFF);
-                int lcType = (buffer[idx++] & 0xFF);    /* 제어기유형(1:2004년형, 2:2010년형) */
-                int ringNo = (buffer[idx++] & 0xFF);    /* 링번호(0:A링,1:B링) */
-                int lampTp = (buffer[idx++] & 0xFF);    /* 등화기유형(3:3색등화기, 4:4색등화기) */
-                int planTp = (buffer[idx++] & 0xFF);    /* map 계획구분, 0:일반제, 1~5:시차제, 6:보행맵 */
-                int compSize = (buffer[idx++] & 0xFF);
-
-                mapData.init();
-
-                if (lcType == SigMapData.ESIGMAP_LC_TYPE_2004) {
-                    log.info("INT_NO: {}, RING_NO: {}, PLAN_TP: {}", intNo, ringNo, planTp);
-                    res = SigMapData.signalMapDecompress(buffer, idx, compSize, mapData);
-                }
-                else {
-                    res = SigMapData.signalMapDecompress2010(buffer, idx, compSize, mapData);
-                }
-
-                if (res == 0) {
-                    log.error("[{}], SigSignalMap.response: Decompress Error. INT_NO: {}, LC_TYPE: {}", packet.getCenter().getLogKey(), intNo, lcType);
-                    continue;
-                }
-
-                for (int jj = 0; jj < SigMapData.MAX_SIGMAP_STEP; jj++) {
-                    log.info("{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}",
-                    regionCd,
-                    intNo,
-                    ringNo,
-                    planTp,
-                    String.format("%2d", jj+1),
-
-                    String.format("%3d", mapData.step[jj].code[0] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[1] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[2] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[3] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[4] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[5] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[6] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[7] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[8] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[9] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[10] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[11] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[12] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[13] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[14] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[15] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[16] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[17] & 0xFF),
-                    String.format("%3d", mapData.step[jj].code[18] & 0xFF));   /*현시종료여부(1:종료) */
-                }
-            }
-        }
-        catch (Exception e) {
-            log.error("[{}], SigSignalMap.response: Exception. will be closed. {}", packet.getCenter().getLogKey(), e.getMessage());
-            result = false;
-        }
-        return result;
-    }
+//    public boolean responseTEST(RecvPacketDto packet) {
+//        boolean result = true;
+//        try {
+//            final int recordSize = 262; // 2 + 1+1+1+1+1 + 255 = 262
+//            if (!packet.getPacket().checkDataLength(recordSize)) {
+//                log.error("[{}], SigPhaseChange.response: Data Length Error: Req({}), Cur({}). will be closed.",
+//                        packet.getCenter().getLogKey(), packet.getPacket().getReqDataLength(recordSize), packet.getPacket().getCurDataLength());
+//                return false;
+//            }
+//
+//            int res;
+//            SigMapData mapData = new SigMapData();
+//            String regionCd = packet.getCenter().getRegionCd();
+//            int idx;
+//            byte[] buffer = packet.getPacket().getBuffer();
+//            for (int ii = 0; ii < packet.getPacket().getCount(); ii++) {
+//                idx = SigProtocolConst.SIG_HEAD_SIZE + (ii * (7 + SigMapData.MAX_COMPRESS_DATA_SIZE));
+//
+//                int intNo = ((buffer[idx++] & 0xFF) << 8) | (buffer[idx++] & 0xFF);
+//                int lcType = (buffer[idx++] & 0xFF);    /* 제어기유형(1:2004년형, 2:2010년형) */
+//                int ringNo = (buffer[idx++] & 0xFF);    /* 링번호(0:A링,1:B링) */
+//                int lampTp = (buffer[idx++] & 0xFF);    /* 등화기유형(3:3색등화기, 4:4색등화기) */
+//                int planTp = (buffer[idx++] & 0xFF);    /* map 계획구분, 0:일반제, 1~5:시차제, 6:보행맵 */
+//                int compSize = (buffer[idx++] & 0xFF);
+//
+//                mapData.init();
+//
+//                if (lcType == SigMapData.ESIGMAP_LC_TYPE_2004) {
+//                    log.info("INT_NO: {}, RING_NO: {}, PLAN_TP: {}", intNo, ringNo, planTp);
+//                    res = SigMapData.signalMapDecompress(buffer, idx, compSize, mapData);
+//                }
+//                else {
+//                    res = SigMapData.signalMapDecompress2010(buffer, idx, compSize, mapData);
+//                }
+//
+//                if (res == 0) {
+//                    log.error("[{}], SigSignalMap.response: Decompress Error. INT_NO: {}, LC_TYPE: {}", packet.getCenter().getLogKey(), intNo, lcType);
+//                    continue;
+//                }
+//
+//                for (int jj = 0; jj < SigMapData.MAX_SIGMAP_STEP; jj++) {
+//                    log.info("{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}",
+//                    regionCd,
+//                    intNo,
+//                    ringNo,
+//                    planTp,
+//                    String.format("%2d", jj+1),
+//
+//                    String.format("%3d", mapData.step[jj].code[0] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[1] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[2] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[3] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[4] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[5] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[6] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[7] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[8] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[9] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[10] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[11] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[12] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[13] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[14] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[15] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[16] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[17] & 0xFF),
+//                    String.format("%3d", mapData.step[jj].code[18] & 0xFF));   /*현시종료여부(1:종료) */
+//                }
+//            }
+//        }
+//        catch (Exception e) {
+//            log.error("[{}], SigSignalMap.response: Exception. will be closed. {}", packet.getCenter().getLogKey(), e.getMessage());
+//            result = false;
+//        }
+//        return result;
+//    }
 
 //    {
 //        if (lcType == SigMapData.ESIGMAP_LC_TYPE_2004) {