<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aravind B N</title>
    <description>The latest articles on DEV Community by Aravind B N (@arvind_b_n_luxoft).</description>
    <link>https://dev.to/arvind_b_n_luxoft</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1102782%2F8aad419e-a5d3-4585-bdb4-cbb238ea58a1.png</url>
      <title>DEV Community: Aravind B N</title>
      <link>https://dev.to/arvind_b_n_luxoft</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arvind_b_n_luxoft"/>
    <language>en</language>
    <item>
      <title>Understanding J1939 SAE Protocol: The Complete Guide to Communication in Commercial Vehicles part-5.</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Tue, 05 Mar 2024 04:09:01 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-5-a3o</link>
      <guid>https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-5-a3o</guid>
      <description>&lt;p&gt;Hello Readers, 👋😃&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a junior software developer. Luxoft has given me several opportunities to work on various projects, which has inspired me to discuss the important processes involved in learning the SAE J1939 communication protocol &lt;a href="https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-4-4mi"&gt;Part-4&lt;/a&gt; This is part 5 of the SAE J1939 communication protocol. Here we will discuss the Solution and Configurations and Handling in a Dynamic Network.&lt;/p&gt;

&lt;p&gt;Cont... [Part-4]&lt;br&gt;
&lt;strong&gt;Solution &amp;amp; Configurations&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Priority&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Program-configurable&lt;/strong&gt;&lt;br&gt;
The device at first broadcasts the PGN ‘Address Claimed’ with NULL address (254). This is seen on the network as ‘Cannot Claim Address’. An ECU can be assigned to a new device address by using “Commanded Address” network management service. The latter can be achieved through an external tool or any intelligent object in the network, "Cannot Claim Address"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fst7bvk4wp1qwjikdqa2d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fst7bvk4wp1qwjikdqa2d.png" alt="Image description" width="639" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The figure represents a sample scenario involving two Electronic Control Units (ECUs) known as ECU A and ECU B, undergoing initialization and address claiming on a network with particular focus on conflict resolution when both ECUs try to claim the same address.&lt;/p&gt;

&lt;p&gt;A step-by-step explanation of what happens in the diagram is given below:&lt;/p&gt;

&lt;p&gt;Initialization: Both ECU A and ECU B begin their initialization process as indicated by dashed lines at top of each vertical line. This is when each of them performs self-checks and gets ready for network communication.&lt;/p&gt;

&lt;p&gt;Address Claimed by Both ECUs: NAME A claims an address over the network using Source Address (SA) of 20. At almost the exact same time, NAME B assigns itself this identical address (SA = 20), culminating into conflicts because two devices are trying to use similar source address.&lt;/p&gt;

&lt;p&gt;Name comparison: The address contention is resolved by name comparison. Each ECU undertakes a NAME identifier check to know which one among them should have the highest priority when it comes to addressing.&lt;/p&gt;

&lt;p&gt;ECU A Reclaims Address: After performing the name comparison, ECU A takes over the address SA = 20 with NAME A probably because of a higher priority as per the name comparison.&lt;/p&gt;

&lt;p&gt;ECU B Cannot Claim Address: Having lost in the name comparison, ECU B tries to claim an address but this is not possible. It goes for SA = 254 and NAME B by default; which means that it could not acquire the desired address and now needs to be assigned new one.&lt;/p&gt;

&lt;p&gt;Random delay and Commanded Address: Delayed Randomly and Commanded Address: After failing to claim an address, ECU B delays for some random period. This helps in avoiding repeated immediate conflicts and also gives time for network management system to resolve such issues. The footnote at the end indicates that if supported by the ECU, an optional “Commanded Address” network management service can be applied to give a new address for ECU B. This way, it would intervene in this case so that there will be no other conflict during communication process between all these ECUs.&lt;/p&gt;

&lt;p&gt;Continued Operation: According to the diagram, after address claiming and conflict resolution processes, ECU A will remain operational with static address = 20, whereas network management intervention will eventually assign ECU B a new address.&lt;/p&gt;

&lt;p&gt;The vertical lines have been used to represent the two ECUs while the horizontal lines show the events that occur over time (t) for each ECU. This process ensures that every ECU on the network is assigned a unique address; an essential requirement in any communication system or networked device.&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;Manually configurable&lt;/strong&gt;&lt;br&gt;
To assign a new address to this type of ECU, only a switch may be employed. The most common method of doing this kind of configuration is installing according to location in vehicle. An I/O port from the processor decodes this number as an address. Therefore, it is possible for door ECU to determine by itself whether it is installed on right or left and then select suitable location code.&lt;/p&gt;

&lt;p&gt;4.&lt;strong&gt;Non-configurable&lt;/strong&gt;&lt;br&gt;
A non-configurable type of ECU can only be given another address through reprogramming its software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Handling in a Dynamic Network&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AAC Bit&lt;/strong&gt;&lt;br&gt;
An electronic control unit (ECU) that can be versatile and is not limited to a network connection should support the setup described as "Self configurable" in the section, on Solutions and Configurations. An ECU configured in this way may be identified by a NAME with its significant bit designated as "Arbitrary Address Capable." This designation indicates that ECUs can independently search for their addresses. If an ECU exists once in the network it can opt to use a fixed device address without needing to set the "Arbitrary Address bit. ECUs that are self configurable and have this feature activated are given priority over those lacking this setting in terms of naming conventions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Request&lt;/strong&gt;&lt;br&gt;
The J1939 network management has an important mechanism called PGN ‘Request’. In turn, any PGNs can be requested from ECUs using this PGN. Therefore, it can also refer to the “Address Claimed” PGN. Here, the ‘Address Claimed’ PGN should respond to this “Request for Address Claimed”.&lt;/p&gt;

&lt;p&gt;Important: When requesting ECU has a valid address, it must acknowledge its request itself!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NULL Address&lt;/strong&gt;&lt;br&gt;
Usually used at the beginning of communication during dynamic networks, whereby frequently request mechanism is applied. Thus any ECU that wants to participate in communication will request for the address status before starting addressing. &lt;/p&gt;

&lt;p&gt;Note: PGN 59904 is an exception in J1939. Specifically, this PGN is the only type of parameter group that can be sent without a valid address, but from NULL (254) instead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcq6196ymkhm07mhajr0v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcq6196ymkhm07mhajr0v.png" alt="Image description" width="536" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fig:Request for Address Claimed&lt;/p&gt;

&lt;p&gt;The image you have shared with me looks like a series of interactions between an Electronic Control Unit (ECU) labeled “ECU A” and a network which is probably within the Controller Area Network (CAN) of a vehicle, or something similar to it in terms of ECU to ECU communication among other complex electronic systems found in vehicles.&lt;/p&gt;

&lt;p&gt;This diagram can be described step by step as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ECU A&lt;/strong&gt;: This is the first processor that initiates electronic control unit to communication.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Request for Address Claimed (SA = 254)&lt;/strong&gt;: To make all devices claim their addresses, ECU A transmits out a message over the network. The broadcast address for some protocols is 254 meaning every device should listen and capable of responding.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Address Claimed (SA = X, NAME B)&lt;/strong&gt;: A computer on the network called NAME B has added its name while claiming its address with source address X.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Address Claimed (SA = Y, NAME C)&lt;/strong&gt;: Another computer named NAME C however claims its address using source address Y.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Address Claimed (SA = Z, NAME D)&lt;/strong&gt;: Another ECU, known as NAME D has confirmed its address by matching it with the source address Z.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Time-out of 1250 ms&lt;/strong&gt;: A timeout of 1250 milliseconds is set, indicating that ECU A will wait for this duration to allow all ECUs, on the network to respond to the address claim request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Address Claimed (SA = T, NAME A)&lt;/strong&gt;: Following the timeout period ECU A asserts its address using source address T. Introduces itself as NAME A.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The vertical lines with arrows indicate the timeline, for both ECU A and the network showing that these events occur sequentially over time.&lt;/p&gt;

&lt;p&gt;In networks, with devices it's common for them to establish their presence and secure addresses for effective communication. This helps prevent address conflicts and ensures messages reach the ECU. Such an address claiming process is frequently seen in systems utilizing the SAE J1939 protocol or similar protocols, in heavy duty vehicle and industrial settings.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding J1939 SAE Protocol: The Complete Guide to Communication in Commercial Vehicles part-4.</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Tue, 05 Mar 2024 04:08:44 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-4-4mi</link>
      <guid>https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-4-4mi</guid>
      <description>&lt;p&gt;Hello Readers, 👋😃&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a junior software developer. Luxoft has given me several opportunities to work on various projects, which has inspired me to discuss the important processes involved in learning the SAE J1939 communication protocol &lt;a href="https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-3-4hh9"&gt;Part-3&lt;/a&gt; This is part 4 of the SAE J1939 communication protocol. Here we will discuss the Network Access and Solution and Configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Network Access
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Network Admission&lt;/strong&gt;&lt;br&gt;
In J1939, the term network management should not be confused with that of network management in general automotive settings. In the automotive domain, network management is used to put the ECUs (Electronic Control Units) of a network into a defined “agreed upon” idle state without losing any bus information.&lt;/p&gt;

&lt;p&gt;As, per the J1939 standard this term pertains to controlling access to communication (entry to the network) and managing device addresses, in networks. This is where properties such as device address and NAME come into play (see chapter Names and Addresses&lt;a href="https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-2-1bbc"&gt;[part-2]&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Address Claiming&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The simplest form of J1939 network management is when every ECU sends “Address Claimed” right after booting, before they start communicating. By using the 'Address Claimed' parameter group (PGN‎ 0x00EE00) it is possible to reveal the 'Address Claim' which includes the devices name and a standard reset device address. Mainly in static networks this is done so as to unveil the topology of a network. Therefore, an example would be diagnosing tools that will determine whether or not there is presence of retarder in vehicle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conflict Resolution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Similarly “Address Claim” also applies to dynamic networks. Furthermore, the network management can be used to address any address conflict that occurs here. These may occur, for instance, when an ECU is subsequently joined to a network (already in operation) and this ECU uses a predetermined address already utilized on the network. This conflict must be resolved as all addresses within the network should be unique and non-repetitive.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foo0de8mynpyu1gbagdp1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foo0de8mynpyu1gbagdp1.png" alt="Image description" width="527" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fig: Address Claim Static&lt;/p&gt;

&lt;p&gt;This figure appears like a representation of some events in a communication process between Electronic Control Unit (ECU) and Network possibly in automotive domain. ECUs are computerized controllers that handle many functions such as engine control/transmission/brake systems in vehicles. It is a simple timeline of how ECU gets initialized before communicating with the network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is what each section means:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Initialization:&lt;/em&gt; The dotted line on the left side titled ‘Initialization’ shows where ECU A starts its start-up sequence from. This could entail self checks, software booting up and getting ready to communicate over the network.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;250 ms delay:&lt;/em&gt; At the beginning, there is a 250-millisecond delay. This waiting sequence may be an own built-in ECU wait time before it tries to communicate on network to ensure that it is fully operational prior sending any messages or it does not conflict with others ECUs are starting up.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Address Claimed (SA = 20)&lt;/em&gt;: After the pause, ECU A claims an address on the network. It means Source Address, and this refers to a unique identifier for an ECU on the network; in such cases, this particular ECU is claiming number 20.For successful communication through a network, all other devices must identify data sent by ECU A and accordingly deliver responses.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Standard Messages (SA = 20)&lt;/em&gt;: Having claimed its address, standard messages start emanating from the ECU A via Its Source Address (SA = 20). They can represent any kind of information including data readings, status updates or control commands which are being handled by this specific ECU. The dotted vertical dash lines indicate that there are some messages transmitted one after another over a period of time to the network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network:&lt;/strong&gt; The line, on the right labeled "Network" represents the network itself which could be a vehicles Controller Area Network (CAN) bus or any other type of communication system used for ECUs to exchange information. The arrows pointing from ECU A to the network indicate the direction of communication showing that ECU A is sending messages to the network.&lt;/p&gt;

&lt;p&gt;The timeline at the bottom, with "t" likely signifies time illustrating the progression from the initialization phase through the communication phase.&lt;/p&gt;

&lt;p&gt;In essence this diagram provides a high level overview of an ECU booting up obtaining a network address and then commencing its operation of transmitting messages to the network at set intervals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution &amp;amp; Configurations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Priority&lt;/strong&gt;&lt;br&gt;
The identifier is utilized to settle disputes and to prioritize addresses. Therefore when an address conflict arises through the "Address Claim " the devices, in question must compare their identifiers. This comparison process is conducted bit by bit commencing from the Significant Bit (MSB). Following the principle as CAN arbitration a zero takes precedence over a one. The identifier with the numerical value triumphs in the conflict resolution allowing the associated ECU to utilize that address. The behavior of the ECU possessing the lower priority identifier in this scenario is contingent upon its setup. There are four setups for ECUs in this context;&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Self-configurable&lt;/strong&gt;&lt;br&gt;
Following address loss the device autonomously seeks an address, within the range of 128 to 247 and endeavors to secure it.&lt;br&gt;
The animation depicts a scenario where two Electronic Control Units (ECUs) named ECU A and ECU B are initializing and vying for addresses on a network. It also showcases a conflict resolution process, for address claiming. Here's a breakdown of the events shown in the diagram;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx8kql11nciwep42fvu36.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx8kql11nciwep42fvu36.png" alt="Image description" width="649" height="477"&gt;&lt;/a&gt;&lt;br&gt;
Fig: Address claimed Dynamic.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Initialization&lt;/strong&gt;: Both ECU A and ECU B begin their initialization process as shown by the dashed lines at the top of each line. This is where each ECU conducts self checks and gets ready to communicate on the network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Address Claimed by ECU A&lt;/strong&gt;:  ECU A secures an address on the network with the Source Address (SA) of 20. Is known as NAME A. This marks the step in establishing communication, on the network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Address Claimed by ECU B&lt;/strong&gt;: At the time ECU B also attempts to claim the same address, on the network (SA = 20) and is recognized by NAME B. This situation arises because two devices are competing to use the source address.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Name comparison&lt;/strong&gt;: To resolve this conflict a comparison of names is carried out. Each ECU compares its NAME identifier to determine which one holds priority in claiming the address. In this scenario NAME A emerges as the higher priority choice over NAME B.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Address Reclaimed by ECU A&lt;/strong&gt;: Following the name comparison process, ECU A successfully reclaims the address SA = 20 with its designated name, NAME A having secured priority, in the naming comparison evaluation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ECU B Searches for a New Address&lt;/strong&gt;: ECU B is now seeking an address after losing priority in the name comparison. It successfully secures an address SA = 128 under the name B. This enables ECU B to communicate on the network without any address conflicts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Continued Operation&lt;/strong&gt;: As, per the diagram following the address claiming process and conflict resolution both ECUs are seen to continue operating on the network with their addresses. ECU A maintains its usage of SA = 20 while ECU B now operates using SA = 128.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The vertical lines depict the two ECUs while the horizontal lines show the sequence of events, over time (t) for each ECU. The diagram illustrates how each ECU is assigned an address on the network for seamless communication and operation within a networked system like in automotive settings where multiple ECUs collaborate, without disruptions.&lt;/p&gt;

&lt;p&gt;This concept will be covered more in the &lt;a href="https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-5-a3o"&gt;next article&lt;/a&gt;, with examples.&lt;br&gt;
Do let me know if you have any queries in the comments below.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unit Testing: A Very Important Scheme of Software Development</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Mon, 26 Feb 2024 10:02:34 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/unit-testing-a-very-important-scheme-of-software-development-54m8</link>
      <guid>https://dev.to/arvind_b_n_luxoft/unit-testing-a-very-important-scheme-of-software-development-54m8</guid>
      <description>&lt;p&gt;Hello‎‎ Readers,&lt;br&gt;
My‎‎ name‎‎ is‎‎ Aravind‎‎ B‎‎ N,‎‎ and‎‎ I‎‎ work‎‎ at‎‎ "Luxoft‎‎ India"‎‎ as‎‎ a‎‎ Junior‎‎ Software‎‎ Developer.‎‎ Luxoft has provided me with chances to engage in projects sparking my interest in exploring the essential aspects of Unit Testing development and learning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a software developer it's essential that the code is dependable, effective and easy to manage. One tool that cannot be missed in this fight is unit testing. Unit testing as the process of evaluating individual units or components of a software independently to check if each works as expected. This article will discuss why unit tests are important, types of automated tests, basics of unit testing and an example application overview with test scenarios. It will also talk about dealing with bugs result and feedbacks in test running with advanced topics touch on before ending up with modern significance of unit testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Importance of Unit Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the cycle of software development, this is where unit tests play a vital role for many reasons. First off, it makes sure that every piece of code functions correctly on its own such that issues can be detected and fixed early during development process. By identifying problems at the level where they occur rather than allowing them to spread through various parts of the system, developers can reduce chances for more complex and costly bugs later on.&lt;/p&gt;

&lt;p&gt;Moreover, it is also a kind of documentation to let the team know what should be done as they test their code. Each component’s task can be understood in terms of what it does and how to do that by using the references made when testing this piece of software for future developers who may come on board. In addition, unit tests allow for easier refactoring as a result of having safety nets; thus making alterations with confidence knowing that the full coverage by testing is well catered.&lt;/p&gt;

&lt;p&gt;In addition, unit testing builds quality and responsibility among the development teams. Writing tests leads to modularization, reusability and loose coupling which has an impact on maintainability and scalability of software systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of Automated Tests&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Automated testing is necessary to make sure that everything goes smoothly during testing and good results are attained (Knight et al., 2007). Various types of automated tests exist in order to serve specific purposes in software testing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unit Tests:&lt;/strong&gt; As mentioned before, individual units such as functions or methods are tested independently with unit tests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Integration Tests:&lt;/strong&gt; Integration test make sure that different parts or components work together exactly as they were meant to do in a given application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;End-To-End Tests:&lt;/strong&gt; These end-to-end tests, also called functional tests, confirm that the whole workflow of an application is operating from beginning to end with user activities and system integrations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rechecking Functionality;&lt;/strong&gt; Regression tests are created to double check functionality that has already been implemented making sure that any new code modifications do not negatively impact it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Checking Performance;&lt;/strong&gt; Performance testing is carried out to pinpoint areas where performance may be limited by testing how well an application responds, scales and remains stable under workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Initial Validation Tests;&lt;/strong&gt; Smoke tests are used to assess if an application is stable enough, for testing quickly validating its key functions.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each kind of automated test has a different role in guaranteeing overall quality and reliability of software applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Principles of Unit Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Several important principles guide effective unit testing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Isolation:&lt;/strong&gt; Unit tests should prevent the code being tested from relying on external resources like databases or network calls through mocking or stubbing techniques.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Independence:&lt;/strong&gt; Each unit test must be independent from others so that their consequences would not influence each other’s results.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Readability:&lt;/strong&gt; Test names must be descriptive and assertions be clear so that unit tests can be understood easily and maintained.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed:&lt;/strong&gt; To this end, the speed at which they execute should allow programmers to obtain immediate feedback as they move through iterations during development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Completeness:&lt;/strong&gt; Unit tests need to cover different edge cases and scenarios in order to ensure robustness of the code base.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;They help keep unit tests effective and reliable all through the life cycle of software development.&lt;br&gt;
&lt;strong&gt;Example Application Overview&lt;/strong&gt;&lt;br&gt;
A simple example application for managing cars, including functionalities for creating, updating, and deleting car records will be considered. The focus will be on testing the car creation service specifically on make and model properties of car objects.&lt;br&gt;
&lt;strong&gt;Testing the Car Creation Service&lt;/strong&gt;&lt;br&gt;
Let us start by writing unit tests for the car creation service:&lt;br&gt;
&lt;strong&gt;1. Testing the &lt;code&gt;make&lt;/code&gt; Property:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_car_make&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;

 &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Toyota&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Camry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

 &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;car&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Toyota&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This test ensures that the &lt;code&gt;make&lt;/code&gt; property of the car object is set correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Testing the &lt;code&gt;model&lt;/code&gt; Property:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_car_model&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;

 &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Toyota&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Camry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

 &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;car&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Camry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this tester also, the &lt;code&gt;model&lt;/code&gt; attribute of the car object is correctly assigned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Handling Test Failures and Feedback&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For sure, there could be some tests that fail due to bugs or changes in the code. Whenever a test fails, it becomes very important to investigate why it failed and fix the problem without delay. Developers should maintain a feedback loop where any failing tests are handled immediately so as to maintain validity of the test suite.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced Topics and Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Test-driven development (TDD) is an advanced area of unit testing where tests are written before coding while property-based testing is another in which they are generated from properties that the code must satisfy.&lt;/p&gt;

&lt;p&gt;It can therefore be concluded that unit testing is an essential element in modern software development. It helps to ensure reliability, functionality and maintainability of codes while fostering quality culture and responsible development teams. The principles behind unit testing along with automated testing procedures ensure developers deliver high-quality software with confidence on customer expectations.&lt;/p&gt;

&lt;p&gt;This practice not only enhances code quality but also promotes productivity amongst developers as well as collaboration hence better outcomes for dev and end-users alike.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>An In-Depth Exploration of the CAN Calibration Protocol (CCP)</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Mon, 19 Feb 2024 06:55:31 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/an-in-depth-exploration-of-the-can-calibration-protocol-ccp-5d9n</link>
      <guid>https://dev.to/arvind_b_n_luxoft/an-in-depth-exploration-of-the-can-calibration-protocol-ccp-5d9n</guid>
      <description>&lt;p&gt;Hello Readers,‍‍‍‍‍‍‍‍󠁲&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a Junior Software Developer. Luxoft has given me several opportunities to work on various projects, these experiences have inspired me to involved in learning of CAN Calibration Protocol&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
The (CCP) CAN Calibration Protocol has become widely accepted as a standard, in the industry for calibrating controllers during module development. This detailed article aims to offer readers an understanding of CCP including its core principles, dialogue structure, command functionalities, message exchange mechanisms, implementation considerations, resource requirements, performance assessments and various applications in module development tasks. Exploring the intricacies of CCP allows developers to gain insights into its capabilities and harness its potential to enhance module performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh96woa2sg7l7kms0a9py.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh96woa2sg7l7kms0a9py.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CCP Essentials;&lt;/strong&gt; Going beyond calibration CCP provides a range of general purpose features that make it a versatile tool for module development activities. From calibration tasks CCP enables real time access to Electronic Control Unit (ECU) parameters allowing adjustments to process algorithms and providing real time data retrieval, from the ECU. This adaptability empowers developers to tune and optimize module performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CCP Dialog:&lt;/strong&gt; The CCP dialogue involves exchanging messages, between the calibration tool and the ECU. The Command Receive Object (CRO) is used to send commands from the tool to the ECU while the Data Transmission Object (DTO) allows the ECU to reply to the CRO. The CCP specification outlines a framework that specifies how each message is structured and what it contains ensuring communication standards, between the tool and the ECU.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fwa57qzu793ak7z3yfs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fwa57qzu793ak7z3yfs.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CCP Commands:&lt;/strong&gt; CCP features a variety of commands each serving purposes, in the calibration and development process. These commands facilitate tasks like adjusting ECU parameters changing calibration values starting flash programming and fetching real time measurement data. The CCP specification outlines descriptions of each command including their parameters, expected responses and functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CCP Communication:&lt;/strong&gt; CCP communication relies on the Controller Area Network (CAN) bus, a used communication protocol in the industry. The CAN bus enables efficient data exchange, between the calibration tool and the ECU. Each CAN Identifier is restricted to 8 data bytes to ensure use of bandwidth. Inside the ECU the CCP Driver processes commands carries out requested operations and sends back responses via the CAN bus.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measurement Data Acquisition:&lt;/strong&gt; CCP offers two methods, for acquiring measurement data a polling approach and the utilization of Data Acquisition (DAQ) lists. In the polling method the calibration tool requests data and the ECU responds with the requested information. On the hand DAQ lists allow for efficient and synchronized data acquisition. These lists consist of Object Descriptor Tables (ODTs) that outline the data to be acquired and the associated event triggers or time periods. This method empowers the ECU to autonomously send measurement data to the calibration tool reducing the necessity, for polling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool Considerations:&lt;/strong&gt; When using CCP along, with tools like Vectors CANape developers can access features that improve the calibration and development process. These tools offer a to use interface for visualizing and adjusting ECU data. They enable developers to view ECU parameters in units, symbolic values or graphical formats which helps deepen their understanding of the calibration process and allows for, on the fly adjustments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CCP Applications:&lt;/strong&gt; CCP is utilized in aspects of module development including calibration, parameter tweaking and real time data collection. It empowers developers to fine tune ECU settings enhance process algorithms and validate module performance. CCP proves beneficial during the development and testing stages by facilitating calibration cycles and providing real time monitoring of crucial parameters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CCP Driver Implementation:&lt;/strong&gt; Implementing a CCP driver involves two components; the command processor and the DAQ processor. The command processor deals, with receiving CRO commands from the calibration tool and generating Command Return Messages (CRM) in response. It verifies that the requested tasks are carried out accurately and provides feedback to the calibration tool. On the hand the DAQ processor is, in charge of overseeing the acquisition and transmission of measurement data based on specified DAQ lists. Its role is to ensure synchronized and efficient data collection enabling real time monitoring and analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CCP Resource Requirements:&lt;/strong&gt; To successfully integrate a CCP driver it is essential to manage the use of resources, within the ECU. The CCP software driver requires resources like RAM, ROM and CPU time with specific needs varying based on the chosen implementation, optional features and module complexity. Evaluating and assigning the resources is vital for ensuring functionality and performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CCP Performance Ratings:&lt;/strong&gt; The performance of CCP is impacted by factors such as command execution times, message transmission rates and system configuration as a whole. The efficiency of implementation, ECU hardware capabilities and CAN bus communication bandwidth all play a role, in determining the CCP drivers performance levels. Developers should take these aspects into account during design and optimization stages to meet desired performance standards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; the CAN Calibration Protocol (CCP) serves as a tool, in the industry for calibrating controllers and aiding module development. Its versatility, communication protocol and real time data acquisition support make it highly beneficial, for developers. By mastering the basics of CCP understanding its dialogue structure, command functions and message exchange methods developers can effectively utilize it to enhance module performance simplify calibration processes and attain outcomes in module development tasks.&lt;/p&gt;

&lt;p&gt;This concept will be covered more in the next article, with examples.&lt;br&gt;
Do let me know if you have any queries in the comments below.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>XCP - Universal Measurement and Calibration Protocol Part-2</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Mon, 19 Feb 2024 06:47:16 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/xcp-universal-measurement-and-calibration-protocol-part-2-gcd</link>
      <guid>https://dev.to/arvind_b_n_luxoft/xcp-universal-measurement-and-calibration-protocol-part-2-gcd</guid>
      <description>&lt;p&gt;Hello‎‎ Readers,&lt;br&gt;
My‎‎ name‎‎ is‎‎ Aravind‎‎ B‎‎ N,‎‎ and‎‎ I‎‎ work‎‎ at‎‎ "Luxoft‎‎ India"‎‎ as‎‎ a‎‎ Junior‎‎ Software‎‎ Developer.‎‎ Luxoft‎‎ has‎‎ given‎‎ me‎‎ several‎‎ opportunities‎‎ to‎‎ work‎‎ on‎‎ various‎‎ projects,‎‎ which has inspired me to discuss the important processes involved in developing and learning the Universal Measurement and Calibration Protocol in detail &lt;a href="https://dev.to/arvind_b_n_luxoft/xcp-universal-x-measurement-and-calibration-c-protocol-p-1f0m"&gt;Part-1&lt;/a&gt;. This is part 2 continuous part of Universal Measurement and Calibration Protocol&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model‎‎ of‎‎ communication‎‎ XCP&lt;/strong&gt;&lt;br&gt;
Communication, in the XCP model involves the interaction between a master and slave through exchanging data using a message based approach. This method includes encapsulating the XCP message frame within a transport layer frame, including the XCP header and tail. It is commonly seen in XCP implementations on Ethernet with UDP protocols&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fts9rpz4hmkp84ufbpobk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fts9rpz4hmkp84ufbpobk.png" alt="Image description" width="684" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The diagram illustrates that‎‎ XCP‎‎ Packet&lt;/p&gt;

&lt;p&gt;The structure of an XCP packet consists of three elements regardless of the transport protocol used; the Identification Field, Timestamp Field and Data Field. Each element starts with a Packet Identifier (PID) for identification purposes.&lt;/p&gt;

&lt;p&gt;Data exchange in XCP occurs between a master and slave on either a frame or packet basis. This exchange involves two types of communication; Command Transfer Objects (CTOs) for command exchange to establish connections between master and slave and Data Transfer Objects (DTOs) for exchanging measurement and stimulation data. Both methods ensure that the slave responds with either RES or ERR as necessary.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn06pzh798e33v4to19i3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn06pzh798e33v4to19i3.png" alt="Image description" width="800" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The abbreviations mentioned here refer to terms or concepts;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Send commands using CMD Command Packets.&lt;/li&gt;
&lt;li&gt;Receive command responses using RES Command Response Packets.&lt;/li&gt;
&lt;li&gt;Obtain answers through packets.&lt;/li&gt;
&lt;li&gt;Receive error responses through ERR Error Packets.&lt;/li&gt;
&lt;li&gt;Manage events using EV Event Packets.&lt;/li&gt;
&lt;li&gt;Make service requests using SERV Service Request Packets.&lt;/li&gt;
&lt;li&gt;Transmit measurement data via DAQ Data Acquisition.&lt;/li&gt;
&lt;li&gt;Stimulate the slave with STIM Stimulation commands.&lt;/li&gt;
&lt;li&gt;Perform debugging tasks through DBG Debugging via XCP slaves.&lt;/li&gt;
&lt;li&gt;Flash new data into control units indicated by PGM Programming status changes.&lt;/li&gt;
&lt;li&gt;Change calibration pages, with CAL Calibration/Paging switches.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;XCP‎‎ Master-Slave‎‎ Status‎‎ Exchange&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In electronic control units (ECUs) the XCP slave and the ECU application can function independently. The XCP slave may remain active when the ECU application is not running or it may be inactive. It communicates its status to the XCP master using the GET_STATUS command. The XCP slave shares information, about its status, protected resources, authentication, through seed and key and other relevant details. If the XCP slave is capable of sending event messages it will transmit an EV_ECU_STATE_CHANGE event to the XCP master allowing the master to obtain updated details using the GET_STATUS command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mode‎‎ of‎‎ Standard‎‎ Communication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnez3nz9h6fggyx1wkqii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnez3nz9h6fggyx1wkqii.png" alt="Image description" width="544" height="791"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The diagram illustrates the‎‎ standard‎‎ exchange&lt;/p&gt;

&lt;p&gt;The individual, in charge initiates a request. Awaits the response, from the subordinate before issuing another directive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mode‎‎ of‎‎ Master‎‎ Block‎‎ Transfer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsbfi4ao7014iczv8avt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmsbfi4ao7014iczv8avt.png" alt="Image description" width="800" height="606"&gt;&lt;/a&gt;&lt;br&gt;
The diagram illustrates the Master Block Transfer Mode&lt;/p&gt;

&lt;p&gt;where the master can issue commands to a slave without waiting for responses. The block transfer mode is an option to speed up data transfers. Its crucial to consider performance factors and communication settings like time intervals, between commands and the maximum number of commands sent before receiving a response. The master has the ability to obtain these configurations from the slave by utilizing the GET_COMM_MODE_INFO command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mode‎‎ of‎‎ Slave‎‎ Block‎‎ Transfer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa58gi2i7bviqzc63dfls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa58gi2i7bviqzc63dfls.png" alt="Image description" width="628" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The diagram illustrates the Mode‎‎ of‎‎ Slave‎‎ Block‎‎ Transfer&lt;/p&gt;

&lt;p&gt;Next we have the Slave Block Transfer Mode depicting how the slave can send frames to the master to optimize time especially when updating data status. The command used for this is UPLOAD, in XCP. It's worth mentioning that the restrictions discussed for Master Block Transfer Mode don't come into play when we talk about Block Transfer Mode from the masters end as the master consistently delivers performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mode‎‎ of‎‎ Interleaved‎‎ Communication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0n5aql2mm05gpoqvmzc3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0n5aql2mm05gpoqvmzc3.png" alt="Image description" width="669" height="994"&gt;&lt;/a&gt;&lt;br&gt;
Lastly we have Interleaved Communication Mode illustrated in another diagram.&lt;/p&gt;

&lt;p&gt;In conversations we often pause to let each other speak before responding. However in communication mode data transmission happens faster as the master can send requests one, after another while considering the buffer size of the slaves. Similarly slaves can respond consecutively without restrictions from the master. It's worth noting that this mode cannot coexist with block mode since it is optional and not relevant.&lt;/p&gt;

&lt;p&gt;In XCP there are three modes. Standard, Block and Interleaved. That facilitate the exchange of commands and responses between the Master and Slave.&lt;/p&gt;

&lt;p&gt;The CAN communication model adheres to a standard where each request to a Slave elicits one response. This ensures that each XCP message can be easily traced back to its Slave.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzf8qd1og6dfamqki1voh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzf8qd1og6dfamqki1voh.png" alt="Image description" width="580" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While the block transfer mode is optional it proves advantageous, for handling data transfers involving amounts of data. However performance considerations should be taken into account when utilizing this mode. Specific time intervals (MIN_ST) should be maintained between commands and the total number of commands should not exceed a set limit (MAX_BS). The Master can obtain communication settings from the Slave using the GET_COMM_MODE_INFO function. Nevertheless these limitations do not apply to block transfer mode as PCs typically have capabilities to manage data from a microcontroller.&lt;/p&gt;

&lt;p&gt;Interleaved mode can also be selected as an option. It doesn't hold importance. &lt;/p&gt;

&lt;p&gt;This‎‎ concept‎‎ will‎‎ be‎‎ covered‎‎ more‎‎ in‎‎ the‎‎ next‎‎ article,‎‎ with‎‎ examples.&lt;/p&gt;

&lt;p&gt;Do‎‎ let‎‎ me‎‎ know‎‎ if‎‎ you‎‎ have‎‎ any‎‎ queries‎‎ in‎‎ the‎‎ comments‎‎ below.&lt;/p&gt;

&lt;p&gt;Thanks‎‎ for‎‎ reading.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding AUTOSAR; Developing Vehicle Software with a Clear Explanation Part-2</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Wed, 07 Feb 2024 14:22:29 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/understanding-autosar-developing-vehicle-software-with-a-clear-explanation-part-2-l5n</link>
      <guid>https://dev.to/arvind_b_n_luxoft/understanding-autosar-developing-vehicle-software-with-a-clear-explanation-part-2-l5n</guid>
      <description>&lt;p&gt;Hello Readers,‍‍‍‍‍‍‍‍󠁲&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a Junior Software Developer. Luxoft has given me several opportunities to work on various projects, these experiences have inspired me to involved in learning of Autosar is developing vehicle software with a clear explanation of functional software development Part-2.&lt;/p&gt;

&lt;h2&gt;
  
  
  "Functional Software Development"
&lt;/h2&gt;

&lt;p&gt;In the stages the vehicles functional software is described as a system. This system is further divided into sub functionalities known as SWCs(Software Components). These Software Components exchange information (Data Elements), with SWCs through predefined interfaces (Ports).&lt;/p&gt;

&lt;p&gt;In a sense the entire communication between the Software Components is managed by the VFB. Since it hasn't been determined yet which software component is assigned to which Electronic Control Unit this perspective is purely logical. The VFB represents communication within and, between ECUs without any knowledge of the underlying technologies. This allows for development and utilization of application software regardless of the hardware.&lt;/p&gt;

&lt;p&gt;Once all SWCs and interfaces are established and defined they are distributed to their ECUs.&lt;br&gt;
First the ECU specific RTE implements the Virtual Functional Bus(VFB). The Run-Time Environment is responsible, for managing communication between software components and with the assistance of the operating system handles the execution of these components.&lt;/p&gt;

&lt;p&gt;A Runnable Entity serves as the execution unit. Is ultimately implemented as a C function. The developer configures function calls to these entities, which are later executed by the RTE. For instance this could occur periodically or spontaneously in response, to receiving a data element.&lt;/p&gt;

&lt;p&gt;For communication interfaces AUTOSAR provides ports. There are two methods distinguished in this context;&lt;/p&gt;

&lt;p&gt;In SR(Sender Receiver) communication data elements are sent from one software component to another. This form of communication is widely utilized among application software components.&lt;br&gt;
Syntax example; When it comes to CS (Client Server) communication the Client can initiate a call, to a Servers operation either asynchronously or synchronously. This can be likened to a function call. Is commonly used between applications and Basic Software services such as diagnostics and memory management.&lt;/p&gt;

&lt;p&gt;Syntax example; In order to perform an operation the SWC interfaces with its runnables, which are detailed in a created SWC Description. However AUTOSAR does not provide any capabilities, for describing the behavior.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fco3fx01lef2pubwdlywp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fco3fx01lef2pubwdlywp.png" alt="Image description" width="661" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This image demonstrates how logical system components are mapped to hardware components, within the software architecture specifically in the AUTOSAR framework.&lt;/p&gt;

&lt;p&gt;On the side of the image there are two boxes labeled "logical" representing logical software components. One box is labeled "Door". The other is labeled "Light." These boxes represent the software functionality for controlling a door and a light. Below these components there is a dashed outline labeled "VFB," which stands for Virtual Functional Bus. The VFB serves as a layer within AUTOSAR that enables software components to communicate with each other in a hardware manner. The icons, below the components depict sensors or actuators associated with the door and light functions.&lt;/p&gt;

&lt;p&gt;On the side of the image you'll see two gray boxes labeled "physical." These represent the hardware units, in a vehicle; one is for the Door Electronic Control Unit (ECU). The other is for the Roof ECU. An ECU is responsible for running software components in a vehicle. Within each ECU box there are boxes that correspond to the components mentioned on the left side. For example "Door" is within the "Door ECU" box and "Light" is, within the "Roof ECU" box. This demonstrates how logical software components are allocated to ECUs.&lt;/p&gt;

&lt;p&gt;Underneath the software components, within the ECUs there is a designated area called "RTE" which stands for Runtime Environment. The RTE plays a role in the AUTOSAR architecture by implementing the Virtual Function Bus (VFB) on an ECU. Its main function is to establish communication interfaces between software components and the underlying hardware as facilitating communication between different software components within the same ECU or, across multiple ECUs.&lt;/p&gt;

&lt;p&gt;The arrow connecting the physical sides represents the process of linking the components to the physical ECUs. This step plays a role, in software development as it determines how software functions are distributed among different ECUs in a vehicle. The mapping process takes into account factors like ECU resources, communication bandwidth and system latency to ensure performance and efficiency of software functions, in the vehicle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8utthdgxomq0kkm69zdn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8utthdgxomq0kkm69zdn.png" alt="Image description" width="757" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this image two different approaches, to software development for a Door Electronic Control Unit (ECU) are compared. On the side we see a method without AUTOSAR while on the right side we have an approach that incorporates AUTOSAR.&lt;/p&gt;

&lt;p&gt;The left portion of the image represents the software development approach for a Door ECU. It includes a block called "Main Function" which represents the functionality of the software. Below this block there are three interfaces; DIO (Direct Input/Output) μC (Microcontroller) and CAN (Controller Area Network).&lt;/p&gt;

&lt;p&gt;On the side of the image there is a code snippet written in C language (fct_Door_Left). This function is called cyclically by the program loop. It interacts directly with the hardware. It reads the state of the door from an I/O port (ReadIOport). Sends a message, over the CAN network (SendCANmessage).&lt;/p&gt;

&lt;p&gt;When it comes to AUTOSAR there's an approach shown on the side of the image for the Door ECU. In this approach the software component (SWC) is identified as "Left Door." The block labeled "Runnable; Door Left" represents a piece of code that runs periodically specifically every 100 milliseconds as indicated in the code snippet. The RTE (Runtime Environment) block serves as the AUTOSAR layer that separates hardware details, from software components enabling hardware software development. Below the RTE you'll find layers such, as IoHWAb (I/O Hardware Abstraction) PDU (Protocol Data Unit) COM (Communication) and DIO DRV (Direct Input/Output Driver). These layers abstract the hardware interfaces.&lt;/p&gt;

&lt;p&gt;The code snippet, on the right demonstrates a function called "Door_Left" that follows AUTOSAR standards. This function utilizes RTE calls like "Rte_Call_DoorIOState_Op_Get" and "Rte_Write_DoorState_Door" to interact with the door state. These RTE calls provide an abstraction layer allowing for portable software development by abstracting direct hardware manipulation.&lt;/p&gt;

&lt;p&gt;The image illustrates the contrast, between embedded software development, where software is closely tied to hardware and AUTOSAR based development. In AUTOSAR based development software components are decoupled from the hardware through interfaces and abstraction layers. This approach enables reusability, maintainability and scalability of applications.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding AUTOSAR; Developing Vehicle Software with a Clear Explanation Part-1</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Wed, 07 Feb 2024 14:15:35 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/understanding-autosar-developing-vehicle-software-with-a-clear-explanation-part-1-93f</link>
      <guid>https://dev.to/arvind_b_n_luxoft/understanding-autosar-developing-vehicle-software-with-a-clear-explanation-part-1-93f</guid>
      <description>&lt;p&gt;Hello Readers,‍‍‍‍‍‍‍‍󠁲&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a Junior Software Developer. Luxoft has given me several opportunities to work on various projects, these experiences have inspired me to involved in learning of Autosar is developing vehicle software with a clear explanation of exchange formats.&lt;/p&gt;

&lt;h2&gt;
  
  
  Formats for AUTOSAR Exchange
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The AUTOSAR framework defines exchange formats.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SWC Description;&lt;/strong&gt; The supplier or OEM is responsible, for defining the SWCs. This involves creating an XML file for each SWC, known as the SWC Description. It provides details about the interfaces and resource requirements of the SWC. Afterwards the supplier or OEM generates the C files to implement it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System Description;&lt;/strong&gt; The OEM begins by defining the content, for the vehicle independent of individual ECUs based on the SWCs. Subsequently they design communication networks. Distribute the SWCs to existing ECUs. The outcomes are then recorded in the system description.&lt;/p&gt;

&lt;p&gt;According to &lt;strong&gt;AUTOSAR 4.0&lt;/strong&gt; the OEM simplifies the system description, for each ECU into a condensed version called the System Extract of System Description. This condensed file can be shared with the suppliers of the ECU replacing the used.dbc, FIBEX or.ldf files for BSW module configuration.&lt;/p&gt;

&lt;p&gt;To generate an &lt;strong&gt;ECU Extract of System Description (ECUEX)&lt;/strong&gt; a process known as "Flattening" is employed. This process aligns with the System Extract. Only includes the software components (SWCs), in a straightforward manner. The Tier1 supplier has the option to expand the ECU Extract by adding their SWCs that were developed in house.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AUTOSAR 3; ECU Extract of System Description;&lt;/strong&gt;&lt;br&gt;
For each ECU the OEM condenses the System Description into an ECU Extract of System Description. This condensed file is then provided to the ECU suppliers of using.dbc, FIBEX or.ldf files, for BSW module configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complete Electronic Control Unit(ECU) Extract of System Description;&lt;/strong&gt;&lt;br&gt;
beginning with the system description provided by the provider for the ECU extract incorporates their SWCs. The outcome is an updated ECU(Electronic Control Unit) Extract of System Description that includes descriptions for all SWCs on an ECU, from both the OEM(Original Equipment Manufacturer) and the supplier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The BSW(Basic Software) Module Description files&lt;/strong&gt; serve as a requirement, for ECU configuration. They contain the definitions of data structures and all configurable parameters of a Basic Software module. These files are implementation specific and along with the generators form part of the code content, in the BSW modules provided by the AUTOSAR stack supplier.&lt;/p&gt;

&lt;p&gt;The initial creation of the ECU Configuration Description (ECUC) is done by the supplier, who relies on both the ECU Extract of System Description &amp;amp; the BSW(Basic Software) Module Description files. The supplier then proceeds to configure the ECU using this ECUC for documentation purposes. This involves utilizing tools to set and verify the parameters of the Basic Software modules and RTE. The ECUC serves as a foundation, for generating RTE &amp;amp; BSW modules specific to the ECU accomplished through associated generators.&lt;/p&gt;

&lt;p&gt;The flexibility of the AUTOSAR method ensures its suitability for meeting requirements across projects and OEMs. For instance, in the System Description the use of software components is not mandatory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqcnj6lixst350jhp7hs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqcnj6lixst350jhp7hs.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The image appears to show a flowchart or diagram that explains how software components, for electronic control units (ECUs) are developed using the AUTOSAR (AUTomotive Open System ARchitecture) methodology. AUTOSAR is an architecture for software that enables the interchangeability and compatibility of software components within vehicle ECUs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's a step-by-step breakdown of the diagram&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 1;&lt;/em&gt; &lt;strong&gt;Defining Software Components (SWC);&lt;/strong&gt; The process starts by defining software components using development tools. These components are described in.c/.h files (source and header files, in C programming language) and.xml files, which may contain configuration or definition data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AUTOSAR System Development Tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 2.1;&lt;/em&gt; &lt;strong&gt;Model and Code Generation;&lt;/strong&gt; A model based development tool is used to create models of the software components and generate the corresponding code.&lt;br&gt;
&lt;em&gt;Step 2.2;&lt;/em&gt; &lt;strong&gt;Validating the code;&lt;/strong&gt; Next we proceed to implement and validate the generated code to ensure that it meets all the required specifications. This step also involves using templates. May require working with files that were coded by hand.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 3;&lt;/em&gt; &lt;strong&gt;Distributing software components;&lt;/strong&gt; After the implementation and validation process we distribute the software components. This means making them available, for integration into the system.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 4;&lt;/em&gt; &lt;strong&gt;Defining the network;&lt;/strong&gt; We define the network in which these software components will operate. This includes specifying how different Electronic Control Units (ECUs) and components will communicate with each other.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 5;&lt;/em&gt; &lt;strong&gt;Involvement of OEM (Original Equipment Manufacturer);&lt;/strong&gt; The OEM plays a role, in generating the system description, which provides a high level overview of both system requirements and architecture.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 6;&lt;/em&gt; &lt;strong&gt;Extracting ECU Requirements;&lt;/strong&gt; We extract the requirements of an Electronic Control Unit from the overall system description outlining its responsibilities within the vehicles network.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 7;&lt;/em&gt; &lt;strong&gt;Configuring. Bsw;&lt;/strong&gt; We configure the RTE (Runtime Environment) and BSW (Basic Software). The RTE acts as a middleware that enables communication, between software components while the BSW provides services like diagnostics, communication and memory management.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 8;&lt;/em&gt; &lt;strong&gt;Generating. Bsw;&lt;/strong&gt; Based on the configurations we generate the RTE and BSW. These components are crucial for ensuring functionality of software within the ECU.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 9;&lt;/em&gt; &lt;strong&gt;Tier 1 Supplier;&lt;/strong&gt; This term likely refers to a supplier in the industry. A Tier 1 supplier directly supplies, to OEMs (Original Equipment Manufacturers). The responsibility of a supplier is to deliver BSW module descriptions and configuration files.&lt;/p&gt;

&lt;p&gt;⁤The diagram also illustrates how information flows between these steps with arrows indicating the direction of the workflow. ⁤⁤The presence of .xml/.c/.h and.a2l files implies that the process combines configuration, programming and potentially calibration or parameter definition activities. ⁤&lt;/p&gt;

</description>
    </item>
    <item>
      <title>AutoSAR Testing, Tool, Migration Overview</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Sat, 27 Jan 2024 14:54:12 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/autosar-testing-tool-migration-overview-3b37</link>
      <guid>https://dev.to/arvind_b_n_luxoft/autosar-testing-tool-migration-overview-3b37</guid>
      <description>&lt;p&gt;Hello Readers,‍‍‍‍‍‍‍‍󠁲&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a Junior Software Developer. Luxoft has given me several opportunities to work on various projects, these experiences have inspired me to involved in learning of Autosar Testing, Tools and Migration procedures.&lt;/p&gt;

&lt;h2&gt;
  
  
  AutoSAR Tools
&lt;/h2&gt;

&lt;p&gt;There are tools employed in developing AUTOSAR ECU software. These tools are categorized into the following types;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools for system design&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Tools, for system design; these help in defining the network architecture, communication &amp;amp; also assist in the design and distribution of software of the software components (SWCs).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tools for configuration of the software and RTE; Additionally these tools aid, in generating a configuration description of the BSW modules in the Electronic Control Unit (known as ECU Configuration Description).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code generators for BSW modules; Through code generators that are based on the Electronic Control Unit Configuration Description. produce configured Basic Software (BSW) modules, for the Electronic Control Unit.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These tasks are usually handled by tools. Hence an important aspect of AUTOSAR involves a XML format that can be used as the foundation, for exchanging design &amp;amp; config1uration data b/w tools.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4jspkoppl5owhvplsolw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4jspkoppl5owhvplsolw.png" alt="Image description" width="541" height="803"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Standardization plays a role because development projects often involve using tools from manufacturers. For instance the microcontroller independent BSW may be provided by one software company while the MCAL and its associated code generators are developed by the semiconductor manufacturer.&lt;/p&gt;

&lt;p&gt;In some cases each BSW module might even require a tool. However it is generally recommended to use a tool, for configuring the BSW in scenarios.&lt;/p&gt;

&lt;h2&gt;
  
  
  AutoSAR Migration Solutions
&lt;/h2&gt;

&lt;p&gt;The AUTOSAR standard enables the migration of ECU software that was not originally developed according to the AUTOSAR method, into the AUTOSAR environment. To facilitate this AUTOSAR provides a Complex Driver, which can be regarded as a type of software component that does not necessitate a formalized description following the SWC template.&lt;/p&gt;

&lt;p&gt;This can be perceived as a kind of software component (SWC) that does not necessitate a description using the SWC template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqyofxfp04cxugqs0541.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqyofxfp04cxugqs0541.png" alt="Image description" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Complex Device Driver can directly access the AUTOSAR software without relying on the RTE. This means that, from the applications perspective only the basic software undergoes changes while the application itself can mostly remain unchanged. In the context of migration we can also view the application as a device driver. This can be seen as a step towards an AUTOSAR software architecture, which is considered to be the cost effective approach, in terms of development effort.&lt;/p&gt;

&lt;p&gt;By adopting this approach we can already start benefiting from AUTOSAR functionalities. For example we can periodically call upon parts of the application through the RTE. Utilize communication and diagnostics services via the RTE while keeping implementation of our application core AUTOSAR compliant.&lt;/p&gt;

&lt;p&gt;In the run we remove the parts of the application that don't adhere to AUTOSAR. Specifically we eliminate all task bodies. Calls, into the operating system well as any points with interrupt blocking and other basic software accesses. We replace them with elements that're compliant with AUTOSAR standards. By using a design approach we can implement these application portions more efficiently, than before.&lt;/p&gt;

&lt;h2&gt;
  
  
  AUTOSAR ECUs Testing
&lt;/h2&gt;

&lt;p&gt;During the testing phase the same approaches can be applied to AUTOSAR ECUs as those used for Electronic Control Units, with different internal software architectures. When we view the ECU as a box we only need to consider the following aspects;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Network Management (NM):&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AUTOSAR makes use of a Network Management Protocol that differs from hired protocols like OSEK Network Management. In our take a look at surroundings it's far important to remember this NM protocol and make certain that we adequately take care of and process the messages, at the network channels.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;File Formats for Network Communication Description:&lt;/strong&gt;
The System Description includes a description of network connectivity in AUTOSAR. earlier forms such, as.dbc, FIBEX or.ldf (depending on OEM requirements) have been replaced by a format. The test environment should be capable of processing this format.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AUTOSAR gives a software program structure that brings an advantage, for trying out and debugging ECUs. This shape ensures the availability of nation variables in every AUTOSAR Electronic Control Unit, which may be used within the testing surroundings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frodlfexzm15k9l9io7o3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frodlfexzm15k9l9io7o3.png" alt="Image description" width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For instance the ECU state is available through the EcuM module while communication states of network channels within the ComM module's storage. By implementing BSW modules these state variables can be accessed via an XCP connection to the Electronic Control Unit whether it's through an interface for debugging or one of the networks like JTAG or Nexus. BSW generators can provide an A2L description file that corresponds to these state variables. Alternatively AUTOSAR offers a Monitoring &amp;amp; Debugging protocol specifically designed for this purpose.&lt;/p&gt;

&lt;p&gt;AUTOSAR also provides advantages when it comes to accessing the application level. For instance the Runtime Environment (RTE) can be generated in a manner that enables access, to the data, between the SWCs. Additionally the Runtime Environment (RTE) generator can produce an A2L file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Conclusion;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AUTOSAR takes an approach to develop ECU software offering tools, for system design, software configuration and code generation. These tools establish a foundation for automotive systems. AUTOSARs migration solutions utilize Device Drivers to integrate existing software into the AUTOSAR environment. The standardized internal software architecture ensures access to state variables, which greatly benefits testing and debugging processes. Overall adopting AUTOSAR not streamlines development processes. Also showcases the automotive industrys commitment to reliability, efficiency and adaptability. This represents an advancement, in the evolution of ECU software. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Classic AutoSAR Basic S/W and Runtime Environment (RTE)</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Mon, 22 Jan 2024 03:57:43 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/classic-autosar-basic-sw-and-runtime-environment-rte-20gb</link>
      <guid>https://dev.to/arvind_b_n_luxoft/classic-autosar-basic-sw-and-runtime-environment-rte-20gb</guid>
      <description>&lt;p&gt;Hello Readers,‍‍‍‍‍‍‍‍󠁲&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a Junior Software Developer. Luxoft has given me several opportunities to work on various projects, which has inspired me to discuss the important processes involved in learning the Autosar Basic s/w and Runtime Environment (RTE). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before going to the topic, let's know the simple basic concept of the AutoSAR layers.&lt;/p&gt;

&lt;p&gt;Application layer:&lt;br&gt;
The Application Layer is responsible, for executing the application functionality of the Electronic Control Unit. It comprises software components.&lt;/p&gt;

&lt;p&gt;Service Layer:&lt;br&gt;
The Service Layer offers a variety of background services, such, as memory management and bus communication services. Additionally, the operating system is included within this layer.&lt;/p&gt;

&lt;p&gt;ECU Abstraction Layer [ECUAL]:&lt;br&gt;
The Electronic Control Unit (ECU) Abstraction Layer provides a consistent way to access all the features of an Electronic Control Unit, including communication, memory and I/O. This applies regardless of whether these functionalities are integrated within the microcontroller or implemented through peripheral components.&lt;/p&gt;

&lt;p&gt;Microcontroller Abstraction Layer [MCAL]: &lt;br&gt;
The Microcontroller Abstraction Layer consists of drivers that are specifically designed to interface with the microcontroller's memory, communication and I/O functionalities.&lt;/p&gt;

&lt;p&gt;Complex Device Drivers [CDD]&lt;br&gt;
The Complex Drivers contain the drivers for the soecific properties of a microcontroller or Electronic Control Unit (e.g. complex peripheral devices) which are not standardized in AUTOSAR. They comprise functions for sensor evaluation and controller monitoring with&lt;br&gt;
direct access to the microcontroller.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Software:
&lt;/h2&gt;

&lt;p&gt;An AUTOSAR system is described using Software Components, which are connected through the VFB (or ECU RTEs). This abstraction may give the impression that AUTOSAR Basic Software solely focuses on communication. However, this is not true.&lt;/p&gt;

&lt;p&gt;AUTOSAR Basic Software also offers Electronic Control Unit services such, as state management (ECU state and control of communication channels) diagnostic services, watchdog services, operating system functionality and management of nonvolatile memory. Even input/output (IO) is included within the scope of AUTOSAR standardization.&lt;/p&gt;

&lt;p&gt;Semiconductor manufacturers play a role in the standardization of the topic, input and output. They supply the low-level software layer (MCAL). As a result of this standardization certain issues that were previously handled by Electronic Control Unit suppliers now fall under the responsibility of software suppliers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fop7hc4u39ot3ctydjh7u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fop7hc4u39ot3ctydjh7u.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The graphics (as shown in the above figure), on the demonstrate the software architecture of MICROSAR, which's the Vector implementation of the AUTOSAR Std.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Basic Software's attributes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Software components can only adopt abstraction if the necessary mechanisms are available, from the Basic Software (BSW). To achieve this the BSW complements the Runtime Environment (RTE) by providing these mechanisms. This is especially evident in terms of the communication stack and operating system which are closely intertwined with the RTE and its functioning.&lt;/p&gt;

&lt;p&gt;For instance the BSW is responsible for generating events and supplying timers for the RTE. It also facilitates data transfer across Electronic Control Unit boundaries through communication buses. As for executing Runnable Entities within software components both flow control and system state management fall under the purview of software. Additionally it offers synchronization primitives to ensure access, by processes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Runtime Environment:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Optimal Configuration Overview&lt;/strong&gt;&lt;br&gt;
The efficient Run Time Environment (RTE) is required to implement the communication and call mechanisms described in the Software Components. When formal descriptions of the SWCs are available it becomes possible to analyze the software design and derive, generate and optimize the runtime environment.&lt;/p&gt;

&lt;p&gt;The formalized description of a software design includes information, about how a Runnable Entity's called within its context and how it interacts with parts of the same SWC or another SWC. By considering constraints, like the configuration of the software decisions can be made regarding the optimal implementation of a function call.&lt;/p&gt;

&lt;p&gt;To effectively manage the system, we need to make decisions, about.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Choosing a method to prevent access, from running entities if necessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deciding on the method of making calls.&lt;br&gt;
Direct calls (like a macro or C function call)&lt;br&gt;
Calls triggered by an RTE Event in conjunction, with the operating system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Determining the type of write or read access.&lt;br&gt;
Accessing a Calling an API of the Basic Software.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Calls can be made either directly like a macro or C function call or through an RTE Event triggered alongside the operating system.&lt;/p&gt;

&lt;p&gt;We also need to consider the type of read or write access required. This could involve accessing a variable or making API calls in the Basic Software. It's important to consider the semantics of access types and how they are implemented.&lt;/p&gt;

&lt;p&gt;The specific configuration will determine the impact of these decisions, on performance.&lt;/p&gt;

&lt;p&gt;Generally the generator, in the runtime environment should minimize its reliance, on OS events and alarms. By configuring the system appropriately valuable resources can be. Execution time can be reduced. To achieve this it is important to comprehend the impact of design choices made during the software components design phase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic S/w Dependencies on original equipment manufacturers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One characteristic of AUTOSAR software is its modular nature. This modularization occurs both horizontally dividing it into task areas or clusters and vertically splitting it into abstraction levels or layers. AUTOSAR allows for levels of granularity, in the Basic Software, known as Implementation Conformance Classes (ICC). This flexibility enables the combination or clustering of BSW modules ranging from a software consisting of just one module to a comprehensive basic software covering all functionalities.&lt;/p&gt;

&lt;p&gt;It's important to note that AUTOSAR Basic Software is not necessarily specific to an Original Equipment Manufacturer. However there are aspects where the BSW stacks of Original Equipment Manufacturer's typically differ.&lt;/p&gt;

&lt;p&gt;For instance these stacks may vary in terms of the number and task areas allocated to BSW modules that're not part of the standard AUTOSAR. Additionally there might be extensions, in the form of Software Components added to the AUTOSAR Basic Software stack.&lt;br&gt;
In the structure of the Basic Software there are variations, in the following areas;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Diagnostic Event. Diagnostic Communication Manager&lt;/li&gt;
&lt;li&gt;Handling of communication channels&lt;/li&gt;
&lt;li&gt;Network management&lt;/li&gt;
&lt;li&gt;Gateway functionality for communication&lt;/li&gt;
&lt;li&gt;Specific services like encryption modules and proprietary transport protocols&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When it comes to configuring the Basic Software there are also differences in work processes among Original Equipment Manufacturer's;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The way Original Equipment Manufacturer requirements are provided (such as.dbc file, ECU Extract of System Description or separate SWC descriptions)&lt;/li&gt;
&lt;li&gt;Diagnostics layout and parameter setting (using ODX, CANdela file, etc.)&lt;/li&gt;
&lt;li&gt;General requirements, like build configuration capability of the communication stack and delivery of libraries to suppliers&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The graphics (as shown in the top figure), on the demonstrate the software architecture of MICROSAR, which's the Vector implementation of the AUTOSAR Std's.&lt;/p&gt;

&lt;p&gt;Basic Software Origins&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrwapczo9bqth26l3xfg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrwapczo9bqth26l3xfg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Suppliers have approaches when it comes to handling the software among Original Equipment Manufacturers.&lt;/p&gt;

&lt;p&gt;For instance there are models where the Original Equipment Manufacturer has already obtained the rights to the hardware components of the fundamental software, from a specific software producer. In situations the supplier only needs to acquire the hardware components. On the hand in some cases the Original Equipment Manufacturer supplies the supplier with pre integrated basic software packages, for various target platforms without any cost involved.&lt;/p&gt;

&lt;p&gt;In some cases the Original Equipment Manufacturer specifies the functionality of the software modules, for other models. However they leave the implementation and integration of the Electronic Control Unit up, to the supplier. The supplier then has the flexibility to procure these modules from software producers. Integrate them into a comprehensive basic software package on their own.&lt;/p&gt;

&lt;p&gt;Some major suppliers have developed their versions of AUTOSAR software and therefore also serve as software producers for these, in house developments. Depending on the relationship, with the Original Equipment Manufacturer there may be negotiations needed regarding the utilization of this software.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>XCP - Universal (X) Measurement and Calibration (C) Protocol (P).</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Mon, 08 Jan 2024 15:43:23 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/xcp-universal-x-measurement-and-calibration-c-protocol-p-1f0m</link>
      <guid>https://dev.to/arvind_b_n_luxoft/xcp-universal-x-measurement-and-calibration-c-protocol-p-1f0m</guid>
      <description>&lt;p&gt;Hello Readers,&lt;br&gt;
My name is Aravind B N, and I work at "Luxoft India" as a Junior Software Developer. Luxoft has provided me with numerous opportunities to work on challenging projects, which has inspired me to discuss the important processes involved in developing and learning the Universal Measurement and Calibration Protocol in detail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When it comes to tuning ECUs the process of parameterization plays a role. It entails making adjustments, to the parameter values while the system is operational and gathering measured signals simultaneously. To establish a connection, between the development tool and the ECU, a measurement and calibration protocol called XCP is commonly used as an accepted standard. In this explanation we will delve into the fundamentals and mechanics of XCP as explore its application areas and how it enhances ECU calibration.&lt;/p&gt;

&lt;p&gt;XCP, additionally known as Universal Measurement and Calibration Protocol is a protocol that became evolved by means of the Association, for Standardisation of Automation and Measuring Systems (ASAM). ASAM consists of car manufacturers, vendors and device manufacturers. XCP replaced the CAN Calibration Protocol (CCP) which furnished get admission to to ECU statistics through CAN for each studying and writing purposes. The motive in the back of developing XCP become to permit this capability using transmission media which include CAN, FlexRay or Ethernet. The number one applications of XCP include measuring and calibrating ECU parameters to make certain data, across ECU procedures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's start with some XCP facts:&lt;/strong&gt;&lt;br&gt;
The idea, behind XCP (X Case Process) is a tool that allows developers to gain insights into the ECU and its software like looking inside a box. This enables developers apprehend how the ECU behaves for the duration of every computation cycle enabling them to optimize algorithms and perceive regions for development. XCP can be used to test the functionality of the improvement development whether or not its running on hardware or primarily based on models. This approach significantly contributes to the development procedure.&lt;/p&gt;

&lt;p&gt;The important awareness lies in evaluating the procedure in improvement environments like Simulink. Developers can analyze parameters at some point of version runtime or after engaging in checks to attain results. It's critical to have get admission to, for making parameterization modifications. The number one objective is. Optimizing thru parameterization modifications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The interface model of ASAM&lt;/strong&gt;&lt;br&gt;
The ASAM interfaces version defines XCP, which incorporates interfaces to the dimension and calibration device, description document, and higher-stage automation gadget.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2qs6jf3ft1epscna3euo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2qs6jf3ft1epscna3euo.png" alt="Image description" width="800" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The "ASAM MCD-1 MC" interface, among ECU and dimension &amp;amp; calibration system, describes bodily and protocol-particular parts. However, it in no way obtained general recognition and has no relevance today. The XCP protocol is flexible enough for producer-impartial interfaces, making ASAP1b needless.&lt;/p&gt;

&lt;p&gt;The "ASAM MCD-2 MC" A2L ECU description file is a necessary file for users to work with symbolic object names, as XCP operates in an address-orientated manner, making it inconvenient to look for ECU gadgets based totally on addresses.&lt;/p&gt;

&lt;p&gt;The "ASAM MCD-3 MC" automation interface connects a system to a size and calibration device, however isn't always defined in this report because of its beside the point nature.&lt;/p&gt;

&lt;p&gt;XCP is a measurement and calibration protocol based at the Master-Slave principle, wherein the ECU is the Slave and the dimension and calibration tool is the Master.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xwgz0conif9p1mcxndq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xwgz0conif9p1mcxndq.png" alt="Image description" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Several individuals can communicate with an authority simultaneously taking into account data and access, to settings throughout the development process. This eliminates the need for duplication of configurations. Streamlines iterative loops. XCP solutions are already employed in work settings. This book aims to elucidate the fundamental characteristics of the measurement and calibration protocol and introduce its application in different operational contexts. It does not provide XCP specifications or instructions, for integrating XCP drivers into environments. &lt;/p&gt;

&lt;p&gt;In this e book we utilize the CANape measurement and calibration tool offered by Vector to capture screenshots of the PC device in use. Moreover it provides insights, into system processes including the creation of an A2L file. You can access a free demo version of CANape on Vectors Download Center, at &lt;a href="http://www.Vector.Com/canape_demo"&gt;www.Vector.Com/canape_demo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fundamentals of the XCP protocol&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The XCP Protocol is a fundamental device used for transferring facts between computers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnujbosfo0a1bvng3qf2u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnujbosfo0a1bvng3qf2u.png" alt="Image description" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The XCP Protocol, which is part of the ASAM interfaces version consists of protocol and delivery layers. These layers ensure independence from transport methods. The main objectives of this protocol are to prioritize resource efficiency, in plug and play setups, facilitate communication enable implementation for slaves and ensure minimum parameters and scalability for ECUs. The design aims to achieve optimal resource utilization, efficient communication and straightforward implementation, for slaves.&lt;/p&gt;

&lt;p&gt;XCP protocol, which has been extended to new shipping layers on the grounds that 2005, is called XCP on CAN or Ethernet. Its contemporary version, Version 1.Three, changed into permitted in 2015.&lt;/p&gt;

&lt;p&gt;XCP is a key functionality that lets in study and write get right of entry to the reminiscence of the Slave. &lt;/p&gt;

&lt;p&gt;Read access lets in users to evaluate an internal ECU parameter's temporal response, which changes at particular intervals whilst the processor recalculates and updates it in RAM. One of the strengths of XCP is a obtaining measured data from RAM that exchange synchronously to system flows or occasions inside the ECU, permitting users to evaluate direct relationships among time-primarily based method flows and converting values. &lt;/p&gt;

&lt;p&gt;Write access permits customers to optimize parameters of algorithms in the Slave, with accesses being cope with-oriented. A parameter measurement is initiated by the Master and requested by the Slave at the same time as calibration includes placing the price at deal with 0x9876 to 5.&lt;/p&gt;

&lt;p&gt;This concept will be covered more in the next article, with examples.&lt;br&gt;
Do let me know if you have any queries in the comments below.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding J1939 SAE Protocol: The Complete Guide to Communication in Commercial Vehicles. Part-3</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Tue, 12 Dec 2023 15:28:33 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-3-4hh9</link>
      <guid>https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-3-4hh9</guid>
      <description>&lt;p&gt;Hello Readers, 👋😃&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a junior software developer. Luxoft has given me several opportunities to work on various projects, which has inspired me to discuss the important processes involved in learning the SAE J1939 communication protocol Part 3.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt;&lt;br&gt;
The J1939 21 document outlines the way in which the 29 bit CAN identifier should be understood. Just like how a CAN messages 8 byte data field has start bits and lengths to define signals the CAN identifier is divided into segments, for a parameter group. This means that only A part of the identifier represents the PGN itself while the rest is used to determine source address, destination address, priority and data page. The diagram titled "From the 29 bit CAN Identifier to the Parameter Group" illustrates how a J1939 CAN identifier is structured.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdmn07blm0b3yyf1nmair.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdmn07blm0b3yyf1nmair.png" alt="Image description" width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PGN Format&lt;/strong&gt;&lt;br&gt;
The diagram illustrates that the PDU Specific section can be interpreted in ways. This section serves two purposes; it extends the PDU Format section. Defines a PGN while also specifying a destination address. The rules, for this are as follows;&lt;/p&gt;

&lt;p&gt;If the value in the PDU Format section is than 240 then the content of PDU Specific is treated as the destination address. This is referred to as a PGN in PDU Format 1 or a specific PGN. A PGN in PDU Format 1 can be sent directly to a destination address using point, to point communication. It can also be sent globally using the global address (255). In this way a specific PGN can be transmitted globally to all network nodes.&lt;/p&gt;

&lt;p&gt;If the value of the PDU Format segment is equal, to or greater than 240 it indicates that the PDU Specific segment functions as a group extension. In this scenario there is no destination address. The message will be transmitted to all network nodes. The PDU Format and PDU Specific together form a 16 bit value that corresponds to the Parameter Group Number (PGN). In the case mentioned, where the PDU Format is 2 it is referred to as a PGN.&lt;/p&gt;

&lt;p&gt;How certain PGNs are depicted in the absence of address data required? According to the specification in cases '00' replaces the address information in order to extend the PGN. Therefore;&lt;/p&gt;

&lt;p&gt;If the portion in PDU format includes '0xEE' then the corresponding PGN would be '0xEE00'.&lt;/p&gt;

&lt;p&gt;This approach defines a range, for PGNs as depicted in the "PGN Value Range" graphic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg4xdnbv80x8aqefsq08r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg4xdnbv80x8aqefsq08r.png" alt="Image description" width="689" height="654"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The PGN includes two bits called "Data Page" and "Extended Data Page," which can be moreover counted because the essential info. Consequently, the sort of numbers is divided into four PGN pages. Only 3 of them are applied in J1939.&lt;/p&gt;

&lt;p&gt;The general number of PGNs may be decided as follows: (240 (+ (16x 256)) x 3).&lt;/p&gt;

&lt;p&gt;Here are the available definitions, for each data page;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjdyp96khc0c7c2k5u23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjdyp96khc0c7c2k5u23.png" alt="Image description" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's an example of a Group of Global Parameters&lt;/strong&gt;&lt;br&gt;
Below is a PGN that represents parameter groups in the J1939 standard, commonly used in the industry.&lt;/p&gt;

&lt;p&gt;Global PGN;&lt;/p&gt;

&lt;p&gt;PGN 65262 | Engine Temperature | ET1&lt;/p&gt;

&lt;p&gt;Transmission Rate; 1 second&lt;br&gt;
Data Length; 8 bytes&lt;br&gt;
Data Page; 0&lt;br&gt;
Extended Data Page; 0&lt;br&gt;
PDU Format; 254&lt;br&gt;
PDU Specific; 238&lt;br&gt;
PGN Supporting Information; Optional (if &lt;br&gt;
Default Priority; Priority level 6&lt;br&gt;
Parameter Group Number; 65262 ( representation. 0x00FEEE)&lt;br&gt;
Start Position  Length  Parameter Name   SPN&lt;br&gt;
1        1 byte  Engine Coolant Temperature  SPN 110&lt;br&gt;
2        1 byte  Engine Fuel Temperature 1 , SPN 174&lt;br&gt;
3 4       2 bytes  Engine Oil Temperature   SPN 175 &lt;br&gt;
5 6       2 bytes  Engine Turbocharger Oil Temperature  SPN 176 &lt;br&gt;
7        1 byte  Engine Intercooler Temperature    SPN 52&lt;br&gt;
Please observe that every one the parameter businesses mentioned in the J1939 71 document were consolidated right into a table called J1939 DA.&lt;/p&gt;

&lt;p&gt;Lets check an instance collection of parameters;&lt;/p&gt;

&lt;p&gt;PGN 54528 also called Time/Date Adjust or TDA follows the representation of parameter organizations mentioned within the J1939 popular.&lt;/p&gt;

&lt;p&gt;Here are the details of this PGN;&lt;/p&gt;

&lt;p&gt;Transmission Rate; As wanted&lt;/p&gt;

&lt;p&gt;Date Length; 8&lt;/p&gt;

&lt;p&gt;Data Page; 0&lt;/p&gt;

&lt;p&gt;Extended Data Page; 0&lt;/p&gt;

&lt;p&gt;PDU Format; 213&lt;/p&gt;

&lt;p&gt;PDU Specific; DA&lt;/p&gt;

&lt;p&gt;PGN Supporting Information; Please talk to Appendix D, PGN 65254.&lt;/p&gt;

&lt;p&gt;Default Priority; 6&lt;/p&gt;

&lt;p&gt;Parameter Group Number; 54528 (0x00D500)&lt;/p&gt;

&lt;p&gt;Lets spotlight some parameters regarding time and date adjustment;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adjust seconds; Utilize this parameter to exchange the seconds value.&lt;/li&gt;
&lt;li&gt;Adjust mins; Modify the mins price using this parameter.&lt;/li&gt;
&lt;li&gt;Adjust hours; This parameter allows you to make changes, to the hours.&lt;/li&gt;
&lt;li&gt;Adjust month; Use this parameter to exchange the month.&lt;/li&gt;
&lt;li&gt;Adjust day; Modify the day cost the use of this parameter.&lt;/li&gt;
&lt;li&gt;Adjust close by minute offset; Utilize this parameter to alter the minute offset.You can alter the hour offset through using this parameter. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below are some key Parameter Groups (PGNs) and their descriptions as said in record J1939 80-one.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Address Claimed (PGN 0x00EE00); This is used to pick out an ECU and come across cope with conflicts.&lt;/li&gt;
&lt;li&gt;Commanded Address (PGN 0x00FED8); This network service assigns tool addresses, to ECUs.&lt;/li&gt;
&lt;li&gt;Name Management (PGN 0x009300); This network provider is used to assign and modify the device call (NAME) of an ECU.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please observe that Remote Frames aren't supported in J1939. The Request PGN refers to a CAN statistics body.&lt;br&gt;
Under the J1939 21 standard there are Manufacturer definable PGNs, such, as Proprietary A with identifier 0x00EF00 and Proprietary A1 with identifier 0x01EF00. Additionally there is a PGN range of 256 PGNs defined as Proprietary B with identifiers ranging from 0x00FF00 to 0x00FFFF.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Content&lt;/strong&gt;&lt;br&gt;
In the context of J1939 not are the PGNs defined but their contents. These message contents are commonly referred to as signals, in languages. According to the J1939 specification the term used for describing the contents of a PGN is Suspect Parameter Number (SPN). An SPN essentially represents a signal ID. Can represent values, statuses or commands. SPNs are also defined for protocol information. The J1939 DA currently lists all specified SPNs in table form. An SPN is a number provided by the SAE. The position of the SPN, within a PGN is specified in the PGN description (refer to chapter (A Global Parameter Group example). When interpreting the SPN we start from the right (LSB). Move towards the left (MSB) except for data. It is possible for an SPN to be present in PGNs.&lt;/p&gt;

&lt;p&gt;Each SPN has a format and includes the following attributes;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SPN&lt;/strong&gt;; &lt;strong&gt;Suspect Parameter&lt;/strong&gt; &lt;strong&gt;Number and Name&lt;/strong&gt;&lt;br&gt;
 Description; Provides an explanation of an SPNs function&lt;br&gt;
 Data Length; Indicates the length of data in bits or bytes&lt;br&gt;
 Resolution; Describes how to convert raw values into physical values&lt;br&gt;
 Data Range; Specifies valid physical value ranges&lt;br&gt;
 Type; Identifies signal types, such as measured, status or application dependent signals&lt;br&gt;
 PGN Reference; Refers to the PGN(s) where the specific SPN occurs&lt;/p&gt;

&lt;p&gt;This is identified by the J1939 standard's SLOT 3 specification (The scaling, Limitation, offset, &amp;amp; Transfer Functions) presentation as the description, for each presented SPN.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Value Range&lt;/strong&gt;&lt;br&gt;
Typically when defining a SLOT (Scaling, Limit, Offset and Transfer Function) we don't use the range of values, for an SPN, as the payload. For instance lets consider an 8 bit value (28 = 256) that represents a range of 0...255 values. However Only the range 0....250 is allowed and considered data. The remaining values, in the range from 251 to 255 indicate attributes or conditions of the SPN.&lt;/p&gt;

&lt;p&gt;To illustrate this further lets take the example of a limit switch used to represent the status of a door (OPEN/CLOSE). In this case one bit is required to convey the information. The following values have been defined:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;OPEN&lt;/li&gt;
&lt;li&gt;CLOSE&lt;/li&gt;
&lt;li&gt;ERROR&lt;/li&gt;
&lt;li&gt;SNA (Signal Not Available)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This technique permits us to discover sensor malfunctions or cable breaks and decrease the risk of misinterpretation. The SNA signal status is utilized when an equivalent variation of the device does not support a signal. Refer to Table 1 for a representation of Table 2 shows the ASCII values. for measured discrete values and Table 3 for discrete commands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjtzgn5bbdjgwu39oz4cf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjtzgn5bbdjgwu39oz4cf.png" alt="Image description" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a rule if every bit in an SPN is configured to '1' it signifies an SNA status.&lt;/p&gt;

&lt;p&gt;In the article we will continue exploring this &lt;a href="https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-4-4mi"&gt;topic&lt;/a&gt; with examples.&lt;/p&gt;

&lt;p&gt;Thank you for taking the time to read this.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding J1939 SAE Protocol: The Complete Guide to Communication in Commercial Vehicles. Part-2</title>
      <dc:creator>Aravind B N</dc:creator>
      <pubDate>Mon, 04 Dec 2023 17:25:37 +0000</pubDate>
      <link>https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-2-1bbc</link>
      <guid>https://dev.to/arvind_b_n_luxoft/understanding-j1939-sae-protocol-the-complete-guide-to-communication-in-commercial-vehicles-part-2-1bbc</guid>
      <description>&lt;p&gt;Hello Readers, 👋😃&lt;br&gt;
My name is Aravind B. N., and I work at Luxoft India as a junior software developer. Luxoft has given me several opportunities to work on various projects, which has inspired me to discuss the important processes involved in learning the SAE J1939 communication protocol Part 2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Protocol Description in General&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;SAE&lt;/strong&gt;&lt;br&gt;
The J1939 standard is broken into several papers and chapters. All papers are available for download from the SAE website, either separately or in preassembled bundles.&lt;/p&gt;

&lt;p&gt;&lt;a href="//www.sae.org"&gt;www.sae.org&lt;/a&gt;.&lt;br&gt;
The J1939 specification's individual chapters are not available for free; instead, there is a fee associated with them. Though you may already be familiar with it from the previous chapter, each chapter is organized methodically and is based in part on the ISO or OSI reference model. Only loosely based, as chapter 8 in the J1939 document format is not specified by the OSI model. The "Numbering scheme" image depicts the chapter organization scheme.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outlining&lt;/strong&gt;&lt;br&gt;
A document is present with no number extensions in addition to the structured papers and their appendices. This is the top-level J1939 document, which summarizes all of the protocol's main characteristics. This document's appendices are extremely important. For rapid reference, the manufacturer codes, industry groups, reserved node addresses, parameter groups, and signals are all provided here.&lt;/p&gt;

&lt;p&gt;The current chapters and papers are shown in the table.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmfdti2uio6pmclm574cu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmfdti2uio6pmclm574cu.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Addresses and Names&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Device Names&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Identification&lt;/em&gt;
An exclusive name is needed for any ECU that actively engages in J1939 communication, or transmitting. This is made up of a 64-bit stream. NAME is the definition of the device name in the standard. It includes details about the device's origin and functionality as well as identification and instantiation information. An ECU may be identified globally and characterized into a unique ECU by using the device name. Furthermore, during the dynamic address assignment process, the ECU is given priority based on its device name (see to Chapter Network Management for more information).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Figure "64bit ECU Fields" shows how the J1939 NAME is constructed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyry35klipfjw9ccuaizb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyry35klipfjw9ccuaizb.png" alt="Image description" width="800" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Device Address&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Node Addressing&lt;/em&gt;&lt;br&gt;
Information about the message addressing type is provided by the CAN protocol. This implies that all data is labeled with an identifier and may be processed and assessed in this manner. J1939 has both message addressing and node addressing, which are implemented as software. This enables point-to-point communication. Within a J1939 n/w, a node address is assigned to each bus node for this purpose.&lt;br&gt;
A message gadget called CAN is employed in lots of exceptional fields, along with business manage, constructing automation, and the automobile industry. The protocol relies on nodes—devices related to the community—replacing messages, or packets, as a way to transmit statistics.&lt;br&gt;
A message's supply cope with, vacation spot deal with, data period, and content are all included. While the supply cope with identifies the tool that sent the message, the destination deal with defines the tool to which the message is sent. While the statistics contains the real message payload, the facts length specifies the records's duration in bytes.&lt;br&gt;
Using message addressing, messages are sent via a common conversation channel in a CAN community. J1939, a widespread for the electronic control unit (ECU) in automotive packages, uses this type of addressing. J1939 supports message addressing, which is a software-primarily based addressing scheme that permits factor-to-point communication between nodes.&lt;br&gt;
Message addressing is used to guarantee that messages reach the intended recipient node and to keep away from message duplication or resend, that could lead to extra troubles which includes community congestion. J1939's addressing approach is similar to other messaging protocols like Ethernet and Modbus, which further employ node addressing to transmit source and vacation spot information for messages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Network Types&lt;/em&gt;&lt;br&gt;
Essential: A proper address is required for every ECU that transmits in J1939 n/w. The node address is an 8-bit number that may only be issued to a single node one (static network). However, networks may be built in which nodes autonomously seek for their addresses (dynamic network). It is up to each application which such the two types of networks are utilized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Static&lt;/em&gt;&lt;br&gt;
When a truck's drive train use the J1939 protocol in its traditional definition, a network that is static is often discovered, where the addresses and network topology were predetermined at the time the vehicle was built. The address allocation and topology of such a network stay consistent throughout the vehicle's life cycle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Dynamic&lt;/em&gt;&lt;br&gt;
The topology of dynamic networks can alter during operation. It is possible to add both known and unknown network nodes. Even more than one ECU of the same kind might exist in a network. An instance of a dynamic network in use is the Protocol ISO 11783. which is utilized in agricultural engineering to facilitate interaction b/w an implement and its attachments.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;General&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;PGN&lt;/em&gt;&lt;br&gt;
A group of data that share a common transmission rate because they are part of the same context is known as a parameter group. A Parameter Group Number (PGN) is a special number that serves as an identity for each parameter group. It is simple to mistake the parameter group for the CAN identification. This chapter aims to clarify the distinctions between a CAN message identity and a J1939 parameter group. The similarities and differences are seen in the comparison that follows:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Similarities&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;assemblage of signals with comparable or same context&lt;/li&gt;
&lt;li&gt;able to be recognized by a special number&lt;/li&gt;
&lt;li&gt;includes protocol and application data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Variations&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not restricted to the top capacity of 1785 bytes (8 data bytes).&lt;/li&gt;
&lt;li&gt;able can be sent point-to-point&lt;/li&gt;
&lt;li&gt;The message's priority is not reliant on the PGN.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A multi-packet message will be delivered if a parameter group specifies a data length more than 8 bytes. The so-called transport protocol is provided by the standard.&lt;/p&gt;

&lt;p&gt;Although The Control Area Network (CAN) protocol specifies how messages are carried and received over the bus, it makes no point out of the way addresses are created or mapped to real bus nodes. &lt;/p&gt;

&lt;p&gt;This will be continued in the next article alone, with examples.&lt;/p&gt;

&lt;p&gt;If you have any questions, please feel free to ask them in the comment section.&lt;/p&gt;

&lt;p&gt;Thank you for taking the time to read this.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>learning</category>
      <category>j1939</category>
    </item>
  </channel>
</rss>
