##// END OF EJS Templates
New register explorer WIP...
New register explorer WIP !!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVED OLD genericPySysdriver interface Now the plugins are directly exposed to python. ABI not compatible with previous plugins. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

File last commit:

r73:680fae912f57 default
r79:3440ba47d0f1 default
Show More
socexplorerengine.h
141 lines | 5.2 KiB | text/x-c | CLexer
Jeandet Alexis
First init of SocExplorer Repository.
r0 /*------------------------------------------------------------------------------
-- This file is a part of the SocExplorer Software
Jeandet Alexis
Updated lab name!
r13 -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS
Jeandet Alexis
First init of SocExplorer Repository.
r0 --
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------*/
/*-- Author : Alexis Jeandet
-- Mail : alexis.jeandet@lpp.polytechnique.fr
----------------------------------------------------------------------------*/
#ifndef SOCEXPLORERENGINE_H
#define SOCEXPLORERENGINE_H
#include <stdint.h>
#include <QObject>
#include <QtWidgets>
#include <QStringList>
#include <QDomDocument>
#include <QDomElement>
#include <QDomNodeList>
#include <QFile>
#include <QTextStream>
#include <QDir>
#include <QApplication>
#include <QtCore/qglobal.h>
#include <QFileDialog>
#include <socexplorerxmlfile.h>
#include <socexplorerenumdevice.h>
#include <XMLmodel.h>
#include <peripheralwidget.h>
#include <registerwidget.h>
#include <socmodel.h>
Added some regs definitions for LFR instrument. Added memory size measurement.
r73 #include <memtester.h>
Jeandet Alexis
First init of SocExplorer Repository.
r0
#if defined(SOCEXPLORER_SDK_BUILD)
# define SOCEXPLORER_SDK_EXPORT Q_DECL_EXPORT
#else
# define SOCEXPLORER_SDK_EXPORT Q_DECL_IMPORT
#endif
added QProgressBar auto deleter like QMutexLocker.
r14 class SOCEXPLORER_SDK_EXPORT SocExplorerAutoProgressBar
{
public:
SocExplorerAutoProgressBar(QProgressBar* progressBar=NULL)
{
this->p_progressbar=progressBar;
}
~SocExplorerAutoProgressBar()
{
if(p_progressbar)
{
delete p_progressbar;
}
}
void setProgressBar(QProgressBar* progressBar)
{
this->p_progressbar=progressBar;
}
void setValue(int value)
{
p_progressbar->setValue(value);
}
private:
QProgressBar* p_progressbar;
};
Jeandet Alexis
First init of SocExplorer Repository.
r0
//! SocExplorerEngine is a pure static class which aims to provide services for both SocExplorer software and plugins.
class SOCEXPLORER_SDK_EXPORT SocExplorerEngine : public QObject
{
Q_OBJECT
private:
static SocExplorerEngine* _self;
SocExplorerEngine(QObject *parent = 0);
static void init();
public:
static SocExplorerEngine* self(){ if(!_self){_self= new SocExplorerEngine;}return _self;}
//! Return the configuration folder path, OS dependant.
SOCEXPLORER_SDK_EXPORT static QString configFolder();
//! Return the default plugin folder path, OS dependant.
Jeandet Alexis
Removed _d for debug binaries, moved plugin to default location...
r65 static QStringList pluginFolders();
static QString configPath(){return QString(SOCEXPLORER_CONFIG_PATH);}
Jeandet Alexis
Moved xml soc description in /usr/share/SocExplorer.
r66 static QString sharePath(){return QString(SOCEXPLORER_SHARE_PATH);}
Jeandet Alexis
First init of SocExplorer Repository.
r0 static int addEnumDevice(socexplorerplugin* rootPlugin,int VID,int PID,qint32 baseAddress,const QString& name);
static QList<SOCModel*>* getSOCs();
static QString getDevName(int VID, int PID);
static QString SocExplorerVersion();
static QString SocExplorerChangeset();
static QString SocExplorerBranch();
static socExplorerXmlModel* xmlModel();
static void setMainWindow(QMainWindow* Mainwindow);
static QProgressBar* getProgressBar(const QString &format, int max);
static void deleteProgressBar(QProgressBar* progressBar);
static void addSOC(socexplorerplugin* rootPlugin);
static void removeSOC(socexplorerplugin* rootPlugin);
static void message(socexplorerplugin* sender,const QString& message,int debugLevel=0);
Jeandet Alexis
Updated lab name!
r13 static void setLogLevel(int level);
Added bool loadfile(abstractBinFile* file)...
r71 static bool isSocLitleEndian(socexplorerplugin* plugin);
Jeandet Alexis
First init of SocExplorer Repository.
r0 signals:
void enumDeviceAdded(socExplorerEnumDevice* device);
public slots:
QString getSocExplorerVersion(){return SocExplorerEngine::SocExplorerVersion();}
QString getSocExplorerChangeset(){return SocExplorerEngine::SocExplorerChangeset();}
QString getSocExplorerBranch(){return SocExplorerEngine::SocExplorerBranch();}
qint32 getEnumDeviceBaseAddress(const QString& rootPlugin,int VID,int PID,int count=0);
qint32 getEnumDeviceBaseAddress(socexplorerplugin* plugin,int VID,int PID,int count=0);
Added qint32 SocExplorerEngine::getEnumDeviceCount(socexplorerplugin *plugin, int VID, int PID)...
r34 qint32 getEnumDeviceCount(socexplorerplugin* plugin,int VID,int PID);
qint32 getEnumDeviceCount(const QString& rootPlugin,int VID,int PID);
Jeandet Alexis
First init of SocExplorer Repository.
r0 int addEnumDevice(const QString& rootPlugin,int VID,int PID,qint32 baseAddress,const QString& name);
Added some regs definitions for LFR instrument. Added memory size measurement.
r73 unsigned int memMeasureSize(socexplorerplugin* plugin, unsigned int address,unsigned int maxSize=0xFFFFFFFF);
unsigned int memMeasureSize(const QString& plugin, unsigned int address,unsigned int maxSize=0xFFFFFFFF);
Jeandet Alexis
First init of SocExplorer Repository.
r0
private:
static SOCModel* plugin2Soc(socexplorerplugin* plugin);
static socExplorerXmlModel* p_xmlmodel;
static QMainWindow* mainWindow;
static QList<SOCModel*>* SOCs;
static int loglvl;
};
#endif // SOCEXPLORERENGINE_H