IIoBuffer.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Aitex.Core.RT.IOCore;
  7. namespace MECF.Framework.RT.Core.IoProviders
  8. {
  9. public enum IoType
  10. {
  11. DI,
  12. DO,
  13. AI,
  14. AO,
  15. }
  16. public class IoBlockItem
  17. {
  18. public int Offset { get; set; }
  19. public int Size { get; set; }
  20. public IoType Type { get; set; }
  21. }
  22. public interface IIoBuffer
  23. {
  24. void SetBufferBlock(string provider, List<IoBlockItem> lstBlocks);
  25. void SetIoMap(string provider, int blockOffset, List<DIAccessor> ioList);
  26. void SetIoMap(string provider, int blockOffset, List<DOAccessor> ioList);
  27. void SetIoMap(string provider, int blockOffset, List<AIAccessor> ioList);
  28. void SetIoMap(string provider, int blockOffset, List<AOAccessor> ioList);
  29. void SetIoMap(string provider, Dictionary<int, string> ioMappingPathFile);
  30. void SetIoMapByModule(string provider, int offset, string ioMappingPathFile, string module);
  31. Dictionary<int, bool[]> GetDoBuffer(string source);
  32. Dictionary<int, bool[]> GetDiBuffer(string source);
  33. Dictionary<int, short[]> GetAoBuffer(string source);
  34. Dictionary<int, short[]> GetAiBuffer(string source);
  35. void SetDiBuffer(string source, int offset, bool[] buffer);
  36. void SetAiBuffer(string source, int offset, short[] buffer, int skipSize = 0);
  37. }
  38. }