Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

C# binaryformatter.serialize without header?

Solved!
Go to solution

Hi there,

 

I have a USB 5232 digitizer and am streaming data to disk based on the N.I. shipping example "StreamToDisk.cs".  The streaming is going great.  The problem is that I need to read the resulting data file on a Linux platform in c++.  So I am trying to decipher the format of the file.  It seems to have a header at the top of the file that we may be able to live with, but would prefer not to.  The data are streamed like this:

 

                    binaryFormatter.Serialize(fileStream, records[0].GetScaledData());

which produces a file full of double precision floating points preceded by a header.  If we try

 

                    binaryFormatter.Serialize(fileStream, records[0].GetScaledData(), null);

 

we seem to get the same file with the same header.   

 

Would anyone happen to know if we can stream just the data by itself, without the header?  Or, if we have to have the header, can someone tell me what is in it?  I am attaching an example of one of our data files to this post with a ".txt" extension even though it is binary.  Thanks for any thoughts.

 

Regards,

Penny

 

0 Kudos
Message 1 of 2
(6,442 Views)
Solution
Accepted by topic author Penny

Hi,

I believe that my question above is not as important as it seemed.  The header contains 26 bytes and can just be read and discarded.  It would be nice to know what is in it, or how to get rid of it, but it seems just as easy to step through it and ignore it.  Thanks.

Regards,

Penny

 

0 Kudos
Message 2 of 2
(6,428 Views)