Changed the UDS Scan window quite a bit. Now there are more options
for scan types and the ability to create a list of scans to run.
This commit is contained in:
+58
-3
@@ -9,6 +9,44 @@
|
||||
#include <QFile>
|
||||
#include <QTreeWidget>
|
||||
|
||||
|
||||
enum SCAN_TYPE
|
||||
{
|
||||
ST_TESTER_PRESENT,
|
||||
ST_SESS_CTRL,
|
||||
ST_COMM_CTRL,
|
||||
ST_ECU_RESET,
|
||||
ST_CLEAR_DTC,
|
||||
ST_READ_DTC,
|
||||
ST_SEC_ACCESS,
|
||||
ST_READ_ID,
|
||||
ST_READ_ADDR,
|
||||
ST_READ_SCALING,
|
||||
ST_IO_CTRL,
|
||||
ST_ROUTINE_CTRL,
|
||||
ST_CUSTOM,
|
||||
};
|
||||
|
||||
//stores the parameters for one scan
|
||||
class ScanEntry
|
||||
{
|
||||
public:
|
||||
uint32_t startID, endID;
|
||||
int32_t idOffset;
|
||||
bool bAdaptiveOffset;
|
||||
bool bShowNoReplies;
|
||||
uint32_t busToScan;
|
||||
uint32_t maxWaitTime; //in milliseconds
|
||||
SCAN_TYPE scanType;
|
||||
uint32_t sessType;
|
||||
uint32_t subfunctLen;
|
||||
qint64 subfunctLower;
|
||||
qint64 subfunctUpper;
|
||||
uint32_t subfunctIncrement;
|
||||
uint32_t serviceLower;
|
||||
uint32_t serviceUpper;
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class UDSScanWindow;
|
||||
}
|
||||
@@ -24,16 +62,25 @@ public:
|
||||
private slots:
|
||||
void updatedFrames(int numFrames);
|
||||
void gotUDSReply(UDS_MESSAGE msg);
|
||||
void scanUDS();
|
||||
void scanAll();
|
||||
void scanSelected();
|
||||
void saveResults();
|
||||
void timeOut();
|
||||
void adaptiveToggled();
|
||||
void wildcardToggled();
|
||||
void readByToggled();
|
||||
void changedScanType();
|
||||
void numBytesChanged();
|
||||
void checkIDRange();
|
||||
void checkServiceRange();
|
||||
void checkSubFuncRange();
|
||||
void deleteSelectedScan();
|
||||
void addNewScan();
|
||||
void loadScans();
|
||||
void saveScans();
|
||||
void setNoReplyVal();
|
||||
void setMaxDelayVal();
|
||||
void setIncrementVal();
|
||||
void setReplyOffset();
|
||||
void setSessType();
|
||||
|
||||
private:
|
||||
Ui::UDSScanWindow *ui;
|
||||
@@ -44,9 +91,17 @@ private:
|
||||
QTreeWidgetItem *nodeID;
|
||||
QTreeWidgetItem *nodeService;
|
||||
QTreeWidgetItem *nodeSubFunc;
|
||||
QVector<ScanEntry> scanEntries;
|
||||
ScanEntry *currEditEntry;
|
||||
int currIdx = 0;
|
||||
bool currentlyRunning;
|
||||
bool inhibitUpdates;
|
||||
|
||||
void displayScanEntry(int idx);
|
||||
QString generateListDesc(int idx);
|
||||
void setupScan(int idx);
|
||||
void startScan();
|
||||
void stopScan();
|
||||
void sendNextMsg();
|
||||
void sendOnBuses(UDS_MESSAGE frame, int buses);
|
||||
void setupNodes(uint32_t replyID);
|
||||
|
||||
Reference in New Issue
Block a user