##// END OF EJS Templates
Added qint32 SocExplorerEngine::getEnumDeviceCount(socexplorerplugin *plugin, int VID, int PID)...
jeandet -
r34:a265fede2b19 default
parent child
Show More
@@ -45,6 +45,19 qint32 SOCModel::getEnumDeviceBaseAddres
45 45 return -1;
46 46 }
47 47
48 qint32 SOCModel::getEnumDeviceCount(int VID, int PID)
49 {
50 qint32 count =0;
51 for(int i=0;i<p_enumeratedDevices.count();i++)
52 {
53 if((p_enumeratedDevices.at(i)->VID()==VID) && (p_enumeratedDevices.at(i)->PID()==PID))
54 {
55 count++;
56 }
57 }
58 return count;
59 }
60
48 61 socExplorerEnumDevice *SOCModel::addEnumDevice( int VID, int PID, qint32 baseAddress, const QString &name)
49 62 {
50 63 if(enumDeviceExists(baseAddress))
@@ -92,6 +92,7 public:
92 92 public slots:
93 93 //void setRegValue(qint32 baseAddress,qint32 value);
94 94 qint32 getEnumDeviceBaseAddress(int VID,int PID,int count=0);
95 qint32 getEnumDeviceCount(int VID,int PID);
95 96 socExplorerEnumDevice* addEnumDevice(int VID, int PID, qint32 baseAddress, const QString& name);
96 97 int addEnumDevice(socExplorerEnumDevice* device);
97 98 void writeReg(qint32 address,qint32 value);
@@ -119,6 +119,25 qint32 SocExplorerEngine::getEnumDeviceB
119 119 return soc->getEnumDeviceBaseAddress(VID,PID,count);
120 120 }
121 121
122 qint32 SocExplorerEngine::getEnumDeviceCount(socexplorerplugin *plugin, int VID, int PID)
123 {
124 if(plugin==NULL)return 0;
125 SOCModel* soc = plugin2Soc(plugin);
126 if(soc==NULL)
127 return 0;
128 return soc->getEnumDeviceCount(VID,PID);
129 }
130
131 qint32 SocExplorerEngine::getEnumDeviceCount(const QString &rootPlugin, int VID, int PID)
132 {
133 socexplorerplugin* plugin = socexplorerproxy::findPlugin(rootPlugin);
134 if(plugin==NULL)return 0;
135 SOCModel* soc = plugin2Soc(plugin);
136 if(soc==NULL)
137 return 0;
138 return soc->getEnumDeviceCount(VID,PID);
139 }
140
122 141 int SocExplorerEngine::addEnumDevice(const QString &rootPlugin, int VID, int PID, qint32 baseAddress, const QString &name)
123 142 {
124 143 socexplorerplugin* plugin = socexplorerproxy::findPlugin(rootPlugin);
@@ -114,6 +114,8 public slots:
114 114 QString getSocExplorerBranch(){return SocExplorerEngine::SocExplorerBranch();}
115 115 qint32 getEnumDeviceBaseAddress(const QString& rootPlugin,int VID,int PID,int count=0);
116 116 qint32 getEnumDeviceBaseAddress(socexplorerplugin* plugin,int VID,int PID,int count=0);
117 qint32 getEnumDeviceCount(socexplorerplugin* plugin,int VID,int PID);
118 qint32 getEnumDeviceCount(const QString& rootPlugin,int VID,int PID);
117 119 int addEnumDevice(const QString& rootPlugin,int VID,int PID,qint32 baseAddress,const QString& name);
118 120
119 121 private:
@@ -19,7 +19,7 unix {
19 19 SOCEXPLORER_PLUGINS_INSTALL_PATH = $${SOCEXPLORER_ROOT_PLUGINS_INSTALL_PATH}"/.SocExplorer/plugins"
20 20 }
21 21
22 isEmpty(SOCEXPLORER_SDK_BUILD){
22 isEmpty( SOCEXPLORER_SDK_BUILD ){
23 23 message( "building a plugin" )
24 24 QT += core gui xml
25 25 contains(QT_MAJOR_VERSION, 5) {
General Comments 0
You need to be logged in to leave comments. Login now