Summary Searches a table column for a predefined unsigned value
long tab_suche_unsigned(char column[], unsigned long value)
column column in which the value is to be searched value unsigned-long value to be searched
Remarks The function tab_suche_unsigned searches the unsigned value in the column. As value, an unsigned value must be passed; otherwise, an internal arithmetical conversion (if necessary, with sign extension) is carried through. The table elements of the column are internally converted into numerical values and compared with the unsigned-long value. If a table element starts with the characters "0x" or "0X", it is interpreted as a hexadecimal number. In all other cases, the table element is interpreted as a decimal number. The searching process always starts in the second table row. After a successful search, the function returns TRUE (<>0); otherwise, FALSE (0). If the value was found, the reading pointer for the table points to the line where the value is located; if not, it points to the last table row (this is important for default values). The elements in this row can then be read out with tabget. If the column does not exist, the error BIP_0010 (Constant Data Access Error) [4] is triggered.
Return value TRUE if the value was found; otherwise, FALSE
See also tab_suche_index, tabget, tabset, tabsetext
Example table TST[3][]={
{ "NAME", "WERT", "NUMMER" }, { "A", "0", "0x0000" }, { "B", "768", "0x0300" } }
{ char buffer[];
unsigned long index;
tabset("TST");
index=0x300;
tab_suche_unsigned("NUMMER",index);
tabget(buffer,"NAME");
}
Result buffer = "B"
168
tabget
Summary Reads the values from the current table line void tabget(char destin[],char column[])
destin String buffer to take the value (V) column Column from which the value is taken
Remarks tabget reads a value from the current table line defined with tabseek or tab_suche_index. The value of column indicates from which column value must be taken. If the column does not exist the error BIP_0010 (constant data access error)[4] is returned.
Return value -
See also tab_suche_index, tabseek, tabset, tabsetext Example see tabset
Result -
tabline
Summary Positions the read pointer on the specified line long tabline(long line)
line Line number in the table (first line is 0)
Remarks tabline positions the read pointer on the specified line. The first line is numbered 0. If there is a line which the number matches, the function return TRUE (!0), otherwise FALSE (0). If there is no line which the number matches, the pointer is on the last line in the table (important for default values). The elements of this line can now be read using tabget.
Return value TRUE when the line exists, otherwise FALSE See also tab_suche_index, tabseek, tabset, tabsetext Example see tabseek
Result -
170
tabseek
Summary Searches in a table column for a value long tabseek(char column[],char value[])
column Column where the value will be searched value Value to be searched
Remarks The function tabseek searches for the string value in the column column. The search always begins with the second table line. If the search is successful the function returns TRUE (!0), otherwise FALSE (0). If the value is found, then the read pointer for the table is on the line with the found value, if not it is on the last line in the table (important for default values). The elements of this line can now be read using tabget. If the column does not exist the error BIP_0010 (constant data access error)[4] is returned.
Return value TRUE when value is found, otherwise FALSE See also tab_suche_index, tabget, tabset, tabsetext Example see tabset
Result -
tabset
Summary Sets and resets table processing void tabset(char tabname[])
tabname Name of table you wish to work with
Remarks Tables are constant two-dimensional arrays of strings. The values in the first line name the columns. A value can be searched in each column (tabseek, tab_suche_index). Each column can be read out of the line in which the value was found (tabget). Table processing must be initialized, and this is done with tabset which sets processing to a certain table. The name of the table must be defined as a string. After tabset, tabseek or tab_suche_index must be called first before tabget can be used. If the table does not exist the error BIP_0010 (constant data access error)[4] is returned.
Return value -
See also tab_suche_index, tabget, tabseek, tabset, tabsetext Example
tabseek("NAME","ONE");
tabget(buffer,"NUMBER"); // buffer = "0"
tabget(buffer,"VALUE"); // buffer = "1000"
tabseek("NUMBER","3");
tabget(buffer,"NAME"); // buffer = "TWO"
}
Result -
172
tabsetext
Summary Set and reset of table handling.
void tabsetext(char tabfile[],char tabname[])
tabfile name of ECU description file with table tabname tabname Name of table you wish to work with
Remarks Tables are constant two-dimensional arrays of strings. The values in the first line name the columns. Table processing must be initialized, and this is done with tabset which sets processing to a certain table. Is the table located in a different SGBD tabsetext has to be used. The parameters determine the name of the SGBD and the name of the table. If the table resides in the same SGBD set an empty string for tabfile (same functionality as tabset).
The search for tabfile starts in ECU directory, first for a variant SGBD. If it failed then for a group SGBD.
After tabsetext, tabseek or tab_suche_index must be called first before tabget can be used. A value can be searched in each column (tabseek, tab_suche_index). Each column can be read out of the line in which the value was found (tabget). The function call of tabsetext and the function calls for table access has to be in the same job.
Return value -
See also tab_suche_index, tabget, tabseek, tabset
Example tabsetext("file","TST"); // file.prg/grp Result
-uitoad
Summary Convert an unsigned interger number to a string in decimal notation.
void uitoad(char destin[],unsigned long value) destin Buffer to take the string (V)
value Number to be converted
Remarks uitoad converts the number value to a string with decimal notation without a sign. No leading zeroes are output.
Return value -
See also itoad, atoi, atoy, bcd2ascii, hex2ascii, itoax, ascii2hex
Example {
char destin[];
uitoad(destin,4294967295);
... }
Result destin="4294967295"
174
updateInfo
Summary Produces a string result during job processing void updateInfo()
Remarks This function produces a string result which can still be interrogated as the job is being processing.
Return value - See also - Example
updateinfo();
Result -
userbreak
Summary Produces an error message "BIP-0008: BEST BREAK"
void userbreak()
Remarks The function produces the error message "BIP-0008: BEST BREAK".
Return value - See also make_error Example
userbreak();
Result -
176