Reworked data types.

This commit is contained in:
2025-12-21 14:40:38 +01:00
parent acce874133
commit cb9eb8c3fe
9 changed files with 42 additions and 72 deletions

View File

@@ -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;