| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This library provides the low-level interface to data tables. You can use the function from this library as replacement to standard ddt-functions even if you don't need other nice FRM feaures.
Here we implement our own ddt-interface and add plenty of other functions which make this interface very powerful. This library maintains a set of internal buffers which hold the table data and numerous other information. One of the "side-effects" (but since WR 6.0 one of the most important features) is the ability to use the same table from more than one main test within the same chain.
The most important feature of this interface is that you may also index table rows by some unique name (very much the same as you index columns by defining their names in the first row). For this to work the table MUST contain two columns named "IDX" and "Name". To index a row you need to define some name in the Name-column and place an "x" in the IDX-column.
For example imagine a table "Tab.xls" with the following content:
IDX | Name | a | b | c | d |
---|---|---|---|---|---|
x | Block1 | 1 | 2 | 3 | 4 |
1 | 1x1 | 1x2 | 1x3 | 1x4 | |
2 | 1x1 | 2x2 | 3x3 | 4x4 | |
x | Block2 | x | y | z | |
a | ax | ay | az | ||
b | bx | by | bz | ||
c | cx | cy | cz |
FRM_get_cell( "Tab.xls", "b", "Block1", val );
to retreive "2"
in variable val
no matter what row
used to be active before.
From then on you could use
FRM_get_next( "Tab.xls", "b", val );
to retreive "1x2"
in variable val
and so on.
PUBLIC VARIABLES
Method Summary | |
int | FRM_close(in tid, in drop) Closes the given table and frees occupied memory. |
int | FRM_close_all(in drop) Closes all open tables. |
int | FRM_close_all_except(inout[] xtabs, in drop) Closes all open tables except the specified ones. |
int | FRM_convert_mode(in mode) Convert the given mode from one representation to another
(string2code and code2string). |
int | FRM_exec(in tid, in test) Executes the content of the next cell. |
int | FRM_GEN_print(in tid, in gui_obj, in val, in rc) This function was used for generating test data in GEN mode. |
int | FRM_GEN_set(in tid, in test, in gui_obj, in val, in rc) #???# #???# |
int | FRM_get(in tid, in test, out val, in row) Returns the content of the cell specified by the given column name and, optionally, with the row number. |
int | FRM_get_block(in tid, in idx, out x, out y, out[] arr) Returns a two-dimensional block from the table as array. |
int | FRM_get_cell(in tid, in test, in idx, out val) Returns the content of the cell specified by the given row ( idx )
and column (test ) names. |
int | FRM_get_current_row(in tid, out row) Retrieves the active row of a data table. |
int | FRM_get_mode(in tid) Returns the active frame mode. |
int | FRM_get_name(in tid) Returns the table name of the corresponding tid or empty string ("") if tid unknown. |
int | FRM_get_next(in tid, in test, out val) Returns the content of the cell from the given column ( test )
and the row following the currently active row. |
int | FRM_get_parameters(in tid, out params, out count) Returns a list of all loaded parameters in a FRM data table. |
int | FRM_get_row_count(in tid, out count) Retrieves the number of rows in a data table. |
int | FRM_get_tid(in table) Returns the table ID of the corresponding table or empty string ("") if table unknown. |
int | FRM_getvar(in tid, in var, out val) Retrieves the value of a given FRM variable <var>. |
int | FRM_has_next(in tid, in test) Indicates whether the cell in the next row contains data or not. |
int | FRM_idx(in tid, in idx, out row) Positions the focus to the row specified by its name <idx>. |
int | FRM_init_block(in tid, in test, in idx, inout mode) Performs the initialisation for the given test block. |
int | FRM_is_modified(in tid) Reports whether a given table is modified or not. |
int | FRM_is_open(in tid) Reports whether a given table is open or not. |
int | FRM_is_parameter(in tid, in param) Returns whether a parameter in a data table is valid. |
int | FRM_is_row(in tid, in row) Indicates whether a given <row> exists in the given <tid>. |
int | FRM_is_table_open(in table, out tid) Reports whether a given table is open or not. |
int | FRM_load_gui(in tid, in gui) Loads a GUI map <gui> in scope of the specified <tid>. |
int | FRM_load_lib(in tid, in lib, in p1, in p2) Loads a library <lib> in scope of the specified <tid>. |
int | FRM_load_test(in tid, in test) Loads an individual column (test) into an already opened data table. |
int | FRM_log_frm_info(in tid, in test, in val) |
int | FRM_log_full_call_chain(in depth_offset) Dumps the debug info for the calling chain starting with depth_offset . |
int | FRM_log_obj_info(in obj) |
int | FRM_log_short_call_chain(in level) Dumps the debug info for the 1 level deeper in the calling chain. |
int | FRM_next_row(in tid) Changes the active row in a data table to the next row. |
int | FRM_open(in table, in tests, out tid) Opens a data lt;table> and loads the desired <test>s (columns). |
int | FRM_rc(in rc, in func, in tid, in test, in val, in obj) In case of <rc> != E_OK this function formats an tl_step -message
from the given parameters. |
int | FRM_rc2(in rc, in msg, in title) In case of <rc> != E_OK this function formats an tl_step -message
from the given parameters. |
int | FRM_save(in tid) Saves the given table. |
int | FRM_set(in tid, in test, in val, in row) Saves the given value ( val ) in the cell specified by the column
name (test ) and, optinally, the row number. |
int | FRM_set_mode(in tid, in mode) Sets the active frame mode. |
int | FRM_set_row(in tid, in row) Sets the active row in a data table. |
int | FRM_set_val(in tid, in param, in val) Sets a value in the current row of the data table. |
int | FRM_set_val_by_row(in tid, in row, in param, in val) Sets a value in a specified row of the data table. |
int | FRM_setvar(in tid, in var, in val) Allocates a new or overwrites an existing variable <var> with the initial value <val>. |
int | FRM_skip(in tid, in rows) Skips the given number of rows. |
int | FRM_val(in tid, in param) Returns the value of a parameter in the active row in a data table. |
int | FRM_val_by_row(in tid, in row, in param) Returns the value of a parameter in the specified row in a data table. |
Method Detail |
public int FRM_close(in tid, in drop)
NOTE! If table was modified, it is automatically saved before closing.
public int FRM_close_all(in drop)
public int FRM_close_all_except(inout[] xtabs, in drop)
public int FRM_convert_mode(in mode)
mode
from one representation to another
(string2code and code2string). If none of the conversion succeeds, the
the unchanged value is returned.public int FRM_exec(in tid, in test)
public int FRM_GEN_print(in tid, in gui_obj, in val, in rc)
NOTE! Since implementing the save capability for FRM-tables (effectively modifying test date in place) this function is not used any more.
public int FRM_GEN_set(in tid, in test, in gui_obj, in val, in rc)
public int FRM_get(in tid, in test, out val, in row)
A cell which is supposed to be ignored (an empy cell, a cell that contains no data), is indicated with E_FRM_SKIP. If an empty string ("") needs to be used as test data, then the cell must contain one of the following two strings <<cler>> or <<leer>> (including angle brackets).
NOTE!
If row
is not defined, the current row is used.
public int FRM_get_block(in tid, in idx, out x, out y, out[] arr)
To define a block in the test table you must format it in a special way. An example of one such table follows.
IDX | Name | a | b | c | d |
---|---|---|---|---|---|
x | Block1 | 1 | 2 | 3 | 4 |
1 | 1x1 | 1x2 | 1x3 | 1x4 | |
2 | 1x1 | 2x2 | 3x3 | 4x4 | |
<<END>> | |||||
x | Block2 | x | y | z | |
a | ax | ay | az | ||
b | bx | by | bz | ||
c | cx | cy | cz | ||
<<END>> |
public int FRM_get_cell(in tid, in test, in idx, out val)
idx
)
and column (test
) names.
A cell which is supposed to be ignored (an empy cell, a cell that contains no data), is indicated with E_FRM_SKIP. If an empty string ("") needs to be used as test data, then the cell must contain one of the following two strings <<cler>> or <<leer>> (including angle brackets).
NOTE! For this to work the <idx> must be the content of some row in FRM_COL_NAME marked with "x" in FRM_COL_IDX.
public int FRM_get_current_row(in tid, out row)
public int FRM_get_mode(in tid)
public int FRM_get_name(in tid)
public int FRM_get_next(in tid, in test, out val)
test
)
and the row following the currently active row.
A cell which is supposed to be ignored (an empy cell, a cell that contains no data), is indicated with E_FRM_SKIP. If an empty string ("") needs to be used as test data, then the cell must contain one of the following two strings <<cler>> or <<leer>> (including angle brackets).
NOTE! This routine modifies the currently active row. It does this before fetching the value. If an attemp is made to fatch the value beyond the last row, E_OUT_OF_RANGE is returned.
public int FRM_get_parameters(in tid, out params, out count)
NOTE!
Does NOT return columns IDX
and name
because they
are always there. For this reason the number returned is the number of all
(loaded) parameters minus 2.
params
and count
provided
!E_OK: faliure; params
and count
not providedpublic int FRM_get_row_count(in tid, out count)
public int FRM_get_tid(in table)
public int FRM_getvar(in tid, in var, out val)
NOTE! If it equals to "" the scope of the variable is is Frame-global. Otherwise the variable has table-scope. If table is closed, all variables in its scope are automatically unloaded. Global varables are unloaded only with FRM_close_all().
public int FRM_has_next(in tid, in test)
public int FRM_idx(in tid, in idx, out row)
NOTE! The row must be indexed.
public int FRM_init_block(in tid, in test, in idx, inout mode)
NOTE
Important change since version 6.02.01.00: mode sent as parameter to
this function takes presedence over the mode of the test block header.
public int FRM_is_modified(in tid)
public int FRM_is_open(in tid)
public int FRM_is_parameter(in tid, in param)
public int FRM_is_row(in tid, in row)
public int FRM_is_table_open(in table, out tid)
public int FRM_load_gui(in tid, in gui)
NOTE! If table is closed, all GUI maps in its scope are automatically unloaded.
public int FRM_load_lib(in tid, in lib, in p1, in p2)
NOTE! If table is closed, all libraries in its scope are automatically unloaded.
public int FRM_load_test(in tid, in test)
public int FRM_log_frm_info(in tid, in test, in val)
public int FRM_log_full_call_chain(in depth_offset)
depth_offset
.public int FRM_log_obj_info(in obj)
public int FRM_log_short_call_chain(in level)
public int FRM_next_row(in tid)
public int FRM_open(in table, in tests, out tid)
NOTE
This routine returns the tid
(table ID). Unlike the ddt_
you have to use this id when calling other FRM functions.
public int FRM_rc(in rc, in func, in tid, in test, in val, in obj)
tl_step
-message
from the given parameters. It automatically determines the current row number
in the data table.public int FRM_rc2(in rc, in msg, in title)
tl_step
-message
from the given parameters. It automatically determines the current row number
in the data table.rc
public int FRM_save(in tid)
NOTE! This funtion only works with WR 6.0 or higher.
public int FRM_set(in tid, in test, in val, in row)
val
) in the cell specified by the column
name (test
) and, optinally, the row
number.
NOTE! The change is not made permanent yet. You must call FRM_save() in order to transfer your changes back to the Excel table.
public int FRM_set_mode(in tid, in mode)
public int FRM_set_row(in tid, in row)
public int FRM_set_val(in tid, in param, in val)
val
set
E_NOT_PARAMETER: failure; invalid parameter (column) name
else: other errorpublic int FRM_set_val_by_row(in tid, in row, in param, in val)
val
set
E_NOT_PARAMETER: failure; invalid parameter (column) name
else: other errorpublic int FRM_setvar(in tid, in var, in val)
NOTE! If it equals to "" the scope of the variable is is Frame-global. Otherwise the variable has table-scope. If table is closed, all variables in its scope are automatically unloaded. Global varables are unloaded only with FRM_close_all().
public int FRM_skip(in tid, in rows)
NOTE!
If rows
is not given, one row is skipped. Therefore
FRM_skip( tab );
is equivalent to FRM_skip( tab, 1 );
.
FRM_skip( tab, 0 );
also skips to next row because 0 is taken as
the equivalent for "not given".
If rows
is negative, the function skips backwards. Therefore
FRM_skip( tab, -3 );
jumps for example from row 15 to row 12.
public int FRM_val(in tid, in param)
public int FRM_val_by_row(in tid, in row, in param)
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |