Instrument Neutral Distributed Interface INDI 2.2.5
telemetry_snapshot.h
Go to the documentation of this file.
1/*
2 Gemini Power Box Hub Advanced v3 INDI Driver
3
4 Copyright (C) 2026 Dieter R Kedrowitsch <[email protected]>
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2 of the License, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 more details.
15
16 You should have received a copy of the GNU General Public License along with
17 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 The full GNU General Public License is included in this distribution in the
21 file called LICENSE.
22*/
23
24#pragma once
25
26#include <array>
27#include <chrono>
28#include <cstddef>
29
30namespace geminipbh
31{
32
34
36{
37 static constexpr std::size_t DcOutputCount = 4;
38 static constexpr std::size_t UsbOutputCount = 6;
39 static constexpr std::size_t HeaterCount = 2;
40
41 const std::array<bool, DcOutputCount> dcOutputs;
42 const std::array<bool, UsbOutputCount> usbOutputs;
43 const bool aht20Attached;
44 const bool ds18b20Attached;
45 const std::array<bool, HeaterCount> heaterEnabled;
46 const std::array<HeaterMode, HeaterCount> heaterModes;
47 const std::array<double, HeaterCount> heaterOutputPercent;
49 const double airTemperatureC;
50 const double humidityPercent;
51 const double dewPointC;
52 const double inputVoltageV;
53 const double outputCurrentA;
54 const double outputPowerW;
55 const unsigned long long sequence;
56 const std::chrono::steady_clock::time_point timestamp;
57
58 TelemetrySnapshot(std::array<bool, DcOutputCount> dcOutputs,
59 std::array<bool, UsbOutputCount> usbOutputs,
60 bool aht20Attached,
61 bool ds18b20Attached,
62 std::array<bool, HeaterCount> heaterEnabled,
63 std::array<HeaterMode, HeaterCount> heaterModes,
64 std::array<double, HeaterCount> heaterOutputPercent,
66 double airTemperatureC,
67 double humidityPercent,
68 double dewPointC,
69 double inputVoltageV,
70 double outputCurrentA,
71 double outputPowerW,
72 unsigned long long sequence,
73 std::chrono::steady_clock::time_point timestamp)
90 {
91 }
92};
93
94} // namespace geminipbh
const std::array< HeaterMode, HeaterCount > heaterModes
static constexpr std::size_t DcOutputCount
static constexpr std::size_t UsbOutputCount
const unsigned long long sequence
const std::array< bool, UsbOutputCount > usbOutputs
const std::array< double, HeaterCount > heaterOutputPercent
const std::array< bool, DcOutputCount > dcOutputs
TelemetrySnapshot(std::array< bool, DcOutputCount > dcOutputs, std::array< bool, UsbOutputCount > usbOutputs, bool aht20Attached, bool ds18b20Attached, std::array< bool, HeaterCount > heaterEnabled, std::array< HeaterMode, HeaterCount > heaterModes, std::array< double, HeaterCount > heaterOutputPercent, double deviceSurfaceTemperatureC, double airTemperatureC, double humidityPercent, double dewPointC, double inputVoltageV, double outputCurrentA, double outputPowerW, unsigned long long sequence, std::chrono::steady_clock::time_point timestamp)
const std::array< bool, HeaterCount > heaterEnabled
static constexpr std::size_t HeaterCount
const std::chrono::steady_clock::time_point timestamp