|
@@ -0,0 +1,23 @@
|
|
|
+package com.platform.iec.master;
|
|
|
+
|
|
|
+import com.ydl.iec.iec104.core.Iec104ThreadLocal;
|
|
|
+import io.netty.channel.ChannelInboundHandlerAdapter;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
+import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
+
|
|
|
+import java.time.LocalDateTime;
|
|
|
+
|
|
|
+
|
|
|
+public class SendGeneralCallTask {
|
|
|
+
|
|
|
+ private static final Logger LOGGER = LoggerFactory.getLogger(ChannelInboundHandlerAdapter.class);
|
|
|
+
|
|
|
+ private void configureTasks() {
|
|
|
+ LOGGER.info("执行总召唤");
|
|
|
+ Iec104ThreadLocal.getScheduledTaskPool().sendGeneralCall();
|
|
|
+ LOGGER.info("执行总召唤,定时任务时间: " + LocalDateTime.now());
|
|
|
+ }
|
|
|
+}
|