SNIP_CLASSIC_LIN_SECTION_8_3_2_6_Lin_GetStatus
Wortlaut
8.3.2.6 Lin_GetStatus
Note: This service is only applicable for LIN master node (available only if the ECU has
any LIN master channel).
[SWS_Lin_00168] Definition of API function Lin_GetStatus ⌈
Service Name
Lin_GetStatus
Syntax
Lin_StatusType Lin_GetStatus (
uint8 Channel,
const uint8** Lin_SduPtr
)
Service ID [hex]
0x08
Sync/Async
Synchronous
Reentrancy
Non Reentrant for the same Channel. Reentrant for different Channel.
Parameters (in)
Channel
LIN channel to be checked
Parameters (inout)
None
Parameters (out)
Lin_SduPtr
Pointer to pointer to a shadow buffer or memory mapped LIN
Hardware receive buffer where the current SDU is stored.
▽
△
Return value
Lin_StatusType
LIN_NOT_OK: Development or production error occurred
LIN_TX_OK: Successful transmission
LIN_TX_BUSY: Ongoing transmission (Header or Response)
LIN_TX_HEADER_ERROR: Erroneous header transmission such
as:
- Mismatch between sent and read back data
- Identifier parity error or Physical bus error
LIN_TX_ERROR: Erroneous response transmission such as:
- Mismatch between sent and read back data
- Physical bus error
LIN_RX_OK: Reception of correct response
LIN_RX_BUSY: Ongoing reception: at least one response byte
has been received, but the checksum byte has not been received
LIN_RX_ERROR: Erroneous response reception such as:
- Framing error
- Overrun error
- Checksum error or Short response
LIN_RX_NO_RESPONSE: No response byte has been received so
far
LIN_OPERATIONAL: Normal operation; the related LIN channel
is woken up from the LIN_CH_SLEEP and no data has been sent.
LIN_CH_SLEEP: Sleep state operation; in this state wake-up
detection from slave nodes is enabled.
Description
Gets the status of the LIN driver.
Only used for LIN master nodes.
Available via
Lin.h
⌋
[SWS_Lin_00091] ⌈The function Lin_GetStatus shall return the current transmission,
reception or operation status of the LIN driver.⌋
[SWS_Lin_00200]
⌈The
return
states
LIN_TX_OK,
LIN_TX_BUSY,
LIN_TX_HEADER_ERROR,
LIN_TX_ERROR,
LIN_RX_OK,
LIN_RX_BUSY,
LIN_RX_ERROR , LIN_RX_NO_RESPONSE and LIN_OPERATIONAL are sub-states of the channel state LIN_CH_OPERATIONAL.⌋
[SWS_Lin_00092]
⌈If
a
SDU
has
been
successfully
received,
the
function
Lin_GetStatus shall store the SDU in a shadow buffer or memory mapped LIN Hardware receive buffer referenced by Lin_SduPtr. The buffer will only be valid and must
be read until the next Lin_SendFrame function call.⌋
[SWS_Lin_00238] ⌈The function Lin_GetStatus shall return LIN_TX_OK, when
• A Master Response Type frame is send and LIN header as well as LIN response
of the frame are transmitted successfully or
• A Slave to Slave Response Type frame is send and the LIN header of the frame
is transmitted successfully.
⌋
[SWS_Lin_00141] ⌈If development error detection for the LIN module is enabled: if
the function Lin_GetStatus is called before the LIN module was initialized, the function
Lin_GetStatus shall raise the development error LIN_E_UNINIT otherwise (if DET is
disabled) return LIN_NOT_OK.⌋
[SWS_Lin_00143] ⌈If development error detection for the LIN module is enabled: if the
channel parameter is invalid or the channel is inactive, the function Lin_GetStatus shall
raise the development error LIN_E_INVALID_CHANNEL otherwise (if DET is disabled)
return LIN_NOT_OK.⌋
[SWS_Lin_00144] ⌈If development error detection for the LIN module is enabled: the
function Lin_GetStatus shall check the parameter Lin_SduPtr for not being a NULL
pointer. If Lin_SduPtr is a NULL pointer, the function Lin_GetStatus shall raise the
development error LIN_E_PARAM_POINTER otherwise (if DET is disabled) return
LIN_NOT_OK.⌋
[SWS_Lin_00289] ⌈The function Lin_GetStatus is only available if the Lin module is
configured as LIN master node on at least one channel. In a pure LIN slave configuration, this function is not available. This depends on the configuration parameters
LinNodeType.⌋
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Cited verbatim in the snippet (deterministic citation).
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_LINDriver.pdf |
|---|---|
| Dokumentseite | Seite 48 |
| Ziel-Modul | lin (classic) |
| Ziel-Anforderung | SWS_Lin_00289 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |