LCOV - code coverage report
Current view: top level - src/cli - loggerstartcommand.h (source / functions) Hit Total Coverage
Project: Dokit Lines: 2 2 100.0 %
Version: Functions: 0 0 -

          Line data    Source code
       1             : // SPDX-FileCopyrightText: 2022-2023 Paul Colby <git@colby.id.au>
       2             : // SPDX-License-Identifier: LGPL-3.0-or-later
       3             : 
       4             : #include "devicecommand.h"
       5             : 
       6             : #include <qtpokit/dataloggerservice.h>
       7             : #include <qtpokit/pokitmeter.h>
       8             : #include <qtpokit/pokitpro.h>
       9             : 
      10         486 : class LoggerStartCommand : public DeviceCommand
      11             : {
      12         216 :     Q_OBJECT
      13             : 
      14             : public:
      15             :     explicit LoggerStartCommand(QObject * const parent = nullptr);
      16             : 
      17             :     QStringList requiredOptions(const QCommandLineParser &parser) const override;
      18             :     QStringList supportedOptions(const QCommandLineParser &parser) const override;
      19             : 
      20             : public slots:
      21             :     QStringList processOptions(const QCommandLineParser &parser) override;
      22             : 
      23             : protected:
      24             :     AbstractPokitService * getService() override;
      25             : 
      26             : protected slots:
      27             :     void serviceDetailsDiscovered() override;
      28             : 
      29             : private:
      30             :     quint8 (* minRangeFunc)(const PokitProduct product, const quint32 maxValue) { nullptr };
      31             :     quint32 rangeOptionValue { 0 };          ///< The parsed value of range option.
      32             :     DataLoggerService * service { nullptr }; ///< Bluetooth service this command interracts with.
      33             :     DataLoggerService::Settings settings {   ///< Settings for the Pokit device's data logger mode.
      34             :         DataLoggerService::Command::Start, 0, DataLoggerService::Mode::DcVoltage,
      35             :         +PokitMeter::VoltageRange::AutoRange, 60000, 0
      36             :     };
      37             : 
      38             : private slots:
      39             :     void settingsWritten();
      40             : 
      41             :     friend class TestLoggerStartCommand;
      42             : };

Generated by: LCOV version 1.14