FERS
1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
schedule_period.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-only
2
//
3
// Copyright (c) 2025-present FERS Contributors (see AUTHORS.md).
4
//
5
// See the GNU GPLv2 LICENSE file in the FERS project root for more information.
6
7
#pragma once
8
9
#include <string>
10
#include <vector>
11
12
#include "
core/config.h
"
13
14
namespace
radar
15
{
16
/**
17
* @struct SchedulePeriod
18
* @brief Represents a time period during which the transmitter is active.
19
*/
20
struct
SchedulePeriod
21
{
22
RealType
start
{};
23
RealType
end
{};
24
};
25
26
/**
27
* @brief Processes a raw list of schedule periods.
28
*
29
* This function performs the following operations:
30
* 1. Filters invalid periods (start >= end).
31
* 2. Filters periods completely outside simulation bounds.
32
* 3. Sorts periods by start time.
33
* 4. Merges overlapping or adjacent periods.
34
* 5. Checks against PRI constraints (if pulsed).
35
*
36
* @param periods The raw vector of periods.
37
* @param ownerName The name of the object owning this schedule (for logging).
38
* @param isPulsed Whether the object is operating in pulsed mode.
39
* @param pri The Pulse Repetition Interval (only used if isPulsed is true).
40
* @return A sorted, merged, and validated vector of periods.
41
*/
42
std::vector<SchedulePeriod>
processRawSchedule
(std::vector<SchedulePeriod> periods,
const
std::string& ownerName,
43
bool
isPulsed,
RealType
pri);
44
}
config.h
Global configuration file for the project.
RealType
double RealType
Type for real numbers.
Definition
config.h:27
radar
Definition
sim_events.h:17
radar::processRawSchedule
std::vector< SchedulePeriod > processRawSchedule(std::vector< SchedulePeriod > periods, const std::string &ownerName, const bool isPulsed, const RealType pri)
Processes a raw list of schedule periods.
Definition
schedule_period.cpp:17
radar::SchedulePeriod
Represents a time period during which the transmitter is active.
Definition
schedule_period.h:21
radar::SchedulePeriod::start
RealType start
Definition
schedule_period.h:22
radar::SchedulePeriod::end
RealType end
Definition
schedule_period.h:23
packages
libfers
src
radar
schedule_period.h
Generated by
1.9.8