FlexRay Transport Layer (FrTp)
Provides segmented data transmission over FlexRay (ISO 10681-2).
Funktionen — Übersicht
void FrTp_GetVersionInfo (Std_VersionInfoType* versioninfo);Returns the version information.void FrTp_Init (const FrTp_ConfigType* configPtr);This service initializes all global variables of a Flex Ray Transport Layer instance and set it in the idle state.void FrTp_Shutdown (void);This service closes all pending transport pro tocol connections by simply stopping operation, frees all resources and stops...Std_ReturnType FrTp_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);Requests transmission of a PDU.Std_ReturnType FrTp_CancelTransmit (PduIdType TxPduId);Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.Std_ReturnType FrTp_ChangeParameter (PduIdType id, TPParameterType parameter, uint16 value);Request to change a specific transport protocol parameter (e.Std_ReturnType FrTp_CancelReceive (PduIdType RxPduId);Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module.Std_ReturnType FrTp_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size...void FrTp_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);Indication of a received PDU from a lower layer communication interface module.void FrTp_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.void FrTp_MainFunction (void);Schedules the Flex Ray TP.
Typen — Übersicht
struct FrTp_ConfigTypeThis is the base type for the configuration of the Flex Ray Transport Protocol A pointer to an instance of this structure will...
Funktionen & Typen — Detailansicht
function FrTp_GetVersionInfo [SWS_FrTp_00215] 📄 PDF
void FrTp_GetVersionInfo (Std_VersionInfoType* versioninfo);
Returns the version information.
function FrTp_Init [SWS_FrTp_00147] 📄 PDF
void FrTp_Init (const FrTp_ConfigType* configPtr);
This service initializes all global variables of a Flex Ray Transport Layer instance and set it in the idle state. It has no return value because software errors in initialisation data shall be detected during configuration time (e.g. by configuration tool ).
The synchronous function FrTp_Init initializes all global variables of an instance of the FlexRay transport layer and puts it into the idle state [SWS_FrTp_00147]. A pointer to the configuration of the FlexRay transport protocol is passed via configPtr as an input parameter (const FrTp_ConfigType*) [SWS_FrTp_00147]. The interface is declared via header FrTp.h with service ID 0x00 [SWS_FrTp_00147].
Regarding internal behavior and error handling, the following specifications apply:
- After the transport layer has been initialized successfully by calling
FrTp_Init, the FrTp module transitions to the internal stateFRTP_ON[SWS_FrTp_01032]. - The function has no return value (
void), since software errors in the initialization data must already be detected during the configuration phase, for example by a configuration tool [SWS_FrTp_00147].
Regarding concurrency, the service is specified as non-reentrant (Non Reentrant) [SWS_FrTp_00147]. Parallel or multiple uncoordinated calls are therefore inadmissible. Interpretation: The call is typically likely to occur centrally during ECU startup before regular transport services are used. Question Q-9b7cf7fc6dac510e (open)
This usage note was generated automatically based on the specification requirements of AUTOSAR R20-11.
Implementer's Guide to follow (complexity I1)
function FrTp_Shutdown [SWS_FrTp_00148] 📄 PDF
void FrTp_Shutdown (void);
This service closes all pending transport pro tocol connections by simply stopping operation, frees all resources and stops the Fr Tp Module
The synchronous function FrTp_Shutdown terminates the operation of the FlexRay Transport Protocol module (FrTp) [SWS_FrTp_00148]. Upon the call, the service closes all still pending transport protocol connections immediately by discontinuing operation, releases all occupied resources, and stops the FrTp module completely [SWS_FrTp_00148].
With regard to the interface specification and behavior, the following properties apply:
- Signature and header: The function is available via the header file
FrTp.h, has service ID0x01, expects no parameters, and provides no return value (void) [SWS_FrTp_00148]. - Concurrency:
FrTp_Shutdownis specified as non-reentrant (Non Reentrant) and must be executed synchronously [SWS_FrTp_00148]. A concurrent or multiple parallel call is therefore not permitted. - State transition: Through the successful execution of the service primitive
FrTp_Shutdown(), the FrTp module transitions to the internal stateFRTP_OFF[SWS_FrTp_01036].
Because the service closes pending connections merely by stopping operation, ongoing transmissions are expected to be aborted immediately and without a separate completion notification. Question Q-35555515f521d0c3 (open)
This usage note was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function FrTp_Transmit [SWS_FrTp_00149] 📄 PDF
Std_ReturnType FrTp_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);
Requests transmission of a PDU.
Usage and Semantics
The synchronous function FrTp_Transmit requests the transmission of a PDU via the FlexRay transport layer module [SWS_FrTp_00149]. The identifier of the PDU to be transmitted is passed via parameter TxPduId, while PduInfoPtr points to the payload data, metadata, and length [SWS_FrTp_00149]. If a transmission with a message length still unknown to the upper layer is to be initiated, FrTp_Transmit must be called with parameter value PduLength = 0 [SWS_FrTp_01064]. Acceptance of the transmit request is confirmed synchronously with E_OK; if the request cannot be accepted, the function returns E_NOT_OK [SWS_FrTp_00149].
Concurrency and Channel Availability
The function is reentrant for calls with different PDU IDs, but non-reentrant for the same identifier TxPduId [SWS_FrTp_00149]. In addition, execution requires an idle transmission channel: If no channel is available because the state is not idle (FrTpTxChannelState ≠ Idle), the function aborts and returns E_NOT_OK [SWS_FrTp_01041].
Error handling
If the development error detection interface is active, FrTp_Transmit validates the passed parameters:
- If an unsupported or invalid
TxPduIdis passed, the service aborts withE_NOT_OKand reports the development errorFRTP_E_INVALID_PDU_SDU_ID[SWS_FrTp_01040], [SWS_FrTp_01139]. - If the pointer
PduInfoPtris invalid, errorFRTP_E_PARAM_POINTERis reported and execution likewise aborts withE_NOT_OK[SWS_FrTp_01140].
This text was generated by an AI based on the AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
function FrTp_CancelTransmit [SWS_FrTp_00150] 📄 PDF
Std_ReturnType FrTp_CancelTransmit (PduIdType TxPduId);
Requests cancellation of an ongoing transmission of a PDU in a lower layer communication module.
The synchronous service function FrTp_CancelTransmit requests the cancellation of an ongoing PDU transmission in an underlying communication module [SWS_FrTp_00150]. The transmission to be aborted is addressed via input parameter TxPduId [SWS_FrTp_00150].
State-Dependent Behavior and Return Values
The cancellation behavior depends on the current state of the connection:
- If the transmit request is pending but the transmission itself has not yet started,
FrTp_CancelTransmitreleases the connection immediately [SWS_FrTp_00385]. - If the transmission is already in progress, the function stops the transmission process and confirms the successful cancellation with the return value
E_OK[SWS_FrTp_01116]. - If the connection is not active or if the last N-PDU of an unconfirmed transmission has already been forwarded to the FrIf, the cancellation fails and the function returns
E_NOT_OK[SWS_FrTp_01116].
Error Handling and Concurrency
If development error detection is enabled for FrTp_CancelTransmit, the function checks the parameter TxPduId for validity. If this check fails, the development error FRTP_E_INVALID_PDU_SDU_ID is reported and E_NOT_OK is returned [SWS_FrTp_01141].
The function is reentrant for calls with different PDU IDs, but must not be executed concurrently for the same TxPduId [SWS_FrTp_00150].
This usage note was created automatically based on the AUTOSAR CP R20-11 specification.
Implementer's Guide to follow (complexity I2)
function FrTp_ChangeParameter [SWS_FrTp_00151] 📄 PDF
Std_ReturnType FrTp_ChangeParameter (PduIdType id, TPParameterType parameter, uint16 value);
Request to change a specific transport protocol parameter (e.g. block size).
According to [SWS_FrTp_00151], the synchronous function FrTp_ChangeParameter serves the request to change specific transport protocol parameters at runtime. The parameter id references the affected PDU, while parameter passes the identifier of the parameter and value passes the new value. Upon successful adjustment, the function returns E_OK; otherwise, the change request is rejected with E_NOT_OK [SWS_FrTp_00151].
Specifically, this service is used to modify parameters of the FlowControl PDU for bandwidth control (BandwidthControl, BC) according to ISO 10681-2 at runtime [SWS_FrTp_00242]. This affects:
- the parameter
FrTpSCexp[SWS_FrTp_00242], - the parameter
FrTpMaxNbrOfNPduPerCycle[SWS_FrTp_00242].
On the sender side, an additional FlowControl PDU triggered thereby is received as an unexpected N-PDU and ignored [SWS_FrTp_00242].
Error handling
If development error detection is enabled for the function, formal parameter checks are performed:
- Check of the PDU identifier
id: If the value is invalid, the function reports the development errorFRTP_E_INVALID_PDU_SDU_IDand returnsE_NOT_OK[SWS_FrTp_01143]. - Check of the parameter
parameter: If the identifier is invalid, the function reportsFRTP_E_INVALID_PARAMETERand returnsE_NOT_OK[SWS_FrTp_01144].
Concurrency and Limitations
The function is specified as non-reentrant (Non Reentrant) [SWS_FrTp_00151]. Callers must therefore ensure that calls proceed sequentially; external synchronization is presumably required for accesses from different tasks. Question Q-fe82be70448a3e0b (open)
This usage note was generated automatically based on the specification AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I1)
function FrTp_CancelReceive [SWS_FrTp_01172] 📄 PDF
Std_ReturnType FrTp_CancelReceive (PduIdType RxPduId);
Requests cancellation of an ongoing reception of a PDU in a lower layer transport protocol module.
The synchronous function FrTp_CancelReceive requests the abort of an ongoing PDU reception in the FlexRay transport layer [SWS_FrTp_01172]. It is available via the header FrTp.h and makes it possible to stop an active receive operation in a targeted manner.
Parameters and Return Values
RxPduId of type PduIdType is passed as the input parameter, thereby uniquely identifying the PDU to be aborted [SWS_FrTp_01172]. Additional input or output parameters do not exist. The function returns a status value of type Std_ReturnType:
E_OK: The abort of the PDU reception was successfully executed by the target module [SWS_FrTp_01172], [SWS_FrTp_01183].E_NOT_OK: The target module rejected the abort request [SWS_FrTp_01172].
Concurrency and Limitations
The function is classified as non-reentrant (Non Reentrant) [SWS_FrTp_01172]. Callers must therefore ensure that no parallel or nested calls occur in order to avoid inconsistencies in the internal PDU state management.
This usage note was generated automatically based on the specification.
Implementer's Guide to follow (complexity I1)
function FrTp_TriggerTransmit [SWS_FrTp_00154] 📄 PDF
Std_ReturnType FrTp_TriggerTransmit (PduIdType TxPduId, PduInfoType* PduInfoPtr);
Within this API , the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.
The synchronous function [SWS_FrTp_00154] serves to provide SDU data for transmission. The parameter TxPduId identifies the SDU to be transmitted, while PduInfoPtr references a structure containing the destination buffer (SduDataPtr) and the available buffer size (SduLength) [SWS_FrTp_00154].
Within the function, it is checked whether the provided data fits into the destination buffer reported via PduInfoPtr->SduLength [SWS_FrTp_00154]:
- Successful copy operation: If the buffer capacity is sufficient, the function copies the address information, PCI, and N-SDU data into the buffer
PduInfoPtr->SduDataPtr[SWS_FrTp_01060]. The data length inPduInfoPtr->SduLengthis set to the exact length of the copied data, and the function returnsE_OK[SWS_FrTp_00154], [SWS_FrTp_01061]. - Insufficient buffer: If the data does not fit into the buffer, the function aborts and returns
E_NOT_OKwithout modifyingPduInfoPtr[SWS_FrTp_00154]. In case of an error,PduInfoPtrmust not be used by the caller, as it may contain invalid data or a null pointer [SWS_FrTp_00154].
When development error detection (DET) is enabled, the function performs preliminary checks on the passed parameters:
- If
TxPduIdis invalid, the function reports the errorFRTP_E_INVALID_PDU_SDU_IDto the DET and returnsE_NOT_OK[SWS_FrTp_01145]. - If
PduInfoPtris invalid, it reports the errorFRTP_E_PARAM_POINTERto the DET and likewise returnsE_NOT_OK[SWS_FrTp_01146].
Regarding concurrency, the function is reentrant for different PDU-IDs, but must not be called concurrently for the same TxPduId [SWS_FrTp_00154].
This usage note was generated automatically based on the AUTOSAR CP R20-11 specification.
Implementer's Guide to follow (complexity I2)
function FrTp_RxIndication [SWS_FrTp_00152] 📄 PDF
void FrTp_RxIndication (PduIdType RxPduId, const PduInfoType* PduInfoPtr);
Indication of a received PDU from a lower layer communication interface module.
Usage and Semantics
The synchronous callback function FrTp_RxIndication serves to indicate a received PDU from an underlying communication interface module to the FlexRay ISO Transport Layer module and initiates the entire reception process [SWS_FrTp_00152], [SWS_FrTp_00137]. It is available via the header FrTp.h and has the service ID 0x42 with no return value [SWS_FrTp_00152]. As parameters, it expects the identifier of the received PDU (RxPduId) as well as a pointer to a structure of type PduInfoType (PduInfoPtr) [SWS_FrTp_00152]. This pointer provides the length of the received PDU (SduLength), a buffer pointer to the payload data (SduDataPtr), and the associated metadata [SWS_FrTp_00152].
Error handling
Regarding error handling, if development error detection (DET) is active, the function checks both input parameters: If RxPduId is invalid, it reports the development error FRTP_E_INVALID_PDU_SDU_ID [SWS_FrTp_01147]. If PduInfoPtr is invalid, the error FRTP_E_PARAM_POINTER is reported [SWS_FrTp_01148]. If an unsupported RxPduId is passed, execution terminates without further action [SWS_FrTp_01075]. If no free reception channel is available at the time of the call because the channel state is not Idle (FrTpRxChannelState ≠ Idle), the function likewise aborts without further processing [SWS_FrTp_01076] and the module raises the runtime error FRTP_E_NO_CHANNEL [SWS_FrTp_01186].
Concurrency and Interaction
Regarding concurrency, FrTp_RxIndication is reentrant for different PDU IDs, but not reentrant for identical PDU IDs [SWS_FrTp_00152]. The call must be performed synchronously by the underlying interface to properly start reception in the FrTp module [SWS_FrTp_00152], [SWS_FrTp_00137].
This usage note was generated automatically based on the specification requirements of AUTOSAR R20-11.
Implementer's Guide to follow (complexity I2)
function FrTp_TxConfirmation [SWS_FrTp_00153] 📄 PDF
void FrTp_TxConfirmation (PduIdType TxPduId, Std_ReturnType result);
The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.
The synchronous function [SWS_FrTp_00153] is used by the lower communication layer to notify the FrTp module of the successful transmission or failure of a PDU. Upon invocation, the lower layer passes the configured identifier FrTpTxConfirmationPduId in the parameter TxPduId as well as the transmission result result ([SWS_FrTp_01053]). Valid values for result are E_OK upon successful transmission and E_NOT_OK upon failed transmission ([SWS_FrTp_00153]).
If development error detection (DET) is enabled, the function performs a parameter check: An invalid identifier TxPduId triggers the development error FRTP_E_INVALID_PDU_SDU_ID ([SWS_FrTp_01149]), whereas an invalid value for result results in the error FRTP_E_INVALID_PARAMETER ([SWS_FrTp_01203]).
Regarding concurrency, the function is reentrant for different PDU IDs, but must not be called concurrently for the same TxPduId ([SWS_FrTp_00153]). With each call with the associated FrTpTxConfirmationPduId, the module decrements the counter TxPduPendingCounter ([SWS_FrTp_01092]).
In conjunction with the transmission status, the confirmation causes the following state transitions:
- On the sender side, the occupied channel is transitioned to the state
Idle(FrTpTxChannelState = Idle) and the flagsTX_SDU_AVAILABLEandTX_SDU_UNKNOWN_MSG_LENGTHare reset as soon as all N-SDU data has been sent,resulthas the valueE_OK, and an acknowledgment, if configured, has been received—or immediately ifresultequalsE_NOT_OK([SWS_FrTp_01056], [SWS_FrTp_01057], [SWS_FrTp_01124]). - On the receiver side, the occupied receive channel (
FrTpRxChannelState = Idle) is released when all data has been received and all required Flow Control PDUs have been confirmed withE_OK, or when the confirmation occurs withE_NOT_OK([SWS_FrTp_01081]).
This text was created by an AI and is based on the specifications of AUTOSAR release R20-11.
Implementer's Guide to follow (complexity I2)
function FrTp_MainFunction [SWS_FrTp_00162] 📄 PDF
void FrTp_MainFunction (void);
Schedules the Flex Ray TP. (Entry point for scheduling)
Usage and Call Context
The function FrTp_MainFunction has the signature void FrTp_MainFunction (void); and is specified with service ID 0x10 [SWS_FrTp_00162]. It accepts no input parameters and returns no return value to the caller [SWS_FrTp_00162]. The declaration is available via header SchM_FrTp.h [SWS_FrTp_00162]. As an interpretation, the function is thus typically expected to be called cyclically by the BSW Scheduler (Schedule Manager). Question Q-aaa6251bd84aef94 (open)
Interaction and tasks
The main task of the function consists in scheduling the FlexRay Transport Protocol module [SWS_FrTp_00162], [SWS_FrTp_00203]. According to [SWS_FrTp_00580], FrTp_MainFunction represents the mandatory entry point for pending processing tasks of the FrTp module, whereby the internal protocol processes are cyclically processed and managed.
Timing conditions and constraints
For the temporal integration into the overall system, the specification defines a fixed minimum call rate for the scheduling:
FrTp_MainFunctionmust be called at least once per FlexRay cycle [SWS_FrTp_01152].
Specific error handlings, DET or DEM notifications, as well as explicit requirements for reentrancy or concurrency are not described in the present specification scope.
This usage note was generated automatically based on the specification AUTOSAR R20-11.
Implementer's Guide to follow (complexity I1)
type FrTp_ConfigType [SWS_FrTp_01194] 📄 PDF
This is the base type for the configuration of the Flex Ray Transport Protocol A pointer to an instance of this structure will be used in the initialization of the Flex Ray Transport Protocol. The outline of the structure is defined in chapter 10 Configura tion Specification
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_FrTp- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_FrTp@rel:R20-11#451f6b94- Content hash
451f6b94- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_FlexRayISOTransportLayer.pdf#nameddest=SWS_FrTp_00215
gemini-3.8-flash-low· 2026-10-13 · German original