# HG changeset patch # User Alexis Jeandet # Date 2015-03-26 15:50:34 # Node ID 87980339c225822794d3d6ea353c31318cdf39c0 # Parent 9c702d65566a773baca01e6e306af1a4594b305b Updated plugin version management. Some cleaning on spwplugin. diff --git a/APBUARTPLUGIN/APBUARTPLUGIN.pro b/APBUARTPLUGIN/APBUARTPLUGIN.pro --- a/APBUARTPLUGIN/APBUARTPLUGIN.pro +++ b/APBUARTPLUGIN/APBUARTPLUGIN.pro @@ -7,20 +7,13 @@ CONFIG += socexplorerplugin win32:CONFIG += dll win32:CONFIG -= static - -#CONFIG(debug, debug|release) { -# DEBUG_EXT = _d -#} else { -# DEBUG_EXT = -#} - +VERSION=1.0.0 TARGET = ApbUartPlugin #$${DEBUG_EXT} DEFINES += PLUGIN=ApbUartPlugin DEFINES += PLUGINHEADER="\"\\\"APBUARTPLUGIN.h"\\\"\" DEFINES += driver_Name="\"\\\"APB_UART_PLUGIN"\\\"\" DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@member.fsf.org"\\\"\" -DEFINES += driver_Version="\"\\\"0.0.1"\\\"\" DEFINES += driver_Description="\"\\\"This plugin provides a terminal widget connected to Gaisler\'s APBUART with or without loop-back mode."\\\"\" DEFINES += driver_can_be_root=0 DEFINES += driver_can_be_child=1 diff --git a/SocExplorer-plugins.spec b/SocExplorer-plugins.spec new file mode 100755 --- /dev/null +++ b/SocExplorer-plugins.spec @@ -0,0 +1,80 @@ +%global upstream_name socexplorer-plugins-0.5 + +Name: socexplorer-plugins +Version: 0.5 +Release: 0%{?dist} +Summary: Base plugins for SocExplorer. +Group: Development/Tools +License: GPLv2 +URL: https://hephaistos.lpp.polytechnique.fr/redmine/projects/socexplorer +Source0: https://hephaistos.lpp.polytechnique.fr/redmine/attachments/download/381/socexplorer-plugins-0.5.zip + +BuildRequires: python2-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: qt5-qtwebkit-devel +BuildRequires: qt5-qttools-static +BuildRequires: qt5-qttools-devel +BuildRequires: qt5-qtsvg-devel +BuildRequires: qt5-qtxmlpatterns-devel +BuildRequires: elfutils-libelf-devel +BuildRequires: qt5-pythonqt-devel +BuildRequires: socexplorer-devel + +%description +SocExplorer is an open source generic System On Chip testing software/framework. This package contains the base plugins for SocExplorer such as AHBUARTplugin for connecting to any grlib based design with an AHBUART. +You will get: + - AHB UART plugin + - APB UART plugin + - AMBA plugin + - DSU3 plugin + - Generic rw plugin + - Memcheck & Memectr plugins + +%prep +%setup -q -n %{upstream_name} + +%build +%{_qt5_qmake} + +make %{?_smp_mflags} + +%install +make install INSTALL_ROOT=%{buildroot} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files + %{_qt5_libdir}/SocExplorer/plugins/libApbUartPlugin.so* + %{_qt5_libdir}/SocExplorer/plugins/libahbuartplugin.so* + %{_qt5_libdir}/SocExplorer/plugins/libambaplugin.so* + %{_qt5_libdir}/SocExplorer/plugins/libdsu3plugin.so* + %{_qt5_libdir}/SocExplorer/plugins/libgenericrwplugin.so* + %{_qt5_libdir}/SocExplorer/plugins/libmemcheckplugin.so* + %{_qt5_libdir}/SocExplorer/plugins/libmemctrlrplugin.so* + +%changelog +* Thu Mar 26 2015 Alexis Jeandet - 0.5 +-Uses r51 as source. + +* Wed Mar 25 2015 Alexis Jeandet - 0.4 +-Uses r50 as source. + +* Fri Mar 20 2015 Alexis Jeandet - 0.4 +-Uses r49 as source. + +* Mon Mar 9 2015 Alexis Jeandet - 0.4 +-Uses r48 as source. + +* Wed Feb 18 2015 Alexis Jeandet - 0.4 +-Uses r45 as source. + +* Tue Feb 10 2015 Alexis Jeandet - 0.4 +-Uses r44 as source. + +* Tue Dec 30 2014 Alexis Jeandet - 0.4 +- Uses r42 as source. + +* Sat Jun 28 2014 Alexis Jeandet - 0.4 +- Initial Fedora packaging diff --git a/SocExplorer_Plugins.pro b/SocExplorer_Plugins.pro --- a/SocExplorer_Plugins.pro +++ b/SocExplorer_Plugins.pro @@ -11,4 +11,5 @@ SUBDIRS = \ memctrlrplugin \ memcheckplugin +OTHER_FILES += SocExplorer-plugins.spec #unix:SUBDIRS += spwplugin diff --git a/ahbuartplugin/ahbuartplugin.pro b/ahbuartplugin/ahbuartplugin.pro --- a/ahbuartplugin/ahbuartplugin.pro +++ b/ahbuartplugin/ahbuartplugin.pro @@ -7,17 +7,12 @@ CONFIG += socexplorerplugin TEMPLATE = lib CONFIG += dll CONFIG -= static -#CONFIG(debug, debug|release) { -# DEBUG_EXT = _d -#} else { -# DEBUG_EXT = -#} +VERSION=1.4.0 TARGET = ahbuartplugin #$${DEBUG_EXT} DEFINES += PLUGIN=ahbuartplugin DEFINES += PLUGINHEADER="\"\\\"ahbuartplugin.h"\\\"\" DEFINES += driver_Name="\"\\\"AHBUARTplugin"\\\"\" DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" -DEFINES += driver_Version="\"\\\"1.3.2"\\\"\" DEFINES += driver_Description="\"\\\"Gaisler's AHBUART driver, gives master access to AHB bus."\\\"\" DEFINES += driver_can_be_root=1 DEFINES += driver_can_be_child=0 diff --git a/ambaplugin/ambaplugin.pro b/ambaplugin/ambaplugin.pro --- a/ambaplugin/ambaplugin.pro +++ b/ambaplugin/ambaplugin.pro @@ -6,17 +6,12 @@ CONFIG += socexplorerplugin CONFIG += dll CONFIG -= static -#CONFIG(debug, debug|release) { -# DEBUG_EXT = _d -#} else { -# DEBUG_EXT = -#} +VERSION=0.2.0 TARGET = ambaplugin #$${DEBUG_EXT} DEFINES += PLUGIN=ambaplugin DEFINES += PLUGINHEADER="\"\\\"ambaplugin.h"\\\"\" DEFINES += driver_Name="\"\\\"AMBA_PLUGIN"\\\"\" DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" -DEFINES += driver_Version="\"\\\"0.0.1"\\\"\" DEFINES += driver_Description="\"\\\"This driver handles the Gaisler AMBA plugn' play system."\\\"\" DEFINES += driver_can_be_root=0 DEFINES += driver_can_be_child=1 diff --git a/dsu3plugin/dsu3plugin.pro b/dsu3plugin/dsu3plugin.pro --- a/dsu3plugin/dsu3plugin.pro +++ b/dsu3plugin/dsu3plugin.pro @@ -7,23 +7,16 @@ CONFIG += socexplorerplugin TEMPLATE = lib -#CONFIG(debug, debug|release) { -# DEBUG_EXT = _d -#} else { -# DEBUG_EXT = -#} - QMAKE_LFLAGS_RELEASE += --enable-auto-import -mstackrealign QMAKE_LFLAGS_DEBUG += --enable-auto-import -mstackrealign - +VERSION=0.2.0 TARGET = dsu3plugin #$${DEBUG_EXT} DEFINES += PLUGIN=dsu3plugin DEFINES += PLUGINHEADER="\"\\\"dsu3plugin.h"\\\"\" DEFINES += driver_Name="\"\\\"dsu3plugin"\\\"\" DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" -DEFINES += driver_Version="\"\\\"0.0.1"\\\"\" DEFINES += driver_Description="\"\\\"DSU driver, works with GAISLER's DSU3 unit."\\\"\" DEFINES += driver_can_be_root=0 DEFINES += driver_can_be_child=1 diff --git a/genericrwplugin/genericrwplugin.pro b/genericrwplugin/genericrwplugin.pro --- a/genericrwplugin/genericrwplugin.pro +++ b/genericrwplugin/genericrwplugin.pro @@ -7,17 +7,12 @@ CONFIG += socexplorerplugin CONFIG += dll CONFIG -= static -#CONFIG(debug, debug|release) { -# DEBUG_EXT = _d -#} else { -# DEBUG_EXT = -#} -TARGET = genericrwplugin #$${DEBUG_EXT} +VERSION=1.1.0 +TARGET = genericrwplugin DEFINES += PLUGIN=genericrwplugin DEFINES += PLUGINHEADER="\"\\\"genericrwplugin.h"\\\"\" DEFINES += driver_Name="\"\\\"GenericRWplugin"\\\"\" DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" -DEFINES += driver_Version="\"\\\"1.1.0"\\\"\" DEFINES += driver_Description="\"\\\"Generic plugin, gives you R/W access to any memory area."\\\"\" DEFINES += driver_can_be_root=0 DEFINES += driver_can_be_child=1 diff --git a/memcheckplugin/memcheckplugin.pro b/memcheckplugin/memcheckplugin.pro --- a/memcheckplugin/memcheckplugin.pro +++ b/memcheckplugin/memcheckplugin.pro @@ -7,19 +7,12 @@ CONFIG += socexplorerplugin CONFIG += dll CONFIG -= static -#CONFIG(debug, debug|release) { -# DEBUG_EXT = _d -#} else { -# DEBUG_EXT = -#} - - -TARGET = memcheckplugin #$${DEBUG_EXT} +VERSION=0.1.0 +TARGET = memcheckplugin DEFINES += PLUGIN=memcheckplugin DEFINES += PLUGINHEADER="\"\\\"memcheckplugin.h"\\\"\" DEFINES += driver_Name="\"\\\"MemChecker"\\\"\" DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" -DEFINES += driver_Version="\"\\\"1.0.1"\\\"\" DEFINES += driver_Description="\"\\\"Memory controler driver, works with ESA's LEON2 memory controler."\\\"\" DEFINES += driver_can_be_root=0 DEFINES += driver_can_be_child=1 diff --git a/memctrlrplugin/memctrlrplugin.pro b/memctrlrplugin/memctrlrplugin.pro --- a/memctrlrplugin/memctrlrplugin.pro +++ b/memctrlrplugin/memctrlrplugin.pro @@ -7,18 +7,12 @@ CONFIG += socexplorerplugin CONFIG += dll CONFIG -= static -#CONFIG(debug, debug|release) { -# DEBUG_EXT = _d -#} else { -# DEBUG_EXT = -#} - -TARGET = memctrlrplugin #$${DEBUG_EXT} +VERSION=1.0.1 +TARGET = memctrlrplugin DEFINES += PLUGIN=memctrlrplugin DEFINES += PLUGINHEADER="\"\\\"memctrlrplugin.h"\\\"\" DEFINES += driver_Name="\"\\\"MemControler"\\\"\" DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" -DEFINES += driver_Version="\"\\\"1.0.1"\\\"\" DEFINES += driver_Description="\"\\\"Memory controler driver, works with ESA's LEON2 memory controler."\\\"\" DEFINES += driver_can_be_root=0 DEFINES += driver_can_be_child=1 diff --git a/spwplugin/SpwTcpPacketServer/incomingpacketparser.cpp b/spwplugin/SpwTcpPacketServer/incomingpacketparser.cpp new file mode 100644 --- /dev/null +++ b/spwplugin/SpwTcpPacketServer/incomingpacketparser.cpp @@ -0,0 +1,43 @@ +#include "incomingpacketparser.h" + +IncomingPacketParser::IncomingPacketParser(QObject *parent) : + QObject(parent) +{ + incompleteData = false; + localDataArray.clear(); +} + +void IncomingPacketParser::processIncomingQByteArray(QByteArray incomingQByteArray) +{ + int ccsdsSize; + bool keepParsing; + QByteArray tcPacket; + + keepParsing = true; + + localDataArray.append( incomingQByteArray ); + + if (localDataArray.size() >= 4 ) + { + while(keepParsing == true) + { + ccsdsSize = ( (unsigned char) localDataArray[1] ) * 256 * 256 + + ( (unsigned char) localDataArray[2] ) * 256 + + ( (unsigned char) localDataArray[3] ); + + if (localDataArray.size() < (ccsdsSize+4) ) keepParsing = false; + else + { + tcPacket = QByteArray( localDataArray ); + tcPacket.resize( ccsdsSize + 4 ); + + emit sendPacketUsingSpaceWire( tcPacket ); + + localDataArray.remove(0, ccsdsSize + 4); + } + + if (localDataArray.size() >= 4 ) keepParsing = true; + else keepParsing = false; + } + } +} diff --git a/spwplugin/SpwTcpPacketServer/incomingpacketparser.h b/spwplugin/SpwTcpPacketServer/incomingpacketparser.h new file mode 100644 --- /dev/null +++ b/spwplugin/SpwTcpPacketServer/incomingpacketparser.h @@ -0,0 +1,26 @@ +#ifndef INCOMINGTCPARSER_H +#define INCOMINGTCPARSER_H + +#include + +class IncomingPacketParser : public QObject +{ + Q_OBJECT +public: + explicit IncomingPacketParser(QObject *parent = 0); + + void processIncomingQByteArray(QByteArray incomingQByteArray); + +signals: + void sendMessage( QString ); + void sendPacketUsingSpaceWire( QByteArray packet ); + +public slots: + +private: + QByteArray localDataArray; + bool incompleteData; + +}; + +#endif // INCOMINGTCPARSER_H diff --git a/spwplugin/SpwTcpPacketServer/spwtcppacketserver.cpp b/spwplugin/SpwTcpPacketServer/spwtcppacketserver.cpp --- a/spwplugin/SpwTcpPacketServer/spwtcppacketserver.cpp +++ b/spwplugin/SpwTcpPacketServer/spwtcppacketserver.cpp @@ -31,7 +31,7 @@ SpwTcpPacketServer::SpwTcpPacketServer(Q ui->setupUi(this); this->p_bridge = NULL; this->p_server = new QTcpServer(); - this->incomingTCParser = new IncomingTCParser(); + this->incomingPacketParser = new IncomingPacketParser(); connect(this->ui->startServeQpb,SIGNAL(clicked(bool)),SLOT(toggleServer())); updateHostIP(); @@ -39,8 +39,8 @@ SpwTcpPacketServer::SpwTcpPacketServer(Q connect(this->p_server,SIGNAL(newConnection()),this,SLOT(newConnection())); resetStatististics(); - connect( this->incomingTCParser, SIGNAL(sendPacketUsingSpaceWire(QByteArray)), - this, SLOT(sendTCUsingSpaceWire(QByteArray))); + connect( this->incomingPacketParser, SIGNAL(sendPacketUsingSpaceWire(QByteArray)), + this, SLOT(sendSPWPacketUsingSpaceWireaceWire(QByteArray))); } SpwTcpPacketServer::~SpwTcpPacketServer() @@ -125,10 +125,10 @@ void SpwTcpPacketServer::newConnection() QTcpSocket* soc=this->p_server->nextPendingConnection(); this->connectedClients.append(soc); this->ui->listWidget->addItem(this->connectedClients.last()->peerAddress().toString()); - connect(soc,SIGNAL(readyRead()),this,SLOT(parseIncomingTC())); + connect(soc,SIGNAL(readyRead()),this,SLOT(parseIncomingPacket())); } -void SpwTcpPacketServer::parseIncomingTC() +void SpwTcpPacketServer::parseIncomingPacket() { for(int i=0;ireadAll(); - incomingTCParser->processIncomingQByteArray( data ); + incomingPacketParser->processIncomingQByteArray( data ); }while(soc->bytesAvailable()!=0); } } } } -void SpwTcpPacketServer::sendTCUsingSpaceWire(QByteArray data) +void SpwTcpPacketServer::sendSPWPacketUsingSpaceWire(QByteArray data) { onePacketReceived(); if(data[0]==(char)0) // Protocole = 0 => Host to SpaceWire packet transmission diff --git a/spwplugin/SpwTcpPacketServer/spwtcppacketserver.h b/spwplugin/SpwTcpPacketServer/spwtcppacketserver.h --- a/spwplugin/SpwTcpPacketServer/spwtcppacketserver.h +++ b/spwplugin/SpwTcpPacketServer/spwtcppacketserver.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include namespace Ui { class SpwTcpPacketServer; @@ -52,8 +52,8 @@ public slots: void setServerPort(qint32 port); void setServerSetIP(QString ip); void newConnection(); - void parseIncomingTC(); - void sendTCUsingSpaceWire(QByteArray data ); + void parseIncomingPacket(); + void sendSPWPacketUsingSpaceWire(QByteArray data ); void readReady(); void resetStatististics(); private: @@ -66,7 +66,7 @@ private: QList connectedClients; unsigned int receivedPackets; unsigned int transmittedPackets; - IncomingTCParser *incomingTCParser; + IncomingPacketParser *incomingPacketParser; }; #endif // SPWTCPPACKETSERVER_H diff --git a/spwplugin/StarDundee/stardundeespw_usb.cpp b/spwplugin/StarDundee/stardundeespw_usb.cpp --- a/spwplugin/StarDundee/stardundeespw_usb.cpp +++ b/spwplugin/StarDundee/stardundeespw_usb.cpp @@ -539,7 +539,6 @@ bool stardundeeSPW_USB_Manager::connectB bool stardundeeSPW_USB_Manager::connectBridgeAsInterface() { -// QMutexLocker mlock(&this->handleMutex); this->handleMutex->lock(); int status; U32 statusControl; diff --git a/spwplugin/incomingtcparser.cpp b/spwplugin/incomingtcparser.cpp deleted file mode 100644 --- a/spwplugin/incomingtcparser.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "incomingtcparser.h" - -IncomingTCParser::IncomingTCParser(QObject *parent) : - QObject(parent) -{ - incompleteData = false; - localDataArray.clear(); -} - -void IncomingTCParser::processIncomingQByteArray(QByteArray incomingQByteArray) -{ - int ccsdsSize; - bool keepParsing; - QByteArray tcPacket; - - keepParsing = true; - - localDataArray.append( incomingQByteArray ); - - if (localDataArray.size() >= 4 ) - { - while(keepParsing == true) - { - ccsdsSize = ( (unsigned char) localDataArray[1] ) * 256 * 256 - + ( (unsigned char) localDataArray[2] ) * 256 - + ( (unsigned char) localDataArray[3] ); - - if (localDataArray.size() < (ccsdsSize+4) ) keepParsing = false; - else - { - tcPacket = QByteArray( localDataArray ); - tcPacket.resize( ccsdsSize + 4 ); - - emit sendPacketUsingSpaceWire( tcPacket ); - - localDataArray.remove(0, ccsdsSize + 4); - } - - if (localDataArray.size() >= 4 ) keepParsing = true; - else keepParsing = false; - } - } -} diff --git a/spwplugin/incomingtcparser.h b/spwplugin/incomingtcparser.h deleted file mode 100644 --- a/spwplugin/incomingtcparser.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef INCOMINGTCPARSER_H -#define INCOMINGTCPARSER_H - -#include - -class IncomingTCParser : public QObject -{ - Q_OBJECT -public: - explicit IncomingTCParser(QObject *parent = 0); - - void processIncomingQByteArray(QByteArray incomingQByteArray); - -signals: - void sendMessage( QString ); - void sendPacketUsingSpaceWire( QByteArray packet ); - -public slots: - -private: - QByteArray localDataArray; - bool incompleteData; - -}; - -#endif // INCOMINGTCPARSER_H diff --git a/spwplugin/spwplugin.pro b/spwplugin/spwplugin.pro --- a/spwplugin/spwplugin.pro +++ b/spwplugin/spwplugin.pro @@ -9,13 +9,13 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += win32:CONFIG += dll win32:CONFIG -= static +VERSION=0.5.0 TARGET = spwplugin DEFINES += PLUGIN=spwplugin DEFINES += PLUGINHEADER="\"\\\"spwplugin.h"\\\"\" DEFINES += driver_Name="\"\\\"SpwPlugin"\\\"\" -DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@member.fsf.org"\\\"\" -DEFINES += driver_Version="\"\\\"0.0.1"\\\"\" -DEFINES += driver_Description="\"\\\"Driver description"\\\"\" +DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@member.fsf.org; Paul Leroy paul.leroy@lpp.polytechnique.fr"\\\"\" +DEFINES += driver_Description="\"\\\"This plugin allows you to use spacewire's RMAP protocol with Stardundee USB brick v1"\\\"\" DEFINES += driver_can_be_root=1 DEFINES += driver_can_be_child=0 DEFINES += driver_VID=0 @@ -30,6 +30,7 @@ INCLUDEPATH += \ $${PWD} \ $$STARTDUNDEEPATH/inc \ StarDundee \ + SpwTcpPacketServer \ GR-ESB HEADERS += \ @@ -42,7 +43,7 @@ HEADERS += \ spwpywrapper.h \ GR-ESB/gr_esb_bridge.h \ GR-ESB/gr_esb_ui.h \ - incomingtcparser.h + SpwTcpPacketServer/incomingpacketparser.h SOURCES += \ @@ -54,7 +55,7 @@ SOURCES += \ spwpywrapper.cpp \ GR-ESB/gr_esb_bridge.cpp \ GR-ESB/gr_esb_ui.cpp \ - incomingtcparser.cpp + SpwTcpPacketServer/incomingpacketparser.cpp FORMS += \ StarDundee/stardundeeGUI.ui \