Cleanups.
This commit is contained in:
@@ -39,10 +39,13 @@
|
||||
#include <atomic>
|
||||
|
||||
#include <bcvalue.h>
|
||||
#include <bcvaluetype.h>
|
||||
#include <bcdrivertinycan.h>
|
||||
|
||||
/**
|
||||
* @brief Die BCTransmitter Klasse kapselt die Kommunikation mit dem
|
||||
* @brief The BCTransmitter class
|
||||
*
|
||||
* Die BCTransmitter Klasse kapselt die Kommunikation mit dem
|
||||
* Treiber und läuft dazu in einem eigenen Thread. Werte, also BCValues,
|
||||
* die gelesen oder geschrieben werden sollen, landen in einer Queue und
|
||||
* werden nacheinander bearbeitet. Der Transmitter enthält auch den
|
||||
@@ -58,14 +61,14 @@ public:
|
||||
|
||||
explicit BCTransmitter(QObject *parent = nullptr);
|
||||
|
||||
uint8_t readByte( uint32_t deviceID, uint8_t registerID ) const override;
|
||||
void writeByte( uint32_t deviceID, uint8_t registerID, uint8_t value ) const override;
|
||||
TransmitResult readByte( uint32_t deviceID, uint8_t registerID ) const override;
|
||||
TransmitResult writeByte( uint32_t deviceID, uint8_t registerID, uint8_t value ) const override;
|
||||
|
||||
public slots:
|
||||
|
||||
void onToggleConnectionState( bool connect );
|
||||
void enqueueValueOp(const BCValuePtr value );
|
||||
void processValueOp();
|
||||
void enqueueValue(BCValuePtrConst value );
|
||||
void processValue();
|
||||
|
||||
signals:
|
||||
|
||||
@@ -74,7 +77,10 @@ signals:
|
||||
|
||||
private:
|
||||
|
||||
using BCDataQueue = QQueue<BCValuePtr>;
|
||||
void readRawValueX ( const BCValue& value ) const;
|
||||
void writeRawValueX( const BCValue& value ) const;
|
||||
|
||||
using BCDataQueue = QQueue<BCValuePtrConst>;
|
||||
|
||||
BCDataQueue _valueQueue;
|
||||
QMutex _mutex;
|
||||
|
||||
Reference in New Issue
Block a user