Dokit
Internal development documentation
Loading...
Searching...
No Matches
CapacitanceRange Namespace Reference

Encapsulates convenience functions for working with capacitance ranges. More...

Functions

QString toString (const PokitProduct product, const quint8 range)
 Returns product's capacitance range as a human-friendly string.
 
QVariant maxValue (const PokitProduct product, const quint8 range)
 Returns the maximum value for product's range in (integer) nanofarads, or the string "Auto".
 

Detailed Description

Encapsulates convenience functions for working with capacitance ranges.

Function Documentation

◆ maxValue()

QTPOKIT_EXPORT QVariant CapacitanceRange::maxValue ( const PokitProduct product,
const quint8 range )

Returns the maximum value for product's range in (integer) nanofarads, or the string "Auto".

If range is not a known valid value, then an null QVariant is returned.

Note
Since Pokit Meters do not support capacitance measurement, product should not be PokitProduct::PokitMeter.
See also
PokitPro::maxValue(const PokitPro::CapacitanceRange &range)

Definition at line 160 of file pokitproducts.cpp.

161{
162 switch (product) {
164 qCWarning(lc).noquote() << Private::tr("Pokit Meter has no capacitance support");
165 return QVariant();
167 return PokitPro::maxValue(static_cast<PokitPro::CapacitanceRange>(range));
168 }
169 qCWarning(lc).noquote() << Private::tr("Unknown PokitProduct value: %1").arg((int)product);
170 return QVariant();
171}
QTPOKIT_EXPORT QVariant maxValue(const CapacitanceRange &range)
Returns the maximum value for range in (integer) nanofarads, or the string "Auto".
Definition pokitpro.cpp:47
CapacitanceRange
Values supported by the Pokit Pro's Range attributes in Capacitance mode.
Definition pokitpro.h:22
@ PokitPro
Pokit Pro.
@ PokitMeter
Pokit Meter.

References PokitPro::maxValue(), PokitMeter, and PokitPro.

Referenced by MultimeterService::maxValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

QTPOKIT_EXPORT QString CapacitanceRange::toString ( const PokitProduct product,
const quint8 range )

Returns product's capacitance range as a human-friendly string.

Note
Since Pokit Meters do not support capacitance measurement, product should not be PokitProduct::PokitMeter.
See also
PokitPro::toString(const PokitPro::CapacitanceRange &range)

Definition at line 139 of file pokitproducts.cpp.

140{
141 switch (product) {
143 qCWarning(lc).noquote() << Private::tr("Pokit Meter has no capacitance support");
144 return QString();
146 return PokitPro::toString(static_cast<PokitPro::CapacitanceRange>(range));
147 }
148 qCWarning(lc).noquote() << Private::tr("Unknown PokitProduct value: %1").arg((int)product);
149 return QString();
150}
QTPOKIT_EXPORT QString toString(const CapacitanceRange &range)
Returns range as a user-friendly string.
Definition pokitpro.cpp:32

References PokitMeter, PokitPro, and PokitPro::toString().

Referenced by MultimeterService::toString().

Here is the call graph for this function:
Here is the caller graph for this function: