using FxpConvert.Common; using System.Reflection; namespace NIFPGA { public sealed class FPGAArrayFXPWriteProperty : FPGABaseProperty { Interop.NiFpgaDll_ReadArrayU8 Read; Interop.NiFpgaDll_WriteArrayU8 Write; private NiFpga_FxpTypeInfo _TypeInfo; private IFxpConvert _Convert; private byte[] tempbuffer = new byte[0]; private ulong[] tempvalue = new ulong[0]; private double[] doubles = new double[0]; internal FPGAArrayFXPWriteProperty(FPGASession session, uint indicator, uint count,NiFpga_FxpTypeInfo typeInfo, IFxpConvert convert) : base(session, indicator,false) { _Convert = convert; Count = count; tempvalue = new ulong[count]; doubles = new double[count]; _TypeInfo = typeInfo; tempbuffer = new byte[(int)Math.Ceiling(typeInfo.wordLength*count / 8.0)]; Read = _Session.GetDelegate(); Write = _Session.GetDelegate(); } private double[] GetData() { _Session.CheckResult(Read(_Session.Session, Indicator, ref tempbuffer[0], (uint)tempbuffer.Length)); string s = string.Empty; for(int i=0;i GetData(); set => SetData(value); } } }