Q:[WAVE]:Reading binary data? [message #5950] |
Thu, 07 March 1996 00:00 |
Sergei Senin
Messages: 23 Registered: February 1996
|
Junior Member |
|
|
Hello
Problem: can't read data file generated by C programme in binary format
-------
Data structure:
--------------
sequential file of form
4 bytes float - start of the record flag (zero) |-
10 bytes char - (date) | |r
8 bytes char - (time) | "header 1" |e
2 bytes integer - sampling time | |c
4 bytes float | |o
4 bytes float | |r
4 bytes float | "data 1" - , say, 10 repetitions|d
4 bytes float | |
.repeated... | |1
4 bytes float - start of the record flag (zero) |-
10 bytes char - (date) | |
8 bytes char - (time) | "header 2" |r
2 bytes integer - sampling time | |e
4 bytes float | |c
4 bytes float | |o
4 bytes float | "data 2" - , say, 15 repetitions|r
4 bytes float | |d
.repeated... | |
.etc.. |2
.etc.. |-
each "data N" length is different, beginning of a new record indicated by
4 bytes float zero
Question:
--------
How do I read it?
---------------------
Thanks in advance :-)
--
Sergei Senin
University of Portsmouth
Department of Electrical and Electronic Engineering
Microwave, Telecommunications and Signal Processing Research Group
Anglesea Building, Anglesea Road,
Portsmouth,P01 3DJ,England.
ss@ee.port.ac.uk, http://www.ee.port.ac.uk:80/~ss-www/WAVE/
|
|
|