| | |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.FileInputStream; |
| | |
| | | |
| | | import com.example.springboot.mapper.AlarmMapper; |
| | | |
| | | @Slf4j |
| | | public class Plcalarm extends Thread { |
| | | private AlarmMapper alarmMapper; |
| | | |
| | |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | this.readValue(); |
| | | this.readValue(); |
| | | String PlcAddress = this.name; |
| | | Integer Plccount = this.count; |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |