@@ -0,0 +1,80 | |||||
|
1 | %global upstream_name socexplorer-plugins-0.5 | |||
|
2 | ||||
|
3 | Name: socexplorer-plugins | |||
|
4 | Version: 0.5 | |||
|
5 | Release: 0%{?dist} | |||
|
6 | Summary: Base plugins for SocExplorer. | |||
|
7 | Group: Development/Tools | |||
|
8 | License: GPLv2 | |||
|
9 | URL: https://hephaistos.lpp.polytechnique.fr/redmine/projects/socexplorer | |||
|
10 | Source0: https://hephaistos.lpp.polytechnique.fr/redmine/attachments/download/381/socexplorer-plugins-0.5.zip | |||
|
11 | ||||
|
12 | BuildRequires: python2-devel | |||
|
13 | BuildRequires: qt5-qtbase-devel | |||
|
14 | BuildRequires: qt5-qtwebkit-devel | |||
|
15 | BuildRequires: qt5-qttools-static | |||
|
16 | BuildRequires: qt5-qttools-devel | |||
|
17 | BuildRequires: qt5-qtsvg-devel | |||
|
18 | BuildRequires: qt5-qtxmlpatterns-devel | |||
|
19 | BuildRequires: elfutils-libelf-devel | |||
|
20 | BuildRequires: qt5-pythonqt-devel | |||
|
21 | BuildRequires: socexplorer-devel | |||
|
22 | ||||
|
23 | %description | |||
|
24 | 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. | |||
|
25 | You will get: | |||
|
26 | - AHB UART plugin | |||
|
27 | - APB UART plugin | |||
|
28 | - AMBA plugin | |||
|
29 | - DSU3 plugin | |||
|
30 | - Generic rw plugin | |||
|
31 | - Memcheck & Memectr plugins | |||
|
32 | ||||
|
33 | %prep | |||
|
34 | %setup -q -n %{upstream_name} | |||
|
35 | ||||
|
36 | %build | |||
|
37 | %{_qt5_qmake} | |||
|
38 | ||||
|
39 | make %{?_smp_mflags} | |||
|
40 | ||||
|
41 | %install | |||
|
42 | make install INSTALL_ROOT=%{buildroot} | |||
|
43 | ||||
|
44 | %post -p /sbin/ldconfig | |||
|
45 | ||||
|
46 | %postun -p /sbin/ldconfig | |||
|
47 | ||||
|
48 | %files | |||
|
49 | %{_qt5_libdir}/SocExplorer/plugins/libApbUartPlugin.so* | |||
|
50 | %{_qt5_libdir}/SocExplorer/plugins/libahbuartplugin.so* | |||
|
51 | %{_qt5_libdir}/SocExplorer/plugins/libambaplugin.so* | |||
|
52 | %{_qt5_libdir}/SocExplorer/plugins/libdsu3plugin.so* | |||
|
53 | %{_qt5_libdir}/SocExplorer/plugins/libgenericrwplugin.so* | |||
|
54 | %{_qt5_libdir}/SocExplorer/plugins/libmemcheckplugin.so* | |||
|
55 | %{_qt5_libdir}/SocExplorer/plugins/libmemctrlrplugin.so* | |||
|
56 | ||||
|
57 | %changelog | |||
|
58 | * Thu Mar 26 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.5 | |||
|
59 | -Uses r51 as source. | |||
|
60 | ||||
|
61 | * Wed Mar 25 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |||
|
62 | -Uses r50 as source. | |||
|
63 | ||||
|
64 | * Fri Mar 20 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |||
|
65 | -Uses r49 as source. | |||
|
66 | ||||
|
67 | * Mon Mar 9 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |||
|
68 | -Uses r48 as source. | |||
|
69 | ||||
|
70 | * Wed Feb 18 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |||
|
71 | -Uses r45 as source. | |||
|
72 | ||||
|
73 | * Tue Feb 10 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |||
|
74 | -Uses r44 as source. | |||
|
75 | ||||
|
76 | * Tue Dec 30 2014 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |||
|
77 | - Uses r42 as source. | |||
|
78 | ||||
|
79 | * Sat Jun 28 2014 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |||
|
80 | - Initial Fedora packaging |
@@ -0,0 +1,43 | |||||
|
1 | #include "incomingpacketparser.h" | |||
|
2 | ||||
|
3 | IncomingPacketParser::IncomingPacketParser(QObject *parent) : | |||
|
4 | QObject(parent) | |||
|
5 | { | |||
|
6 | incompleteData = false; | |||
|
7 | localDataArray.clear(); | |||
|
8 | } | |||
|
9 | ||||
|
10 | void IncomingPacketParser::processIncomingQByteArray(QByteArray incomingQByteArray) | |||
|
11 | { | |||
|
12 | int ccsdsSize; | |||
|
13 | bool keepParsing; | |||
|
14 | QByteArray tcPacket; | |||
|
15 | ||||
|
16 | keepParsing = true; | |||
|
17 | ||||
|
18 | localDataArray.append( incomingQByteArray ); | |||
|
19 | ||||
|
20 | if (localDataArray.size() >= 4 ) | |||
|
21 | { | |||
|
22 | while(keepParsing == true) | |||
|
23 | { | |||
|
24 | ccsdsSize = ( (unsigned char) localDataArray[1] ) * 256 * 256 | |||
|
25 | + ( (unsigned char) localDataArray[2] ) * 256 | |||
|
26 | + ( (unsigned char) localDataArray[3] ); | |||
|
27 | ||||
|
28 | if (localDataArray.size() < (ccsdsSize+4) ) keepParsing = false; | |||
|
29 | else | |||
|
30 | { | |||
|
31 | tcPacket = QByteArray( localDataArray ); | |||
|
32 | tcPacket.resize( ccsdsSize + 4 ); | |||
|
33 | ||||
|
34 | emit sendPacketUsingSpaceWire( tcPacket ); | |||
|
35 | ||||
|
36 | localDataArray.remove(0, ccsdsSize + 4); | |||
|
37 | } | |||
|
38 | ||||
|
39 | if (localDataArray.size() >= 4 ) keepParsing = true; | |||
|
40 | else keepParsing = false; | |||
|
41 | } | |||
|
42 | } | |||
|
43 | } |
@@ -0,0 +1,26 | |||||
|
1 | #ifndef INCOMINGTCPARSER_H | |||
|
2 | #define INCOMINGTCPARSER_H | |||
|
3 | ||||
|
4 | #include <QObject> | |||
|
5 | ||||
|
6 | class IncomingPacketParser : public QObject | |||
|
7 | { | |||
|
8 | Q_OBJECT | |||
|
9 | public: | |||
|
10 | explicit IncomingPacketParser(QObject *parent = 0); | |||
|
11 | ||||
|
12 | void processIncomingQByteArray(QByteArray incomingQByteArray); | |||
|
13 | ||||
|
14 | signals: | |||
|
15 | void sendMessage( QString ); | |||
|
16 | void sendPacketUsingSpaceWire( QByteArray packet ); | |||
|
17 | ||||
|
18 | public slots: | |||
|
19 | ||||
|
20 | private: | |||
|
21 | QByteArray localDataArray; | |||
|
22 | bool incompleteData; | |||
|
23 | ||||
|
24 | }; | |||
|
25 | ||||
|
26 | #endif // INCOMINGTCPARSER_H |
@@ -7,20 +7,13 CONFIG += socexplorerplugin | |||||
7 |
|
7 | |||
8 | win32:CONFIG += dll |
|
8 | win32:CONFIG += dll | |
9 | win32:CONFIG -= static |
|
9 | win32:CONFIG -= static | |
10 |
|
10 | VERSION=1.0.0 | ||
11 | #CONFIG(debug, debug|release) { |
|
|||
12 | # DEBUG_EXT = _d |
|
|||
13 | #} else { |
|
|||
14 | # DEBUG_EXT = |
|
|||
15 | #} |
|
|||
16 |
|
||||
17 | TARGET = ApbUartPlugin #$${DEBUG_EXT} |
|
11 | TARGET = ApbUartPlugin #$${DEBUG_EXT} | |
18 |
|
12 | |||
19 | DEFINES += PLUGIN=ApbUartPlugin |
|
13 | DEFINES += PLUGIN=ApbUartPlugin | |
20 | DEFINES += PLUGINHEADER="\"\\\"APBUARTPLUGIN.h"\\\"\" |
|
14 | DEFINES += PLUGINHEADER="\"\\\"APBUARTPLUGIN.h"\\\"\" | |
21 | DEFINES += driver_Name="\"\\\"APB_UART_PLUGIN"\\\"\" |
|
15 | DEFINES += driver_Name="\"\\\"APB_UART_PLUGIN"\\\"\" | |
22 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@member.fsf.org"\\\"\" |
|
16 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@member.fsf.org"\\\"\" | |
23 | DEFINES += driver_Version="\"\\\"0.0.1"\\\"\" |
|
|||
24 | DEFINES += driver_Description="\"\\\"This plugin provides a terminal widget connected to Gaisler\'s APBUART with or without loop-back mode."\\\"\" |
|
17 | DEFINES += driver_Description="\"\\\"This plugin provides a terminal widget connected to Gaisler\'s APBUART with or without loop-back mode."\\\"\" | |
25 | DEFINES += driver_can_be_root=0 |
|
18 | DEFINES += driver_can_be_root=0 | |
26 | DEFINES += driver_can_be_child=1 |
|
19 | DEFINES += driver_can_be_child=1 |
@@ -11,4 +11,5 SUBDIRS = \ | |||||
11 | memctrlrplugin \ |
|
11 | memctrlrplugin \ | |
12 | memcheckplugin |
|
12 | memcheckplugin | |
13 |
|
13 | |||
|
14 | OTHER_FILES += SocExplorer-plugins.spec | |||
14 | #unix:SUBDIRS += spwplugin |
|
15 | #unix:SUBDIRS += spwplugin |
@@ -7,17 +7,12 CONFIG += socexplorerplugin | |||||
7 | TEMPLATE = lib |
|
7 | TEMPLATE = lib | |
8 | CONFIG += dll |
|
8 | CONFIG += dll | |
9 | CONFIG -= static |
|
9 | CONFIG -= static | |
10 | #CONFIG(debug, debug|release) { |
|
10 | VERSION=1.4.0 | |
11 | # DEBUG_EXT = _d |
|
|||
12 | #} else { |
|
|||
13 | # DEBUG_EXT = |
|
|||
14 | #} |
|
|||
15 | TARGET = ahbuartplugin #$${DEBUG_EXT} |
|
11 | TARGET = ahbuartplugin #$${DEBUG_EXT} | |
16 | DEFINES += PLUGIN=ahbuartplugin |
|
12 | DEFINES += PLUGIN=ahbuartplugin | |
17 | DEFINES += PLUGINHEADER="\"\\\"ahbuartplugin.h"\\\"\" |
|
13 | DEFINES += PLUGINHEADER="\"\\\"ahbuartplugin.h"\\\"\" | |
18 | DEFINES += driver_Name="\"\\\"AHBUARTplugin"\\\"\" |
|
14 | DEFINES += driver_Name="\"\\\"AHBUARTplugin"\\\"\" | |
19 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" |
|
15 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" | |
20 | DEFINES += driver_Version="\"\\\"1.3.2"\\\"\" |
|
|||
21 | 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."\\\"\" | |
22 | DEFINES += driver_can_be_root=1 |
|
17 | DEFINES += driver_can_be_root=1 | |
23 | DEFINES += driver_can_be_child=0 |
|
18 | DEFINES += driver_can_be_child=0 |
@@ -6,17 +6,12 | |||||
6 | CONFIG += socexplorerplugin |
|
6 | CONFIG += socexplorerplugin | |
7 | CONFIG += dll |
|
7 | CONFIG += dll | |
8 | CONFIG -= static |
|
8 | CONFIG -= static | |
9 | #CONFIG(debug, debug|release) { |
|
9 | VERSION=0.2.0 | |
10 | # DEBUG_EXT = _d |
|
|||
11 | #} else { |
|
|||
12 | # DEBUG_EXT = |
|
|||
13 | #} |
|
|||
14 | TARGET = ambaplugin #$${DEBUG_EXT} |
|
10 | TARGET = ambaplugin #$${DEBUG_EXT} | |
15 | DEFINES += PLUGIN=ambaplugin |
|
11 | DEFINES += PLUGIN=ambaplugin | |
16 | DEFINES += PLUGINHEADER="\"\\\"ambaplugin.h"\\\"\" |
|
12 | DEFINES += PLUGINHEADER="\"\\\"ambaplugin.h"\\\"\" | |
17 | DEFINES += driver_Name="\"\\\"AMBA_PLUGIN"\\\"\" |
|
13 | DEFINES += driver_Name="\"\\\"AMBA_PLUGIN"\\\"\" | |
18 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" |
|
14 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" | |
19 | DEFINES += driver_Version="\"\\\"0.0.1"\\\"\" |
|
|||
20 | DEFINES += driver_Description="\"\\\"This driver handles the Gaisler AMBA plugn' play system."\\\"\" |
|
15 | DEFINES += driver_Description="\"\\\"This driver handles the Gaisler AMBA plugn' play system."\\\"\" | |
21 | DEFINES += driver_can_be_root=0 |
|
16 | DEFINES += driver_can_be_root=0 | |
22 | DEFINES += driver_can_be_child=1 |
|
17 | DEFINES += driver_can_be_child=1 |
@@ -7,23 +7,16 CONFIG += socexplorerplugin | |||||
7 |
|
7 | |||
8 | TEMPLATE = lib |
|
8 | TEMPLATE = lib | |
9 |
|
9 | |||
10 | #CONFIG(debug, debug|release) { |
|
|||
11 | # DEBUG_EXT = _d |
|
|||
12 | #} else { |
|
|||
13 | # DEBUG_EXT = |
|
|||
14 | #} |
|
|||
15 |
|
||||
16 | QMAKE_LFLAGS_RELEASE += --enable-auto-import -mstackrealign |
|
10 | QMAKE_LFLAGS_RELEASE += --enable-auto-import -mstackrealign | |
17 | QMAKE_LFLAGS_DEBUG += --enable-auto-import -mstackrealign |
|
11 | QMAKE_LFLAGS_DEBUG += --enable-auto-import -mstackrealign | |
18 |
|
12 | |||
19 |
|
13 | VERSION=0.2.0 | ||
20 | TARGET = dsu3plugin #$${DEBUG_EXT} |
|
14 | TARGET = dsu3plugin #$${DEBUG_EXT} | |
21 |
|
15 | |||
22 | DEFINES += PLUGIN=dsu3plugin |
|
16 | DEFINES += PLUGIN=dsu3plugin | |
23 | DEFINES += PLUGINHEADER="\"\\\"dsu3plugin.h"\\\"\" |
|
17 | DEFINES += PLUGINHEADER="\"\\\"dsu3plugin.h"\\\"\" | |
24 | DEFINES += driver_Name="\"\\\"dsu3plugin"\\\"\" |
|
18 | DEFINES += driver_Name="\"\\\"dsu3plugin"\\\"\" | |
25 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" |
|
19 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" | |
26 | DEFINES += driver_Version="\"\\\"0.0.1"\\\"\" |
|
|||
27 | DEFINES += driver_Description="\"\\\"DSU driver, works with GAISLER's DSU3 unit."\\\"\" |
|
20 | DEFINES += driver_Description="\"\\\"DSU driver, works with GAISLER's DSU3 unit."\\\"\" | |
28 | DEFINES += driver_can_be_root=0 |
|
21 | DEFINES += driver_can_be_root=0 | |
29 | DEFINES += driver_can_be_child=1 |
|
22 | DEFINES += driver_can_be_child=1 |
@@ -7,17 +7,12 CONFIG += socexplorerplugin | |||||
7 | CONFIG += dll |
|
7 | CONFIG += dll | |
8 | CONFIG -= static |
|
8 | CONFIG -= static | |
9 |
|
9 | |||
10 | #CONFIG(debug, debug|release) { |
|
10 | VERSION=1.1.0 | |
11 | # DEBUG_EXT = _d |
|
11 | TARGET = genericrwplugin | |
12 | #} else { |
|
|||
13 | # DEBUG_EXT = |
|
|||
14 | #} |
|
|||
15 | TARGET = genericrwplugin #$${DEBUG_EXT} |
|
|||
16 | DEFINES += PLUGIN=genericrwplugin |
|
12 | DEFINES += PLUGIN=genericrwplugin | |
17 | DEFINES += PLUGINHEADER="\"\\\"genericrwplugin.h"\\\"\" |
|
13 | DEFINES += PLUGINHEADER="\"\\\"genericrwplugin.h"\\\"\" | |
18 | DEFINES += driver_Name="\"\\\"GenericRWplugin"\\\"\" |
|
14 | DEFINES += driver_Name="\"\\\"GenericRWplugin"\\\"\" | |
19 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" |
|
15 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" | |
20 | DEFINES += driver_Version="\"\\\"1.1.0"\\\"\" |
|
|||
21 | DEFINES += driver_Description="\"\\\"Generic plugin, gives you R/W access to any memory area."\\\"\" |
|
16 | DEFINES += driver_Description="\"\\\"Generic plugin, gives you R/W access to any memory area."\\\"\" | |
22 | DEFINES += driver_can_be_root=0 |
|
17 | DEFINES += driver_can_be_root=0 | |
23 | DEFINES += driver_can_be_child=1 |
|
18 | DEFINES += driver_can_be_child=1 |
@@ -7,19 +7,12 CONFIG += socexplorerplugin | |||||
7 | CONFIG += dll |
|
7 | CONFIG += dll | |
8 | CONFIG -= static |
|
8 | CONFIG -= static | |
9 |
|
9 | |||
10 | #CONFIG(debug, debug|release) { |
|
10 | VERSION=0.1.0 | |
11 | # DEBUG_EXT = _d |
|
11 | TARGET = memcheckplugin | |
12 | #} else { |
|
|||
13 | # DEBUG_EXT = |
|
|||
14 | #} |
|
|||
15 |
|
||||
16 |
|
||||
17 | TARGET = memcheckplugin #$${DEBUG_EXT} |
|
|||
18 | DEFINES += PLUGIN=memcheckplugin |
|
12 | DEFINES += PLUGIN=memcheckplugin | |
19 | DEFINES += PLUGINHEADER="\"\\\"memcheckplugin.h"\\\"\" |
|
13 | DEFINES += PLUGINHEADER="\"\\\"memcheckplugin.h"\\\"\" | |
20 | DEFINES += driver_Name="\"\\\"MemChecker"\\\"\" |
|
14 | DEFINES += driver_Name="\"\\\"MemChecker"\\\"\" | |
21 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" |
|
15 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" | |
22 | DEFINES += driver_Version="\"\\\"1.0.1"\\\"\" |
|
|||
23 | DEFINES += driver_Description="\"\\\"Memory controler driver, works with ESA's LEON2 memory controler."\\\"\" |
|
16 | DEFINES += driver_Description="\"\\\"Memory controler driver, works with ESA's LEON2 memory controler."\\\"\" | |
24 | DEFINES += driver_can_be_root=0 |
|
17 | DEFINES += driver_can_be_root=0 | |
25 | DEFINES += driver_can_be_child=1 |
|
18 | DEFINES += driver_can_be_child=1 |
@@ -7,18 +7,12 CONFIG += socexplorerplugin | |||||
7 | CONFIG += dll |
|
7 | CONFIG += dll | |
8 | CONFIG -= static |
|
8 | CONFIG -= static | |
9 |
|
9 | |||
10 | #CONFIG(debug, debug|release) { |
|
10 | VERSION=1.0.1 | |
11 | # DEBUG_EXT = _d |
|
11 | TARGET = memctrlrplugin | |
12 | #} else { |
|
|||
13 | # DEBUG_EXT = |
|
|||
14 | #} |
|
|||
15 |
|
||||
16 | TARGET = memctrlrplugin #$${DEBUG_EXT} |
|
|||
17 | DEFINES += PLUGIN=memctrlrplugin |
|
12 | DEFINES += PLUGIN=memctrlrplugin | |
18 | DEFINES += PLUGINHEADER="\"\\\"memctrlrplugin.h"\\\"\" |
|
13 | DEFINES += PLUGINHEADER="\"\\\"memctrlrplugin.h"\\\"\" | |
19 | DEFINES += driver_Name="\"\\\"MemControler"\\\"\" |
|
14 | DEFINES += driver_Name="\"\\\"MemControler"\\\"\" | |
20 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" |
|
15 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr"\\\"\" | |
21 | DEFINES += driver_Version="\"\\\"1.0.1"\\\"\" |
|
|||
22 | DEFINES += driver_Description="\"\\\"Memory controler driver, works with ESA's LEON2 memory controler."\\\"\" |
|
16 | DEFINES += driver_Description="\"\\\"Memory controler driver, works with ESA's LEON2 memory controler."\\\"\" | |
23 | DEFINES += driver_can_be_root=0 |
|
17 | DEFINES += driver_can_be_root=0 | |
24 | DEFINES += driver_can_be_child=1 |
|
18 | DEFINES += driver_can_be_child=1 |
@@ -31,7 +31,7 SpwTcpPacketServer::SpwTcpPacketServer(Q | |||||
31 | ui->setupUi(this); |
|
31 | ui->setupUi(this); | |
32 | this->p_bridge = NULL; |
|
32 | this->p_bridge = NULL; | |
33 | this->p_server = new QTcpServer(); |
|
33 | this->p_server = new QTcpServer(); | |
34 |
this->incoming |
|
34 | this->incomingPacketParser = new IncomingPacketParser(); | |
35 |
|
35 | |||
36 | connect(this->ui->startServeQpb,SIGNAL(clicked(bool)),SLOT(toggleServer())); |
|
36 | connect(this->ui->startServeQpb,SIGNAL(clicked(bool)),SLOT(toggleServer())); | |
37 | updateHostIP(); |
|
37 | updateHostIP(); | |
@@ -39,8 +39,8 SpwTcpPacketServer::SpwTcpPacketServer(Q | |||||
39 | connect(this->p_server,SIGNAL(newConnection()),this,SLOT(newConnection())); |
|
39 | connect(this->p_server,SIGNAL(newConnection()),this,SLOT(newConnection())); | |
40 | resetStatististics(); |
|
40 | resetStatististics(); | |
41 |
|
41 | |||
42 |
connect( this->incoming |
|
42 | connect( this->incomingPacketParser, SIGNAL(sendPacketUsingSpaceWire(QByteArray)), | |
43 |
this, SLOT(send |
|
43 | this, SLOT(sendSPWPacketUsingSpaceWireaceWire(QByteArray))); | |
44 | } |
|
44 | } | |
45 |
|
45 | |||
46 | SpwTcpPacketServer::~SpwTcpPacketServer() |
|
46 | SpwTcpPacketServer::~SpwTcpPacketServer() | |
@@ -125,10 +125,10 void SpwTcpPacketServer::newConnection() | |||||
125 | QTcpSocket* soc=this->p_server->nextPendingConnection(); |
|
125 | QTcpSocket* soc=this->p_server->nextPendingConnection(); | |
126 | this->connectedClients.append(soc); |
|
126 | this->connectedClients.append(soc); | |
127 | this->ui->listWidget->addItem(this->connectedClients.last()->peerAddress().toString()); |
|
127 | this->ui->listWidget->addItem(this->connectedClients.last()->peerAddress().toString()); | |
128 |
connect(soc,SIGNAL(readyRead()),this,SLOT(parseIncoming |
|
128 | connect(soc,SIGNAL(readyRead()),this,SLOT(parseIncomingPacket())); | |
129 | } |
|
129 | } | |
130 |
|
130 | |||
131 |
void SpwTcpPacketServer::parseIncoming |
|
131 | void SpwTcpPacketServer::parseIncomingPacket() | |
132 | { |
|
132 | { | |
133 | for(int i=0;i<connectedClients.count();i++) |
|
133 | for(int i=0;i<connectedClients.count();i++) | |
134 | { |
|
134 | { | |
@@ -145,14 +145,14 void SpwTcpPacketServer::parseIncomingTC | |||||
145 | do |
|
145 | do | |
146 | { |
|
146 | { | |
147 | QByteArray data = soc->readAll(); |
|
147 | QByteArray data = soc->readAll(); | |
148 |
incoming |
|
148 | incomingPacketParser->processIncomingQByteArray( data ); | |
149 | }while(soc->bytesAvailable()!=0); |
|
149 | }while(soc->bytesAvailable()!=0); | |
150 | } |
|
150 | } | |
151 | } |
|
151 | } | |
152 | } |
|
152 | } | |
153 | } |
|
153 | } | |
154 |
|
154 | |||
155 |
void SpwTcpPacketServer::send |
|
155 | void SpwTcpPacketServer::sendSPWPacketUsingSpaceWire(QByteArray data) | |
156 | { |
|
156 | { | |
157 | onePacketReceived(); |
|
157 | onePacketReceived(); | |
158 | if(data[0]==(char)0) // Protocole = 0 => Host to SpaceWire packet transmission |
|
158 | if(data[0]==(char)0) // Protocole = 0 => Host to SpaceWire packet transmission |
@@ -27,7 +27,7 | |||||
27 | #include <QTcpServer> |
|
27 | #include <QTcpServer> | |
28 | #include <QList> |
|
28 | #include <QList> | |
29 | #include <QTcpSocket> |
|
29 | #include <QTcpSocket> | |
30 |
#include <incoming |
|
30 | #include <incomingpacketparser.h> | |
31 |
|
31 | |||
32 | namespace Ui { |
|
32 | namespace Ui { | |
33 | class SpwTcpPacketServer; |
|
33 | class SpwTcpPacketServer; | |
@@ -52,8 +52,8 public slots: | |||||
52 | void setServerPort(qint32 port); |
|
52 | void setServerPort(qint32 port); | |
53 | void setServerSetIP(QString ip); |
|
53 | void setServerSetIP(QString ip); | |
54 | void newConnection(); |
|
54 | void newConnection(); | |
55 |
void parseIncoming |
|
55 | void parseIncomingPacket(); | |
56 |
void send |
|
56 | void sendSPWPacketUsingSpaceWire(QByteArray data ); | |
57 | void readReady(); |
|
57 | void readReady(); | |
58 | void resetStatististics(); |
|
58 | void resetStatististics(); | |
59 | private: |
|
59 | private: | |
@@ -66,7 +66,7 private: | |||||
66 | QList<QTcpSocket*> connectedClients; |
|
66 | QList<QTcpSocket*> connectedClients; | |
67 | unsigned int receivedPackets; |
|
67 | unsigned int receivedPackets; | |
68 | unsigned int transmittedPackets; |
|
68 | unsigned int transmittedPackets; | |
69 |
Incoming |
|
69 | IncomingPacketParser *incomingPacketParser; | |
70 | }; |
|
70 | }; | |
71 |
|
71 | |||
72 | #endif // SPWTCPPACKETSERVER_H |
|
72 | #endif // SPWTCPPACKETSERVER_H |
@@ -539,7 +539,6 bool stardundeeSPW_USB_Manager::connectB | |||||
539 |
|
539 | |||
540 | bool stardundeeSPW_USB_Manager::connectBridgeAsInterface() |
|
540 | bool stardundeeSPW_USB_Manager::connectBridgeAsInterface() | |
541 | { |
|
541 | { | |
542 | // QMutexLocker mlock(&this->handleMutex); |
|
|||
543 | this->handleMutex->lock(); |
|
542 | this->handleMutex->lock(); | |
544 | int status; |
|
543 | int status; | |
545 | U32 statusControl; |
|
544 | U32 statusControl; |
@@ -9,13 +9,13 greaterThan(QT_MAJOR_VERSION, 4): QT += | |||||
9 |
|
9 | |||
10 | win32:CONFIG += dll |
|
10 | win32:CONFIG += dll | |
11 | win32:CONFIG -= static |
|
11 | win32:CONFIG -= static | |
|
12 | VERSION=0.5.0 | |||
12 | TARGET = spwplugin |
|
13 | TARGET = spwplugin | |
13 | DEFINES += PLUGIN=spwplugin |
|
14 | DEFINES += PLUGIN=spwplugin | |
14 | DEFINES += PLUGINHEADER="\"\\\"spwplugin.h"\\\"\" |
|
15 | DEFINES += PLUGINHEADER="\"\\\"spwplugin.h"\\\"\" | |
15 | DEFINES += driver_Name="\"\\\"SpwPlugin"\\\"\" |
|
16 | DEFINES += driver_Name="\"\\\"SpwPlugin"\\\"\" | |
16 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@member.fsf.org"\\\"\" |
|
17 | DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@member.fsf.org; Paul Leroy paul.leroy@lpp.polytechnique.fr"\\\"\" | |
17 | DEFINES += driver_Version="\"\\\"0.0.1"\\\"\" |
|
18 | DEFINES += driver_Description="\"\\\"This plugin allows you to use spacewire's RMAP protocol with Stardundee USB brick v1"\\\"\" | |
18 | DEFINES += driver_Description="\"\\\"Driver description"\\\"\" |
|
|||
19 | DEFINES += driver_can_be_root=1 |
|
19 | DEFINES += driver_can_be_root=1 | |
20 | DEFINES += driver_can_be_child=0 |
|
20 | DEFINES += driver_can_be_child=0 | |
21 | DEFINES += driver_VID=0 |
|
21 | DEFINES += driver_VID=0 | |
@@ -30,6 +30,7 INCLUDEPATH += \ | |||||
30 | $${PWD} \ |
|
30 | $${PWD} \ | |
31 | $$STARTDUNDEEPATH/inc \ |
|
31 | $$STARTDUNDEEPATH/inc \ | |
32 | StarDundee \ |
|
32 | StarDundee \ | |
|
33 | SpwTcpPacketServer \ | |||
33 | GR-ESB |
|
34 | GR-ESB | |
34 |
|
35 | |||
35 | HEADERS += \ |
|
36 | HEADERS += \ | |
@@ -42,7 +43,7 HEADERS += \ | |||||
42 | spwpywrapper.h \ |
|
43 | spwpywrapper.h \ | |
43 | GR-ESB/gr_esb_bridge.h \ |
|
44 | GR-ESB/gr_esb_bridge.h \ | |
44 | GR-ESB/gr_esb_ui.h \ |
|
45 | GR-ESB/gr_esb_ui.h \ | |
45 |
incoming |
|
46 | SpwTcpPacketServer/incomingpacketparser.h | |
46 |
|
47 | |||
47 |
|
48 | |||
48 | SOURCES += \ |
|
49 | SOURCES += \ | |
@@ -54,7 +55,7 SOURCES += \ | |||||
54 | spwpywrapper.cpp \ |
|
55 | spwpywrapper.cpp \ | |
55 | GR-ESB/gr_esb_bridge.cpp \ |
|
56 | GR-ESB/gr_esb_bridge.cpp \ | |
56 | GR-ESB/gr_esb_ui.cpp \ |
|
57 | GR-ESB/gr_esb_ui.cpp \ | |
57 |
incoming |
|
58 | SpwTcpPacketServer/incomingpacketparser.cpp | |
58 |
|
59 | |||
59 | FORMS += \ |
|
60 | FORMS += \ | |
60 | StarDundee/stardundeeGUI.ui \ |
|
61 | StarDundee/stardundeeGUI.ui \ |
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