DEV Community

ANIL DAS
ANIL DAS

Posted on • Edited on

Know About AUTOSAR Ethernet Communication Stack

Know About AUTOSAR Ethernet Communication Stack
Hi folks, I'm Anil Das employee of LUXOFT India. Here I would like to provide a brief knowledge about AUTOSAR Ethernet Communication Stack.

The Ethernet Communication Stack in the AUTOSAR specifications includes many modules. Covering all the modules is beyond the scope of this article (definitely in some other article) so I will cover four of those. Please make sure to leave a comment if you have any questions.

AUTOSAR Ethernet Communication Stack:

Instead of entering jumping directly to the Ethernet stack, Let's try to answer the question: "What is Communication Stack (Com Stack)"? Communication Stack is a set of segments that we call modules that helps in communication between different components via a channel. It consists of three layers, each layer having different modules for different communication protocols and peripherals. They are:

  1. Communication Services Layer
  2. Communication Hardware abstraction layer
  3. Communication Drivers

Let's not dive into these topics here (to avoid diversion from the current topic) but in another article (soon) on AUTOSAR Architecture.

Ethernet Stacks have so many modules and sub-modules in them, Let's go through them one by one.

Com Module:

• To provide access to signals or groups of signals and PDUs to the application module and vice-versa to perform or execute the task (main functionality of the COM module).
• Com module is interfaced with the PDUR (Protocol Data Unit router) module, and this one is a second top-level module of the AUTOSAR COM Stack.
• It handles signals-level access to Application layers and PDU-level access to lower layers.
• It is responsible for packing and unpacking PDUs, which means the COM module packs the signals to PDUs during transmission from the application to lower layers and unpacks the received PDUs from PDUR, and provides signal-level access to the application layer at the receiver.
• And it is also responsible for the grouping of the PDUs, Communication transmission control (stop/start of I-PDU groups), and Byte order conversion.
• Com module and PDUR module both are a part of the COM Services.
• To receive or transmit the signals/PDUs, an application layer should be called by the COM module AUTOSAR API and it never calls lower-level modules directly.
• All the PDUs and signals-related configurations will be done in the COM module.

Flow of Com Module

PDUR (Protocol Data Unit Router) Module:

• The main functionality of this module is routing the PDU (Protocol Data Unit) from the source module to its exact destination module.
• PDUR is the second level module (just below COM as shown in the fig) in AUTOSAR COM Stack for all communications protocol stacks.
• PDUR will be interfaced with the DCM module and COM module of AUTOSAR along with SoAd (Socket Adapter) and DoIP (Diagnostic Over IP) in the below lower layers of the stack.
• A configurable routing table with information about PDUs is also present in this module.

Flow of PDUR

Socket Adapter (SoAd) Module:

• A Socket is uniquely identified by the combination of IP addresses and ports of remote and local network nodes.
• By using socket, packet-oriented UDP (User Datagram Protocol), and connection-oriented TCP (Transmission Control Protocol) user data are routed from the TCP/IP stack module to the application layer and vice-versa.
• Transformation of socket-based communication into PDU-based communication and vice-versa is the functionality of the Socket Adapter module (SoAd).
• The main purpose of the Socket Adapter module (SoAd) is to interconnect or provide an interface to the upper layer PDU-based module (PDUR) and the lower layer socket-based TCP/IP stack module.
• It also maps the I-PDU Id with the socket-based connection.
• Socket Adapter (SoAd) adds the socket header in PDU and sends it to the lower layer of the stack and when data arrives from the lower layer it removes the header and sends it to the upper layers of the stack.
• For efficient communication via ethernet protocol multiple I-PDUs mapping to a single socket-based connection is possible.

Flow of Socket Adapter

Service Discovery (Sd): (As per AUTOSAR SWS documents)

• AUTOSAR Service Discovery module offers functionality to detect and provide available services i.e. functional entities (Methods/functions) within the vehicle network. To achieve that, it makes use of the IP Multicast and so-called SOME/IP-SD messages.
• Service Discovery module (Sd) is positioned in between the AUTOSAR Socket Adaptor module (SoAd) and the AUTOSAR BSW Mode Manager module (BswM).

Flow of Service Discovery

• The main functionality of the Service Discovery Module is managing the availability of functional entities called services in the in-vehicle communication and controlling the transmission behavior of event messages. This function is allowed to send only event messages to receivers (Publish/Subscribe).
• The process described above is called SOME/IP-SD (Scalable Service-Oriented Middleware over IP – Service Discovery).
• Service Instances are single implementations of a service that is defined by its service interface (specification in layman's terms).
• The status of Service Instances in the Service Discovery can control transmission of special messages called events.
• These events are grouped into Event groups, which the Service Discovery can turn on/off in a Publish/Subscribe manner.

Conclusion:

If you are here and reading this, means you have completed some modules of AUTOSAR ethernet communication stack today. You have covered AUTOSAR COM Module, AUTOSAR PDUR Module, AUTOSAR Socket Adapter (SoAd), and AUTOSAR Service Discovery (Sd).
Hurray!!!. Cheers!!!
But still, a long way to go since there are a lot of modules in the Ethernet Stack. Thank you for reading and hope you have enjoyed it as well. Stay tuned for updates regarding my next articles (by subscribing). Feel free to comment with your questions.

Top comments (8)

Collapse
 
gunaneelamegam profile image
Guna

I have an doubt in someiptp can I.

Collapse
 
anil1991das profile image
ANIL DAS

Please feel free to share your doubts to support our community.

Collapse
 
gunaneelamegam profile image
Guna

autosar.org/fileadmin/standards/R2...

I won't able to understand the channel configuration. please .

Thread Thread
 
anil1991das profile image
ANIL DAS

Can you please explain your doubt with a little bit more specifics?
Do you want to configure SOME/IP Transport Protocol?
Which tools are you using for configuration?
Did you get any errors during the configuration?

Thread Thread
 
gunaneelamegam profile image
Guna

please clarify my doubt ?

Parameter Name SoAdTxPduRef
Parent Container SoAdPduRoute
Description Reference to the global PDU structure

what is mean by global pdu ref ? I wont able understand that word

Thread Thread
 
gunaneelamegam profile image
Guna

As on now, I wont any tool to generate configuration parameter.

Just,Trying with c structure based configuration . help ?

Thread Thread
 
anil1991das profile image
ANIL DAS
  • The exact meaning of "SoAdTxPduRef" would depend on the specific application or module within the AUTOSAR framework. So, you need to give a reference to SoAd transmisson PDU, which means create one PDU and giving a reference to SoAd.
  • SoAdPduRoute might refer to the configuration and mapping of data transmisison.

- Without any tools, it is very tough and complicated to do things and follow the AUTOSAR specifications.

Thread Thread
 
gunaneelamegam profile image
Guna • Edited

Hii Bro,

Im trying to understand what is mean (AnyTp Module) RxNPduHandleId and Reference to a global Pdu that is used to harmonize HandleIDs in the COM-Stack.

Please !