4#include "devicecommand.h"
42 friend class TestMeterCommand;
The AbstractPokitService class provides a common base for Pokit services classes.
The AbstractCommand class extends AbstractCommand to add a PokitDevice instance.
The MeterCommand class implements the meter CLI command.
QStringList requiredOptions(const QCommandLineParser &parser) const override
Returns a list of CLI option names required by this command.
quint32 rangeOptionValue
The parsed value of range option, if one was supplied.
MultimeterService::Settings settings
< Settings for the Pokit device's multimeter mode.
bool showCsvHeader
Whether or not to show a header as the first line of CSV output.
void outputReading(const MultimeterService::Reading &reading)
Outputs meter reading in the selected ouput format.
QStringList processOptions(const QCommandLineParser &parser) override
Processes the relevant options from the command line parser.
void settingsWritten()
Invoked when the multimeter settings have been written, to begin reading the meter values.
QStringList supportedOptions(const QCommandLineParser &parser) const override
Returns a list of CLI option names supported by this command.
quint8(* minRangeFunc)(const PokitProduct product, const quint32 maxValue)
Pointer to function for converting rangeOptionValue to a Pokit device's range enumerator.
AbstractPokitService * getService() override
Returns a Pokit service object for the derived command class.
void serviceDetailsDiscovered() override
Handles service detail discovery events.
MeterCommand(QObject *const parent=nullptr)
Construct a new MeterCommand object with parent.
int samplesToGo
Number of samples to read, if specified on the CLI.
MultimeterService * service
Bluetooth service this command interracts with.
The MultimeterService class accesses the Multimeter service of Pokit devices.
@ DcVoltage
Measure DC voltage.
Declares the MultimeterService class.
Declares the PokitMeter namespace.
Declares the PokitPro namespace.
PokitProduct
Pokit products known to, and supported by, the QtPokit library.
QObject * parent() const const
Attributes included in the Reading characterstic.
Attributes included in the Settings characterstic.