|  |  |  | 
|---|
|  |  |  | import com.dy.common.mw.UnitCallbackInterface; | 
|---|
|  |  |  | import com.dy.common.mw.channel.tcp.TcpUnit; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.Command; | 
|---|
|  |  |  | import com.dy.rtuMw.server.forTcp.RtuStatus; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.rtuState.RtuStatus; | 
|---|
|  |  |  | import com.dy.rtuMw.server.local.localProtocol.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.HashMap; | 
|---|
|  |  |  | 
|---|
|  |  |  | if(command.param != null && command.param instanceof String && !command.param.equals("")){ | 
|---|
|  |  |  | String rtuAddr = (String)command.param; | 
|---|
|  |  |  | RtuStatus rtuStatus = new RtuStatusDeal().dealOne(rtuAddr) ; | 
|---|
|  |  |  | return ReturnCommand.successed("查询部分RTU状态结果", command.getId(), command.getCode(), rtuStatus) ; | 
|---|
|  |  |  | return ReturnCommand.successed("查询一个RTU状态结果", command.getId(), command.getCode(), rtuStatus) ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return ReturnCommand.errored("出错,命令参数应该是所查询RTU的地址",  command.getId(), command.getCode()) ; | 
|---|
|  |  |  | } | 
|---|