CompressHandle.cs 739 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using PLC.Siemens.Protocol.Common;
  3. using PLC.Siemens.Protocol.Control;
  4. using PLC.Siemens.Protocol.DateTime;
  5. using PLC.Siemens.O;
  6. namespace PLC.Siemens.ProtocolHandle
  7. {
  8. public class CompressHandle:IPacketHandle
  9. {
  10. public CompressRequest Request { get; set; }
  11. public ControlResponse Response { get; set; }
  12. public ResultCode ResultCode { get; set; }
  13. public CompressHandle()
  14. {
  15. Request = new CompressRequest();
  16. }
  17. public void Handle(IIsoSender sender)
  18. {
  19. Response = sender.IsoSend<CompressRequest, ControlResponse>(Request);
  20. if(Response==null) return;
  21. ResultCode = Response.Header.Error;
  22. }
  23. }
  24. }