FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
serial::Response Class Reference

Manages radar signal responses from a transmitter. More...

#include "response.h"

Public Member Functions

 Response (const fers_signal::RadarSignal *wave, const radar::Transmitter *transmitter) noexcept
 Constructor for the Response class.
 
 ~Response ()=default
 
 Response (const Response &)=delete
 
Responseoperator= (const Response &)=delete
 
 Response (Response &&)=delete
 
Responseoperator= (Response &&)=delete
 
RealType startTime () const noexcept
 Retrieves the start time of the response.
 
RealType endTime () const noexcept
 Retrieves the end time of the response.
 
void addInterpPoint (const interp::InterpPoint &point)
 Adds an interpolation point to the response.
 
std::vector< ComplexTyperenderBinary (RealType &rate, unsigned &size, RealType fracWinDelay) const
 Renders the response in binary format.
 
RealType getLength () const noexcept
 Retrieves the length of the response.
 
SimId getTransmitterId () const noexcept
 Retrieves the ID of the associated transmitter.
 

Detailed Description

Manages radar signal responses from a transmitter.

Definition at line 40 of file response.h.

Constructor & Destructor Documentation

◆ Response() [1/3]

serial::Response::Response ( const fers_signal::RadarSignal wave,
const radar::Transmitter transmitter 
)
noexcept

Constructor for the Response class.

Parameters
wavePointer to the radar signal object.
transmitterPointer to the transmitter object.

Definition at line 49 of file response.h.

49 :
50 _transmitter(transmitter), _wave(wave)
51 {
52 }

◆ ~Response()

serial::Response::~Response ( )
default

◆ Response() [2/3]

serial::Response::Response ( const Response )
delete

◆ Response() [3/3]

serial::Response::Response ( Response &&  )
delete

Member Function Documentation

◆ addInterpPoint()

void serial::Response::addInterpPoint ( const interp::InterpPoint point)

Adds an interpolation point to the response.

Parameters
pointThe interpolation point to be added.
Exceptions
std::logic_errorIf the new point has a time earlier than the last point.

Definition at line 27 of file response.cpp.

27{ _points.push_back(point); }

◆ endTime()

RealType serial::Response::endTime ( ) const
noexcept

Retrieves the end time of the response.

Returns
End time as a RealType. Returns 0.0 if no points are present.

Definition at line 72 of file response.h.

72{ return _points.empty() ? 0.0 : _points.back().time; }

Referenced by getLength().

+ Here is the caller graph for this function:

◆ getLength()

RealType serial::Response::getLength ( ) const
noexcept

Retrieves the length of the response.

Returns
The length of the response as a RealType.

Definition at line 97 of file response.h.

97{ return endTime() - startTime(); }
RealType startTime() const noexcept
Retrieves the start time of the response.
Definition response.h:65
RealType endTime() const noexcept
Retrieves the end time of the response.
Definition response.h:72

References endTime(), and startTime().

+ Here is the call graph for this function:

◆ getTransmitterId()

SimId serial::Response::getTransmitterId ( ) const
noexcept

Retrieves the ID of the associated transmitter.

Returns
The transmitter SimId.

Definition at line 25 of file response.cpp.

25{ return _transmitter->getId(); }
SimId getId() const noexcept
Retrieves the unique ID of the transmitter.
Definition transmitter.h:78

References radar::Transmitter::getId().

+ Here is the call graph for this function:

◆ operator=() [1/2]

Response & serial::Response::operator= ( const Response )
delete

◆ operator=() [2/2]

Response & serial::Response::operator= ( Response &&  )
delete

◆ renderBinary()

std::vector< ComplexType > serial::Response::renderBinary ( RealType rate,
unsigned &  size,
RealType  fracWinDelay 
) const

Renders the response in binary format.

Parameters
rateOutput parameter for the signal rate.
sizeOutput parameter for the size of the binary data.
fracWinDelayDelay factor applied during windowing.
Returns
A vector of ComplexType representing the binary data.

Definition at line 29 of file response.cpp.

30 {
31 rate = _wave->getRate();
32 return _wave->render(_points, size, fracWinDelay);
33 }
RealType getRate() const noexcept
Gets the sample rate of the radar signal.
std::vector< ComplexType > render(const std::vector< interp::InterpPoint > &points, unsigned &size, RealType fracWinDelay) const
Renders the radar signal.
RealType rate() noexcept
Get the rendering sample rate.
Definition parameters.h:121

References fers_signal::RadarSignal::getRate(), and fers_signal::RadarSignal::render().

+ Here is the call graph for this function:

◆ startTime()

RealType serial::Response::startTime ( ) const
noexcept

Retrieves the start time of the response.

Returns
Start time as a RealType. Returns 0.0 if no points are present.

Definition at line 65 of file response.h.

65{ return _points.empty() ? 0.0 : _points.front().time; }

Referenced by getLength().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: