Data Types (AUTOSAR R3.1.5 or Lower). ETAS ASCET V6.3, AUTOSAR

Add to My manuals
173 Pages

advertisement

Data Types (AUTOSAR R3.1.5 or Lower). ETAS ASCET V6.3, AUTOSAR | Manualzz

ETAS Data Types (AUTOSAR R3.1.5 or Lower)

4 Data Types (AUTOSAR R3.1.5 or Lower)

The communication over interfaces is typed so, before an interface can be defined, it is necessary to define the types of data that can be used.

ASCET supports both primitive types and complex types, i.e. those composed from values of primitive types.

Definitions of AUTOSAR primitive and complex data types are created by ASCET based on data implementation information. The ASCET data implementation is then mapped by the

AUTOSAR RTE into BSW types.

4.1

BSW Types

For AUTOSAR R3.1.5 or lower, the AUTOSAR RTE supports the following BSW data types:

 sint8 – 8 bit signed integer.

 uint8 – 8-bit unsigned integer.

 sint16 – 16-bit signed integer.

 uint16 – 16-bit unsigned integer.

 sint32 – 32-bit signed integer.

 uint32 – 32-bit unsigned integer.

 float32 – single precision floating point.

 float64 – double precision floating point.

 uint8_least – at least 8-bit unsigned integer.

 uint16_least – at least 16-bit unsigned integer.

 uint32_least – at least 32-bit unsigned integer.

 sint8_least – at least 7-bit signed integer (plus sign bit).

 sint16_least – at least 15-bit signed integer (plus sign bit).

 sint32_least – at least 31-bit signed integer (plus sign bit).

 boolean – for use with TRUE/FALSE.

The BSW types, plus definitions for TRUE and FALSE , are defined in the RTA-RTE installation, in the AUTOSAR header file Platform_Types.h

.

4.2

Primitive Data Types

The ASCET type system consists of model types and implementation types. Model types are abstract generic types which can be realized in one or more implementation types.

The basic model types for scalar elements are:

 Logic

 Signed Discrete

 Unsigned Discrete

 Continuous

All scalar elements in ASCET are implemented using one of the following data types:

 sint8

 sint16

 sint32

 uint8

 uint16

 uint32

ASCET V6.3 AUTOSAR User’s Guide 33

ETAS Data Types (AUTOSAR R3.1.5 or Lower)

Additionally, the model type "cont" can be implemented as

 real64

 real32 and the model type "log" as

 bool

To configure the default implementation of model types:

 In the component manager, select Tools  Options .

The "Options" dialog window opens.

 Open the "Modeling\Implementation\default Implementation

Types" node.

 Configure the default implementation types, for instance, as shown below.

Figure 9 : Default implementation of model types

 Click OK .

The implementation of a model element can always be individually configured. In what follows, we illustrate how to implement a variable sdisc as an 8 bit signed integer.

To implement a model type sdisc as a sint8:

 In the component manager, select the project ARProject and select Edit  Open Component .

The project editor opens.

 In the project editor, double-click the software component Swc .

The software component editor opens.

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

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

 Name the signed discrete variable sdisc and close the properties editor with OK .

 In the "Outline" tab, right-click the sdisc element and select

Implementation from the context menu.

ASCET V6.3 AUTOSAR User’s Guide 34

ETAS Data Types (AUTOSAR R3.1.5 or Lower)

The "Implementation for: sdisc" window opens.

 In the "Master” field, activate Implementation .

 In the "Implementation” field, select sint8 .

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

Figure 10 : Implementation of the signed discrete element sdisc as sint8

When generating code for an AUTOSAR project, ASCET creates the file autosar_types.arxml

, so that the primitive data types can be referenced within ARXML elements such as interfaces. A primitive type is declared using a meta-type tag to define the type's properties and then sub-tags to refine range and set the type name:

ASCET V6.3 AUTOSAR User’s Guide 35

advertisement

Related manuals

Download PDF

advertisement

Table of contents