SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
Toggle main menu visibility
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>
25
#include <
satnogs-comms-lib/ad8318.hpp
>
26
#include <
satnogs-comms-lib/f2972.hpp
>
27
#include <
satnogs-comms-lib/lna.hpp
>
28
#include <
satnogs-comms-lib/rf_frontend.hpp
>
29
30
namespace
satnogs::comms::lib
31
{
32
39
class
rf_frontend24_exception
:
public
exception
40
{
41
public
:
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
55
class
mixer_lock_exception
:
public
exception
56
{
57
public
:
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
87
class
rf_frontend24
:
public
rf_frontend
88
{
89
public
:
95
class
io_conf
96
{
97
public
:
98
bsp::gpio
&
en_agc
;
99
bsp::dac
&
agc_vset
;
100
bsp::gpio
&
flt_sel
;
101
bsp::gpio
&
mixer_clk
;
102
bsp::gpio
&
mixer_rst
;
103
bsp::gpio
&
mixer_enx
;
104
bsp::gpio
&
mixer_sda
;
105
bsp::chrono
&
chrono
;
107
};
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
123
private
:
124
bsp::chrono
&m_chrono;
125
struct
rffcx07x m_mixer;
126
};
127
129
130
}
/* namespace satnogs::comms::lib */
ad8318.hpp
satnogs::comms::io
Definition
io.hpp:47
satnogs::comms::lib::bsp::chrono
Chrono device abstraction.
Definition
chrono.hpp:41
satnogs::comms::lib::bsp::dac
DAC device abstraction.
Definition
dac.hpp:40
satnogs::comms::lib::bsp::gpio
GPIO device abstraction.
Definition
gpio.hpp:38
satnogs::comms::lib::exception::error_msg
A class representing error messages in the SatNOGS-COMMS system.
Definition
exception.hpp:83
satnogs::comms::lib::exception::severity
severity
Severity levels of exceptions.
Definition
exception.hpp:71
satnogs::comms::lib::exception::severity::MAJOR
@ MAJOR
Failure causing minor mission degradation.
Definition
exception.hpp:74
satnogs::comms::lib::exception::exception
exception(severity sev, const char *file, int lineno, const error_msg &err_msg)
Constructor for the exception class.
Definition
exception.hpp:102
satnogs::comms::lib::mixer_lock_exception::mixer_lock_exception
mixer_lock_exception(string_type file_name, numeric_type line)
Definition
rf_frontend24.hpp:58
satnogs::comms::lib::power
Manages power supplies and monitors subsystem status.
Definition
power.hpp:43
satnogs::comms::lib::rf_frontend24::io_conf
IO configuration for controlling the various peripherals of the S-Band frontend.
Definition
rf_frontend24.hpp:96
satnogs::comms::lib::rf_frontend24::io_conf::mixer_rst
bsp::gpio & mixer_rst
GPIO for the mixer reset signal.
Definition
rf_frontend24.hpp:102
satnogs::comms::lib::rf_frontend24::io_conf::mixer_clk
bsp::gpio & mixer_clk
GPIO for the mixer clock.
Definition
rf_frontend24.hpp:101
satnogs::comms::lib::rf_frontend24::io_conf::en_agc
bsp::gpio & en_agc
The AGC enable GPIO.
Definition
rf_frontend24.hpp:98
satnogs::comms::lib::rf_frontend24::io_conf::chrono
bsp::chrono & chrono
Definition
rf_frontend24.hpp:105
satnogs::comms::lib::rf_frontend24::io_conf::agc_vset
bsp::dac & agc_vset
DAC to control the VGA.
Definition
rf_frontend24.hpp:99
satnogs::comms::lib::rf_frontend24::io_conf::mixer_sda
bsp::gpio & mixer_sda
GPIO for the mixer data transfer (bidirectional).
Definition
rf_frontend24.hpp:104
satnogs::comms::lib::rf_frontend24::io_conf::flt_sel
bsp::gpio & flt_sel
Filter selection GPIO.
Definition
rf_frontend24.hpp:100
satnogs::comms::lib::rf_frontend24::io_conf::mixer_enx
bsp::gpio & mixer_enx
GPIO for the mixer enable signal (active low).
Definition
rf_frontend24.hpp:103
satnogs::comms::lib::rf_frontend24_exception::rf_frontend24_exception
rf_frontend24_exception(string_type file_name, numeric_type line)
Definition
rf_frontend24.hpp:42
satnogs::comms::lib::rf_frontend24::set_direction
void set_direction(dir d, uint64_t lo_freq)
Definition
rf_frontend24.cpp:194
satnogs::comms::lib::rf_frontend24::rf_frontend24
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.
Definition
rf_frontend24.cpp:132
satnogs::comms::lib::rf_frontend24::mixer_lock
bool mixer_lock()
Checks if the RF mixer has acquired a lock.
Definition
rf_frontend24.cpp:247
satnogs::comms::lib::rf_frontend24::enable
void enable(bool set=true)
Definition
rf_frontend24.cpp:156
satnogs::comms::lib::rf_frontend24::enabled
bool enabled() const
Checks if the S-Band RF frontend is enabled.
Definition
rf_frontend24.cpp:182
satnogs::comms::lib::rf_frontend::params
RF frontend initialization settings.
Definition
rf_frontend.hpp:50
satnogs::comms::lib::rf_frontend::rf_frontend
rf_frontend(const params &init_params, io_conf &&io, power &pwr)
Definition
rf_frontend.cpp:28
satnogs::comms::lib::rf_frontend::dir
dir
Definition
rf_frontend.hpp:83
ERFFE24
#define ERFFE24
Error in rf_frontend24.
Definition
errno_extended.hpp:47
EMIXLOCK
#define EMIXLOCK
Error in mixer lock.
Definition
errno_extended.hpp:48
f2972.hpp
lna.hpp
satnogs::comms::lib
Definition
ad8318.hpp:30
rf_frontend.hpp
libsatnogs-comms
include
satnogs-comms-lib
rf_frontend24.hpp
Generated by
1.17.0