|
virtual void | Name (const std::string &name) |
| Sets the CC name.
|
|
virtual std::string | Name () const |
| Name.
|
|
virtual void | Description (const std::string &desc) |
| Sets the description.
|
|
virtual std::string | Description () const |
| Description.
|
|
virtual void | Unit (const std::string &unit)=0 |
| Sets the unit.
|
|
virtual std::string | Unit () const =0 |
| Unit of measure.
|
|
virtual bool | IsUnitValid () const =0 |
| True if unit exist.
|
|
virtual void | Type (ConversionType type)=0 |
| Sets the conversion type.
|
|
virtual ConversionType | Type () const =0 |
| Conversion type.
|
|
virtual bool | IsDecimalUsed () const =0 |
| True if decimal is used.
|
|
virtual void | Decimals (uint8_t decimals) |
| Sets number of decimals.
|
|
virtual uint8_t | Decimals () const =0 |
| Number of decimals.
|
|
virtual IChannelConversion * | CreateInverse () |
| Creates an inverse conversion block.
|
|
virtual IChannelConversion * | Inverse () const |
| Returns the inverse conversion block. Seldom in use.
|
|
virtual void | Range (double min, double max) |
| Sets the range.
|
|
virtual std::optional< std::pair< double, double > > | Range () const |
| Returns the range if exist.
|
|
virtual void | Flags (uint16_t flags) |
| Sets the CcFlag.
|
|
virtual uint16_t | Flags () const |
| Returns CcFlag.
|
|
virtual IMetaData * | CreateMetaData () |
| Creates a meta-data (MD) block.
|
|
virtual IMetaData * | MetaData () const |
| Returns the meta-data block.
|
|
virtual void | Formula (const std::string &formula) |
| Sets the formula string.
|
|
virtual const std::string & | Formula () const |
| Returns formula string.
|
|
uint16_t | NofParameters () const |
| Returns number of parameters in the block.
|
|
void | Parameter (uint16_t index, double parameter) |
| Sets a floating point parameter value.
|
|
double | Parameter (uint16_t index) const |
| Returns the parameter (double)
|
|
uint64_t | ParameterUint (uint16_t index) const |
| Returns the parameter as a bit field (uint64_t)
|
|
void | ParameterUint (uint16_t index, uint64_t parameter) |
| Sets an unsigned integer parameter value.
|
|
virtual uint16_t | NofReferences () const |
| Number of references in the block.
|
|
virtual void | Reference (uint16_t index, const std::string &text) |
| Sets text reference (TX) block.
|
|
virtual std::string | Reference (uint16_t index) const |
| Returns the reference string by its index.
|
|
void | ChannelDataType (uint8_t channel_data_type) |
| Sets the CN block data type.
|
|
template<typename T , typename V > |
bool | Convert (const T &channel_value, V &eng_value) const |
| Converts a channel value to an engineering (scaled) value.
|
|
template<typename T , typename V = std::string> |
bool | Convert (const T &channel_value, std::string &eng_value) const |
| Converts a channel value to an engineering string value.
|
|
template<typename T = std::string, typename V = double> |
bool | Convert (const std::string &channel_value, double &eng_value) const |
| Convert from string to double with full precision.
|
|
template<typename T = std::string, typename V = std::string> |
bool | Convert (const std::string &channel_value, std::string &eng_value) const |
| Converts from string to string.
|
|
virtual | ~IBlock ()=default |
| Default destructor.
|
|
virtual int64_t | Index () const =0 |
| File position within the file.
|
|
virtual std::string | BlockType () const =0 |
| Returns the block type.
|
|
|
bool | IsChannelInteger () const |
| Returns true if channel is an integer.
|
|
bool | IsChannelFloat () const |
| Returns true if the channel is a float.
|
|
virtual bool | ConvertLinear (double channel_value, double &eng_value) const |
| Linear conversion.
|
|
virtual bool | ConvertRational (double channel_value, double &eng_value) const |
| Rational conversion.
|
|
virtual bool | ConvertAlgebraic (double channel_value, double &eng_value) const |
| Algebraic conversion.
|
|
virtual bool | ConvertValueToValueInterpolate (double channel_value, double &eng_value) const |
| Value to value interpolation conversion.
|
|
virtual bool | ConvertValueToValue (double channel_value, double &eng_value) const |
| Value to value conversion.
|
|
virtual bool | ConvertValueRangeToValue (double channel_value, double &eng_value) const |
| Value range to value conversion.
|
|
virtual bool | ConvertValueToText (double channel_value, std::string &eng_value) const |
| Value to text conversion.
|
|
virtual bool | ConvertValueRangeToText (double channel_value, std::string &eng_value) const |
| Value range to text value.
|
|
virtual bool | ConvertTextToValue (const std::string &channel_value, double &eng_value) const |
| Text to value conversion.
|
|
virtual bool | ConvertTextToTranslation (const std::string &channel_value, std::string &eng_value) const |
| Text to text conversion.
|
|
virtual bool | ConvertPolynomial (double channel_value, double &eng_value) const |
| Polynomial conversion (MDF3).
|
|
virtual bool | ConvertLogarithmic (double channel_value, double &eng_value) const |
| Logarithmic conversion (MDF3).
|
|
virtual bool | ConvertExponential (double channel_value, double &eng_value) const |
| Exponential conversion (MDF3).
|
|
The channel conversion (CC) block shall convert the channel value to an engineering value. If the CN block doesn't reference any CC block, the engineer and channel values are identical.
Depending on the type of conversion (ConversionType), none or more parameters (Parameter()) and none or more text string (Reference()) are used to define the conversion. Check description in ConversionType.