CLASSIC
Modul: cantrcv
Rolle: constitutive
Konfidenz: 95%
SNIP_CLASSIC_CANTRCV_SECTION_8_3_2_CanTrcv_SetOpMode
Wortlaut
8.3.2 CanTrcv_SetOpMode
[SWS_CanTrcv_00002] Definition of API function CanTrcv_SetOpMode
Upstream requirements: SRS_BSW_00310, SRS_BSW_00357, SRS_BSW_00369, SRS_BSW_
00406, SRS_Can_01091, SRS_Can_01097, SRS_Can_01098, SRS_Can_01099,
SRS_Can_01100,
SRS_Can_01109,
SRS_Can_01110,
SRS_Can_01108
⌈
Service Name
CanTrcv_SetOpMode
Syntax
Std_ReturnType CanTrcv_SetOpMode (
uint8 Transceiver,
CanTrcv_TrcvModeType OpMode
)
Service ID [hex]
0x01
Sync/Async
Asynchronous
Reentrancy
Reentrant for different transceivers
Transceiver
CAN transceiver to which API call has to be applied.
Parameters (in)
OpMode
This parameter contains the desired operating mode
Parameters (inout)
None
Parameters (out)
None
Return value
Std_ReturnType
E_OK: will be returned if the request for transceiver mode change
has been accepted.
E_NOT_OK: will be returned if the request for transceiver mode
change has not been accepted or any parameter is out of the
allowed range.
Description
Sets the mode of the Transceiver to the value OpMode.
Available via
CanTrcv.h
⌋
[SWS_CanTrcv_00102] ⌈The function CanTrcv_SetOpMode shall switch the internal state of Transceiver to the value of the parameter OpMode,
which
can be CANTRCV_TRCVMODE_NORMAL, CANTRCV_TRCVMODE_STANDBY or
CANTRCV_TRCVMODE_SLEEP.⌋
Note:
The
user
of
the
CanTrcv
module
may
call
the
function
CanTrcv_SetOpMode
with
OpMode
=
CANTRCV_TRCVMODE_STANDBY
or
CANTRCV_TRCVMODE_NORMAL,
if
the
Transceiver
is
in
mode
CANTRCV_TRCVMODE_NORMAL.
Note:
The
user
of
the
CanTrcv
module
may
call
the
function
CanTrcv_SetOpMode
with
OpMode
=
CANTRCV_TRCVMODE_SLEEP,
CANTRCV_TRCVMODE_STANDBY
or
CANTRCV_TRCVMODE_NORMAL,
if
the Transceiver is in mode CANTRCV_TRCVMODE_STANDBY.
This API is applicable to each transceiver with each value for parameter CanTrcv_
SetOpMode, regardless of whether the transceiver hardware supports these modes or
not. This is to simplify the view of the CanIf to the assigned bus.
[SWS_CanTrcv_00105] ⌈If the requested mode is not supported by the underlying
transceiver hardware, the function CanTrcv_SetOpMode shall return E_NOT_OK.⌋
The number of supported busses is set up in the configuration phase.
[SWS_CanTrcv_00186] ⌈If selective wakeup is supported by hardware: the flags POR
and SYSERR of the transceiver status shall be checked by CanTrcv_SetOpMode
API.⌋
[SWS_CanTrcv_00187] ⌈If the POR flag is set, transceiver shall be re-initialized to run
the transceiver’s configuration sequence.⌋
[SWS_CanTrcv_00188] ⌈If the SYSERR flag is NOT set and the requested mode is
CANTRCV_NORMAL, transceiver shall call the API CanIf_ConfirmPnAvailability for the corresponding abstract CanIf TransceiverId. CanIf_ConfirmPnAvailability informs CanNm (through CanIf and CanSm) that selective wakeup is enabled.⌋
[SWS_CanTrcv_00114] ⌈If there is no/incorrect communication to the Transceiver,
the function CanTrcv_SetOpMode shall report runtime error code CANTRCV_E_NO_
TRCV_CONTROL to the Default Error Tracer and return E_NOT_OK.⌋
[SWS_CanTrcv_00120] ⌈If development error detection for the module CanTrcv is enabled:
If
the
function
CanTrcv_SetOpMode
is
called
with
OpMode
=
CANTRCV_TRCVMODE_STANDBY,
and
the
Transceiver
is
not
in
mode
CANTRCV_TRCVMODE_NORMAL
or
CANTRCV_TRCVMODE_STANDBY,
the
function CanTrcv_SetOpMode shall raise the development error CANTRCV_E_
TRCV_NOT_NORMAL otherwise (if DET is disabled) return E_NOT_OK.⌋
[SWS_CanTrcv_00121] ⌈If development error detection for the module CanTrcv is enabled:
If
the
function
CanTrcv_SetOpMode
is
called
with
OpMode
=
CANTRCV_TRCVMODE_SLEEP,
and
the
Transceiver
is
not
in
mode
CANTRCV_TRCVMODE_STANDBY or CANTRCV_TRCVMODE_SLEEP, the function CanTrcv_SetOpMode shall raise the development error CANTRCV_E_TRCV_
NOT_STANDBY otherwise (if DET is disabled) return E_NOT_OK.⌋
[SWS_CanTrcv_00122] ⌈If development error detection for the module CanTrcv is enabled:
If called before the CanTrcv module has been initialized, the function CanTrcv_SetOpMode shall raise the development error CANTRCV_E_UNINIT otherwise (if DET is
disabled) return E_NOT_OK.⌋
[SWS_CanTrcv_00123] ⌈If development error detection for the module CanTrcv is enabled: If called with an invalid Transceiver number, the function CanTrcv_SetOpMode shall raise the development error CANTRCV_E_INVALID_TRANSCEIVER otherwise (if DET is disabled) return E_NOT_OK.⌋
[SWS_CanTrcv_00087] ⌈If development error detection for the module CanTrcv is enabled: If called with an invalid OpMode, the function CanTrcv_SetOpMode shall raise
the development error CANTRCV_E_PARAM_TRCV_OPMODE otherwise (if DET is disabled) return 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_CANTransceiverDriver.pdf |
|---|---|
| Dokumentseite | Seite 33 |
| Ziel-Modul | cantrcv (classic) |
| Ziel-Anforderung | SWS_Std_00005 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |