STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
Std_Types.h File Reference

Specification of Standard Types More...

#include "Platform_Types.h"

Go to the source code of this file.

Data Structures

struct  Std_VersionInfoType_Tag
 This structure is used to request the version of a BSW module using the [Module name]_GetVersionInfo() function available on each module. More...
 
struct  Std_TransformerError_Tag
 The Std_TransformerErrorCode represents a transformer error in the context of a certain transformer chain. More...
 

Macros

#define NULL_PTR   ( (void *)0 )
 null pointer definition
 
physical_states

Definitions to identify signal or devices physical states

Requirement
SWS_Std_00007
#define STD_HIGH   1u
 
#define STD_LOW   0u
 
logical_states

Definitions to identify signal or devices logical states

Requirement
SWS_Std_00013
#define STD_ACTIVE   1u
 
#define STD_IDLE   0u
 
binary_states

Definitions to identify is a signal or device is ON or OFF

Requirement
SWS_Std_00010
#define STD_ON   1u
 
#define STD_OFF   0u
 

Typedefs

typedef uint8 Std_ReturnType
 This type can be used as standard API return type which is shared between the RTE and the BSW modules. range: E_OK and E_NOT_OK.
 
typedef uint8 Std_TransformerClass
 The type Std_TransformerClass shall be an enumeration with the following elements where each element represents a transformer class: range STD_TRANSFORMER_UNSPECIFIED, STD_TRANSFORMER_SERIALIZER, STD_TRANSFORMER_SAFETY STD_TRANSFORMER_SECURITY and STD_TRANSFORMER_CUSTOM.
 
typedef uint8 Std_TransformerErrorCode
 The type of the Std_TransformerError.
 
typedef uint8 Std_MessageTypeType
 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 communication. range: STD_MESSAGETYPE_REQUEST and STD_MESSAGETYPE_RESPONSE.
 
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. range: STD_MESSAGERESULT_OK and STD_MESSAGERESULT_ERROR.
 
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., REQUEST and RESPONSE and OK and ERROR). range: STD_MESSAGERESULT_OK and STD_MESSAGERESULT_ERROR.
 
typedef struct Std_VersionInfoType_Tag Std_VersionInfoType
 This structure is used to request the version of a BSW module using the [Module name]_GetVersionInfo() function available on each module.
 
typedef struct Std_TransformerError_Tag Std_TransformerError
 The Std_TransformerErrorCode represents a transformer error in the context of a certain transformer chain.
 

status_msgs

Return status, the values are used to be stored in the variable type Std_ReturnType

Requirement
SWS_Std_00006, SWS_Can_00039
#define STATUSTYPEDEFINED
 
#define E_OK   0u
 
#define E_NOT_OK   1u
 
#define CAN_BUSY   2u
 
typedef unsigned char StatusType
 

Detailed Description

Specification of Standard Types

This document specifies the AUTOSAR standard types header file. It contains all types that are used across several modules of the basic software and that are platform and compiler independent It is strongly recommended that those standard types files are unique within the AUTOSAR community to guarantee unique types and to avoid types changes when changing from supplier A to B.

Macro Definition Documentation

◆ CAN_BUSY

#define CAN_BUSY   2u

CAN controller is busy

◆ E_NOT_OK

#define E_NOT_OK   1u

Error return value

◆ E_OK

#define E_OK   0u

OK return value

◆ NULL_PTR

#define NULL_PTR   ( (void *)0 )

null pointer definition

Requirement
SWS_Std_00031

◆ STATUSTYPEDEFINED

#define STATUSTYPEDEFINED

guard definition

◆ STD_ACTIVE

#define STD_ACTIVE   1u

Logical state active

◆ STD_HIGH

#define STD_HIGH   1u

Physical state 5V or 3.3V

◆ STD_IDLE

#define STD_IDLE   0u

Logical state idle

◆ STD_LOW

#define STD_LOW   0u

Physical state 0V

◆ STD_OFF

#define STD_OFF   0u

Binary state OFF

◆ STD_ON

#define STD_ON   1u

Binary state ON

Typedef Documentation

◆ StatusType

typedef unsigned char StatusType

OSEK compliance

◆ Std_ExtractProtocolHeaderFieldsType

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., REQUEST and RESPONSE and OK and ERROR). range: STD_MESSAGERESULT_OK and STD_MESSAGERESULT_ERROR.

Requirement
SWS_Std_91003

◆ 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. range: STD_MESSAGERESULT_OK and STD_MESSAGERESULT_ERROR.

Todo
clarify if Std_MessageResultType should be an enumeration
Requirement
SWS_Std_91002, SWS_Std_00019

◆ Std_MessageTypeType

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 communication. range: STD_MESSAGETYPE_REQUEST and STD_MESSAGETYPE_RESPONSE.

Todo
clarify if Std_MessageTypeType should be an enumeration
Requirement
SWS_Std_91001, SWS_Std_00017

◆ Std_ReturnType

This type can be used as standard API return type which is shared between the RTE and the BSW modules. range: E_OK and E_NOT_OK.

Requirement
SWS_Std_00005, SWS_Std_00011

◆ Std_TransformerClass

The type Std_TransformerClass shall be an enumeration with the following elements where each element represents a transformer class: range STD_TRANSFORMER_UNSPECIFIED, STD_TRANSFORMER_SERIALIZER, STD_TRANSFORMER_SAFETY STD_TRANSFORMER_SECURITY and STD_TRANSFORMER_CUSTOM.

Todo
clarify if Std_TransformerClass should be an enumeration
Requirement
SWS_Std_00023, SWS_Std_00024, SWS_Std_00025, SWS_Std_00026

◆ Std_TransformerError

The Std_TransformerErrorCode represents a transformer error in the context of a certain transformer chain.

Requirement
SWS_Std_00021

◆ Std_TransformerErrorCode

The type of the Std_TransformerError.

Requirement
SWS_Std_00022

◆ Std_VersionInfoType

This structure is used to request the version of a BSW module using the [Module name]_GetVersionInfo() function available on each module.

Requirement
SWS_Std_00015