private DataEntry ReadData() { DataEntry result = null; do { var id = (DataID)_sr.ReadUInt16(); var length = _sr.ReadUInt16(); DataHeader header = new DataHeader(id, length); switch (id) { case DataID.InternalTemp: result = new TemperaturEntry(header, _sr.ReadBytes(length * TemperaturEntry.DataLength)); break; default: break; } } while (result == null); return(result); }
public DataEntry(DataHeader header) { Header = header; }