SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
Toggle main menu visibility
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>
25
#include <
satnogs-comms-lib/bsp/chrono.hpp
>
26
#include <
satnogs-comms-lib/bsp/gpio.hpp
>
27
#include <
satnogs-comms-lib/bsp/i2c.hpp
>
28
#include <
satnogs-comms-lib/exception.hpp
>
29
#include <
satnogs-comms-lib/radio.hpp
>
30
31
namespace
satnogs::comms::lib
32
{
33
45
class
antenna
46
{
47
public
:
48
enum class
tlm
: uint8_t
49
{
50
DEPLOYED
,
51
UPTIME
,
52
TEMPERATURE
,
53
VOLTAGE
,
54
CURRENT
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
95
protected
:
96
const
etl::string<32>
m_name
;
97
const
uint32_t
m_nelems
;
98
};
99
101
102
}
// namespace satnogs::comms::lib
chrono.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::tlm::UPTIME
@ UPTIME
Definition
antenna.hpp:51
satnogs::comms::lib::antenna::tlm::DEPLOYED
@ DEPLOYED
Definition
antenna.hpp:50
satnogs::comms::lib::antenna::tlm::CURRENT
@ CURRENT
Definition
antenna.hpp:54
satnogs::comms::lib::antenna::tlm::TEMPERATURE
@ TEMPERATURE
Definition
antenna.hpp:52
satnogs::comms::lib::antenna::tlm::VOLTAGE
@ VOLTAGE
Definition
antenna.hpp:53
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
exception.hpp
gpio.hpp
i2c.hpp
satnogs::comms::lib
Definition
ad8318.hpp:30
radio.hpp
libsatnogs-comms
include
satnogs-comms-lib
antenna.hpp
Generated by
1.17.0