using System.Collections.Generic;
using Aitex.Core.RT.IOCore;

namespace MECF.Framework.RT.Core.IoProviders
{
	public interface IIoBuffer
	{
        IReadOnlyDictionary<string, DIAccessor> DIMap { get; }

        IReadOnlyDictionary<string, DOAccessor> DOMap { get; }

        IReadOnlyDictionary<string, AIAccessor> AIMap { get; }

        IReadOnlyDictionary<string, AOAccessor> AOMap { get; }

        void CreateBuffer(string provider, List<IoBlockItem> lstBlocks);

		void SetIoMap(string provider, int blockOffset, List<DIAccessor> ioList);

		void SetIoMap(string provider, int blockOffset, List<DOAccessor> ioList);

		void SetIoMap(string provider, int blockOffset, List<AIAccessor> ioList);

		void SetIoMap(string provider, int blockOffset, List<AOAccessor> ioList);

		void MapIoBuffer(string provider, Dictionary<int, string> ioMappingPathFile);

		void MapIoBufferByModule(string provider, string ioMappingPathFile, string module);

		Dictionary<int, bool[]> GetDoBuffer(string source);

		Dictionary<int, bool[]> GetDiBuffer(string source);

		Dictionary<int, float[]> GetAoBuffer(string source);

		Dictionary<int, float[]> GetAiBuffer(string source);

        void SetDiBuffer(string source, int offset, bool[] buffer);

		void SetDoBuffer(string provider, int offset, bool[] buffer);

		void SetAiBuffer(string source, int offset, float[] buffer, int bufferStartIndex = 0);

		void SetAoBuffer(string source, int offset, float[] buffer, int bufferStartIndex = 0);
	}
}
