|
@@ -9,7 +9,6 @@ import com.ggits.comm.server.kafka.KafkaProducerService;
|
|
|
import com.ggits.comm.server.process.AbstractAppWorker;
|
|
|
import com.ggits.comm.server.process.dbms.DbmsData;
|
|
|
import com.ggits.comm.server.process.dbms.DbmsDataProcess;
|
|
|
-import com.ggits.comm.server.process.dbms.DbmsDataType;
|
|
|
import com.ggits.comm.server.repository.ApplicationRepository;
|
|
|
import com.ggits.comm.server.udp.SigGgitsTsinfoDto;
|
|
|
import com.ggits.comm.server.udp.SigProtocolConst;
|
|
@@ -149,9 +148,9 @@ public class GgitsPacketWorker extends AbstractAppWorker implements Runnable {
|
|
|
|
|
|
for (int ii = 0; ii < count; ii++) {
|
|
|
intLcNo = ((data.buffer[idx++] & 0xFF) << 24) |
|
|
|
- ((data.buffer[idx++] & 0xFF) << 16) |
|
|
|
- ((data.buffer[idx++] & 0xFF) << 8) |
|
|
|
- (data.buffer[idx++] & 0xFF);
|
|
|
+ ((data.buffer[idx++] & 0xFF) << 16) |
|
|
|
+ ((data.buffer[idx++] & 0xFF) << 8) |
|
|
|
+ (data.buffer[idx++] & 0xFF);
|
|
|
|
|
|
flags1 = data.buffer[idx++];
|
|
|
flags2 = data.buffer[idx++];
|
|
@@ -192,6 +191,30 @@ public class GgitsPacketWorker extends AbstractAppWorker implements Runnable {
|
|
|
blink = (flags4 >> 1 & 0x01);
|
|
|
// pnlDb = (flags4 >> 0 & 0x01);
|
|
|
|
|
|
+ // 교차로 상태
|
|
|
+// constants.LC_STATE_COMM_ERROR = 0; // 통신이상
|
|
|
+// constants.LC_STATE_COMM_OK = 1; // 정상
|
|
|
+// constants.LC_STATE_FLASH = 2; // 점멸
|
|
|
+// constants.LC_STATE_SHUTDOWN = 3; // 소등
|
|
|
+// constants.LC_STATE_POLICE_PROGRESS = 4; // 수동진행
|
|
|
+// constants.LC_STATE_PHASE_HOLD = 5; // 현시유지
|
|
|
+ // 정상, 현시유지, 수동진행 일 때만 이동류 표시
|
|
|
+// if (lcState == constants.LC_STATE_COMM_OK || lcState == constants.LC_STATE_PHASE_HOLD || lcState == constants.LC_STATE_POLICE_PROGRESS) {
|
|
|
+// tempMovementInfoA = tempLcInfo.movementInfo.find(e => ((e.planClass === planClass + 1) && (e.ringNumber === 1) && (e.phaseNumber === phaseNumber[0])));
|
|
|
+// tempMovementInfoB = tempLcInfo.movementInfo.find(e => ((e.planClass === planClass + 1) && (e.ringNumber === 2) && (e.phaseNumber === phaseNumber[1])));
|
|
|
+// }
|
|
|
+// 교차로 상태(0: 통신이상, 1: 정상, 2: 점멸, 3: 소등, 4: 수동진행, 5: 현시유지)
|
|
|
+// if (reversedBinaryDataString[15] == 1) return constants.LC_STATE_COMM_ERROR;
|
|
|
+// else {
|
|
|
+// if (holdPhaseNumber != 0) return constants.LC_STATE_PHASE_HOLD;
|
|
|
+// if (reversedBinaryDataString[1] == 1) return constants.LC_STATE_FLASH;
|
|
|
+// if (reversedBinaryDataString[2] == 1) return constants.LC_STATE_SHUTDOWN;
|
|
|
+// if (reversedBinaryDataString[7] == 1) return constants.LC_STATE_POLICE_PROGRESS;
|
|
|
+// if (reversedBinaryDataString[6] == 1) return constants.LC_STATE_POLICE_PROGRESS;
|
|
|
+// if (reversedBinaryDataString[5] == 1) return constants.LC_STATE_FLASH;
|
|
|
+// if (reversedBinaryDataString[4] == 1) return constants.LC_STATE_SHUTDOWN;
|
|
|
+// return constants.LC_STATE_COMM_OK;
|
|
|
+// }
|
|
|
|
|
|
IntStatusDto status = intDto.getStatus();
|
|
|
status.COLLCT_DTIME = COLLCT_DTIME;
|
|
@@ -211,7 +234,7 @@ public class GgitsPacketWorker extends AbstractAppWorker implements Runnable {
|
|
|
}
|
|
|
// log.info("WorkDataProcess.process: [{}], {} EA. {} Bytes. Parse {} ms.", data.getLocalPort(), count, data.getBuffer().length, System.currentTimeMillis() - parsetime);
|
|
|
this.dbmsDataProcess.add(new DbmsData(data.getCenter(), this.idx, data.getTimestamp(), popTimestamp, System.currentTimeMillis(),
|
|
|
- center.getRegionCd(), center.getRegionId(), DbmsDataType.DBMS_DATA_INT_STATUS_UPDATE, false, statusLists));
|
|
|
+ center.getRegionCd(), center.getRegionId(), DbmsData.DBMS_DATA_INT_STATUS_UPDATE, false, statusLists));
|
|
|
// log.info("WorkDataProcess.process: [{}], {} EA. {} Bytes. {} ms.[Q Added]", data.getLocalPort(), count, data.getBuffer().length, System.currentTimeMillis() - timestamp);
|
|
|
}
|
|
|
catch (Exception e) {
|