From a6f83a2924231fb96e8ccd27782f4545afa1b8fa Mon Sep 17 00:00:00 2001 From: Guenter Kothgasser Date: Fri, 16 Jan 2026 07:52:59 +0100 Subject: [PATCH] Fix to make docan frame length configurable The CAN frames are configurable for CAN (8 bytes) and CAN-FD (64 bytes). But in DoCan is the frame length for diagnostic always 8 Byte. This leads to not responded diagnostic request if CAN-FD is configured. To solve this the frame length for diagnostic must also be configurable. --- libs/bsw/docan/include/docan/datalink/DoCanFrameCodec.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/bsw/docan/include/docan/datalink/DoCanFrameCodec.h b/libs/bsw/docan/include/docan/datalink/DoCanFrameCodec.h index 3fc4a5316ec..846aa32f55e 100644 --- a/libs/bsw/docan/include/docan/datalink/DoCanFrameCodec.h +++ b/libs/bsw/docan/include/docan/datalink/DoCanFrameCodec.h @@ -1,4 +1,5 @@ // Copyright 2024 Accenture. +// Copyright 2026 BMW AG. #pragma once @@ -8,6 +9,8 @@ #include "docan/datalink/IDoCanFrameReceiver.h" #include "docan/datalink/IDoCanFrameSizeMapper.h" +#include "can/canframes/CANFrame.h" + #include #include #include @@ -36,7 +39,7 @@ enum class CodecResult : uint8_t INVALID_FRAME_TYPE }; -static constexpr uint8_t EXTENDED_SF_DL_EDGE_SIZE = 8U; +static constexpr uint8_t EXTENDED_SF_DL_EDGE_SIZE = can::CANFrame::MAX_FRAME_LENGTH; static constexpr uint16_t ESCAPED_SEQ_MESSAGE_SIZE = 4095U; /**