| 12345678910111213141516171819202122232425262728293031 | using PLC.Siemens.Protocol.Common;using PLC.Siemens.Protocol.DateTime;using PLC.Siemens.Protocol.Header;using PLC.Siemens.Protocol.Security;using PLC.Siemens.O;namespace PLC.Siemens.ProtocolHandle{    public class SetPasswordHandle:IPacketHandle    {        public SetPasswordRequest Request { get; set; }        public HandleResponse<HeaderPacket> Response { get; set; }        public string Password { get; set; }        public ResultCode ResultCode { get; set; }                public SetPasswordHandle()        {            ResultCode = ResultCode.Unknown;             Request = new SetPasswordRequest();        }        public void Handle(IIsoSender sender)        {            Request.Password = Password;            Response = sender.IsoSend<SetPasswordRequest, HandleResponse<HeaderPacket>>(Request);            if(Response==null) return;            ResultCode = Response.Params.Err;        }    }}
 |