56 lines
1.1 KiB
C#
56 lines
1.1 KiB
C#
|
using System;
|
||
|
using Aitex.Core.Util;
|
||
|
|
||
|
namespace Aitex.Core.RT.IOCore.Interlock.DataProvider.Base;
|
||
|
|
||
|
public abstract class IoValueProvider<TAccessor> : IInterlockLimitDataProvider
|
||
|
where TAccessor: IIOAccessor
|
||
|
{
|
||
|
#region Variables
|
||
|
|
||
|
private readonly R_TRIG _rTrigPollFailed = new();
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
#region Constructors
|
||
|
|
||
|
/// <summary>
|
||
|
/// 实例化数据拉取器
|
||
|
/// </summary>
|
||
|
/// <param name="io"></param>
|
||
|
/// <param name="module"></param>
|
||
|
protected IoValueProvider(TAccessor io)
|
||
|
{
|
||
|
Io = io;
|
||
|
}
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
#region Properties
|
||
|
|
||
|
public string Name => $"{Io.Type}-{Io.IoTableIndex}({Io.Name})";
|
||
|
|
||
|
/// <summary>
|
||
|
/// 返回当前数据拉取器需要拉取的数据路径。
|
||
|
/// <remarks>
|
||
|
/// 注意路径中不要包含Module名称。
|
||
|
/// </remarks>
|
||
|
/// </summary>
|
||
|
public TAccessor Io { get; }
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
#region Methods
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取数据。
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public virtual object GetValue()
|
||
|
{
|
||
|
throw new NotImplementedException();
|
||
|
}
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
}
|