Autosar Sws Commanager
Autosar Sws Commanager
Autosar Sws Commanager
Disclaimer
This specification and the material contained in it, as released by AUTOSAR, is for
the purpose of information only. AUTOSAR and the companies that have contributed
to it shall not be liable for any use of the specification.
The material contained in this specification is protected by copyright and other types
of Intellectual Property Rights. The commercial exploitation of the material contained
in this specification requires a license to such Intellectual Property Rights.
This specification may be utilized or reproduced without any modification, in any form
or by any means, for informational purposes only. For any other purpose, no part of
the specification may be utilized or reproduced, in any form or by any means, without
permission in writing from the publisher.
The AUTOSAR specifications have been developed for automotive applications only.
They have neither been developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Any such exemplary items are contained in the specifications for illustration purposes
only, and they themselves are not part of the AUTOSAR Standard. Neither their
presence in such specifications, nor any later documentation of AUTOSAR
conformance of products actually implementing such exemplary items, imply that
intellectual property rights covering such exemplary items are licensed under the
same rules as applicable to the AUTOSAR Standard.
Table of Contents
List of Figures
Figure 1: Communication Manager Module context view ......................................... 17
Figure 2: PNC State Machine ................................................................................... 32
Figure 3: User to Partial network and channel Mapping Use Cases......................... 38
Figure 4: ComM channel state machine ................................................................... 41
Figure 5: ARPackage of the Communication Manager Module ................................ 59
Figure 6: SW-C requests state changes to the Communication Manager Module ... 60
Figure 7: SW-C requires state changes within the Communication Manager Module
and reads out current communication state ....................................................... 61
Figure 8: Interaction between BswM and the ComM module ................................... 63
Figure 9: Starting transmission and reception on CAN ........................................... 101
Figure 10: Reaction on a wake-up indicated by the ECU State Manager module .. 102
Figure 11: Network shutdown (CAN) ...................................................................... 104
Figure 12: Request Communication ....................................................................... 105
Figure 13: Configuration ComM.............................................................................. 108
Figure 14: Configuration ComMGeneral ................................................................. 114
Figure 15: Configuration ComMUser ...................................................................... 116
Figure 16: Configuration ComMChannel ................................................................ 121
Figure 17: Configuration ComMNetworkManagement ............................................ 123
1. Simplifying the usage of the bus communication stack for the user. This
includes a simplified network management handling.
Comment: A user should not have any knowledge about the hardware (e.g. on which
channel to communicate). A user simply requests a "Communication Mode"
and ComM module switches the communication capability of the
corresponding channel on/off.
3. Offer an API to disable sending of signals to prevent the ECU from (actively)
waking up the communication bus.
Comment: On CAN every message wakes up the bus, on FlexRay it is only possible
to wake up the bus with a so called wake-up pattern.
5. Offering the possibility to force an ECU that keeps the bus awake to the No
Communication mode (see Section 7.3.1.2 for details).
Term: Description:
DCM_ActiveDiagnostic The DCM module indicates an active diagnostic session. DCM need
indication full communication = COMM_FULL_COMMUNICATION for diagnostic
purpose
Active wake-up Wake-up caused by the hosting ECU e.g. by a sensor.
Application signal scheduling Sending of application signals according to the VMM. Scheduling of
CAN application signals is performed by the Communication Module,
scheduling of LIN application I-PDUs (a PDU containing signals) is
performed by the LIN interface and scheduling of FlexRay application
PDUs is performed by the FlexRay Interface module.
Bus sleep No activity required on the communication bus (e.g. CAN bus sleep).
Bus communication Bus communication messages are all messages that are sent on the
messages communication bus. This can be either a diagnostic message or an
application message.
COM Inhibition status Defines whether full communication, silent communication or wake-
up is allowed or not.
Communication Channel The medium used to convey information from a sender (or
transmitter) to a receiver.
Communication Mode Mode determining which kind of communication are allowed:
full communication = COMM_FULL_COMMUNICATION
no communication = COMM_NO_COMMUNICATION
silent communication = COMM_SILENT_COMMUNICATION
Note: COMM_SILENT_COMMUNICATION can not be requested by a
user. Internal mode for synchronizing network at shutdown
Diagnostic PDU scheduling Sending of diagnostic PDUs. Scheduling of CAN diagnostic PDUs is
performed by the diagnostic module, scheduling of LIN diagnostic
PDUs is performed by the diagnostic module and the LIN interface
and scheduling of FlexRay diagnostic PDUs is performed by the
diagnostic module and the FlexRay Interface module.
ECU shut down See ECU State Manager specification [6].
Fan-out Same message/indication are sent to multiple destinations/receivers
Independent software A separately developed software component performing a coherent
component set of functions with a minimum amount of interfaces to other
software applications on an ECU. This can be e.g. a basic software
component or an application software component.
Passive wake-up Wake-up by another ECU and propagated (e.g. by bus or wake-up-
line) to the ECU currently in focus.
System User An administration functionality (a specific "user", which is generated
within the internal context of the ComM) for making a default request
and for overriding the user requests.
User Concept for requestors of the ECU State Manager module and of the
11 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
3 Related documentation
[27] Glossary,
AUTOSAR_TR_Glossary.pdf
Thus, the specification SWS BSW General shall be considered as additional and
required specification for COM Manager.
4.1 Limitations
No limitations.
ComM
use use ComM_Dcmmandatory mandatory mandatory
realize
realize
module module
realize mandatory
ComM::ComM EcuM::EcuM
ComM_EcuM
use
use
module
realize
BswM_RequestMode BswM::BswM
realize
ComM_Nm
ComM_BusSM
Nm ComM_COMCbk_<sn>
mandatory
EthSM_RequestComMode FrSm CanSM_ComM use
LinSm
mandatory realize
mandatory mandatory
realize mandatory realize realize realize
Comment: The NVRAM Manager must be initialized after a power up or reset of the
ECU. It must be initialized before ComM, as when ComM is initialized, ComM
assumes that NVRAM is ready to be used, and that it can read back non-volatile
configuration data. When ComM is de-initialized, it writes non-volatile data to
NVRAM.
6 Requirements traceability
7 Functional specification
Comment: The ComM module allows querying the Communication Mode requested
by a particular user (see ComM_GetRequestedComMode(),
SWS_ComM_00079).
Comment: The ComM module allows querying the actual Communication Mode of a
channel (see ComM_GetCurrentComMode(), SWS_ComM_00083)
[SWS_ComM_00500] The ComM module shall not queue user requests. The
latest user request of the same user shall overwrite an old user request
even if the request is not finished. ()
Comment: Mode switching by the corresponding Bus State Manager module takes
time and a mode inhibition can be active.
Comment: This feature is not used by a "normal SW-C" because they don't have
knowledge about channels. This feature is necessary for privileged SW-Cs,
which (have to) know about the system topology, e.g. system diagnostic
functions.
ComM_CommunicationAllowed(<channel>,
TRUE|FALSE)(SWS_ComM_00871) indications. ()
7.1.1 Overview
ComM implements a state machine for each partial network cluster (PNC) to
represent the communication mode of a PNC.
Each PNC has its own state. The state definitions are related to the states of ComM
for a simple mapping.
ComM users are used to request and release the PNCs.
The status of all PNCs on the nodes of a system channel is exchanged via network
management user data.
Each PNC uses a dedicated bit position within a bit vector in the NM user data on
CAN and FlexRay. If a PNC is requested by a local ComM user on the node, the
node sets the corresponding bit in the NM user data to 1. If the PNC is not requested
anymore; the node sets the corresponding bit in the NM user data to 0. The BusNms
collect and aggregate the NM user data for the PNCs and provide the status via a
COM bit vector by means of a COM signal to ComM.
Each PNC uses the same bit position in the NM user data on every system channel
with NM. ComM uses two types of bit vector named EIRA and ERA to exchange
PNC status information. The definition of EIRA and ERA are located in the
AUTOSAR SWS CAN NM and AUTOSAR SWS FlexRay NM.
ComM requests and releases the system communication bus channels needed for a
PNC on a node.
Enabling or disabling the partial network cluster management in the node shall be
post-build configurable.
Partial networking shall be supported on the bus types CAN, FlexRay. Activation and
deactivation of the I-PDU groups of the PNCs on a FlexRay node is required to avoid
false timeouts. Starting and Stopping of I-PDU groups in COM are handled in BSWM.
Deactivation of single FlexRay ECU is not possible.
Comment: The ComM module notifies the BswM about every state change of the
PNC state machine by calling BswM_ComM_CurrentPncMode(). (refer to
SWS_ComM_00908)
Comment: ComM expects that the PNC bit vector is configured as an array of type
uint8_n, see config parameter ComMPncComSignalRef.
Comment: ComM825 defines only the calculation of the byteIndex and bitIndex, not
how it shall be implemented.
[SWS_ComM_00909] For every Partial Network, only one PNC state machine
shall be implemented (i.e. One PNC state machine per PNC, independent of the
amount of ComMChannels). ()
[SWS_ComM_00924] The PNC state machine shall consist of the two main states
COMM_PNC_FULL_COMMUNICATION and
COMM_PNC_NO_COMMUNICATION. ()
1. ComM user requests of ComM users mapped to one or more PNCs of that
channel
2. ComM user requests of ComM users mapped to that channel
3. ERA (if the configuration switch ComMPncGatewayEnabled is set to
TRUE)
4. EIRA ()
Comment: Requests are handled in main functions of those channels they affect.
Rational: This allows the configurator to assign e.g. one EIRA and n ERAs to one
PNC.
Comment: The different IDs of EIRA can be configured to the physical supported
channels FlexRay, Can1, Can2
COMM_PNC_FULL_COMMUNICATION
ComM_RequestComMode() OR ComM_COMCbk()
COMM_PNC_REQUESTED [ComMUser = FullCom OR (PNC bit within ERAn = 1
AND ComMPncGatewayEnabled = TRUE) ]
/BswM_ComM_CurrentPncMode()
Com_SendSignal()
Channel Full Communication Request()
Stop ComMPncPrepareSleepTimer
ComM_RequestComMode() OR ComM_COMCbk()
ComM_RequestComMode() OR ComM_COMCbk() [ComMUser = NoCom AND (NOT (PNC bit within ERAn = 1
[ComMUser = FullCom OR (PNC bit within ERAn = 1 AND ComMPncGatewayEnabled = TRUE))]
AND ComMPncGatewayEnabled = TRUE) ] /BswM_ComM_CurrentPncMode()
/BswM_ComM_CurrentPncMode() Com_SendSignal()
Com_SendSignal() Release Channel Full Communication Request
Channel Full Communication Request()
ComM_COMCbk() [PNC bit within EIRA = 0]
COMM_PNC_READY_SLEEP /BswM_ComM_CurrentPncMode() COMM_PNC_PREPARE_SLEEP
Start ComMPncPrepareSleepTimer
COMM_PNC_NO_COMMUNICATION
PowerOff
Comment: In case of asynchronous wake up, the PNC state shall stay in
COMM_PNC_NO_COMMUNICATION until the PNC request is received
(PNC bit in EIRA is set to 1).
As long as a PNC is requested remotely (i.e. at least one bit within the ERA signal
assigned to this PNC equals 1) and the configuration switch
ComMPncGatewayEnabled is set to TRUE (see SWS_ComM_00840_Conf),
COMM_PNC_REQUESTED will be the current PNC state.
[SWS_ComM_00940] If the PNC is released (i.e. all PNC bits within EIRA equals
0), the sub state COMM_PNC_READY_SLEEP shall be left and the sub state
COMM_PNC_PREPARE_SLEEP shall be entered. ()
[SWS_ComM_00165] In PNC sub state COMM_PNC_READY_SLEEP when at
least one ComMUser assigned to this PNC requests Full Communication or
ComMPncGatewayEnabled (ECUC_ComM_00887) equals TRUE and one bit
35 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
representing this PNC in an ERAn changes to 1, this state shall be left and the sub
state COMM_PNC_REQUESTED shall be entered. ( SRS_ModeMgm_09246
,SRS_ModeMgm_09247, SRS_ModeMgm_09248)
Comment to SWS_ComM_00981:
It can be assumed that both signal types (i.e. ComMPncComSignalKind = EIRA
and ComMPncComSignalKind = ERA) are configured.
Comment: An active PNC gateway on a system channel shall be the last node on a
system channel that releases a PNC.
Comment: If the bit for a PNC is equal to zero in all ERAn, no other node than the
PNC gateway is requesting the PNC.
7.1.4.2 Passive PNC Gateway
Comment: The passively coordinated channels exist only if they are connected to
more than one PNC gateway. If the PNC gateway functionality of ComM
is enabled (ComMPncGatewayEnabled = true) ComM channels mapped
to this gateway can be set to type active or passive
(COMM_GATEWAY_TYPE_ACTIVE or
COMM_GATEWAY_TYPE_PASSIVE). If a ComM channel is mapped to
two different PNC gateways, only one gateway coordinates this channel
actively, while the other passively. That means, a PNC gateway is always
mapped to at least one ComM channel type active and may be mapped
to one or some ComM channels type passive.
Comment: A PNC gateway requests the PNC if a local ComM user requests the PNC
or at least one PNC bit within ERA originate from the actively coordinated system
channels of a passive PNC gateway is not equal to 0.
PN PN PN 1 PN 2 PN
PN
Channel Channel
Link-Information Control
EthIfSwitch- EthIfSwitch-
Portgroup Portgroup
6: Configuration 7: Configuration
with Partial Network and without Partial Network
EthIfSwitch - Portgroup and EthIfSwitch - Portgroup
control via BswM control via Channel request
Comment: The BusNM Filter configuration shall be independant from the ComM PNC
configuration.
Rational: This enables waking up a PNC without being a member of the PNC, e.g. if
a node just triggers a wake up of a PNC but the node is not kept awake by the PNC
and other nodes keep the PNC awake
Comment: The existing mapping of ComM users to system channels shall still be
possible for backward compatibility. (i.e. the configuration containers will stay
untouched)
Use Case for SWS_ComM_00051: On an ECU with CAN and LIN channel, only the
LIN requires full communication to request e.g. sensor values while the
CAN remains inactive.
COMM_FULL_COMMUNICATION
ComM_RequestComMode(<user>,
ComM_RequestComMode(<user>, ComM_RequestComMode(<user>, COMM_FULL_COMMUNICATION)
COMM_FULL_COMMUNICATION) COMM_NO_COMMUNICATION) [Communication limitation enabled]
ComM_RequestComMode(<user>,
COMM_FULL_COMMUNICATION)
COMM_FULL_COM_NETWORK_REQUESTED [Communication limitation disabled] COMM_FULL_COM_READY_SLEEP
ComM_DCM_ActiveDiagnostic(ChX)
[ComMNmVariant = PASSIVE]
Timer ComMLightTimeout
ComM_RequestComMode(<user>, has expired
COMM_FULL_COMMUNICATION) [ComMNmVariant = LIGHT]
[Communication limitation
disabled] ComM_Nm_PrepareBusSleepMode(ChX) ComM_Nm_NetworkMode(ChX)
ComM_DCM_ActiveDiagnostic(ChX)
[ComMBusType =
[EcuM entered RUN for the channel] COMM_BUS_TYPE_INTERNAL]
[CommunicationAllowed=TRUE]
COMM_SILENT_COMMUNICATION
ComM_Nm_BusSleepMode(ChX)
ComM_RequestComMode(<user>, ComM_Nm_BusSleepMode(ChX)
COMM_NO_COMMUNICATION)
COMM_NO_COMMUNICATION
ComM_RequestComMode(<user>,
COMM_NO_COM_REQUEST_PENDING COMM_FULL_COMMUNICATION) COMM_NO_COM_NO_PENDING_REQUEST
[Communication limitation
disabled]
ComM_DCM_ActiveDiagnostic(ChX)
ComM_EcuM_WakeUpIndication(ChX) or
ComM_Nm_RestartIndication(ChX) or
ComM_Nm_NetworkStartIndication(ChX)
ComM_RequestComMode(<user>, ComM_RequestComMode(<user>,
COMM_FULL_COMMUNICATION) COMM_NO_COMMUNICATION)
ChX - Channel ID
<user> - A user configured to ChX
SWS_ComM_00878 SWS_ComM_00295,
SWS_ComM_00296
COMM_FULL_COMMUNICATION 7.2.3
Entering state: SWS_ComM_00069
In state: SWS_ComM_00637,
[SWS_ComM_00826]
7.1.3.1
sub-state
COMM_FULL_COM_NETWORK_REQUESTED:
In sub-state: SWS_ComM_00869,
SWS_ComM_00870, SWS_ComM_00665,
SWS_ComM_00888, SWS_ComM_00889,
SWS_ComM_00890
7.1.3.2
sub-state
COMM_FULL_COM_READY_SLEEP
Entering sub-state: SWS_ComM_00133
In sub-state: SWS_ComM_00610,
SWS_ComM_00671, SWS_ComM_00882,
SWS_ComM_00883
Transition Requirement
COMM_NO_COMMUNICATION SWS_ComM_00893, SWS_ComM_00894,
COMM_FULL_COMMUNICATION
SWS_ComM_00694, SWS_ComM_00875
SWS_ComM_00876,
COMM_FULL_COM_NETWORK_REQUESTED SWS_ComM_00665
COMM_FULL_COM_READY_SLEEP
COMM_FULL_COM_READY_SLEEP SWS_ComM_00882, SWS_ComM_00883
COMM_FULL_COM_NETWORK_REQUESTED
COMM_FULL_ COMMUNICATION SWS_ComM_00826
COMM_SILENT_COMMUNICATION
COMM_FULL_COM_READY_SLEEP SWS_ComM_00610, SWS_ComM_00671
COMM_NO_COMMUNICATION
COMM_FULL_COMMUNICATION SWS_ComM_00637
COMM_NO_COMMUNICATION
COMM_SILENT_COMMUNICATION SWS_ComM_00877, SWS_ComM_00878
COMM_FULL_COMMUNICATION
COMM_SILENT_COMMUNICATION SWS_ComM_00296
COMM_FULL_COM_READY_SLEEP
COMM_SILENT_COMMUNICATION SWS_ComM_00295
COMM_NO_COMMUNICATION
Table 1: Link to detailed explanation of the channel state machine resp. transition
[SWS_ComM_00879] The ComM channel state machine shall consist of the three
main states corresponding to the Communication Modes:
COMM_NO_COMMUNICATION, COMM_SILENT_COMMUNICATION and
COMM_FULL_COMMUNICATION. ()
[SWS_ComM_00485] The default state for each ComM channel state machine
shall be COMM_NO_COMMUNICATION. ()
[SWS_ComM_00896] Each ComM channel state machine shall only evaluate its
corresponding communication status flag CommunicationAllowed
according to SWS_ComM_00884 in sub-state
COMM_NO_COM_REQUEST_PENDING. ()
Comment: If more than one user is related to the corresponding channel state
machine, the ComM module has to perform a Fan-out to all users.
Note for section 7.1.1 - 7.1.3: Each ComM channel state machine is responsible to
handle one channel/network with a connected Bus State Manager (corresponding =
the channel/network the ComM channel state machine is responsible for).
Note for section 7.1.1 - 7.1.3: The ComM module contains one or several ComM
channel state machine(s). ComM channel state machine communicates directly with
its connected Bus State Manager, other interfaces are handled by the ComM
module.
Rationale for SWS_ComM_00313: The RTE is not yet initialized at this point in time.
Use Case for above Comment: The ECU is performing control functions locally
without participation in bus communication.
Comment: The communication mode is local for one channel, thus the ECU may still
communicate via other channels.
canceled with
ComM_RequestComMode(<user>,COMM_NO_COMMUNICATION)(SWS_ComM_008
71) or DCM
ComM_DCM_InactiveDiagnostic(<channel>)(SWS_ComM_00874).
Comment: EcuM Fixed shall read and evaluate ComM channel state machine sub-
states, with ComM_GetState() (SWS_ComM_00872) before a sleep/shutdown.
Comment: It may happen that nothing is received (e.g. during bus off) despite
receiving capability is switched on.
Use Case: Shut down coordination with means of the NM module (prepare bus sleep
state).
Rationale for SWS_ComM_00637: A user may request to keep the bus awake "too
late" (NM is not able to send a vote to keep the bus awake because the
cluster already agreed to shutdown).
[SWS_ComM_00915] In sub-state
COMM_FULL_COM_NETWORK_REQUESTED and configuration
parameter ComMNmVariant=PASSIVE (ECUC_ComM_00568), the ComM
channel state machine shall switch to sub-state
COMM_FULL_COM_READY_SLEEP. ()
Note: The purpose of mode inhibition is to limit the communication capabilities. For
details see Section 7.3.1.1 and Section 7.3.1.2.
Comment: The ComM module doesn't care about who requests the mode inhibition
but it is not a "normal" SW-C. It is a privileged SW-C or an OEM specific
BSW.
[SWS_ComM_00839] The ComM module shall store the status of the user
requests. ()
Comment: SWS_ComM_00839 describes the desired behaviour during an active
mode limitation.
[SWS_ComM_00840] The ComM module shall store the updated status of the
user requests if a user releases a request during an active mode
inhibition. ()
Rationale for SWS_ComM_00182: ECUs must not fall asleep during an active
diagnostic session.
Comment: The DCM indicates the start of an active diagnostic session with
ComM_DCM_ActiveDiagnostic(<channel>)(SWS_ComM_00873) and
the end of a diagnostic session with
ComM_DCM_InactiveDiagnostic(<channel>)(SWS_ComM_00874).
Use Case: An error was detected on signal path of an active wake up line and this
non reliable wake-up-source should not be able to awake the whole system anymore.
An SW-C that controls error-reactions could set the wake up inhibition-status of
related communication channels that usually get communication-requests from SW-
Cs as the consequence of this event. This corrupts the forwarding of communication
system-wide, based on unreliable wake up events. Or in case of application-specific
system control, there is an SW-C that should switch off forwarding system wide
wakeup's by communication under conditions like e.g. transport mode.
Comment: Ignoring user requests means accepting the requests but not executing
them due to mode inhibition. The highest win strategy would apply
immediately as soon as mode inhibition is switched off (see
SWS_ComM_00839 and SWS_ComM_00840).
Rationale for SWS_ComM_00218: The inhibition should not get active, if the
inhibition-status is set but the communication channel is already active.
[SWS_ComM_00066] The ComM module shall never inhibit the passive wake-up
capability. ()
Rationale: It is assumed that a faulty user will not release his "Full Communication"
request without a re-initialization. Keeping the "Full Communication"
request active leads to a toggling between network shutdown and network
startup.
Use Case: It is assumed that a faulty ECU keeps the bus awake. As a
consequence a "network master" decides to force all ECUs to go to sleep.
[SWS_ComM_00582] The ComM module shall clear the user requests after all the
channels that belong to the corresponding user enter
COMM_NO_COMMUNICATION mode. ()
Rationale for SWS_ComM_00582: Stored (faulty) user requests, which are assumed
to keep the bus awake, must be cleared.
Description: The ComM module shall reload the default value of the ComM inhibition
status from ComMNoCom (see ECUC_ComM_00571) during initialization.
Comment: The current ComMNoCom status for each channel shall not be stored
persistently. SWS_ComM_00582 describes the desired behaviour after an executed
mode limitation.
Comment: A synchronized shutdown is not possible with the LIGHT variant thus the
ECU may continuously restart ("toggle") because of a message from a
node shutting down later.
[SWS_ComM_00138] The ComM module shall provide one Inhibit counter for all
rejected COMM_FULL_COMMUNICATION mode requests. It shall count user
requests, which cannot be fulfilled because the system has inhibited
communication modes. (SRS_ModeMgm_09155)
Rationale for SWS_ComM_00138: The counter is used for detecting latent software
problems related to unmotivated communication bus wake ups.
[SWS_ComM_00143] It shall be possible to read out and reset the Inhibit counter
(SWS_ComM_00138) for all rejected COMM_FULL_COMMUNICATION mode
requests value by a ComM module API call. ()
Use Case for SWS_ComM_00143: It shall be possible to read out and reset the
current status of the counter by a diagnostic service.
[SWS_ComM_00234] The ComM module shall use the error codes of table 4 to
report errors.
Type or error Relevance Related error code Value
[hex]
API service used without Development COMM_E_NOT_INITED 0x1
module initialization
API service used with Development COMM_E_WRONG_PARAMETERS 0x2
57 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
wrong
parameters
API Service used with a Development COMM_E_PARAM_POINTER 0x3
null pointer
Initialization failed Development COMM_E_INIT_FAILED 0x4
Table 4: Error classification (SRS_BSW_00323, SRS_BSW_00327,
SRS_BSW_00337, SRS_BSW_00385, SRS_BSW_00386)
[SWS_ComM_00612] If ComM is not initialized, all ComM module all API service
other than ComM_Init() (see SWS_ComM_00146), ComM_GetVersionInfo()
(see SWS_COMM_00370) and ComM_GetStatus() (see SWS_COMM_00242); shall:
- not execute their normal operation,
- and return E_NOT_OK, if it has a standard return type. (SRS_BSW_00406)
7.10.1 Architecture
require provide
ComM_RequestMode ComM_RequestMode
UR000
SW-C
UM000
. require provide
ComM_CurrentMode ComM_CurrentMode .
. .
. .
URnnn
SW-C
... ...
UMnnn
require provide
ComM_ChannelWakeup ComM_ChannelWakeup Com
Manager
CW000
Vehicle
Mode ... ... CL000
Manager
require provide
ComM_ChannelLimitation ComM_ChannelLimitation
provide
require ComM_ECUModeLimitation
ComM_ECUModeLimitation
modeLimitation
7.10.2.1 SW-Cs does not care about the ComM module at all
A SW-C that does not care about the Communication Manager Module will not
require any of the interfaces defined in the ARPackage of the Communication
Manager Module.
7.10.2.2 SW-Cs only cares about the state of its communication system
In this use case, a SW-C wants to know what communication capabilities it has
(expressed by a communication mode none, silent or full - see
ComM_ModeType). The SW-C finds out about that by defining a port requiring the
Interface ComM_GetCurrentComMode. Depending on the available communication
capabilities, the SW-C can specify that certain runnables of the SW-C should be
executed or not. The Communication Manager Module must be configured correctly
(with e.g. the physical channels that this SW-C uses for its logical communication)
such that it has a port that provides this information about the current communication
mode to the SW-C.
SW-C
UM000
require provide
ComM_CurrentMode ComM_CurrentMode .
.
.
Com.
Manager
...
...
require provide
ComM_RequestMode ComM_RequestMode
UR000
SW-C
UM000
require provide
ComM_CurrentMode ComM_CurrentMode .
.
.
Com.
Manager
...
...
Figure 7: SW-C requires state changes within the Communication Manager Module and reads
out current communication state
In this use case, the SW-C wants to explicitly take influence on the communication-
state of the physical channels it needs. The SW-C indicates this by a specific port.
Through this port, the SW-C can then request the Communication Manager Module
mode No Communication or Full Communication. The Communication Manager
Module will use these calls to request the corresponding communication mode from
the corresponding Bus State Manager module.
[SWS_ComM_00848] The Communication Manager Module shall provide an
AUTOSAR port to allow the request of an communication mode by calling
ComM_RequestComMode (see SWS_ComM_00110). ()
For a SW-C using the direct API of the RTE, the SW-C could for example do the
following:
MySW-C_Runnable_Init(self)
{
// SW-C wants to send and receive data
e = Rte_Call_comRequest_RequestComMode(COMM_FULL_COMMUNICATION);
if (e == RTE_E_OK)
{
// successfully requested the Com Manager Module to move to
61 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
MySW-C_Runnable_Loop(self)
{
if (status == ready_to_sleep)
{
//no need to send; ready for shutdown communication
Rte_Call_comRequest_RequestComMode(COMM_NO_COMMUNICATION);
};
};
Comment: Note that these APIs do not require that the SW-C has knowledge of the
channels that it needs.
7.10.2.4 SW-C wants to interact directly with physical channels activate
ECU Mode Limitation
The SW-C shall request mode from BswM. BswM will handle the direct
communication with ComM.
require provide
ComM_ChannelWakeup ComM_ChannelWakeup
CW000
CW001
CL001
provide
require ComM_ECUModeLimitation
ComM_ECUModeLimitation
modeLimitation
This section specifies the Port Interfaces that are needed to operate the
Communication Manager Module functionality over the RTE.
7.10.3.1 Types used by the interfaces
See 8.7.4 Implementation Data Types.
7.10.3.2 Ports and Port Interface for User Requests
7.10.3.2.1 General Approach
A SW-C that wants to explicitly direct the local Communication Manager Module of
the ECU towards a certain state requires the client-server interface
ComM_UserRequest. Through this interface the SW-C can set the desired state of
all communication channels that are relevant for that component, to No
Communication or Full Communication. In order to keep the SW-Cs code
independent from the values of the handles that are used to identify the user towards
the Communication Manager Module, these handles are not passed from the SW-C
to the Communication Manager Module. Rather they are modeled as port defined
argument values of the Provide Ports on the Communication Manager Modules
side. As a consequence, these handles do not show up as arguments in the
operations of the client-server interface ComM_UserRequest. As a further
consequence of this approach, the Communication Manager Module has a separate
port for each user.
7.10.3.2.2 Data Types
No data types are needed for this interface.
A SW-C that wants to get informed about its current Communication Manager
Module Mode requires the ModeSwitchInterface interface ComM_CurrentMode.
7.10.3.3.2 Port interface ComM_CurrentMode
See 8.7.3.1 ComM_CurrentMode.
7.10.3.4 Ports and Port Interfaces for the ComM users currently requesting
FULL_COMM
7.10.3.4.1 General approach
[SWS_ComM_00734] The Communication Manager Module shall have an
optional (see ECUC_ComM_00787) separate port providing the sender-receiver
interface ComM_CurrentChannelRequest for each configured ComM
channel. ()
Rationale for SWS_ComM_00734: A SW-C that wants to get informed about, which
users are currently requesting FULL_COM requires the sender-receiver interface
ComM_CurrentChannelRequest.
A SW-C, which plays the role of a Mode Manager, can use this interface to change
the behaviour of the entire ECU.
7.10.3.5.2 Port interface ComM_ECUModeLimitation
See 8.7.2.3 ComM_ECUModeLimitation.
7.10.3.6 Ports and Port Interface for Channel Wake up
7.10.3.6.1 General approach
[SWS_ComM_00747] The Communication Manager Module can be configured to
have an AUTOSAR port providing the Client-Server Interface
ComM_ChannelWakeup. ()
A SW-C playing the role of a Mode Manager can use this interface to configure the
Communication Manager Module to take precautions against awaking other ECU's
by starting the communication. In order to keep the SW-Cs code independent from
the values of the handles that are used to identify a specific handle towards the
Communication Manager Module, these handles are not passed from the SW-C to
the Communication Manager Module. Rather they are modeled as port defined
argument values of the Provide Ports on the Communication Manager Modules
side. As a consequence, these handles do not show up as arguments in the
operations of the client-server interface ComM_ChannelWakeup. As a further
consequence of this approach, the Communication Manager Module has separate
ports for each channel.
7.10.3.6.2 Port interface ComM_ChannelWakeup
See 8.7.2.2 ComM_ChannelWakeup.
Comment: Note that these definitions can only be completed during ECU
configuration (because it depends on certain configuration parameters of the
Communication Manager Module, which determine the number of ports provided by
the Communication Manager Module service). Also note that the implementation of
an SW-C does not depend on these definitions.
[SWS_ComM_00744]
}; ()
[SWS_ComM_00745]
66 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
RunnableEntity ReadInhibitCounter
symbol ComM_ReadInhibitCounter /* see SWS_ComM_00224 */
canbeInvokedConcurrently = FALSE
RunnableEntity ResetInhibitCounter
symbol ComM_ResetInhibitCounter /* see SWS_ComM_00108 */
canbeInvokedConcurrently = FALSE
RunnableEntity SetECUGroupClassification
symbol ComM_SetECUGroupClassification /* see SWS_ComM_00552 */
canbeInvokedConcurrently = FALSE
RunnableEntity LimitChannelToNoComMode
symbol ComM_LimitChannelToNoComMode /* see SWS_ComM_00163 */
canbeInvokedConcurrently = FALSE
RunnableEntity GetInhibitionStatus
symbol ComM_GetInhibitionStatus /*see SWS_ComM_00619 */
canbeInvokedConcurrently = FALSE
RunnableEntity PreventWakeup
symbol ComM_PreventWakeup
canbeInvokedConcurrently = FALSE
RunnableEntity RequestComMode
symbol ComM_RequestComMode /* see SWS_ComM_00110 */
canbeInvokedConcurrently = TRUE
RunnableEntity GetMaxComMode
symbol ComM_GetMaxComMode /* see SWS_ComM_00085 */
canbeInvokedConcurrently = TRUE
RunnableEntity GetRequestedComMode
symbol ComM_GetRequestedComMode
canbeInvokedConcurrently = TRUE
RunnableEntity GetCurrentComMode
symbol ComM_GetCurrentComMode /*see SWS_ComM_00083 */
canbeInvokedConcurrently = TRUE
// per-user behaviour
// Note that the port-argument value must be consistent with the
// value in the configuration COMM_USER_LIST
// Note that the exact data-type of the UserHandleType must of course
// be defined BEFORE RTE_configuration, but does NOT affect the
// API seen by the SW-Cs that use the service
UR000.RequestComMode -> RequestComMode
UR000.GetMaxComMode -> GetMaxComMode
UR000.GetRequestedComMode -> GetRequestedComMode
UR000.GetCurrentComMode -> GetCurrentComMode
PortArgument {port=UR000,
value.type= ComM_UserhandleType,
value.value=COMM_USER_LIST[0]}
URnnn.RequestComMode -> RequestComMode
URnnn.GetMaxComMode -> GetMaxComMode
URnnn.GetRequestedComMode -> GetRequestedComMode
URnnn.GetCurrentComMode -> GetCurrentComMode
PortArgument {port=URnnn,
value.type= ComM_UserhandleType,
value.value=COMM_USER_LIST[n]}
}; ()
8 API specification
In this chapter all types included from the following files are listed:
[SWS_ComM_00820]
Module Imported Type
ComStack_Types NetworkHandleType
PNCHandleType
EcuM EcuM_StateType
NvM NvM_BlockIdType
NvM_RequestResultType
Std_Types Std_ReturnType
Std_VersionInfoType
(SRS_BSW_00348, SRS_BSW_00357)
[SWS_ComM_00649]
Range: COMM_E_MODE_LIMITATION 2 Function call has been successfully but mode can not
be granted because of mode inhibition.
Description: --
(SRS_BSW_00331, SRS_BSW_00369, SRS_BSW_00377, SRS_BSW_00441)
8.2.1 ComM_InitStatusType
[SWS_ComM_00668]
Name: ComM_InitStatusType
Type: Enumeration
Range: COMM_UNINIT 0x00 The COM Manager is not initialized or not usable.
This shall be the default value after reset. This status
shall have the value 0.
COMM_INIT 0x01 The COM Manager is initialized and usable.
Description: Initialization status of ComM.
()
8.2.2 ComM_PncModeType
[SWS_ComM_00673]
Name: ComM_PncModeType
Type: Enumeration
Range: COMM_PNC_REQUESTED 0x00 PNC is requested by a local ComM user
COMM_PNC_READY_SLEEP 0x01 PNC is requested by a remote ComM user
COMM_PNC_PREPARE_SLEEP 0x02 PNC is active with no deadline monitoring
COMM_PNC_NO_COMMUNICATION 0x03 PNC does not communicate
Description: Current mode of a PNC
()
8.2.3 ComM_StateType
[SWS_ComM_00674]
Name: ComM_StateType
Type: uint8
Range: COMM_NO_COM_NO_PENDING_REQUEST 0 --
COMM_NO_COM_REQUEST_PENDING 1 --
COMM_FULL_COM_NETWORK_REQUESTED 2 --
COMM_FULL_COM_READY_SLEEP 3 --
COMM_SILENT_COM 4 --
Description: State and sub-state of ComM state machine
8.2.4 ComM_ConfigType
[SWS_ComM_00162]
Name: ComM_ConfigType
Type: Structure
Range: implementation The contents of the initialization data structure are
specific implementation specific
Description: This type contains the implementation-specific post build configuration structure.
()
8.3.1 ComM_Init
[SWS_ComM_00146]
Service name: ComM_Init
Syntax: void ComM_Init(
const ComM_ConfigType* ConfigPtr
70 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
)
Service ID[hex]: 0x01
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): ConfigPtr Pointer to post-build configuration data
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Initializes the AUTOSAR Communication Manager and restarts the internal state
machines.
(SRS_BSW_00101, SRS_BSW_00358, SRS_BSW_00414)
[SWS_ComM_00793] Caveats of ComM_Init(): The NVRAM Manager module
has to be initialized to have the possibility to "direct" access the ComM
modules parameters. ()
8.3.2 ComM_DeInit
[SWS_ComM_00147]
Service name: ComM_DeInit
Syntax: void ComM_DeInit(
void
)
Service ID[hex]: 0x02
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): None
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This API de-initializes the AUTOSAR Communication Manager.
(SRS_BSW_00336)
[SWS_ComM_00794] De-initialization in ComM_DeInit() shall only be performed
if all channels controlled by the ComM module are in COMM_NO_COMMUNICATION
mode.
Rationale for SWS_ComM_00794: Since the ComM_DeInit()API cannot return an
error message, it must be assured that all channels are in
COMM_NO_COMMUNICATION mode and COMM_NO_COM_NO_PENDING_REQUEST
sub-state before ComM_DeInit()is called. E.g. the state should be checked with
ComM_GetState(Channel,)and
ComM_CommunicationAllowed(Channel,TRUE) cannot be called before
ComM_DeInit() has been called. ()
8.3.3 ComM_GetState
[SWS_ComM_00872]
Service name: ComM_GetState
Syntax: Std_ReturnType ComM_GetState(
NetworkHandleType Channel,
ComM_StateType* State
)
Service ID[hex]: 0x34
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Channel The Network Channel for the requested state of ComM state
Parameters (in):
machine.
Parameters None
(inout):
State State of the ComM channel state machine:
COMM_NO_COM_NO_PENDING_REQUEST
COMM_NO_COM_REQUEST_PENDING
Parameters (out):
COMM_FULL_COM_NETWORK_REQUESTED
COMM_FULL_COM_READY_SLEEP
COMM_SILENT_COM
Std_ReturnType E_OK: Successfully return current state of ComM state
machine
Return value:
E_NOT_OK: Return of current state of ComM state machine
failed
Description: Return current state, including sub-state, of the ComM channel state machine.
If EcuM/Flex and BswM is used, BswM instead use received mode indications
from ComM (BswM_ComM_RequestedMode(..)).
()
8.3.4 ComM_GetStatus
[SWS_ComM_00242]
Service name: ComM_GetStatus
Syntax: Std_ReturnType ComM_GetStatus(
ComM_InitStatusType* Status
)
Service ID[hex]: 0x03
Sync/Async: Synchronous
Reentrancy: Non Reentrant
72 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
8.3.5 ComM_GetInhibitionStatus
[SWS_ComM_00619]
Service name: ComM_GetInhibitionStatus
Syntax: Std_ReturnType ComM_GetInhibitionStatus(
NetworkHandleType Channel,
ComM_InhibitionStatusType* Status
)
Service ID[hex]: 0x04
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): Channel See NetworkHandleType
Parameters None
(inout):
Parameters (out): Status See ComM_InhibitionStatusType
Std_ReturnType E_OK: Successfully returned Inhibition Status
Return value:
E_NOT_OK: Return of Inhibition Status failed
Description: Returns the inhibition status of a ComM channel.
()
8.3.6 ComM_RequestComMode
[SWS_ComM_00110]
Service name: ComM_RequestComMode
Syntax: Std_ReturnType ComM_RequestComMode(
ComM_UserHandleType User,
ComM_ModeType ComMode
)
Service ID[hex]: 0x05
Sync/Async: Synchronous
Reentrancy: Reentrant
User Handle of the user who requests a mode
Parameters (in): ComMode COMM_FULL_COMMUNICATION
COMM_NO_COMMUNICATION
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Successfully changed to the new mode
Return value:
E_NOT_OK: Changing to the new mode failed
Note:
Internally mode COMM_SILENT_COMMUNICATION is not a valid request for a
user, mode used for synchronization at shutdown.
Valid modes are COMM_NO_COMMUNICATION and
COMM_FULL_COMMUNICATION
(SRS_ModeMgm_09081)
[SWS_ComM_00795] Configuration of ComM_RequestComMode: Relationship
between users and channels. A user is statically mapped to one or more
channels. ()
8.3.7 ComM_GetMaxComMode
[SWS_ComM_00085]
Service name: ComM_GetMaxComMode
Syntax: Std_ReturnType ComM_GetMaxComMode(
ComM_UserHandleType User,
ComM_ModeType* ComMode
)
Service ID[hex]: 0x06
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): User Handle of the user who requests a mode
Parameters None
(inout):
Parameters (out): ComMode See ComM_ModeType
Std_ReturnType E_OK: Successfully returned maximum allowed Communication
Mode
Return value:
E_NOT_OK: Return of maximum allowed Communication Mode
failed
Description: Function to query the maximum allowed Communication Mode of the
corresponding user.
()
Use Case: This function provides the possibility to request the maximum possible
mode (e.g. user wants to check if it is possible to get "Full Communication" mode or if
a limitation/inhibition is active). This is needed for diagnosis/debugging..
[SWS_ComM_00374] If more than one channel is linked to one user request and
the maximum allowed modes of the channels are different, then the function
ComM_GetMaxComMode shall return the lowest mode (see SWS_ComM_00867
and SWS_ComM_00868). ()
8.3.8 ComM_GetRequestedComMode
[SWS_ComM_00079]
Service name: ComM_GetRequestedComMode
Syntax: Std_ReturnType ComM_GetRequestedComMode(
ComM_UserHandleType User,
ComM_ModeType* ComMode
)
Service ID[hex]: 0x07
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): User Handle of the user who requests a mode
Parameters None
(inout):
Parameters (out): ComMode Name of the requested mode
Std_ReturnType E_OK: Successfully returned requested Communication Mode
Return value:
E_NOT_OK: Return of requested Communication Mode failed
Description: Function to query the currently requested Communication Mode of the
corresponding user.
(SRS_ModeMgm_09149)
Rationale for SWS_ComM_00079: The requested user "Communication Mode" has
to be stored volatile within the Communication Manager Module itself, to prevent
redundant storage of status information by the users.
Comment: If the Communication Manager Module would not have this service every
user has to store the status on its own --> redundant and possibly inconsistent
storage of the same data.
ComM797: Configuration of ComM_GetRequestedComMode: Relationship between
users and channels. A user is statically mapped to one or more channels.
8.3.9 ComM_GetCurrentComMode
[SWS_ComM_00083]
Service name: ComM_GetCurrentComMode
Syntax: Std_ReturnType ComM_GetCurrentComMode(
ComM_UserHandleType User,
ComM_ModeType* ComMode
)
Service ID[hex]: 0x08
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): User Handle of the user who requests a mode
Parameters None
(inout):
Parameters (out): ComMode See ComM_ModeType
Std_ReturnType E_OK: Successfully returned Communication Mode from
Bus State Manager
Return value:
E_NOT_OK: Return of Communication Mode from Bus
State Manager failed
Description: Function to query the current Communication Mode. ComM shall use the
corresponding interfaces of the Bus State Managers to get the current
Communication Mode of the network.
(Call to Bus State Manager API: XXXSM _GetCurrentComMode(...))
(SRS_ModeMgm_09084)
[SWS_ComM_00176] If more than one channel is linked to one user request and
the modes of the channels are different, the function ComM_GetCurrentComMode
shall return the lowest mode (see SWS_ComM_00867 and
SWS_ComM_00868). (SRS_ModeMgm_09172)
8.3.10 ComM_PreventWakeUp
[SWS_ComM_00156]
Service name: ComM_PreventWakeUp
Syntax: Std_ReturnType ComM_PreventWakeUp(
NetworkHandleType Channel,
boolean Status
)
Service ID[hex]: 0x09
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Channel See NetworkHandleType
Parameters (in): Status FALSE: Wake up inhibition is switched off
TRUE: Wake up inhibition is switched on
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Successfully changed wake up status for the channel
Return value:
E_NOT_OK: Changed of wake up status for the channel failed
Description: Changes the inhibition status COMM_NO_WAKEUP for the corresponding
channel.
(SRS_ModeMgm_09157)
[SWS_ComM_00799] Configuration of ComM_PreventWakeUp: Configurable with
COMM_WAKEUP_INHIBITION_ENABLED (see ECUC_ComM_00559). ()
8.3.11 ComM_LimitChannelToNoComMode
[SWS_ComM_00163]
Service name: ComM_LimitChannelToNoComMode
Syntax: Std_ReturnType ComM_LimitChannelToNoComMode(
NetworkHandleType Channel,
boolean Status
)
Service ID[hex]: 0x0b
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Channel See NetworkHandleType
Parameters (in): Status FALSE: Limit channel to COMM_NO_COMMUNICATION
disabled
TRUE: Limit channel to COMM_NO_COMMUNICATION
76 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
enabled
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Successfully changed inhibition status for the channel
Return value: E_NOT_OK: Changed of inhibition status for the channel
failed
Description: Changes the inhibition status for the channel for changing from
COMM_NO_COMMUNICATION to a higher Communication Mode.
(See also ComM_LimitECUToNoComMode, same functionality but for all
channels)
(SRS_ModeMgm_09157)
[SWS_ComM_00800] Configuration of ComM_LimitChannelToNoComMode:
Configurable with ComMModeLimitationEnabled (see ECUC_ComM_00560) and
COMM_RESET_AFTER_FORCING_NO_COMM (see ECUC_ComM_00558). ()
8.3.12 ComM_LimitECUToNoComMode
[SWS_ComM_00124]
Service name: ComM_LimitECUToNoComMode
Syntax: Std_ReturnType ComM_LimitECUToNoComMode(
boolean Status
)
Service ID[hex]: 0x0c
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Status FALSE: Limit ECU to COMM_NO_COMMUNICATION
disabled
Parameters (in):
TRUE: Limit ECU to COMM_NO_COMMUNICATION
enabled
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Successfully changed inhibition status for the ECU
Return value:
E_NOT_OK: Changed of inhibition status for the ECU failed
Description: Changes the inhibition status for the ECU (=all channels) for changing from
COMM_NO_COMMUNICATION to a higher Communication Mode.
(See also ComM_LimitChannelToNoComMode, same functionality but for a
specific channels)
(SRS_ModeMgm_09157)
[SWS_ComM_00801] Configuration of ComM_LimitECUToNoComMode:
Configurable with ComMModeLimitationEnabled (see ECUC_ComM_00560) and
COMM_RESET_AFTER_FORCING_NO_COMM (see ECUC_ComM_00558). ()
8.3.13 ComM_ReadInhibitCounter
[SWS_ComM_00224]
Service name: ComM_ReadInhibitCounter
Syntax: Std_ReturnType ComM_ReadInhibitCounter(
uint16* CounterValue
)
8.3.14 ComM_ResetInhibitCounter
[SWS_ComM_00108]
Service name: ComM_ResetInhibitCounter
Syntax: Std_ReturnType ComM_ResetInhibitCounter(
void
)
Service ID[hex]: 0x0e
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): None
Parameters None
(inout):
Parameters (out): None
Std_ReturnType E_OK: Successfully reset of Inhibit
COMM_FULL_COMMUNICATION Counter
Return value:
E_NOT_OK: Reset of Inhibit COMM_FULL_COMMUNICATION
Counter failed
Description: This function resets the Inhibited COMM_FULL_COMMUNICATION request
Counter.
(SRS_ModeMgm_09156)
[SWS_ComM_00803] Configuration of ComM_ResetInhibitCounter: Configurable
with ComMModeLimitationEnabled (see ECUC_ComM_00560). Function will only be
available if ComMModeLimitationEnabled (see ECUC_ComM_00560) is enabled and
ComMGlobalNvMBlockDescriptor is configured. ()
8.3.15 ComM_SetECUGroupClassification
[SWS_ComM_00552]
Service name: ComM_SetECUGroupClassification
Syntax: Std_ReturnType ComM_SetECUGroupClassification(
ComM_InhibitionStatusType Status
)
78 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
8.3.16 ComM_GetVersionInfo
[SWS_ComM_00370]
Service name: ComM_GetVersionInfo
Syntax: void ComM_GetVersionInfo(
Std_VersionInfoType* Versioninfo
)
Service ID[hex]: 0x10
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): None
Parameters None
(inout):
Parameters (out): Versioninfo See Std_VersionInfoType
Return value: None
Description: This function returns the published information (for details refer to table 10.3)
(SRS_BSW_00407)
8.4.1.1 ComM_Nm_NetworkStartIndication
[SWS_ComM_00383]
Service name: ComM_Nm_NetworkStartIndication
Syntax: void ComM_Nm_NetworkStartIndication(
NetworkHandleType Channel
)
79 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
8.4.1.2 ComM_Nm_NetworkMode
[SWS_ComM_00390]
Service name: ComM_Nm_NetworkMode
Syntax: void ComM_Nm_NetworkMode(
NetworkHandleType Channel
)
Service ID[hex]: 0x18
Sync/Async: Asynchronous
Reentrancy: Reentrant
Parameters (in): Channel Channel
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Notification that the network management has entered Network Mode.
()
[SWS_ComM_00806] Caveats of ComM_Nm_NetworkMode: The Communication
Manager Module is initialized correctly. ()
8.4.1.3 ComM_Nm_PrepareBusSleepMode
[SWS_ComM_00391]
Service name: ComM_Nm_PrepareBusSleepMode
Syntax: void ComM_Nm_PrepareBusSleepMode(
NetworkHandleType Channel
)
Service ID[hex]: 0x19
Sync/Async: Asynchronous
Reentrancy: Reentrant
Parameters (in): Channel Channel
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Notification that the network management has entered Prepare Bus-Sleep Mode.
Reentrancy: Reentrant (but not for the same NM-Channel)
()
[SWS_ComM_00808] Caveats of ComM_Nm_PrepareBusSleepMode: The
Communication Manager Module is initialized correctly. ()
8.4.1.4 ComM_Nm_BusSleepMode
[SWS_ComM_00392]
Service name: ComM_Nm_BusSleepMode
Syntax: void ComM_Nm_BusSleepMode(
NetworkHandleType Channel
)
Service ID[hex]: 0x1a
Sync/Async: Asynchronous
Reentrancy: Reentrant
Parameters (in): Channel Channel
Parameters None
(inout):
Parameters (out): None
81 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
8.4.1.5 ComM_Nm_RestartIndication
[SWS_ComM_00792]
Service name: ComM_Nm_RestartIndication
Syntax: void ComM_Nm_RestartIndication(
NetworkHandleType Channel
)
Service ID[hex]: 0x1b
Sync/Async: Asynchronous
Reentrancy: Reentrant
Parameters (in): Channel Channel
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: If NmIf has started to shut down the coordinated busses, AND not all
coordinated busses have indicated bus sleep state, AND on at least on one of
the coordinated busses NM is restarted, THEN the NM Interface shall call the
callback function ComM_Nm_RestartIndication with the nmNetworkHandle of the
channels which have already indicated bus sleep state.
()
[SWS_ComM_00812] Caveats of ComM_Nm_RestartIndication: The ComM
module is initialized correctly. ()
8.4.2.1 ComM_DCM_ActiveDiagnostic
[SWS_ComM_00873]
Service name: ComM_DCM_ActiveDiagnostic
Syntax: void ComM_DCM_ActiveDiagnostic(
NetworkHandleType Channel
)
Service ID[hex]: 0x1f
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): Channel Channel needed for Diagnostic communication
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Indication of active diagnostic by the DCM.
()
8.4.2.2 ComM_DCM_InactiveDiagnostic
[SWS_ComM_00874]
82 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
8.4.3.1 ComM_EcuM_WakeUpIndication
[SWS_ComM_00275]
Service name: ComM_EcuM_WakeUpIndication
Syntax: void ComM_EcuM_WakeUpIndication(
NetworkHandleType Channel
)
Service ID[hex]: 0x2a
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): Channel Channel
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Notification of a wake up on the corresponding channel.
()
[SWS_ComM_00814] Caveats of ComM_EcuM_WakeUpIndication: The
Communication Manager Module is initialized correctly. ()
8.4.3.2 ComM_EcuM_PNCWakeUpIndication
[SWS_ComM_91001]
Service name: ComM_EcuM_PNCWakeUpIndication
Syntax: void ComM_EcuM_PNCWakeUpIndication(
PNCHandleType PNCid
)
Service ID[hex]: 0x37
Sync/Async: Synchronous
Reentrancy: Reentrant
Parameters (in): PNCid Identifier of the partial network cluster
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Notification of a wake up on the corresponding partial network cluster.
()
8.4.4 AUTOSAR ECU State Manager and Basic Software Mode Manager
Interface
8.4.4.1 ComM_CommunicationAllowed
[SWS_ComM_00871]
Service name: ComM_CommunicationAllowed
Syntax: void ComM_CommunicationAllowed(
NetworkHandleType Channel,
boolean Allowed
)
Service ID[hex]: 0x35
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Channel Channel
Parameters (in): Allowed TRUE: Communication is allowed
FALSE: Communication is not allowed
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: EcuM or BswM shall indicate to ComM when communication is allowed.
If EcuM/Fixed is used: EcuM/Fixed.
If EcuM/Flex is used: BswM
()
8.4.5.1 ComM_BusSM_ModeIndication
[SWS_ComM_00675]
Service name: ComM_BusSM_ModeIndication
Syntax: void ComM_BusSM_ModeIndication(
NetworkHandleType Channel,
ComM_ModeType ComMode
)
Service ID[hex]: 0x33
Sync/Async: Asynchronous
Reentrancy: Reentrant
Channel See NetworkHandleType
Parameters (in):
ComMode See ComM_ModeType
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: Indication of the actual bus mode by the corresponding Bus State Manager.
ComM shall propagate the indicated state to the users with means of the RTE and
BswM.
()
[SWS_ComM_00816] Caveats of ComM_BusSM_ModeIndication(): The
Communication Manager Module is initialized correctly. ()
84 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
[SWS_ComM_00819]
Service name: ComM_COMCbk_<sn>
Syntax: void ComM_COMCbk_<sn>(
void
)
Service ID[hex]: 0x36
Sync/Async: Synchronous
Reentrancy: Non Reentrant
Parameters (in): None
Parameters None
(inout):
Parameters (out): None
Return value: None
Description: This callback is called when the EIRA or ERA was updated in COM. The call only
informs the ComM about ERA and EIRA changes. The actual handling is done in
the next call to ComM_MainFunction_<Channel_Id> with changing the
corresponding PN State machine.
()
8.5.1 ComM_MainFunction
[SWS_ComM_00429]
Service name: ComM_MainFunction_<Channel_Id>
Syntax: void ComM_MainFunction_<Channel_Id>(
void
)
Service ID[hex]: 0x60
Description: This function shall perform the processing of the AUTOSAR ComM activities that
are not directly initiated by the calls e.g. from the RTE. There shall be one
dedicated Main Function for each channel of ComM.
This chapter defines all interfaces which are required to fulfil the core functionality of
the module.
[SWS_ComM_00828]
API function Module Description
Nm_PassiveStartUp Nm This function calls the
<BusNm>_PassiveStartUp function (e.g.
CanNm_PassiveStartUp function is called if
channel is configured as CAN).
Nm_NetworkRequest Nm This function calls the
<BusNm>_NetworkRequest (e.g.
CanNm_NetworkRequest function is called if
channel is configured as CAN).
Nm_NetworkRelease Nm This function calls the
<BusNm>_NetworkRelease bus specific
function (e.g. CanNm_NetworkRelease function
is called if channel is configured as CAN).
Dcm_ComM_NoComModeEntered Dcm This call informs the Dcm module about a
ComM mode change to
COMM_NO_COMMUNICATION.
Dcm_ComM_SilentComModeEntered Dcm This call informs the Dcm module about a
ComM mode change to
COMM_SILENT_COMMUNICATION.
Dcm_ComM_FullComModeEntered Dcm This call informs the Dcm module about a
ComM mode change to
COMM_FULL_COMMUNICATION.
Rte_Ports_UserMode_P()[n].Switch_currentMode(RT Rte Indicate COMM_NO_COMMUNICATION mode to
E_MODE_ComMMode_COMM_NO_COMMUNICATI
ON)
RTE
Rte_Ports_UserMode_P()[n].Switch_currentMode(RT Rte Indicate COMM_SILENT_COMMUNICATION
E_MODE_ComMMode_COMM_SILENT_COMMUNI
CATION)
mode to RTE
Rte_Ports_UserMode_P()[n].Switch_currentMode(RT Rte Indicate COMM_FULL_COMMUNICATION mode
E_MODE_ComMMode_COMM_FULL_COMMUNICA
TION)
to RTE
BswM_ComM_CurrentMode BswM Indicate Communication Mode to BswM
NvM_ReadBlock NvM NVRAM manager API for Read block
NvM_WriteBlock NvM NVRAM manager API for Write block
NvM_GetErrorStatus NvM NVRAM manager API for Get status
<BusSM>_GetCurrentComMode <BusS Function to query the actual communication
M> mode from the <Bus> State Manager.
<BusSM>_RequestComMode <BusS Function to request a communication mode
M> from the <Bus> State Manager.
()
8.6.1.1 AUTOSAR NVRAM Manager module
[SWS_ComM_00103] The ComM module shall use the corresponding
standardized services of the NVRAM Manager module (see SWS_ComM_00828) for
storing and reading non-volatile configuration data ComMNoWakeup (see
ECUC_ComM_00569), ComMEcuGroupClassification(see
ECUC_ComM_00563), inhibition status (see SWS_ComM_00157) and the Inhibit
counter (see SWS_ComM_00140). ()
For details refer to the AUTOSAR NVRAM Manager module Specification [7].
8.6.1.2 AUTOSAR Bus State Manager
[SWS_ComM_00962] The prefix for the StateManager APIs ("<BusSm>") shall be
CanSM, LinSM, FrSM, EthSM if the Parameter ComMBusType is
COMM_BUS_TYPE_CAN, COMM_BUS_TYPE_LIN, COMM_BUS_TYPE_FR or
COMM_BUS_TYPE_ETH accordingly. ()
[SWS_ComM_00663] If more than one channel is linked to one user request and
the modes of the channels are different, the ComM module shall indicate
the lowest mode to the user. ()
Rationale for SWS_ComM_00662: It shall be possible to use the port based API also
to address specific users directly.
Comment: Within the array of ports, the ports are named alphabetically.
Comment: There is one such port per configured user to which a SW-C is connected.
For users not used by SW-Cs (e.g. the users created due to
ECUC_ComM_00840 : ) no mode port will be created.
Implementation Hint: An implementation of the ComM module could use any of the
normal RTE-mechanisms to signal changes in the mode to the users. Given
the specific configurability of the Communication Manager Module, using
the RTE Indirect API seems most appropriate. This works as follows
(consult the RTE specification for details).
An implementation of the Communication Manager Module can use the Rte_Ports
API to obtain an array of the UMnnn ports at run-time.
/* Return an array of all ports that provide the interface ComM_CurrentMode.
Because of the specific naming conventions chosen, the element n in this
array of ports will reference to the port UM<nnn>. For example
userModePorts[1] will be a handle on port UM001 */
userModePorts = Rte_Ports_ComM_CurrentMode_P();
For details refer to the AUTOSAR RTE specification [8] and AUTOSAR Services
Mode Management specification [21].
8.6.1.6 Basic Software Mode Manager (BswM)
[SWS_ComM_00861] The ComM module shall use the corresponding function
provided by BswM to report the states of Communication Manager Module channels
(see SWS_ComM_00828). ()
88 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
For details refer to AUTOSAR Basic Software Mode Manager module [29] .
This chapter defines all interfaces which are required to fulfill an optional functionality
of the module.
[SWS_ComM_00829]
API function Module Description
Det_ReportError Det Service to report default errors
BswM_ComM_CurrentPNCMode BswM Function called by ComM to indicate the current
mode of the PNC
()
8.6.2.1 AUTOSAR DET
The Communication Manager module shall use Det_ReportError from the Default
Error Tracer Module to report default errors.
None.
[SWS_Com_00197]
Service name: Com_SendSignal
Syntax: uint8 Com_SendSignal(
Com_SignalIdType SignalId,
const void* SignalDataPtr
)
Service ID[hex]: 0x0a
Sync/Async: Asynchronous
Reentrancy: Non Reentrant for the same signal. Reentrant for different signals.
SignalId Id of signal to be sent.
Parameters (in):
SignalDataPtr Reference to the signal data to be transmitted.
Parameters None
(inout):
Parameters (out): None
uint8 E_OK: service has been accepted
COM_SERVICE_NOT_AVAILABLE: corresponding I-PDU group
Return value: was stopped (or service failed due to development error)
COM_BUSY: in case the TP-Buffer is locked for large data types
handling
Description: The service Com_SendSignal updates the signal object identified by SignalId with
the signal referenced by the SignalDataPtr parameter.
(SRS_Com_02037)
[SWS_Com_00198]
Service name: Com_ReceiveSignal
Syntax: uint8 Com_ReceiveSignal(
89 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
Com_SignalIdType SignalId,
void* SignalDataPtr
)
Service ID[hex]: 0x0b
Sync/Async: Synchronous
Reentrancy: Non Reentrant for the same signal. Reentrant for different signals.
Parameters (in): SignalId Id of signal to be received.
Parameters None
(inout):
SignalDataPtr Reference to the location where the received signal data shall be
Parameters (out):
stored
uint8 E_OK: service has been accepted
COM_SERVICE_NOT_AVAILABLE: corresponding I-PDU group
Return value: was stopped (or service failed due to development error)
COM_BUSY: in case the TP-Buffer is locked for large data types
handling
Description: Com_ReceiveSignal copies the data of the signal identified by SignalId to the
location specified by SignalDataPtr.
(SRS_Com_02037)
8.7.1 Sender-Receiver-interfaces
8.7.1.1 ComM_CurrentChannelRequest
[SWS_ComM_00904]
Name ComM_CurrentChannelRequest_{channel_name}
Array of ComMUserIdentifier, that currently hold FULL_COM requests for this channel.
Comment The size of the attribute fullComRequestors.handleArray is
NUM_COMM_USER_PER_CHANNEL
IsService true
{ecuc(ComM/ComMConfigSet/ComMChannel/
Variation ComMFullCommRequestNotificationEnabled)} == true
channel_name = {ecuc(ComM/ComMConfigSet/ComMChannel.SHORT-NAME)}
fullComRequestors
8.7.2 Client-Server-interfaces
8.7.2.1 ComM_ChannelLimitation
[SWS_ComM_00743]
Name ComM_ChannelLimitation
90 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
A SW-C playing the role of a "Mode Manager" can use this interface to configure the
Comment
Communication Manager Module to inhibit communication mode for a given channel.
IsService true
0 E_OK
Possible
Errors
1 E_NOT_OK
Operations
GetInhibitionStatus
Variation --
Comment --
Type ComM_InhibitionStatusType
Parameters Status
Variation --
Direction OUT
LimitChannelToNoComMode
Changes the inhibition status for the channel for changing from
Comments COMM_NO_COMMUNICATION to a higher Communication Mode.
(See also ComM_LimitECUToNoComMode, same functionality but for all channels)
Variation --
Variation --
Direction IN
8.7.2.2 ComM_ChannelWakeup
[SWS_ComM_00742]
Name ComM_ChannelWakeup
A SW-C playing the role of a "Mode Manager" can use this interface to configure the
Comment Communication Manager Module to take precautions against awakening other ECU's
by starting the communication.
IsService true
0 E_OK
Possible
Errors
1 E_NOT_OK
Operations
GetInhibitionStatus
Variation --
Comment --
Type ComM_InhibitionStatusType
Parameters Status
Variation --
Direction OUT
PreventWakeUp
Comments Changes the inhibition status COMM_NO_WAKEUP for the corresponding channel.
Variation --
Comment --
Type boolean
Parameters Status
Variation --
Direction IN
8.7.2.3 ComM_ECUModeLimitation
[SWS_ComM_00741]
Name ComM_ECUModeLimitation
A SW-C which plays the role of a "Mode Manager" can use this interface to change
Comment
the behavior of the entire ECU.
IsService true
0 E_OK
Possible
Errors
1 E_NOT_OK
Operations
LimitECUToNoComMode
Changes the inhibition status for the ECU (=all channels) for changing from
COMM_NO_COMMUNICATION to a higher Communication Mode.
Comments
(See also ComM_LimitChannelToNoComMode, same functionality but for a specific
channels)
Variation --
Variation --
Direction IN
ReadInhibitCounter
Comments returns the value of the 'inhibited full communication request counter'
Comment --
Type uint16
Parameters CounterValue
Variation --
Direction OUT
Errors E_NOT_OK --
ResetInhibitCounter
SetECUGroupClassification
Variation --
Comment --
Type ComM_InhibitionStatusType
Parameters Status
Variation --
Direction IN
8.7.2.4 ComM_UserRequest
[SWS_ComM_01000]
Name ComM_UserRequest
A SW-C that wants to explicitly direct the local Communication Manager Module of the
ECU towards a certain state requires the client-server interface ComM_UserRequest.
Comment Through this interface the SW-C can set the desired state of all communication
channels that are relevant for that component to "No Communication" or "Full
Communication".
IsService true
Variation --
0 E_OK
Possible
1 E_NOT_OK
Errors
2 E_MODE_LIMITATION
Operations
GetCurrentComMode
Comments Returns the current Communication Manager Module mode for the SW-C
Variation --
Comment --
Type ComM_ModeType
Parameters ComMode
Variation --
Direction OUT
GetMaxComMode
Comments Returns the current Communication Manager Module mode for the SW-C
Variation --
Comment --
Type ComM_ModeType
Parameters ComMode
Variation --
Direction OUT
GetRequestedComMode
Comments Returns that last Communication Manager Module Mode requested by the SW-C
Variation --
Comment --
Type ComM_ModeType
Parameters ComMode
Variation --
Direction OUT
RequestComMode
95 of 128 Document ID 079: AUTOSAR_SWS_COMManager
- AUTOSAR confidential -
Specification of Communication Manager
AUTOSAR CP Release 4.3.0
The SW-C requests that all communication channels it needs are in the provided
Comments
Communication Manager Module mode
Variation --
Comment --
Type ComM_ModeType
Parameters ComMode
Variation --
Direction IN
Possible E_NOT_OK --
Errors
ComMMode cannot be granted because of
E_MODE_LIMITATION
ComMMode inhibition
()
8.7.3 Mode-Switch-Interfaces
8.7.3.1 ComM_CurrentMode
[SWS_ComM_01001]
Name ComM_CurrentMode
A SW-C that wants to get informed about its current Communication Manager Module
Comment
Mode requires the ModeSwitchInterface ComM_CurrentMode.
IsService true
Variation --
8.7.4.1 ComM_InhibitionStatusType
[SWS_ComM_00669]
Name ComM_InhibitionStatusType
Kind Bitfield
Derived
uint8
from
Bit 1: Limit to
bit LimitedToNoCom 0x02
COMM_NO_COMMUNICATION mode
8.7.4.2 ComM_ModeType
[SWS_ComM_00672]
Name ComM_ModeType
Kind Type
Derived
uint8
from
Description Current mode of the Communication Manager (main state of the state machine).
Variation --
()
8.7.4.3 ComM_UserHandleType
[SWS_ComM_00670]
Name ComM_UserHandleType
Kind Type
Derived
uint8
from
Variation --
()
8.7.4.4 ComM_UserHandleArrayType
[SWS_ComM_00906]
Name ComM_UserHandleArrayType_{channel_name}
Kind Structure
numberOfRequesters uint8 --
handleArray ComM_UserHandleSubArrayType_{channel_name} --
Elements
channel_name = {ecuc(ComM/ComMConfigSet/
Variation
ComMChannel.SHORT-NAME)}
8.7.4.5 ComM_UserHandleSubArrayType
[SWS_ComM_01005]
Name ComM_UserHandleSubArrayType_{channel_name}
COUNT{ecuc(ComM/ComMConfigSet/ComMChannel/ComMUserPerChannel)}
Size
Elements
This element contains the user handles of the users which keep the channel requested
(if any), starting in its first entries. The size of the array
Description
MAX_CHANNEL_REQUESTERS is the maximum of the number of users requesting a
channel.
8.7.5 Ports
8.7.5.1 ComM_CL
[SWS_ComM_01006]
Name CL_{channel_name}
Description --
Type NetworkHandleType
Port Defined Argument
Value(s)
Value {ecuc(ComM/ComMConfigSet/ComMChannel/
ComMChannelId.value)}
{ecuc(ComM/ComMGeneral.ComMModeLimitationEnabled)} == true
Variation
channel_name = {ecuc(ComM/ComMConfigSet/ComMChannel)}
()
8.7.5.2 ComM_CR
[SWS_ComM_01007]
Name CR_{channel_name}
Description --
{ecuc(ComM/ComMConfigSet/ComMChannel/
Variation ComMFullCommRequestNotificationEnabled)} == true
channel_name = {ecuc(ComM/ComMConfigSet/ComMChannel.SHORT-NAME)}
()
8.7.5.3 ComM_CW
[SWS_ComM_01008]
Name CW_{channel_name}
Description --
Type NetworkHandleType
Port Defined Argument
Value(s) {ecuc(ComM/ComMConfigSet/ComMChannel/
Value
ComMChannelId.value)}
{ecuc(ComM/ComMGeneral.ComMWakeupInhibitionEnabled)} == true
Variation
channel_name = {ecuc(ComM/ComMConfigSet/ComMChannel)}
()
8.7.5.4 ComM_modeLimitation
[SWS_ComM_01009]
Name modeLimitation
Description --
8.7.5.5 ComM_UM
[SWS_ComM_01010]
Name UM_{user_name}
Description --
8.7.5.6 ComM_UR
[SWS_ComM_01011]
Name UR_{user_name}
Description --
Type ComM_UserHandleType
Port Defined Argument
Value(s) ecuc(ComM/ComMConfigSet/ComMUser/
Value
ComMUserIdentifier.value)}
8.7.6 ModeDeclarationGroups
8.7.6.1 ComMMode
[SWS_ComM_01012]
Name ComMMode
Kind ModeDeclarationGroup
Category ALPHABETIC_ORDER
On transition value --
COMM_FULL_COMMUNICATION --
Modes COMM_NO_COMMUNICATION --
COMM_SILENT_COMMUNICATION --
Description --
()
9 Sequence diagrams
Request
COMM_FULL_COMMUNICATION
Std_ReturnType:=CanSM_RequestComMode(NetworkHandle,ComM_Mode:
=COMM_FULL_COMMUNICATION)
CanSM_RequestComMode(...)=E_OK
COMM_FULL_COMMUNICATION
indication
ComM_BusSM_ModeIndication(Channel,ComMode:
=COMM_FULL_COMMUNICATION)
alt NM variant
Nm_NetworkRequest(...)=E_OK
[Passive startup]
Std_ReturnType:
=Nm_PassiveStartUp(NetworkHandle)
Nm_PassiveStartUp(...)=E_OK
ComM_Nm_NetworkMode(Channel)
ComM_Nm_NetworkMode(...)
Status: Proposed
Description: Successful
COMM_FULL_COMMUNICATION
request to bus state manager and
request to NM.
Comment: - none -
COMM_NO_COM_NO_PENDING_REQUEST
ComM_EcuM_PNCWakeUpIndication(PNCHandleType)
COMM_NO_COM_REQUEST_PENDING
CanSM_RequestComMode(NetworkHandle,
ComM_Mode:=COMM_FULL_COMMUNICATION)
Request
COMM_FULL_COMMUNICATION CanSM_RequestComMode(...)=E_OK
COMM_FULL_COM_NETWORK_REQUESTED
alt NM Variant
[Full/Passive]
Nm_PassiveStartUp(Std_ReturnType, NetworkHandleType)
Nm_PassiveStartUp(...)=E_OK
ComM_Nm_NetworkMode(Channel)
ComM_Nm_NetworkMode(...)
[None/Light]
Start timer
ComMTMinFullComModeDuration
ComM_BusSM_ModeIndication(Channel,
ComMode:=COMM_FULL_COMMUNICATION)
Figure 10: Reaction on a wake-up indicated by the ECU State Manager module
[No user requests COMM_FULL_COMMUNICATION and no DCM ActiveDiagnostics] Release last COMM_FULL_COMMUNICATION request
Std_ReturnType:=ComM_RequestComMode(User,
ComMode:=COMM_NO_COMMUNICATION)
ComM_GetRequestedComMode(...)=E_OK
Switch to
SUBS_COMM_READY_SLEEP
state()
Std_ReturnType:
=Nm_NetworkRelease(NetworkHandle)
Nm_NetworkRelease(...)=E_OK
ComM_Nm_PrepareBusSleepMode(Channel)
ComM_Nm_PrepareBusSleepMode(...)
Switch to COMM_SILENT_COMMUNICATION
COMM_SILENT_COMMUNICATION()
Std_ReturnType:=CanSM_RequestComMode(NetworkHandle,
ComM_Mode:=COMM_SILENT_COMMUNICATION)
CanSM_RequestComMode(...)=E_OK
Rte_Ports_UserMode_P()[n].Switch_currentMode(RTE_MODE_ComModes_SILENT_COMMUNICATION)
Rte_Ports_UserMode_P()[n].Switch_currentMode
BswM_ComM_CurrentMode(Network,
COMM_SILENT_COMMUNICATION)
BswM_ComM_CurrentMode()
Dcm_ComM_SilentComModeEntered(uint8)
Dcm_ComM_SilentComModeEntered()
ComM_Nm_BusSleepMode(Channel)
ComM_Nm_BusSleepMode()
Switch to
COMM_NO_COMMUNICATION()
Std_ReturnType:=CanSM_RequestComMode(NetworkHandle,
ComM_Mode:=COMM_NO_COMMUNICATION)
COMM_NO_COMMUNICATION
CanSM_RequestComMode(...)=E_OK
ComM_BusSM_ModeIndication(NetworkHandle,
ComM_Mode:=COMM_NO_COMMUNICATION)
Rte_Ports_UserMode_P()[n].Switch_currentMode(RTE_MODE_ComModes_NO_COMMUNICATION)
Rte_Ports_UserMode_P()[n].Switch_currentMode
BswM_ComM_CurrentMode(Network,
COMM_NO_COMMUNICATION)
BswM_ComM_CurrentMode()
Dcm_ComM_NoComModeEntered(uint8)
Dcm_ComM_NoComModeEntered()
Status: Proposed.
Description: Release of
network for CAN. Similar
sequence for LIN, FlexRay
and Ethernet
If EcuM - Fixed is used:
EcuM - Fixed need to call and check ComM_Getstate() before an ECU shutdown Comments: - none -
COMM_NO_COM_NO_PENDING_REQUEST
[User request]
ComM_RequestComMode(Std_ReturnType, ComM_UserHandleType,
ComM_ModeType)
Request
COMM_FULL_COMMUNICATION
[Active diagnostic]
ComM_DCM_ActiveDiagnostic(NetworkHandleType)
COMM_NO_COM_REQUEST_PENDING
CanSM_RequestComMode(...)=E_OK
COMM_FULL_COM_NETWORK_REQUESTED
alt NM Variant
Nm_NetworkRequest(NetworkHandle)
[Full]
NM_NetworkRequest(...)=E_OK
ComM_Nm_NetworkMode(Channel)
ComM_Nm_NetworkMode(...)
[Passive] ComM_Nm_NetworkMode(Channel)
[None/Light]
Start timer
ComMTMinFullComModeDuration
ComM_BusSM_ModeIndication(Channel, ComMode:
=COMM_FULL_COMMUNICATION)
10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. In order to support the specification Chapter 10.1 describes
fundamentals.
Chapter 10.2 specifies the structure (containers) and the parameters of the module
Communication Manager Module.
10.2.1 ComM
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration parameters and sub
ComMConfigSet 1
containers of the AUTOSAR ComM module.
General configuration parameters of the Communication
ComMGeneral 1
Manager.
AUTOSARParameterDefinition :
EcucDefinitionCollection
(from ECUCParameterDefinitions)
+module
ComMGeneral :EcucParamConfContainerDef
ComM :EcucModuleDef
+container
upperMultiplicity = 1
upperMultiplicity = 1 lowerMultiplicity = 1
lowerMultiplicity = 0
ComMUser :
ComMConfigSet :EcucParamConfContainerDef +subContainer EcucParamConfContainerDef
upperMultiplicity = 255
+container lowerMultiplicity = 0
ComMNetworkManagement :
ComMChannel : EcucParamConfContainerDef
+subContainer
EcucParamConfContainerDef
upperMultiplicity = 1
+subContainer lowerMultiplicity = 1 lowerMultiplicity = 1
upperMultiplicity = 256
+subContainer ComMUserPerChannel :
EcucParamConfContainerDef
upperMultiplicity = 255
lowerMultiplicity = 0
ComMPnc :
+subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 56
ComMPncEnabled :
EcucBooleanParamDef
+parameter
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
10.2.2 ComMGeneral
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
Examples:
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. 63]
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: #CanNm: (CanNmPnResetTime +
ComMPncPrepareSleepTimer) < CanNmTimeoutTime
# FrNm: (FrNmPnResetTime + ComMPncPrepareSleepTimer) < (
(FrNmReadySleepCnt +1) * FrNmRepetitionCycle * "Duration of one
FlexRay Cycle" )
# UdpNm: (UdpNmPnResetTime + ComMPncPrepareSleepTimer) <
UdpNmTimeoutTime
Type EcucBooleanParamDef
Default value true
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
Multiplicity 0..1
Type Symbolic name reference to [ NvMBlockDescriptor ]
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
dependency: Derived from NvM configuration
No Included Containers
ComMDevErrorDetect :EcucBooleanParamDef
+parameter ComMTMinFullComModeDuration :
ComMGeneral : defaultValue = false
EcucParamConfContainerDef EcucFloatParamDef
+parameter
upperMultiplicity = 1 max = 65
lowerMultiplicity = 1 min = 0.001
ComMWakeupInhibitionEnabled : defaultValue = 5
+parameter
EcucBooleanParamDef
defaultValue = false
ComMResetAfterForcingNoComm :
+parameter
EcucBooleanParamDef
defaultValue = false
+parameter ComMModeLimitationEnabled :
EcucBooleanParamDef
max = 255
ComMSynchronousWakeUp : min = 0
+parameter
EcucBooleanParamDef defaultValue = 3
defaultValue = true
ComM0PncVectorAvoidance :
+parameter EcucBooleanParamDef
(from Nvm)
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1 ComMDirectUserMapping :
+parameter EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
10.2.3 ComMConfigSet
false: Disabled
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time --
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time --
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: ECU
dependency: ComMPncSupport
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration (parameters) of the
ComMChannel 1..256 bus channel(s). The channel parameters shall be harmonized
within the whole communication stack.
This container contains the configuration of the partial network
ComMPnc 0..56
cluster (PNC).
This container contains a list of identifiers that are needed to
ComMUser 0..255 refer to a user in the system which is designated to request
Communication modes.
10.2.4 ComMUser
No Included Containers
ComMUserIdentifier :
ComMUser :
EcucIntegerParamDef
EcucParamConfContainerDef +parameter
min = 0
upperMultiplicity = 255
symbolicNameValue = true
lowerMultiplicity = 0
max = 254
ComMUserEcucPartitionRef : EcucPartition :
EcucReferenceDef +destination EcucParamConfContainerDef
+reference
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = *
(from EcucPartition)
+destination
ComMUserPerChannel : ComMUserChannel :
EcucParamConfContainerDef +reference EcucReferenceDef
upperMultiplicity = 255
lowerMultiplicity = 0
10.2.5 ComMChannel
Post-build time --
Scope / Dependency scope: ECU
dependency: Shall be harmonized with channel IDs of
networkmanagement and the bus interfaces.
dependency: ComMModeLimitationEnabled
Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration parameters of the
ComMNetworkManagement 1
networkmanagement.
This container contains a list of identifiers that are needed to
ComMUserPerChannel 0..255
refer to a user in the system which is linked to a channel.
ComMMainFunctionPeriod :
ComMChannel : EcucFloatParamDef
+parameter
EcucParamConfContainerDef
max = INF
lowerMultiplicity = 1 min = 0
upperMultiplicity = 256 defaultValue = 0.020
ComMChannelId :
EcucIntegerParamDef
+parameter
symbolicNameValue = true
max = 255
min = 0
+literal
ComMBusType : COMM_BUS_TYPE_CAN :EcucEnumerationLiteralDef
EcucEnumerationParamDef
+literal
COMM_BUS_TYPE_FR :EcucEnumerationLiteralDef
+literal
COMM_BUS_TYPE_INTERNAL :EcucEnumerationLiteralDef
+parameter
+literal
COMM_BUS_TYPE_LIN :EcucEnumerationLiteralDef
+literal
COMM_BUS_TYPE_ETH :EcucEnumerationLiteralDef
+literal
COMM_BUS_TYPE_CDD :EcucEnumerationLiteralDef
ComMNoWakeup :
+parameter
EcucBooleanParamDef
defaultValue = false
ComMCDDBusPrefix :
defaultValue = false
+parameter EcucStringParamDef
ComMFullCommRequestNotificationEnabled : lowerMultiplicity = 0
+parameter
EcucBooleanParamDef upperMultiplicity = 1
defaultValue = false
+parameter ComMNoWakeUpInhibitionNvmStorage :
EcucBooleanParamDef
ComMUserPerChannel :
+subContainer EcucParamConfContainerDef
upperMultiplicity = 255
lowerMultiplicity = 0
ComMNetworkManagement :
+subContainer EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 1
+literal COMM_GATEWAY_TYPE_ACTIVE :
ComMPncGatewayType :
EcucEnumerationParamDef EcucEnumerationLiteralDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1 +literal
COMM_GATEWAY_TYPE_PASSIVE :
EcucEnumerationLiteralDef
10.2.6 ComMNetworkManagement
Nm_NetworkRequest.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: It shall only be possible to set ComMPncNmRequest to
TRUE, if ComMNmVariant is FULL.
No Included Containers
ComMChannel :
EcucParamConfContainerDef
lowerMultiplicity = 1
upperMultiplicity = 256
+subContainer
+parameter
+literal PASSIVE :
EcucEnumerationLiteralDef
+literal FULL :
EcucEnumerationLiteralDef
ComMNmLightTimeout :
EcucFloatParamDef
+parameter
max = 255
min = 0
defaultValue = 10
upperMultiplicity = 1
lowerMultiplicity = 0
+parameter ComMPncNmRequest :
EcucBooleanParamDef
defaultValue = false
10.2.7 ComMUserPerChannel
No Included Containers
10.2.8 ComMPnc
Included Containers
Container Name Multiplicity Scope / Dependency
Represents the PncComSignals which are used to
ComMPncComSignal 0..*
communicate the EIRA and ERA status of this PNC.
10.2.9 ComMPncComSignal
dependency: ComMPncGatewayEnabled
No Included Containers