Major mondification to how DBC files are handled in-program. Now it is

much more object oriented and encapsulated. The biggest addition is
that it is now possible to support multiple DBC files being loaded at
once with each file associated to one or both buses. Note that
currently the program still does not support multiple DBC files but
the groundwork is there.
This commit is contained in:
Collin Kidder
2016-01-17 13:30:42 -05:00
parent d831f985f5
commit cd5f851f35
11 changed files with 760 additions and 485 deletions
+4 -4
View File
@@ -195,15 +195,15 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
//now, if we're supposed to interpret the data and the DBC handler is loaded then use it
if (dbcHandler != NULL && interpretFrames)
{
DBC_MESSAGE *msg = dbcHandler->findMsgByID(thisFrame.ID);
DBC_MESSAGE *msg = dbcHandler->findMessage(thisFrame);
if (msg != NULL)
{
tempString.append("\r\n");
tempString.append(msg->name + " " + msg->comment + "\r\n");
for (int j = 0; j < msg->msgSignals.length(); j++)
for (int j = 0; j < msg->sigHandler->getCount(); j++)
{
QString sigString = dbcHandler->processSignal(thisFrame, msg->msgSignals.at(j));
if (sigString.length() > 1) //weeds out signals that don't actually exist in this message (due to multiplexing)
QString sigString;
if (msg->sigHandler->findSignalByIdx(j)->processAsText(thisFrame, sigString))
{
tempString.append(sigString);
tempString.append("\r\n");