|
DBC framework
|
Runtime CAN decoder using prebuilt decode database. More...
#include <dbc_decoder.h>
Public Member Functions | |
| const DecodeFrame * | FindFrame (const DecodeDatabase &database, std::uint32_t canId, bool isExtended) const |
| Find frame definition by CAN ID. More... | |
| DecodedFrameValue | Decode (const DecodeDatabase &database, const RawCanFrame &frame) const |
| Decode one raw CAN frame. More... | |
Static Private Member Functions | |
| static bool | ExtractUnsigned (const std::vector< std::uint8_t > &data, const DecodeSignal &signal, std::uint64_t &value) |
| static bool | ExtractIntel (const std::vector< std::uint8_t > &data, std::uint32_t startBit, std::uint32_t length, std::uint64_t &value) |
| static bool | ExtractMotorola (const std::vector< std::uint8_t > &data, std::uint32_t startBit, std::uint32_t length, std::uint64_t &value) |
| static std::int64_t | SignExtend (std::uint64_t value, std::uint32_t bitLength) |
Runtime CAN decoder using prebuilt decode database.
Definition at line 70 of file dbc_decoder.h.
| DecodedFrameValue DbcDecoder::Decode | ( | const DecodeDatabase & | database, |
| const RawCanFrame & | frame | ||
| ) | const |
Decode one raw CAN frame.
| database | Runtime decode database. |
| frame | Raw CAN frame. |
Definition at line 31 of file dbc_decoder.cpp.
References RawCanFrame::canId, RawCanFrame::data, DecodedSignalValue::definition, DecodedFrameValue::definition, ExtractUnsigned(), DecodeSignal::factor, FindFrame(), RawCanFrame::isExtended, DecodeSignal::length, DecodeSignal::offset, DecodedSignalValue::physicalValue, DecodedSignalValue::rawValue, DecodedFrameValue::signals, DecodeFrame::signals, Signed, SignExtend(), DecodedSignalValue::valid, DecodedFrameValue::valid, and DecodeSignal::valueType.
Referenced by main().
|
staticprivate |
Definition at line 82 of file dbc_decoder.cpp.
Referenced by ExtractUnsigned().
|
staticprivate |
Definition at line 105 of file dbc_decoder.cpp.
Referenced by ExtractUnsigned().
|
staticprivate |
Definition at line 70 of file dbc_decoder.cpp.
References DecodeSignal::byteOrder, ExtractIntel(), ExtractMotorola(), Intel, DecodeSignal::length, and DecodeSignal::startBit.
Referenced by Decode().
| const DecodeFrame * DbcDecoder::FindFrame | ( | const DecodeDatabase & | database, |
| std::uint32_t | canId, | ||
| bool | isExtended | ||
| ) | const |
Find frame definition by CAN ID.
| database | Runtime decode database. |
| canId | Normalized CAN ID. |
| isExtended | true for extended frame. |
Definition at line 14 of file dbc_decoder.cpp.
References DecodeDatabase::frameIndexByKey, and DecodeDatabase::frames.
Referenced by Decode().
|
staticprivate |
Definition at line 144 of file dbc_decoder.cpp.
Referenced by Decode().