LIN Interface (LinIf)
Abstracts LIN hardware and manages schedule tables and frame transmission.
Funktionen — Übersicht
void LinIf_Init (const LinIf_ConfigType* ConfigPtr);Initializes the LIN Interface.void LinIf_GetVersionInfo (Std_VersionInfoType* versioninfo);Returns the version information of this module.Std_ReturnType LinIf_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);Re quests transmission of a PDU.Std_ReturnType LinIf_ScheduleRequest (NetworkHandleType Channel, LinIf_SchHandleType Schedule);Requests a schedule table to be executed.Std_ReturnType LinIf_GotoSleep (NetworkHandleType Channel);Initiates a transition into the Sleep Mode on the selected channel.Std_ReturnType LinIf_Wakeup (NetworkHandleType Channel);Initiates the wake up process.Std_ReturnType LinIf_SetTrcvMode (NetworkHandleType Channel, LinTrcv_TrcvModeType TransceiverMode);Set the given LIN transceiver to the given mode.Std_ReturnType LinIf_GetTrcvMode (NetworkHandleType Channel, LinTrcv_TrcvModeType* TransceiverModePtr);Returns the actual sta te of a LIN Transceiver Driver.Std_ReturnType LinIf_GetTrcvWakeupReason (NetworkHandleType Channel, LinTrcv_TrcvWakeupReasonType* TrcvWuReasonPtr);Returns the reason for the wake up that has been detected by the LIN Transceiver Driver.Std_ReturnType LinIf_SetTrcvWakeupMode (NetworkHandleType Channel, LinTrcv_TrcvWakeupModeType LinTrcvWakeupMode);This API enables, disables and cl ears the notification for wakeup events on the addressed networkStd_ReturnType LinIf_GetPIDTable (NetworkHandleType Channel, Lin_FramePidType* PidBuffer, uint8* PidBufferLength);Retrieves all assigned PID values.Std_ReturnType LinIf_SetPIDTable (NetworkHandleType Channel, Lin_FramePidType* PidBuffer, uint8 PidBufferLength);Sets all assigned PID values.Std_ReturnType LinIf_GetConfiguredNAD (NetworkHandleType Channel, uint8* Nad);Reports the current configured NAD.Std_ReturnType LinIf_SetConfiguredNAD (NetworkHandleType Channel, uint8 Nad);Sets the current configured NAD.void LinTp_Init (const LinTp_ConfigType* ConfigPtr);Initializes the LIN Transport Layer.Std_ReturnType LinTp_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);Requests transmission of a PDU.void LinTp_GetVersionInfo (Std_VersionInfoType* versioninfo);Returns the version information of this module.void LinTp_Shutdown (void);Shutdowns the LIN TP.Std_ReturnType LinTp_ChangeParameter (PduIdType id, TPParameterType parameter, uint16 value);Request to change a specific transport protocol parameter (e.Std_ReturnType LinIf_CheckWakeup (EcuM_WakeupSourceType WakeupSource);Will be called when the Ecu M has been notified about a wakeup on a specific LIN channel.Std_ReturnType LinIf_EnableBusMirroring (NetworkHandleType Channel, boolean MirroringActive);Enables or disables mirroring for a LIN channel.void LinIf_WakeupConfirmation (EcuM_WakeupSourceType WakeupSource);The LIN Driver or LIN Transceiver Driver will call this function to report the wake up source after the successful wakeup...Std_ReturnType LinIf_HeaderIndication (NetworkHandleType Channel, Lin_PduType* PduPtr);The LIN Driver will call this function to report a received LIN header.void LinIf_RxIndication (NetworkHandleType Channel, uint8* Lin_SduPtr);The LIN Driver will call this function to report a successfully received response and provides the reception data to the LIN...void LinIf_TxConfirmation (NetworkHandleType Channel);The LIN Driver will call this function to report a successfully transmitted response.void LinIf_LinErrorIndication (NetworkHandleType Channel, Lin_SlaveErrorType ErrorStatus);The LIN Driver will call this function to report a detected error event during header or response processing.Std_ReturnType <User_TriggerTransmit> (PduIdType TxPduId, PduInfoType* PduInfoPtr);Within this API, the upper layer module (called module) shall check whether the available data fits into the b uffer size...void <User_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 <User_RxIndication> (PduIdType RxPduId, const PduInfoType* PduInfoPtr);Indication of a received PDU from a lower layer communication interface module.void <User_ResponseErrorSignalChanged> (NetworkHandleType Channel, boolean RespErrSigValue);Notifies the change of the response error signal with the new value.boolean <User_SaveConfigurationRequest> (NetworkHandleType Channel);Notifies the reception of a Save Configuration request.
Typen — Übersicht
LinIf_SchHandleTypeIndex of the schedule table that is selectable and followed by LIN Interface.struct LinIf_ConfigTypeA pointer to an instance of this structure will be used in the initialization of the LIN Interface.struct LinTp_ConfigTypeThis is the base type for the configuration of the LIN Transport Protocol A pointer to an instance of this structure will be...LinTp_ModeThis type denotes which Schedule table can be requested by LIN TP during diagnostic session
Funktionen & Typen — Detailansicht
function LinIf_Init [SWS_LinIf_00198] 📄 PDF
void LinIf_Init (const LinIf_ConfigType* ConfigPtr);
Initializes the LIN Interface.
The synchronous function LinIf_Init serves to initialize the LIN interface according to [SWS_LinIf_00198]. The interface has the service ID 0x01, is available via header file LinIf.h, and is executed synchronously.
Call Context and Parameters
The function expects ConfigPtr (const LinIf_ConfigType*) as its only parameter, which serves as a pointer to the configuration of the LIN interface [SWS_LinIf_00198]. It has no return value and has no input/output or pure output parameters.
Initialization Sequences and Interaction
During initialization, the LIN interface applies specific settings for slave nodes:
- According to [SWS_LinIf_00767], the module initializes in
LinIf_Initthe initial node address (initial NAD) and the configured node address (configured NAD) of the slave node based on configuration parametersLinIfInitialNADandLinIfConfiguredNAD. - According to [SWS_LinIf_00768], the module initializes in
LinIf_Initthe configured PIDs of the slave node from the configuration data via configuration parametersLinIfFrameId.
Concurrency and Limitations
The function is specified as non-reentrant (Non Reentrant) [SWS_LinIf_00198]. Concurrent or overlapping invocation is therefore inadmissible. Specific error codes or DET messages are not stated for this service in the provided specification scope.
This usage note was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function LinIf_GetVersionInfo [SWS_LinIf_00340] 📄 PDF
void LinIf_GetVersionInfo (Std_VersionInfoType* versioninfo);
Returns the version information of this module.
function LinIf_Transmit [SWS_LinIf_00201] 📄 PDF
Std_ReturnType LinIf_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);
Re quests transmission of a PDU.
Usage and Call Context
The function LinIf_Transmit declared in LinIf.h (service ID 0x49) serves for the synchronous request to transmit a PDU [SWS_LinIf_00201]. As input parameters, it expects TxPduId for uniquely identifying the PDU to be transmitted as well as the pointer PduInfoPtr to a PduInfoType structure, which can reference metadata in addition to the data length and actual payload data [SWS_LinIf_00201]. Additional input/output or output parameters do not exist [SWS_LinIf_00201].
Return Values and Behavioral Requirements
As return value, the service returns the status Std_ReturnType [SWS_LinIf_00201]:
E_OK: The transmission request was successfully accepted by the LIN interface [SWS_LinIf_00201].E_NOT_OK: The request for transmission could not be accepted [SWS_LinIf_00201].
The interaction with the frame types is clarified by [SWS_LinIf_00700]: When the LIN interface is initialized, LinIf_Transmit returns E_OK even if the PDU belongs to a non-sporadic frame on a LIN master node or to a non-event-triggered frame on a LIN slave node.
Concurrency
With respect to the execution environment, LinIf_Transmit is reentrant for different PDU IDs, but must not be called simultaneously or concurrently for the same TxPduId [SWS_LinIf_00201].
This usage note was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function LinIf_ScheduleRequest [SWS_LinIf_00202] 📄 PDF
Std_ReturnType LinIf_ScheduleRequest (NetworkHandleType Channel, LinIf_SchHandleType Schedule);
Requests a schedule table to be executed. Only used for LIN master nodes.
The function LinIf_ScheduleRequest serves exclusively on LIN master nodes to request the execution of a specified schedule table [SWS_LinIf_00202]. The call is processed asynchronously and designed to be reentrant [SWS_LinIf_00202].
Parameters and Return Values
The affected LIN channel index is passed via the parameter Channel, while Schedule defines the identification of the schedule table to be newly executed [SWS_LinIf_00202]. The function returns the status as Std_ReturnType:
E_OK: The switch request for the schedule table was successfully accepted [SWS_LinIf_00202].E_NOT_OK: The switch was rejected [SWS_LinIf_00202].
Error Conditions and Limitations
A return value of E_NOT_OK occurs according to the specification in the following error cases [SWS_LinIf_00202]:
- The LIN interface is not yet initialized.
- The referenced channel does not exist or the passed index is out of range.
- The referenced schedule table does not exist or its identifier is invalid.
- The current state is Sleep.
Interaction
The failure of a schedule request impacts higher-level transport operations: If a schedule switch is initiated via LinIf_ScheduleRequest during a LinTp_Transmit call via BswM_LinTp_RequestMode, LinTp_Transmit must unconditionally return E_NOT_OK when LinIf_ScheduleRequest responds with E_NOT_OK [SWS_LinIf_00878].
This usage note is based exclusively on the specification data of AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I1)
function LinIf_GotoSleep [SWS_LinIf_00204] 📄 PDF
Std_ReturnType LinIf_GotoSleep (NetworkHandleType Channel);
Initiates a transition into the Sleep Mode on the selected channel.
use
The function LinIf_GotoSleep (service ID 0x06, declared in LinIf.h) initiates the transition into sleep mode on the specified LIN channel [SWS_LinIf_00204]. The call takes place asynchronously and accepts the identifier of the relevant channel as input parameter Channel of type NetworkHandleType [SWS_LinIf_00204].
Return Values and Error Handling
As return value, the service returns the type Std_ReturnType with the following meanings [SWS_LinIf_00204]:
E_OK: The request to switch to sleep mode was successfully accepted, the state transition to sleep mode is already in progress, or the controller is already in sleep state [SWS_LinIf_00204].E_NOT_OK: The request was not accepted. Possible causes for this are a LIN interface that is not yet initialized or a channel identifier that does not exist or lies outside the valid value range [SWS_LinIf_00204].
Concurrency and System Interaction
The interface is defined as non-reentrant (Non Reentrant) [SWS_LinIf_00204]. If LinIf_GotoSleep is called, the LIN interface must call the function Lin_GotoSleepInternal immediately and must not wait until the next cycle of the main function [SWS_LinIf_00757].
This usage note was generated automatically based on the AUTOSAR R20-11 specification.
Implementer's Guide to follow (complexity I1)
function LinIf_Wakeup [SWS_LinIf_00205] 📄 PDF
Std_ReturnType LinIf_Wakeup (NetworkHandleType Channel);
Initiates the wake up process.
The reentrant function LinIf_Wakeup initiates the asynchronous wake-up process for the LIN channel identified by the parameter Channel [SWS_LinIf_00205]. It is available via header LinIf.h [SWS_LinIf_00205].
The return value Std_ReturnType provides information about the acceptance of the request [SWS_LinIf_00205]:
E_OKsignals that the wake-up request was accepted or the controller is already no longer in sleep state [SWS_LinIf_00205].E_NOT_OKis returned if the LIN interface is not initialized, the passed channel ID is outside the valid range, or the underlying driver callsLin_WakeuporLin_WakeupInternalfail withE_NOT_OK[SWS_LinIf_00205].
The interaction with the user takes place via the feedback function <User>_WakeupConfirmation:
- In case of error, the LIN interface mandatorily calls
<User>_WakeupConfirmation(FALSE)before returningE_NOT_OK[SWS_LinIf_00762]. - Upon successful acceptance (
E_OK), the LIN interface confirms the wake-up asynchronously: The module only issues the call<User>_WakeupConfirmation(TRUE)when the functionLinIf_HeaderIndicationis subsequently called for the first time [SWS_LinIf_00761].
This text was generated automatically. It is based on the requirements of the AUTOSAR specification.
Implementer's Guide to follow (complexity I1)
function LinIf_SetTrcvMode [SWS_LinIf_00544] 📄 PDF
Std_ReturnType LinIf_SetTrcvMode (NetworkHandleType Channel, LinTrcv_TrcvModeType TransceiverMode);
Set the given LIN transceiver to the given mode.
The synchronous and reentrant function LinIf_SetTrcvMode (service ID 0x08) serves to switch the specified LIN transceiver to the requested operating mode [SWS_LinIf_00544]. The interface is available via the header file LinIf.h [SWS_LinIf_00544].
Parameters and Return Values
The call requires two input parameters [SWS_LinIf_00544]:
Channel(NetworkHandleType): Identifies the LIN channel to be controlled [SWS_LinIf_00544].TransceiverMode(LinTrcv_TrcvModeType): Determines the requested state transition of the transceiver [SWS_LinIf_00544].
The return value of type Std_ReturnType signals the result of the switching process [SWS_LinIf_00544]:
E_OK: Is returned when the transceiver state was successfully changed to the requested mode [SWS_LinIf_00544].E_NOT_OK: Signals that the state change has failed or at least one parameter is outside the permissible range. The previous state of the transceiver remains unchanged [SWS_LinIf_00544].
Execution and Error Behavior
The function is executed synchronously and specified as reentrant [SWS_LinIf_00544]. Specific DET or DEM error messages are not listed separately in the specification element; a failure of the mode change or impermissible parameter values lead directly to return value E_NOT_OK [SWS_LinIf_00544].
This usage note was generated automatically based on the specification of AUTOSAR CP R20-11.
Implementer's Guide to follow (complexity I1)
function LinIf_GetTrcvMode [SWS_LinIf_00545] 📄 PDF
Std_ReturnType LinIf_GetTrcvMode (NetworkHandleType Channel, LinTrcv_TrcvModeType* TransceiverModePtr);
Returns the actual sta te of a LIN Transceiver Driver.
function LinIf_GetTrcvWakeupReason [SWS_LinIf_00547] 📄 PDF
Std_ReturnType LinIf_GetTrcvWakeupReason (NetworkHandleType Channel, LinTrcv_TrcvWakeupReasonType* TrcvWuReasonPtr);
Returns the reason for the wake up that has been detected by the LIN Transceiver Driver.
function LinIf_SetTrcvWakeupMode [SWS_LinIf_00550] 📄 PDF
Std_ReturnType LinIf_SetTrcvWakeupMode (NetworkHandleType Channel, LinTrcv_TrcvWakeupModeType LinTrcvWakeupMode);
This API enables, disables and cl ears the notification for wakeup events on the addressed network
The synchronous and reentrant function LinIf_SetTrcvWakeupMode serves to enable, disable, or clear notifications for wakeup events on the specified LIN channel [SWS_LinIf_00550]. The declaration is provided via the header LinIf.h and has the service ID 0x0b [SWS_LinIf_00550].
The interface expects two input parameters [SWS_LinIf_00550]:
Channel: Unique identifier of the LIN network or channel to be addressed of typeNetworkHandleType[SWS_LinIf_00550].LinTrcvWakeupMode: Requested wakeup mode of the transceiver of typeLinTrcv_TrcvWakeupModeType[SWS_LinIf_00550].
As return value, the function provides the status Std_ReturnType [SWS_LinIf_00550]:
E_OK: The call to the LIN transceiver driver API service was successful and returnedE_OK[SWS_LinIf_00550].E_NOT_OK: The LIN transceiver driver API service failed (returnedE_NOT_OK) or at least one of the passed parameters for channel or mode is invalid [SWS_LinIf_00550].
Regarding interaction, the function delegates the request to the LIN transceiver driver; presumably the LinIf here forms an intermediary interface between upper layers and the transceiver hardware [SWS_LinIf_00550]. Question Q-07b525a14a2c5fcd (open) Since the service is specified as reentrant, it may be executed concurrently for different channels or the same channel [SWS_LinIf_00550].
This text was generated by an AI and serves as guidance. The official AUTOSAR specification documents are authoritative.
Implementer's Guide to follow (complexity I1)
function LinIf_GetPIDTable [SWS_LinIf_91002] 📄 PDF
Std_ReturnType LinIf_GetPIDTable (NetworkHandleType Channel, Lin_FramePidType* PidBuffer, uint8* PidBufferLength);
Retrieves all assigned PID values. The order is congruent to the LIN frame index. Only applicable for LIN slave nodes.
function LinIf_SetPIDTable [SWS_LinIf_91003] 📄 PDF
Std_ReturnType LinIf_SetPIDTable (NetworkHandleType Channel, Lin_FramePidType* PidBuffer, uint8 PidBufferLength);
Sets all assigned PID values. The order is congruent to the LIN frame index. Only applicable for LIN slave nodes.
function LinIf_GetConfiguredNAD [SWS_LinIf_00829] 📄 PDF
Std_ReturnType LinIf_GetConfiguredNAD (NetworkHandleType Channel, uint8* Nad);
Reports the current configured NAD. Only applicable for LIN slave nodes.
function LinIf_SetConfiguredNAD [SWS_LinIf_00833] 📄 PDF
Std_ReturnType LinIf_SetConfiguredNAD (NetworkHandleType Channel, uint8 Nad);
Sets the current configured NAD. Only applicable for LIN slave nodes.
function LinTp_Init [SWS_LinIf_00350] 📄 PDF
void LinTp_Init (const LinTp_ConfigType* ConfigPtr);
Initializes the LIN Transport Layer.
Usage and Call Context
The function LinTp_Init serves to initialize the transport layer of the LIN protocol ([SWS_LinIf_00350]). According to specification [SWS_LinIf_00350], the function call operates synchronously.
The function signature is void LinTp_Init (const LinTp_ConfigType* ConfigPtr). The configuration is passed via the input parameter:
ConfigPtr(in): Pointer to the configuration data of the LIN transport layer of typeLinTp_ConfigType([SWS_LinIf_00350]).
The function returns no value (void) and defines neither output nor input/output parameters ([SWS_LinIf_00350]). It has the hexadecimal service ID 0x40 and is provided via the header file LinIf.h ([SWS_LinIf_00350]).
Error handling
Requirement [SWS_LinIf_00350] defines no specific error codes, DET messages, or DEM events for this function. No error status is returned to the caller ([SWS_LinIf_00350]).
Concurrency and Limitations
The function LinTp_Init is explicitly classified as non-reentrant (Non Reentrant) ([SWS_LinIf_00350]). Consequently, it must not be called concurrently from multiple threads, tasks, or interrupt routines. Interpretation: The call is likely to occur centrally within the initialization sequence of the basic software before subsequent communication requests can be processed. Question Q-6e391bdf8abb1a09 (open)
Interaction
For LinTp_Init, no direct links to other specification requirements or neighboring functions are listed in this excerpt ([SWS_LinIf_00350]). Module LinIf provides the declaration ([SWS_LinIf_00350]).
This usage note was generated automatically based on the specification of AUTOSAR Classic Release R20-11.
Implementer's Guide to follow (complexity I1)
function LinTp_Transmit [SWS_LinIf_00351] 📄 PDF
Std_ReturnType LinTp_Transmit (PduIdType TxPduId, const PduInfoType* PduInfoPtr);
Requests transmission of a PDU.
The synchronous function LinTp_Transmit serves to request a PDU transmission via the LIN Transport Protocol ([SWS_LinIf_00351]). As parameters, it expects the PDU identifier TxPduId as well as the pointer PduInfoPtr, which provides the data length and pointers to the PDU data and metadata ([SWS_LinIf_00351]). The return value is E_OK upon successful acceptance of the transmit request and E_NOT_OK in the event of rejection ([SWS_LinIf_00351]).
The runtime behavior and interaction with the LIN interface are subject to the following specifications:
- Schedule request: If the schedule switch initiated at
LinIf_ScheduleRequestin the context of the call viaBswM_LinTp_RequestModefails and returnsE_NOT_OK,LinTp_Transmitmust also respond directly withE_NOT_OK([SWS_LinIf_00878]). - Confirmation: Only if
LinTp_Transmitwas successful (return valueE_OK) does the LIN interface call the functionPduR_LinTpTxConfirmationwith a positive or negative result after a successful or failed schedule table switch ([SWS_LinIf_00702]). If the transmit job is rejected, this call is omitted completely ([SWS_LinIf_00702]). - Interruption of ongoing operations: If a new physical request is triggered via
LinTp_Transmitwhile waiting for a physical response or during response reception, the LIN interface aborts the ongoing TP handling including reception and N_Cr and P2 timeout monitoring and accepts the new request ([SWS_LinIf_00708]).
Regarding concurrency, LinTp_Transmit is reentrant for different TxPduId, but must not be executed concurrently for the same TxPduId ([SWS_LinIf_00351]).
This usage note is based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I1)
function LinTp_GetVersionInfo [SWS_LinIf_00352] 📄 PDF
void LinTp_GetVersionInfo (Std_VersionInfoType* versioninfo);
Returns the version information of this module.
function LinTp_Shutdown [SWS_LinIf_00355] 📄 PDF
void LinTp_Shutdown (void);
Shutdowns the LIN TP.
The function LinTp_Shutdown serves the controlled shutdown of the LIN transport protocol ([SWS_LinIf_00355]). By calling it, the operation of the LIN TP component is terminated ([SWS_LinIf_00355]). The function declaration is available via the header file LinIf.h ([SWS_LinIf_00355]).
The following specification characteristics apply to usage and execution ([SWS_LinIf_00355]):
- Parameters and return value: The function has no input, input/output, or output parameters (
void) and returns no value (void) ([SWS_LinIf_00355]). - Service identification: The service is defined under the service ID
0x43([SWS_LinIf_00355]). - Synchronicity: The call is processed synchronously ([SWS_LinIf_00355]).
- Reentrancy: The function is non-reentrant (Non Reentrant) ([SWS_LinIf_00355]). Concurrent or nested calls from different contexts are not permitted.
Specific error codes, reports to the Development Error Tracer (DET), or special error handling are not described for this function in the sources ([SWS_LinIf_00355]). Likewise, details regarding related requirements or the exact caller are missing; the call presumably occurs as part of the sequential deinitialization of the communication stack by higher-level BSW state management. Question Q-e25a3c9531527c4f (open)
This usage note was generated automatically. It is based exclusively on the specification details of the AUTOSAR element in release R20-11.
Implementer's Guide to follow (complexity I1)
function LinTp_ChangeParameter [SWS_LinIf_00501] 📄 PDF
Std_ReturnType LinTp_ChangeParameter (PduIdType id, TPParameterType parameter, uint16 value);
Request to change a specific transport protocol parameter (e.g. block size).
Usage and Semantics
The synchronous function LinTp_ChangeParameter serves to adjust a specific parameter of the transport protocol for a specific PDU at runtime [SWS_LinIf_00501]. The PDU identifier (id), the identifier of the transport protocol parameter to be changed (parameter, for example the block size), and the new target value (value) are passed as parameters [SWS_LinIf_00501]. The declaration is provided via the header LinIf.h [SWS_LinIf_00501].
Return Values and Fault Behavior
The function signals the result of the request immediately via its return value of type Std_ReturnType [SWS_LinIf_00501]:
E_OK: The requested parameter was successfully changed to the new value [SWS_LinIf_00501].E_NOT_OK: The modification was rejected by the LIN transport protocol [SWS_LinIf_00501]. This is likely to occur typically if the parameter is invalid or an ongoing transmission prevents the modification. Question Q-84aaf28c12dee2e9 (open)
Concurrency and Limitations
According to the specification, LinTp_ChangeParameter is classified as non-reentrant (Non Reentrant) [SWS_LinIf_00501]. A concurrent or nested call for the same or parallel contexts is therefore inadmissible and must be prevented by the caller. The synchronous execution blocks the caller until the decision on the adoption of the parameter value is made [SWS_LinIf_00501].
This text was created by an AI and is based exclusively on the specification data of AUTOSAR R20-11.
function LinIf_CheckWakeup [SWS_LinIf_00378] 📄 PDF
Std_ReturnType LinIf_CheckWakeup (EcuM_WakeupSourceType WakeupSource);
Will be called when the Ecu M has been notified about a wakeup on a specific LIN channel.
Usage and Call Context
The synchronous function LinIf_CheckWakeup is called as soon as the module EcuM has been notified about a wakeup event on a specific LIN channel [SWS_LinIf_00378]. The call is made with the input parameter WakeupSource of type EcuM_WakeupSourceType [SWS_LinIf_00378]. This parameter specifies the source device that initiated the wakeup event, which can be a LIN controller or a LIN transceiver [SWS_LinIf_00378].
Error Handling and Return Values
As return value, the function provides a status of type Std_ReturnType [SWS_LinIf_00378]:
E_OK: No error occurred during execution of the interface [SWS_LinIf_00378].E_NOT_OK: An error occurred during execution of the interface or an invalid value was passed forWakeupSource[SWS_LinIf_00378].
Concurrency and Integration
The interface is specified as reentrant, has the service ID 0x60, and is provided via the header file LinIf.h [SWS_LinIf_00378]. It directly connects the wakeup processing of EcuM to the channels of the LIN interface [SWS_LinIf_00378].
This text was generated by an AI based on the specification AUTOSAR CP R20-11.
function LinIf_EnableBusMirroring [SWS_LinIf_00876] 📄 PDF
Std_ReturnType LinIf_EnableBusMirroring (NetworkHandleType Channel, boolean MirroringActive);
Enables or disables mirroring for a LIN channel.
The synchronous and reentrant function LinIf_EnableBusMirroring enables or disables bus mirroring for an individual LIN channel [SWS_LinIf_00876]. It is available via the header LinIf.h and can be omitted if bus mirroring is not enabled via configuration parameter LinIfBusMirroringSupport [SWS_LinIf_00875]. The mirror module is likely to typically act as the caller. Question Q-1703af5207cb7ade (open)
The affected LIN channel is passed via the parameter Channel, while MirroringActive controls the mode [SWS_LinIf_00876]: Passing TRUE enables mirroring, while FALSE disables it [SWS_LinIf_00876]. As return value, the function returns E_OK if the mirroring mode was successfully changed, or E_NOT_OK if an invalid channel was specified or mirroring is globally disabled [SWS_LinIf_00876]. Specific DET or DEM error messages are not stated in the function definition [SWS_LinIf_00876].
If bus mirroring is enabled globally via LinIfBusMirroringSupported as well as for the respective channel, the LIN interface forwards relevant events to Mirror_ReportLinFrame:
- Received frames upon
LinIf_RxIndicationwith statusLIN_RX_OKand a pointer to the payload data [SWS_LinIf_00838] as well as when reading out the LIN driver status for Rx slots [SWS_LinIf_00873]. - Transmitted frames upon
LinIf_TxConfirmationwith statusLIN_TX_OKand a pointer to the transmitted data [SWS_LinIf_00839] as well as when reading out the LIN driver status for Tx slots [SWS_LinIf_00874]. - Error notifications upon
LinIf_LinErrorIndicationfor all error codes exceptLIN_ERR_HEADERwith error status and NULL pointer as data content [SWS_LinIf_00869].
This usage note was generated by an AI based on the AUTOSAR Classic R20-11 specification.
Implementer's Guide to follow (complexity I1)
function LinIf_WakeupConfirmation [SWS_LinIf_00715] 📄 PDF
void LinIf_WakeupConfirmation (EcuM_WakeupSourceType WakeupSource);
The LIN Driver or LIN Transceiver Driver will call this function to report the wake up source after the successful wakeup detection during Check Wakeup or after power on by bus.
The function LinIf_WakeupConfirmation serves to report the successful detection of a wakeup event to the LIN interface [SWS_LinIf_00715].
Call and Parameters
The call is made by the LIN driver (LIN Driver) or the LIN transceiver driver (LIN Transceiver Driver) after successful wakeup detection occurred during Check Wakeup or after a power-on by bus (power on by bus) [SWS_LinIf_00715]. As parameter, WakeupSource of type EcuM_WakeupSourceType is passed, which specifies the source device that initiated the wakeup event (LIN controller or LIN transceiver) [SWS_LinIf_00715].
Execution Properties and Interface
- Semantics: The call is handled synchronously [SWS_LinIf_00715].
- Reentrancy: The function is specified as reentrant [SWS_LinIf_00715].
- Return value: There is no return value (
void) [SWS_LinIf_00715]. - Header: The declaration is provided via
LinIf.h(service ID:0x61) [SWS_LinIf_00715].
This text was generated by an AI based on the AUTOSAR specification.
function LinIf_HeaderIndication [SWS_LinIf_91004] 📄 PDF
Std_ReturnType LinIf_HeaderIndication (NetworkHandleType Channel, Lin_PduType* PduPtr);
The LIN Driver will call this function to report a received LIN header. This function is only applicable for LIN slave nodes (available only if the ECU has any LIN slave channel).
The callback function LinIf_HeaderIndication is called synchronously by the LIN driver to report the reception of a LIN header on a slave channel [SWS_LinIf_91004]. It is available exclusively if the ECU has at least one configured LIN slave channel [SWS_LinIf_91004]. The function is reentrant for different channels, but must not be called concurrently for the same channel [SWS_LinIf_91004].
Via the inout parameter PduPtr, the driver passes the received identifier (PID) as well as the pointer to the SDU data buffer [SWS_LinIf_91004]. The LinIf evaluates the PID and controls the reaction of the slave node:
- Receive frame: If the PID belongs to a configured receive frame, the LinIf sets the checksum type
PduPtr->Cs, the data lengthPduPtr->Dl, and assigns the valueLIN_FRAMERESPONSE_RXtoPduPtr->Drcbefore returning [SWS_LinIf_00733]. - Transmit frame: If it is a transmit frame, the LinIf requests the payload data via
<User_TriggerTransmit>[SWS_LinIf_00738]. Upon successful provision (return valueE_OKor SRF data through node configuration handler / transport protocol), checksum and length are configured, andPduPtr->Drcis set toLIN_FRAMERESPONSE_TX[SWS_LinIf_00739]. If the query fails withE_NOT_OK,PduPtr->Drcis set toLIN_FRAMERESPONSE_IGNORE[SWS_LinIf_00740]. - Irrelevant frames: If the frame is not relevant for the slave, the LinIf likewise sets
PduPtr->DrctoLIN_FRAMERESPONSE_IGNORE[SWS_LinIf_00748].
In addition, each call reloads the running bus idle timer [SWS_LinIf_00754]. If the call occurs for the first time after a successful LinIf_Wakeup, <User>_WakeupConfirmation(TRUE) is triggered [SWS_LinIf_00761]. Upon reception of an SRF header, LinIf also starts the N_As timer for Consecutive Frames (CF) [SWS_LinIf_00800]. As a return value, E_OK indicates acceptance of the request, while E_NOT_OK indicates development or production errors [SWS_LinIf_91004].
This text was generated by an AI based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I2)
function LinIf_RxIndication [SWS_LinIf_91005] 📄 PDF
void LinIf_RxIndication (NetworkHandleType Channel, uint8* Lin_SduPtr);
The LIN Driver will call this function to report a successfully received response and provides the reception data to the LIN Interface. This function is only applicable for LIN slave nodes (available only if the ECU has any LIN slave channel).
The callback function LinIf_RxIndication is called synchronously by the LIN driver to notify the LIN interface of the successful reception of a response including the received data [SWS_LinIf_91005]. The function is available exclusively on ECUs with at least one configured LIN slave channel [SWS_LinIf_91005].
With regard to parameterization and concurrency, the following conditions apply:
- Parameters: Passed are the channel identification
Channeland the pointerLin_SduPtrto a shadow buffer or the memory-mapped reception buffer of the LIN hardware [SWS_LinIf_91005]. This pointer is valid only if a response was actually received [SWS_LinIf_91005]. - Return value: The function has no return value (
void) [SWS_LinIf_91005]. - Reentrancy: The interface is reentrant for different LIN channels, but not reentrant for the same channel [SWS_LinIf_91005].
In interaction with the module behavior, the call triggers several coordinating actions:
- Forwarding of the received payload data and payload length to the upper layer via
<User_RxIndication>[SWS_LinIf_00734]. - Check for sleep commands: If it is a Master Request Frame (MRF) with NAD 0, the LIN interface detects a go-to-sleep command and initiates the transition to sleep mode [SWS_LinIf_00750].
- Timer control: On each call, the bus idle timer is reloaded [SWS_LinIf_00754]. In addition, for MRF frames (FF, CF), the call controls the N_Cr timer (start/restart on FF and CF prior to the last frame, stop on the last CF) [SWS_LinIf_00805].
- Bus mirroring: If mirroring is enabled globally and for the channel, the LIN interface forwards the frame with status
LIN_RX_OKviaMirror_ReportLinFrame()[SWS_LinIf_00838].
This usage note was generated automatically based on the AUTOSAR specification R20-11.
Implementer's Guide to follow (complexity I1)
function LinIf_TxConfirmation [SWS_LinIf_91006] 📄 PDF
void LinIf_TxConfirmation (NetworkHandleType Channel);
The LIN Driver will call this function to report a successfully transmitted response. This function is only applicable for LIN slave nodes (available only if the ECU has any LIN slave channel).
The synchronous callback function LinIf_TxConfirmation (Service ID 0x7a, declared in LinIf.h) is called by the LIN driver to confirm the successful transmission of a response on the specified channel [SWS_LinIf_91006]. The function has no return value and is intended exclusively for ECUs with at least one configured LIN slave channel [SWS_LinIf_91006].
Upon arrival of the confirmation, the LIN interface performs several follow-up processes:
- Upper-layer notification: The module forwards the transmission event to the upper layer via the callback function
<User_TxConfirmation>with return valueE_OK[SWS_LinIf_00741]. - Error status: If the successfully transmitted frame contains the error signal
response_error, the LIN interface resets this signal [SWS_LinIf_00747]. - Bus idle monitoring: Each call to
LinIf_TxConfirmationreloads the running bus idle timer of the channel [SWS_LinIf_00754]. - Transport protocol (LinTp): If the driver confirms the response to an SRF header (Slave Response Frame), the interface stops the monitoring timer
N_As[SWS_LinIf_00800]. - Bus Mirroring: If mirroring is configured globally via
LinIfBusMirroringSupportedand enabled viaLinIf_EnableBusMirroring(), the interface reports the frame with statusLIN_TX_OKand a pointer to the transmit data toMirror_ReportLinFrame()[SWS_LinIf_00839].
Regarding concurrency, LinIf_TxConfirmation is designed to be reentrant for different LIN channels, but must not be called reentrantly for the same channel [SWS_LinIf_91006].
This usage note was generated automatically based on the specification AUTOSAR R20-11.
Implementer's Guide to follow (complexity I1)
function LinIf_LinErrorIndication [SWS_LinIf_91007] 📄 PDF
void LinIf_LinErrorIndication (NetworkHandleType Channel, Lin_SlaveErrorType ErrorStatus);
The LIN Driver will call this function to report a detected error event during header or response processing. This function is only applicable for LIN slave nodes (available only if the ECU has any LIN slave channel).
Usage and Call Context
The synchronous function LinIf_LinErrorIndication is called by the LIN driver to report errors that occurred during the processing of a header or response [SWS_LinIf_91007]. It is intended exclusively for LIN slave nodes and requires that the ECU has at least one configured LIN slave channel [SWS_LinIf_91007]. The channel identification Channel and the occurred error status ErrorStatus of type Lin_SlaveErrorType are passed as parameters [SWS_LinIf_91007].
Error Handling and Concurrency
The function is reentrant for different channels, but must not be called concurrently for the same channel [SWS_LinIf_91007]. Upon the call, the LIN interface considers the response or transmitted frame as lost and reports the runtime error LINIF_E_RESPONSE to the Default Error Tracer (DET), unless the reported error status is LIN_ERR_HEADER [SWS_LinIf_00735], [SWS_LinIf_00743].
Interaction and Bus Monitoring
Regardless of the passed error code, the LIN interface reloads the running bus idle timer on each call to LinIf_LinErrorIndication [SWS_LinIf_00754]. If an error occurs during an SRF response after reception of an SRF header, the LIN interface aborts the transmission and reports this to the upper layer via PduR_LinTpTxConfirmation with the result E_NOT_OK [SWS_LinIf_00796].
If bus mirroring is globally active via LinIfBusMirroringSupported and enabled for the channel, the LIN interface forwards errors other than LIN_ERR_HEADER via Mirror_ReportLinFrame() with a NULL pointer for the data content [SWS_LinIf_00869]. In doing so, the driver error codes are first translated into corresponding status values of type Lin_StatusType [SWS_LinIf_00870].
This usage note was generated automatically based on the specification AUTOSAR Classic R20-11.
Implementer's Guide to follow (complexity I2)
function <User_TriggerTransmit> [SWS_LinIf_00528] 📄 PDF
Std_ReturnType <User_TriggerTransmit> (PduIdType TxPduId, PduInfoType* PduInfoPtr);
Within this API, the upper layer module (called module) shall check whether the available data fits into the b uffer 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 ch anging Pdu Info Ptr.
The configurable interface <User_TriggerTransmit> is used for synchronously retrieving SDU data from an upper module for an upcoming transmission [SWS_LinIf_00528].
The requested SDU is identified via the parameter TxPduId, while PduInfoPtr is passed as a pointer to a structure containing the target buffer (SduDataPtr) and the available buffer size (SduLength) [SWS_LinIf_00528]. Within this API, the called upper module checks whether the available data fits into the reported buffer size [SWS_LinIf_00528]. If sufficient space is available, the module copies its data to SduDataPtr, updates SduLength with the number of actually copied bytes, and signals success with the return value E_OK [SWS_LinIf_00528].
If, however, the buffer size is insufficient, no SDU data is copied and the module returns E_NOT_OK without modifying PduInfoPtr [SWS_LinIf_00528]. With a return value of E_NOT_OK, the caller must under no circumstances use PduInfoPtr, as it may point to invalid data or be a NULL pointer [SWS_LinIf_00528].
Regarding concurrency, the function is reentrant for different PDU-IDs, but non-reentrant for the same PDU-ID [SWS_LinIf_00528].
This usage note is based on the AUTOSAR specification SWS_LinIf_00528.
function <User_TxConfirmation> [SWS_LinIf_00529] 📄 PDF
void <User_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 configurable callback function <User_TxConfirmation> is called by the lower-layer communication interface module to confirm the transmission of a PDU or the failure of the transmission to an upper layer [SWS_LinIf_00529]. The call is synchronous and returns no value [SWS_LinIf_00529].
Parameters and Semantics
TxPduId(In): Identifies the ID of the transmitted PDU of typePduIdType[SWS_LinIf_00529].result(In): Reports the success status of the transmission asStd_ReturnTypewith the valuesE_OKupon successful PDU transmission orE_NOT_OKupon failed transmission [SWS_LinIf_00529].
Concurrency and Error Handling
Regarding reentrancy, the function is designed to be reentrant for different PDU-IDs, but must not be called reentrantly for the same PDU-ID [SWS_LinIf_00529]. The module specifies no separate error codes or DET or DEM messages for this interface; failure of a transmission is indicated via the parameter value E_NOT_OK instead [SWS_LinIf_00529]. The actual function identifier is likely determined integration-specifically depending on the configured user layer, since the service is specified as configurable [SWS_LinIf_00529]. Question Q-35de931161f26cb8 (open)
This text was generated by an AI based on the specification.
function <User_RxIndication> [SWS_LinIf_00530] 📄 PDF
void <User_RxIndication> (PduIdType RxPduId, const PduInfoType* PduInfoPtr);
Indication of a received PDU from a lower layer communication interface module.
The callback function <User_RxIndication> serves to signal a received PDU from a lower-layer communication interface module to the upper layer [SWS_LinIf_00530]. The call is performed with synchronous semantics and has no return value [SWS_LinIf_00530].
Parameters and interface specification
The function passes two input parameters to the upper layer [SWS_LinIf_00530]:
RxPduId: Identifier of the received PDU of typePduIdType[SWS_LinIf_00530].PduInfoPtr: Pointer to a structure of typePduInfoTypethat provides the payload length (SduLength), a pointer to the buffer with the payload (SduDataPtr), and associated metadata for the PDU [SWS_LinIf_00530].
Neither input/output parameters nor pure output parameters are provided for this interface [SWS_LinIf_00530].
Concurrency and Configuration
Regarding reentrancy, the function is designed to be reentrant for different PDU-IDs, but explicitly specified as non-reentrant for identical PDU-IDs [SWS_LinIf_00530]. Callers must therefore ensure that no overlapping calls occur for the same RxPduId. The function is declared as a configurable interface [SWS_LinIf_00530]; the concrete function name of the upper layer is thus likely determined via module configuration. Question Q-94175e8cd86775b6 (open)
This usage note was generated automatically based on the specification SWS_LinIf_00530.
function <User_ResponseErrorSignalChanged> [SWS_LinIf_00856] 📄 PDF
void <User_ResponseErrorSignalChanged> (NetworkHandleType Channel, boolean RespErrSigValue);
Notifies the change of the response error signal with the new value. Only applicable for LIN slave nodes. AUTOSAR CP R20 - of Document ID : AUTOSAR_ SWS_ LINInterface
The interface <User_ResponseErrorSignalChanged> serves in the LinIf module as a notification function to report a value change of the response error signal along with the new signal value [SWS_LinIf_00856]. The call is synchronous and has the service ID 0x74 [SWS_LinIf_00856]. Neither input/output parameters nor a return value are provided; the signature is defined with the return type void [SWS_LinIf_00856].
The function expects two pure input values as passing parameters [SWS_LinIf_00856]:
Channel(typeNetworkHandleType): Unique identification of the affected LIN channel [SWS_LinIf_00856].RespErrSigValue(typeboolean): Current value of the response error signal. The parameter istrueif the signal is set to 1, otherwisefalse[SWS_LinIf_00856].
Regarding concurrency and call context, it is specified that the function is reentrant for different channels, but must not be called reentrantly for the same channel [SWS_LinIf_00856]. A functional constraint is that this notification service is applicable exclusively to LIN slave nodes [SWS_LinIf_00856]. The declaration is provided via the header file LinIf_Externals.h [SWS_LinIf_00856].
This text was generated by an AI based on the AUTOSAR R20-11 specification.
function <User_SaveConfigurationRequest> [SWS_LinIf_00857] 📄 PDF
boolean <User_SaveConfigurationRequest> (NetworkHandleType Channel);
Notifies the reception of a Save Configuration request. Only applicable for LIN slave nodes.
The callback function <User_SaveConfigurationRequest> (service ID 0x75) notifies a higher-level layer of the reception of a "Save Configuration" request and is declared in LinIf_Externals.h [SWS_LinIf_00857]. This interface is applicable exclusively to LIN slave nodes [SWS_LinIf_00857].
The call is synchronous and specified as reentrant [SWS_LinIf_00857]:
- Parameters: The affected LIN channel is passed via the input parameter
Channelof typeNetworkHandleType[SWS_LinIf_00857]. Additional input or output parameters do not exist [SWS_LinIf_00857]. - Return value: The function returns a value of type
boolean[SWS_LinIf_00857]. The return valueTRUEindicates that a positive response is to be sent on the LIN bus, whereasFALSEprevents the transmission of any response [SWS_LinIf_00857].
Regarding error handling, the specification defines neither specific error codes nor DET or DEM messages [SWS_LinIf_00857]. Behavior in case of error or rejection is directly controlled via the boolean return value by preventing the transmission of a response with FALSE [SWS_LinIf_00857]. Since the call is classified as reentrant, the function is likely designed for concurrent invocation on different channels [SWS_LinIf_00857]. Question Q-84432030c1aff644 (open)
This text was generated by an AI based on the specification of AUTOSAR R20-11.
type LinIf_SchHandleType [SWS_LinIf_00197] 📄 PDF
Index of the schedule table that is selectable and followed by LIN Interface. Value is unique per LIN c hannel/ controller, but not per ECU. The number of schedule tables is limited to 255
type LinIf_ConfigType [SWS_LinIf_00668] 📄 PDF
A pointer to an instance of this structure will be used in the initialization of the LIN Interface. The outline of the structure is defined in chapter 10 Configuration Specification.
type LinTp_ConfigType [SWS_LinIf_00426] 📄 PDF
This is the base type for the configuration of the LIN Transport Protocol A pointer to an instance of this structure will be used in the initialization of the LIN Transport Protocol. The outline of the structure is defined in chapter 10 Configuration Specification
type LinTp_Mode [SWS_LinIf_00629] 📄 PDF
This type denotes which Schedule table can be requested by LIN TP during diagnostic session
The enumeration type LinTp_Mode is defined in the header file LinIf.h and defines which schedule table mode can be requested by the LIN Transport Protocol (LIN TP) during a diagnostic session [SWS_LinIf_00629].
The value range comprises three enumeration literals for controlling the schedule switch on the LIN bus [SWS_LinIf_00629]:
LINTP_APPLICATIVE_SCHEDULE: Selects the application schedule table for regular message traffic [SWS_LinIf_00629].LINTP_DIAG_REQUEST: Selects the master request schedule table for transmitting diagnostic requests [SWS_LinIf_00629].LINTP_DIAG_RESPONSE: Selects the slave response schedule table for receiving diagnostic responses [SWS_LinIf_00629].
Regarding interaction, the type serves to switch between diagnostic transmissions and regular application communication within the LIN interface [SWS_LinIf_00629]. Specific call contexts, reentrancy properties, or error handlings (such as DET or DEM messages) are not specified in the sources for this pure data type; the type is presumably passed as a function parameter in control calls by the LIN Transport Protocol to the LIN interface. Question Q-1bf7553401882471 (open)
This text was created by an AI and is based exclusively on the specifications of AUTOSAR Release R20-11.
Implementer's Guide to follow (complexity I1)
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_LinIf- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_LinIf@rel:R20-11#5f98dc71- Content hash
5f98dc71- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_LINInterface.pdf#nameddest=SWS_LinIf_00198
gemini-3.8-flash-low· 2026-10-13 · German original