Adding an Argument to an SWC Method
- Open the signature editor for the method.
- In the signature editor, go to the Arguments tab.
- Click the
Add argument button - In the Argument menu, select Add.
The new argument is added to the Arguments list with its name highlighted for in-place editing.
- Click the
- Name the argument and press <Enter>.
In the Argument Type combo box, select the type of the argument.
The default argument type is cont.
Note
Since ASCET V6.3, composite and complex arguments are always explicit references, even though they are not marked with the overlay icon
. If you selected an array or matrix of enumeration or record type,
the following happens.To edit the size of an array or matrix argument,
do the following.Enter a unit for the argument in the Unit box.
The unit is purely descriptive and does not influence the functionality of the class.
Type a comment relating to the argument into the Comment box.
Every argument or return value can have a comment associated with it. This comment is displayed when documentation for the component is generated.
In the Direction combo box, select a direction for the argument.
In
The argument can be read in the method.
Out
The argument must be written in the method.
InOut
The argument can be read and written in the method.
See also Directions of Method Arguments.
If the argument is of type array, matrix, or component, the selection in the Direction combo box also determines
internal access to the referenced element.
Note |
|---|
If you use matrices as interrunnable variables, make sure that the Number of dimensions for fixed matrixestarget option is set to Two-dimensional. Otherwise, a warning WMdl653 is issued during AUTOSAR code generation. By default, this warning is promoted to an error. |
See also
Editing the Signature of a Runnable or Method
Directions of Method Arguments
Introduction – Variant Size of Arrays and Matrices
Introduction – Variable Size for Arrays and Matrices
Introduction – Explicit References
Introduction – Constants and System Constants