05.07.2013 Views

BSA Flow Software Installation and User's Guide - CSI

BSA Flow Software Installation and User's Guide - CSI

BSA Flow Software Installation and User's Guide - CSI

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data<br />

C Headers<br />

Programming Examples<br />

Offset Bytes Field description<br />

000H 2 Version.<br />

002H 4 Size of this data header.<br />

006H 64 Name of data array.<br />

046H 4 Reserved.<br />

04AH 4 Data type:<br />

0 = double precision<br />

1 = float precision<br />

2 = integer<br />

04EH 4 Data size.<br />

8 = double precision<br />

4 = float precision<br />

4 = integer<br />

052H 4 Data count.<br />

056H 4 Reserved.<br />

05AH 16 Reserved.<br />

070H 16 Reserved.<br />

086H 32 Reserved.<br />

Table 2 Format of Binary Export data header.<br />

Data is placed immediately after the data header. The size of the data block<br />

is given by: Data size * Data count. Data is saved in double presition,<br />

floating point or integer format given by the Data type value, see Table 3.<br />

Data type Data size Data formats<br />

0 8 bytes Double precision floating point<br />

1 4 bytes Floating point<br />

2 4 bytes Integer<br />

Table 3 Data formats.<br />

The header structures for C/C++ can be found in the “DXExportHeader.h"<br />

file included in the samples directory on the CD-rom.<br />

A sample program for the binary export is placed on the CD-rom. In the<br />

samples directory a tool is also included for converting a binary export file<br />

to an ASCII file.<br />

//Ex1: Open <strong>and</strong> read file header information<br />

int main(int argc, char* argv[])<br />

{<br />

char id[6] = {0}; // binary export file id<br />

short version = 0; // file header version<br />

long size = 0; // file header size<br />

printf("Open <strong>and</strong> read file header information\n");<br />

char filename[256] = {0};<br />

strcpy(filename,argv[1]);<br />

int fh = _open(filename,_O_RDONLY|_O_BINARY);<br />

<strong>BSA</strong> <strong>Flow</strong> <strong>Software</strong>: Project explorer objects 5-55

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!