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

Encapsulates convenience functions for working with voltage 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) millivolts, or the string "Auto".
 

Detailed Description

Encapsulates convenience functions for working with voltage ranges.

Function Documentation

◆ maxValue()

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

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

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

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

Definition at line 291 of file pokitproducts.cpp.

292{
293 switch (product) {
295 return PokitMeter::maxValue(static_cast<PokitMeter::VoltageRange>(range));
297 return PokitPro::maxValue(static_cast<PokitPro::VoltageRange>(range));
298 }
299 qCWarning(lc).noquote() << QCoreApplication::translate("VoltageRange",
300 "Unknown PokitProduct value: %1", "maxValue").arg((int)product);
301 return QVariant();
302}
QTPOKIT_EXPORT QVariant maxValue(const CurrentRange &range)
Returns the maximum value for range in (integer) microamps, or the string "Auto".
VoltageRange
Values supported by the Pokit Meter's Range attributes in *Voltage modes.
Definition pokitmeter.h:49
QTPOKIT_EXPORT QVariant maxValue(const CapacitanceRange &range)
Returns the maximum value for range in (integer) nanofarads, or the string "Auto".
Definition pokitpro.cpp:40
VoltageRange
Values supported by the Pokit Pro's Range attributes in *Voltage modes.
Definition pokitpro.h:65
@ PokitPro
Pokit Pro.
@ PokitMeter
Pokit Meter.
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const

References QString::arg(), PokitPro::maxValue(), PokitMeter::maxValue(), PokitMeter, PokitPro, and QCoreApplication::translate().

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 VoltageRange::toString ( const PokitProduct product,
const quint8 range )

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

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

Definition at line 271 of file pokitproducts.cpp.

272{
273 switch (product) {
275 return PokitMeter::toString(static_cast<PokitMeter::VoltageRange>(range));
277 return PokitPro::toString(static_cast<PokitPro::VoltageRange>(range));
278 }
279 qCWarning(lc).noquote() << QCoreApplication::translate("VoltageRange",
280 "Unknown PokitProduct value: %1", "toString").arg((int)product);
281 return QString();
282}
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:25

References QString::arg(), PokitMeter, PokitPro, PokitPro::toString(), PokitMeter::toString(), and QCoreApplication::translate().

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: