Vector/CANoe Reference: Unterschied zwischen den Versionen
Emi (Diskussion | Beiträge) |
Emi (Diskussion | Beiträge) |
||
| (35 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
==Introduction== |
|||
===Demo CANoe Testfile=== |
|||
'''Testfile:''' [[Medium:46_Vector_CANoe_Library_Test.ets|Vector CANoe Test.ets]] |
|||
If you want to run the test file, download it and follow the steps in the README. |
|||
'''Info:''' It is not necessary to open CANoe manually because expecco opens the CANoe application automatically by running the test. |
|||
Read this section to get information about the VectorApplication_HybridInterface Library for Vector CANoe. |
|||
== Application == |
== Application == |
||
| Zeile 34: | Zeile 48: | ||
Loads a configuration into CANoe. |
Loads a configuration into CANoe. |
||
''' Input-Pins ''' |
|||
*configFile → The complete path for the configuration. |
*configFile → The complete path for the configuration. |
||
*autoSave (optional) → A boolean value that indicates whether the active configuration should be saved if it has been changed (see ''Remarks''). |
*autoSave (optional) → A boolean value that indicates whether the active configuration should be saved if it has been changed (see ''Remarks''). |
||
| Zeile 57: | Zeile 71: | ||
Initializes the bus to be used. |
Initializes the bus to be used. |
||
''' Input-Pins ''' |
|||
*busType → Before you can control a specific bus in CANoe, first it must be initialized. |
*busType → Before you can control a specific bus in CANoe, first it must be initialized. |
||
** You can choose between following Bustypes: |
** You can choose between following Bustypes: |
||
| Zeile 68: | Zeile 82: | ||
Activates the bus to be used. |
Activates the bus to be used. |
||
| ⚫ | |||
;''Info'' |
|||
| ⚫ | |||
If multiple bus types have been initialized and this block is not executed, |
If multiple bus types have been initialized and this block is not executed, |
||
then the last initialized Bus is active. |
then the last initialized Bus is active. |
||
''' Input-Pins ''' |
|||
*busType → The bus to be used. |
*busType → The bus to be used. |
||
** You can choose between following Bustypes: |
** You can choose between following Bustypes: |
||
| Zeile 83: | Zeile 96: | ||
=== VectorAHI - GetRawValueOfSignal === |
=== VectorAHI - GetRawValueOfSignal === |
||
Returns the current value of the signal as it was transmitted on the bus. |
Returns the current value of the signal as it was transmitted on the bus. |
||
''' Input-Pins ''' |
|||
*channel |
|||
*msgName |
|||
*signalValue |
|||
=== VectorAHI - SetRawValueOfSignal === |
=== VectorAHI - SetRawValueOfSignal === |
||
Sets the RawValue of the BUS signal. |
Sets the RawValue of the BUS signal. |
||
''' Input-Pins ''' |
|||
* channel |
|||
* msgName |
|||
* signalName |
|||
* signalRawValue |
|||
=== VectorAHI - GetSignalValue === |
=== VectorAHI - GetSignalValue === |
||
Returns the active value of the Signal. |
Returns the active value of the Signal. |
||
''' Input-Pins ''' |
|||
* channel |
|||
* msgName |
|||
* signalName |
|||
=== VectorAHI - GetSignalFullname === |
=== VectorAHI - GetSignalFullname === |
||
Determines the fully qualified name of a signal or a message. |
Determines the fully qualified name of a signal or a message. |
||
''' Input-Pins ''' |
|||
* channel |
|||
* msgName |
|||
* signalName |
|||
=== VectorAHI - BUS Signal - Wait for rawValue === |
=== VectorAHI - BUS Signal - Wait for rawValue === |
||
Wait until the Signal get the specified RawValue. |
Wait until the Signal get the specified RawValue. |
||
''' Input-Pins ''' |
|||
*channel |
|||
*msgName |
|||
*signalName |
|||
*waitForValue |
|||
=== Vector AHI - BUS Signal - Wait for signalValue === |
=== Vector AHI - BUS Signal - Wait for signalValue === |
||
Wait until the Signal get the specified value. |
Wait until the Signal get the specified value. |
||
'''Input-Pins ''' |
|||
* channel |
|||
* msgName |
|||
* signalName |
|||
* waitForValue |
|||
== CAPL == |
== CAPL == |
||
| Zeile 148: | Zeile 199: | ||
=== VectorAHI - SetEnvironmentVariable === |
=== VectorAHI - SetEnvironmentVariable === |
||
Sets the environment variable value. |
Sets the environment variable value. |
||
''' Input-Pins ''' |
|||
* variableName |
|||
* variableValue |
|||
=== VectorAHI - GetEnvironmentVariable === |
=== VectorAHI - GetEnvironmentVariable === |
||
Returns the environment variable value. |
Returns the environment variable value. |
||
''' Input-Pins ''' |
|||
*variableName |
|||
=== VectorAHI - EnvironmentVariable - Wait for value === |
=== VectorAHI - EnvironmentVariable - Wait for value === |
||
Wait until the environment variable get the specified value. |
Wait until the environment variable get the specified value. |
||
''' Input-Pins ''' |
|||
* variableName |
|||
* waitForValue |
|||
== System == |
== System == |
||
| Zeile 159: | Zeile 223: | ||
=== VectorAHI - SetSystemVariable === |
=== VectorAHI - SetSystemVariable === |
||
Sets the system variable value. |
Sets the system variable value. |
||
''' Input-Pins ''' |
|||
* namespaceName |
|||
* variableName |
|||
* variableValue |
|||
=== VectorAHI - GetSystemVariable === |
=== VectorAHI - GetSystemVariable === |
||
Returns the system variable value. |
Returns the system variable value. |
||
''' Input-Pins ''' |
|||
* namespaceName |
|||
* variableName |
|||
=== VectorAHI - SystemVariable - Wait for value === |
=== VectorAHI - SystemVariable - Wait for value === |
||
Wait until the system variable get the specified value. |
Wait until the system variable get the specified value. |
||
''' Input-Pins ''' |
|||
* namespaceName |
|||
* variableName |
|||
* waitForValue |
|||
== Measurement == |
== Measurement == |
||
| Zeile 196: | Zeile 274: | ||
=== VectorAHI - Deregister environment or system variable from autom. update === |
=== VectorAHI - Deregister environment or system variable from autom. update === |
||
Deregister a CANoe environment or system variable from the update service. |
Deregister a CANoe environment or system variable from the update service. |
||
''' Input-Pins ''' |
|||
* ExpeccoEnvVar |
|||
=== VectorAHI - Register environment variable for autom. update === |
=== VectorAHI - Register environment variable for autom. update === |
||
''' Input-Pins ''' |
|||
* VectorEnvVarName |
|||
* ExpeccoEnvVarName |
|||
=== VectorAHI - Register system variable for autom. update === |
=== VectorAHI - Register system variable for autom. update === |
||
''' Input-Pins ''' |
|||
* nameSpace |
|||
* VectorSysVarName |
|||
* ExpeccoVariable |
|||
Aktuelle Version vom 15. Januar 2020, 13:44 Uhr
Introduction
Demo CANoe Testfile
Testfile: Vector CANoe Test.ets
If you want to run the test file, download it and follow the steps in the README.
Info: It is not necessary to open CANoe manually because expecco opens the CANoe application automatically by running the test.
Read this section to get information about the VectorApplication_HybridInterface Library for Vector CANoe.
Application
VectorAHI - OpenCANoe with Configuration
Opens the CANoe application and loads a configuration.
Input-Pins
- configFile → The complete path for the configuration.
- autoSave (optional) → A boolean value that indicates whether the active configuration should be saved if it has been changed (see Remarks).
- Possible values are:
- True → Automatic saving is executed.
- False → Automatic saving is not executed.
- Possible values are:
- promptUser (optional) → A boolean value that indicates whether the user should intervene in error situations (see Remarks).
- Possible values are:
- True → The user is prompted for input in error situations.
- False → The user is not notified.
- Possible values are:
- Remarks
- If False is entered for the autoSave parameter, the function fails if the active configuration was changed.
- If False is entered for the promptUser parameter, the function fails if an error situation occurs.
- Possible error situations include
- The active configuration was created or changed and not saved yet.
- Automatic saving fails for some reason (write protection, full disk, ...).
VectorAHI - OpenCANoe
Opens the CANoe application with the default configuration.
VectorAHI - CloseCANoe
Closes the CANoe application.
VectorAHI - Load Configuration
Loads a configuration into CANoe.
Input-Pins
- configFile → The complete path for the configuration.
- autoSave (optional) → A boolean value that indicates whether the active configuration should be saved if it has been changed (see Remarks).
- Possible values are:
- True: Automatic saving is executed.
- False: Automatic saving is not executed.
- Possible values are:
- promptUser (optional) → A boolean value indicates whether the user should intervene in error situations (see Remarks).
- Possible values are:
- True: The user is prompted for input in error situations.
- False: The user is not notified.
- Possible values are:
- Remarks
- If False is entered for the autoSave parameter, the function fails if the active configuration was changed.
- If False is entered for the promptUser parameter, the function fails if an error situation occurs.
- Possible error situations include
- The active configuration was created or changed and not saved yet.
- Automatic saving fails for some reason (write protection, full disk, ...).
BUS
VectorAHI - InitializeBus
Initializes the bus to be used.
Input-Pins
- busType → Before you can control a specific bus in CANoe, first it must be initialized.
- You can choose between following Bustypes:
- CAN
- LIN
- MOST
- FlexRay
- You can choose between following Bustypes:
VectorAHI - ActivateBusTyp
Activates the bus to be used.
Info: This block must be used if more than one bus has been initialized. If multiple bus types have been initialized and this block is not executed, then the last initialized Bus is active.
Input-Pins
- busType → The bus to be used.
- You can choose between following Bustypes:
- CAN
- LIN
- MOST
- FlexRay
- You can choose between following Bustypes:
VectorAHI - GetRawValueOfSignal
Returns the current value of the signal as it was transmitted on the bus.
Input-Pins
- channel
- msgName
- signalValue
VectorAHI - SetRawValueOfSignal
Sets the RawValue of the BUS signal.
Input-Pins
- channel
- msgName
- signalName
- signalRawValue
VectorAHI - GetSignalValue
Returns the active value of the Signal.
Input-Pins
- channel
- msgName
- signalName
VectorAHI - GetSignalFullname
Determines the fully qualified name of a signal or a message.
Input-Pins
- channel
- msgName
- signalName
VectorAHI - BUS Signal - Wait for rawValue
Wait until the Signal get the specified RawValue.
Input-Pins
- channel
- msgName
- signalName
- waitForValue
Vector AHI - BUS Signal - Wait for signalValue
Wait until the Signal get the specified value.
Input-Pins
- channel
- msgName
- signalName
- waitForValue
CAPL
VectorAHI - Call CAPL Function
Calls a CAPL function.
Please note that the number of parameters must agree with that of the CAPL function. The return value is only available for CAPL functions whose CAPL programs are configured in CANoe's Measurement Setup. Only integers are allowed as a return type.
After a CAPL function has been registered, you can call it up with or without parameters. The following parameters can be passed:
- Integer
- Float
Info: One CAPL function can not deal with more than 10 parameters.
VectorAHI - Register CAPL Function(s)
Registration of CAPL functions.
Info: Registration of CAPL functions must be done before starting the measurement.
Configuration
VectorAHI - Configuration set (un)modified
Input-Pins:
- setModified → Possible inputs are true or false.
VectorAHI - Configuration is modified
Returns information on whether the current configuration was modified since the time it was loaded or created, or sets this property. This property determines whether the user is prompted to save when another configuration is loaded.
True: The current configuration has been modified since the time it was loaded or created.
False: The current configuration has not been modified since the time it was loaded or created
If the modified property is set to false with a modified configuration, other configurations can be loaded without any user interface prompts. This makes it possible, for instance, to automatically discard a modified configuration used during an automated test, in order to return to the original configuration. However, the modified configuration is then lost!
VectorAHI - Compile&Verify
Compile all CAPL Functions in all Nodes.
Environment
VectorAHI - SetEnvironmentVariable
Sets the environment variable value.
Input-Pins
- variableName
- variableValue
VectorAHI - GetEnvironmentVariable
Returns the environment variable value.
Input-Pins
- variableName
VectorAHI - EnvironmentVariable - Wait for value
Wait until the environment variable get the specified value.
Input-Pins
- variableName
- waitForValue
System
VectorAHI - SetSystemVariable
Sets the system variable value.
Input-Pins
- namespaceName
- variableName
- variableValue
VectorAHI - GetSystemVariable
Returns the system variable value.
Input-Pins
- namespaceName
- variableName
VectorAHI - SystemVariable - Wait for value
Wait until the system variable get the specified value.
Input-Pins
- namespaceName
- variableName
- waitForValue
Measurement
VectorAHI - Start Measurement
Starts the CANoe measurement.
VectorAHI - Measurement Running
If the measurement is running, True is returned; otherwise False is returned.
VectorAHI - Stop Measurement
Stops the CANoe measurement.
UI
VectorAHI - Get text from write window
Returns the text from the write window in CANoe
VectorAHI - Clear text of write window
Clears the text of the write window in CANoe
Variable Update Service
VectorAHI - Start environment autom. update service
Start the expecco environment update service, which monitors the registered canoe variables for a value change. In case of a value change the corresponding expecco environment variable will be updated with the new value.
VectorAHI - Stop environment autom. update service
Stop the expecco environment update service.
VectorAHI - Deregister environment or system variable from autom. update
Deregister a CANoe environment or system variable from the update service.
Input-Pins
- ExpeccoEnvVar
VectorAHI - Register environment variable for autom. update
Input-Pins
- VectorEnvVarName
- ExpeccoEnvVarName
VectorAHI - Register system variable for autom. update
Input-Pins
- nameSpace
- VectorSysVarName
- ExpeccoVariable