TestWaitForValueInput
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DEFunction Syntax
long TestWaitForValueInput (char aQuery []); // form 1long TestWaitForValueInput (char aQuery [], dword aTimeout); // form 2long TestWaitForValueInput(char text[], char caption[], char info[]); // form 3long TestWaitForValueInput(char text[], char caption[], char info[], dword timeout); // form 4
Description
It creates a dialog which displays the transferred string. The tester can enter a number in this dialog. The number can be entered in decimal as well as hexadecimal form. Only characters allowed for numeric values are allowed. Upon closing the dialog, an additional check of the number entered is performed. If the entry cannot be converted to a valid number, an error message is generated and the dialog is exited. The entry can be queried after a successful call with the commands TestGetValueInput (number value) and TestGetStringInput (entry as String). It is also possible to enter a comment in the dialog which is automatically adopted into the test report. The first wait function without timeout waits until the confirmation by the tester. If the second wait function is used with the timeout, the dialog is automatically closed after the timeout. Whether the dialog was closed due to a timeout or by the tester, can be determined by using the return value. The function TestGetLastWaitResult can be queried after calling the return value of the function if no otherTestWaitForValueInput call occurred in the interim.
Only one dialog is open at a time, even though TestWaitForValueInput is called by different test modules.
You can optionally define some default input for the dialog.
Parameters
- aQuery: Text to be displayed in the entry dialog
- aTimeOut: Time in milliseconds after which the dialog is to be cancelled.
- Text: Text to be displayed in the entry dialog.
- Caption: The title of the dialog.
- Info: Further information to be shown.
- Timeout: Optional timeout for the dialog in ms. Transmission of 0: no timeout controlling.
Return Values
- < 0: General error, e.g. by calling outside of a test sequence
- 0: Timeout occurred
- 1: Dialog was closed by clicking the button [Ok] (successful call)
- 2: Dialog was closed by clicking the button [Cancel] (form 3-4)