SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
Toggle main menu visibility
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
22
#include <
satnogs-comms-lib/antenna.hpp
>
23
24
namespace
satnogs::comms::lib
25
{
26
34
antenna::antenna
(
const
char
*
name
, uint32_t
nelems
)
35
:
m_name
(
name
),
m_nelems
(
nelems
)
36
{
37
}
38
44
void
45
antenna::enable
(
bool
en)
46
{
47
}
48
55
bool
56
antenna::detect
(uint32_t idx)
57
{
58
return
false
;
59
}
60
67
void
68
antenna::deploy
(uint32_t idx,
bool
en)
69
{
70
}
71
78
void
79
antenna::deploy_backup
(uint32_t idx,
bool
en)
80
{
81
}
82
88
const
char
*
89
antenna::name
()
const
90
{
91
return
m_name
.c_str();
92
}
93
99
uint32_t
100
antenna::nelems
()
const
101
{
102
return
m_nelems
;
103
}
104
105
void
106
antenna::telemetry
(
tlm
t,
float
&res)
107
{
108
throw
resource_unavailable_exception
(__FILE__, __LINE__);
109
}
110
111
void
112
antenna::telemetry
(
tlm
t, uint32_t &res)
113
{
114
throw
resource_unavailable_exception
(__FILE__, __LINE__);
115
}
116
117
void
118
antenna::telemetry
(
tlm
t,
bool
&res)
119
{
120
throw
resource_unavailable_exception
(__FILE__, __LINE__);
121
}
122
123
void
124
antenna::telemetry
(
tlm
t, uint32_t idx,
bool
&res)
125
{
126
throw
resource_unavailable_exception
(__FILE__, __LINE__);
127
}
128
129
void
130
antenna::telemetry
(
tlm
t, uint32_t idx,
float
&res)
131
{
132
throw
resource_unavailable_exception
(__FILE__, __LINE__);
133
}
134
135
void
136
antenna::telemetry
(
tlm
t, uint32_t idx, uint32_t &res)
137
{
138
throw
resource_unavailable_exception
(__FILE__, __LINE__);
139
}
140
141
}
// namespace satnogs::comms::lib
antenna.hpp
satnogs::comms::lib::antenna::deploy
virtual void deploy(uint32_t idx, bool en)
Deploy the antenna.
Definition
antenna.cpp:68
satnogs::comms::lib::antenna::tlm
tlm
Definition
antenna.hpp:49
satnogs::comms::lib::antenna::antenna
antenna(const char *name, uint32_t nelems)
Construct a new generic antenna object.
Definition
antenna.cpp:34
satnogs::comms::lib::antenna::deploy_backup
virtual void deploy_backup(uint32_t idx, bool en)
Deploy the antenna using the backup method if exists.
Definition
antenna.cpp:79
satnogs::comms::lib::antenna::detect
virtual bool detect(uint32_t idx)
Returns antenna deployment status.
Definition
antenna.cpp:56
satnogs::comms::lib::antenna::name
const char * name() const
Retrieves the name of the antenna.
Definition
antenna.cpp:89
satnogs::comms::lib::antenna::telemetry
virtual void telemetry(tlm t, float &res)
Definition
antenna.cpp:106
satnogs::comms::lib::antenna::nelems
uint32_t nelems() const
Retrieves the number of available elements of the antenna.
Definition
antenna.cpp:100
satnogs::comms::lib::antenna::m_nelems
const uint32_t m_nelems
Definition
antenna.hpp:97
satnogs::comms::lib::antenna::enable
virtual void enable(bool en)
Enables or disables the antenna subsystem if required.
Definition
antenna.cpp:45
satnogs::comms::lib::antenna::m_name
const etl::string< 32 > m_name
Definition
antenna.hpp:96
satnogs::comms::lib::resource_unavailable_exception
Generic exception indicating an a resource or subsystem is not available at the time that was request...
Definition
exception.hpp:232
satnogs::comms::lib
Definition
ad8318.hpp:30
libsatnogs-comms
src
antenna.cpp
Generated by
1.17.0