AUTOSAR SWS CommunicationStackTypes
AUTOSAR SWS CommunicationStackTypes
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
intellectual 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.
Table of Contents
1 Introduction and functional overview ................................................................... 6
2 Acronyms and abbreviations ............................................................................... 7
3 Related documentation........................................................................................ 8
3.1 Input documents ........................................................................................... 8
3.2 Related standards and norms ...................................................................... 8
3.3 Related specification .................................................................................... 9
4 Constraints and assumptions ............................................................................ 10
4.1 Limitations .................................................................................................. 10
4.2 Applicability to car domains ........................................................................ 10
4.3 Applicability to safety related environments ............................................... 10
5 Software Architecture ........................................................................................ 11
5.1 Dependencies to other modules ................................................................. 11
6 Requirements traceability .................................................................................. 12
7 Functional specification ..................................................................................... 16
7.1 General issues ........................................................................................... 16
8 API specification ................................................................................................ 17
8.1 Type definitions .......................................................................................... 17
8.1.1 PduIdType .............................................................................................. 17
8.1.2 PduLengthType ...................................................................................... 17
8.1.3 PduInfoType ........................................................................................... 18
8.1.4 PNCHandleType ..................................................................................... 18
8.1.5 TPParameterType .................................................................................. 19
8.1.6 BufReq_ReturnType ............................................................................... 19
8.1.7 TpDataStateType.................................................................................... 19
8.1.8 RetryInfoType ......................................................................................... 20
8.1.9 NetworkHandleType ............................................................................... 20
8.1.10 IcomConfigIdType................................................................................... 20
8.1.11 IcomSwitch_ErrorType ........................................................................... 21
8.2 Function definitions .................................................................................... 22
9 Sequence diagrams .......................................................................................... 23
10 Configuration specification ................................................................................ 24
10.1 Published parameters ................................................................................ 24
11 Not applicable requirements .............................................................................. 25
Abbreviation: Description:
Com Communication
EcuC ECU Configuration
e.g. [lat.] exempli gratia = [eng.] for example
i.e. [lat.] it est = [eng.] that is
3 Related documentation
Thus, the specification SWS BSW General shall be considered as additional and
required specification for Communication Stack Types.
4.1 Limitations
No limitations.
5 Software Architecture
6 Requirements traceability
7 Functional specification
8 API specification
8.1.1 PduIdType
[SWS_COMTYPE_00005] ⌈
Name: PduIdType
Type: uint8, uint16
Range: 0...<PduIdmax> -- Zero-based integer number
The size of this global type depends on the maximum
number of PDUs used within one software module. This
parameter shall be generated by the generator tool
depending on the value configured in EcuC virtual layer.
This parameter shall be generated in ComStack_Cfg.h file
Example :
If '''no''' software module deals with more PDUs that 256,
this type can be set to uint8.
If at least one software module handles more than 256
PDUs, this type must globally be set to uint16.
Description: This type is used within the entire AUTOSAR Com Stack except for bus drivers.
Available via: ComStackTypes.h
⌋ ()
8.1.2 PduLengthType
[SWS_COMTYPE_00008] ⌈
Name: PduLengthType
Type: uint8, uint16, uint32
Range: 0...<PduLengthmax> -- Zero-based integer number
The size of this global type depends on the maximum
length of PDUs to be sent by an ECU. This parameter
17 of 26 Document ID 050: AUTOSAR_SWS_CommunicationStackTypes
- AUTOSAR confidential -
Specification of Communication Stack Types
AUTOSAR CP Release 4.4.0
8.1.3 PduInfoType
[SWS_COMTYPE_00011] ⌈
Name: PduInfoType
Type: Structure
Element: uint8* SduDataPtr Pointer to the SDU (i.e. payload data) of
the PDU. The type of this pointer
depends on the memory model being
used at compile time.
uint8* MetaDataPtr Pointer to the meta data (e.g. CAN ID,
socket ID, diagnostic addresses) of the
PDU, consisting of a sequence of meta
data items. The length and type of the
meta data items is statically configured
for each PDU. Meta data items with
more than 8 bits use platform byte order.
PduLengthType SduLength Length of the SDU in bytes.
Description: Variables of this type shall be used to store the basic information about a PDU of
any type, namely a pointer variable pointing to its SDU (payload), a pointer to
Meta Data of the PDU, and the corresponding length of the SDU in bytes.
Available via: ComStackTypes.h
⌋ ()
8.1.4 PNCHandleType
[SWS_COMTYPE_00036] ⌈
Name: PNCHandleType
Type: uint8
Description: Used to store the identifier of a partial network cluster.
Available via: ComStackTypes.h
18 of 26 Document ID 050: AUTOSAR_SWS_CommunicationStackTypes
- AUTOSAR confidential -
Specification of Communication Stack Types
AUTOSAR CP Release 4.4.0
⌋ ()
8.1.5 TPParameterType
[SWS_COMTYPE_00031] ⌈
Name: TPParameterType
Type: Enumeration
Range: TP_STMIN 0x00 Separation Time
TP_BS 0x01 Block Size
TP_BC 0x02 The Band width control parameter used in FlexRay
transport protocol module.
Description: Specify the parameter to which the value has to be changed (BS or STmin).
Available via: ComStackTypes.h
⌋ ()
8.1.6 BufReq_ReturnType
[SWS_COMTYPE_00012] ⌈
Name: BufReq_ReturnType
Type: Enumeration
Range: BUFREQ_OK 0x00 Buffer request accomplished successful.
This status shall have the value 0.
BUFREQ_E_NOT_OK 0x01 Buffer request not successful. Buffer cannot be
accessed.
This status shall have the value 1.
BUFREQ_E_BUSY 0x02 Temporarily no buffer available. It's up the requester to
retry request for a certain time.
This status shall have the value 2.
BUFREQ_E_OVFL 0x03 No Buffer of the required length can be provided.
This status shall have the value 3.
Description: Variables of this type shall be used to store the result of a buffer request.
Available via: ComStackTypes.h
⌋ ()
8.1.7 TpDataStateType
[SWS_COMTYPE_00027] ⌈
Name: TpDataStateType
Type: Enumeration
Range: TP_DATACONF 0x00 TP_DATACONF indicates that all data, that have been
copied so far, are confirmed and can be removed from
the TP buffer. Data copied by this API call are excluded
and will be confirmed later.
TP_DATARETRY 0x01 TP_DATARETRY indicates that this API call shall
copyalready copied data in order to recover from an
error. In this case TxTpDataCnt specifies the offset of
the first byte to be copied by the API call.
TP_CONFPENDING 0x02 TP_CONFPENDING indicates that the previously copied
data must remain in the TP.
Description: Variables of this type shall be used to store the state of TP buffer.
8.1.8 RetryInfoType
[SWS_COMTYPE_00037] ⌈
Name: RetryInfoType
Type: Structure
Element: TpDataStateType TpDataState The enum type to be used to store the
state of Tp buffer.
PduLengthType TxTpDataCnt Offset from the current position which
identifies the number of bytes to be
retransmitted.
Description: Variables of this type shall be used to store the information about Tp buffer
handling.
Available via: ComStackTypes.h
⌋ ()
8.1.9 NetworkHandleType
[SWS_COMTYPE_00038] ⌈
Name NetworkHandleType
Kind Type
Derived
uint8
from
Variation --
Available
ComStackTypes.h
via
⌋ ()
8.1.10 IcomConfigIdType
[SWS_COMTYPE_00039] ⌈
Name: IcomConfigIdType
Type: uint8
Description: IcomConfigIdType defines the configuration ID. An ID of 0 is the default
configuration. An ID greater than 0 shall identify a configuration for Pretended
Networking. There is more than 1 configuration possible.
Available via: ComStackTypes.h
⌋ ()
8.1.11 IcomSwitch_ErrorType
[SWS_COMTYPE_00040] ⌈
Name: IcomSwitch_ErrorType
Type: Enumeration
Range: ICOM_SWITCH_E_OK 0x00 The activation of Pretended Networking was
successful.
ICOM_SWITCH_E_FAILED 0x01 The activation of Pretended Networking was not
successful.
Description: IcomSwitch_ErrorType defines the errors which can occur when activating or
deactivating Pretended Networking.
Available via: ComStackTypes.h
⌋ ()
9 Sequence diagrams
Not applicable.
10 Configuration specification