public UInt32[] data = new uint[256]; //MAX 512 DATA public channel_data_16b Copy() { channel_data_16b cd = (channel_data_16b)MemberwiseClone(); cd.content = string.Copy(content); data.CopyTo(cd.data, 0); return(cd); }
static channel_data_16b get_only_1_scan_data(string data) { channel_data_16b chdata = new channel_data_16b(); string newData = data.Substring(84); string[] splitLines = newData.Split(" ".ToCharArray()); chdata.content = splitLines[0]; float.TryParse(splitLines[1], out chdata.scale_factor); float.TryParse(splitLines[2], out chdata.scale_factor_offset); chdata.start_angle = Convert.ToUInt32(splitLines[3], 16); chdata.steps = Convert.ToUInt32(splitLines[4], 16); chdata.amnt_data = Convert.ToUInt32(splitLines[5], 16); if (chdata.amnt_data != 0) { for (int i = 0; i < chdata.amnt_data; i++) { chdata.data[i] = Convert.ToUInt32(splitLines[6 + i], 16); } } return(chdata); }