@@ -1,3 +1,7 | |||||
1 | syntax: glob |
|
1 | syntax: glob | |
2 | *.pro.user |
|
2 | *.pro.user | |
3 | *.o |
|
3 | *.o | |
|
4 | moc_* | |||
|
5 | *.so* | |||
|
6 | ui_*.h | |||
|
7 | Makefile |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2012, |
|
3 | -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2012, |
|
3 | -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2012, |
|
3 | -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2012, |
|
3 | -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2012, |
|
3 | -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2013, |
|
3 | -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2012, |
|
3 | -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2011, |
|
3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
@@ -40,6 +40,8 public slots: | |||||
40 | virtual unsigned int Write(unsigned int *Value,unsigned int count, unsigned int address=0)=0; |
|
40 | virtual unsigned int Write(unsigned int *Value,unsigned int count, unsigned int address=0)=0; | |
41 | virtual unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0)=0; |
|
41 | virtual unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0)=0; | |
42 | virtual int pushRMAPPacket(char* packet,int size)=0; |
|
42 | virtual int pushRMAPPacket(char* packet,int size)=0; | |
|
43 | signals: | |||
|
44 | void setConnected(bool connected); | |||
43 | protected: |
|
45 | protected: | |
44 | socexplorerplugin* plugin; |
|
46 | socexplorerplugin* plugin; | |
45 | QWidget* p_GUI; |
|
47 | QWidget* p_GUI; |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
@@ -66,6 +66,7 void spwplugin::bridgeSelectionChanged(c | |||||
66 | if(this->bridge!=NULL) |
|
66 | if(this->bridge!=NULL) | |
67 | { |
|
67 | { | |
68 | this->mainLayout->removeWidget(this->bridge->getGUI()); |
|
68 | this->mainLayout->removeWidget(this->bridge->getGUI()); | |
|
69 | this->disconnect(this,SLOT(setConnected(bool))); | |||
69 | delete this->bridge; |
|
70 | delete this->bridge; | |
70 | this->bridge= NULL; |
|
71 | this->bridge= NULL; | |
71 | } |
|
72 | } | |
@@ -75,12 +76,20 void spwplugin::bridgeSelectionChanged(c | |||||
75 | if(this->bridge!=NULL) |
|
76 | if(this->bridge!=NULL) | |
76 | { |
|
77 | { | |
77 | this->mainLayout->removeWidget(this->bridge->getGUI()); |
|
78 | this->mainLayout->removeWidget(this->bridge->getGUI()); | |
|
79 | this->disconnect(this,SLOT(setConnected(bool))); | |||
78 | delete this->bridge; |
|
80 | delete this->bridge; | |
79 | } |
|
81 | } | |
80 | this->bridge = new stardundeeSPW_USB(this); |
|
82 | this->bridge = new stardundeeSPW_USB(this); | |
81 | this->mainLayout->addWidget(this->bridge->getGUI(),1,0,1,2); |
|
83 | this->mainLayout->addWidget(this->bridge->getGUI(),1,0,1,2); | |
|
84 | connect(this->bridge,SIGNAL(setConnected(bool)),this,SLOT(setConnected(bool))); | |||
|
85 | } | |||
|
86 | ||||
82 | } |
|
87 | } | |
83 |
|
88 | |||
|
89 | void spwplugin::setConnected(bool connected) | |||
|
90 | { | |||
|
91 | this->Connected = connected; | |||
|
92 | emit activateSig(connected); | |||
84 | } |
|
93 | } | |
85 |
|
94 | |||
86 |
|
95 |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
@@ -55,6 +55,7 public slots: | |||||
55 | unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0); |
|
55 | unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0); | |
56 |
|
56 | |||
57 |
void |
|
57 | void bridgeSelectionChanged( const QString & text ); | |
|
58 | void setConnected(bool connected); | |||
58 |
|
59 | |||
59 | signals: |
|
60 | signals: | |
60 |
|
61 |
@@ -6,8 +6,8 | |||||
6 | <rect> |
|
6 | <rect> | |
7 | <x>0</x> |
|
7 | <x>0</x> | |
8 | <y>0</y> |
|
8 | <y>0</y> | |
9 |
<width>6 |
|
9 | <width>645</width> | |
10 |
<height> |
|
10 | <height>231</height> | |
11 | </rect> |
|
11 | </rect> | |
12 | </property> |
|
12 | </property> | |
13 | <property name="windowTitle"> |
|
13 | <property name="windowTitle"> | |
@@ -80,7 +80,7 | |||||
80 | <item row="3" column="1"> |
|
80 | <item row="3" column="1"> | |
81 | <widget class="QLineEdit" name="destKeyLineEdit"> |
|
81 | <widget class="QLineEdit" name="destKeyLineEdit"> | |
82 | <property name="inputMask"> |
|
82 | <property name="inputMask"> | |
83 |
<string comment=" |
|
83 | <string comment="ddD"/> | |
84 | </property> |
|
84 | </property> | |
85 | <property name="text"> |
|
85 | <property name="text"> | |
86 | <string>32</string> |
|
86 | <string>32</string> | |
@@ -90,8 +90,48 | |||||
90 | </property> |
|
90 | </property> | |
91 | </widget> |
|
91 | </widget> | |
92 | </item> |
|
92 | </item> | |
|
93 | <item row="4" column="0"> | |||
|
94 | <widget class="QLabel" name="RMAPaddressLbl"> | |||
|
95 | <property name="text"> | |||
|
96 | <string>RMAP Target address</string> | |||
|
97 | </property> | |||
|
98 | </widget> | |||
|
99 | </item> | |||
93 | <item row="4" column="1"> |
|
100 | <item row="4" column="1"> | |
94 |
<widget class="Q |
|
101 | <widget class="QLineEdit" name="RMAPAddresslineEdit"> | |
|
102 | <property name="inputMask"> | |||
|
103 | <string comment="ddD"/> | |||
|
104 | </property> | |||
|
105 | <property name="text"> | |||
|
106 | <string>254</string> | |||
|
107 | </property> | |||
|
108 | <property name="maxLength"> | |||
|
109 | <number>3</number> | |||
|
110 | </property> | |||
|
111 | </widget> | |||
|
112 | </item> | |||
|
113 | <item row="5" column="0"> | |||
|
114 | <widget class="QLabel" name="RMAPKeyLbl"> | |||
|
115 | <property name="text"> | |||
|
116 | <string>RMAP Target key</string> | |||
|
117 | </property> | |||
|
118 | </widget> | |||
|
119 | </item> | |||
|
120 | <item row="5" column="1"> | |||
|
121 | <widget class="QLineEdit" name="RMAPKeylineEdit"> | |||
|
122 | <property name="inputMask"> | |||
|
123 | <string comment="ddD"/> | |||
|
124 | </property> | |||
|
125 | <property name="text"> | |||
|
126 | <string comment="ddD">2</string> | |||
|
127 | </property> | |||
|
128 | <property name="maxLength"> | |||
|
129 | <number>3</number> | |||
|
130 | </property> | |||
|
131 | </widget> | |||
|
132 | </item> | |||
|
133 | <item row="6" column="1"> | |||
|
134 | <widget class="QPushButton" name="connectQpb"> | |||
95 | <property name="text"> |
|
135 | <property name="text"> | |
96 | <string>Connect</string> |
|
136 | <string>Connect</string> | |
97 | </property> |
|
137 | </property> |
@@ -1,3 +1,24 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the SocExplorer Software | |||
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
1 | #include "stardundeegui.h" |
|
22 | #include "stardundeegui.h" | |
2 |
|
23 | |||
3 | #include "ui_stardundeeGUI.h" |
|
24 | #include "ui_stardundeeGUI.h" | |
@@ -6,4 +27,72 StarDundeeGUI::StarDundeeGUI(QWidget *pa | |||||
6 | QWidget(parent),ui(new Ui::StarDundeeUI) |
|
27 | QWidget(parent),ui(new Ui::StarDundeeUI) | |
7 | { |
|
28 | { | |
8 | this->ui->setupUi(this); |
|
29 | this->ui->setupUi(this); | |
|
30 | connect(this->ui->selectBrickCmbx,SIGNAL(currentIndexChanged(int)),this,SIGNAL(brickSelectionChanged(int))); | |||
|
31 | connect(this->ui->selectLinkCmbx,SIGNAL(currentIndexChanged(int)),this,SIGNAL(linkNumberSelectionChanged(int))); | |||
|
32 | connect(this->ui->setLinkSpeedCmbx,SIGNAL(currentIndexChanged(QString)),this,SIGNAL(linkSpeedSelectionChanged(QString))); | |||
|
33 | connect(this->ui->destKeyLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(destinationKeyChanged(QString))); | |||
|
34 | connect(this->ui->RMAPAddresslineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(rmapAddressChanged(QString))); | |||
|
35 | connect(this->ui->RMAPKeylineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(rmapKeyChanged(QString))); | |||
|
36 | connect(this->ui->connectQpb,SIGNAL(clicked()),this,SIGNAL(connectClicked())); | |||
|
37 | ||||
9 | } |
|
38 | } | |
|
39 | ||||
|
40 | int StarDundeeGUI::getBrickSelection() | |||
|
41 | { | |||
|
42 | return ui->selectBrickCmbx->currentIndex(); | |||
|
43 | } | |||
|
44 | ||||
|
45 | int StarDundeeGUI::getLinkNumberSelection() | |||
|
46 | { | |||
|
47 | return ui->selectLinkCmbx->currentIndex(); | |||
|
48 | } | |||
|
49 | ||||
|
50 | QString StarDundeeGUI::getLinkSpeedSelection() | |||
|
51 | { | |||
|
52 | return ui->setLinkSpeedCmbx->currentText(); | |||
|
53 | } | |||
|
54 | ||||
|
55 | QString StarDundeeGUI::getDestinationKey() | |||
|
56 | { | |||
|
57 | return ui->destKeyLineEdit->text(); | |||
|
58 | } | |||
|
59 | ||||
|
60 | QString StarDundeeGUI::getRmapAddress() | |||
|
61 | { | |||
|
62 | return ui->RMAPAddresslineEdit->text(); | |||
|
63 | } | |||
|
64 | ||||
|
65 | QString StarDundeeGUI::getRmapKey() | |||
|
66 | { | |||
|
67 | return ui->RMAPKeylineEdit->text(); | |||
|
68 | } | |||
|
69 | ||||
|
70 | ||||
|
71 | ||||
|
72 | void StarDundeeGUI::lock(bool lock) | |||
|
73 | { | |||
|
74 | this->ui->selectBrickCmbx->setDisabled(lock); | |||
|
75 | this->ui->selectLinkCmbx->setDisabled(lock); | |||
|
76 | this->ui->setLinkSpeedCmbx->setDisabled(lock); | |||
|
77 | this->ui->destKeyLineEdit->setDisabled(lock); | |||
|
78 | this->ui->RMAPAddresslineEdit->setDisabled(lock); | |||
|
79 | this->ui->RMAPKeylineEdit->setDisabled(lock); | |||
|
80 | if(lock) | |||
|
81 | this->ui->connectQpb->setText("Disconnect"); | |||
|
82 | else | |||
|
83 | this->ui->connectQpb->setText("Connect"); | |||
|
84 | } | |||
|
85 | ||||
|
86 | void StarDundeeGUI::updateAvailableBrickCount(int count) | |||
|
87 | { | |||
|
88 | this->ui->selectBrickCmbx->clear(); | |||
|
89 | this->ui->selectBrickCmbx->addItem("none"); | |||
|
90 | for(int i =0;i<32;i++) | |||
|
91 | { | |||
|
92 | if((count&1)==1) | |||
|
93 | { | |||
|
94 | this->ui->selectBrickCmbx->addItem("STAR-Dundee USB brick "+QString::number(i)); | |||
|
95 | } | |||
|
96 | count>>=1; | |||
|
97 | } | |||
|
98 | } |
@@ -1,3 +1,24 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the SocExplorer Software | |||
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | -------------------------------------------------------------------------------*/ | |||
|
19 | /*-- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |||
|
21 | ----------------------------------------------------------------------------*/ | |||
1 | #ifndef STARDUNDEEGUI_H |
|
22 | #ifndef STARDUNDEEGUI_H | |
2 | #define STARDUNDEEGUI_H |
|
23 | #define STARDUNDEEGUI_H | |
3 |
|
24 | |||
@@ -12,10 +33,23 class StarDundeeGUI : public QWidget | |||||
12 | Q_OBJECT |
|
33 | Q_OBJECT | |
13 | public: |
|
34 | public: | |
14 | explicit StarDundeeGUI(QWidget *parent = 0); |
|
35 | explicit StarDundeeGUI(QWidget *parent = 0); | |
15 |
|
36 | int getBrickSelection(); | ||
|
37 | int getLinkNumberSelection(); | |||
|
38 | QString getLinkSpeedSelection(); | |||
|
39 | QString getDestinationKey(); | |||
|
40 | QString getRmapAddress(); | |||
|
41 | QString getRmapKey(); | |||
16 | signals: |
|
42 | signals: | |
17 |
|
43 | void brickSelectionChanged(int brickIndex); | ||
|
44 | void linkNumberSelectionChanged(int linkIndex); | |||
|
45 | void linkSpeedSelectionChanged(const QString & linkSpeed); | |||
|
46 | void destinationKeyChanged(const QString & destKey); | |||
|
47 | void rmapAddressChanged(const QString & address); | |||
|
48 | void rmapKeyChanged(const QString & key); | |||
|
49 | void connectClicked(); | |||
18 | public slots: |
|
50 | public slots: | |
|
51 | void lock(bool lock); | |||
|
52 | void updateAvailableBrickCount(int count); | |||
19 |
|
53 | |||
20 | private: |
|
54 | private: | |
21 | Ui::StarDundeeUI *ui; |
|
55 | Ui::StarDundeeUI *ui; |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
@@ -45,14 +45,16 void stardundeeSPW_USB::toggleBridgeConn | |||||
45 | { |
|
45 | { | |
46 | if(this->disconnectBridge()) |
|
46 | if(this->disconnectBridge()) | |
47 | { |
|
47 | { | |
48 | this->connectBridgeButton->setText("Connect"); |
|
48 | ((StarDundeeGUI*)this->p_GUI)->lock(false); | |
|
49 | emit setConnected(false); | |||
49 | } |
|
50 | } | |
50 | } |
|
51 | } | |
51 | else |
|
52 | else | |
52 | { |
|
53 | { | |
53 | if(this->connectBridge()) |
|
54 | if(this->connectBridge()) | |
54 | { |
|
55 | { | |
55 | this->connectBridgeButton->setText("Disconnect"); |
|
56 | ((StarDundeeGUI*)this->p_GUI)->lock(true); | |
|
57 | emit setConnected(true); | |||
56 | } |
|
58 | } | |
57 | } |
|
59 | } | |
58 | } |
|
60 | } | |
@@ -75,10 +77,10 int stardundeeSPW_USB::pushRMAPPacket(ch | |||||
75 | unsigned int stardundeeSPW_USB::Write(unsigned int *Value, unsigned int count, unsigned int address) |
|
77 | unsigned int stardundeeSPW_USB::Write(unsigned int *Value, unsigned int count, unsigned int address) | |
76 | { |
|
78 | { | |
77 | char writeBuffer[RMAP_WRITE_PACKET_MIN_SZ((RMAP_MAX_XFER_SIZE*4))+1]; |
|
79 | char writeBuffer[RMAP_WRITE_PACKET_MIN_SZ((RMAP_MAX_XFER_SIZE*4))+1]; | |
78 |
writeBuffer[0]= |
|
80 | writeBuffer[0]=this->manager->linkNumber;//Link number | |
79 | int transactionID = 0; |
|
81 | int transactionID = 0; | |
80 | int written=0; |
|
82 | int written=0; | |
81 | SocExplorerEngine::message(this->plugin,"Enter Write function"); |
|
83 | SocExplorerEngine::message(this->plugin,"Enter Write function",2); | |
82 | QProgressBar* progress=NULL; |
|
84 | QProgressBar* progress=NULL; | |
83 | if(count>RMAP_MAX_XFER_SIZE) |
|
85 | if(count>RMAP_MAX_XFER_SIZE) | |
84 | progress= SocExplorerEngine::getProgressBar("Writing on SPW @0x"+QString::number(address,16)+" %v of "+QString::number(count)+" words ",count); |
|
86 | progress= SocExplorerEngine::getProgressBar("Writing on SPW @0x"+QString::number(address,16)+" %v of "+QString::number(count)+" words ",count); | |
@@ -92,7 +94,7 unsigned int stardundeeSPW_USB::Write(un | |||||
92 | writeBuffer[RMAP_WRITE_HEADER_MIN_SZ+(i*4)+3] = (char)(((unsigned int)Value[i+written]>>8)&0xFF); |
|
94 | writeBuffer[RMAP_WRITE_HEADER_MIN_SZ+(i*4)+3] = (char)(((unsigned int)Value[i+written]>>8)&0xFF); | |
93 | writeBuffer[RMAP_WRITE_HEADER_MIN_SZ+(i*4)+4] = (char)(((unsigned int)Value[i+written])&0xFF); |
|
95 | writeBuffer[RMAP_WRITE_HEADER_MIN_SZ+(i*4)+4] = (char)(((unsigned int)Value[i+written])&0xFF); | |
94 | } |
|
96 | } | |
95 |
RMAP_build_tx_request_header( |
|
97 | RMAP_build_tx_request_header(this->manager->rmapAddress,this->manager->rmapKey,1,transactionID,address+(written*4),RMAP_MAX_XFER_SIZE*4,writeBuffer+1); | |
96 | manager->sendPacket(writeBuffer,RMAP_WRITE_PACKET_MIN_SZ(RMAP_MAX_XFER_SIZE*4)+1); |
|
98 | manager->sendPacket(writeBuffer,RMAP_WRITE_PACKET_MIN_SZ(RMAP_MAX_XFER_SIZE*4)+1); | |
97 | written+=RMAP_MAX_XFER_SIZE; |
|
99 | written+=RMAP_MAX_XFER_SIZE; | |
98 | count-=RMAP_MAX_XFER_SIZE; |
|
100 | count-=RMAP_MAX_XFER_SIZE; | |
@@ -108,7 +110,7 unsigned int stardundeeSPW_USB::Write(un | |||||
108 | writeBuffer[RMAP_WRITE_HEADER_MIN_SZ+(i*4)+3] = (char)(((unsigned int)Value[i+written]>>8)&0xFF); |
|
110 | writeBuffer[RMAP_WRITE_HEADER_MIN_SZ+(i*4)+3] = (char)(((unsigned int)Value[i+written]>>8)&0xFF); | |
109 | writeBuffer[RMAP_WRITE_HEADER_MIN_SZ+(i*4)+4] = (char)(((unsigned int)Value[i+written])&0xFF); |
|
111 | writeBuffer[RMAP_WRITE_HEADER_MIN_SZ+(i*4)+4] = (char)(((unsigned int)Value[i+written])&0xFF); | |
110 | } |
|
112 | } | |
111 |
RMAP_build_tx_request_header( |
|
113 | RMAP_build_tx_request_header(this->manager->rmapAddress,this->manager->rmapKey,1,transactionID,address+(written*4),count*4,writeBuffer+1); | |
112 | manager->sendPacket(writeBuffer,RMAP_WRITE_PACKET_MIN_SZ(count*4) +1); |
|
114 | manager->sendPacket(writeBuffer,RMAP_WRITE_PACKET_MIN_SZ(count*4) +1); | |
113 | written+=count; |
|
115 | written+=count; | |
114 | if(progress!=NULL) |
|
116 | if(progress!=NULL) | |
@@ -128,22 +130,27 unsigned int stardundeeSPW_USB::Read(uns | |||||
128 | { |
|
130 | { | |
129 | char requestBuffer[RMAP_READ_HEADER_MIN_SZ+1]; |
|
131 | char requestBuffer[RMAP_READ_HEADER_MIN_SZ+1]; | |
130 | char* RMAP_AnswerBuffer; |
|
132 | char* RMAP_AnswerBuffer; | |
131 |
requestBuffer[0]= |
|
133 | requestBuffer[0]=this->manager->linkNumber;//Link number | |
132 | int transactionID = 0; |
|
134 | int transactionID = 0; | |
133 | int read=0; |
|
135 | int read=0; | |
134 | QProgressBar* progress=NULL; |
|
136 | QProgressBar* progress=NULL; | |
135 | if(count>RMAP_MAX_XFER_SIZE) |
|
137 | if(count>RMAP_MAX_XFER_SIZE) | |
136 | progress= SocExplorerEngine::getProgressBar("Reading on SPW @0x"+QString::number(address,16)+" %v of "+QString::number(count)+" words ",count); |
|
138 | progress= SocExplorerEngine::getProgressBar("Reading on SPW @0x"+QString::number(address,16)+" %v of "+QString::number(count)+" words ",count); | |
137 | SocExplorerEngine::message(this->plugin,QString("Enter read function, count=%1, RMAP_MAX_XFER_SIZE=%2").arg(count).arg(RMAP_MAX_XFER_SIZE)); |
|
139 | SocExplorerEngine::message(this->plugin,QString("Enter read function, count=%1, RMAP_MAX_XFER_SIZE=%2").arg(count).arg(RMAP_MAX_XFER_SIZE),2); | |
138 |
|
140 | |||
139 | //Quite stupide loop, I guess that I always get the number of byte I asked for! |
|
141 | //Quite stupide loop, I guess that I always get the number of byte I asked for! | |
140 | while((int)count>=(int)RMAP_MAX_XFER_SIZE) |
|
142 | while((int)count>=(int)RMAP_MAX_XFER_SIZE) | |
141 | { |
|
143 | { | |
142 | transactionID = manager->getRMAPtransactionID(); |
|
144 | transactionID = manager->getRMAPtransactionID(); | |
143 | SocExplorerEngine::message(this->plugin,QString("New transactionID:%1").arg(transactionID)); |
|
145 | SocExplorerEngine::message(this->plugin,QString("New transactionID:%1").arg(transactionID),2); | |
144 |
RMAP_build_rx_request_header( |
|
146 | RMAP_build_rx_request_header(this->manager->rmapAddress,this->manager->rmapKey,1,transactionID,address+(read*4),RMAP_MAX_XFER_SIZE*4,requestBuffer+1); | |
145 | manager->sendPacket(requestBuffer,RMAP_READ_HEADER_MIN_SZ+1); |
|
147 | manager->sendPacket(requestBuffer,RMAP_READ_HEADER_MIN_SZ+1); | |
146 | int len=manager->getRMAPanswer(transactionID,&RMAP_AnswerBuffer); |
|
148 | int len=manager->getRMAPanswer(transactionID,&RMAP_AnswerBuffer); | |
|
149 | if(len==-1) | |||
|
150 | { | |||
|
151 | this->toggleBridgeConnection(); | |||
|
152 | return 0; | |||
|
153 | } | |||
147 | for(int i=0;i<((len-13)/4);i++) |
|
154 | for(int i=0;i<((len-13)/4);i++) | |
148 | { |
|
155 | { | |
149 | Value[read+i] = 0x0FF & ((unsigned int)RMAP_AnswerBuffer[(4*i)+12]); |
|
156 | Value[read+i] = 0x0FF & ((unsigned int)RMAP_AnswerBuffer[(4*i)+12]); | |
@@ -160,14 +167,19 unsigned int stardundeeSPW_USB::Read(uns | |||||
160 | if((int)count>0) |
|
167 | if((int)count>0) | |
161 | { |
|
168 | { | |
162 | transactionID = manager->getRMAPtransactionID(); |
|
169 | transactionID = manager->getRMAPtransactionID(); | |
163 | SocExplorerEngine::message(this->plugin,QString("New transactionID: %1").arg(transactionID)); |
|
170 | SocExplorerEngine::message(this->plugin,QString("New transactionID: %1").arg(transactionID),2); | |
164 | SocExplorerEngine::message(this->plugin,QString("Building request with:")); |
|
171 | SocExplorerEngine::message(this->plugin,QString("Building request with:"),2); | |
165 | SocExplorerEngine::message(this->plugin,QString("Address = %1").arg(address+(read*4),8,16)); |
|
172 | SocExplorerEngine::message(this->plugin,QString("Address = %1").arg(address+(read*4),8,16),2); | |
166 | SocExplorerEngine::message(this->plugin,QString("Size = %1").arg(count*4)); |
|
173 | SocExplorerEngine::message(this->plugin,QString("Size = %1").arg(count*4),2); | |
167 | SocExplorerEngine::message(this->plugin,QString("Size + 13 = %1").arg((count*4)+13)); |
|
174 | SocExplorerEngine::message(this->plugin,QString("Size + 13 = %1").arg((count*4)+13),2); | |
168 |
RMAP_build_rx_request_header( |
|
175 | RMAP_build_rx_request_header(this->manager->rmapAddress,this->manager->rmapKey,1,transactionID,address+(read*4),count*4,requestBuffer+1); | |
169 | manager->sendPacket(requestBuffer,RMAP_READ_HEADER_MIN_SZ+1); |
|
176 | manager->sendPacket(requestBuffer,RMAP_READ_HEADER_MIN_SZ+1); | |
170 | int len=manager->getRMAPanswer(transactionID,&RMAP_AnswerBuffer); |
|
177 | int len=manager->getRMAPanswer(transactionID,&RMAP_AnswerBuffer); | |
|
178 | if(len==-1) | |||
|
179 | { | |||
|
180 | this->toggleBridgeConnection(); | |||
|
181 | return 0; | |||
|
182 | } | |||
171 | for(int i=0;i<((len-13)/4);i++) |
|
183 | for(int i=0;i<((len-13)/4);i++) | |
172 | { |
|
184 | { | |
173 | Value[read+i] = 0x0FF & ((unsigned int)RMAP_AnswerBuffer[(4*i)+12]); |
|
185 | Value[read+i] = 0x0FF & ((unsigned int)RMAP_AnswerBuffer[(4*i)+12]); | |
@@ -190,21 +202,68 unsigned int stardundeeSPW_USB::Read(uns | |||||
190 | return read; |
|
202 | return read; | |
191 | } |
|
203 | } | |
192 |
|
204 | |||
193 |
void stardundeeSPW_USB:: |
|
205 | void stardundeeSPW_USB::brickSelectionChanged(int brickIndex) | |
|
206 | { | |||
|
207 | this->manager->selectedBrick = brickIndex-1; | |||
|
208 | SocExplorerEngine::message(plugin,QString("Changing brick index: %1").arg(manager->selectedBrick)); | |||
|
209 | } | |||
|
210 | ||||
|
211 | void stardundeeSPW_USB::linkNumberSelectionChanged(int linkIndex) | |||
|
212 | { | |||
|
213 | this->manager->linkNumber = linkIndex + 1; | |||
|
214 | SocExplorerEngine::message(plugin,QString("Changing Link Number: %1").arg(manager->linkNumber)); | |||
|
215 | } | |||
|
216 | ||||
|
217 | void stardundeeSPW_USB::linkSpeedSelectionChanged(const QString &linkSpeed) | |||
194 | { |
|
218 | { | |
|
219 | this->manager->linkSpeed = linkSpeed.toInt(); | |||
195 |
|
220 | |||
|
221 | SocExplorerEngine::message(plugin,QString("Changing Link Speed: %1").arg(manager->linkSpeed)); | |||
|
222 | } | |||
|
223 | ||||
|
224 | void stardundeeSPW_USB::destinationKeyChanged(const QString &destKey) | |||
|
225 | { | |||
|
226 | this->manager->destinationKey = destKey.toInt(); | |||
|
227 | SocExplorerEngine::message(plugin,QString("Changing Destination Key: %1").arg(manager->destinationKey)); | |||
|
228 | } | |||
|
229 | ||||
|
230 | void stardundeeSPW_USB::rmapAddressChanged(const QString &rmapaddress) | |||
|
231 | { | |||
|
232 | this->manager->rmapAddress = rmapaddress.toInt(); | |||
|
233 | SocExplorerEngine::message(plugin,QString("Changing RMAP address: %1").arg(manager->rmapAddress)); | |||
|
234 | } | |||
|
235 | ||||
|
236 | void stardundeeSPW_USB::rmapKeyChanged(const QString &key) | |||
|
237 | { | |||
|
238 | this->manager->rmapKey = key.toInt(); | |||
|
239 | SocExplorerEngine::message(plugin,QString("Changing RMAP Key: %1").arg(manager->rmapKey)); | |||
196 | } |
|
240 | } | |
197 |
|
241 | |||
198 | void stardundeeSPW_USB::makeGUI(socexplorerplugin *parent) |
|
242 | void stardundeeSPW_USB::makeGUI(socexplorerplugin *parent) | |
199 | { |
|
243 | { | |
200 |
this->p_GUI = new StarDundeeGUI( |
|
244 | this->p_GUI = new StarDundeeGUI(); | |
201 | this->mainLayout = new QGridLayout(this->p_GUI); |
|
245 | // this->mainLayout = new QGridLayout(this->p_GUI); | |
202 |
|
|
246 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(connectClicked()),this,SLOT(toggleBridgeConnection())); | |
|
247 | connect(this->manager,SIGNAL(updateAvailableBrickCount(int)),((StarDundeeGUI*)this->p_GUI),SLOT(updateAvailableBrickCount(int))); | |||
|
248 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(brickSelectionChanged(int)),this,SLOT(brickSelectionChanged(int))); | |||
|
249 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(linkNumberSelectionChanged(int)),this,SLOT(linkNumberSelectionChanged(int))); | |||
|
250 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(linkSpeedSelectionChanged(QString)),this,SLOT(linkSpeedSelectionChanged(QString))); | |||
|
251 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(destinationKeyChanged(QString)),this,SLOT(destinationKeyChanged(QString))); | |||
|
252 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(rmapAddressChanged(QString)),this,SLOT(rmapAddressChanged(QString))); | |||
|
253 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(rmapKeyChanged(QString)),this,SLOT(rmapKeyChanged(QString))); | |||
|
254 | this->brickSelectionChanged(((StarDundeeGUI*)this->p_GUI)->getBrickSelection()); | |||
|
255 | this->linkNumberSelectionChanged(((StarDundeeGUI*)this->p_GUI)->getLinkNumberSelection()); | |||
|
256 | this->linkSpeedSelectionChanged(((StarDundeeGUI*)this->p_GUI)->getLinkSpeedSelection()); | |||
|
257 | this->destinationKeyChanged(((StarDundeeGUI*)this->p_GUI)->getDestinationKey()); | |||
|
258 | this->rmapAddressChanged(((StarDundeeGUI*)this->p_GUI)->getRmapAddress()); | |||
|
259 | this->rmapKeyChanged(((StarDundeeGUI*)this->p_GUI)->getRmapKey()); | |||
|
260 | ||||
203 | } |
|
261 | } | |
204 |
|
262 | |||
205 | stardundeeSPW_USB_Manager::stardundeeSPW_USB_Manager(socexplorerplugin *plugin, QObject *parent) |
|
263 | stardundeeSPW_USB_Manager::stardundeeSPW_USB_Manager(socexplorerplugin *plugin, QObject *parent) | |
206 | :QThread((QObject*)parent) |
|
264 | :QThread((QObject*)parent) | |
207 | { |
|
265 | { | |
|
266 | this->RMAPtimeout = 2000; | |||
208 | this->handleMutex = new QMutex(QMutex::NonRecursive); |
|
267 | this->handleMutex = new QMutex(QMutex::NonRecursive); | |
209 | this->RMAP_AnswersSem = new QSemaphore(0); |
|
268 | this->RMAP_AnswersSem = new QSemaphore(0); | |
210 | this->RMAP_AnswersMtx=new QMutex(QMutex::Recursive); |
|
269 | this->RMAP_AnswersMtx=new QMutex(QMutex::Recursive); | |
@@ -227,7 +286,7 void stardundeeSPW_USB_Manager::run() | |||||
227 | USB_SPACEWIRE_PACKET_PROPERTIES properties; |
|
286 | USB_SPACEWIRE_PACKET_PROPERTIES properties; | |
228 | USB_SPACEWIRE_ID pIdentifier=NULL; |
|
287 | USB_SPACEWIRE_ID pIdentifier=NULL; | |
229 | USB_SPACEWIRE_STATUS stat; |
|
288 | USB_SPACEWIRE_STATUS stat; | |
230 | SocExplorerEngine::message(this->plugin,"Starting Startdundee USB pooling thread"); |
|
289 | SocExplorerEngine::message(this->plugin,"Starting Startdundee USB pooling thread",1); | |
231 | char buffer[(RMAP_MAX_XFER_SIZE*4)+50]; |
|
290 | char buffer[(RMAP_MAX_XFER_SIZE*4)+50]; | |
232 | while (!this->isInterruptionRequested()) |
|
291 | while (!this->isInterruptionRequested()) | |
233 | { |
|
292 | { | |
@@ -237,20 +296,20 void stardundeeSPW_USB_Manager::run() | |||||
237 | //SocExplorerEngine::message(this->plugin,"Looking for new RMAP packets"); |
|
296 | //SocExplorerEngine::message(this->plugin,"Looking for new RMAP packets"); | |
238 | if(USBSpaceWire_WaitOnReadPacketAvailable(hDevice,0.01)) |
|
297 | if(USBSpaceWire_WaitOnReadPacketAvailable(hDevice,0.01)) | |
239 | { |
|
298 | { | |
240 | SocExplorerEngine::message(this->plugin,"Got packet"); |
|
299 | SocExplorerEngine::message(this->plugin,"Got packet",2); | |
241 | stat = USBSpaceWire_ReadPackets(hDevice, buffer, (RMAP_MAX_XFER_SIZE*4)+50,1, 1, &properties, &pIdentifier); |
|
300 | stat = USBSpaceWire_ReadPackets(hDevice, buffer, (RMAP_MAX_XFER_SIZE*4)+50,1, 1, &properties, &pIdentifier); | |
242 | if (stat == TRANSFER_SUCCESS) |
|
301 | if (stat == TRANSFER_SUCCESS) | |
243 | { |
|
302 | { | |
244 | if(USBSpaceWire_GetReadTrafficType(&properties, 0) ==SPACEWIRE_TRAFFIC_PACKET) |
|
303 | if(USBSpaceWire_GetReadTrafficType(&properties, 0) ==SPACEWIRE_TRAFFIC_PACKET) | |
245 | { |
|
304 | { | |
246 | SocExplorerEngine::message(this->plugin,"It's a SPW packet"); |
|
305 | SocExplorerEngine::message(this->plugin,"It's a SPW packet",2); | |
247 | if(USBSpaceWire_GetReadEOPStatus(&properties, 0)== SPACEWIRE_USB_EOP) |
|
306 | if(USBSpaceWire_GetReadEOPStatus(&properties, 0)== SPACEWIRE_USB_EOP) | |
248 | { |
|
307 | { | |
249 | SocExplorerEngine::message(this->plugin,"Got end of packet"); |
|
308 | SocExplorerEngine::message(this->plugin,"Got end of packet"); | |
250 | if(buffer[1]==(char)SPW_PROTO_ID_RMAP) //RMAP packet |
|
309 | if(buffer[1]==(char)SPW_PROTO_ID_RMAP) //RMAP packet | |
251 | { |
|
310 | { | |
252 | SocExplorerEngine::message(this->plugin,"Got RMAP packet"); |
|
311 | SocExplorerEngine::message(this->plugin,"Got RMAP packet",2); | |
253 | SocExplorerEngine::message(this->plugin,QString("Rmap packet size %1").arg(properties.len)); |
|
312 | SocExplorerEngine::message(this->plugin,QString("Rmap packet size %1").arg(properties.len),2); | |
254 | if(properties.len>8) |
|
313 | if(properties.len>8) | |
255 | { |
|
314 | { | |
256 | char* packetbuffer = (char*)malloc(properties.len); |
|
315 | char* packetbuffer = (char*)malloc(properties.len); | |
@@ -277,12 +336,12 void stardundeeSPW_USB_Manager::run() | |||||
277 | { |
|
336 | { | |
278 | USBSpaceWire_FreeRead(hDevice, pIdentifier); |
|
337 | USBSpaceWire_FreeRead(hDevice, pIdentifier); | |
279 | handleMutex->unlock(); |
|
338 | handleMutex->unlock(); | |
280 | SocExplorerEngine::message(this->plugin,"Got SPW packet"); |
|
339 | SocExplorerEngine::message(this->plugin,"Got SPW packet",2); | |
281 | } |
|
340 | } | |
282 | } |
|
341 | } | |
283 | else |
|
342 | else | |
284 | { |
|
343 | { | |
285 | SocExplorerEngine::message(this->plugin,"No EOP received"); |
|
344 | SocExplorerEngine::message(this->plugin,"No EOP received",2); | |
286 | } |
|
345 | } | |
287 | } |
|
346 | } | |
288 |
|
347 | |||
@@ -302,28 +361,30 void stardundeeSPW_USB_Manager::run() | |||||
302 | else |
|
361 | else | |
303 | { |
|
362 | { | |
304 | sleep(1); |
|
363 | sleep(1); | |
305 |
|
|
364 | int list = USBSpaceWire_ListDevices(); | |
|
365 | if(this->brickList!=list) | |||
|
366 | { | |||
|
367 | this->brickList = list; | |||
|
368 | emit updateAvailableBrickCount(this->brickList); | |||
|
369 | } | |||
306 | } |
|
370 | } | |
307 | usleep(1000); |
|
371 | usleep(1000); | |
308 | } |
|
372 | } | |
309 | SocExplorerEngine::message(this->plugin,"Exiting Startdundee USB pooling thread"); |
|
373 | SocExplorerEngine::message(this->plugin,"Exiting Startdundee USB pooling thread",1); | |
310 | } |
|
374 | } | |
311 |
|
375 | |||
312 | bool stardundeeSPW_USB_Manager::connectBridge() |
|
376 | bool stardundeeSPW_USB_Manager::connectBridge() | |
313 | { |
|
377 | { | |
314 |
this->handleMutex |
|
378 | QMutexLocker mlock(this->handleMutex); | |
315 | int status; |
|
379 | int status; | |
316 | U32 statusControl; |
|
380 | U32 statusControl; | |
317 | int brickNumber=0; |
|
|||
318 | int linkNumber=1; |
|
|||
319 | this->connected = false; |
|
381 | this->connected = false; | |
320 |
if (!USBSpaceWire_Open(&hDevice, |
|
382 | if (!USBSpaceWire_Open(&hDevice, this->selectedBrick)) // Open the USB device | |
321 | { |
|
383 | { | |
322 | SocExplorerEngine::message(this->plugin,"stardundee *** Open *** ERROR: USBSpaceWire_Open(&hDevice, 0))"); |
|
384 | SocExplorerEngine::message(this->plugin,"stardundee *** Open *** ERROR: USBSpaceWire_Open(&hDevice, 0))",0); | |
323 | this->handleMutex->unlock(); |
|
|||
324 | return false; |
|
385 | return false; | |
325 | } |
|
386 | } | |
326 | SocExplorerEngine::message(this->plugin,"stardundee *** Open *** USBSpaceWire_Open successful"); |
|
387 | SocExplorerEngine::message(this->plugin,"stardundee *** Open *** USBSpaceWire_Open successful",0); | |
327 |
|
388 | |||
328 | USBSpaceWire_EnableNetworkMode(hDevice, 0); // deactivate the network mode |
|
389 | USBSpaceWire_EnableNetworkMode(hDevice, 0); // deactivate the network mode | |
329 | CFGSpaceWire_EnableRMAP(1); // Enable the use of RMAP for the StarDundee brick configuration |
|
390 | CFGSpaceWire_EnableRMAP(1); // Enable the use of RMAP for the StarDundee brick configuration | |
@@ -338,23 +399,23 bool stardundeeSPW_USB_Manager::connectB | |||||
338 | status = CFGSpaceWire_SetBrickBaseTransmitRate( hDevice, CFG_BRK_CLK_100_MHZ, CFG_BRK_DVDR_1, 0xff); |
|
399 | status = CFGSpaceWire_SetBrickBaseTransmitRate( hDevice, CFG_BRK_CLK_100_MHZ, CFG_BRK_DVDR_1, 0xff); | |
339 | if (status != CFG_TRANSFER_SUCCESS) |
|
400 | if (status != CFG_TRANSFER_SUCCESS) | |
340 | { |
|
401 | { | |
341 | SocExplorerEngine::message(this->plugin,"ERROR CFGSpaceWire_SetBrickBaseTransmitRate"); |
|
402 | SocExplorerEngine::message(this->plugin,"ERROR CFGSpaceWire_SetBrickBaseTransmitRate",1); | |
342 | return false; |
|
403 | return false; | |
343 | } |
|
404 | } | |
344 | else |
|
405 | else | |
345 | { |
|
406 | { | |
346 | SocExplorerEngine::message(this->plugin,"OK CFGSpaceWire_SetBrickBaseTransmitRate, base rate = 100 MHz"); |
|
407 | SocExplorerEngine::message(this->plugin,"OK CFGSpaceWire_SetBrickBaseTransmitRate, base rate = 100 MHz",1); | |
347 | } |
|
408 | } | |
348 |
|
409 | |||
349 | // read the link status |
|
410 | // read the link status | |
350 | if (CFGSpaceWire_GetLinkStatusControl(hDevice, linkNumber, &statusControl) != CFG_TRANSFER_SUCCESS) |
|
411 | if (CFGSpaceWire_GetLinkStatusControl(hDevice, this->linkNumber, &statusControl) != CFG_TRANSFER_SUCCESS) | |
351 | { |
|
412 | { | |
352 | SocExplorerEngine::message(this->plugin,"Could not read link status control for link " + QString::number(linkNumber)); |
|
413 | SocExplorerEngine::message(this->plugin,"Could not read link status control for link " + QString::number(this->linkNumber),1); | |
353 | return false; |
|
414 | return false; | |
354 | } |
|
415 | } | |
355 | else |
|
416 | else | |
356 | { |
|
417 | { | |
357 | SocExplorerEngine::message(this->plugin,"OK CFGSpaceWire_GetLinkStatusControl of link " + QString::number(linkNumber)); |
|
418 | SocExplorerEngine::message(this->plugin,"OK CFGSpaceWire_GetLinkStatusControl of link " + QString::number(this->linkNumber),1); | |
358 |
|
419 | |||
359 | // Set the link status control register properties |
|
420 | // Set the link status control register properties | |
360 | CFGSpaceWire_LSEnableAutoStart(&statusControl, 1); |
|
421 | CFGSpaceWire_LSEnableAutoStart(&statusControl, 1); | |
@@ -364,35 +425,34 bool stardundeeSPW_USB_Manager::connectB | |||||
364 | CFGSpaceWire_LSSetOperatingSpeed(&statusControl, 9); // sets the link speed to ( 100 MHz / (9+1) ) = 10 MHz |
|
425 | CFGSpaceWire_LSSetOperatingSpeed(&statusControl, 9); // sets the link speed to ( 100 MHz / (9+1) ) = 10 MHz | |
365 |
|
426 | |||
366 | // Set the link status control register |
|
427 | // Set the link status control register | |
367 | if (CFGSpaceWire_SetLinkStatusControl(hDevice, linkNumber, statusControl) != CFG_TRANSFER_SUCCESS) |
|
428 | if (CFGSpaceWire_SetLinkStatusControl(hDevice, this->linkNumber, statusControl) != CFG_TRANSFER_SUCCESS) | |
368 | { |
|
429 | { | |
369 | SocExplorerEngine::message(this->plugin,"Could not set the link status control for link " + QString::number(linkNumber)); |
|
430 | SocExplorerEngine::message(this->plugin,"Could not set the link status control for link " + QString::number(this->linkNumber),1); | |
370 | return false; |
|
431 | return false; | |
371 | } |
|
432 | } | |
372 | else |
|
433 | else | |
373 | { |
|
434 | { | |
374 | SocExplorerEngine::message(this->plugin,"Set the link status control for link " + QString::number(linkNumber)); |
|
435 | SocExplorerEngine::message(this->plugin,"Set the link status control for link " + QString::number(this->linkNumber),1); | |
375 | } |
|
436 | } | |
376 | } |
|
437 | } | |
377 |
|
438 | |||
378 | if (CFGSpaceWire_SetAsInterface(hDevice, 1, 0) != CFG_TRANSFER_SUCCESS) |
|
439 | if (CFGSpaceWire_SetAsInterface(hDevice, 1, 0) != CFG_TRANSFER_SUCCESS) | |
379 | { |
|
440 | { | |
380 | SocExplorerEngine::message(this->plugin,"Could not set the device to be an interface"); |
|
441 | SocExplorerEngine::message(this->plugin,"Could not set the device to be an interface",1); | |
381 | return false; |
|
442 | return false; | |
382 | } |
|
443 | } | |
383 | else |
|
444 | else | |
384 | { |
|
445 | { | |
385 | SocExplorerEngine::message(this->plugin,"Device set to be an interface"); |
|
446 | SocExplorerEngine::message(this->plugin,"Device set to be an interface",1); | |
386 | } |
|
447 | } | |
387 |
|
448 | |||
388 | USBSpaceWire_RegisterReceiveOnAllPorts(hDevice); // Register to receive on all ports |
|
449 | USBSpaceWire_RegisterReceiveOnAllPorts(hDevice); // Register to receive on all ports | |
389 | USBSpaceWire_ClearEndpoints(hDevice); // clear the USB endpoints |
|
450 | USBSpaceWire_ClearEndpoints(hDevice); // clear the USB endpoints | |
390 | USBSpaceWire_SetTimeout(hDevice,1.0); |
|
451 | USBSpaceWire_SetTimeout(hDevice,1.0); | |
391 | SocExplorerEngine::message(this->plugin,"The driver's current send buffer size is " + QString::number(USBSpaceWire_GetDriverSendBufferSize(hDevice)) + " bytes"); |
|
452 | SocExplorerEngine::message(this->plugin,"The driver's current send buffer size is " + QString::number(USBSpaceWire_GetDriverSendBufferSize(hDevice)) + " bytes",1); | |
392 | SocExplorerEngine::message(this->plugin,"The driver's current read buffer size is " + QString::number(USBSpaceWire_GetDriverReadBufferSize(hDevice)) + " bytes"); |
|
453 | SocExplorerEngine::message(this->plugin,"The driver's current read buffer size is " + QString::number(USBSpaceWire_GetDriverReadBufferSize(hDevice)) + " bytes",1); | |
393 | SocExplorerEngine::message(this->plugin,"USBSpaceWire_IsReadThrottling is " + QString::number(USBSpaceWire_IsReadThrottling(hDevice))); |
|
454 | SocExplorerEngine::message(this->plugin,"USBSpaceWire_IsReadThrottling is " + QString::number(USBSpaceWire_IsReadThrottling(hDevice)),1); | |
394 | this->connected = true; |
|
455 | this->connected = true; | |
395 | this->handleMutex->unlock(); |
|
|||
396 | return true; |
|
456 | return true; | |
397 | } |
|
457 | } | |
398 |
|
458 | |||
@@ -400,9 +460,16 bool stardundeeSPW_USB_Manager::disconne | |||||
400 | { |
|
460 | { | |
401 | this->handleMutex->lock(); |
|
461 | this->handleMutex->lock(); | |
402 | USBSpaceWire_Close(hDevice); // Close the device |
|
462 | USBSpaceWire_Close(hDevice); // Close the device | |
403 | SocExplorerEngine::message(this->plugin,"stardundee *** Close *** USBSpaceWire_Close, device: " + QString::number(0)); |
|
463 | SocExplorerEngine::message(this->plugin,"stardundee *** Close *** USBSpaceWire_Close, device: " + QString::number(0),0); | |
404 | USBSpaceWire_UnregisterReceiveOnAllPorts(hDevice); // Stop receiving on all ports |
|
464 | USBSpaceWire_UnregisterReceiveOnAllPorts(hDevice); // Stop receiving on all ports | |
405 | this->handleMutex->unlock(); |
|
465 | this->handleMutex->unlock(); | |
|
466 | this->RMAP_pending_transaction_IDsMtx->lock(); | |||
|
467 | this->RMAP_pending_transaction_IDs.clear(); | |||
|
468 | this->RMAP_pending_transaction_IDsMtx->unlock(); | |||
|
469 | this->RMAP_AnswersMtx->lock(); | |||
|
470 | this->RMAP_Answers.clear(); | |||
|
471 | this->RMAP_AnswersMtx->unlock(); | |||
|
472 | this->RMAP_AnswersSem->acquire(this->RMAP_AnswersSem->available()); | |||
406 | return true; |
|
473 | return true; | |
407 | } |
|
474 | } | |
408 |
|
475 | |||
@@ -411,7 +478,7 int stardundeeSPW_USB_Manager::getRMAPtr | |||||
411 | this->RMAP_pending_transaction_IDsMtx->lock(); |
|
478 | this->RMAP_pending_transaction_IDsMtx->lock(); | |
412 | int ID=0; |
|
479 | int ID=0; | |
413 | bool found=true; |
|
480 | bool found=true; | |
414 |
while(ID< |
|
481 | while(ID<511) | |
415 | { |
|
482 | { | |
416 | for(int i=0;i<RMAP_pending_transaction_IDs.count();i++) |
|
483 | for(int i=0;i<RMAP_pending_transaction_IDs.count();i++) | |
417 | { |
|
484 | { | |
@@ -431,16 +498,22 int stardundeeSPW_USB_Manager::getRMAPtr | |||||
431 |
|
498 | |||
432 | int stardundeeSPW_USB_Manager::getRMAPanswer(int transactionID, char **buffer) |
|
499 | int stardundeeSPW_USB_Manager::getRMAPanswer(int transactionID, char **buffer) | |
433 | { |
|
500 | { | |
|
501 | QTime timeout; | |||
434 | *buffer=NULL; |
|
502 | *buffer=NULL; | |
435 | int count=0; |
|
503 | int count=0; | |
|
504 | SocExplorerEngine::message(this->plugin,"Looking for RMAP answer",2); | |||
|
505 | timeout.start(); | |||
436 | while (*buffer==NULL) |
|
506 | while (*buffer==NULL) | |
437 | { |
|
507 | { | |
438 | this->RMAP_AnswersMtx->lock(); |
|
508 | this->RMAP_AnswersMtx->lock(); | |
|
509 | SocExplorerEngine::message(this->plugin,"Got exclusive access on RMAP_Answers stack",2); | |||
|
510 | SocExplorerEngine::message(this->plugin,QString("%2 packet(s) available in RMAP_Answers stack").arg(RMAP_Answers.count()),2); | |||
439 | for(int i=0;i<RMAP_Answers.count();i++) |
|
511 | for(int i=0;i<RMAP_Answers.count();i++) | |
440 | { |
|
512 | { | |
441 | if(RMAP_Answers[i]->transactionID==transactionID) |
|
513 | if(RMAP_Answers[i]->transactionID==transactionID) | |
442 | { |
|
514 | { | |
443 | this->RMAP_pending_transaction_IDsMtx->lock(); |
|
515 | this->RMAP_pending_transaction_IDsMtx->lock(); | |
|
516 | SocExplorerEngine::message(this->plugin,"Got exclusive access on RMAP_pending_transaction_ID stack",2); | |||
444 | for(int j=0;j<RMAP_pending_transaction_IDs.count();j++) |
|
517 | for(int j=0;j<RMAP_pending_transaction_IDs.count();j++) | |
445 | { |
|
518 | { | |
446 | if(RMAP_pending_transaction_IDs[j]==transactionID) |
|
519 | if(RMAP_pending_transaction_IDs[j]==transactionID) | |
@@ -458,9 +531,19 int stardundeeSPW_USB_Manager::getRMAPan | |||||
458 | } |
|
531 | } | |
459 | this->RMAP_AnswersMtx->unlock(); |
|
532 | this->RMAP_AnswersMtx->unlock(); | |
460 | //if no answer found in the stack wait until a new packet is pushed |
|
533 | //if no answer found in the stack wait until a new packet is pushed | |
461 | if(!buffer) |
|
534 | SocExplorerEngine::message(this->plugin,"waiting until a new packet is pushed",2); | |
|
535 | if(*buffer==NULL) | |||
|
536 | { | |||
|
537 | while (0==this->RMAP_AnswersSem->available()) | |||
462 | { |
|
538 | { | |
463 | SocExplorerEngine::message(this->plugin,"waiting until a new packet is pushed"); |
|
539 | SocExplorerEngine::message(this->plugin,QString("this->RMAP_AnswersSem->available() = %1").arg(this->RMAP_AnswersSem->available()),2); | |
|
540 | if(timeout.elapsed()>=RMAPtimeout) | |||
|
541 | { | |||
|
542 | SocExplorerEngine::message(this->plugin,"Timeout reached giving up!",2); | |||
|
543 | return -1; | |||
|
544 | } | |||
|
545 | usleep(1000); | |||
|
546 | } | |||
464 | this->RMAP_AnswersSem->acquire(); |
|
547 | this->RMAP_AnswersSem->acquire(); | |
465 | } |
|
548 | } | |
466 | } |
|
549 | } | |
@@ -471,18 +554,18 bool stardundeeSPW_USB_Manager::sendPack | |||||
471 | { |
|
554 | { | |
472 | USB_SPACEWIRE_STATUS result; |
|
555 | USB_SPACEWIRE_STATUS result; | |
473 | USB_SPACEWIRE_ID pIdentifier; |
|
556 | USB_SPACEWIRE_ID pIdentifier; | |
474 | SocExplorerEngine::message(this->plugin,"Sending SPW packet"); |
|
557 | SocExplorerEngine::message(this->plugin,"Sending SPW packet",2); | |
475 | this->handleMutex->lock(); |
|
558 | this->handleMutex->lock(); | |
476 | result = USBSpaceWire_SendPacket(hDevice,packet,size,1, &pIdentifier); |
|
559 | result = USBSpaceWire_SendPacket(hDevice,packet,size,1, &pIdentifier); | |
477 | if (result != TRANSFER_SUCCESS) |
|
560 | if (result != TRANSFER_SUCCESS) | |
478 | { |
|
561 | { | |
479 | SocExplorerEngine::message(this->plugin,"ERR sending the READ command "); |
|
562 | SocExplorerEngine::message(this->plugin,"ERR sending the READ command ",2); | |
480 | this->handleMutex->unlock(); |
|
563 | this->handleMutex->unlock(); | |
481 | return false; |
|
564 | return false; | |
482 | } |
|
565 | } | |
483 | else |
|
566 | else | |
484 | { |
|
567 | { | |
485 | SocExplorerEngine::message(this->plugin,"Packet sent"); |
|
568 | SocExplorerEngine::message(this->plugin,"Packet sent",2); | |
486 | USBSpaceWire_FreeSend(hDevice, pIdentifier); |
|
569 | USBSpaceWire_FreeSend(hDevice, pIdentifier); | |
487 | } |
|
570 | } | |
488 | this->handleMutex->unlock(); |
|
571 | this->handleMutex->unlock(); |
@@ -1,6 +1,6 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the SocExplorer Software |
|
2 | -- This file is a part of the SocExplorer Software | |
3 |
-- Copyright (C) 2014, |
|
3 | -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
@@ -62,6 +62,9 public: | |||||
62 | int getRMAPtransactionID(); |
|
62 | int getRMAPtransactionID(); | |
63 | int getRMAPanswer(int transactionID,char** buffer); |
|
63 | int getRMAPanswer(int transactionID,char** buffer); | |
64 | bool sendPacket(char* packet,int size); |
|
64 | bool sendPacket(char* packet,int size); | |
|
65 | ||||
|
66 | signals: | |||
|
67 | void updateAvailableBrickCount(int count); | |||
65 | private: |
|
68 | private: | |
66 | QMutex* handleMutex,*RMAP_AnswersMtx,*RMAP_pending_transaction_IDsMtx; |
|
69 | QMutex* handleMutex,*RMAP_AnswersMtx,*RMAP_pending_transaction_IDsMtx; | |
67 | QSemaphore* RMAP_AnswersSem; |
|
70 | QSemaphore* RMAP_AnswersSem; | |
@@ -72,8 +75,16 private: | |||||
72 | char* SPWPacketBuff; |
|
75 | char* SPWPacketBuff; | |
73 | QList<RMAP_Answer*> RMAP_Answers; |
|
76 | QList<RMAP_Answer*> RMAP_Answers; | |
74 | QList<int> RMAP_pending_transaction_IDs; |
|
77 | QList<int> RMAP_pending_transaction_IDs; | |
|
78 | ||||
|
79 | public: | |||
|
80 | int selectedBrick; | |||
75 | int linkNumber; |
|
81 | int linkNumber; | |
76 | int brickList; |
|
82 | int brickList; | |
|
83 | int linkSpeed; | |||
|
84 | int destinationKey; | |||
|
85 | int rmapAddress; | |||
|
86 | int rmapKey; | |||
|
87 | int RMAPtimeout; | |||
77 | }; |
|
88 | }; | |
78 |
|
89 | |||
79 | class stardundeeSPW_USB : public abstractSpwBridge |
|
90 | class stardundeeSPW_USB : public abstractSpwBridge | |
@@ -92,13 +103,16 public slots: | |||||
92 | int pushRMAPPacket(char* packet,int size); |
|
103 | int pushRMAPPacket(char* packet,int size); | |
93 | unsigned int Write(unsigned int *Value,unsigned int count, unsigned int address=0); |
|
104 | unsigned int Write(unsigned int *Value,unsigned int count, unsigned int address=0); | |
94 | unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0); |
|
105 | unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0); | |
95 | void updateAvailableBrickCount(int count); |
|
106 | void brickSelectionChanged(int brickIndex); | |
|
107 | void linkNumberSelectionChanged(int linkIndex); | |||
|
108 | void linkSpeedSelectionChanged(const QString & linkSpeed); | |||
|
109 | void destinationKeyChanged(const QString & destKey); | |||
|
110 | void rmapAddressChanged(const QString & rmapaddress); | |||
|
111 | void rmapKeyChanged(const QString & key); | |||
96 | private: |
|
112 | private: | |
97 | void makeGUI(socexplorerplugin *parent); |
|
113 | void makeGUI(socexplorerplugin *parent); | |
98 | stardundeeSPW_USB_Manager* manager; |
|
114 | stardundeeSPW_USB_Manager* manager; | |
99 | QGridLayout* mainLayout; |
|
115 | // QGridLayout* mainLayout; | |
100 | QPushButton* connectBridgeButton; |
|
|||
101 | QComboBox* selectBrickQcmbx; |
|
|||
102 | }; |
|
116 | }; | |
103 |
|
117 | |||
104 | #endif // STARDUNDEESPW_USB_H |
|
118 | #endif // STARDUNDEESPW_USB_H |
General Comments 0
You need to be logged in to leave comments.
Login now