public void WritePoints(ushort startAddress, TPoint[] points) { for (ushort index = 0; index < points.Length; index++) { this[(ushort)(index + startAddress)] = points[index]; } StorageOperationOccurred?.Invoke(this, new StorageEventArgs <TPoint>(PointOperation.Write, startAddress, points)); }
public TPoint[] ReadPoints(ushort startAddress, ushort numberOfPoints) { var points = new TPoint[numberOfPoints]; for (ushort index = 0; index < numberOfPoints; index++) { points[index] = this[(ushort)(index + startAddress)]; } StorageOperationOccurred?.Invoke(this, new StorageEventArgs <TPoint>(PointOperation.Read, startAddress, points)); return(points); }