Reworked data types.
This commit is contained in:
12
bcvalue.h
12
bcvalue.h
@@ -53,7 +53,7 @@
|
||||
-
|
||||
*/
|
||||
|
||||
using bcdata_t = uint32_t;
|
||||
|
||||
|
||||
class BCAbstractTransmitter
|
||||
{
|
||||
@@ -61,8 +61,8 @@ class BCAbstractTransmitter
|
||||
public:
|
||||
|
||||
//
|
||||
virtual bcdata_t readValue( BCDevice::ID deviceID_, BC::ID targetID_ ) const { return 0;};
|
||||
///virtual uint32_t readByte( BCDevice::ID deviceID_, BC::ID targetID_ ) const = 0;
|
||||
virtual std::optional<bcdata_t> readRawValue( BCDevice::ID deviceID_, BC::ID registerID_ ) const = 0;
|
||||
virtual void writeRawValue( BCDevice::ID deviceID_, BC::ID registerID_, uint8_t value_ ) const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class BCValue
|
||||
public:
|
||||
|
||||
//BCValue();
|
||||
BCValue( const BCValueType& valueType_, BCDevice::ID deviceID_, BC::ID targetID_ );
|
||||
BCValue( const BCValueType& valueType_, BCDevice::ID deviceID_, BC::ID registerID_ );
|
||||
|
||||
void readRawValue( const BCAbstractTransmitter& transmitter ) const;
|
||||
void writeRawValue( const BCAbstractTransmitter& transmitter ) const;
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
|
||||
BCValueTypeCRef valueType;
|
||||
BCDevice::ID deviceID{BCDevice::ID::Invalid};
|
||||
BC::ID targetID{BC::ID::Invalid};
|
||||
BC::ID registerID{BC::ID::Invalid};
|
||||
int rowInModel{-1};
|
||||
QString label;
|
||||
QVariant value;
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
bool inSync{false};
|
||||
bool readOnly{false};
|
||||
|
||||
mutable double rawValue{};
|
||||
mutable std::optional<bcdata_t> rawValue;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user