Changeset 343 in pacpusframework for trunk/src/dbcDecriptor
- Timestamp:
- Mar 12, 2015, 5:14:07 PM (10 years ago)
- Location:
- trunk/src/dbcDecriptor/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dbcDecriptor/src/mainwindow.cpp
r331 r343 11 11 #include "mainwindow.h" 12 12 #include "ui_mainwindow.h" 13 #include <iostream>14 #include <math.h>15 13 16 14 #include <QString> … … 66 64 67 65 if (!file.open(QIODevice::ReadOnly)) 68 {69 66 ui->label_file_error->setText("<font color=\"#C80000\">Can not open the file</font>"); 70 }71 67 else 72 68 { … … 85 81 if (frameFound) 86 82 { 87 // " SG_"is the beginning if a line containing a signal information88 if (dbcFiles_.content[i].startsWith( " SG_"))83 // signalMnemo is the beginning if a line containing a signal information 84 if (dbcFiles_.content[i].startsWith(signalMnemo)) 89 85 { 90 86 tmpFrame.numberOfSignals++; … … 96 92 97 93 // "BO_" is the beginning of a line containing a frame information and all signals are following 98 if (dbcFiles_.content[i].startsWith( "BO_"))94 if (dbcFiles_.content[i].startsWith(signalInfoMnemo)) 99 95 { 100 96 int numberOfSpace = 0, j = 0; … … 126 122 tmpFrame.frameName = tmp; 127 123 } 128 else if (dbcFiles_.content[i].startsWith("CM_")) 129 { 130 // Get the comment at the end of the DBC file 131 findComment(i); 132 } 133 else if (dbcFiles_.content[i].startsWith("VAL_")) 134 { 135 // Get the value descritpion at the end of the DBC file 136 findValueDescription(i); 137 } 124 else if (dbcFiles_.content[i].startsWith(commentMnemo)) 125 findComment(i); // Get the comment at the end of the DBC file 126 else if (dbcFiles_.content[i].startsWith(valueInfoMnemo)) 127 findValueDescription(i); // Get the value descritpion at the end of the DBC file 138 128 139 129 // If a hole frame has been treated it's registered in the vector … … 194 184 { 195 185 for (int j = 0; j < dbcFiles_.canFrames[i].signalsVector.size(); j++) 196 {197 186 printFrame(i, j); 198 }199 187 } 200 188 } -
trunk/src/dbcDecriptor/src/structure.h
r331 r343 11 11 #ifndef STRUCTURE_H 12 12 #define STRUCTURE_H 13 14 #include <QMap>15 #include <QFile>16 13 17 14 … … 48 45 QStringList content; /// Content of the dbc file 49 46 } StructDBCFile; 47 48 49 /// define the mnemonique of each message to find 50 #define signalMnemo " SG_" 51 #define signalInfoMnemo "BO_" 52 #define commentMnemo "CM_" 53 #define valueInfoMnemo "VAL_" 50 54 51 55
Note:
See TracChangeset
for help on using the changeset viewer.