SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
antenna.cpp
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
23
24namespace satnogs::comms::lib
25{
26
34antenna::antenna(const char *name, uint32_t nelems)
36{
37}
38
44void
46{
47}
48
55bool
56antenna::detect(uint32_t idx)
57{
58 return false;
59}
60
67void
68antenna::deploy(uint32_t idx, bool en)
69{
70}
71
78void
79antenna::deploy_backup(uint32_t idx, bool en)
80{
81}
82
88const char *
90{
91 return m_name.c_str();
92}
93
99uint32_t
101{
102 return m_nelems;
103}
104
105void
107{
108 throw resource_unavailable_exception(__FILE__, __LINE__);
109}
110
111void
112antenna::telemetry(tlm t, uint32_t &res)
113{
114 throw resource_unavailable_exception(__FILE__, __LINE__);
115}
116
117void
119{
120 throw resource_unavailable_exception(__FILE__, __LINE__);
121}
122
123void
124antenna::telemetry(tlm t, uint32_t idx, bool &res)
125{
126 throw resource_unavailable_exception(__FILE__, __LINE__);
127}
128
129void
130antenna::telemetry(tlm t, uint32_t idx, float &res)
131{
132 throw resource_unavailable_exception(__FILE__, __LINE__);
133}
134
135void
136antenna::telemetry(tlm t, uint32_t idx, uint32_t &res)
137{
138 throw resource_unavailable_exception(__FILE__, __LINE__);
139}
140
141} // 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
Generic exception indicating an a resource or subsystem is not available at the time that was request...