package com.dy.rtuMw.server.local.localProtocol;
|
|
import java.io.Serializable;
|
import java.util.HashMap;
|
import java.util.Iterator;
|
import java.util.Map.Entry;
|
|
public class RtuOnLineVo implements Serializable{
|
|
private static final long serialVersionUID = 202312211559001L;
|
|
private HashMap<String , Boolean> onLineMap ;
|
|
public String toString(){
|
String s = "" ;
|
if(onLineMap != null){
|
Iterator<Entry<String, Boolean>> it = onLineMap.entrySet().iterator() ;
|
Entry<String, Boolean> entry = null ;
|
while(it.hasNext()){
|
entry = it.next() ;
|
s += entry.getKey() + ": " + (entry.getValue().booleanValue()?"在线":"离线") + "\n";
|
}
|
}
|
return s ;
|
}
|
/**
|
* 存入RTU在线情况
|
* @param onLineMap 在线集合
|
*/
|
public RtuOnLineVo setOnLine(HashMap<String , Boolean> onLineMap){
|
this.onLineMap = onLineMap ;
|
return this ;
|
}
|
|
public HashMap<String, Boolean> getOnLineMap() {
|
return onLineMap;
|
}
|
|
}
|