Editing an Operation Return Value
By default, each operation in a ClientServer interface is assigned a return value of type Std_ReturnType. It is possible, however, to return an application error.
- In the Component Manager, create an enumeration named, e.g., ApplicationError.
Edit the first enumerator, e.g., to a value of 2 and a label of OK.
See the table in RTE Access Macros for a list of available error codes.
Note
The enumerator values must be in the range [1 .. 63]. If not, an error MMdl1287 is issued during code generation.
- Create and edit the other enumerators you need.
- Open the ClientServer interface that contains the operation you want to modify.
- Open the signature editor for the operation.
- In the signature editor, go to the Return tab.
In the Return Type combo box, select <enumeration>.
The Choose an enumeration type dialog window opens.
- In the "Database" or "Workspace" field, select the enumeration you created in step 1.
- Click OK to close the Choose an enumeration type dialog window.
- Click OK to close the signature editor.
See also
Opening an AUTOSAR Interface Editor
Component Manager – Creating an Enumeration
Component Manager – Editing an Enumerator
Signature Editor