Sic.Framework-Nanjing-Baishi/MECF.Framework.Common/Aitex/Core/RT/IOCore/AOAccessor.cs

24 lines
663 B
C#

using Aitex.Core.RT.DataCollection.HighPerformance;
using Aitex.Core.Util;
using MECF.Framework.RT.Core.IoProviders;
namespace Aitex.Core.RT.IOCore
{
public class AOAccessor : IOAccessor<float>
{
public AOAccessor(string name, int index, string address, bool isSimulator = false)
: base(name, index, address, IOType.AO, isSimulator)
{
}
/// <inheritdoc />
protected override void SetValue(int index, float value)
{
Buffer[index] = value;
if (!IsSimulator)
DataRecorderManager.Instance.ImmediateCache();
Singleton<IoProviderManager>.Instance.GetProvider(base.Provider)?.SetValue(this, value);
}
}
}