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 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>(Request); if(Response==null) return; ResultCode = Response.Params.Err; } } }