@@ -1,10 +1,36 | |||
|
1 | 1 | #!/usr/bin/lppmon -e |
|
2 | 2 | |
|
3 | 3 | class test(PySocExplorerEngine.socexplorerplugin): |
|
4 | def hello(self): | |
|
5 | print "hello" | |
|
6 | def VID(self): | |
|
7 | return 10 | |
|
8 | def PID(self): | |
|
9 | return 100 | |
|
4 | m_Layout = QtGui.QGridLayout() | |
|
5 | m_CenterWidget = QtGui.QWidget() | |
|
6 | m_hexviewer = PySocExplorer.QHexEdit() | |
|
7 | m_addressQSPB = PySocExplorer.QHexSpinBox() | |
|
8 | m_readQPB = QtGui.QPushButton("read") | |
|
9 | m_writeQPB = QtGui.QPushButton("write") | |
|
10 | 10 | |
|
11 | def postInstantiationTrigger(self): | |
|
12 | print "building GUI" | |
|
13 | self.setWidget(self.m_CenterWidget) | |
|
14 | self.m_CenterWidget.setLayout(self.m_Layout) | |
|
15 | self.m_Layout.addWidget(self.m_addressQSPB,0,0,1,1) | |
|
16 | self.m_Layout.addWidget(self.m_readQPB,0,1,1,1) | |
|
17 | self.m_Layout.addWidget(self.m_writeQPB,0,2,1,1) | |
|
18 | self.m_Layout.addWidget(self.m_hexviewer,1,0,1,-1) | |
|
19 | def hello(self): | |
|
20 | print "hello" | |
|
21 | def VID(self): | |
|
22 | return 10 | |
|
23 | def PID(self): | |
|
24 | return 100 | |
|
25 | def readData(self): | |
|
26 | bufferQBA = QtCore.QByteArray() | |
|
27 | buffer = self.parentPlugin().Read(self.m_addressQSPB.value,16*1024) | |
|
28 | for i in range(0,16*1024): | |
|
29 | bufferQBA.append(int(buffer[i])) | |
|
30 | bufferQBA.append(int(buffer[i])) | |
|
31 | bufferQBA.append(int(buffer[i])) | |
|
32 | bufferQBA.append(int(buffer[i])) | |
|
33 | self.m_hexviewer.setData(bufferQBA) | |
|
34 | ||
|
35 | ||
|
36 |
@@ -162,6 +162,8 public slots: | |||
|
162 | 162 | virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format); |
|
163 | 163 | QVariantList Read(unsigned int address, unsigned int count); |
|
164 | 164 | void Write(unsigned int address, QList<QVariant> dataList); |
|
165 | socexplorerplugin* parentPlugin(){return this->parent;} | |
|
166 | socexplorerplugin* toPlugin(){return (socexplorerplugin*)this;} | |
|
165 | 167 | protected: |
|
166 | 168 | int BaseAddress; |
|
167 | 169 | bool Connected; |
@@ -4,7 +4,6 | |||
|
4 | 4 | <load-typesystem name=":/trolltech/generator/typesystem_network.txt" generate="no" /> |
|
5 | 5 | |
|
6 | 6 | <interface-type name="socexplorerplugin"/> |
|
7 | ||
|
8 | 7 | </typesystem> |
|
9 | 8 | |
|
10 | 9 |
@@ -4852,6 +4852,21 void PythonQtWrapper_SocExplorerPlot::mo | |||
|
4852 | 4852 | ( ((PythonQtPublicPromoter_SocExplorerPlot*)theWrappedObject)->promoted_mouseReleaseEvent(arg__1)); |
|
4853 | 4853 | } |
|
4854 | 4854 | |
|
4855 | void PythonQtWrapper_SocExplorerPlot::removeAllGraphs(SocExplorerPlot* theWrappedObject) | |
|
4856 | { | |
|
4857 | ( theWrappedObject->removeAllGraphs()); | |
|
4858 | } | |
|
4859 | ||
|
4860 | bool PythonQtWrapper_SocExplorerPlot::removeGraph(SocExplorerPlot* theWrappedObject, int graphIndex) | |
|
4861 | { | |
|
4862 | return ( theWrappedObject->removeGraph(graphIndex)); | |
|
4863 | } | |
|
4864 | ||
|
4865 | void PythonQtWrapper_SocExplorerPlot::replot(SocExplorerPlot* theWrappedObject) | |
|
4866 | { | |
|
4867 | ( theWrappedObject->replot()); | |
|
4868 | } | |
|
4869 | ||
|
4855 | 4870 | void PythonQtWrapper_SocExplorerPlot::rescaleAxis(SocExplorerPlot* theWrappedObject) |
|
4856 | 4871 | { |
|
4857 | 4872 | ( theWrappedObject->rescaleAxis()); |
@@ -4902,6 +4917,11 void PythonQtWrapper_SocExplorerPlot::se | |||
|
4902 | 4917 | ( theWrappedObject->setTitle(title)); |
|
4903 | 4918 | } |
|
4904 | 4919 | |
|
4920 | void PythonQtWrapper_SocExplorerPlot::setXaxisDateTimeFormat(SocExplorerPlot* theWrappedObject, const QString& format) | |
|
4921 | { | |
|
4922 | ( theWrappedObject->setXaxisDateTimeFormat(format)); | |
|
4923 | } | |
|
4924 | ||
|
4905 | 4925 | void PythonQtWrapper_SocExplorerPlot::setXaxisLabel(SocExplorerPlot* theWrappedObject, QString label) |
|
4906 | 4926 | { |
|
4907 | 4927 | ( theWrappedObject->setXaxisLabel(label)); |
@@ -480,6 +480,9 void delete_SocExplorerPlot(SocExplorerP | |||
|
480 | 480 | void mouseMoveEvent(SocExplorerPlot* theWrappedObject, QMouseEvent* arg__1); |
|
481 | 481 | void mousePressEvent(SocExplorerPlot* theWrappedObject, QMouseEvent* arg__1); |
|
482 | 482 | void mouseReleaseEvent(SocExplorerPlot* theWrappedObject, QMouseEvent* arg__1); |
|
483 | void removeAllGraphs(SocExplorerPlot* theWrappedObject); | |
|
484 | bool removeGraph(SocExplorerPlot* theWrappedObject, int graphIndex); | |
|
485 | void replot(SocExplorerPlot* theWrappedObject); | |
|
483 | 486 | void rescaleAxis(SocExplorerPlot* theWrappedObject); |
|
484 | 487 | void setAdaptativeSampling(SocExplorerPlot* theWrappedObject, int graphIndex, bool enable); |
|
485 | 488 | void setGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y); |
@@ -490,6 +493,7 void delete_SocExplorerPlot(SocExplorerP | |||
|
490 | 493 | void setLegendFont(SocExplorerPlot* theWrappedObject, QFont font); |
|
491 | 494 | void setLegendSelectedFont(SocExplorerPlot* theWrappedObject, QFont font); |
|
492 | 495 | void setTitle(SocExplorerPlot* theWrappedObject, QString title); |
|
496 | void setXaxisDateTimeFormat(SocExplorerPlot* theWrappedObject, const QString& format); | |
|
493 | 497 | void setXaxisLabel(SocExplorerPlot* theWrappedObject, QString label); |
|
494 | 498 | void setXaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper); |
|
495 | 499 | void setYaxisLabel(SocExplorerPlot* theWrappedObject, QString label); |
@@ -103,6 +103,15 TRANSLATIONS = ../translations/socexplor | |||
|
103 | 103 | FORMS += \ |
|
104 | 104 | regsExplorer/regsexplorernew.ui |
|
105 | 105 | |
|
106 | DISTFILES += \ | |
|
107 | ../doc/PythonExamples/LEON3_LOAD.py \ | |
|
108 | ../doc/PythonExamples/PythonPlugin.py \ | |
|
109 | ../doc/PythonExamples/simpledemo1.py \ | |
|
110 | ../doc/PythonExamples/SocExplorerPlot.py \ | |
|
111 | ../doc/PythonExamples/SocExplorerPlot2.py \ | |
|
112 | ../doc/PythonExamples/SocExplorerPlot3.py \ | |
|
113 | ../doc/PythonExamples/tcpterminaldemo.py \ | |
|
114 | ../doc/PythonExamples/tcpterminaldemo2.py | |
|
106 | 115 | |
|
107 | 116 | |
|
108 | 117 | |
@@ -111,3 +120,4 FORMS += \ | |||
|
111 | 120 | |
|
112 | 121 | |
|
113 | 122 | |
|
123 |
General Comments 0
You need to be logged in to leave comments.
Login now