FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
vita49_packetizer.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-only
2//
3// Copyright (c) 2026-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 <cstdint>
10
12
13namespace serial::vita49
14{
16 {
17 public:
18 Vita49Packetizer(std::uint64_t epoch_unix_nanoseconds, RealType adc_fullscale,
20
21 [[nodiscard]] std::uint64_t epochUnixNanoseconds() const noexcept;
22 [[nodiscard]] RealType adcFullscale() const noexcept;
23 [[nodiscard]] std::uint16_t maxUdpPayloadBytes() const noexcept;
24 [[nodiscard]] std::size_t maxComplexSamplesPerPacket() const noexcept;
25
26 [[nodiscard]] PacketizerResult packetize(const core::ReceiverSampleBlock& block, std::uint32_t stream_id,
27 PacketCountSequencer& packet_counts, bool sample_loss_pending) const;
28
30
31 private:
32 std::uint64_t _epoch_unix_nanoseconds = 0;
33 RealType _adc_fullscale = 1.0;
34 std::uint16_t _max_udp_payload_bytes = kDefaultMaxUdpPayloadBytes;
35 std::size_t _max_complex_samples_per_packet = 0;
36 };
37}
PacketizerResult packetize(const core::ReceiverSampleBlock &block, std::uint32_t stream_id, PacketCountSequencer &packet_counts, bool sample_loss_pending) const
SerializedPacket makeContextPacket(const ContextPacket &context) const
RealType adcFullscale() const noexcept
std::uint16_t maxUdpPayloadBytes() const noexcept
std::size_t maxComplexSamplesPerPacket() const noexcept
std::uint64_t epochUnixNanoseconds() const noexcept
double RealType
Type for real numbers.
Definition config.h:27
constexpr std::uint16_t kDefaultMaxUdpPayloadBytes
math::Vec3 max