SetSignal
Valid for: CANoe DE • CANoe4SW DE NoteThis function replaces
SetSignalByTxNode.
Function Syntax
Description
Sets the transmitted signal aSignal to the accompanying value. If no suitable signal driver exists and thus no signal can be stimulated,- in test modules/test units the verdict is set to “fail”,
- in network nodes an error message is displayed in the Write Window.
- It is recommended to use this form. The runtime environment is faster, because the signal object is determined during CAPL code compilation before measurement start.
- If you use the syntax of the special use case below, the signal object is determined during runtime which influences the performance.
- Direct Access to Signals
Parameters
- aSignal: Signal to be set.
- aValue: Physical value to be accepted.
Return Values
—Example
Example 1 — Signal is uniqueSpecial Use Case: Signal is not known before Measurement Start
Function Syntax
Description
Sets the transmitted signal aSignal to the accompanying value. If no suitable signal driver exists and thus no signal can be stimulated, then in the test module the verdict of the test module is set to “fail”. In the modeling library the measurement is stopped and an error message is displayed. Note- It is recommended to use this form only in special cases, because the signal object is determined during runtime which influences the performance.
- Reasons to use this string notation of the function:
- Signal object is not known before measurement start.
- In case of signal ambiguities the unique signal is determined during measurement.
Parameters
-
signalName: Name of the signal.
Note Signal Ambiguity
You have to use further objects to identify the signal uniquely. They are: channel, database name (alias), node name and message name.
The exact qualification syntax is:
[Channel::][Database name (alias)::][Node::][Message::]SignalThe order and completeness of the objects from right to left is important (see example). - aValue: Physical value to be accepted.
Return Values
- 0: Signal exists
- 1: Signal with given name does not exist