Standard Types (Std_Types)
Standard types, return codes (Std_ReturnType, E_OK, E_NOT_OK), version info structures, and error codes shared across the entire AUTOSAR architecture.
Typen — Übersicht
enum Std_ReturnTypeThis type can be used as standard API return type which is shared between the RTE and the BSW modules.struct Std_VersionInfoTypeThis type shall be used to request the version of a BSW module using the _ Get Version Info() function.typedef Std_TransformerError-typedef Std_TransformerClass-typedef Std_TransformerForward- Tags: atp.Status=drafttypedef Std_TransformerForwardCode- Tags: atp.Status=draftStd_MessageTypeThis type is used to encode the different type of messages.enum Std_MessageResultTypeThis type is used to encode different types of results for response messages.typedef Std_ExtractProtocolHeaderFieldsTypeType for the function pointer to extract the relevant protocol header fields of the message and the type of the message result...E_OK / E_NOT_OKBecause E_ OK is already defined within OSEK, the symbol E_ OK has to be shared.STD_HIGH / STD_LOWThe symbols STD_ HIGH and STD_ LOW shall be defined as follows: #define STD_ HIGH 0x01u /* Physical state 5V or 3.STD_ACTIVE / STD_IDLEThe symbols STD_ ACTIVE and STD_ IDLE shall be defined as follows: #define STD_ ACTIVE 0x01u /* Logical state active */...STD_ON / STD_OFFThe symbols STD_ ON and STD_ OFF shall be defined as follows: #define STD_ ON 0x01u #define STD_ OFF 0x00u
Typen — Detailansicht
type Std_ReturnType [SWS_Std_00005] 📄 PDF
typedef uint8 Std_ReturnType;
This type can be used as standard API return type which is shared between the RTE and the BSW modules. It shall be defined as follows: typedef uint8 Std_ Return Type;
The type Std_ReturnType serves as a standardized return type for API functions and is shared by the RTE and BSW modules ([SWS_Std_00005]). It is available via the header Std_Types.h and defined as uint8 ([SWS_Std_00005]).
By default, Std_ReturnType is assigned the values E_OK (value 0) or E_NOT_OK (value 1) ([SWS_Std_00005], [SWS_Std_00011]). If these two standard return values are not sufficient, the standard allows defining module-specific error values:
-
Value range for user errors: For user-defined error codes, the range
0x02to0x3Fis available ([SWS_Std_00005]). Here, the six least significant bits are used ([SWS_Std_00011]). - Naming convention: When naming user-specific error values, the respective module prefix must strictly be prepended in accordance with the BSW guidelines ([SWS_Std_00011]).
- RTE reservation: Bit 7 and Bit 8 are reserved and are defined by the RTE specification, which the general layout of the return type also follows ([SWS_Std_00011]). Interpretation: These are presumably the two most significant bits of the 8-bit representation, completing the six lower bits to form one byte. Question Q-d97256956c510f58 (open)
Specific error handling mechanisms such as DET or DEM as well as reentrancy requirements are not defined in the sources for the base type itself, but are the responsibility of the respective APIs that use this type as a return value.
This usage note was generated by an AI and is based on the specifications of AUTOSAR Classic Release R20-11.
Implementer's Guide to follow (complexity I1)
type Std_VersionInfoType [SWS_Std_00015] 📄 PDF
typedef struct { uint16 vendorID; uint16 moduleID; uint8 sw_major_version; uint8 sw_minor_version; uint8 sw_patch_version; } Std_VersionInfoType;
This type shall be used to request the version of a BSW module using the
type Std_TransformerError [SWS_Std_00021] 📄 PDF
typedef uint8 Std_TransformerError;
-
According to requirement [SWS_Std_00021], the data type Std_TransformerError is provided as a standardized type via the header file Std_Types.h for the AUTOSAR Classic Platform. Structurally, the element is defined in the specification as a structure and is composed of two components: the element errorCode with the base type uint8 and the element transformerClass with the type Std_TransformerClass [SWS_Std_00021].
Regarding practical use, the specification contains no concrete function signatures, parameter descriptions, or return values. The structure type presumably serves as a uniform data container for the structured transmission of errors that occur during data transformation (interpretation). Question Q-6e0938f276d60fd3 (open) Here, the field errorCode likely conveys the actual numeric error code, while transformerClass identifies the causing or associated transformer class (interpretation). Question Q-d8806698683ec00e (open)
Specific error handling mechanisms such as DET or DEM notifications are not defined in [SWS_Std_00021]. Requirements regarding concurrency, reentrancy, or synchronous versus asynchronous semantics are also missing from the source material. Since it is a pure type definition in Std_Types.h, the type itself is not subject to runtime restrictions; these arise exclusively from the respective context of the using modules.
This text was generated by an AI based on the AUTOSAR specification R20-11.
type Std_TransformerClass [SWS_Std_00024] 📄 PDF
typedef uint8 Std_TransformerClass;
-
type Std_TransformerForward [SWS_Std_00027] 📄 PDF
typedef uint8 Std_TransformerForward;
- Tags: atp.Status=draft
type Std_TransformerForwardCode [SWS_Std_00029] 📄 PDF
typedef uint8 Std_TransformerForwardCode;
- Tags: atp.Status=draft
type Std_MessageType [SWS_Std_91001] 📄 PDF
This type is used to encode the different type of messages. - Currently this encoding is limited to the distinction between requests and responses in C/ S c ommunication.
According to [SWS_Std_91001], the standard type Std_MessageType is used to encode various message types. In the present specification, this encoding is limited to distinguishing between requests and responses within the scope of client/server communication ([SWS_Std_91001]).
The data type is derived from the base type uint8 and is provided to software components and basic software modules via the header file Std_Types.h ([SWS_Std_91001]). The following values and constants are specified for assignment and evaluation:
STD_MESSAGETYPE_REQUEST(value0x00): Designates a request message ([SWS_Std_91001]).STD_MESSAGETYPE_RESPONSE(value0x01): Designates a response message ([SWS_Std_91001]).- Value range
0x02to0x3F: This range is reserved for future message types ([SWS_Std_91001]).
Regarding application and boundary conditions, implementing modules should exclusively use the defined identifiers. Since the values from 0x02 to 0x3F are reserved for future AUTOSAR extensions, they must not be arbitrarily assigned for other purposes ([SWS_Std_91001]). Specific error codes, return values, asynchronous sequences, or notifications to DET or DEM are not defined for this data type in the specification ([SWS_Std_91001]).
This text was generated by an AI curation assistant and is based on the specification of AUTOSAR R20-11.
type Std_MessageResultType [SWS_Std_91002] 📄 PDF
typedef uint8 Std_MessageResultType;
This type is used to encode different types of results for response messages. - Currently this encoding is limited to the distinction between OK and ERROR responses.
The fundamental data type Std_MessageResultType serves in the AUTOSAR Classic Platform to encode various result types for response messages [SWS_Std_00019]. The type is provided via the standard header file Std_Types.h and is defined as a scalar type based on uint8 [SWS_Std_91002].
Usage and Value Range
The specification requires the use of Std_MessageResultType for standardized identification of response messages [SWS_Std_00019]. Currently, the intended scope of functionality of this encoding is restricted to the basic distinction between successful and erroneous responses [SWS_Std_91002]. For this purpose, the following fixed result values are defined:
STD_MESSAGERESULT_OK(value0x00): Identifies the regular, error-free result of a response message [SWS_Std_91002].STD_MESSAGERESULT_ERROR(value0x01): Signals the result of an erroneous response message (error response) [SWS_Std_91002].
Limitations and Future Extensions
The value range from 0x02 to 0x3F is explicitly reserved for future message results [SWS_Std_91002]. Interpretation: Since the specification currently does not foresee any other valid return values, evaluating modules will likely need to be programmed defensively to safely intercept unexpected or not yet assigned values in this range [SWS_Std_00019]. Question Q-5f652f73800b7d94 (open)
This text was created by an AI and summarizes the requirements of the AUTOSAR specification for developers.
type Std_ExtractProtocolHeaderFieldsType [SWS_Std_91003] 📄 PDF
typedef Std_ReturnType (* Std_ExtractProtocolHeaderFieldsType)(const uint8* buffer, uint32 bufferLength, Std_MessageTypeType* messageType, Std_MessageResultType* messageResult);
Type for the function pointer to extract the relevant protocol header fields of the message and the type of the message result of a transformer. - At the time being, this is limited to the types used for C/ S communication (i.e., REQUE ST and RESPONSE and OK and ERROR).
type E_OK / E_NOT_OK [SWS_Std_00006] 📄 PDF
#define E_OK 0x00u #define E_NOT_OK 0x01u
Because E_ OK is already defined within OSEK, the symbol E_ OK has to be shared. To avoid name clashes and redefinition problems, the symbols have to be defined in the following way (approved within implementation): #ifndef STATUSTYPEDEFINED #define STATUSTYPEDEFINED #define E_ OK 0x00u typedef unsigned char Status Type; /* OSEK compliance */ #endif #define E_ NOT_ OK 0x01u
type STD_HIGH / STD_LOW [SWS_Std_00007] 📄 PDF
#define STD_HIGH 0x01u #define STD_LOW 0x00u
The symbols STD_ HIGH and STD_ LOW shall be defined as follows: #define STD_ HIGH 0x01u /* Physical state 5V or 3.3V */ #define STD_ LOW 0x00u /* Physical state 0V */
type STD_ACTIVE / STD_IDLE [SWS_Std_00013] 📄 PDF
#define STD_ACTIVE 0x01u #define STD_IDLE 0x00u
The symbols STD_ ACTIVE and STD_ IDLE shall be defined as follows: #define STD_ ACTIVE 0x01u /* Logical state active */ #define STD_ IDLE 0x00u /* Logical state idle */
type STD_ON / STD_OFF [SWS_Std_00010] 📄 PDF
#define STD_ON 0x01u #define STD_OFF 0x00u
The symbols STD_ ON and STD_ OFF shall be defined as follows: #define STD_ ON 0x01u #define STD_ OFF 0x00u
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Std- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Std@rel:R20-11#4f00bf09- Content hash
4f00bf09- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_StandardTypes.pdf#nameddest=SWS_Std_00005
gemini-3.8-flash-low· 2026-10-13 · German original