Changed BCValue
This commit is contained in:
63
bcvalue.cpp
63
bcvalue.cpp
@@ -74,6 +74,69 @@ void BCValue::setFlag( BCValue::Flag flag, bool state) const
|
|||||||
_valueFlags.setFlag( flag, state );
|
_valueFlags.setFlag( flag, state );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BCDevice::ID BCValue::getDeviceID() const noexcept
|
||||||
|
{
|
||||||
|
return _deviceID;
|
||||||
|
}
|
||||||
|
|
||||||
|
BC::ID BCValue::getRegisterID() const noexcept
|
||||||
|
{
|
||||||
|
return _registerID;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t BCValue::getRawValue() const noexcept
|
||||||
|
{
|
||||||
|
return _rawValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BCValue::setRawValue(uint32_t newRawValue) const
|
||||||
|
{
|
||||||
|
_rawValue = newRawValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BCValue::ValueType BCValue::getValueType() const noexcept
|
||||||
|
{
|
||||||
|
return _valueType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int BCValue::getIndexRow() const noexcept
|
||||||
|
{
|
||||||
|
return _indexRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BCValue::setIndexRow(int newIndexRow)
|
||||||
|
{
|
||||||
|
_indexRow = newIndexRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString BCValue::getLabel() const
|
||||||
|
{
|
||||||
|
return _label;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString BCValue::getUnitLabel() const
|
||||||
|
{
|
||||||
|
return _unitLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
double BCValue::getFactor() const noexcept
|
||||||
|
{
|
||||||
|
return _factor;
|
||||||
|
}
|
||||||
|
|
||||||
|
const OptDouble BCValue::getOptMin() const
|
||||||
|
{
|
||||||
|
return _optMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
const OptDouble BCValue::getOptMax() const
|
||||||
|
{
|
||||||
|
return _optMax;
|
||||||
|
}
|
||||||
|
|
||||||
void BCValue::setFromDouble( double value )
|
void BCValue::setFromDouble( double value )
|
||||||
{
|
{
|
||||||
//if( _isReadOnly)
|
//if( _isReadOnly)
|
||||||
|
|||||||
24
bcvalue.h
24
bcvalue.h
@@ -107,21 +107,21 @@ public:
|
|||||||
bool testFlag( Flag flag ) const;
|
bool testFlag( Flag flag ) const;
|
||||||
void setFlag( Flag flag, bool state=true ) const;
|
void setFlag( Flag flag, bool state=true ) const;
|
||||||
|
|
||||||
BCDevice::ID getDeviceID() const noexcept { return _deviceID; }
|
BCDevice::ID getDeviceID() const noexcept;
|
||||||
BC::ID getRegisterID() const noexcept { return _registerID; }
|
BC::ID getRegisterID() const noexcept;
|
||||||
|
|
||||||
uint32_t getRawValue() const noexcept { return _rawValue; }
|
uint32_t getRawValue() const noexcept;
|
||||||
void setRawValue(uint32_t newRawValue) const { _rawValue = newRawValue; }
|
void setRawValue(uint32_t newRawValue) const;
|
||||||
void setFromDouble( double value );
|
void setFromDouble( double value );
|
||||||
|
|
||||||
ValueType getValueType() const noexcept { return _valueType; }
|
ValueType getValueType() const noexcept;
|
||||||
int getIndexRow() const noexcept { return _indexRow; }
|
int getIndexRow() const noexcept;
|
||||||
void setIndexRow(int newIndexRow) { _indexRow = newIndexRow; }
|
void setIndexRow(int newIndexRow);
|
||||||
QString getLabel() const { return _label; }
|
QString getLabel() const;
|
||||||
QString getUnitLabel() const { return _unitLabel; }
|
QString getUnitLabel() const;
|
||||||
double getFactor() const noexcept { return _factor; }
|
double getFactor() const noexcept;
|
||||||
const OptDouble getOptMin() const { return _optMin; }
|
const OptDouble getOptMin() const;
|
||||||
const OptDouble getOptMax() const { return _optMax; }
|
const OptDouble getOptMax() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user