File ratesync_private.h¶
FileList > doppler > ratesync > ratesync_private.h
Go to the source code of this file
Where the terminal stage's next output reads the input. More...
#include "doppler/ratesync/ratesync_core.h"
Public Functions¶
| Type | Name |
|---|---|
| int | dp_ratesync_acquire_block (dp_timing_est_state_t * est, size_t symbols, double quality, int * run, uint64_t * origin, uint64_t index, float _Complex x, double * eye) One input to a feedforward acquisition's block, and the eye when a block passes. |
| int | dp_ratesync_loop_seed_eye (ratesync_loop_t * l, double decim, double t_next, double eye, double rate, int set_rate) Seed the loop from an eye center on the owner's input timeline. |
Public Static Functions¶
| Type | Name |
|---|---|
| double | dp_ratesync_loop_next_read (const ratesync_loop_t * l, double decim, uint64_t term_in, double delay) The input instant, on the owner's input timeline, that the terminal stage's next output reads. |
| double | dp_ratesync_next_read (const dp_ratesync_state_t * s) |
Detailed Description¶
Not part of the public API. dp_ratesync_seed() places an output by this mapping, and the harnesses that measure an output's timing error read it back (native/tests/ratesync/ratesync_settle_test.h), so there is one statement of it and a change to it moves both.
The estimator seed's loop-level pieces live here too: the eye-to-seed conversion and the acquisition's block, which every owner of the shared loop (RateSync, MpskReceiver) runs by the same code. No caller outside the library needs them; a _private.h is not exported, and an owner in another module reaches it through the static archive, as async_dsss_pool reaches async_dsss_receiver_private.h.
Public Functions Documentation¶
function dp_ratesync_acquire_block¶
One input to a feedforward acquisition's block, and the eye when a block passes.
int dp_ratesync_acquire_block (
dp_timing_est_state_t * est,
size_t symbols,
double quality,
int * run,
uint64_t * origin,
uint64_t index,
float _Complex x,
double * eye
)
The block logic every owner of the loop runs while it acquires: the first input of an acquisition (*run 0) resets the estimator and marks its index as the block's origin, so the estimate's eye counts from there; a block of symbols symbols (at the estimator's TIMING_EST_MATCHED_SPS) is closed, and one whose quality is at or above quality returns its eye on the owner's timeline. A block that does not pass is dropped and the next one starts on the next input. Seeding from the eye (dp_ratesync_loop_seed_eye()) ends the acquisition, and the owner clears *run then.
Parameters:
estA matched estimator (dp_timing_est_create_matched()).symbolsSymbols a block estimates over, > 0.qualityThe pass figure, in (0, 1).runThe owner's acquisition flag, kept in its state.originThe owner's block origin, kept in its state.indexThis input's index on the owner's timeline.xThe input.eyeReceives the eye when the return is 1.
Returns:
1 when this input closed a block that passed, else 0.
function dp_ratesync_loop_seed_eye¶
Seed the loop from an eye center on the owner's input timeline.
int dp_ratesync_loop_seed_eye (
ratesync_loop_t * l,
double decim,
double t_next,
double eye,
double rate,
int set_rate
)
The one conversion from an eye (an instant where a symbol is to be read; any whole number of symbols either side will do, past or future) to dp_ratesync_loop_seed()'s ahead: the distance from the next output's read instant t_next (dp_ratesync_loop_next_read()) to the next eye at or after it, wrapped into one symbol, in output periods at the rate the loop will hold, decim / (R (1 + integ)) inputs each.
Parameters:
lA loop bound to its cascade.decimThe owner's inputs to one terminal-stage input.t_nextdp_ratesync_loop_next_read() now.eyeAn eye center, in the owner's inputs.rateAs dp_ratesync_loop_seed().set_rateAs dp_ratesync_loop_seed().
Returns:
DP_OK, or DP_ERR_INVALID with nothing changed: a non-finite eye, a loop with no cascade bound, a rate out of range.
Public Static Functions Documentation¶
function dp_ratesync_loop_next_read¶
The input instant, on the owner's input timeline, that the terminal stage's next output reads.
static inline double dp_ratesync_loop_next_read (
const ratesync_loop_t * l,
double decim,
uint64_t term_in,
double delay
)
The inputs the stage has been handed (term_in) and its accumulator's lead (dp_resamp_get_ctrl_lead()) say where on the stage's own timeline; decim, the owner's inputs to one terminal-stage input, scales that to the owner's inputs; the cascade's group delay (delay, in those inputs, dp_RateConverter_get_group_delay()) is what an output lags its input by. Unsteered it is outputs / rate - delay; steered, the count of outputs no longer says and the accumulator still does. Every owner of the loop places a seed by this one statement (RateSync's dp_ratesync_next_read() is it on RateSync's fields).
Parameters:
lA loop bound to its cascade (termnon-NULL).decimThe owner's inputs to one terminal-stage input.term_inInputs the terminal stage has been handed.delayThe cascade's group delay, in the owner's inputs.
Returns:
The instant, in the owner's inputs since its create or reset.
function dp_ratesync_next_read¶
The documentation for this class was generated from the following file native/inc/doppler/ratesync/ratesync_private.h