SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
antenna.hpp
Go to the documentation of this file.
1/*
2 * SatNOGS-COMMS control library
3 *
4 * Copyright (C) 2024-2025, Libre Space Foundation <http://libre.space>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * SPDX-License-Identifier: GNU General Public License v3.0 or later
20 */
21
22#pragma once
23
24#include <cstdint>
30
31namespace satnogs::comms::lib
32{
33
46{
47public:
48 enum class tlm : uint8_t
49 {
55 };
56
57 antenna(const char *name, uint32_t nelems);
58
59 virtual void
60 enable(bool en);
61
62 virtual bool
63 detect(uint32_t idx);
64
65 virtual void
66 deploy(uint32_t idx, bool en);
67
68 virtual void
69 deploy_backup(uint32_t idx, bool en);
70
71 const char *
72 name() const;
73
74 uint32_t
75 nelems() const;
76
77 virtual void
78 telemetry(tlm t, float &res);
79
80 virtual void
81 telemetry(tlm t, uint32_t &res);
82
83 virtual void
84 telemetry(tlm t, bool &res);
85
86 virtual void
87 telemetry(tlm t, uint32_t idx, float &res);
88
89 virtual void
90 telemetry(tlm t, uint32_t idx, uint32_t &res);
91
92 virtual void
93 telemetry(tlm t, uint32_t idx, bool &res);
94
95protected:
96 const etl::string<32> m_name;
97 const uint32_t m_nelems;
98};
99
101
102} // namespace satnogs::comms::lib
virtual void deploy(uint32_t idx, bool en)
Deploy the antenna.
Definition antenna.cpp:68
antenna(const char *name, uint32_t nelems)
Construct a new generic antenna object.
Definition antenna.cpp:34
virtual void deploy_backup(uint32_t idx, bool en)
Deploy the antenna using the backup method if exists.
Definition antenna.cpp:79
virtual bool detect(uint32_t idx)
Returns antenna deployment status.
Definition antenna.cpp:56
const char * name() const
Retrieves the name of the antenna.
Definition antenna.cpp:89
virtual void telemetry(tlm t, float &res)
Definition antenna.cpp:106
uint32_t nelems() const
Retrieves the number of available elements of the antenna.
Definition antenna.cpp:100
virtual void enable(bool en)
Enables or disables the antenna subsystem if required.
Definition antenna.cpp:45
const etl::string< 32 > m_name
Definition antenna.hpp:96