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.

  1. In the Component Manager, create an enumeration named, e.g., ApplicationError.
  2. 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. 

  3. Create and edit the other enumerators you need.
  4. Open the ClientServer interface that contains the operation you want to modify.
  5. Open the signature editor for the operation.
  6. In the signature editor, go to the Return tab.
  7. In the Return Type combo box, select <enumeration>.

    The Choose an enumeration type dialog window opens.

  8. In the "Database" or "Workspace" field, select the enumeration you created in step 1.
  9. Click OK to close the Choose an enumeration type dialog window.
  10. Click OK to close the signature editor.

See also

Opening an AUTOSAR Interface Editor

Editing an Operation

Component Manager – Creating an Enumeration

Component Manager – Editing an Enumerator

Signature Editor