GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
sensor_data_source.h
Go to the documentation of this file.
1/*!
2 * \file sensor_data_source.h
3 * \brief GNURadio block that adds extra data to the sample stream.
4 * \author Victor Castillo, 2024. victorcastilloaguero(at)gmail.com
5 *
6 * -----------------------------------------------------------------------------
7 *
8 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9 * This file is part of GNSS-SDR.
10 *
11 * Copyright (C) 2024-2025 (see AUTHORS file for a list of contributors)
12 * SPDX-License-Identifier: GPL-3.0-or-later
13 *
14 * -----------------------------------------------------------------------------
15 */
16
17
18#ifndef GNSS_SDR_SENSOR_DATA_SOURCE_H
19#define GNSS_SDR_SENSOR_DATA_SOURCE_H
20
24#include <gnuradio/sync_block.h> // for sync_block
25#include <gnuradio/types.h> // for gr_vector_const_void_star
26#include <cstddef> // for size_t
27
28/** \addtogroup Algorithms_Library
29 * \{ */
30/** \addtogroup Algorithm_libs algorithms_libs
31 * \{ */
32
33class SensorDataSource : public gr::sync_block
34{
35public:
36 using sptr = gnss_shared_ptr<SensorDataSource>;
37
38 SensorDataSource(
39 const SensorDataSourceConfiguration& configuration,
40 const gr::io_signature::sptr& io_signature);
41
42 int work(int noutput_items,
43 gr_vector_const_void_star& input_items,
44 gr_vector_void_star& output_items) override;
45
46private:
47 std::unordered_map<SensorDataFile::id_type, SensorDataFile::sptr> sensor_data_files_;
48 std::unordered_map<SensorDataFile::id_type, std::vector<SensorDataConfiguration>> sensor_config_map_;
49 std::size_t item_size_;
50 std::size_t items_per_sample_;
51};
52
53/** \} */
54/** \} */
55#endif // GNSS_SDR_SENSOR_DATA_SOURCE_H
This interface represents a GNSS block.
Provides a simple abstraction for reading contiguous binary data from a file.