| 123456789101112131415161718192021222324252627282930313233 | using System;using Houdar.PLC.Driver.Simenss.Protocol.Common;using Houdar.PLC.Driver.Simenss.Protocol.ListBlocks;namespace Houdar.PLC.Driver.Simenss.ProtocolHandle{    public class DataBlockInfoHandle:IPacketHandle    {        public DataBlockInfoRequest Request { get; set; }        public DataBlockInfoResponse Response { get; set; }        public BlockType BlockType { get; set; }        public ushort DB { get; set; }        public ResultCode ResultCode { get; set; }        public DataBlockInfoHandle()        {            ResultCode = ResultCode.Unknown;            Request = new DataBlockInfoRequest();        }        public void Handle(IIsoSender sender)        {            Request.BlockType = BlockType;            Request.DB = DB;            Response = sender.IsoSend<DataBlockInfoRequest, DataBlockInfoResponse> (Request);            if(Response==null) return;                        ResultCode = Response.Params.Err;        }    }}
 |