AUTOSAR CP SWS StandardTypes
AUTOSAR CP SWS StandardTypes
AUTOSAR CP R23-11
• Editorial Changes
AUTOSAR • Added SWS_Std_00031 (NULL_PTR)
2021-11-25 R21-11 Release
Management • Editorial Changes
• Fixed Design issues with E2E
communication protection for methods
AUTOSAR • Added TransformerError and
2020-11-30 R20-11 Release TransformerForward
Management
• Fixed missing Type definitions
• Editorial Changes
• Added chapter Std_TransformerError
AUTOSAR
• Editorial changes
2019-11-28 R19-11 Release
Management • Changed Document Status from Final to
published
5
4
AUTOSAR
• Header File Cleanup (no impact on
2018-10-31 4.4.0 Release
behavior)
Management
AUTOSAR
2017-12-08 4.3.1 Release • Updated OSEK reference (editorial)
Management
AUTOSAR
2016-11-30 4.3.0 Release • Corrected editorial traceability issues
Management
AUTOSAR
2015-07-31 4.2.2 Release • Harmonized traceability
Management
AUTOSAR
2014-10-31 4.2.1 Release • Editorial changes
Management
AUTOSAR • Editorial changes
2013-10-31 4.1.2 Release
• Removed chapter(s) on change
Management
documentation
AUTOSAR • Harmonized requirements according to
2013-03-15 4.1.1
Administration SWS_General
AUTOSAR • Update of SWS documents for new
2011-12-22 4.0.3
Administration traceability mechanism
• Removed instanceID from
StdVersionType
AUTOSAR
2010-02-02 3.1.4 • Concretized the published parameters to
Administration
have the prefix STD_TYPES
4
• Changed definition of
Standard_ReturnType to match the RTE
2006-11-28- definition.
AUTOSAR
2.1.1
01 Administration • A complete overview of definitions and
values has been performed to match the
requirements in the SRS General.
AUTOSAR
2006-05-16 2.0 • Initial Release
Administration
Disclaimer
This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Contents
1 Introduction and functional overview 7
3 Related documentation 9
3.1 Input documents & related standards and norms . . . . . . . . . . . . . 9
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Constraints and assumptions 10
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . . 10
5 Software Architecture 11
5.1 Dependencies to other modules . . . . . . . . . . . . . . . . . . . . . . . 11
5.2 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2.1 Communication related BSW modules . . . . . . . . . . . . . . 11
6 Requirements Tracing 12
7 Functional specification 13
7.1 General issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7.2 Error Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7.2.1 Development Errors . . . . . . . . . . . . . . . . . . . . . . . . 13
7.2.2 Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7.2.3 Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.2.4 Production Errors . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.2.5 Extended Production Errors . . . . . . . . . . . . . . . . . . . . 14
8 API specification 15
8.1 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.1.1 Std_ReturnType . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.1.2 Std_VersionInfoType . . . . . . . . . . . . . . . . . . . . . . . . 16
8.1.3 Std_TransformerError . . . . . . . . . . . . . . . . . . . . . . . 16
8.1.4 Std_TransformerForwardCode . . . . . . . . . . . . . . . . . . 18
8.1.5 Std_MessageTypeType . . . . . . . . . . . . . . . . . . . . . . 19
8.1.6 Std_MessageResultType . . . . . . . . . . . . . . . . . . . . . 19
8.1.7 Std_ExtractProtocolHeaderFieldsType . . . . . . . . . . . . . . 20
8.2 Symbol definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8.2.1 E_OK, E_NOT_OK . . . . . . . . . . . . . . . . . . . . . . . . 20
8.2.2 STD_HIGH, STD_LOW . . . . . . . . . . . . . . . . . . . . . . 21
8.2.3 STD_ACTIVE, STD_IDLE . . . . . . . . . . . . . . . . . . . . . 21
8.2.4 STD_ON, STD_OFF . . . . . . . . . . . . . . . . . . . . . . . . 21
8.2.5 NULL_PTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
8.3 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
9 Sequence diagrams 23
10 Configuration specification 24
B History of Requirements 26
B.1 Requirement History of this Document According to AUTOSAR Re-
lease R22-11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
B.1.1 Added Specification Items in R22-11 . . . . . . . . . . . . . . . 26
B.1.2 Changed Specification Items in R22-11 . . . . . . . . . . . . . 26
B.1.3 Deleted Specification Items in R22-11 . . . . . . . . . . . . . . 26
B.2 Requirement History of this Document According to AUTOSAR Re-
lease R23-11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
B.2.1 Added Specification Items in R23-11 . . . . . . . . . . . . . . . 26
B.2.2 Changed Specification Items in R23-11 . . . . . . . . . . . . . 26
B.2.3 Deleted Specification Items in R23-11 . . . . . . . . . . . . . . 26
Abreviation: Description:
STD Standard
3 Related documentation
4.1 Limitations
No limitations.
5 Software Architecture
6 Requirements Tracing
The following tables reference the requirements specified in SRS BSW General [1] and
links to the fulfillment of these. Please note that if column “Satisfied by” is empty for a
specific requirement this means that this requirement is not fulfilled by this document.
Requirement Description Satisfied by
[SRS_BSW_00004] All Basic SW Modules shall perform a [SWS_Std_00015] [SWS_Std_91003]
pre-processor check of the versions
of all imported include files
[SRS_BSW_00161] The AUTOSAR Basic Software shall [SWS_Std_00004]
provide a microcontroller abstraction
layer which provides a standardized
interface to higher software layers
[SRS_BSW_00305] Data types naming convention [SWS_Std_00017] [SWS_Std_00019]
[SWS_Std_91001] [SWS_Std_91002]
[SRS_BSW_00348] All AUTOSAR standard types and [SWS_Std_00007] [SWS_Std_00010]
constants shall be placed and [SWS_Std_00013]
organized in a standard type header
file
[SRS_BSW_00357] For success/failure of an API call a [SWS_Std_00005] [SWS_Std_00006]
standard return type shall be defined [SWS_Std_00011]
[SRS_BSW_00441] Naming convention for type, macro [SWS_Std_00011]
and function
[SRS_BSW_00480] Null pointer errors shall follow a [SWS_Std_00031]
naming rule
[SRS_Xfrm_00002] A transformer shall provide fixed [SWS_Std_00028] [SWS_Std_00029]
interfaces
[SRS_Xfrm_00004] A transformer shall support error [SWS_Std_00021] [SWS_Std_00022]
handling [SWS_Std_00024] [SWS_Std_00025]
[SRS_Xfrm_00008] A transformer shall specify its output [SWS_Std_00022] [SWS_Std_00023]
format
[SRS_Xfrm_00009] A fixed set of transformer classes [SWS_Std_00023]
shall exist
[SRS_Xfrm_00010] Each transformer class shall provide [SWS_Std_00024]
a fixed set of abstract errors
[SRS_Xfrm_00011] A transformer shall belong to a [SWS_Std_00026]
specific transformer class
7 Functional specification
c()
8 API specification
8.1.1 Std_ReturnType
c(SRS_BSW_00357)
[SWS_Std_00011] dThe Std_ReturnType shall normally be used with value E_OK or
E_NOT_OK. If those return values are not sufficient user specific values can be defined
by using the 6 least specific bits.
For the naming of the user defined values the module prefix shall be used as requested
in SRS_BSW_00441
Layout of the Std_ReturnType shall be as stated in the RTE specification. Bit 7 and Bit
8 are reserved and defined by the RTE specification.
c(SRS_BSW_00357, SRS_BSW_00441)
8.1.2 Std_VersionInfoType
c(SRS_BSW_00004)
8.1.3 Std_TransformerError
The data type Std_TransformerError is a struct which contains the error code and the
transformer class to which the error belongs.
The data type Std_TransformerError shall be defined as follows:
[SWS_Std_00021] Definition of datatype Std_TransformerError d
Name Std_TransformerError
Kind Structure
Elements errorCode
Type Std_TransformerErrorCode
Comment The specific meaning of the values of Std_TransformerErrorCode is to
be seen for the specific transformer chain for which the data type
represents the transformer error.
transformerClass
Type Std_TransformerClass
Comment –
Description Std_TransformerError represents a transformer error in the context of a certain transformer chain.
Available via Std_Types.h
c(SRS_Xfrm_00004)
The values are specified for each transformer class in [26, ASWS Transformer Gen-
eral].
[SWS_Std_00022] Definition of datatype Std_TransformerErrorCode d
Name Std_TransformerErrorCode
Kind Type
Derived from uint8
Range - – The values are specified for each
transformer class in ASWS_
TransformerGeneral.
Description The type of the Std_TransformerError.
Available via Std_Types.h
c(SRS_Xfrm_00004, SRS_Xfrm_00008)
The Std_TransformerClass represents the transformer class in which the error oc-
curred.
[SWS_Std_00023] dThe underlying data type of the type Std_TransformerClass shall
be uint8.c(SRS_Xfrm_00009, SRS_Xfrm_00008)
The type Std_TransformerClass shall be an enumeration with the following elements
where each element represents a transformer class:
[SWS_Std_00024] Definition of datatype Std_TransformerClass d
Name Std_TransformerClass
Kind Type
Derived from uint8
Range STD_TRANSFORMER_ 0x00 Transformer of a unspecified
UNSPECIFIED transformer class.
STD_TRANSFORMER_ 0x01 Transformer of a serializer class.
SERIALIZER
STD_TRANSFORMER_ 0x02 Transformer of a safety class.
SAFETY
STD_TRANSFORMER_ 0x03 Transformer of a security class.
SECURITY
STD_TRANSFORMER_ 0xFF Transformer of a custom class not
CUSTOM standardized by AUTOSAR.
Description Std_TransformerClass is an enumeration where each element represents a transformer class.
Available via Std_Types.h
c(SRS_Xfrm_00004, SRS_Xfrm_00010)
[SWS_Std_00025] dThe transformer class STD_TRANSFORMER_UNSPECIFIED
shall be used if no transformer error occured.c(SRS_Xfrm_00004)
[SWS_Std_00026] dThe mapping from transformerClass of TransformationTechnology
to value of data type Std_TransformerClass shall be:
• transformerClass serializer - STD_TRANSFORMER_SERIALIZER
• transformerClass safety - STD_TRANSFORMER_SAFETY
8.1.4 Std_TransformerForwardCode
c(SRS_Xfrm_00002)
The underlying data type of the type Std_TransformerForwardCode shall be uint8:
[SWS_Std_00029]{DRAFT} Definition of datatype Std_TransformerForwardCode
d
Name Std_TransformerForwardCode (draft)
Kind Type
Derived from uint8
Range E_OK 0x00 –
E_SAFETY_INVALID_REP 0x01 –
E_SAFETY_INVALID_SEQ 0x02 –
E_SAFETY_INVALID_CRC 0x03 –
Description –
Tags: atp.Status=draft
Available via Std_Types.h
c(SRS_Xfrm_00002)
8.1.5 Std_MessageTypeType
c(SRS_BSW_00305)
[SWS_Std_00017] dThe Std_MessageTypeType shall be used ot encode the different
types of messages exchanged in AUTOSAR. - Currently this encoding is limited to
the distinction between requests and responses in C/S communication.c(SRS_BSW_-
00305)
Note: In future AUTOSAR release, the literals for this type may be extended with addi-
tional message types.
8.1.6 Std_MessageResultType
c(SRS_BSW_00305)
[SWS_Std_00019] dThe Std_MessageResultType shall be used ot encode the differ-
ent types of results for response messages. - Currently this encoding is limited to the
distinction between OK and ERROR responses.c(SRS_BSW_00305)
Note: In future AUTOSAR release, the literals for this type may be extended with addi-
tional result types.
8.1.7 Std_ExtractProtocolHeaderFieldsType
c(SRS_BSW_00004)
c(SRS_BSW_00357)
c(SRS_BSW_00348)
c(SRS_BSW_00348)
c(SRS_BSW_00348)
8.2.5 NULL_PTR
[SWS_Std_00031] d
Define NULL_PTR
Range void pointer
1 ((void *)0)
Description The implementation shall provide the NULL_PTR define with a void pointer to zero
definition.
c(SRS_BSW_00480)
9 Sequence diagrams
Not applicable.
10 Configuration specification
Not applicable.
B History of Requirements
Please note that the lists in this chapter also include requirements that have been
removed from the specification in a later version. These requirements do not appear
as hyperlinks in the document.
[SWS_Std_NA_00999]
[SWS_Std_00027] [SWS_Std_00999]
none
[SWS_Std_00028]
none