Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
skylivex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
astronomy
skylivex
Commits
c70f3162
Commit
c70f3162
authored
Feb 21, 2013
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move skproto timer in the same thread
parent
0172fe95
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
2 deletions
+18
-2
skauth.cpp
plugins/skauth.cpp
+5
-0
skauth.h
plugins/skauth.h
+1
-0
skproto.cpp
plugins/skproto.cpp
+8
-2
skproto.h
plugins/skproto.h
+1
-0
skylivex.cpp
src/skylivex.cpp
+2
-0
skylivex.h
src/skylivex.h
+1
-0
No files found.
plugins/skauth.cpp
View file @
c70f3162
...
...
@@ -45,6 +45,11 @@ void SkyliveAuth::startPlugin()
}
void
SkyliveAuth
::
pluginKicked
()
{
}
void
SkyliveAuth
::
receiveMessage
(
SKMessage
msg
)
{
std
::
cout
<<
"SkyliveAuth msg received: "
<<
msg
.
handle
.
toStdString
()
<<
std
::
endl
;
...
...
plugins/skauth.h
View file @
c70f3162
...
...
@@ -66,6 +66,7 @@ class SkyliveAuth : public QObject, SkylivexPluginInterface
public
slots
:
void
receiveMessage
(
SKMessage
msg
);
void
pluginKicked
();
signals
:
void
putMessage
(
SKMessage
msg
);
...
...
plugins/skproto.cpp
View file @
c70f3162
...
...
@@ -49,13 +49,19 @@ void SkyliveProtocol::startPlugin()
registerHandler
((
QString
)
"connectTelescopes"
,
&
SkyliveProtocol
::
handle_connect
);
registerHandler
((
QString
)
"putlogin"
,
&
SkyliveProtocol
::
handle_putlogin
);
pktTimer
=
new
QTimer
();
QObject
::
connect
(
pktTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
processPackets
()));
//
pktTimer = new QTimer();
//
QObject::connect(pktTimer, SIGNAL(timeout()), this, SLOT(processPackets()));
//pktTimer->start();
}
void
SkyliveProtocol
::
pluginKicked
()
{
pktTimer
=
new
QTimer
();
QObject
::
connect
(
pktTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
processPackets
()));
pktTimer
->
start
();
}
void
SkyliveProtocol
::
sendPacket
(
QString
&
cmd
,
QList
<
QString
>
&
paramlist
)
{
...
...
plugins/skproto.h
View file @
c70f3162
...
...
@@ -120,6 +120,7 @@ class SkyliveProtocol : public QObject, SkylivexPluginInterface
void
displayError
(
QAbstractSocket
::
SocketError
);
public
slots
:
void
pluginKicked
();
void
receiveMessage
(
SKMessage
msg
);
private
slots
:
...
...
src/skylivex.cpp
View file @
c70f3162
...
...
@@ -79,6 +79,7 @@ void SkyliveX::loadPlugins()
std
::
cout
<<
plugin
<<
std
::
endl
;
}
}
emit
kickPlugins
();
SKMessage
msg
(
"coreStarted"
);
sendMessage
(
msg
);
}
...
...
@@ -89,6 +90,7 @@ void SkyliveX::initializePlugin(QObject *plugin, QString filename)
// connect signals/slots
connect
(
plugin
,
SIGNAL
(
putMessage
(
SKMessage
)),
this
,
SLOT
(
receiveFromPlugins
(
SKMessage
)));
connect
(
this
,
SIGNAL
(
msgForPlugins
(
SKMessage
)),
plugin
,
SLOT
(
receiveMessage
(
SKMessage
)));
connect
(
this
,
SIGNAL
(
kickPlugins
()),
plugin
,
SLOT
(
pluginKicked
()));
// Move the plugin in it's own thread
QThread
*
consumer
=
new
QThread
();
...
...
src/skylivex.h
View file @
c70f3162
...
...
@@ -71,6 +71,7 @@ class SkyliveX : public QObject
signals
:
void
finished
();
void
kickPlugins
();
void
msgForMainWin
(
SKMessage
&
msg
);
void
msgForPlugins
(
SKMessage
msg
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment