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.
 
quint32 maxValue (const PokitProduct product, const quint8 range)
 Returns the maximum value for range in nanofarads, or 0 if range is not a known value for product.
 

Detailed Description

Encapsulates convenience functions for working with capacitance ranges.

Function Documentation

◆ maxValue()

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

Returns the maximum value for range in nanofarads, or 0 if range is not a known value for product.

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 159 of file pokitproducts.cpp.

160{
161 switch (product) {
163 qCWarning(lc).noquote() << Private::tr("Pokit Meter has no capacitance support");
164 return 0;
166 return PokitPro::maxValue(static_cast<PokitPro::CapacitanceRange>(range));
167 }
168 qCWarning(lc).noquote() << Private::tr("Unknown PokitProduct value: %1").arg((int)product);
169 return 0;
170}
CapacitanceRange
Values supported by the Pokit Pro's Range attributes in Capacitance mode.
Definition pokitpro.h:20
QTPOKIT_EXPORT quint32 maxValue(const CapacitanceRange &range)
Returns the maximum value for range in nanofarads, or 0 if range is not a known value for Pokit Pro d...
Definition pokitpro.cpp:49
@ 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:35

References QString::arg(), 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: