Data Element Prototypes. ETAS ASCET V6.3, AUTOSAR

Add to My manuals
173 Pages

advertisement

Data Element Prototypes. ETAS ASCET V6.3, AUTOSAR | Manualzz

ETAS Interfaces

A sender-receiver interface can be used to communicate data (using data element prototypes within the <DATA-ELEMENTS>

element) or modes (see section 6.2,

Mode

, on page 67 for more details).

Tip

In AUTOSAR R3.1.5 or lower , a sender-receiver interface can contain zero or more data elements and/or zero or more mode groups. However, it is good practice to separate interfaces used for data transfer and interfaces used for mode management.

In AUTOSAR R4.0.* , a sender-receiver interface must contain either data elements or a single mode group. If a sender-receiver interface contains both kinds of elements, an error is issued during code generation.

6.1.1

Data Element Prototypes

Each sender-receiver interface can specify zero or more data elements that constitute the

AUTOSAR signals communicated over the interface. Each data item defines a prototype of a specific type and can be a primitive data type, a RECORD or an ARRAY type. See chapter 4,

Data Types

, on page 33 for details of defining data types.

To create a data element in ASCET:

 In the component manager, double-click on SRInterface .

The "Sender Receiver Interface Editor for: SRInterface" editor opens.

 Use the Signed Discrete Variable button to create an sdisc variable.

The "Properties for Scalar Element: sdisc" dialog window opens.

 Name the signed discrete variable Speed .

Figure 17 : Data element Speed for the sender-receiver interface SRInterface

To create an implementation of a data element:

 In the "Sender Receiver Interface Editor for: SRInterface" editor, go to the Implementation tab.

 In the Implementation tab, double-click the Speed element.

The "Implementation for: Speed" window opens.

 In the "Master" field, activate Implementation .

 In the "Implementation" field, select sint16 .

 Right-click in the "Min" and "Max" fields and select Default

Value from the context menu.

 Close the "Implementation for: sdisc" window with OK .

ASCET V6.3 AUTOSAR User’s Guide 64

ETAS Interfaces

The Implementation tab of the "Sender Receiver Interface

Editor for: SRInterface" editor shall look like the figure below.

Figure 18 : Implementation Impl of the sender-receiver interface SRInterface with data element Speed

An implementation of a sender-receiver interface in ASCET corresponds to a sender-receiver interface in AUTOSAR. The sender-receiver interface in configuration language is generated by ASCET in the file Swc_interfaces.arxml

.

In

AUTOSAR R3.1.5 or lower

, the declaration of data elements within a sender-receiver interface definition has the following structure:

Listing 27: ARXML code - declaration of data elements within sender-receiver interface

(AUTOSAR R3.1.2)

ASCET V6.3 AUTOSAR User’s Guide 65

ETAS Interfaces

In

AUTOSAR R4.0.*

, the declaration of data elements within a sender-receiver interface definition has the following structure:

Listing 28: ARXML code - declaration of data elements within sender-receiver interface

(AUTOSAR R4.0.2)

A data element is defined using the <DATA-ELEMENT-PROTOTYPE> 1 / <VARIABLE-DATA-

PROTOTYPE> 2 element, and all elements must be defined within an encapsulating <DATA-

ELEMENTS> element.

Each <DATA-ELEMENT-PROTOTYPE> / <VARIABLE-DATA-PROTOTYPE> element must specify:

 the <SHORT-NAME> that you will use to refer to the item

 the <SW-DATA-DEF-PROPS> data properties, among them

 the <SW-CALIBRATION-ACESS>

 a <TYPE-TREF> reference to the type of the data item

 AUTOSAR R3.1.5 or lower only: whether the data reception <IS-QUEUED> or not

 <IS-QUEUED>false</IS-QUEUED> – means that a newly received value overwrites the previous value of the datum. If a value is sent multiple times before it is received then the receiver can only access the last transmitted value.

1 AUTOSAR R3.1.5 or lower

2 AUTOSAR R4.0.*

ASCET V6.3 AUTOSAR User’s Guide 66

advertisement

Related manuals

Download PDF

advertisement

Table of contents