CLASSIC
Modul: canif
Rolle: constitutive
Konfidenz: 95%
SNIP_CLASSIC_CANIF_SECTION_8_3_14_CanIf_SetTrcvMode
Wortlaut
8.3.14 CanIf_SetTrcvMode
[SWS_CANIF_00287] Definition of API function CanIf_SetTrcvMode ⌈
Service Name
CanIf_SetTrcvMode
Syntax
Std_ReturnType CanIf_SetTrcvMode (
uint8 TransceiverId,
CanTrcv_TrcvModeType TransceiverMode
)
Service ID [hex]
0x0d
Sync/Async
Asynchronous
Reentrancy
Non Reentrant
TransceiverId
Abstracted CanIf TransceiverId, which is assigned to a CAN
transceiver, which is requested for mode transition
Parameters (in)
TransceiverMode
Requested mode transition
Parameters (inout)
None
Parameters (out)
None
Return value
Std_ReturnType
E_OK: Transceiver mode request has been accepted.
E_NOT_OK: Transceiver mode request has not been accepted.
Description
This service changes the operation mode of the tansceiver TransceiverId, via calling the
corresponding CAN Transceiver Driver service.
Available via
CanIf.h
⌋
Note: For more details, please refer to the [2, Specification of CAN Transceiver Driver].
[SWS_CANIF_00358] ⌈The function CanIf_SetTrcvMode() shall call the function
CanTrcv_SetOpMode(Transceiver, OpMode) on the corresponding requested
CAN Transceiver Driver module.⌋
Note: The parameters of the service CanTrcv_SetOpMode() are of type:
• OpMode: CanTrcv_TrcvModeType(desired operation mode)
• Transceiver: uint8 (Transceiver to which function call has to be applied)
(see [2, Specification of CAN Transceiver Driver])
[SWS_CANIF_00538]
Upstream requirements: SRS_BSW_00323
⌈If parameter TransceiverId of CanIf_SetTrcvMode() has an invalid value, the
CanIf shall report development error code CANIF_E_PARAM_TRCV to the Det_ReportError service of the DET, when CanIf_SetTrcvMode() is called.⌋
Note: The mode of a transceiver can only be changed to CANTRCV_TRCVMODE_STANDBY, when the former mode of the transceiver has been CANTRCV_TRCVMODE_
NORMAL (see [2]). But this is not checked by the CanIf.
Note: The mode of a transceiver can only be changed to CANTRCV_TRCVMODE_SLEEP, when the former mode of the transceiver has been CANTRCV_TRCVMODE_
STANDBY (see [2]). But this is not checked by the CanIf.
[SWS_CANIF_00648]
Upstream requirements: SRS_BSW_00323
⌈If parameter TransceiverMode of CanIf_SetTrcvMode() has an invalid value
(not CANTRCV_TRCVMODE_STANDBY, CANTRCV_TRCVMODE_SLEEP or CANTRCV_TRCVMODE_NORMAL), the CanIf shall report development error code CANIF_E_PARAM_TRCVMODE to the Det_ReportError service of the DET module, when
CanIf_SetTrcvMode() is called.⌋
Note:
The function CanIf_SetTrcvMode() should be applicable to all CAN
transceivers with all values of TransceiverMode independent, if the transceiver hardware supports these modes or not. This is to ease up the view of the CanIf to the
assigned physical CAN channel.
[SWS_CANIF_00362] ⌈Configuration of CanIf_SetTrcvMode(): The number of
supported transceiver types for each network is set up in the configuration phase (see
CanIfTrcvCfg and CanIfTrcvDrvCfg). If no transceiver is used, this function may
be omitted. Therefore, if no transceiver is configured in LT or PB class the API shall
return with E_NOT_OK.⌋
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_CANInterface.pdf |
|---|---|
| Dokumentseite | Seite 95 |
| Ziel-Modul | canif (classic) |
| Ziel-Anforderung | SWS_Std_00005 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |