Reworked value handling.
This commit is contained in:
23
bcvalue.h
23
bcvalue.h
@@ -83,29 +83,28 @@ public:
|
||||
ReadValue,
|
||||
WriteValue,
|
||||
};
|
||||
//Q_ENUM(OpID)
|
||||
|
||||
// __fix! flags draus machen ?
|
||||
enum class State : uint8_t
|
||||
{
|
||||
Invalid,
|
||||
Locked,
|
||||
Failed,
|
||||
InSync,
|
||||
OK
|
||||
NoState = 0x0,
|
||||
ReadOnly = 0x1,
|
||||
Locked = 0x2,
|
||||
Failed = 0x4,
|
||||
InSync = 0x8,
|
||||
OK = 0x10
|
||||
};
|
||||
//Q_ENUM(State)
|
||||
Q_DECLARE_FLAGS(States, State )
|
||||
|
||||
BCValue( const BCValueType* valueType_, BCDevice::ID deviceID_, BC::ID registerID_ );
|
||||
|
||||
QString readRawValueX( const BCAbstractTransmitter& transmitter ) const;
|
||||
void writeRawValueX( const BCAbstractTransmitter& transmitter ) const;
|
||||
void writeRawValueX( const BCAbstractTransmitter& transmitter ) const;
|
||||
// void reset()
|
||||
|
||||
// später
|
||||
// später vielleicht
|
||||
//protected:
|
||||
|
||||
mutable State state{BCValue::State::Invalid};
|
||||
mutable States state{BCValue::State::NoState};
|
||||
//const BCValueType& valueType;
|
||||
//BCValueTypeCRef valueType;
|
||||
const BCValueType* valueType{};
|
||||
@@ -123,7 +122,7 @@ public:
|
||||
//mutable std::optional<uint32_t> rawValue;
|
||||
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(BCValue::States)
|
||||
Q_DECLARE_METATYPE(const BCValue*)
|
||||
//Q_DECLARE_METATYPE(const BCValue&)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user