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

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

Functions

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

Detailed Description

Encapsulates convenience functions for working with current ranges.

Function Documentation

◆ maxValue()

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

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

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

See also
PokitMeter::maxValue(const PokitMeter::CurrentRange &range)
PokitPro::maxValue(const PokitPro::CurrentRange &range)

Definition at line 203 of file pokitproducts.cpp.

204{
205 switch (product) {
207 return PokitMeter::maxValue(static_cast<PokitMeter::CurrentRange>(range));
209 return PokitPro::maxValue(static_cast<PokitPro::CurrentRange>(range));
210 }
211 qCWarning(lc).noquote() << Private::tr("Unknown PokitProduct value: %1").arg((int)product);
212 return QVariant();
213}
CurrentRange
Values supported by the Pokit Meter's Range attributes in *Current modes.
Definition pokitmeter.h:22
QTPOKIT_EXPORT QVariant maxValue(const CurrentRange &range)
Returns the maximum value for range in (integer) microamps, or the string "Auto".
QTPOKIT_EXPORT QVariant maxValue(const CapacitanceRange &range)
Returns the maximum value for range in (integer) nanofarads, or the string "Auto".
Definition pokitpro.cpp:47
CurrentRange
Values supported by the Pokit Pro's Range attributes in *Current modes.
Definition pokitpro.h:33
@ PokitPro
Pokit Pro.
@ PokitMeter
Pokit Meter.

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

Referenced by DataLoggerService::maxValue(), DsoService::maxValue(), and MultimeterService::maxValue().

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

◆ toString()

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

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

See also
PokitMeter::toString(const PokitMeter::CurrentRange &range)
PokitPro::toString(const PokitPro::CurrentRange &range)

Definition at line 184 of file pokitproducts.cpp.

185{
186 switch (product) {
188 return PokitMeter::toString(static_cast<PokitMeter::CurrentRange>(range));
190 return PokitPro::toString(static_cast<PokitPro::CurrentRange>(range));
191 }
192 qCWarning(lc).noquote() << Private::tr("Unknown PokitProduct value: %1").arg((int)product);
193 return QString();
194}
QTPOKIT_EXPORT QString toString(const CurrentRange &range)
Returns range as a user-friendly string.
QTPOKIT_EXPORT QString toString(const CapacitanceRange &range)
Returns range as a user-friendly string.
Definition pokitpro.cpp:32

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

Referenced by DataLoggerService::toString(), DsoService::toString(), and MultimeterService::toString().

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