AUTOSAR SWS COMManager
AUTOSAR SWS COMManager
AUTOSAR CP R21-11
Disclaimer
This work (specification and/or software implementation) 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
work.
The material contained in this work is protected by copyright and other types of
intellectual property rights. The commercial exploitation of the material contained in
this work requires a license to such intellectual property rights.
This work 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
work may be utilized or reproduced, in any form or by any means, without permission
in writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Table of Contents
List of Figures
Figure 1: Communication Manager Module context view........................................... 18
Figure 2: PNC State Machine ..................................................................................... 38
Figure 3: PNC-to-channel-mapping ............................................................................ 51
Figure 4: Example for a PNC gateway with not coordinated ComMChannels
(see Node2) ................................................................................................ 52
Figure 5: Example for a partial network (PN) topology that reflect the hierarchy ....... 54
Figure 6: Example for a valid PN with multiple top-level PNC coordinators............... 55
Figure 7: ComM channel state machine ..................................................................... 61
Figure 8: User to Partial network and channel Mapping Use Cases .......................... 74
Figure 9: ARPackage of the Communication Manager Module ................................. 85
Figure 10: SW-C requests state changes to the Communication Manager
Module......................................................................................................... 86
Figure 11: SW-C requires state changes within the Communication Manager
Module and reads out current communication state .................................. 87
Figure 12: Interaction between BswM and the ComM module ................................... 89
Figure 13: Starting transmission and reception on CAN .......................................... 154
Figure 14: Reaction on a wake-up indicated by the ECU State Manager
module....................................................................................................... 155
Figure 15: Network shutdown (CAN) ........................................................................ 157
Figure 16: Request Communication ......................................................................... 158
Figure 17: Request for a synchronized PNC shutdown in the role of a top-level
PNC coordinator (TLPC) ........................................................................... 161
Figure 18: Request to forward a synchronized PNC shutdown in the role of an
intermediate PNC coordinator .................................................................. 163
Figure 19: Configuration ComM ................................................................................ 166
Figure 20: Configuration ComMGeneral ................................................................... 173
Figure 21: Configuration ComMUser ........................................................................ 176
Figure 22: Configuration ComMChannel .................................................................. 182
Figure 23: Configuration ComMNetworkManagement ............................................. 185
Figure 24: Configuration ComMUserPerChannel and ComUserPerPNC ................ 186
Figure 25: Configuration ComMPnc .......................................................................... 189
Simplifying the usage of the bus communication stack for the user. This includes a
simplified network management handling.
Coordinating the availability of the bus communication stack (allow sending and
receiving of signals) of multiple independent software components on one ECU.
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.
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.
Offering the possibility to force an ECU that keeps the bus awake to the ‘No
Communication’ mode (see Section 7.4.1.2 for details).
Simplifying the resource management by allocating all resources necessary for the
requested Communication Mode.
Further, the PNC extension allows users to request and keep awake a logical group
of ECUs all over the network, a so-called “partial network cluster”. The “PNC
gateway” allows to span these (logical) network clusters over different, hierarchically
structured physical busses and networks
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
12 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
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.
«realize» «realize»
«use» «use» «realize» «realize»
«realize»
ResourceManager
«mandatory»
Rte Det_ReportError NvM_ReadBlock
Dcm_ComM
NvM_WriteBlock
ComM_Types ComM_Dcm
«use» «use» «mandatory» «mandatory» «mandatory»
«realize»
«realize»
«module»
ComM
«realize»
ComM_EcuM
«use»
«module»
«use» «realize» BswM
BswM_RequestMode
«use»
«use» «use» «realize»
«realize»
ComM_BusSM_ModeIndication
obsolete
Nm ComM_COMCbk_<sn>
FrSM_MainFunction_<FrSMCluster.ShortName>
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
module description
template
SRS_BSW_00428 A BSW module shall SWS_ComM_00499
state if its main
processing function(s)
has to be executed in a
specific order or
sequence
SRS_BSW_00429 Access to OS is SWS_ComM_00499
restricted
SRS_BSW_00432 Modules should have SWS_ComM_00499
separate main
processing functions for
read/receive and
write/transmit data path
SRS_BSW_00433 Main processing SWS_ComM_00499
functions are only
allowed to be called
from task bodies
provided by the BSW
Scheduler
SRS_BSW_00437 Memory mapping shall SWS_ComM_00499
provide the possibility to
define RAM segments
which are not to be
initialized during startup
SRS_BSW_00438 Configuration data shall SWS_ComM_00499
be defined in a structure
SRS_BSW_00439 Enable BSW modules to SWS_ComM_00499
handle interrupts
SRS_BSW_00441 Naming convention for SWS_ComM_00863
type, macro and
function
SRS_BSW_00459 It shall be possible to SWS_ComM_01019, SWS_ComM_01020,
concurrently execute a SWS_ComM_01021, SWS_ComM_01059
service offered by a
BSW module in different
partitions
SRS_ModeMgm_00049 The Communication SWS_ComM_00869, SWS_ComM_00870,
Manager shall initiate SWS_ComM_00929, SWS_ComM_01069,
the wake-up and keep SWS_ComM_01071, SWS_ComM_01086
awake physical
channels
SRS_ModeMgm_09071 It shall be possible to SWS_ComM_00066, SWS_ComM_00215,
limit communication SWS_ComM_00303, SWS_ComM_00355,
modes independently SWS_ComM_00740, SWS_ComM_00744,
for each physical SWS_ComM_00745, SWS_ComM_00752,
channel SWS_ComM_00800, SWS_ComM_00801,
SWS_ComM_00842
SRS_ModeMgm_09078 The Communication SWS_ComM_00582, SWS_ComM_00686,
Manager shall SWS_ComM_00736, SWS_ComM_00744,
coordinate multiple SWS_ComM_00745, SWS_ComM_00848
communication requests
capability
SRS_ModeMgm_09268 ComM shall support the SWS_ComM_00069, SWS_ComM_01056,
possibility to forward the SWS_ComM_01057, SWS_ComM_01067,
information if the SWS_ComM_01070, SWS_ComM_01071
communication request
is active or passive to
it's lower layer layer
SRS_ModeMgm_09269 The Communication SWS_ComM_01051, SWS_ComM_01082,
Manager shall support SWS_ComM_01083, SWS_ComM_91003,
synchronized PNC SWS_ComM_91030
shutdown
SRS_ModeMgm_09270 The ECU State SWS_ComM_00991, SWS_ComM_01066,
Manager shall provide a SWS_ComM_01072, SWS_ComM_01073,
service for the selection SWS_ComM_01074, SWS_ComM_01075,
of the shutdown target SWS_ComM_01076, SWS_ComM_01077,
SWS_ComM_01078, SWS_ComM_01079,
SWS_ComM_01080, SWS_ComM_01081,
SWS_ComM_01084
SRS_ModeMgm_09278 The Communication SWS_ComM_00990, SWS_ComM_01063,
Manager shall support SWS_ComM_01064
synchronous and
asynchronous request
upon a indicated
wakeup
SRS_ModeMgm_09279 The Communication SWS_ComM_00947, SWS_ComM_00952
Manager shall support a
coordinated release of
PNCs
SRS_ModeMgm_09280 The Communication SWS_ComM_01083
Manager shall support
to act as a top-level
PNC coordinator per
PNC
7 Functional specification
Comment:
The ComM module allows querying the Communication Mode requested by a
particular user (see ComM_GetRequestedComMode(), SWS_ComM_00079).
The ComM module allows querying the actual Communication Mode of a
channel if the user is assigned to channel(see
ComM_GetCurrentComMode(), SWS_ComM_00083)
The ComM module allows querying for the current PNC mode if the user is
assigned to a PNC (see ComM_GetCurrentPNCComMode(),
SWS_ComM_91002)
[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.⌋(SRS_ModeMgm_09246)
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.
flags for all supported channels. The default value after ComM initialization shall be
communication is not allowed, i.e. CommunicationAllowed is set to FALSE.⌋()
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 within the so-
called PNC bit vector via a network management message (NM message).
Each PNC uses a dedicated bit position within a bit vector (PNC bit vector)
transferred by a NM message on CAN, FlexRay and Ethernet. If a PNC is requested
by a local ComM user on the node, the node sets the corresponding PNC bit in the
PNC bit vector to 1. If the PNC is not requested anymore; the node sets the
corresponding PNC bit in the PNC bit vector to 0. (Please note: If the optional feature
“Synchronized PNC shutdown” is used (see chapter 7.1.4.4) and a PN shutdown
messages has to be transmitted, the PNC bits are set to 1 for the PNCs which are
released and the remaining PNC bits are set to 0). The <Bus>Nm extract the PNC bit
vector from a received NM-PDU and forward the PNC bit vector to the NM interface.
The NM collect and aggregate PNC requests. Based on the aggregated PNC
requests, the NM interface handle the timer for each PNC and provide the
aggregated PNC state to ComM via dedicated APIs.
Each PNC uses the same bit position in the PNC bit vector on every system channel
within the NM message. ComM uses 3 types of PNC bit vector named EIRA, ERA
and IRA to exchange PNC status information with NM interface and <Bus>Nms. The
definition of “EIRA” and “ERA” are located in the AUTOSAR SWS CAN NM,
AUTOSAR SWS FlexRay NM and AUTOSAR SWS UDP NM. For definition of “IRA”
please refer to chapter 2.
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 is supported on the bus types CAN, FlexRay and Ethernet.
Activation and deactivation of the I-PDU groups of the PNCs on a Can, FlexRay and
Ethernet node is required to avoid false timeouts. Starting and Stopping of I-PDU
groups in COM are handled in BswM. Deactivation of single FlexRay ECUs 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: The PNC bit vector is provided as a reference to an array of type uint8
to the ComM within the dedicated APIs. Each bit in the PNC bit vector represents the
status of a particular PNC. The bit is called “PNC bit”.
Hint: The value of the PNC bit vector length of the corresponding channel can
be obtained from the configuration of the Network Management module.
Comment: SWS_ComM_00825 defines only the calculation of the byteIndex and
bitIndex, not how it shall be implemented.
ComM receives the aggregated state of internal and external PNC requests as PNC
bit vector via the callback function ComM_Nm_UpdateEIRA(<PNC bit vector of
internal and external PNC requests>).
ComM receives the aggregated state of external PNC requests as PNC bit vector per
channel via the callback function ComM_Nm_UpdateERA(<Channel>, <PNC bit
vector of external PNC requests>).
Note:
ComM tranfers the EIRA PNC bit vector provided by Nm in one internal EIRA
(see [SWS_ComM_01060]) and each ERA PNC bit vector in one ERA per
ComMChannel (see [SWS_ComM_01061])
Transferring the content of a PNC bit vector result in the internal EIRA / ERA
of ComM by setting the PNC bit in the internal EIRA / ERA to ‘1’ if the
corresponding PNC bit in the PNC bit vector is set to ‘1’ or setting the PNC bit
in the internal EIRA / ERA to ‘0’ if the corresponding PNC bit in the PNC bit
vector is set to ‘0’
Note:
The meaning of the PNC bits is defined in [SWS_ComM_00825]
Internal PNC requests are based on ComM user PNC requests and/or PNC
requests, due to PNC gateway handling
[SWS_ComM_00909] ⌈For every Partial Network Cluster, only one PNC state
machine shall be implemented (i.e. one PNC state machine per PNC, independent of
the amount of ComMChannels).⌋(SRS_ModeMgm_09247)
[SWS_ComM_00924] ⌈The PNC state machine shall consist of the two main states
COMM_PNC_FULL_COMMUNICATION and COMM_PNC_NO_COMMUNICATION.⌋
(SRS_ModeMgm_09247)
Comment: Every PNC activation triggers sending of the PNC bit vector n-times, thus
it would increase the busload without debouncing.
Comment: Requests are handled in main functions of those channels they affect.
COMM_PNC_FULL_COMMUNICATION
ComM_RequestComMode() OR ComM_Nm_UpdateERA()
COMM_PNC_REQUESTED [ComMUser = FullCom OR (PNC bit within ERAn=1 AND
ComMPNCGatewayEnabled = TRUE AND
ComMPncGatewayType is set) ]
/BswM_ComM_CurrentPncMode()
Nm_UpdateIRA()
Channel Full Communication Request()
Stop ComMPncPrepareSleepTimer
ComM_RequestComMode() OR ComM_Nm_UpdateERA() ComM_RequestComMode() OR ComM_Nm_UpdateERA()
[ComMUser = FullCom OR (PNC bit within ERAn=1 AND [ComMUser = NoCom AND (NOT (PNC bit within ERAn=1
ComMPNCGatewayEnabled = TRUE AND AND ComMPNCGatewayEnabled = TRUE AND
ComMPncGatewayType is set) ] ComMPncGatewayType is set))]
/BswM_ComM_CurrentPncMode() /BswM_ComM_CurrentPncMode()
Nm_UpdateIRA() Nm_UpdateIRA()
Channel Full Communication Request() Release Channel Full Communication Request
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’).
Note: As long as at least one ComMUser assigned to this PNC requests “Full
Communication”, COMM_PNC_REQUESTED will be the current PNC state. Please
refer to the following requirements.
channels which are assigned to this PNC where the signal attributes
ComMPncComSignalDirection == "RX" and ComMPncComSignalKind ==
"ERA" and the channel attribute ComMPncGatewayType ==
"COMM_GATEWAY_TYPE_ACTIVE" are set to "0", ComM shall call
Nm_RequestSynchronizedPncShutdown (<channel>, <PncId>) for
each of those <channel> with <PncId> of the current handled PNC
The sub state COMM_PNC_REQUESTED shall be left and the sub state
COMM_PNC_READY_SLEEP shall be entered
⌋(SRS_ModeMgm_09269)
Comment on [SWS_ComM_01082]:
Every time an intermediate PNC coordinator (PNC coordinator which have at
least one ComMChannel with ComMPncGatewayType set to
COMM_GATEWAY_TYPE_PASSIVE) receive an top-level PNC coordinator
Nm frame, the ComM shall immediately release the PNC, forward the PN
information of the top-level PNC coordination Nm frame and request an top-
level PNC coordination Nm frame on ComMChannels with
ComMPncGatewayType set to COMM_GATEWAY_TYPE_ACTIVE which are
assigned to the affected PNC
ComM has to ensure that the procedure upon the reception of a top-level PNC
coordination Nm frame has to be performed as fast as possible, to minimize
the delay of the synchronized PNC shutdown
The forwarding of a synchronized PNC shutdown is not performed if a local
user has indicated to request the affected PNC, or a PNC request was
received via a ComM channel with ComMPncGatewayType set to
COMM_GATEWAY_TYPE_ACTIVE. The request for a PNC either local
requested or remotely requested always overrule a request for a synchronized
PNC shutdown.
As long as the PNC is requested (i.e. the PNC bit representing this PNC within EIRA
equals ‘1’) and no ComMUser assigned to this PNC requests “Full Communication”,
COMM_PNC_READY_SLEEP will be the current state.
[SWS_ComM_00940] ⌈ If the PNC is released (i.e. the PNC bit representing this
PNC 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.⌋(SRS_ModeMgm_09248)
The PNC Gateway feature is used to span (logical) partial network clusters across
bus / communication channel boundaries, “gatewaying” PNC requests from one
bus/network to the others. (Therefore, for a PNC gateway to exist, it needs to be
connected to multiple physical channels.)
To do so, the PNC gateway configuration contains information for each PNC which
physical channels are required to reach all members of that PNC (PNC-to-channel-
mapping, see Figure 3).
The PNC gateway collects PNC requests from all of its multiple active channels
(which are called active since it actively keeps them awake, if required) and
aggregates them. The PNC gateway sends the aggregated PNC state in the network
to all its active channels, which causes all nodes to have the same view on the global
PNC request state as the gateway.
If the PNC gateway is not the topmost PNC gateway in the network hierarchy, the
PNC gateway will also send the aggregated PNC request state of all subordinate
nodes, plus its own internal request state, to its superior PNC coordinator, which is
connected via the so-called “passive” channel (which is called passive because it’s
the opposite of active).
The superior PNC coordinators will aggregate the subordinate coordinators’ PNC
request states, so the top level coordinator will know about all active PNC requests in
the network, and send that info to the subordinate nodes.
Subordinate PNC coordinators forward the PNC request information received on their
passive channel to their active channels to distribute the top level coordinators
holistic view of the PNC request state to all leaf nodes in the logical hierarchy, so
every node in the system is on the same page regarding the PNC request state.
A PNC coordinator must never aggregate and send back the information received via
its passive channel in order not to create an endless mirroring loop of “phantom PNC
requests”.
Figure 3: PNC-to-channel-mapping
The PNC to channel mapping is provided statically by configuration. Additionally, the
optional feature Dynamic PNC-to-channel-mapping (see chapter 7.1.5) could be
used to extend the PNC-to-channel mapping during run-time.
Note that when PNC Gateway is active and even if a PNC is only assigned to one
channel, coordination might occur when request comes in from another channel
where PNC is not assigned to. This is intended as there might be only PNC-
requestor on the other channel which is not interested in being kept awake by this
PNC.
Comment: When a Partial Network is assigned to more than one ComMChannel than
this PNC is coordinated either on all affected ComMChannels or not at all (see
AUTOSAR_TPS_SystemTemplate [constr_5094]).
Figure 4: Example for a PNC gateway with not coordinated ComMChannels (see Node2)
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 PNC bit for a PNC is equal to zero in all ERAn, no other node than
the PNC gateway is requesting the PNC.
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 is set to TRUE) ComM channels mapped to this PNC
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.
Figure 5: Example for a partial network (PN) topology that reflect the hierarchy
Figure 5 shows PNC-Coor1 as top-level PNC coordinator, PNC-Coor2 as
intermediate PNC coordinator and Node1 as PNC leaf node which resides on the
lowest level of the PN topology. For example, if Node1 requests PNC1, then the PNC
request is propagated across the PN to the top-level PNC coordinator. The top-level
PNC coordinator “takes over” the PNC request and mirrors back the PNC request to
the whole PN. If for example Node1 releases PNC1 and no other ECU in the network
has PNC1 requested, then Node1 will still receive Nm frames from the top-level PNC
coordinator where the PNC1 is requested. The release of the PNC leaf node is not
forwarded immediately across the PN topology from the PNC leaf node to the top-
level PNC coordinator. The release of a PNC is delayed by the PN reset time on
each PN topology level. If the top-level PNC coordinator detect that a PN reset timer
for a particular PNC expires, then no other ECU in the PN request this PNC. The top-
level PNC coordinator resets the PN reset timer of the released PNC once more and
transmits a so-called PN shutdown message to ensure a nearly synchronized
shutdown of the PNC, across all PN levels from the top-level PNC coordinator down
to the PNC leaf node. An intermediate PNC coordinator reacts immediately upon
reception on a PN shutdown message. Therefor the intermediate PNC coordinator
releases the indicated PNC, resets the PN reset timer once more and forwards the
PN shutdown message on all ComMChannels which are actively coordinated and
assigned to the affected PNC. Thus, all PNC state machines of the released PNC
across all PN level from the top-level PNC coordinator down to the PNC leaf nodes
reside in COMM_PNC_READY_SLEEP and reset the corresponding PN reset timer
nearly in the same point in time. This will lead to a synchronized PNC shutdown to
avoid timeouts on application level.
54 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
Please refer also to the sequence diagrams Figure 17 and Figure 18 which depict the
handling of a synchronized PNC shutdown in the role of a top-level PNC coordinator
and an intermediate PNC coordinator.
Note:
For ComMChannels which are configured for a uni-directional PNC handling
(see 7.1.6.2), no synchronized PNC shutdown is performed.
For PNCs which reference a ComMChannel via the parameter
ComMChannelPerTxOnlyPnc (see 7.1.6.3), no synchronized PNC shutdown
is performed.
Note: The network topology and communication design has to ensure a valid and
supported PN topology
This feature adds the possibility to update the PNC-to-channel-mapping of the PNC
Gateway during runtime. This update works via a request-response-based learning
process of all participating Nodes. When Partial Network learning is requested within
the Nm PDUs, all participating Nodes will respond their current PNC membership on
the corresponding channel and the PNC Gateway then updates the current PNC-to-
channel-mapping accordingly.
[SWS_ComM_01029] {DRAFT} ⌈ If
ComMDynamicPncToChannelMappingEnabled is set to TRUE and function
ComM_Nm_RepeatMessageLeftIndication has been called ComM shall set the
PNC Learning Phase to inactive for the according channel.⌋(SRS_ModeMgm_09265)
Rational: Partial network learning bit needs to be forwarded to all nodes in the
network but it needs not to be mirrored back even in the case when network topology
contains circles.
Note: Forwarding only on all active coordinated channels where the request has not
been received is sufficient as due to there is only one master gateway (see
AUTOSAR_TPS_SystemTemplate [constr_5094] the information is spread over the
whole system. The initial request is started by the application of one node in the
network with a call of ComM_PnLearningRequest (refer to [SWS_ComM_01046]).
Every participating Node has to transmit its current PNC membership during PNC
Learning phase. The PNC Gateway needs additionally also forward PNC
memberships received from other channels.
The following chapters describe the supported use cases to be considered for a
proper PNC handling of PNC gateways and none PNC gateways
Thus, ComM transmit and handle received PNC requests for a PNC on those
ComMChannels, where a particular PNC refer to the ComMChannel by using the
parameter ComMChannelPerPnc (see ECUC_ComM_00880 : ). The correctness of
received PNCs within the PNC bit vector according to the ComMChannel assignment
has to be ensured by a proper configuration of the PN filter mask per NM-channel in
the NmIf.
Note: ComM doesn’t check the correctness of the received PNC according to the
ComMChannel assignment:
For EIRA updates, ComM has no possibility to check on which ComMChannel
the PNC request was received, since the ComMChannel information is not
forwarded by the NmIf.
For ERA updates, a check could be done, but it was decided in AUTOSAR to
release ComM from this responsibility.
In both cases (PNC gateway use case and none PNC gateway) the PN filter mask of
a NM-channel have to pass all PNCs which are reference the corresponding
ComMChannels via ComMChannelPerPnc
For PNC gateways the PN filter mask of a NM-channel has to pass all PNCs which
are acceptable to be received on a ComMChannel and the PNCs do NOT refer the
ComMChannes via ComMChannelPerPnc (no PNC-channel relation exist).
Addtionally, the PNC ERA handling has to be enabled for the according NM-channel.
For received PNC requests on ComMChannel where no PNC-channel relation exit,
only the forwarding of PNC requests and no mirroring back on the receiving
ComMChannel will be performed. For received PNC requests on a ComMChannel
where a PNC-channel relation exit, the bi-directional PNC handling will be performed.
The uni-directional PNC handling for PNC gateways could be used, e.g. when a
network needs information from a certain PNC but there is no need to provide any
information back.
For none PNC gateways the PN filter mask of a NM-channel has to reject all PNCs
which are considered to be only transmitted on a ComMChannel. Received PNC
request of those ComMChannel should not be handled and therefore should not
reach ComM.
59 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
The uni-directional PNC handling for none PNC gateways could be used, e.g. when
an ECU needs to wake-up or keep-alive some functionality without being part of it.
The transmission-only-PNC handling could be used e.g. for none PNC gateways to
request only PNCs without additionally requesting the NM.
The transmission only PNC handling could be used e.g. for PNC gateways to receive
uni-directional PNC request (PNC1) on one channel (channel A) and forward the
PNC request without requesting the NM on another channel (channel B). On channel
B PNC1 is configured for bi-directional PNC handling, therefore a received PNC
request for PNC1 is forwarded to channel A by considering to request the affected
ComMChannels and the according NM.
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)
[Communication limitation disabled]
COMM_FULL_COM_NETWORK_REQUESTED COMM_FULL_COM_READY_SLEEP
ComM_DCM_ActiveDiagnostic(ChX)
Timer ComMTMinFullComModeDuration has
expired No user request
ComM_RequestComMode(<user>,
COMM_FULL_COMMUNICATION) and No
ComM_DCM_ActiveDiagnostic(ChX)
[ComMNmVariant = LIGHT | NONE]
COMM_SILENT_COMMUNICATION ComM_BusSM_BusSleepMode(ChX)
[EcuM entered RUN for the channel] [ComMNmVariant = SLAVE_ACTIVE [ComMBusType =
[CommunicationAllowed=TRUE] or SLAVE_PASSIVE] COMM_BUS_TYPE_INTERNAL]
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_PNCWakeUpIndication(PNC)or
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
PNC - PNC Id
[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. ⌋(SRS_ModeMgm_09083)
[SWS_ComM_00485] ⌈The default state for each ComM channel state machine shall
be COMM_NO_COMMUNICATION.⌋(SRS_ModeMgm_09083)
[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.
information about the internal mechanisms and rules (e.g. "highest wins" strategy) of
the ComM channel state machine.⌋()
An overview of the requested communication capabilities in the Corresponding Mode is shown in
Table 2.
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.
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).
⌋(SRS_ModeMgm_09268)
Note: The re-trigger of the <Bus>SM state machine is used to trigger a wake-up on
the network, if the used hardware is supporting such a functionality (e.g. Ethernet
hardware compliant to OA TC10 (see [33]))
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).
PNC
User
Link-Information Control
User
User
PNC
PNC-1
Channel Channel
Channel1 Channel2 managing managed
Reference ComMChannelPerPnc
Reference ComMChannelPerTxOnlyPnc
ComMManageReference
[SWS_ComM_00994] ⌈No restrictions from the configuration of the BusNm Filter for
partial networking shall apply to ComM user assignment to PNCs.⌋()
74 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
Comment: The BusNM Filter configuration shall be independent 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:
1.) The existing mapping of ComM users to system channels shall still be possible
for backward compatibility. (i.e. the configuration containers will stay
untouched)
2.) In a multi channel system each user can be assigned to one or more
channels. If the user requests a mode, all channels assigned to this user, shall
switch to the corresponding mode. All other channels shall not be affected.
Note:
1. The purpose of mode inhibition is to limit the communication capabilities. For
details see Section 7.4.1.1 and Section 7.4.1.2.
2. The following parameters are relevant to communication inhibition and have
relationship to APIs described below:
a. ComMNoCom: "request bit" of mode inhibition (limit to NoCom), can be
controlled by ComM_LimitChannelToNoComMode() and
ComM_LimitECUToNoComMode(), only if
ComMEcuGroupClassification enable this functionality (see
ECUC_ComM_00563, SWS_ComM_00163, SWS_ComM_00124).
b. ComMNoWakeup: "request bit" of mode inhibition (wakeup inhibition),
can be controlled by ComM_PreventWakeUp(), only if
ComMEcuGroupClassification enable this functionality (see
ECUC_ComM_00563, SWS_ComM_00156).
c. ComMEcuGroupClassification: "mask bits" of mode inhibition behavior,
can be controlled by ComM_SetECUGroupClassification(), regardless
of ComMNoCom and ComMNoWakeup values
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_00488] ⌈It shall be possible to enable and disable the mode inhibition
for each channel (channel state machine) independently. This functionality shall not
be used by the ComM module itself.⌋()
[SWS_ComM_00839] ⌈The ComM module shall store the status of the user
requests. ⌋()
[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).
Information: Bus wake up inhibition in context of the ComM module means that the
ComM module should take precautions against awaking other ECUs by starting the
communication.
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.⌋(SRS_ModeMgm_09071)
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.⌋(SRS_ModeMgm_09078)
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.
81 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
[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.⌋(SRS_ModeMgm_09156)
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.
Based on this foundation, the following section specifies particular errors arranged in
the respective subsections below.
[SWS_ComM_00234]⌈
Type of error Related error code Error value
[SWS_ComM_00612] ⌈If ComM is not initialized, all ComM module and 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
... ...
require provide
ComM_ChannelLimitation ComM_ChannelLimitation
Vehicle
Mode CL000
Manager ... ...
require provide
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
...
...
Figure 10: SW-C requests state changes to the Communication Manager Module
require provide
ComM_RequestMode ComM_RequestMode
UR000
SW-C
UM000
require provide
ComM_CurrentMode ComM_CurrentMode .
.
.
Com.
Manager
...
...
Figure 11: 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.
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
// full communication mode
}
else
{
// an error occurred when
// interacting with the Com Manager module
if (e == E_MODE_LIMITATION)
{
// a current ComMMode limitation forbids going into
// that mode;
// let’s ask what the maximal allowed ComMMode is
Rte_Call_comRequest_GetMaxComMode(&max);
if (max==COMM_NO_COMMUNICATION)
{
…
};
}
else
{
// a more serious error occurred …
};
};
…
};
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.
require provide
ComM_ChannelWakeup ComM_ChannelWakeup
CW000
CW001
CL001
require provide
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.3 Ports and Port Interfaces for the current mode of the
Communication Manager Module
7.10.3.4 Ports and Port Interfaces for the ComM users currently requesting
COMM_FULL_COMMUNICATION
Note: Requests which are accepted but not processed because of active
ModeLimitations will lead to an update of the data element.
A SW-C, which plays the role of a “Mode Manager”, can use this interface to change
the behaviour of the entire ECU.
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 Module’s
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.
91 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
A SW-C playing the role of a “Mode Manager” can use this interface to configure the
Communication Manager Module to inhibit communication mode for a given channel.
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 modelled as “port defined argument values” of the Provide
Ports on the Communication Manager Module side. As a consequence, these
handles do not show up as arguments in the operations of the client-server interface
ComM_ChannelLimitation. As a further consequence of this approach, the
Communication Manager Module has separate ports for each channel.
[SWS_ComM_00745]
⌈
InternalBehavior of the Communication Manager Module
{
// Runnable entities of the Communication Manager Module
RunnableEntity LimitECUToNoComMode
symbol “ComM_LimitECUToNoComMode” /* see SWS_ComM_00124*/
canbeInvokedConcurrently = FALSE
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]}
};⌋( SRS_ModeMgm_09078, SRS_ModeMgm_09080, SRS_ModeMgm_09084,
SRS_ModeMgm_09172, SRS_ModeMgm_09149, SRS_ModeMgm_09168, SRS_ModeMgm_09071,
SRS_ModeMgm_09157)
Comment:
'modeLimitation.LimitECUToNoComMode -> LimitECUToNoComMode' is
supposed to define an OperationInvokedEvent that links the OperationPrototype to
the runnable entity that is supposed to be executed.
[SWS_ComM_01020]⌈ ComM shall interact with <Bus>SM (i.e. call <Bus>SM APIs)
only in the partition, where the respective <Bus>SM module is assigned
to.⌋(SRS_BSW_00459)
[SWS_ComM_01059]⌈ ComM shall interact with Dcm (i.e. call Dcm APIs) only in the
partition, where the Dcm module is assigned to.⌋(SRS_BSW_00459)
[SWS_ComM_01021] {OBSOLETE} ⌈ The ComM shall call signal related Com APIs
(Com_SendSignal / Com_ReceiveSignal) only in the partition, where the respective
ComSignal is handled by the Com module.⌋(SRS_BSW_00459)
Hint: The partition assignment information of the ComSignals is available within Com
module configuration.
Note: Even though the basic software (and the Com-Stack in particular) is distributed
across several partitions, ComM and Nm Masters should reside in the same partition
in order to keep mode interfaces between the two modules simple (for further
information see chapter Master/Satellite-approach in [32] (Guide to BSW
Distribution)).
8 API specification
In this chapter all types included from the following modules are listed:
[SWS_ComM_00820]⌈
Module Header File Imported Type
ComStack_Types.h NetworkHandleType
ComStack_Types
ComStack_Types.h PNCHandleType
Rte_NvM_Type.h NvM_BlockIdType
NvM
Rte_NvM_Type.h NvM_RequestResultType
Std_Types.h Std_ReturnType
Std
Std_Types.h Std_VersionInfoType
⌋(SRS_BSW_00348, SRS_BSW_00357)
Note: Types from Com module are considered obsolete in R21-11 due to a concept
part, which will be validated after the release of R21-11.
[SWS_ComM_91027]{DRAFT} ⌈
COMM_E_MODE_ Function call has been successful but mode can not be
2
LIMITATION granted because of mode inhibition.
--
Description
Tags:atp.Status=draft
Available
ComM.h
via
8.2.1 ComM_InitStatusType
[SWS_ComM_00668]⌈
Name ComM_InitStatusType
Kind Enumeration
COMM_ The COM Manager is not initialized or not usable. This shall be
0x00
UNINIT the default value after reset. This status shall have the value 0.
Range
COMM_
0x01 The COM Manager is initialized and usable.
INIT
Available
ComM.h
via
⌋()
8.2.2 ComM_PncModeType
[SWS_ComM_00673]⌈
Name ComM_PncModeType
Kind Enumeration
COMM_PNC_
0x00 PNC is requested by a local ComM user
REQUESTED
COMM_PNC_READY_
0x01 PNC is requested by a remote ComM user
SLEEP
COMM_PNC_
0x02 PNC is active with no deadline monitoring
PREPARE_SLEEP
Range
COMM_PNC_NO_
0x03 PNC does not communicate
COMMUNICATION
Available
ComM.h
via
⌋()
8.2.3 ComM_StateType
[SWS_ComM_00674]⌈
Name ComM_StateType
Kind Type
Derived
uint8
from
COMM_NO_COM_NO_PENDING_REQUEST 0 --
COMM_NO_COM_REQUEST_PENDING 1 --
Range COMM_FULL_COM_NETWORK_REQUESTED 2 --
COMM_FULL_COM_READY_SLEEP 3 --
COMM_SILENT_COM 4 --
Available
ComM.h
via
⌋()
8.2.4 ComM_ConfigType
[SWS_ComM_00162]⌈
Name ComM_ConfigType
Kind Structure
implementation specific
Type --
Elements
The contents of the initialization data structure are implementation
Comment
specific
Description This type contains the implementation-specific post build configuration structure.
Available
ComM.h
via
⌋()
Note: All functions in this chapter requires previous initialization (ComM_Init), except
the following ones:
ComM_Init
ComM_GetVersionInfo
8.3.1 ComM_Init
[SWS_ComM_00146]⌈
Service Name ComM_Init
void ComM_Init (
Syntax const ComM_ConfigType* ConfigPtr
)
Sync/Async Synchronous
Parameters
None
(inout)
Initializes the AUTOSAR Communication Manager and restarts the internal state
Description
machines.
8.3.2 ComM_DeInit
[SWS_ComM_00147]⌈
Service Name ComM_DeInit
void ComM_DeInit (
Syntax void
)
Sync/Async Synchronous
⌋(SRS_BSW_00336)
8.3.3 ComM_GetStatus
[SWS_ComM_00242]⌈
Service
ComM_GetStatus
Name
Std_ReturnType ComM_GetStatus (
Syntax ComM_InitStatusType* Status
)
Service ID
0x03
[hex]
Sync/Async Synchronous
Parameters
None
(in)
Parameters
None
(inout)
Std_-
E_OK: Successfully return of initialization status
Return value Return-
E_NOT_OK: Return of initialization status failed
Type
⌋(SRS_BSW_00406)
8.3.4 ComM_GetInhibitionStatus
[SWS_ComM_00619]⌈
Service Name ComM_GetInhibitionStatus
Std_ReturnType ComM_GetInhibitionStatus (
NetworkHandleType Channel,
Syntax ComM_InhibitionStatusType* Status
)
Sync/Async Synchronous
⌋()
8.3.5 ComM_RequestComMode
[SWS_ComM_00110]⌈
Service
ComM_RequestComMode
Name
Std_ReturnType ComM_RequestComMode (
ComM_UserHandleType User,
Syntax ComM_ModeType ComMode
)
Service ID
0x05
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
⌋(SRS_ModeMgm_09081)
103 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
8.3.6 ComM_GetMaxComMode
[SWS_ComM_00085]⌈
Service Name ComM_GetMaxComMode
Std_ReturnType ComM_GetMaxComMode (
ComM_UserHandleType User,
Syntax
ComM_ModeType* ComMode
)
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
⌋()
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).⌋(SRS_ModeMgm_09149)
8.3.7 ComM_GetRequestedComMode
[SWS_ComM_00079]⌈
Service Name ComM_GetRequestedComMode
Std_ReturnType ComM_GetRequestedComMode (
ComM_UserHandleType User,
Syntax
ComM_ModeType* ComMode
)
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
None
(inout)
⌋(SRS_ModeMgm_09149)
8.3.8 ComM_GetCurrentComMode
[SWS_ComM_00083]⌈
Service
ComM_GetCurrentComMode
Name
Std_ReturnType ComM_GetCurrentComMode (
ComM_UserHandleType User,
Syntax
ComM_ModeType* ComMode
)
Service ID
0x08
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
User Handle of the user who requests a mode
(in)
Parameters
None
(inout)
Parameters
ComMode See ComM_ModeType
(out)
Function to query the current Communication Mode. ComM shall use the
corresponding interfaces of the Bus State Managers to get the current
Description
Communication Mode of the network. (Call to Bus State Manager API: XXXSM _Get
CurrentComMode(...))
⌋(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.9 ComM_GetCurrentPNCComMode
[SWS_ComM_91002]⌈
Service Name ComM_GetCurrentPNCComMode
Std_ReturnType ComM_GetCurrentPNCComMode (
ComM_UserHandleType User,
Syntax
ComM_ModeType* ComMode
)
Service ID
0x6a
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
User Handle of the user who requests a mode
(in)
Parameters
None
(inout)
Parameters
ComMode See ComM_ModeType
(out)
The function returns the current Communication Mode of the corresponding PNC
Description
the affected user is assigned to.
⌋()
[SWS_ComM_01022] ⌈If more than one PNC is assigned to the affected user, the
function ComM_GetCurrentPNCComMode shall return
COMM_E_MULTIPLE_PNC_ASSIGNED as ComMode. ⌋(SRS_ModeMgm_09149)
8.3.10 ComM_GetPncToChannelMapping
[SWS_ComM_91013]{DRAFT} ⌈
Service Name ComM_GetPncToChannelMapping (draft)
Std_ReturnType ComM_GetPncToChannelMapping (
boolean* MappingTable,
Syntax uint8* ChannelCnt,
uint8* PncCnt
)
Service ID
0x68
[hex]
Sync/Async Synchronous
Parameters
None
(in)
Parameters
None
(inout)
⌋(SRS_ModeMgm_09259)
[SWS_ComM_01036] {DRAFT} ⌈ If
ComMDynamicPncToChannelMappingEnabled is set to TRUE on at least one
channel and when PNC learning phase is not active, then the function
ComM_GetPncMappingTable shall provide within MappingTable the current PNC-
to-channel mapping as a two-dimensional array where on first dimension all ComM
channels where ComMPncGatewayType is set are handled according to their derived
order in ComM and on second dimension all configured ComMPnc according to their
order given by their ComMPncId. ComM shall also set the parameter ChannelCnt
and PncCnt accordingly and return with E_OK. ⌋(SRS_ModeMgm_09259)
8.3.11 ComM_UpdatePncToChannelMapping
[SWS_ComM_91015]{DRAFT} ⌈
Service
ComM_UpdatePncToChannelMapping (draft)
Name
Std_ReturnType ComM_UpdatePncToChannelMapping (
const boolean* MappingTable,
Syntax uint8 channelCnt,
uint8 PncCnt
)
Service ID
0x62
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
This function can be used to set entries within the the ECUs PNC-to-channel-
Description mapping
Tags: atp.Status=draft
⌋(SRS_ModeMgm_09259)
8.3.12 ComM_ResetPncToChannelMapping
[SWS_ComM_91017]{DRAFT} ⌈
Service Name ComM_ResetPncToChannelMapping (draft)
Std_ReturnType ComM_ResetPncToChannelMapping (
Syntax void
)
Service ID
0x63
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
⌋(SRS_ModeMgm_09259)
8.3.13 ComM_PnLearningRequest
[SWS_ComM_91019]{DRAFT} ⌈
Service
ComM_PnLearningRequest (draft)
Name
Std_ReturnType ComM_PnLearningRequest (
Syntax void
)
Service ID
0x64
[hex]
Sync/Async Asynchronous
Parameters
None
(in)
Parameters
None
(inout)
Parameters
None
(out)
Triggers the NM to return into NM Repeat Message State and send the Partial
Network Learning Bit (in order for receiving nodes to respond) together with the
Repeat Message Request Bit (in order for receiving nodes to return into NM Repeat
Description
Message State). This function is used for the optional Dynamic PNC-to-channel-
mapping feature.
Tags: atp.Status=draft
⌋(SRS_ModeMgm_09260)
[SWS_ComM_01045] {DRAFT} ⌈ If
ComMDynamicPncToChannelMappingSupport is set to TRUE on at least one
channel and when PNC learning phase is active, then the function
ComM_PnLearningRequest shall return with
COMM_E_LEARNING_ACTIVE.⌋(SRS_ModeMgm_09260)
[SWS_ComM_01046] {DRAFT} ⌈ If
ComMDynamicPncToChannelMappingSupport is set to TRUE on at least one
channel and when the PNC learning phase is not active, then the function
ComM_PnLearningRequest shall call the API Nm_PnLearningRequest on all
channels where ComMDynamicPncToChannelMappingEnabled is set to TRUE
and return with E_OK.⌋(SRS_ModeMgm_09260)
8.3.14 ComM_UpdatePncMembership
[SWS_ComM_91021]{DRAFT} ⌈
Service
ComM_UpdatePncMembership (draft)
Name
Std_ReturnType ComM_UpdatePncMembership (
boolean Control,
Syntax const uint8* PncMembership
)
Service ID
0x65
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
This function is used by SWCs to update the PNC membership which is transmitted
during PNC Learning. This function is used for the optional Dynamic PNC-to-
Description channel-mapping feature. This function is used for the optional Dynamic PNC-to-
channel-mapping feature.
Tags: atp.Status=draft
⌋(SRS_ModeMgm_09263)
[SWS_ComM_01048] {DRAFT} ⌈ If
ComMDynamicPncToChannelMappingSupport is set to TRUE on at least on
channel and when PNC learning phase is active, then the function
ComM_UpdatePncMembership shall return with
COMM_E_LEARNING_ACTIVE.⌋(SRS_ModeMgm_09260)
[SWS_ComM_01049] {DRAFT} ⌈ If
ComMDynamicPncToChannelMappingEnabled is set to TRUE on at least on
channel and PNC Learning phase is not active, then the function
ComM_UpdatePncMembership shall perform the following actions:
When Control = 0, then the current PNC membership shall be applied with
logical AND (conjunction) operation on the parameter PncMembership (This
would only unset the bits out of the PncBitMask)
When Control = 1, then the current PNC membership shall be applied with
logical OR (disjunction) operation on the parameter PncMembership (This
would only set the bits out of the PncBitMask)
Return with E_OK.
⌋(SRS_ModeMgm_09260)
8.3.15 ComM_PreventWakeUp
[SWS_ComM_00156]⌈
Service Name ComM_PreventWakeUp
Std_ReturnType ComM_PreventWakeUp (
NetworkHandleType Channel,
Syntax boolean Status
)
Service ID
0x09
[hex]
Sync/Async Synchronous
114 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
Parameters
None
(inout)
Parameters
None
(out)
Description Changes the inhibition status COMM_NO_WAKEUP for the corresponding channel.
⌋(SRS_ModeMgm_09157)
8.3.16 ComM_LimitChannelToNoComMode
[SWS_ComM_00163]⌈
Service
ComM_LimitChannelToNoComMode
Name
Std_ReturnType ComM_LimitChannelToNoComMode (
NetworkHandleType Channel,
Syntax
boolean Status
)
Service ID
0x0b
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
Changes the inhibition status for the channel for changing from COMM_NO_
Description COMMUNICATION to a higher Communication Mode. (See also ComM_Limit
ECUToNoComMode, same functionality but for all channels)
⌋(SRS_ModeMgm_09157)
8.3.17 ComM_LimitECUToNoComMode
[SWS_ComM_00124]⌈
Service
ComM_LimitECUToNoComMode
Name
Std_ReturnType ComM_LimitECUToNoComMode (
Syntax boolean Status
)
Service ID
0x0c
[hex]
Sync/Async Synchronous
Parameters
None
(inout)
Parameters
None
(out)
Changes the inhibition status for the ECU (=all channels) for changing from COMM_
Description NO_COMMUNICATION to a higher Communication Mode. (See also ComM_Limit
ChannelToNoComMode, same functionality but for a specific channels)
⌋(SRS_ModeMgm_09157)
8.3.18 ComM_ReadInhibitCounter
[SWS_ComM_00224]⌈
Service Name ComM_ReadInhibitCounter
Std_ReturnType ComM_ReadInhibitCounter (
Syntax uint16* CounterValue
)
Sync/Async Synchronous
Parameters
None
(inout)
⌋(SRS_ModeMgm_09156)
8.3.19 ComM_ResetInhibitCounter
[SWS_ComM_00108]⌈
Service Name ComM_ResetInhibitCounter
Std_ReturnType ComM_ResetInhibitCounter (
Syntax void
)
Sync/Async Synchronous
Parameters
None
(inout)
⌋(SRS_ModeMgm_09156)
8.3.20 ComM_SetECUGroupClassification
[SWS_ComM_00552]⌈
Service Name ComM_SetECUGroupClassification
Std_ReturnType ComM_SetECUGroupClassification (
Syntax ComM_InhibitionStatusType Status
)
Sync/Async Synchronous
Parameters
None
(inout)
failed
Description Changes the ECU Group Classification status (see chapter 10.2.2)
⌋()
8.3.21 ComM_GetVersionInfo
[SWS_ComM_00370]⌈
Service Name ComM_GetVersionInfo
void ComM_GetVersionInfo (
Syntax Std_VersionInfoType* Versioninfo
)
Sync/Async Synchronous
Reentrancy Reentrant
⌋(SRS_BSW_00407)
Note: All functions in this chapter requires that the ComM module is initialized
correctly.
8.4.1.1 ComM_Nm_NetworkStartIndication
[SWS_ComM_00383]⌈
Service Name ComM_Nm_NetworkStartIndication
void ComM_Nm_NetworkStartIndication (
Syntax NetworkHandleType Channel
)
Service ID
0x15
[hex]
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters
Channel See NetworkHandleType
(in)
Parameters
None
(inout)
Parameters
None
(out)
Indication that a NM-message has been received in the Bus Sleep Mode, what
Description
indicates that some nodes in the network have already entered the Network Mode.
⌋()
8.4.1.2 ComM_Nm_NetworkMode
[SWS_ComM_00390]⌈
Service Name ComM_Nm_NetworkMode
void ComM_Nm_NetworkMode (
Syntax NetworkHandleType Channel
)
Sync/Async Asynchronous
Reentrancy Reentrant
Description Notification that the network management has entered Network Mode.
⌋()
8.4.1.3 ComM_Nm_PrepareBusSleepMode
[SWS_ComM_00391]⌈
Service Name ComM_Nm_PrepareBusSleepMode
void ComM_Nm_PrepareBusSleepMode (
Syntax NetworkHandleType Channel
)
Service ID
0x19
[hex]
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters
Channel Channel
(in)
Parameters
None
(inout)
Parameters
None
(out)
Notification that the network management has entered Prepare Bus-Sleep Mode.
Description
Reentrancy: Reentrant (but not for the same NM-Channel)
⌋()
8.4.1.4 ComM_Nm_BusSleepMode
[SWS_ComM_00392]⌈
Service Name ComM_Nm_BusSleepMode
void ComM_Nm_BusSleepMode (
Syntax NetworkHandleType Channel
)
Service ID
0x1a
[hex]
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters
Channel Channel
(in)
Parameters
None
(inout)
Parameters
None
(out)
Notification that the network management has entered Bus-Sleep Mode. This
Description callback function should perform a transition of the hardware and transceiver to
bus-sleep mode.
⌋()
8.4.1.5 ComM_Nm_RestartIndication
[SWS_ComM_00792]⌈
Service
ComM_Nm_RestartIndication
Name
void ComM_Nm_RestartIndication (
Syntax NetworkHandleType Channel
)
Service ID
0x1b
[hex]
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters
Channel Channel
(in)
Parameters
None
(inout)
Parameters
None
(out)
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
Description busses NM is restarted, THEN the NM Interface shall call the callback function Com
M_Nm_RestartIndication with the nmNetworkHandle of the channels which have
already indicated bus sleep state.
⌋()
8.4.1.6 ComM_Nm_RepeatMessageLeftIndication
[SWS_ComM_91024]{DRAFT} ⌈
Service Name ComM_Nm_RepeatMessageLeftIndication (draft)
void ComM_Nm_RepeatMessageLeftIndication (
Syntax NetworkHandleType Channel
)
Service ID
0x66
[hex]
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters
Channel See NetworkHandleType
(in)
Parameters
None
(inout)
Parameters
None
(out)
Notification that the state of all <BusNm> has left RepeatMessage. This interface is
used to indicate by the optional Dynamic PNC-to-channel-mapping feature to
Description
indicate that learning phase ends.
Tags: atp.Status=draft
⌋(SRS_ModeMgm_09265)
8.4.1.7 ComM_Nm_PncLearningBitIndication
[SWS_ComM_91026]{DRAFT} ⌈
Service Name ComM_Nm_PncLearningBitIndication (draft)
void ComM_Nm_PncLearningBitIndication (
Syntax NetworkHandleType Channel
)
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters
None
(inout)
Service to indicate that an NM message with set PNC Learning Bit has been
Description received.
Tags: atp.Status=draft
⌋(SRS_ModeMgm_09261)
8.4.1.8 ComM_Nm_ForwardSynchronizedPncShutdown
[SWS_ComM_91003]{OBSOLETE} ⌈
Service
ComM_Nm_ForwardSynchronizedPncShutdown (obsolete)
Name
void ComM_Nm_ForwardSynchronizedPncShutdown (
Syntax NetworkHandleType Channel
)
Service ID
0x6b
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
Channel Channel
(in)
Parameters
None
(inout)
Parameters
None
(out)
Tags: atp.Status=obsolete
⌋(SRS_ModeMgm_09269)
[SWS_ComM_91030]{DRAFT} ⌈
Service
ComM_Nm_ForwardSynchronizedPncShutdown (draft)
Name
void ComM_Nm_ForwardSynchronizedPncShutdown (
NetworkHandleType Channel,
Syntax
const uint8* PncBitVectorPtr
)
Service ID
0x6b
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Channel Channel
Parameters
(in) PncBitVector Pointer to PNC Bit vector with all PNC bits set to "1" which are
Ptr indicated for a synchronized PNC shutdown
Parameters
None
(inout)
Parameters
None
(out)
⌋(SRS_ModeMgm_09269)
8.4.1.9 ComM_Nm_UpdateEIRA
[SWS_ComM_91028]{DRAFT} ⌈
Service Name ComM_Nm_UpdateEIRA (draft)
void ComM_Nm_UpdateEIRA (
Syntax const uint8* PncBitVectorPtr
Service ID
0x6c
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
PncBit Pointer to the PNC bit vector which contain the current aggregated
Parameters (in)
VectorPtr internal and external PNC requests (EIRA)
Parameters
None
(inout)
Parameters
None
(out)
Function to indicate the current aggregated external / internal PNC request called
Description by Nm.
Tags: atp.Status=draft
⌋(SRS_ModeMgm_09248, SRS_ModeMgm_09250)
8.4.1.10 ComM_Nm_UpdateERA
[SWS_ComM_91029]{DRAFT} ⌈
Service Name ComM_Nm_UpdateERA (draft)
void ComM_Nm_UpdateERA (
NetworkHandleType Channel,
Syntax
const uint8* PncBitVectorPtr
)
Sync/Async Synchronous
Reentrancy Reentrant
Channel Channel
Parameters (in)
PncBitVector PNC bit vector which contain the current external PNC requests
Ptr (ERA) received on the given channel
Parameters
None
(inout)
Parameters
None
(out)
Function to indicate the current external PNC request per channel called by Nm.
Description
Tags: atp.Status=draft
⌋(SRS_ModeMgm_09248, SRS_ModeMgm_09250)
8.4.2.1 ComM_DCM_ActiveDiagnostic
[SWS_ComM_00873]⌈
Service Name ComM_DCM_ActiveDiagnostic
void ComM_DCM_ActiveDiagnostic (
Syntax NetworkHandleType Channel
)
Sync/Async Synchronous
Reentrancy Reentrant
⌋()
8.4.2.2 ComM_DCM_InactiveDiagnostic
[SWS_ComM_00874]⌈
Service Name ComM_DCM_InactiveDiagnostic
void ComM_DCM_InactiveDiagnostic (
Syntax NetworkHandleType Channel
)
Sync/Async Synchronous
Reentrancy Reentrant
⌋()
8.4.3.1 ComM_EcuM_WakeUpIndication
[SWS_ComM_00275]⌈
Service Name ComM_EcuM_WakeUpIndication
void ComM_EcuM_WakeUpIndication (
Syntax NetworkHandleType Channel
)
Sync/Async Synchronous
Reentrancy Reentrant
⌋()
8.4.3.2 ComM_EcuM_PNCWakeUpIndication
[SWS_ComM_91001]⌈
Service Name ComM_EcuM_PNCWakeUpIndication
void ComM_EcuM_PNCWakeUpIndication (
Syntax PNCHandleType PNCid
)
Sync/Async Synchronous
Reentrancy Reentrant
⌋()
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
void ComM_CommunicationAllowed (
NetworkHandleType Channel,
Syntax
boolean Allowed
)
Sync/Async Asynchronous
Channel Channel
Parameters (in)
TRUE: Communication is allowed FALSE: Communication is not
Allowed
allowed
Parameters
None
(inout)
⌋()
8.4.5.1 ComM_BusSM_ModeIndication
[SWS_ComM_00675]⌈
Service Name ComM_BusSM_ModeIndication
void ComM_BusSM_ModeIndication (
Syntax NetworkHandleType Channel,
129 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
ComM_ModeType ComMode
)
Service ID
0x33
[hex]
Sync/Async Asynchronous
Reentrancy Reentrant
Parameters
None
(inout)
Parameters
None
(out)
Indication of the actual bus mode by the corresponding Bus State Manager. ComM
Description
shall propagate the indicated state to the users with means of the RTE and BswM.
⌋()
8.4.5.2 ComM_BusSM_BusSleepMode
[SWS_ComM_91000]⌈
Service
ComM_BusSM_BusSleepMode
Name
void ComM_BusSM_BusSleepMode (
Syntax NetworkHandleType Channel
)
Service ID
0x34
[hex]
Sync/Async Synchronous
Reentrancy Reentrant
Parameters
Channel Identification of the channel
(in)
Parameters
None
(inout)
Parameters
None
(out)
Notification of the corresponding Bus State Manager that the actual bus mode is
Description Bus-Sleep.
Only applicable for ComM channels with ComMNmVariant set to SLAVE_ACTIVE or
SLAVE_PASSIVE.
E.g. LIN slaves (ComMNMVariant = SLAVE_ACTIVE) or Ethernet channels with OA
TC10 compliant Ethernet hardware which act as passive communication slave (Com
MNMVariant = SLAVE_PASSIVE and EthTrcvActAsSlavePassiveEnabled set to
TRUE)
⌋()
[SWS_ComM_00819]{OBSOLETE} ⌈
Service
ComM_COMCbk_<sn> (obsolete)
Name
void ComM_COMCbk_<sn> (
Syntax void
)
Service ID
0x36
[hex]
Sync/Async Synchronous
Parameters
None
(in)
Parameters
None
(inout)
Parameters
None
(out)
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
Description next call to ComM_MainFunction_<ComMChannel.ShortName> with changing the
corresponding PN State machine.
Tags: atp.Status=obsolete
⌋()
8.5.1 ComM_MainFunction
[SWS_ComM_00429]⌈
Service
ComM_MainFunction_<ComMChannel.ShortName>
Name
void ComM_MainFunction_<ComMChannel.ShortName> (
Syntax void
)
Service ID
0x60
[hex]
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
Description
Main Function for each channel of ComM.
Precondition: ComM shall be initialized
⌋(SRS_BSW_00373)
This chapter defines all interfaces which are required to fulfil the core functionality of
the module.
[SWS_ComM_00828] ⌈
API function Header File 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
[SWS_ComM_00266] ⌈The ComM module shall use the corresponding functions provided by DCM
(see SWS_ComM_00828) to control the communication capabilities of the DCM module.⌋()
Comment: DCM provides no functions to start/stop transmission and reception. DCM ensures to
control communication according the indicated Communication Manager Module states.
8.6.1.5 AUTOSAR RTE interface provided by RTE to ComM for the SW-C
[SWS_ComM_00091] ⌈The ComM module shall use the corresponding function provided by RTE to
indicate modes to the users. There shall be one indication per user. Fan-out in case of a
mode indication related to more than one user shall be done by the Communication
Manager Module.⌋(SRS_ModeMgm_09085)
[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.⌋(SRS_ModeMgm_09085)
[SWS_ComM_00662] ⌈The sequence of users shall start with user 0 up to user N and the name of the
mode ports shall be UM000, UM001, ... UM<N>.⌋(SRS_ModeMgm_09090)
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.
[SWS_ComM_00778] ⌈The ComM module shall explicitly indicate changes in modes to each
individual user, to which a SW-C is connected. The ComM module shall do this by calling
the right API on the RTE through the ports “UMnnn”.⌋(SRS_ModeMgm_09085)
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();
To signal that a user n is in a new mode, the Communication Manager Module should:
userModePorts[n].Switch_currentMode(newMode)
For details refer to the AUTOSAR RTE specification [8] and AUTOSAR Services Mode Management
specification [21].
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]⌈
Header
API Function Description
File
BswM_ComM_- BswM_ Function is called by ComM to indicate the current mode of the
CurrentPNCMode ComM.h PNC.
BswM_ComM_- BswM_
Function is called by ComM to signal a shutdown.
InitiateReset ComM.h
Set Repeat Message Request Bit and Partial Network Learning Bit
for NM messages transmitted next on the bus. For that purpose
<BusNm>_PnLearningRequest shall be called (e.g. CanNm_Pn
Nm_PnLearning- LearningRequest function if channel is configured as CAN). This will
Nm.h
Request (draft) force all nodes to enter the PNC Learning Phase and re-enter
Repeat Message Stat. This is needed for the optional Dynamic
PNC-to-channel-mapping feature.
Tags: atp.Status=draft
⌋()
Note: Optional interfaces from Com module are considered obsolete in R21-11 due
to a concept part, which will be validated after the release of R21-11.
None.
8.7.1 Sender-Receiver-interfaces
8.7.1.1 ComM_CurrentChannelRequest
[SWS_ComM_00904]⌈
Name ComM_CurrentChannelRequest_{channel_name}
Comment Array of ComMUserIdentifier, that currently hold FULL_COM requests for this channel.
136 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
IsService true
{ecuc(ComM/ComMConfigSet/ComMChannel/ComMFullCommRequestNotification
Variation Enabled)} == true
channel_name = {ecuc(ComM/ComMConfigSet/ComMChannel.SHORT-NAME)}
fullComRequestors
⌋()
8.7.1.2 ComM_UpdatePncMembership
[SWS_ComM_91100]{OBSOLETE} ⌈
Name ComM_UpdatePncMembership (obsolete)
Clear (Control = FALSE) or Add (Control = TRUE) values of the PNC Membership
Comment
Tags: atp.Status=obsolete
IsService true
{ecuc(ComM/ComMGeneral/ComMDynamicPncToChannelMappingSupport)} ==
Variation
true
Control
Type boolean
Variation --
Data
Elements
PncMemberShip
Type ComM_PncMembershipType
Variation --
⌋(SRS_ModeMgm_09263)
8.7.1.3 ComM_PnLearningRequest
[SWS_ComM_91101]{OBSOLETE} ⌈
Name ComM_PnLearningRequest (obsolete)
--
Comment
Tags: atp.Status=obsolete
IsService true
{ecuc(ComM/ComMGeneral/ComMDynamicPncToChannelMappingSupport)} ==
Variation
true
NetworkHandle
Data
Elements
Type NetworkHandleType
Variation --
⌋(SRS_ModeMgm_09260)
8.7.2 Client-Server-interfaces
8.7.2.1 ComM_ChannelLimitation
[SWS_ComM_00743]⌈
Name ComM_ChannelLimitation
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
Operation GetInhibitionStatus
Variation --
Status
Type ComM_InhibitionStatusType
Comment --
Variation --
E_OK
Possible Errors
E_NOT_OK
Operation LimitChannelToNoComMode
Changes the inhibition status for the channel for changing from COMM_NO_
Comment COMMUNICATION to a higher Communication Mode.
(See also ComM_LimitECUToNoComMode, same functionality but for all channels)
Variation --
Status
Direction IN
Variation --
Possible E_OK
Errors E_NOT_OK
⌋()
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
Operation GetInhibitionStatus
Variation --
Status
Type ComM_InhibitionStatusType
Comment --
Variation --
E_OK
Possible Errors
E_NOT_OK
Operation PreventWakeUp
Variation --
Status
Parameters
Type boolean
Direction IN
Comment --
Variation --
Possible E_OK
Errors E_NOT_OK
⌋()
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
Operation LimitECUToNoComMode
Changes the inhibition status for the ECU (=all channels) for changing from COMM_
NO_COMMUNICATION to a higher Communication Mode.
Comment
(See also ComM_LimitChannelToNoComMode, same functionality but for a specific
channels)
Variation --
Status
Type boolean
Direction IN
Parameters
FALSE: Limit ECU to COMM_NO_COMMUNICATION disabled
Comment
TRUE: Limit ECU to COMM_NO_COMMUNICATION enabled
Variation --
Possible E_OK
Errors E_NOT_OK
Operation ReadInhibitCounter
Comment returns the value of the 'inhibited full communication request counter'
Parameters CounterValue
Type uint16
Direction OUT
Comment --
Variation --
E_OK
Possible Errors
E_NOT_OK
Operation ResetInhibitCounter
E_OK
Possible Errors
E_NOT_OK
Operation SetECUGroupClassification
Variation --
Status
Type ComM_InhibitionStatusType
Parameters Direction IN
Comment --
Variation --
E_OK
Possible Errors
E_NOT_OK
⌋()
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.
Through this interface, the SW-C could either set the desired state of all communication
Comment
channels (if the user is mapped to one or more channels) or of all PNCs (if the user is
mapped to one or more PNCs) that are relevant for that component to "No
Communication" or "Full Communication".
IsService true
Variation --
Operation GetCurrentComMode
Returns the current Communication Manager Module mode for the SW-C-Return the
current Communication Manager Modul channel mode to the SW-C. Please note: the
Comment
channel mode is returned. Even though the affected user is assigned to a PNC. (see
ComM_GetCurrentComMode)
Variation --
ComMode
Type ComM_ModeType
Comment --
Variation --
Possible E_OK
Errors E_NOT_OK
Operation GetCurrentPNCComMode
Return the current Communication Manager Modul PNC mode to the SW-C. Please
note: the PNC mode is returned as ComM_ModeType (COMM_NO_
COMMUNICATION == COMM_PNC_NO_COMMUNICATIO, COMM_FULL_
Comment COMMUNICATION == COMM_PNC_FULL_COMMUNICATION). If the affected Com
M user is mapped to multiple PNCs than the operation shall return E_MULTIPLE_
PNC_ASSIGNED. If the affected ComM user is mapped to no PNC than the operation
shall return E_NO_PNC_ASSIGNED.
Variation --
ComMode
Type ComM_ModeType
Comment --
Variation --
E_OK
Possible
E_NOT_OK
Errors
E_MULTIPLE_PNC_ASSIGNED
E_NO_PNC_ASSIGNED
Operation GetMaxComMode
Comment Returns the current Communication Manager Module mode for the SW-C
Variation --
ComMode
Type ComM_ModeType
Comment --
Variation --
E_OK
Possible Errors
E_NOT_OK
Operation GetRequestedComMode
Comment Returns that last Communication Manager Module Mode requested by the SW-C
Variation --
ComMode
Type ComM_ModeType
Comment --
Variation --
E_OK
Possible Errors
E_NOT_OK
Operation RequestComMode
The SW-C requests that all communication channels it needs are in the provided
Comment
Communication Manager Module mode
Variation --
ComMode
Type ComM_ModeType
Parameters Direction IN
Comment --
Variation --
E_OK
Possible
E_NOT_OK
Errors
E_MODE_LIMITATION
⌋()
8.7.2.5 ComM_PncToChannelMapping
[SWS_ComM_91102]⌈
Name ComM_PncToChannelMapping
IsService true
{ecuc(ComM/ComMGeneral/ComMDynamicPncToChannelMappingSupport)} ==
Variation
true
Operation GetPncToChannelMapping
Variation --
MappingTable
Type boolean*
Direction OUT
Variation --
ChannelCnt
Parameters
Type uint8
Direction OUT
Comment --
Variation --
PncCnt
Type uint8
Direction OUT
144 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
Comment --
Variation --
E_OK
Possible
E_NOT_OK
Errors
E_LEARNING_ACTIVE
Operation ResetPncToChannelMapping
Variation --
E_OK
Possible Errors E_NOT_OK
E_LEARNING_ACTIVE
Operation UpdatePncToChannelMapping
Variation --
MappingTable
Direction IN
Variation --
channelCnt
Type uint8
Parameters
Direction IN
Comment --
Variation --
PncCnt
Type uint8
Direction IN
Comment --
Variation --
E_OK
Possible
E_NOT_OK
Errors
E_LEARNING_ACTIVE
⌋(SRS_ModeMgm_09259)
8.7.2.6 ComM_DynamicPncToChannelMapping
[SWS_ComM_91108]⌈
Name ComM_DynamicPncToChannelMapping
A SW-C can use this interface in order to update during runtime the PNC membership
Comment and trigger a learning request by sending NM messages with Partial Network Learning
and Repeat Message Request bits set.
IsService true
Operation ComM_PnLearningRequest
Variation --
E_OK
Possible Errors E_NOT_OK
E_LEARNING_ACTIVE
Operation ComM_UpdatePncMembership
Used by SWCs to update the PNC membership which is transmitted during PNC
Comment
Learning
Variation --
Control
Type boolean
Direction IN
Parameters Comment --
Variation --
PncMembership
Direction IN
Array of uint8 with <PNC Vector Length> Elements that holds the
Comment
current PNC Membership of the node.
Variation --
E_OK
Possible
E_NOT_OK
Errors
E_LEARNING_ACTIVE
⌋()
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 --
Mode
currentMode ComMMode
Group
⌋()
8.7.4.1 ComM_InhibitionStatusType
[SWS_ComM_00669]⌈
Name ComM_InhibitionStatusType
Kind Bitfield
Derived
uint8
from
WakeupInhibition
bit 0x01 Bit 0 (LSB): Wake Up inhibition active
Elements Active
Variation --
Available
Rte_ComM_Type.h
via
⌋()
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 --
Available
Rte_ComM_Type.h
via
⌋()
8.7.4.3 ComM_UserHandleType
[SWS_ComM_00670]⌈
Name ComM_UserHandleType
Kind Type
Derived
uint8
from
Handle to identify a user. For each user, a unique value must be defined at system
generation time. Maximum number of users is 255. Legal user IDs are in the range 0 ..
Description
254; user ID 255 is reserved and shall have the symbolic representation COMM_
NOT_USED_USER_ID.
148 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
Variation --
Available
Rte_ComM_Type.h
via
⌋()
8.7.4.4 ComM_UserHandleArrayType
[SWS_ComM_00906]⌈
Name ComM_UserHandleArrayType_{channel_name}
Kind Structure
numberOfRequesters
Type uint8
Comment --
handleArray
Elements
Type ComM_UserHandleSubArrayType_{channel_name}
Comment --
channel_name = {ecuc(ComM/ComMConfigSet/Com
Variation
MChannel.SHORT-NAME)}
numberOfRequesters contains the number of valid user handle entries in the "handle
Description Array" member. If no user keeps the channel requested, this is zero {LOWER-
LIMIT=0, UPPER-LIMIT= MAX_CHANNEL_REQUESTER }
Available
Rte_ComM_Type.h
via
⌋()
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
Description requested (if any), starting in its first entries. The size of the array MAX_CHANNEL_
REQUESTERS is the maximum of the number of users requesting a channel.
Available
Rte_ComM_Type.h
via
⌋()
149 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
8.7.4.6 ComM_PncMemberShipType
[SWS_ComM_91103]{OBSOLETE} ⌈
Name ComM_PncMembershipType (obsolete)
Array of uint8 with <PNC Vector Length> Elements that holds the current PNC
Description Membership of the node.
Tags: atp.Status=obsolete
Available
Rte_ComM_Type.h
via
⌋()
8.7.5 Ports
8.7.5.1 ComM_CL
[SWS_ComM_01006]⌈
Name CL_{channel_name}
Provided
Kind Interface ComM_ChannelLimitation
Port
Description --
Type NetworkHandleType
Port Defined Argument
Value(s) {ecuc(ComM/ComMConfigSet/ComMChannel/Com
Value
MChannelId.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/ComMFullCommRequestNotification
Variation Enabled)} == true
channel_name = {ecuc(ComM/ComMConfigSet/ComMChannel.SHORT-NAME)}
⌋()
8.7.5.3 ComM_CW
[SWS_ComM_01008]⌈
Name CW_{channel_name}
Provided
Kind Interface ComM_ChannelWakeup
Port
Description --
Type NetworkHandleType
Port Defined Argument
Value(s) {ecuc(ComM/ComMConfigSet/ComMChannel/Com
Value
MChannelId.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}
Provided
Kind Interface ComM_UserRequest
Port
Description --
Type ComM_UserHandleType
Port Defined Argument
Value(s) ecuc(ComM/ComMConfigSet/ComMUser/ComMUser
Value
Identifier.value)}
user_name = {ecuc(ComM/ComMConfigSet/ComMUser.SHORT-
Variation
NAME)}
⌋()
8.7.5.7 ComM_UpdatePncMembership
[SWS_ComM_91105]{OBSOLETE} ⌈
Name UpdatePncMembership (obsolete)
--
Description
Tags: atp.Status=obsolete
⌋(SRS_ModeMgm_09259)
8.7.5.8 ComM_PnLearningRequest
[SWS_ComM_91106]{OBSOLETE} ⌈
Name PnLearningRequest (obsolete)
--
Description
Tags: atp.Status=obsolete
⌋(SRS_ModeMgm_09260)
8.7.5.9 ComM_PncToChannelMapping
[SWS_ComM_91107]⌈
Name PncToChannelMapping
Description --
⌋(SRS_ModeMgm_09259)
8.7.5.10 ComM_DynamicPncToChannelMapping
[SWS_ComM_91109]⌈
Name ComM_DynamicPncToChannelMapping
Description --
⌋()
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
[Active startup] Std_ReturnType:=Nm_NetworkRequest(NetworkHandle)
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 14: 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)
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.
Comments: - none -
Figure 15 shows the possibilities to shutdown the CAN network. It can be either
initiated if the last user releases his COMM_FULL_COMMUNICATION request or
156 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
[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)
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.
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)
Network Mode
Normal Operation
ComM_MainFunction<Channel>()
PNC statemachine()
COMM_PNC_REQUESTED
Nm_RequestSynchronizedPncShutdown
(NetworkHandleType, PNCHandleType)
<Bus>Nm_RequestSynchronizedPncShutdown(NetworkHandleType, PNCHandleType)
COMM_PNC_READY_SLEEP
<Bus>Nm_Mainfuntion()
[All pending requests for synchronized PNC shutdown completed and request to transmit a cycle NM-PDU is available]
- Reset the according EIRA PN reset timer of the PNCs set to 1 in the NM-PDU
<Bus>_TxConfirmation(PduIdType, Std_ReturnType)
[result == E_OK]
- consider request for synchronized PNC shutdown or request for cyclic NM message
as completed.
-- If transmission of a PN shutdown message was confirmed, remove the affected PNCs
from the list of pending request for a synchronized PNC shutdown
[result == E_NOT_OK]
- Keep the request for synchronized PNC shutdown or cyclic NM message as pending.
- No further transmission requests are performed until the tx confirmation is indicated
with E_OK.
Figure 17: Request for a synchronized PNC shutdown in the role of a top-level PNC coordinator
(TLPC)
Figure 18 shows the request to forward a received synchronized PNC shutdown if an
ECU in role of an intermediate PNC coordinator receives a PN shutdown message.
Network Mode
Normal Operation
<Bus>_RxIndication()
Nm_ForwardSynchronizedPncShutdown(NetworkHandleType)
ComM_Nm_ForwardSynchronizedPncShutdown(NetworkHandleType)
ComM_Mainfunction<channel>()
PNC statemachine()
COMM_PNC_REQUESTED
Nm_RequestSynchronizedPncShutdown
(NetworkHandleType, PNCHandleType) <Bus>Nm_RequestSynchronizedPncShutdown
(NetworkHandleType, PNCHandleType)
COMM_PNC_READY_SLEEP
It seems a PNC request is pending, while a synchronized PNC shutdown was requested by the top-level
PNC coordinator. Therefore reject the request for synchronized PNC shutdown for this PNC.
<Bus>Nm_Mainfuntion()
[All pending requests for synchronized PNC shutdown completed AND request to transmit a cycle NM-PDU is available]
- Reset the accordings EIRA PN reset timer of the PNCs set to 1 in the NM-PDU
<Bus>If_Transmit(PduIdType,
const PduInfoType*)
<Bus>_TxConfirmation(PduIdType, StdReturnType)
[result == E_OK]
- consider request for synchronized PNC shutdown or request for cyclic NM message as
completed
-- If transmission of a PN shutdown message was confirmed, remove the affected PNCs
from the list of pending request for a synchronized PNC shutdown
[result == E_NOT_OK]
- Keep the request for synchronized PNC shutdown or cyclic NM message as pending.
- No further transmission requests are performed until the tx confirmation is indicated with
E_OK.
Figure 18: Request to forward a synchronized PNC shutdown in the role of an intermediate
PNC coordinator
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.
[SWS_ComM_00322] ⌈The ComM module configuration shall support configuration of bus type for
each channel.⌋()
Rationale for SWS_ComM_00322: Interfaces for controlling the communication stack depends on the
bus type.
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
+module
ComMGeneral:
ComM: EcucModuleDef EcucParamConfContainerDef
+container
upperMultiplicity = 1 upperMultiplicity = 1
lowerMultiplicity = 0
lowerMultiplicity = 1
ComMUser:
ComMConfigSet: EcucParamConfContainerDef +subContainer EcucParamConfContainerDef
lowerMultiplicity = 0 ComMNetworkManagement:
upperMultiplicity = 65635 EcucParamConfContainerDef
+container
upperMultiplicity = 1
+subContainer lowerMultiplicity = 1
ComMChannel:
EcucParamConfContainerDef
+reference
ComMManageReference:
lowerMultiplicity = 1 EcucReferenceDef
upperMultiplicity = 256
+destination lowerMultiplicity = 0
upperMultiplicity = *
+subContainer
+subContainer
ComMUserPerChannel:
EcucParamConfContainerDef
upperMultiplicity = 255
lowerMultiplicity = 0
+parameter
ComMWakeupSleepRequestEnabled:
EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
ComMPnc: upperMultiplicity = 1
+subContainer EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 504
ComMPncEnabled:
+parameter EcucBooleanParamDef
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
OBSOLETE:
NOTE: This is only possible for ECU that has the role of an top-level PNC
coordinator or intermediate PNC within the PNC network
Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
170 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
No Included Containers
ComMDevErrorDetect: EcucBooleanParamDef
ComMGeneral: +parameter
EcucParamConfContainerDef defaultValue = false ComMTMinFullComModeDuration:
EcucFloatParamDef
upperMultiplicity = 1 +parameter
lowerMultiplicity = 1 max = 65
min = 0.001
defaultValue = 5
ComMWakeupInhibitionEnabled:
+parameter
EcucBooleanParamDef
defaultValue = false
ComMResetAfterForcingNoComm:
+parameter
EcucBooleanParamDef
defaultValue = false
+parameter ComMModeLimitationEnabled:
EcucBooleanParamDef
defaultValue = false
ComMEcuGroupClassification:
+parameter EcucIntegerParamDef
max = 255
ComMSynchronousWakeUp: min = 0
+parameter defaultValue = 3
EcucBooleanParamDef
defaultValue = true
ComM0PncVectorAvoidance:
+parameter
EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 1
ComMSynchronizedPncShutdownEnabled:
upperMultiplicity = 1
EcucBooleanParamDef
10.2.3 ComMConfigSet
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..504
cluster (PNC).
This container contains a list of identifiers that are needed to
ComMUser 0..65635 refer to a user in the system which is designated to request
Communication modes.
10.2.4 ComMUser
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: EcuMUser: The concept of users is very similar to the
concept of requestors in the ECU State Manager specification. These two
parameters shall be harmonized during the configuration process.
No Included Containers
ComMUserIdentifier:
ComMUser:
+parameter EcucIntegerParamDef
EcucParamConfContainerDef
min = 0
lowerMultiplicity = 0
symbolicNameValue = true
upperMultiplicity = 65635
max = 254
ComMUserEcucPartitionRef: EcucPartition:
EcucReferenceDef +destination EcucParamConfContainerDef
+reference
lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = *
+destination
ComMUserPerChannel: ComMUserChannel:
EcucParamConfContainerDef +reference EcucReferenceDef
upperMultiplicity = 255
lowerMultiplicity = 0
10.2.5 ComMChannel
COMM_BUS_TYPE_CDD.
Post-build time --
Scope / Dependency scope: local
dependency: Shall be stored none volatile (value must be kept during a
reset).
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
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: Only applicable if ComMBusType equals
COMM_BUS_TYPE_ETH and the used Ethernet hardware (e.g. PHY,
Ethernet switch) is compatible with the OA TC10 specification.
Included Containers
Container Name Multiplicity Scope / Dependency
ComMNetworkManagement 1 This container contains the configuration parameters of the
180 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
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
lowerMultiplicity = 0
ComMFullCommRequestNotificationEnabled:
+parameter upperMultiplicity = 1
EcucBooleanParamDef
defaultValue = false
ComMWakeupSleepRequestEnabled:
+parameter ComMNoWakeUpInhibitionNvmStorage: EcucBooleanParamDef
EcucBooleanParamDef
defaultValue = false
+parameter lowerMultiplicity = 0
upperMultiplicity = 1
ComMUserPerChannel:
+subContainer EcucParamConfContainerDef
upperMultiplicity = 1
lowerMultiplicity = 1
COMM_GATEWAY_TYPE_ACTIVE:
+literal EcucEnumerationLiteralDef
ComMPncGatewayType: EcucEnumerationParamDef
+parameter +literal COMM_GATEWAY_TYPE_PASSIVE:
defaultValue = COMM_GATEWAY_TYPE_ACTIVE
lowerMultiplicity = 0 EcucEnumerationLiteralDef
upperMultiplicity = 1
EcucPartition:
+reference ComMChannelPartitionRef: +destination
EcucParamConfContainerDef
EcucReferenceDef
lowerMultiplicity = 0
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = 1
10.2.6 ComMNetworkManagement
No Included Containers
ComMChannel:
EcucParamConfContainerDef
lowerMultiplicity = 1
upperMultiplicity = 256
NONE:
+literal EcucEnumerationLiteralDef
ComMNmVariant:
EcucEnumerationParamDef
+subContainer
defaultValue = FULL
ComMNetworkManagement: +literal LIGHT:
EcucParamConfContainerDef EcucEnumerationLiteralDef
upperMultiplicity = 1
lowerMultiplicity = 1
+literal PASSIVE:
EcucEnumerationLiteralDef
+literal SLAVE_ACTIVE:
EcucEnumerationLiteralDef
+literal SLAVE_PASSIVE:
EcucEnumerationLiteralDef
ComMNmLightTimeout:
EcucFloatParamDef
+parameter ComMPncNmRequest:
EcucBooleanParamDef
defaultValue = false
10.2.7 ComMUserPerChannel
Multiplicity 1
Type Reference to [ ComMUser ]
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
No Included Containers
ComMUser: EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 65635
+destination +destination
ComMUserChannel: ComMUserPerPnc:
EcucReferenceDef EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = 255
+reference
+reference
ComMUserPerChannel:
EcucParamConfContainerDef
upperMultiplicity = 255
lowerMultiplicity = 0
+subContainer
10.2.8 ComMPnc
Range 8 .. 511
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU
atp.Status=draft
Multiplicity 0..255
Type Reference to [ ComMChannel ]
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: local
Included Containers
Container Name Multiplicity Scope / Dependency
Represents the PncComSignals which are used to
communicate the EIRA and ERA status of this PNC.
ComMPncComSignal 0..*
Tags:
atp.Status=obsolete
188 of 192 Document ID 79: AUTOSAR_SWS_COMManager
Specification of Communication Manager
AUTOSAR CP R21-11
ComMPncId: ComSignal:
ComMPnc: EcucIntegerParamDef EcucParamConfContainerDef
EcucParamConfContainerDef +parameter
symbolicNameValue = true lowerMultiplicity = 0
lowerMultiplicity = 0 min = 8 upperMultiplicity = *
upperMultiplicity = 504 max = 511
+destination
OBSOLETE
ComMPncComSignal: ComMPncComSignalRef:
EcucParamConfContainerDef +reference
EcucReferenceDef
lowerMultiplicity = 0 requiresSymbolicNameValue = true
upperMultiplicity = *
+literal
ComMPncComSignalKind:
EIRA: EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
lowerMultiplicity = 0
+literal
upperMultiplicity = 1
ERA: EcucEnumerationLiteralDef
+subContainer
+literal
ComMPncComSignalDirection:
TX: EcucEnumerationLiteralDef
+parameter EcucEnumerationParamDef
+literal
RX: EcucEnumerationLiteralDef
+reference ComMPncComSignalChannelRef:
EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = 1
+destination
ComMChannelPerTxOnlyPnc:
+reference EcucReferenceDef ComMChannel:
+destination
lowerMultiplicity = 0 EcucParamConfContainerDef
upperMultiplicity = 255 lowerMultiplicity = 1
upperMultiplicity = 256
ComMPncEthIfSwitchPortGroupRef: +parameter
EthIfSwitchPortGroup:
+reference EcucReferenceDef
+destination EcucParamConfContainerDef
ComMPncGatewayType: EcucEnumerationParamDef
lowerMultiplicity = 0
lowerMultiplicity = 0
upperMultiplicity = 255 defaultValue = COMM_GATEWAY_TYPE_ACTIVE
upperMultiplicity = *
requiresSymbolicNameValue = true lowerMultiplicity = 0
upperMultiplicity = 1
+parameter
ComMPncWakeupSleepRequestEnabled:
EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
10.2.9 ComMPncComSignal
Type EcucEnumerationParamDef
Range RX --
Tags:
atp.Status=obsolete
TX --
Tags:
atp.Status=obsolete
Post-Build Variant
false
Value
Value Pre-compile time X All Variants
Configuration Link time --
Class Post-build time --
Scope / scope: local
Dependency
No Included Containers