FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
waveform_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-only
2//
3// Copyright (c) 2006-2008 Marc Brooker and Michael Inggs
4// Copyright (c) 2008-present FERS Contributors (see AUTHORS.md).
5//
6// See the GNU GPLv2 LICENSE file in the FERS project root for more information.
7
8/**
9 * @file waveform_factory.h
10 * @brief Interface for loading waveform data into RadarSignal objects.
11 */
12
13#pragma once
14
15#include <memory>
16#include <string>
17
18#include "core/config.h"
19#include "core/sim_id.h"
20
21namespace fers_signal
22{
23 class RadarSignal;
24}
25
26namespace serial
27{
28 /**
29 * @brief Loads a radar waveform from a file and returns a RadarSignal object.
30 *
31 * @param name The name of the radar signal.
32 * @param filename The path to the file containing the waveform data.
33 * @param power The power of the radar signal in the waveform.
34 * @param carrierFreq The carrier frequency of the radar signal.
35 * @return A unique pointer to a RadarSignal object loaded with the waveform data.
36 * @throws std::runtime_error If the file cannot be opened or the file format is unrecognized.
37 */
38 [[nodiscard]] std::unique_ptr<fers_signal::RadarSignal> loadWaveformFromFile(const std::string& name,
39 const std::string& filename,
40 RealType power, RealType carrierFreq,
41 const SimId id = 0);
42}
Global configuration file for the project.
double RealType
Type for real numbers.
Definition config.h:27
std::unique_ptr< RadarSignal > loadWaveformFromFile(const std::string &name, const std::string &filename, const RealType power, const RealType carrierFreq, const SimId id)
Loads a radar waveform from a file and returns a RadarSignal object.
uint64_t SimId
64-bit Unique Simulation ID.
Definition sim_id.h:18