SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
rf_frontend24.hpp
Go to the documentation of this file.
1/*
2 * SatNOGS-COMMS control library
3 *
4 * Copyright (C) 2022-2023, 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 <rffcx07x.h>
29
30namespace satnogs::comms::lib
31{
32
40{
41public:
42 rf_frontend24_exception(string_type file_name, numeric_type line)
43 : exception(exception::severity::MAJOR, file_name, line,
44 error_msg{"rf_frontend24 exception", "rffe24err", ERFFE24})
45 {
46 }
47};
48
56{
57public:
58 mixer_lock_exception(string_type file_name, numeric_type line)
59 : exception(exception::severity::MAJOR, file_name, line,
60 error_msg{"mixer lock exception", "mixlockerr", EMIXLOCK})
61 {
62 }
63};
64
88{
89public:
108
109 rf_frontend24(const params &init_params, const io_conf &io, power &pwr);
110
111 void
112 enable(bool set = true);
113
114 bool
115 enabled() const;
116
117 void
118 set_direction(dir d, uint64_t lo_freq);
119
120 bool
121 mixer_lock();
122
123private:
124 bsp::chrono &m_chrono;
125 struct rffcx07x m_mixer;
126};
127
129
130} /* namespace satnogs::comms::lib */
Chrono device abstraction.
Definition chrono.hpp:41
DAC device abstraction.
Definition dac.hpp:40
GPIO device abstraction.
Definition gpio.hpp:38
A class representing error messages in the SatNOGS-COMMS system.
Definition exception.hpp:83
severity
Severity levels of exceptions.
Definition exception.hpp:71
@ MAJOR
Failure causing minor mission degradation.
Definition exception.hpp:74
exception(severity sev, const char *file, int lineno, const error_msg &err_msg)
Constructor for the exception class.
mixer_lock_exception(string_type file_name, numeric_type line)
Manages power supplies and monitors subsystem status.
Definition power.hpp:43
IO configuration for controlling the various peripherals of the S-Band frontend.
bsp::gpio & mixer_rst
GPIO for the mixer reset signal.
bsp::gpio & mixer_clk
GPIO for the mixer clock.
bsp::gpio & en_agc
The AGC enable GPIO.
bsp::dac & agc_vset
DAC to control the VGA.
bsp::gpio & mixer_sda
GPIO for the mixer data transfer (bidirectional).
bsp::gpio & flt_sel
Filter selection GPIO.
bsp::gpio & mixer_enx
GPIO for the mixer enable signal (active low).
rf_frontend24_exception(string_type file_name, numeric_type line)
void set_direction(dir d, uint64_t lo_freq)
rf_frontend24(const params &init_params, const io_conf &io, power &pwr)
Construct a new rf frontend24::rf frontend24 object that controls the S-Band RF frontend interface.
bool mixer_lock()
Checks if the RF mixer has acquired a lock.
bool enabled() const
Checks if the S-Band RF frontend is enabled.
RF frontend initialization settings.
rf_frontend(const params &init_params, io_conf &&io, power &pwr)
#define ERFFE24
Error in rf_frontend24.
#define EMIXLOCK
Error in mixer lock.