|  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public void close() { | 
 |  |  |  | 
 |  |  |         siemensS7Net.ConnectClose(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public static void main(String[] args) { | 
 |  |  | 
 |  |  |         devpThread.read(); | 
 |  |  |         // 写 | 
 |  |  |         StaProtocol staProtocol = devpThread.getStation().get(1); | 
 |  |  |         staProtocol.setWorkNo((short) 9999); | 
 |  |  |         staProtocol.setStaNo((short) 100); | 
 |  |  |         staProtocol.setAutoing(false); | 
 |  |  |         staProtocol.setEmptyMk(false); | 
 |  |  |         staProtocol.setWorkNo((short) 888); | 
 |  |  |         staProtocol.setStaNo((short) 1001); | 
 |  |  |         staProtocol.setAutoing(true); | 
 |  |  |         staProtocol.setEmptyMk(true); | 
 |  |  |         staProtocol.setInEnable(true); | 
 |  |  |         devpThread.write(staProtocol); | 
 |  |  |         System.out.println("----------------------------------------"); | 
 |  |  |         // 读 |