SEPIA
Software documentation for the APEX SEPIA receivers
synchronize.h
Go to the documentation of this file.
1 /* Copyright 2017 Michael Olberg <michael.olberg@chalmers.se> */
2 #ifndef SYNCHRONIZE_H
3 #define SYNCHRONIZE_H
4 
5 #include <QMutex>
6 #include <QWaitCondition>
7 
16 struct Sync {
17  static QMutex mutex;
18  static QWaitCondition cartridgeInitialized;
19  static QWaitCondition cartridgeShutdown;
20  static QWaitCondition tuningFinished;
21  static QWaitCondition scanFinished;
28  bool waitFor(QWaitCondition *waitcondition);
29 };
30 
31 #endif // SYNCHRONIZE_H
bool waitFor(QWaitCondition *waitcondition)
Wait for the given condition.
Definition: synchronize.cpp:11
static QWaitCondition tuningFinished
Definition: synchronize.h:20
Provide mutex and wait conditions for asynchronous methods.
Definition: synchronize.h:16
static QWaitCondition cartridgeInitialized
Definition: synchronize.h:18
static QWaitCondition scanFinished
Definition: synchronize.h:21
static QWaitCondition cartridgeShutdown
Definition: synchronize.h:19
static QMutex mutex
Definition: synchronize.h:17