GNU Radio's SATNOGS Package
sigmf_metadata_impl.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) 2020, Libre Space Foundation <http://libre.space>
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#ifndef INCLUDE_SATNOGS_SIGMF_METADATA_IMPL_H
22#define INCLUDE_SATNOGS_SIGMF_METADATA_IMPL_H
23
25#include <libsigmf/sigmf.h>
26#include <libsigmf/sigmf_antenna_generated.h>
27#include <libsigmf/sigmf_satnogs_generated.h>
28
29
30namespace gr {
31namespace satnogs {
32
33/*!
34 * \brief <+description+>
35 *
36 */
38{
39public:
40 sigmf_metadata_impl(std::string global_segment_json);
41
43
44 metadata::metadata_sptr make(const std::string& global_segment_json);
45
46 void transform(pmt::pmt_t& m);
47
48 void to_file(const std::string& filename);
49
50
51 const std::string to_sting();
52
53 void append_capture_segment(uint64_t sample_start);
54
55 void append_capture_segment(uint64_t sample_start,
56 uint64_t global_index,
57 double frequency,
58 std::string datetime);
59
60 void append_capture_segment(std::string capture_json);
61
62 void append_annotation_segment(uint64_t sample_start, uint64_t sample_count);
63
64 void append_annotation_segment(uint64_t sample_start,
65 uint64_t sample_count,
66 std::string generator,
67 std::string comment,
68 double freq_lower_edge,
69 double freq_upper_edge);
70
71 void append_annotation_segment(std::string annotation_json);
72
73 void parse_json(std::string filename);
74
75 sigmf::SigMF<sigmf::Global<core::DescrT, antenna::DescrT, ::satnogs::DescrT>,
76 sigmf::Capture<core::DescrT>,
77 sigmf::Annotation<core::DescrT, antenna::DescrT, ::satnogs::DescrT>>&
79
80private:
81 sigmf::SigMF<sigmf::Global<core::DescrT, antenna::DescrT, ::satnogs::DescrT>,
82 sigmf::Capture<core::DescrT>,
83 sigmf::Annotation<core::DescrT, antenna::DescrT, ::satnogs::DescrT>>
84 d_sigmf;
85
86 std::string d_metafile_name;
87 std::string d_metadata_name;
88
89 void initialize_global(const std::string global_segment_json);
90};
91
92} // namespace satnogs
93} // namespace gr
94
95#endif /* INCLUDE_SATNOGS_SIGMF_METADATA_IMPL_H */
#define SATNOGS_API
Definition: api.h:19
<+description+>
Definition: sigmf_metadata_impl.h:38
const std::string to_sting()
void to_file(const std::string &filename)
metadata::metadata_sptr make(const std::string &global_segment_json)
void transform(pmt::pmt_t &m)
void append_annotation_segment(std::string annotation_json)
void append_capture_segment(uint64_t sample_start)
void append_annotation_segment(uint64_t sample_start, uint64_t sample_count)
sigmf::SigMF< sigmf::Global< core::DescrT, antenna::DescrT, ::satnogs::DescrT >, sigmf::Capture< core::DescrT >, sigmf::Annotation< core::DescrT, antenna::DescrT, ::satnogs::DescrT > > & get_sigmf()
void append_capture_segment(uint64_t sample_start, uint64_t global_index, double frequency, std::string datetime)
void append_annotation_segment(uint64_t sample_start, uint64_t sample_count, std::string generator, std::string comment, double freq_lower_edge, double freq_upper_edge)
sigmf_metadata_impl(std::string global_segment_json)
void append_capture_segment(std::string capture_json)
Definition: sigmf_metadata.h:35
Definition: amsat_duv_decoder.h:29