IIoBuffer.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 SetBufferBlock(string provider, int doLength, int diLength, int aiLength, int aoLength);
  26. void SetIoMap(string provider, int blockOffset, List<DIAccessor> ioList);
  27. void SetIoMap(string provider, int blockOffset, List<DOAccessor> ioList);
  28. void SetIoMap(string provider, int blockOffset, List<AIAccessor> ioList);
  29. void SetIoMap(string provider, int blockOffset, List<AOAccessor> ioList);
  30. void SetIoMap(string provider, Dictionary<int, string> ioMappingPathFile);
  31. void SetIoMapByModule(string provider, int offset, string ioMappingPathFile, string module);
  32. Dictionary<int, bool[]> GetDoBuffer(string source);
  33. Dictionary<int, bool[]> GetDiBuffer(string source);
  34. Dictionary<int, short[]> GetAoBuffer(string source);
  35. Dictionary<int, short[]> GetAiBuffer(string source);
  36. void SetDiBuffer(string source, int offset, bool[] buffer);
  37. void SetAiBuffer(string source, int offset, short[] buffer, int skipSize = 0);
  38. void SetBufferValue(string source, string variableName, object value);
  39. }
  40. }