public void LoadBlock(StorageBlock block) { int length = StorageBlock.StorageBlockSize; while (--length >= 0) { block.Write(Next()); } }
public int CollectPoints(StorageBlock block, int length) { Thread.Sleep(50); for (int i = 0; i < length; i++) { //block.Write(Next()); block.Write(0.0001f); } return(length); }
public void LoadBlock(StorageBlock block) { int capacity = block.Capacity; while (--capacity >= 0) { var p = OnePoint(); if (p == null) { break; } block.Write((float)p); } }
public int CollectPoints(StorageBlock block, int length) { int i; for (i = 0; i < length; i++) { var p = OnePoint(); if (p == null) { break; } block.Write((float)p); } return(i); }
public void LoadBlock(StorageBlock block) { int length = StorageBlock.StorageBlockSize; for (int i = 0; i < length; i++) { float?p; var tp1 = ReadPoint(); var tp2 = ReadPoint(); p = _channel ? tp1 : tp2; block.Write(p == null ? 0.0f : (float)p); //var p = ReadPoint(); //block.Write(p == null ? 0f : (float)p); } }
public int CollectPoints(StorageBlock block, int length) { Thread.Sleep(50); for (int i = 0; i < length; i++) { float data = getDI145Data(); if (data == 0f) { data = 0.015f; } block.Write(data * 30); } return(length); }
public int CollectPoints(StorageBlock block, int length) { Thread.Sleep(50); for (int i = 0; i < length; i++) { block.Write(Next()); string str = @"Data Source=WIN-13B7K72BH2U;Initial Catalog=logintest;Persist Security Info=True;User ID=sa;Password=sa"; SqlConnection conn = new SqlConnection(str); conn.Open(); string selectsql = "insert into logintest (data) values (" + _last + ")"; SqlCommand cmd = new SqlCommand(selectsql, conn); cmd.CommandType = CommandType.Text; SqlDataReader sdr; sdr = cmd.ExecuteReader(); conn.Close(); } return(length); }
public int CollectPoints(StorageBlock block, int length) { int i; for (i = 0; i < length; i++) { float?p; var tp1 = ReadPoint(); var tp2 = ReadPoint(); p = _channel ? tp1 : tp2; if (p == null) { break; } block.Write((float)p); /*var p = ReadPoint(); * if (p == null) break; * block.Write((float)p);*/ } return(i); }