package com.mes.s7.job;
|
|
import com.github.xingshuangs.iot.protocol.s7.serializer.S7Serializer;
|
import com.mes.s7.entity.S7Data;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* @Author : zhoush
|
* @Date: 2025/4/30 14:20
|
* @Description:
|
*/
|
@Component
|
@Slf4j
|
public class S7Job {
|
|
// @Autowired(required = false)
|
// S7Serializer s7SerializerSP1;
|
// S7Serializer s7SerializerSP2;
|
//
|
// public static S7Data S7DataSP1;
|
// public static S7Data S7DataSP2;
|
//
|
// @Scheduled(fixedDelay = 1000)
|
// public void hollowRemoveTaskOne() {
|
// S7DataSP1 = s7SerializerSP1.read(S7Data.class);
|
// log.info("read data: {}", S7DataSP1);
|
// S7DataSP2 = s7SerializerSP2.read(S7Data.class);
|
// log.info("read data: {}", S7DataSP2);
|
// }
|
|
}
|