|
|
|
@ -10,6 +10,7 @@ import com.xydl.cac.repository.IcdFileRepository;
|
|
|
|
|
import com.xydl.cac.repository.IcdIedRepository;
|
|
|
|
|
import com.xydl.cac.socket.WebSocketServer;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
@ -21,6 +22,8 @@ import java.util.*;
|
|
|
|
|
@Service
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class RealTimeDataService {
|
|
|
|
|
@Value("${cac.61850.netwarn:false}")
|
|
|
|
|
public boolean netwarn;
|
|
|
|
|
@Resource
|
|
|
|
|
IcdFileRepository fileRepository;
|
|
|
|
|
@Resource
|
|
|
|
@ -52,7 +55,7 @@ public class RealTimeDataService {
|
|
|
|
|
}
|
|
|
|
|
inDoing = true;
|
|
|
|
|
IcdFile icdFile = optionalFile.get();
|
|
|
|
|
IecClient iecClient = new IecClient(this, webSocketServer);
|
|
|
|
|
IecClient iecClient = new IecClient(webSocketServer, netwarn);
|
|
|
|
|
try {
|
|
|
|
|
iecClient.init(ied, icdFile.getXml());
|
|
|
|
|
iecClient.keep = true;
|
|
|
|
|