Difference between revisions of "Vector/CANoe Reference"

From expecco Wiki (Version 2.x)
Jump to navigation Jump to search
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
   
Demo CANoe Testfile
+
===Demo CANoe Testfile===
  +
  +
  +
'''Testfile:''' [[Medium:Datei.png|Vector CANoe Library Test.ets]]
  +
 
If you want to run the test file, download it and follow the steps in the README.
 
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 ==

Revision as of 15:41, 15 January 2020

Contents

Introduction[edit]

Demo CANoe Testfile[edit]

Testfile: Vector CANoe Library 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[edit]

VectorAHI - OpenCANoe with Configuration[edit]

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.
  • 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.
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[edit]

Opens the CANoe application with the default configuration.

VectorAHI - CloseCANoe[edit]

Closes the CANoe application.

VectorAHI - Load Configuration[edit]

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.
  • 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.
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[edit]

VectorAHI - InitializeBus[edit]

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

VectorAHI - ActivateBusTyp[edit]

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

VectorAHI - GetRawValueOfSignal[edit]

Returns the current value of the signal as it was transmitted on the bus.

Input-Pins

  • channel
  • msgName
  • signalValue

VectorAHI - SetRawValueOfSignal[edit]

Sets the RawValue of the BUS signal.

Input-Pins

  • channel
  • msgName
  • signalName
  • signalRawValue

VectorAHI - GetSignalValue[edit]

Returns the active value of the Signal.

Input-Pins

  • channel
  • msgName
  • signalName

VectorAHI - GetSignalFullname[edit]

Determines the fully qualified name of a signal or a message.

Input-Pins

  • channel
  • msgName
  • signalName

VectorAHI - BUS Signal - Wait for rawValue[edit]

Wait until the Signal get the specified RawValue.

Input-Pins

  • channel
  • msgName
  • signalName
  • waitForValue

Vector AHI - BUS Signal - Wait for signalValue[edit]

Wait until the Signal get the specified value.

Input-Pins

  • channel
  • msgName
  • signalName
  • waitForValue

CAPL[edit]

VectorAHI - Call CAPL Function[edit]

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)[edit]

Registration of CAPL functions.

Info: Registration of CAPL functions must be done before starting the measurement.

Configuration[edit]

VectorAHI - Configuration set (un)modified[edit]

Input-Pins:

  • setModified → Possible inputs are true or false.

VectorAHI - Configuration is modified[edit]

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[edit]

Compile all CAPL Functions in all Nodes.

Environment[edit]

VectorAHI - SetEnvironmentVariable[edit]

Sets the environment variable value.

Input-Pins

  • variableName
  • variableValue

VectorAHI - GetEnvironmentVariable[edit]

Returns the environment variable value.

Input-Pins

  • variableName

VectorAHI - EnvironmentVariable - Wait for value[edit]

Wait until the environment variable get the specified value.

Input-Pins

  • variableName
  • waitForValue

System[edit]

VectorAHI - SetSystemVariable[edit]

Sets the system variable value.

Input-Pins

  • namespaceName
  • variableName
  • variableValue

VectorAHI - GetSystemVariable[edit]

Returns the system variable value.

Input-Pins

  • namespaceName
  • variableName

VectorAHI - SystemVariable - Wait for value[edit]

Wait until the system variable get the specified value.

Input-Pins

  • namespaceName
  • variableName
  • waitForValue

Measurement[edit]

VectorAHI - Start Measurement[edit]

Starts the CANoe measurement.

VectorAHI - Measurement Running[edit]

If the measurement is running, True is returned; otherwise False is returned.

VectorAHI - Stop Measurement[edit]

Stops the CANoe measurement.

UI[edit]

VectorAHI - Get text from write window[edit]

Returns the text from the write window in CANoe

VectorAHI - Clear text of write window[edit]

Clears the text of the write window in CANoe

Variable Update Service[edit]

VectorAHI - Start environment autom. update service[edit]

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[edit]

Stop the expecco environment update service.

VectorAHI - Deregister environment or system variable from autom. update[edit]

Deregister a CANoe environment or system variable from the update service.

Input-Pins

  • ExpeccoEnvVar

VectorAHI - Register environment variable for autom. update[edit]

Input-Pins

  • VectorEnvVarName
  • ExpeccoEnvVarName

VectorAHI - Register system variable for autom. update[edit]

Input-Pins

  • nameSpace
  • VectorSysVarName
  • ExpeccoVariable



Copyright © 2014-2020 eXept Software AG