closes #4 Refactor DBC parsing into TypeFactory statement handlers
This commit is contained in:
1 parent
3bd9339baf
commit
88b5883dda
9 files changed
+511
-349
No files matched your search
@@ -13,8 +13,6 @@
|
||||
#define DBC_PARSER_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
#include "dbc_database.h"
|
||||
|
||||
@@ -44,27 +42,7 @@ class DbcParser {
|
||||
DbcDatabase ParseFile (const std::string &filePath) const;
|
||||
|
||||
private:
|
||||
static bool IsFrameLine (const std::string &line);
|
||||
static bool IsSignalLine (const std::string &line);
|
||||
static bool IsCommentLine (const std::string &line);
|
||||
static std::string Trim (const std::string &text);
|
||||
static std::vector<std::string> SplitReceivers (const std::string &text);
|
||||
static std::uint32_t TryExtractPgn (std::uint32_t canId, bool isExtended, bool &hasPgn);
|
||||
|
||||
static void NormalizeCanId (std::uint32_t rawCanId,
|
||||
std::uint32_t &normalizedCanId,
|
||||
bool &isExtended);
|
||||
|
||||
static FrameInfo ParseFrameLine (const std::string &line);
|
||||
static SignalInfo ParseSignalLine (const std::string &line);
|
||||
|
||||
static void ParseCommentLine (const std::string &line, DbcDatabase &database);
|
||||
|
||||
static FrameInfo *FindFrameById (DbcDatabase &database,
|
||||
std::uint32_t canId,
|
||||
bool isExtended);
|
||||
|
||||
static SignalInfo *FindSignalByName (FrameInfo &frame, const std::string &signalName);
|
||||
};
|
||||
|
||||
#endif /* DBC_PARSER_H */
|
||||
Reference in new issue
Block a user