\hypertarget{dbc__decode__builder_8cpp_source}{}\doxysection{dbc\+\_\+decode\+\_\+builder.\+cpp}
\mbox{\hyperlink{dbc__decode__builder_8cpp}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00001}00001 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00002}00002 \textcolor{comment}{ * @file dbc\_decode\_builder.cpp}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00003}00003 \textcolor{comment}{ * @brief}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00005}00005 \textcolor{comment}{ * Created: 2026-\/03-\/13}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00006}00006 \textcolor{comment}{ * Author: Deeaitch (Dim. Himro)}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00008}00008 \textcolor{comment}{ * Licensed under the MIT License.}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00009}00009 \textcolor{comment}{ * See LICENSE file in the project root for full license text.}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00010}00010 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00011}00011 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00012}00012 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{dbc__decode__builder_8h}{dbc\_decode\_builder.h}}"{}}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00013}00013 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00014}\mbox{\hyperlink{classDbcDecodeBuilder_a2bc6386dfb5e58976c42e22c19ec471b}{00014}} \mbox{\hyperlink{structDecodeDatabase}{DecodeDatabase}} \mbox{\hyperlink{classDbcDecodeBuilder_a2bc6386dfb5e58976c42e22c19ec471b}{DbcDecodeBuilder::Build}} (\textcolor{keyword}{const} \mbox{\hyperlink{structDbcDatabase}{DbcDatabase}} \&source)\textcolor{keyword}{ const }\{}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00015}00015   \mbox{\hyperlink{structDecodeDatabase}{DecodeDatabase}} result;}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00016}00016 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00017}00017   \textcolor{keywordflow}{for} (std::size\_t frameIndex = 0U; frameIndex < source.\mbox{\hyperlink{structDbcDatabase_a2cade5d0234ee816132127542f8c612b}{frames}}.size(); ++frameIndex) \{}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00018}00018     \textcolor{keyword}{const} \mbox{\hyperlink{structFrameInfo}{FrameInfo}} \&sourceFrame = source.\mbox{\hyperlink{structDbcDatabase_a2cade5d0234ee816132127542f8c612b}{frames}}[frameIndex];}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00019}00019     \mbox{\hyperlink{structDecodeFrame}{DecodeFrame}} targetFrame;}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00020}00020 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00021}00021     targetFrame.\mbox{\hyperlink{structDecodeFrame_aa0a7f8fd5bfde2148dfd0d838328f579}{name}} = sourceFrame.\mbox{\hyperlink{structFrameInfo_abb53a7f93ed7abc0ea1ae4a8ccafcdcb}{name}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00022}00022     targetFrame.\mbox{\hyperlink{structDecodeFrame_a52e10215388db7df8b541b9d9909edcf}{canId}} = sourceFrame.\mbox{\hyperlink{structFrameInfo_af470b0742c05bfbffc31c51a68f5c05e}{canId}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00023}00023     targetFrame.\mbox{\hyperlink{structDecodeFrame_a3ee2348d781f8f15aaf87e8dcf57ec41}{isExtended}} = sourceFrame.\mbox{\hyperlink{structFrameInfo_a34b726afaad2ac5c697fdb2ac070cdaf}{isExtended}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00024}00024     targetFrame.\mbox{\hyperlink{structDecodeFrame_a51111ac13988be372d5673d12cf3e060}{dlc}} = sourceFrame.\mbox{\hyperlink{structFrameInfo_aa2b198ea0f55e560c123d35e7b3ecab9}{dlc}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00025}00025     targetFrame.\mbox{\hyperlink{structDecodeFrame_a1d3c54055c0cbceb73adf551f7067f23}{pgn}} = sourceFrame.\mbox{\hyperlink{structFrameInfo_aee518b33f1000bf0b7f6e4a87474c943}{pgn}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00026}00026     targetFrame.\mbox{\hyperlink{structDecodeFrame_a2551102670c4a540fced4c71da0b369d}{hasPgn}} = sourceFrame.\mbox{\hyperlink{structFrameInfo_a4737a5420213ad4304724e39f3a4e55d}{hasPgn}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00027}00027     targetFrame.\mbox{\hyperlink{structDecodeFrame_ad78241dc40c793aabb8495b6989b81a9}{transmitter}} = sourceFrame.\mbox{\hyperlink{structFrameInfo_a92749ec3798d4211a505860fb389a9e8}{transmitter}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00028}00028     targetFrame.\mbox{\hyperlink{structDecodeFrame_a25819ef907a32391af5c9f7cae9cdb22}{comment}} = sourceFrame.\mbox{\hyperlink{structFrameInfo_ace75121294f9d89b762080ab5643293c}{comment}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00030}00030     \textcolor{keywordflow}{for} (std::size\_t signalIndex = 0U; signalIndex < sourceFrame.\mbox{\hyperlink{structFrameInfo_a942937027f1af06536f98cc23b2bf6ce}{signals}}.size(); ++signalIndex) \{}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00031}00031       \textcolor{keyword}{const} \mbox{\hyperlink{structSignalInfo}{SignalInfo}} \&sourceSignal = sourceFrame.\mbox{\hyperlink{structFrameInfo_a942937027f1af06536f98cc23b2bf6ce}{signals}}[signalIndex];}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00032}00032       \mbox{\hyperlink{structDecodeSignal}{DecodeSignal}} targetSignal;}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00034}00034       targetSignal.\mbox{\hyperlink{structDecodeSignal_a58cf5844f2272a23dcb9687d912e4780}{name}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_a379e422a00cad56f896cacf60455b088}{name}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00035}00035       targetSignal.\mbox{\hyperlink{structDecodeSignal_aaf5d7527ddf65b6355c2b4f3626df22d}{startBit}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_ace290724f9801521609aedaa946d61f1}{startBit}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00036}00036       targetSignal.\mbox{\hyperlink{structDecodeSignal_acd4ef5ee30421d117b5756854302debb}{length}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_a1008b5201f71848177217bd52fb84baa}{length}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00037}00037       targetSignal.\mbox{\hyperlink{structDecodeSignal_abdc4c4bb4a67a6d61d6ca81e8a52833d}{byteOrder}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_af363b1563fb4c7cc8973f9a80c06846c}{isLittleEndian}} ? \mbox{\hyperlink{decode__database_8h_aaeb92d42f5a6e27b8ba19f18d69d142baff97a9fdede09eaf6e1c8ec9f6a61dd5}{ByteOrder::Intel}} : \mbox{\hyperlink{decode__database_8h_aaeb92d42f5a6e27b8ba19f18d69d142ba2ed1afe3c9215523e4272f46e6186b31}{ByteOrder::Motorola}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00038}00038       targetSignal.\mbox{\hyperlink{structDecodeSignal_a9d37638129263b8902ba5be59baf39a8}{valueType}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_a52a52b320eef92fbcb4626307f9a498f}{isSigned}} ? \mbox{\hyperlink{decode__database_8h_ad9971b6ef33e02ba2c75d19c1d2518a1a71fed0c3428bf1a2e19af257c4bac379}{ValueType::Signed}} : \mbox{\hyperlink{decode__database_8h_ad9971b6ef33e02ba2c75d19c1d2518a1aa1a914735b205424ba6c40b85528d78a}{ValueType::Unsigned}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00039}00039       targetSignal.\mbox{\hyperlink{structDecodeSignal_a428c39913a366a8476dd291061354391}{factor}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_ae4f78d99a2750aa564d7eba860171499}{factor}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00040}00040       targetSignal.\mbox{\hyperlink{structDecodeSignal_a92db637af4e224a0ae70173050dc3f74}{offset}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_ab7d0769f47aa540656b22e4e49db517e}{offset}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00041}00041       targetSignal.\mbox{\hyperlink{structDecodeSignal_a0fb84e19a0ab3bd50b6f65c1075ebc25}{minimum}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_ada7bf94fbeaa26bd08c73982b5af255b}{minimum}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00042}00042       targetSignal.\mbox{\hyperlink{structDecodeSignal_a4a6ba87142a9badbf0ca830e9e709cb7}{maximum}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_adf1c4331b9eabced0d7fdda40ff0eb52}{maximum}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00043}00043       targetSignal.\mbox{\hyperlink{structDecodeSignal_a38eed9ca7581423fd8bfbedcffc12092}{unit}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_a1f214f03e94ef5794de2d3367bfcbd01}{unit}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00044}00044       targetSignal.\mbox{\hyperlink{structDecodeSignal_abdbae62a64d2df716bf60c6b67b30eaa}{receivers}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_a2c95562fd0b29327a7fd7b1e6feee7f3}{receivers}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00045}00045       targetSignal.\mbox{\hyperlink{structDecodeSignal_ae28c905d4a2bc86419c2a8361bfea473}{comment}} = sourceSignal.\mbox{\hyperlink{structSignalInfo_ac99ba7563a5dad01e39c4257216953f5}{comment}};}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00047}00047       targetFrame.\mbox{\hyperlink{structDecodeFrame_a372afd9e74f1ae33f85cb4acfd3e2036}{signals}}.push\_back (targetSignal);}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00048}00048     \}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00050}00050     result.\mbox{\hyperlink{structDecodeDatabase_a2bd4ddfc2602c1de4e12a373bfc93072}{frames}}.push\_back (targetFrame);}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00051}00051     result.\mbox{\hyperlink{structDecodeDatabase_ae4fd1351008bb0dce337821a849100c5}{frameIndexByKey}}[\mbox{\hyperlink{structFrameKey}{FrameKey}} (targetFrame.\mbox{\hyperlink{structDecodeFrame_a52e10215388db7df8b541b9d9909edcf}{canId}}, targetFrame.\mbox{\hyperlink{structDecodeFrame_a3ee2348d781f8f15aaf87e8dcf57ec41}{isExtended}})] =}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00052}00052       result.\mbox{\hyperlink{structDecodeDatabase_a2bd4ddfc2602c1de4e12a373bfc93072}{frames}}.size() -\/ 1U;}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00053}00053   \}}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00055}00055   \textcolor{keywordflow}{return} result;}
\DoxyCodeLine{\Hypertarget{dbc__decode__builder_8cpp_source_l00056}00056 \}}

\end{DoxyCode}
