using Houdar.PLC.Driver.Simenss.Protocol.Common; using Houdar.PLC.Driver.Simenss.Protocol.DateTime; using Houdar.PLC.Driver.Simenss.Protocol.Header; using Houdar.PLC.Driver.Simenss.Protocol.Security; namespace Houdar.PLC.Driver.Simenss.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; } } }