From 8faf1a542b291cb2ff71f20fceb941bb6113127b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=A5rtensson?= Date: Wed, 28 Jun 2023 12:43:29 +0200 Subject: [PATCH] test --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee77405..bc3643c 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,19 @@ See the examples in `Examples -> SAE J1939` how to change the address, NAME or i This flow chart in code how this Open SAE J1939 library working. This example demonstrates how to send a request and get an answer. - Step 1: `ECU X` is going to send a `PGN` to `ECU Y`. Interpret `PGN` as a function code - Example: https://github.com/DanielMartensson/Open-SAE-J1939/blob/4297cff44107e5278f120243cb9a611eafe8c42f/Src/SAE_J1939/SAE_J1939-71_Application_Layer/Request_ECU_Identification.c#L18-L20 + https://github.com/DanielMartensson/Open-SAE-J1939/blob/4297cff44107e5278f120243cb9a611eafe8c42f/Src/SAE_J1939/SAE_J1939-71_Application_Layer/Request_ECU_Identification.c#L18-L20 - Step 2: `ECU Y` is going to read that `PGN` message - Example: https://github.com/DanielMartensson/Open-SAE-J1939/blob/4297cff44107e5278f120243cb9a611eafe8c42f/Src/Open_SAE_J1939/Listen_For_Messages.c#L18-L32 + https://github.com/DanielMartensson/Open-SAE-J1939/blob/4297cff44107e5278f120243cb9a611eafe8c42f/Src/Open_SAE_J1939/Listen_For_Messages.c#L18-L32 +- Step 3: The `PGN` function code will be interpreted + https://github.com/DanielMartensson/Open-SAE-J1939/blob/678473c13cb7eb5fe46d5aac30a53efad4ccefd9/Src/SAE_J1939/SAE_J1939-21_Transport_Layer/Request.c#L20-L52 +- Step 4: The `PGN` function code is now interpreted as `ECU Identification`. Then `ECU Y` is going to end the `ECU Identification` to `ECU X` + - Step 4.1: For 1 package message: + https://github.com/DanielMartensson/Open-SAE-J1939/blob/678473c13cb7eb5fe46d5aac30a53efad4ccefd9/Src/SAE_J1939/SAE_J1939-71_Application_Layer/Request_ECU_Identification.c#L26-L42 + - Step 4.2: For Multi Package Message, the control byte can either be BAM or RTS. BAM is only used if you send to all `ECUs` e.g address `0xFF = 255`. But if the control byte is RTS, e.g address is not `0xFF`, then Open SAE J1939 is going to send a RTS and listen for a CTS response. + https://github.com/DanielMartensson/Open-SAE-J1939/blob/678473c13cb7eb5fe46d5aac30a53efad4ccefd9/Src/SAE_J1939/SAE_J1939-71_Application_Layer/Request_ECU_Identification.c#L44-L58 + - Step 4.3: If `ECU Y` is sending a RTS, then `ECU X` will read the RTS and response with CTS back to `ECU Y` + https://github.com/DanielMartensson/Open-SAE-J1939/blob/678473c13cb7eb5fe46d5aac30a53efad4ccefd9/Src/SAE_J1939/SAE_J1939-21_Transport_Layer/Transport_Protocol_Connection_Management.c#L22-L26 + - EC # SAE J1939 functionality - SAE J1939:21 Transport Layer