@@ -31,7 +31,7 ApbUartPlugin::ApbUartPlugin(QWidget *pa | |||||
31 | this->setWidget((QWidget*)this->UI); |
|
31 | this->setWidget((QWidget*)this->UI); | |
32 | this->uartConnected = false; |
|
32 | this->uartConnected = false; | |
33 | this->UartThread = new UARTPollingThread(this); |
|
33 | this->UartThread = new UARTPollingThread(this); | |
34 | this->pyObject = new APBUartPyWrapper(this); |
|
34 | // this->pyObject = new APBUartPyWrapper(this); | |
35 | connect(this->UI,SIGNAL(loopbackChkBxStateChanged(int)),this,SLOT(fifoDebugChangeState(int))); |
|
35 | connect(this->UI,SIGNAL(loopbackChkBxStateChanged(int)),this,SLOT(fifoDebugChangeState(int))); | |
36 | connect(this->UartThread,SIGNAL(apbUartTextReceived(QString)),this->UI,SIGNAL(apbUartTextReceived(QString))); |
|
36 | connect(this->UartThread,SIGNAL(apbUartTextReceived(QString)),this->UI,SIGNAL(apbUartTextReceived(QString))); | |
37 | connect(this->UI,SIGNAL(connectPort()),this,SLOT(toggleUartState())); |
|
37 | connect(this->UI,SIGNAL(connectPort()),this,SLOT(toggleUartState())); | |
@@ -40,12 +40,12 ApbUartPlugin::ApbUartPlugin(QWidget *pa | |||||
40 | connect(this->UI,SIGNAL(UartSpeedChanged(QString)),this->UartThread,SLOT(setPortSpeedStr(QString))); |
|
40 | connect(this->UI,SIGNAL(UartSpeedChanged(QString)),this->UartThread,SLOT(setPortSpeedStr(QString))); | |
41 | connect(this->UI,SIGNAL(updateAPBUartsList()),this,SLOT(updateAPBUartsList())); |
|
41 | connect(this->UI,SIGNAL(updateAPBUartsList()),this,SLOT(updateAPBUartsList())); | |
42 | connect(this->UI,SIGNAL(curentAPBUartChanged(int)),this,SLOT(setCurentAPBUart(int))); |
|
42 | connect(this->UI,SIGNAL(curentAPBUartChanged(int)),this,SLOT(setCurentAPBUart(int))); | |
43 | connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(openUart()),this,SLOT(openUart())); |
|
43 | // connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(openUart()),this,SLOT(openUart())); | |
44 | connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(closeUart()),this,SLOT(closeUart())); |
|
44 | // connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(closeUart()),this,SLOT(closeUart())); | |
45 | connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(setFifoDebugEnabled(bool)),this,SLOT(setFifoDebugEnabled(bool))); |
|
45 | // connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(setFifoDebugEnabled(bool)),this,SLOT(setFifoDebugEnabled(bool))); | |
46 | connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(setUARTPortNane(QString)),this,SLOT(setUARTPortNane(QString))); |
|
46 | // connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(setUARTPortNane(QString)),this,SLOT(setUARTPortNane(QString))); | |
47 | connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(setUARTPortSpeed(int)),this,SLOT(setUARTPortSpeed(int))); |
|
47 | // connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(setUARTPortSpeed(int)),this,SLOT(setUARTPortSpeed(int))); | |
48 | connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(updateAPBUartsList()),this,SLOT(updateAPBUartsList())); |
|
48 | // connect(((APBUartPyWrapper*)this->pyObject),SIGNAL(updateAPBUartsList()),this,SLOT(updateAPBUartsList())); | |
49 | this->UartThread->start(); |
|
49 | this->UartThread->start(); | |
50 | } |
|
50 | } | |
51 |
|
51 |
@@ -41,11 +41,11 ahbuartplugin::ahbuartplugin(QWidget *pa | |||||
41 | this->setWidget((QWidget*)this->UI); |
|
41 | this->setWidget((QWidget*)this->UI); | |
42 | QObject::connect(this,SIGNAL(activateSig(bool)),this->UI,SLOT(setConnected(bool))); |
|
42 | QObject::connect(this,SIGNAL(activateSig(bool)),this->UI,SLOT(setConnected(bool))); | |
43 | QObject::connect(this->UI,SIGNAL(connectPortsig(QString,int)),this,SLOT(togglePort(QString,int))); |
|
43 | QObject::connect(this->UI,SIGNAL(connectPortsig(QString,int)),this,SLOT(togglePort(QString,int))); | |
44 | this->pyObject = new ahbuartPywrapper(this); |
|
44 | // this->pyObject = new ahbuartPywrapper(this); | |
45 | QObject::connect(((ahbuartPywrapper*)this->pyObject),SIGNAL(open(QString,int)),this,SLOT(open(QString,int))); |
|
45 | // QObject::connect(((ahbuartPywrapper*)this->pyObject),SIGNAL(open(QString,int)),this,SLOT(open(QString,int))); | |
46 | QObject::connect(((ahbuartPywrapper*)this->pyObject),SIGNAL(close()),this,SLOT(close())); |
|
46 | // QObject::connect(((ahbuartPywrapper*)this->pyObject),SIGNAL(close()),this,SLOT(close())); | |
47 | QObject::connect(((ahbuartPywrapper*)this->pyObject),SIGNAL(ReadBytes(uint,uint)),this,SLOT(ReadBytes(uint,uint))); |
|
47 | // QObject::connect(((ahbuartPywrapper*)this->pyObject),SIGNAL(ReadBytes(uint,uint)),this,SLOT(ReadBytes(uint,uint))); | |
48 | QObject::connect(((ahbuartPywrapper*)this->pyObject),SIGNAL(WriteBytes(uint,QList<QVariant>)),this,SLOT(WriteBytes(uint,QList<QVariant>))); |
|
48 | // QObject::connect(((ahbuartPywrapper*)this->pyObject),SIGNAL(WriteBytes(uint,QList<QVariant>)),this,SLOT(WriteBytes(uint,QList<QVariant>))); | |
49 | QObject::connect(this->UI,SIGNAL(rescanPorts()),this,SLOT(updatePortList())); |
|
49 | QObject::connect(this->UI,SIGNAL(rescanPorts()),this,SLOT(updatePortList())); | |
50 | QObject::connect(this,SIGNAL(addReadBytes(int)),this->UI,SLOT(addReadBytes(int))); |
|
50 | QObject::connect(this,SIGNAL(addReadBytes(int)),this->UI,SLOT(addReadBytes(int))); | |
51 | QObject::connect(this,SIGNAL(addWritenBytes(int)),this->UI,SLOT(addWritenBytes(int))); |
|
51 | QObject::connect(this,SIGNAL(addWritenBytes(int)),this->UI,SLOT(addWritenBytes(int))); | |
@@ -175,6 +175,7 void ahbuartplugin::connectPort(QString | |||||
175 | socexplorerproxy::loadChildSysDriver(this,"AMBA_PLUGIN"); |
|
175 | socexplorerproxy::loadChildSysDriver(this,"AMBA_PLUGIN"); | |
176 | this->scanDone=true; |
|
176 | this->scanDone=true; | |
177 | } |
|
177 | } | |
|
178 | this->UI->setSystemSpeed(this->detectSpeed()); | |||
178 | break; |
|
179 | break; | |
179 | } |
|
180 | } | |
180 | } |
|
181 | } | |
@@ -490,6 +491,46 void ahbuartplugin::WriteBytes(unsigned | |||||
490 | this->Write(data,dataList.count()/4,address); |
|
491 | this->Write(data,dataList.count()/4,address); | |
491 | } |
|
492 | } | |
492 |
|
493 | |||
|
494 | int ahbuartplugin::detectSpeed() | |||
|
495 | { | |||
|
496 | //scaler = (((system_clk*10)/(baudrate*8))-5)/10 | |||
|
497 | unsigned int ahbUartBaseAddress = SocExplorerEngine::self()->getEnumDeviceBaseAddress(this,0x01,0x007,0); | |||
|
498 | // unsigned int dsuBaseAddress = SocExplorerEngine::self()->getEnumDeviceBaseAddress(this,0x01,0x0017,0); | |||
|
499 | unsigned int dsuBaseAddress = 0x90000000; | |||
|
500 | unsigned int scaler = 0,dsuVal1=0,dsuVal2=0; | |||
|
501 | int speed=0; | |||
|
502 | QElapsedTimer time; | |||
|
503 | if(dsuBaseAddress!=-1) | |||
|
504 | { | |||
|
505 | time.start(); | |||
|
506 | if( this->Read(&dsuVal1,1,dsuBaseAddress+0x08)==1) | |||
|
507 | { | |||
|
508 | usleep(1000*1000); | |||
|
509 | qint64 el = time.elapsed(); | |||
|
510 | this->Read(&dsuVal2,1,dsuBaseAddress+0x08); | |||
|
511 | if(dsuVal1!=dsuVal2) | |||
|
512 | return ((dsuVal2-dsuVal1)/el)*1000; | |||
|
513 | } | |||
|
514 | } | |||
|
515 | if(ahbUartBaseAddress!=-1) | |||
|
516 | { | |||
|
517 | if( this->Read(&scaler,1,ahbUartBaseAddress+0x0C)==1) | |||
|
518 | { | |||
|
519 | scaler&=0x3FFFF; | |||
|
520 | speed = (int)(((double)scaler*10.0)+5.0)*((double)this->UI->baudRate()/10.0)*8.0; | |||
|
521 | // speed = (int)((double)(scaler+1)*8.0*(double)this->UI->baudRate()); | |||
|
522 | } | |||
|
523 | } | |||
|
524 | return speed; | |||
|
525 | } | |||
|
526 | ||||
|
527 | void ahbuartplugin::postInstantiationTrigger() | |||
|
528 | { | |||
|
529 | if(this->scanDone && this->Connected) | |||
|
530 | { | |||
|
531 | this->UI->setSystemSpeed(this->detectSpeed()); | |||
|
532 | } | |||
|
533 | } | |||
493 |
|
534 | |||
494 |
|
535 | |||
495 |
|
536 | |||
@@ -506,3 +547,4 void ahbuartplugin::WriteBytes(unsigned | |||||
506 |
|
547 | |||
507 |
|
548 | |||
508 |
|
549 | |||
|
550 |
@@ -78,6 +78,8 public slots: | |||||
78 | void updatePortList(); |
|
78 | void updatePortList(); | |
79 | QVariantList ReadBytes(unsigned int address,unsigned int count); |
|
79 | QVariantList ReadBytes(unsigned int address,unsigned int count); | |
80 | void WriteBytes(unsigned int address,QList<QVariant> dataList); |
|
80 | void WriteBytes(unsigned int address,QList<QVariant> dataList); | |
|
81 | int detectSpeed(); | |||
|
82 | void postInstantiationTrigger(); | |||
81 | signals: |
|
83 | signals: | |
82 | void setProgressValue(int progress); |
|
84 | void setProgressValue(int progress); | |
83 | void addWritenBytes(int count); |
|
85 | void addWritenBytes(int count); |
@@ -1,65 +1,62 | |||||
1 | # |
|
1 | # | |
2 | # Project created by QtCreator 2011-09-20T08:15:30 |
|
2 | # Project created by QtCreator 2011-09-20T08:15:30 | |
3 | # |
|
3 | # | |
4 | #------------------------------------------------- |
|
4 | #------------------------------------------------- | |
5 |
|
5 | |||
6 | CONFIG += socexplorerplugin |
|
6 | CONFIG += socexplorerplugin | |
7 | TEMPLATE = lib |
|
7 | TEMPLATE = lib | |
8 | CONFIG += dll |
|
8 | CONFIG += dll | |
9 | CONFIG -= static |
|
9 | CONFIG -= static | |
10 | VERSION=1.4.0 |
|
10 | VERSION=1.4.0 | |
11 | TARGET = ahbuartplugin #$${DEBUG_EXT} |
|
11 | TARGET = ahbuartplugin #$${DEBUG_EXT} | |
12 | DEFINES += PLUGIN=ahbuartplugin |
|
12 | DEFINES += PLUGIN=ahbuartplugin | |
13 | DEFINES += PLUGINHEADER="\"\\\"ahbuartplugin.h"\\\"\" |
|
13 | DEFINES += PLUGINHEADER="\"\\\"ahbuartplugin.h"\\\"\" | |
14 | DEFINES += driver_Name="\"\\\"AHBUARTplugin"\\\"\" |
|
14 | DEFINES += driver_Name="\"\\\"AHBUARTplugin"\\\"\" | |
15 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" |
|
15 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" | |
16 | DEFINES += driver_Description="\"\\\"Gaisler's AHBUART driver, gives master access to AHB bus."\\\"\" |
|
16 | DEFINES += driver_Description="\"\\\"Gaisler's AHBUART driver, gives master access to AHB bus."\\\"\" | |
17 | DEFINES += driver_can_be_root=1 |
|
17 | DEFINES += driver_can_be_root=1 | |
18 | DEFINES += driver_can_be_child=0 |
|
18 | DEFINES += driver_can_be_child=0 | |
19 | DEFINES += driver_VID=0 |
|
19 | DEFINES += driver_VID=0 | |
20 | DEFINES += driver_PID=0 |
|
20 | DEFINES += driver_PID=0 | |
21 |
|
21 | |||
22 |
|
22 | |||
23 |
|
23 | |||
24 |
|
24 | |||
25 | INCLUDEPATH += \ |
|
25 | INCLUDEPATH += \ | |
26 | $${PWD} |
|
26 | $${PWD} | |
27 |
|
27 | |||
28 |
|
28 | |||
29 | HEADERS += \ |
|
29 | HEADERS += \ | |
30 | ahbuartplugin.h \ |
|
30 | ahbuartplugin.h \ | |
31 |
ahbuartpluginui.h |
|
31 | ahbuartpluginui.h | |
32 | ahbuartpywrapper.h \ |
|
32 | ||
33 | ahbuartpywrapper.h |
|
33 | ||
34 |
|
34 | |||
35 |
|
35 | SOURCES += \ | ||
36 |
|
36 | ahbuartplugin.cpp \ | ||
37 | SOURCES += \ |
|
37 | ahbuartpluginui.cpp | |
38 | ahbuartplugin.cpp \ |
|
38 | ||
39 | ahbuartpluginui.cpp \ |
|
39 | FORMS += \ | |
40 | ahbuartpywrapper.cpp |
|
40 | ahbuartpluginui.ui | |
41 |
|
41 | |||
42 | FORMS += \ |
|
42 | ||
43 | ahbuartpluginui.ui |
|
43 | ||
44 |
|
44 | |||
45 |
|
45 | |||
46 |
|
46 | |||
47 |
|
47 | |||
48 |
|
48 | |||
49 |
|
49 | |||
50 |
|
50 | |||
51 |
|
51 | |||
52 |
|
52 | |||
53 |
|
53 | |||
54 |
|
54 | |||
55 |
|
55 | |||
56 |
|
56 | |||
57 |
|
57 | |||
58 |
|
58 | |||
59 |
|
59 | |||
60 |
|
60 | |||
61 |
|
61 | |||
62 |
|
62 | |||
63 |
|
||||
64 |
|
||||
65 |
|
@@ -85,12 +85,30 void ahbUartPluginUI::addReadBytes(int c | |||||
85 | this->ui->RdBytesLCD->display(this->readBytes); |
|
85 | this->ui->RdBytesLCD->display(this->readBytes); | |
86 | } |
|
86 | } | |
87 |
|
87 | |||
|
88 | void ahbUartPluginUI::setSystemSpeed(int speed) | |||
|
89 | { | |||
|
90 | QStringList frLst = QStringList()<<"Hz"<<"kHz"<<"MHz"<<"GHz"; | |||
|
91 | int ind=0; | |||
|
92 | double speedD = speed; | |||
|
93 | while(speedD>1000.0) | |||
|
94 | { | |||
|
95 | speedD/=1000.0; | |||
|
96 | ind++; | |||
|
97 | } | |||
|
98 | this->ui->detectedSpeedLbl->setText(QString::number(speedD)+frLst[ind]); | |||
|
99 | } | |||
|
100 | ||||
88 |
|
101 | |||
89 | void ahbUartPluginUI::setCompleter(QCompleter *completer) |
|
102 | void ahbUartPluginUI::setCompleter(QCompleter *completer) | |
90 | { |
|
103 | { | |
91 | this->ui->PortName->setCompleter(completer); |
|
104 | this->ui->PortName->setCompleter(completer); | |
92 | } |
|
105 | } | |
93 |
|
106 | |||
|
107 | int ahbUartPluginUI::baudRate() | |||
|
108 | { | |||
|
109 | return ui->portSpeed->text().toInt(); | |||
|
110 | } | |||
|
111 | ||||
94 | void ahbUartPluginUI::closeEvent(QCloseEvent *event) |
|
112 | void ahbUartPluginUI::closeEvent(QCloseEvent *event) | |
95 | { |
|
113 | { | |
96 | event->accept(); |
|
114 | event->accept(); |
@@ -43,12 +43,14 public: | |||||
43 | ~ahbUartPluginUI(); |
|
43 | ~ahbUartPluginUI(); | |
44 | void closeEvent(QCloseEvent *event); |
|
44 | void closeEvent(QCloseEvent *event); | |
45 | void setCompleter(QCompleter* completer); |
|
45 | void setCompleter(QCompleter* completer); | |
|
46 | int baudRate(); | |||
46 | public slots: |
|
47 | public slots: | |
47 | void setConnected(bool connected); |
|
48 | void setConnected(bool connected); | |
48 | void connectPort(); |
|
49 | void connectPort(); | |
49 | void setconfig(QString PortName,int baudrate); |
|
50 | void setconfig(QString PortName,int baudrate); | |
50 | void addWritenBytes(int count); |
|
51 | void addWritenBytes(int count); | |
51 | void addReadBytes(int count); |
|
52 | void addReadBytes(int count); | |
|
53 | void setSystemSpeed(int speed); | |||
52 |
|
54 | |||
53 | signals: |
|
55 | signals: | |
54 | void connectPortsig(QString PortName,int baudrate); |
|
56 | void connectPortsig(QString PortName,int baudrate); |
@@ -6,15 +6,15 | |||||
6 | <rect> |
|
6 | <rect> | |
7 | <x>0</x> |
|
7 | <x>0</x> | |
8 | <y>0</y> |
|
8 | <y>0</y> | |
9 |
<width> |
|
9 | <width>902</width> | |
10 |
<height>2 |
|
10 | <height>256</height> | |
11 | </rect> |
|
11 | </rect> | |
12 | </property> |
|
12 | </property> | |
13 | <property name="windowTitle"> |
|
13 | <property name="windowTitle"> | |
14 | <string>Form</string> |
|
14 | <string>Form</string> | |
15 | </property> |
|
15 | </property> | |
16 | <layout class="QGridLayout" name="gridLayout_2"> |
|
16 | <layout class="QGridLayout" name="gridLayout_2"> | |
17 |
<item row=" |
|
17 | <item row="5" column="0" colspan="3"> | |
18 | <widget class="QGroupBox" name="Statistiques"> |
|
18 | <widget class="QGroupBox" name="Statistiques"> | |
19 | <property name="title"> |
|
19 | <property name="title"> | |
20 | <string>Statistics</string> |
|
20 | <string>Statistics</string> | |
@@ -111,6 +111,23 | |||||
111 | </property> |
|
111 | </property> | |
112 | </widget> |
|
112 | </widget> | |
113 | </item> |
|
113 | </item> | |
|
114 | <item row="4" column="0"> | |||
|
115 | <widget class="QLabel" name="label_3"> | |||
|
116 | <property name="text"> | |||
|
117 | <string>Detected Speed</string> | |||
|
118 | </property> | |||
|
119 | </widget> | |||
|
120 | </item> | |||
|
121 | <item row="4" column="1" colspan="2"> | |||
|
122 | <widget class="QLabel" name="detectedSpeedLbl"> | |||
|
123 | <property name="text"> | |||
|
124 | <string/> | |||
|
125 | </property> | |||
|
126 | <property name="alignment"> | |||
|
127 | <set>Qt::AlignCenter</set> | |||
|
128 | </property> | |||
|
129 | </widget> | |||
|
130 | </item> | |||
114 | </layout> |
|
131 | </layout> | |
115 | </widget> |
|
132 | </widget> | |
116 | <resources/> |
|
133 | <resources/> |
@@ -48,14 +48,14 dsu3plugin::dsu3plugin(QWidget *parent): | |||||
48 | this->UI = new dsu3pluginui(); |
|
48 | this->UI = new dsu3pluginui(); | |
49 | this->setWidget((QWidget*)this->UI); |
|
49 | this->setWidget((QWidget*)this->UI); | |
50 | this->elfparserInst = new elfparser(); |
|
50 | this->elfparserInst = new elfparser(); | |
51 | this->pyObject = new dsu3pluginPywrapper(this); |
|
51 | // this->pyObject = new dsu3pluginPywrapper(this); | |
52 | QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(openFile(QString)),this,SLOT(openFile(QString))); |
|
52 | // QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(openFile(QString)),this,SLOT(openFile(QString))); | |
53 | QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(loadFile()),this,SLOT(flashTarget())); |
|
53 | // QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(loadFile()),this,SLOT(flashTarget())); | |
54 | QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(run()),this,SLOT(run())); |
|
54 | // QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(run()),this,SLOT(run())); | |
55 | QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(stop()),this,SLOT(stop())); |
|
55 | // QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(stop()),this,SLOT(stop())); | |
56 | QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(cacheEnable()),this,SLOT(cacheEnable())); |
|
56 | // QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(cacheEnable()),this,SLOT(cacheEnable())); | |
57 | QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(cacheDisable()),this,SLOT(cacheDisable())); |
|
57 | // QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(cacheDisable()),this,SLOT(cacheDisable())); | |
58 | QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(setCacheEnable(bool)),this,SLOT(setCacheEnable(bool))); |
|
58 | // QObject::connect(((dsu3pluginPywrapper*)this->pyObject),SIGNAL(setCacheEnable(bool)),this,SLOT(setCacheEnable(bool))); | |
59 |
|
59 | |||
60 | connect(this->UI,SIGNAL(openFile()),this,SLOT(openFile())); |
|
60 | connect(this->UI,SIGNAL(openFile()),this,SLOT(openFile())); | |
61 | connect(this->UI,SIGNAL(flashTarget()),this,SLOT(flashTarget())); |
|
61 | connect(this->UI,SIGNAL(flashTarget()),this,SLOT(flashTarget())); |
@@ -53,6 +53,8 public slots: | |||||
53 | void run(); |
|
53 | void run(); | |
54 | void stop(); |
|
54 | void stop(); | |
55 | void toggleRun(); |
|
55 | void toggleRun(); | |
|
56 | //added for python backward compatibility | |||
|
57 | void loadFile(){this->flashTarget();} | |||
56 | signals: |
|
58 | signals: | |
57 | void updateInfo(elfparser* parser); |
|
59 | void updateInfo(elfparser* parser); | |
58 | private: |
|
60 | private: |
@@ -31,13 +31,11 INCLUDEPATH += \ | |||||
31 |
|
31 | |||
32 | HEADERS += \ |
|
32 | HEADERS += \ | |
33 | dsu3plugin.h \ |
|
33 | dsu3plugin.h \ | |
34 |
dsu3pluginui.h |
|
34 | dsu3pluginui.h | |
35 | dsu3pluginpywrapper.h |
|
|||
36 |
|
35 | |||
37 | SOURCES += \ |
|
36 | SOURCES += \ | |
38 | dsu3plugin.cpp \ |
|
37 | dsu3plugin.cpp \ | |
39 |
dsu3pluginui.cpp |
|
38 | dsu3pluginui.cpp | |
40 | dsu3pluginpywrapper.cpp |
|
|||
41 |
|
39 | |||
42 |
|
40 | |||
43 |
|
41 |
@@ -27,12 +27,12 genericrwplugin::genericrwplugin(QWidget | |||||
27 | this->setWidget((QWidget*)this->UI); |
|
27 | this->setWidget((QWidget*)this->UI); | |
28 | connect(this->UI,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); |
|
28 | connect(this->UI,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); | |
29 | connect(this->UI,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); |
|
29 | connect(this->UI,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); | |
30 | this->pyObject = new genericRWpluginPyWrapper(this); |
|
30 | // this->pyObject = new genericRWpluginPyWrapper(this); | |
31 | //QObject::connect(this->pyObject,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); |
|
31 | // //QObject::connect(this->pyObject,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); | |
32 | //QObject::connect(this->pyObject,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); |
|
32 | // //QObject::connect(this->pyObject,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); | |
33 | QObject::connect(((genericRWpluginPyWrapper*)this->pyObject),SIGNAL(refresh()),this->UI,SIGNAL(refresh())); |
|
33 | // QObject::connect(((genericRWpluginPyWrapper*)this->pyObject),SIGNAL(refresh()),this->UI,SIGNAL(refresh())); | |
34 | QObject::connect(((genericRWpluginPyWrapper*)this->pyObject),SIGNAL(setAddress(quint32)),this->UI,SIGNAL(setAddress(quint32))); |
|
34 | // QObject::connect(((genericRWpluginPyWrapper*)this->pyObject),SIGNAL(setAddress(quint32)),this->UI,SIGNAL(setAddress(quint32))); | |
35 | QObject::connect(((genericRWpluginPyWrapper*)this->pyObject),SIGNAL(setLength(quint32)),this->UI,SIGNAL(setLength(quint32))); |
|
35 | // QObject::connect(((genericRWpluginPyWrapper*)this->pyObject),SIGNAL(setLength(quint32)),this->UI,SIGNAL(setLength(quint32))); | |
36 | } |
|
36 | } | |
37 |
|
37 | |||
38 | genericrwplugin::~genericrwplugin() |
|
38 | genericrwplugin::~genericrwplugin() |
@@ -28,14 +28,12 INCLUDEPATH += \ | |||||
28 | HEADERS += \ |
|
28 | HEADERS += \ | |
29 | genericrwplugin.h \ |
|
29 | genericrwplugin.h \ | |
30 | genericrwpluginui.h \ |
|
30 | genericrwpluginui.h \ | |
31 |
memeditor.h |
|
31 | memeditor.h | |
32 | genericrwpluginpywrapper.h |
|
|||
33 |
|
32 | |||
34 | SOURCES += \ |
|
33 | SOURCES += \ | |
35 | genericrwplugin.cpp \ |
|
34 | genericrwplugin.cpp \ | |
36 | genericrwpluginui.cpp \ |
|
35 | genericrwpluginui.cpp \ | |
37 |
memeditor.cpp |
|
36 | memeditor.cpp | |
38 | genericrwpluginpywrapper.cpp |
|
|||
39 |
|
37 | |||
40 |
|
38 | |||
41 |
|
39 |
@@ -28,8 +28,8 memctrlrplugin::memctrlrplugin(QWidget * | |||||
28 | this->setWidget((QWidget*)this->UI); |
|
28 | this->setWidget((QWidget*)this->UI); | |
29 | connect(this->UI,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); |
|
29 | connect(this->UI,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); | |
30 | connect(this->UI,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); |
|
30 | connect(this->UI,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); | |
31 | this->pyObject = new memctrlrPyWrapper(this); |
|
31 | // this->pyObject = new memctrlrPyWrapper(this); | |
32 | connect(this->pyObject,SIGNAL(launchTest(uint,uint)),this,SLOT(launchTest(uint,uint))); |
|
32 | // connect(this->pyObject,SIGNAL(launchTest(uint,uint)),this,SLOT(launchTest(uint,uint))); | |
33 | } |
|
33 | } | |
34 |
|
34 | |||
35 | memctrlrplugin::~memctrlrplugin() |
|
35 | memctrlrplugin::~memctrlrplugin() |
@@ -28,15 +28,13 HEADERS += \ | |||||
28 | memctrlrplugin.h \ |
|
28 | memctrlrplugin.h \ | |
29 | memctrlrpluginui.h \ |
|
29 | memctrlrpluginui.h \ | |
30 | memorycheck.h \ |
|
30 | memorycheck.h \ | |
31 |
genericmemoryspacecheck.h |
|
31 | genericmemoryspacecheck.h | |
32 | memctrlrpywrapper.h |
|
|||
33 |
|
32 | |||
34 | SOURCES += \ |
|
33 | SOURCES += \ | |
35 | memctrlrplugin.cpp \ |
|
34 | memctrlrplugin.cpp \ | |
36 | memctrlrpluginui.cpp \ |
|
35 | memctrlrpluginui.cpp \ | |
37 | memorycheck.cpp \ |
|
36 | memorycheck.cpp \ | |
38 |
genericmemoryspacecheck.cpp |
|
37 | genericmemoryspacecheck.cpp | |
39 | memctrlrpywrapper.cpp |
|
|||
40 |
|
38 | |||
41 |
|
39 | |||
42 |
|
40 |
@@ -32,7 +32,7 spwplugin::spwplugin(QWidget *parent):so | |||||
32 | Q_UNUSED(parent) |
|
32 | Q_UNUSED(parent) | |
33 | this->bridge = NULL; |
|
33 | this->bridge = NULL; | |
34 | this->scanDone = false; |
|
34 | this->scanDone = false; | |
35 | this->pyObject = new spwPyWrapper(this); |
|
35 | // this->pyObject = new spwPyWrapper(this); | |
36 | this->tcpServer = new SpwTcpPacketServer(this); |
|
36 | this->tcpServer = new SpwTcpPacketServer(this); | |
37 | this->mainGroupBox = new QGroupBox("SpaceWire Plugin Configuration",this); |
|
37 | this->mainGroupBox = new QGroupBox("SpaceWire Plugin Configuration",this); | |
38 | this->bridgeSelector = new QComboBox(this); |
|
38 | this->bridgeSelector = new QComboBox(this); | |
@@ -47,11 +47,11 spwplugin::spwplugin(QWidget *parent):so | |||||
47 | this->bridgeSelector->addItem("STAR-Dundee Spw USB Brick"); |
|
47 | this->bridgeSelector->addItem("STAR-Dundee Spw USB Brick"); | |
48 | this->bridgeSelector->addItem("GR-ESB"); |
|
48 | this->bridgeSelector->addItem("GR-ESB"); | |
49 | connect(this->bridgeSelector,SIGNAL(currentIndexChanged(QString)),this,SLOT(bridgeSelectionChanged(QString))); |
|
49 | connect(this->bridgeSelector,SIGNAL(currentIndexChanged(QString)),this,SLOT(bridgeSelectionChanged(QString))); | |
50 |
connect( |
|
50 | connect(this,SIGNAL(selectBridge(QString)),this,SLOT(selectBridge(QString))); | |
51 |
connect( |
|
51 | connect(this,SIGNAL(TCPServerConnect()),this->tcpServer,SLOT(connectServer())); | |
52 |
connect( |
|
52 | connect(this,SIGNAL(TCPServerDisconnect()),this->tcpServer,SLOT(disconnectServer())); | |
53 |
connect( |
|
53 | connect(this,SIGNAL(TCPServerSetPort(qint32)),this->tcpServer,SLOT(setServerPort(qint32))); | |
54 |
connect( |
|
54 | connect(this,SIGNAL(TCPServerSetIP(QString)),this->tcpServer,SLOT(setServerSetIP(QString))); | |
55 | } |
|
55 | } | |
56 |
|
56 | |||
57 |
|
57 | |||
@@ -95,31 +95,31 void spwplugin::bridgeSelectionChanged(c | |||||
95 | this->bridge = new stardundeeSPW_USB(this); |
|
95 | this->bridge = new stardundeeSPW_USB(this); | |
96 | this->mainLayout->addWidget(this->bridge->getGUI(),1,0,1,2); |
|
96 | this->mainLayout->addWidget(this->bridge->getGUI(),1,0,1,2); | |
97 | connect(this->bridge,SIGNAL(setConnected(bool)),this,SLOT(setConnected(bool))); |
|
97 | connect(this->bridge,SIGNAL(setConnected(bool)),this,SLOT(setConnected(bool))); | |
98 |
connect( |
|
98 | connect(this,SIGNAL(StarDundeeSelectBrick(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectBrick(int))); | |
99 |
connect( |
|
99 | connect(this,SIGNAL(StarDundeeSelectLinkNumber(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectLinkNumber(int))); | |
100 |
connect( |
|
100 | connect(this,SIGNAL(StarDundeeSelectLinkSpeed(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectLinkSpeed(int))); | |
101 |
connect( |
|
101 | connect(this,SIGNAL(StarDundeeSetSourceAddress(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetSourceAddress(QString))); | |
102 |
connect( |
|
102 | connect(this,SIGNAL(StarDundeeSetDestinationAddress(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetDestinationAddress(QString))); | |
103 |
connect( |
|
103 | connect(this,SIGNAL(StarDundeeSetDestinationKey(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetDestinationKey(QString))); | |
104 |
connect( |
|
104 | connect(this,SIGNAL(StarDundeeSetRmapTimeout(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetRmapTimeout(QString))); | |
105 |
connect( |
|
105 | connect(this,SIGNAL(connectBridge()),((stardundeeSPW_USB*)bridge),SLOT(connectBridge())); | |
106 |
connect( |
|
106 | connect(this,SIGNAL(disconnectBridge()),((stardundeeSPW_USB*)bridge),SLOT(disconnectBridge())); | |
107 |
connect( |
|
107 | connect(this,SIGNAL(StarDundeeGetAvailableBrickCount()), | |
108 | ((stardundeeSPW_USB*)bridge),SIGNAL(GetAvailableBrickCount())); |
|
108 | ((stardundeeSPW_USB*)bridge),SIGNAL(GetAvailableBrickCount())); | |
109 |
connect( |
|
109 | connect(this,SIGNAL(StarDundeeGetNbPacketsTransmittedToSpw()), | |
110 | ((stardundeeSPW_USB*)bridge),SIGNAL(GetNbPacketsTransmittedToSpw())); |
|
110 | ((stardundeeSPW_USB*)bridge),SIGNAL(GetNbPacketsTransmittedToSpw())); | |
111 |
connect( |
|
111 | connect(this,SIGNAL(StarDundeeGetNbCCSDSPacketsTransmittedToSpw()), | |
112 | ((stardundeeSPW_USB*)bridge),SIGNAL(GetNbCCSDSPacketsTransmittedToSpw())); |
|
112 | ((stardundeeSPW_USB*)bridge),SIGNAL(GetNbCCSDSPacketsTransmittedToSpw())); | |
113 |
connect( |
|
113 | connect(this,SIGNAL(StarDundeeGetLinkNumber()),((stardundeeSPW_USB*)bridge),SIGNAL(GetLinkNumber())); | |
114 |
connect( |
|
114 | connect(this->,SIGNAL(StarDundeeSetBrickAsAninterface(bool)), | |
115 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetBrickAsAnInterface(bool))); |
|
115 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetBrickAsAnInterface(bool))); | |
116 |
connect( |
|
116 | connect(this,SIGNAL(StarDundeeSetBrickAsARouter(bool)), | |
117 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetBrickAsARouter(bool))); |
|
117 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetBrickAsARouter(bool))); | |
118 |
connect( |
|
118 | connect(this,SIGNAL(StarDundeeStartTimecodes(bool)), | |
119 | ((stardundeeSPW_USB*)bridge),SIGNAL(StartSendingTimecodes(bool))); |
|
119 | ((stardundeeSPW_USB*)bridge),SIGNAL(StartSendingTimecodes(bool))); | |
120 |
connect( |
|
120 | connect(this,SIGNAL(StarDundeeSetTimecodeFrequency(double)), | |
121 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetTimecodeFrequency(double))); |
|
121 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetTimecodeFrequency(double))); | |
122 |
connect( |
|
122 | connect(this,SIGNAL(StarDundeeSendOneTimecode(unsigned char)), | |
123 | ((stardundeeSPW_USB*)bridge),SIGNAL(SendOneTimecode(unsigned char))); |
|
123 | ((stardundeeSPW_USB*)bridge),SIGNAL(SendOneTimecode(unsigned char))); | |
124 | connect(this->bridge,SIGNAL(pushPacketOverTCP(char*,int)),this->tcpServer,SLOT(pushPacket(char*,int))); |
|
124 | connect(this->bridge,SIGNAL(pushPacketOverTCP(char*,int)),this->tcpServer,SLOT(pushPacket(char*,int))); | |
125 | connect(this->tcpServer, SIGNAL(sendSPWPacket(char*,int)), ((stardundeeSPW_USB*)bridge), SLOT(sendPacketComingFromTCPServer(char*,int))); |
|
125 | connect(this->tcpServer, SIGNAL(sendSPWPacket(char*,int)), ((stardundeeSPW_USB*)bridge), SLOT(sendPacketComingFromTCPServer(char*,int))); |
@@ -63,6 +63,30 public slots: | |||||
63 | void setConnected(bool connected); |
|
63 | void setConnected(bool connected); | |
64 |
|
64 | |||
65 | signals: |
|
65 | signals: | |
|
66 | void selectBridge(const QString &bridgeName); | |||
|
67 | bool connectBridge(); | |||
|
68 | bool disconnectBridge(); | |||
|
69 | void StarDundeeSelectBrick(int brickIndex); | |||
|
70 | void StarDundeeSelectLinkNumber(int linkIndex); | |||
|
71 | void StarDundeeSelectLinkSpeed(int linkSpeed); | |||
|
72 | void StarDundeeSetSourceAddress(const QString & destKey); | |||
|
73 | void StarDundeeSetDestinationAddress(const QString & address); | |||
|
74 | void StarDundeeSetDestinationKey(const QString & key); | |||
|
75 | void StarDundeeSetRmapTimeout(const QString & timeout); | |||
|
76 | int StarDundeeGetAvailableBrickCount(); | |||
|
77 | unsigned int StarDundeeGetNbPacketsTransmittedToSpw( void ); | |||
|
78 | unsigned int StarDundeeGetNbCCSDSPacketsTransmittedToSpw( void ); | |||
|
79 | int StarDundeeGetLinkNumber(); | |||
|
80 | void StarDundeeSetBrickAsAninterface( bool ); | |||
|
81 | void StarDundeeSetBrickAsARouter( bool ); | |||
|
82 | void StarDundeeSetTimecodeFrequency( double ); | |||
|
83 | void StarDundeeStartTimecodes( bool ); | |||
|
84 | void StarDundeeSendOneTimecode( unsigned char timecode ); | |||
|
85 | ||||
|
86 | void TCPServerConnect(); | |||
|
87 | void TCPServerDisconnect(); | |||
|
88 | void TCPServerSetPort(qint32 port); | |||
|
89 | void TCPServerSetIP(QString ip); | |||
66 |
|
90 | |||
67 | private: |
|
91 | private: | |
68 | SpwTcpPacketServer* tcpServer; |
|
92 | SpwTcpPacketServer* tcpServer; |
@@ -40,7 +40,6 HEADERS += \ | |||||
40 | spw.h \ |
|
40 | spw.h \ | |
41 | StarDundee/stardundeegui.h \ |
|
41 | StarDundee/stardundeegui.h \ | |
42 | SpwTcpPacketServer/spwtcppacketserver.h \ |
|
42 | SpwTcpPacketServer/spwtcppacketserver.h \ | |
43 | spwpywrapper.h \ |
|
|||
44 | GR-ESB/gr_esb_bridge.h \ |
|
43 | GR-ESB/gr_esb_bridge.h \ | |
45 | GR-ESB/gr_esb_ui.h \ |
|
44 | GR-ESB/gr_esb_ui.h \ | |
46 | SpwTcpPacketServer/incomingpacketparser.h |
|
45 | SpwTcpPacketServer/incomingpacketparser.h | |
@@ -52,7 +51,6 SOURCES += \ | |||||
52 | abstractspwbridge.cpp \ |
|
51 | abstractspwbridge.cpp \ | |
53 | StarDundee/stardundeegui.cpp \ |
|
52 | StarDundee/stardundeegui.cpp \ | |
54 | SpwTcpPacketServer/spwtcppacketserver.cpp \ |
|
53 | SpwTcpPacketServer/spwtcppacketserver.cpp \ | |
55 | spwpywrapper.cpp \ |
|
|||
56 | GR-ESB/gr_esb_bridge.cpp \ |
|
54 | GR-ESB/gr_esb_bridge.cpp \ | |
57 | GR-ESB/gr_esb_ui.cpp \ |
|
55 | GR-ESB/gr_esb_ui.cpp \ | |
58 | SpwTcpPacketServer/incomingpacketparser.cpp |
|
56 | SpwTcpPacketServer/incomingpacketparser.cpp |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now