INPA_Help

Page 1

Contents General information about INPA General The interpreter for test INPA is a system for easy creation and execution of test runs. The test will be in a problem-oriented C-like programming language, which also restrict access to the required test hardware and software. EnhancedDiagnosticInterfaceComputer EDIC is a programmable microprocessor for communicating with control units of vehicles.

ElektronikDIAgnoseBASissytem EDIABAS allows centralized management of the entire control communication on the Diagnosebus about the EDIC. Application Programming Interface API is the standardized interface of EDIABAS Electronic diagnosis ELDI is a diagnostic system for the automotive industry ELDI / 3 is a program system for the diagnosis of electronic control units in vehicles. Compared to its predecessor ELDI / RO demonstrate two main new characteristics: it is widely configurable and runs as a multitasking application under MS Windows. The configurability is on the spot by the system administrator, without re-compile the system or left to them. It is enough, the corresponding Configuration files with a default editor to edit, eg SETUP file or Jobauswahltabelle (s) to the input handler, and Zeilenend Output Handler Jobs, and the sequence of normal Pr端fjobs to new circumstances. GesamtJobTabelle GJT sets out the conduct of examinations in ELDI-system FehlerAusBlendManager FAB allows for the targeted suppression of errors when


reading the error memory (FS) of control (SG). RK512 is a communications protocol

Configuration Configuration (path: \ INPA \ cfgdat) The configuration files have the format of Windows INI files. They contain several sections, whose names are enclosed in square brackets (example: [FAB]), in which different items are included. These have the following meanings: Section [FAB]: Here the path to the Fehlerausblenddateien be given. This path is also to be effective, the INPA INPALOAD or as a job under WINELDI runs. (The names of Fehlerausblenddateien arise from the current SG name and the suffix '. Fab'): FABDATEIEN = \ INPA \ FAB Section [ENVIRON]: Printer settings for screen prints: PRINTER = WIN - screen prints are made on the Windows Print Manager on the configured Windows default printer. NOTE: The Print Manager must be started! PRINTER = PEM - screen prints will be on the affiliated WinEldi-printer PRINTER = YES - screen prints will be on the affiliated WinEldi-printer PRINTER = NO - screen prints are included in the file. \ TRACE \ p.trc issued and can be made with a DOS-View program to appear Cessation of multilingualism: GERMAN LANGUAGE = - program texts and messages in German LANGUAGE = ENGLISH - program texts and messages in English Default setting of the type used in the editor:


EDITOR = DOS - script editing with DOS as the default editor EDITOR = WIN - Editing with Windows Script Editor as the default setting PEM = YES - Enables the protocol Label Manager. DTM = YES - INPA, the order data from the DTM used in DTM = NO, all accesses to the data in the DTM denied. Type of script selection for INPA (not effective for INPALOAD!): SELECT LIST SCRIPT = script selection list according to the entries in the script file selection SCRIPT = SELECT DIALOG - Script selection via a standard dialog Settings for INPA and INPALOAD using WINELDI input handler: NETWORK DATA = \ INPA \ bin \ net.dat - settings file name for the network access to the job data Decodiertabelle_D_Alle = - Dekodiertabellen order data for decoding Decodiertabelle_E_E36 = - Dekodiertabellen order data for decoding Splittingfile = - Name of Barcodeauftrennungsdatei (for bar code decoding). (The above entries are the default entries, and only relevant when the input handler or INPA INPALOAD is invoked without the WINELDI while running) Structuring of the script selection: DEFINE = inpascr.ini See also: Command Line Options

File Structure File structure of a script interpreter for INPA File Structure


The picture shows the schematic structure of a Prüfablaufbeschreibungsdatei. The information in the headings "Includes", "external function declarations, function declarations imported" and "global data definitions are optional, however, is the presence of a Prüfablaufbeschreibung with the functions" inpainit () "at the start and" inpaexit () "to quit of the study is mandatory. For the translation time is the Prüfablaufbeschreibungsdatei a syntax check, which may lead to an error message. Prüfablaufbeschreibungsdateien that are not correctly translated could be, are not executable at runtime. Pragmas Pragmas are instructions to the translator to control the translation process. The syntax is defined as follows: # pragma <identifer> The following pragmas are available for controlling the character conversion during the translation process are available: # pragma winedit The script is written with a Windows editor written. There should be no conversion OEMToAnsi implemented. # pragma dosedit: The script is written with a DOS-based editor written. To carry out a conversion OEMToAnsi implemented. The o.g. Pragmas change in the configuration file editor defined setting only for the duration of the translation process. After completion of the translation is again in the configuration file defined default editor setting enabled. Includes With the "# include" statement in the INPA Prüfablaufbeschreibungsdatei other script files are included. It should be noted that only an include-level, ie nested includes are not possible. In the files the script elements can in principle occur in any order.


However, functions and data to be defined before use, with functions possibly a forward declaration of "external" to be carried out. It is therefore appropriate header files with extern declarations at the beginning includi script and every global data to define. Then, e.g. Script include files with standard script elements to be included before other definitions of script elements follow. The prototypes (external declarations) of all functions of the INPA-standard library are located in the file "inpa.h", which normally in any INPA-Scipt is included. Syntax: # include "<filename>" Example: # include "inpa.h" Imported functions INPA offers from version 4.4.0 the possibility of functions from INPA-strangers libraries. The functions need to be imported into INPA about function declarations bekanntugegeben werd. INPA then loads the library with the corresponding function for the duration of the script and executes the function - for the script not distinct from other functions - such as an INPA function. The declaration of the imported functions similar to the declaration of internal functions. Since the declaration of the parameters with directional information, data type and parameter names must be specified, the correct use of the function within the parameters INPA scripts by the parser will be reviewed, but the consistency of the actual calling convention can not be verified. Syntax: import [ "C" | pascal] lib "DllName [:: DLLInternerFncName] function name (r_info: <datentyp>, r_info: <datentyp> ,..., r_info: <datentyp>, [returns: <datentyp>]); Example: import pascal lib "User.exe" MessageBox (in: int hWnd, in: string myText, in: Title string, in flags, returns: int ret); External function declarations


External function declarations are used by library functions to be declared. Within a Pr端fablaufbeschreibungsdatei they can also forward declaration to be used, ie one in the file header externally declared function within the file can be used before it is defined. Since the declaration of the external parameters with directional information, data type and parameter names must be specified, the correct use of the function parameters by the parser to be reviewed. Syntax: External function name (r_info: <datentyp> PAR1, r_info: <datentyp> par2 ,..., r_info: <datentyp> parx); Example: extern text_output (in: int row, in: int column, in the output string text); Global data definitions Variables can be agreed, in a global data pool kept. These are the following data types are possible: - Byte (8-bit characters) - Int (16-bit integer) - Long (32-bit integer) - Real (floating point with double precision) - Bool (true value, TRUE or FALSE) - String (zero-terminated string) The agreed global variables can be initialized, the same type variable after the type specifier can be comma separated. Syntax: <datentyp> varname; Example: byte a = 41, / * Where "a" * / int i; long l = -20000; real pressure, temp; bool valid = FALSE; string status = "open"; Pr端fablaufbeschreibung (PABS) The Pr端fablaufbeschreibung, at least from the initialization "inpainit ()", the test starts, and the scheduling feature inpaexit () ", the test ended.


About initialization "inpainit ()", the applicationspecific test called the descriptions of the screen, menu controls and custom functions may exist. The use of screen displays and menu control for a test is optional, ie it can also test without ads on the screen to be defined. End principle End principle of INPA INPA supports three modes: Script selection by the user: INPA is no indication of command line parameters. This is the startup script is loaded to the user an interactive script allows selection. After calling the exit () function in the processing of the script selected by the user, the startup script reloaded. Script by selecting the script itself: Starting with version 4.4.0 is in the function INPA change script to change a script from another out available. Direct script execution The name of the script file to interpret the will of INPA call on the command line. This script is loaded and processed immediately. After calling the exit () function will exit the interpreter.

In all modes are after loading the script interpreter from the following: Initialization of the script and execution of the script function inpainit Pseudo-parallel execution of code blocks of the activeSCREEN, and STATE MACHINE MENU Objekte.Ein switching between the code blocks of the active objects is always after complete execution of a code block, where MENU blocks have the highest priority. The execution by the


execution of the library function exit () terminates. Calling the script function inpaexit to execute functions of the end user. Language Elements Custom Functions Custom Functions Custom functions can be of any place in the test description are called. If a function should be used before it is declared, it is like a forward declaration of an external function declaration is necessary. Syntax: function_name (richt_info: param_typ param_1,..., richt_info: param_typ param_n) ( / * Local data * / . . . / * Statements * / . . . ) Each parameter in the declaration must be complete (with three coefficients) may be indicated. The coefficients have the following meanings: - Directional information (richt_info) - In: the parameters may be read-only access - Out: on the parameters can only write access - Inout: the parameter to read and write may be accessed - Parameter (param_typ) -

Byte (8-bit integer) Int (16-bit integer) Long (32-bit integer) Real (floating point with double precision) Bool (true value, TRUE or FALSE) String (zero-terminated string)

- Parameter name (param_n) the user can arbitrarily be defined


Sample Beispiel: Statemachines, Timer, Funktionen, Titel setzen // // I N C L U D E S // #include "inpa.h"

//********************************** // E X T E R N A L S //********************************** //********************************** // D A T A //********************************** // Allg. Variablen bool var_digital_1; // Timerwerte int tn_screen_demo = 0; int tv_screen_demo_digital = 10000; int tn_delay = 1; int tv_delay = 1000; /////////////////////////////////////////////// ////// FUNCTIONS /////////////////////////////////////////////// check_sm_return( in: int timer_num) { bool return_flag; testtimer( timer_num, return_flag); if( return_flag == TRUE) { returnstatemachine(); } } toggle_boolvar( inout: bool b) { if( b == TRUE) b = FALSE; else b = TRUE; } /////////////////////////////////////////////// ////// STATEMACHINES


/////////////////////////////////////////////// STATEMACHINE sm_delay() { bool expired_flag; INIT { settimer( tn_delay, tv_delay); setstate( Z_WAIT_TIMER); } Z_WAIT_TIMER { testtimer( tn_delay, expired_flag); if( expired_flag == TRUE) returnstatemachine(); } Z_END { } }

SCREEN s_screen_demo_digital() { LINE( "Digitalausgabe", "") { ftextout( "Digitalausgabe:", 1, 5, 0, 1); digitalout( var_digital_1, 2, 30, "EIN ", "AUS "); textout( "", 3, 1); } } STATEMACHINE sm_screen_demo_digital() { INIT { setscreen( s_screen_demo_digital, TRUE); settimer( tn_screen_demo, tv_screen_demo_digital); var_digital_1 = FALSE; setstate( Z_1); } Z_1 { toggle_boolvar(var_digital_1); callstatemachine( sm_delay); check_sm_return( tn_screen_demo); } }

///////////////////////////////////////////////


////// M A I N /////////////////////////////////////////////// STATEMACHINE sm_main() { INIT { setstate( Z_SCREEN_DEMO); } Z_SCREEN_DEMO { callstatemachine( sm_screen_demo_digital); setscreen( s_main, TRUE); setstate( Z_END); } Z_END { messagebox( "Meldung", "Ende der Demo"); exit(); } } MENU m_main() { INIT { setmenutitle( "Hauptmen端"); } ITEM( 10, "Ende") { exit(); } } SCREEN s_main() { }

/////////////////////////////////////////////// ////// INIT/EXIT /////////////////////////////////////////////// inpainit() { settitle( " Demoscript"); setmenu( m_main); setscreen( s_main, TRUE); setstatemachine( sm_main); } inpaexit() { }


Imported functions Imported functions Starting with version 4.4.0 INPA can also use functions from other libraries for execution within a script using. As `functions from external libraries' functions are called outside INPAs have been implemented. INPA currently INPA Views from a script into a Windows dynamic library (DLL). INPA functions can be imported `import'-known instructions in the script can be made: Syntax: import [<CallConv>] lib "libname [:: LibFnc]" <functionname> ([<declaration_list>]); Description: Any declaration of imported functions necessarily begins with the keyword `import '. Alternatively, between the keyword `import 'and` lib' is used to specify calling convention: CallConv: pascal (default value) uses the INPA `Pascal" calling convention "C" INPA use the `C 'calling convention After the keyword `lib ', the name of the library can be specified. Here are the following information available: "Libname": "C: \ TMP \ myLib.dll" indication of a library with an absolute or relative path "myLib.dll" library without specifying the path (the library must be either already in the memory of Windows to be loaded, or is located in one of the DOS environment variable PATH or set paths in the `BIN' directory of the INPA-Systems "mylib" Referenced in an already underlying memory of the computer library (eg "User.exe" kernel for a library or


"api" for the EDIABAS runtime system). Optionally, separated by two colons ("::") of the library exported `internal 'name (":: LibFnc "can be specified. This allows the script in the INPA-known name of the function of the external library in the distinguished name deviate. Subsequently, the function name to be defined under which the script is the external function can be addressed. The function name follows the declaration of the handover parameters. See also Example Beispiel zu importierten Funktionen ////////////////////////////////////////////////////// /// Testscript zum Select/Toggle/Control-Mechanismus ////////////////////////////////////////////////////// #pragma winedit #include "inpa.h" // ***************************************************** // *** External DLL Calls // ***************************************************** /* Import der Funktion "MessageBox" aus der DLL user.exe unter dem Namen "MyMessageBox" */ import pascal lib "user.exe::MessageBox" MyMessageBox( in: int handle1,in: string text1, in: string kopf, in: int Art, returns: int ret ); /* Import der Funktion "MyHello" aus der DLL c:\tmp\test.dll unter dem Namen "MyHello" */ import "C" lib "c:\tmp\test.dll" MyHello(); // ***************************************************** // *** einige Variablen // ***************************************************** int flags string title string Mytext int handle int returnp;

= 16;

// Flags f端r MyMessageBox

= "MyHello"; = "Hello World from outside INPA"; = 0; // unsauber: Fensterhandle des Desktop:-) // reaktion des Users ( R端ckgabewert )

// ***************************************************** // *** Menu // ***************************************************** MENU m_main()


{ INIT { } ITEM ( 10, "Zur端ck") { scriptchange("..\cfgdat\startger"); } ITEM (1, "MyHello1") { MyHello(); } ITEM (2, "MyMessage") { MyMessageBox ( handle, Mytext, title, flags, returnp ); } } // ***************************************************** // *** Screen ( leer ) // ***************************************************** SCREEN s_main() { } // ***************************************************** // *** Start-/Ende Funktionen // ***************************************************** inpainit() { setmenu(m_main); setscreen(s_main, TRUE); } inpaexit() { }

Screen (SCREEN)


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.