GNU Radio's SATNOGS Package
config.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
4 *
5 * Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23namespace gr {
24namespace satnogs {
25
26class config
27{
28public:
29 // clang-format off
30 static constexpr short int gnuradio_major = 3;
31 static constexpr short int gnuradio_minor = 10;
32 static constexpr short int gnuradio_patch = 5;
33 static constexpr short int gnuradio_tweak = 1;
34 // clang-format on
35
36 /**
37 * @brief Returns a numerical representation of a given version in the form
38 * major.minor.patch. This can be used to compare easily different versions
39 * @param T an integral type
40 * @param major the major version
41 * @param minor the minor version
42 * @param patch the patch version
43 * @param tweak the tweak version
44 * @return constexpr size_t a numerical representation of a version
45 */
46 template <class T, std::enable_if_t<std::is_integral_v<T>, bool> = true>
47 static constexpr size_t gnuradio_version_num(T major, T minor, T patch, T tweak)
48 {
49 return (static_cast<size_t>(major) << 24) + (static_cast<size_t>(minor) << 16) +
50 (static_cast<size_t>(patch) << 8) + patch;
51 }
52};
53
54} // namespace satnogs
55} // namespace gr
Definition: config.h:27
static constexpr short int gnuradio_major
Definition: config.h:30
static constexpr short int gnuradio_minor
Definition: config.h:31
static constexpr short int gnuradio_patch
Definition: config.h:32
static constexpr short int gnuradio_tweak
Definition: config.h:33
static constexpr size_t gnuradio_version_num(T major, T minor, T patch, T tweak)
Returns a numerical representation of a given version in the form major.minor.patch....
Definition: config.h:47
Definition: amsat_duv_decoder.h:29