background image
<< Cleaning Up Generated Files | Opening a Report >>
<< Cleaning Up Generated Files | Opening a Report >>

CSV File Format

Test RealTime - User Guide
To import a .csv file into a test node:
1. From
the
Project Explorer, right click an existing test node.
2.
From the pop-up menu, select Add File...
3.
Locate and select the .csv file and click OK.
4.
By default, added files are excluded from the build. Click the Excluded marker
to allow the file to be built.
CSV File Format
The input file format must respect the following formatting rules:
·
The default separator is a semicolon character (";"). This can be changed in the
General Settings dialog box.
·
The first line contains the names of the variable arrays
·
The second line optionally specifies the data type: string, char or int, long, float
and double, which can be signed or unsigned. if this information is not
specified, then int is assumed by default.
·
Each following line contains the data for the corresponding array
·
When a blank file is encountered, an end of array is assumed. Any further
values for that array will be ignored.
When the test node is built, Test RealTime produces a
<filename>
.h header file,
where
<filename>
is based on the name of the input
< ilename>
.csv file.
f
Use the arrays produced by the .csv file by including
<filename>
.h into your test
script or source code.
Example
This is an example of a valid table.csv data table:
var_A;var_B;var_C
int;signed int;float
12;34;45.2345
14;2;3.142
;-5;0
This produces the following corresponding table.h file:
int var_A[]={12,14};
signed int var_B[]={34,2,-5};
float var_C[]={45.2345,3.142,0};
300