Setting Up a SenderReceiver or NVData Interface
A SenderReceiver or NVData interface can contain the following data elements: scalar variables, enumerations, arrays, matrices, and records.
Open the interface editor.
Element names must not begin with a number. If you enter a name that begins with a number, an allowed name is suggested instead. If it is not desired to open the properties editor upon an element’s creation, deactivate the Always show Edit Dialog for new elements option at the bottom of the properties editor. |
Add a variable.
In the Elements palette or toolbar, click the button (




/
) for the variable you want to create.
The properties editor opens.
- Edit the element properties and click OK.
Add an enumeration.
In the Elements palette, click the
Enumeration Variable button.
The Enumeration Selection window opens. All enumeration types defined in the database/workspace are displayed in the Enumeration Type combo box.
- Select an enumeration type from the combo box.
Click OK to close the selection window.
The properties editor opens.
Edit the enumeration properties and click OK.
Alternatively, you can add an enumeration as described in Including a Component as Complex Element, or you can drag it from the Component Manager onto the Outline tab of the SenderReceiver/NVData interface editor.
Add an array or matrix.
In the Elements palette or toolbar, click the
Array or
Matrix button.
The properties editor opens.
In the X (and Y) field(s), enter the maximum size of the array/matrix.
To specify a variant size, use the Variant Size field to select the system constants you want to use as dimension values.
Step 5 describes the creation of a system constant. Both normal and user-defined system constants can be used. The value of a system constant should be in the range 1 ... X (or 1 ... Y).
Matrices with variant size are not supported. A matrix with variant size causes an MMdl697 error. Arrays/matrices with variable size are not available in SenderReceiver or NVData interfaces. |
In the Basic Type combo box, assign the element type.
The basic scalar types and Enumeration and Record are available. If you select Enumeration or Record, the
following happens.
The Component combo box appears. It offers all enumerations or records in the database/workspace for selection.
- Select a suitable enumeration or record.
Adjust the other element properties according to your needs and click OK.
If you exceeded the maximum size of the element axes in the Dimension fields, the following warning opens.
The possible *
= dimension or dimension x or dimension y max size has to be between 1 and 65535. Please adjust your settings.
If the product of the X and Y dimensions of a matrix exceeds the maximum size of the matrix, the following warning opens.
The possible matrix elements max size of 1048576 has been exceeded. Please adjust your setting <number>.
- Confirm the warning with OK and adapt the dimension(s).
If you selected a system constant whose value is outside the allowed range, the following warning opens:
The Attribute * Size (<n>) is not in the allowed range of >0 and max value (<i>)
- Click Cancel to return to the properties editor, or click OK to select the system constant anyway.
Add a system constant.
In a SenderReceiver or NVData interface, system constants can only be used to determine the variant size of an array, i.e. the system constant must be of integer type. |
In the Elements palette or toolbar, click the button (


/
) for the type you want to create.
The properties editor opens.
In the Kind combo box, select System Constant.
You can also select any user-defined system constant.
In the Base Type combo box, select one of the integer types or Enumeration.
System constants used for variant size determination must have one of those types.
- Edit the other element properties and click OK.
Include a record.
In the Insert menu, select Component.
Or
Click the
Insert Component button.
The Select Item window opens. It shows the content of the current database or workspace.
From the "Database" or "Workspace" list, select the record you want to add.
Click OK to add the record.
Alternatively, you can add a record as described in Including a Component as Complex Element, or you can drag it from the Component Manager onto the Outline tab of the SenderReceiver/NVData interface editor.
For SenderReceiver interfaces only:
Add a mode group.
In the Elements palette or toolbar, click the
Mode Group Parameter button.
The Mode Group Selection window opens. All mode groups defined in the database/workspace are displayed in the Mode Group Type combo box.
Select the mode group you want from the combo box.
Alternatively, open the Insert menu, select the Component option and add a mode group as described in Including a Component as Complex Element.
Click OK to close the selection window.
The properties editor opens.
Edit the mode group properties and click OK.
In AUTOSAR R4.*, a SenderReceiver interface can contain either data elements or one mode group. If the SenderReceiver interface contains data elements and mode groups, an error of type MMdl281 is issued during code generation. If a SenderReceiver interface contains more than one mode group, an error of type MMdl286 is issued. |
- Implement the interface elements.
- Edit the data for the interface elements.
You can change the properties of an element later in the properties editor; see Properties Editor.
See also
Opening an AUTOSAR Interface Editor
Properties Editor
Variant Size for Arrays and Matrices
Constants and System Constants
User-Defined System Constants
Scalar Types
Including a Component as Complex Element
Data Editor – Editing Scalar Types
Data Editor – Editing Combined Types
Showing and Hiding Confirmation Dialog Windows