Added BCTransmitter & woker thread.
This commit is contained in:
@@ -36,8 +36,10 @@
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QMetaEnum>
|
||||
|
||||
#include <bcvaluemodel.h>
|
||||
#include <QThread>
|
||||
#include <bcdatamodel.h>
|
||||
#include <bccandrivertinycan.h>
|
||||
#include <bctransmitter.h>
|
||||
|
||||
class BCValueManager : public QObject
|
||||
{
|
||||
@@ -45,13 +47,16 @@ class BCValueManager : public QObject
|
||||
|
||||
public:
|
||||
|
||||
BCValueManager();
|
||||
BCValueManager( );
|
||||
virtual ~BCValueManager();
|
||||
|
||||
std::optional<BCValueModel*> getModel(const QString& key );
|
||||
|
||||
BCValue makeValue(BCDevice::ID deviceID, const BCValueParams& params );
|
||||
|
||||
// Public API für die Applikation
|
||||
void transmitValue( const BCValue& value);
|
||||
|
||||
public slots:
|
||||
|
||||
void loadXml();
|
||||
@@ -60,6 +65,14 @@ public slots:
|
||||
|
||||
signals:
|
||||
|
||||
// Internes Signal, um Daten an den Worker Thread zu senden
|
||||
void newCommandArrived(BCValue cmd);
|
||||
|
||||
private slots:
|
||||
|
||||
// Slots für Rückmeldungen vom Runner
|
||||
void onCommandFinished(int id, bool success);
|
||||
void onRunnerMessage(const QString &msg);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -71,6 +84,10 @@ protected:
|
||||
QMetaEnum _bcDeviceEnum{QMetaEnum::fromType<BCDevice::ID>()};
|
||||
|
||||
BCCanDriverTinyCan _canDriver;
|
||||
|
||||
QThread _worker;
|
||||
BCTransmitter _transmitter;
|
||||
|
||||
};
|
||||
|
||||
#endif // BCVALUEMANAGER_H
|
||||
|
||||
Reference in New Issue
Block a user