Skip to content

File sym_hold_private.h

FileList > doppler > dsss_receiver > sym_hold_private.h

Go to the source code of this file

The held-symbols store both continuous DSSS receivers deliver through (#2469): internals, never a caller's API. More...

  • #include "doppler/clib_common.h"
  • #include <assert.h>
  • #include <string.h>

Public Types

Type Name
typedef size_t(* dp_sym_hold_call_fn
A receiver's own call: every symbol it produces from x written toout , at mostmax_out of them.

Public Static Functions

Type Name
size_t dp_sym_hold_steps (float _Complex * hold, size_t * hold_len, size_t hold_cap, float _Complex ** scratch, size_t * scratch_cap, size_t * consumed, size_t bound, dp_sym_hold_call_fn call, void * ctx, const float _Complex * x, size_t x_len, float _Complex * out, size_t max_out)
One steps() call through a receiver's store.

Detailed Description

AsyncDsssReceiver and DsssReceiver each keep a store of fixed capacity, the most one call of a code period can produce, and their steps() is this one function around their own call: held symbols first, then the call's, what does not fit out held for the next call, and the input taken only when nothing stays held and the call's bound fits what is left of out plus the store. One copy, so a fix to the rule lands in both receivers at once.

Public Types Documentation

typedef dp_sym_hold_call_fn

A receiver's own call: every symbol it produces from x written toout , at mostmax_out of them.

typedef size_t(* dp_sym_hold_call_fn) (void *ctx, const float _Complex *x, size_t x_len, float _Complex *out, size_t max_out);


Public Static Functions Documentation

function dp_sym_hold_steps

One steps() call through a receiver's store.

static inline size_t dp_sym_hold_steps (
    float _Complex * hold,
    size_t * hold_len,
    size_t hold_cap,
    float _Complex ** scratch,
    size_t * scratch_cap,
    size_t * consumed,
    size_t bound,
    dp_sym_hold_call_fn call,
    void * ctx,
    const float _Complex * x,
    size_t x_len,
    float _Complex * out,
    size_t max_out
) 

Parameters:

  • hold The store, hold_cap symbols.
  • hold_len Symbols held; updated.
  • hold_cap The store's capacity.
  • scratch The scratch the call produces into, grown on demand.
  • scratch_cap Its capacity; updated.
  • consumed Set to x_len when the input is taken, else 0.
  • bound P(x_len): the most call can produce from x.
  • call The receiver's own call.
  • ctx Handed to call.
  • x Input samples.
  • x_len Their count.
  • out Output symbols.
  • max_out Capacity of out.

Returns:

Symbols written to out: held ones first, then the call's.

The call is handed exactly bound slots in a Release build, so even a wrong bound cannot write past the store: the gate keeps bound <= room + hold_cap, and what is left after out takes its room is at most bound - room. A Debug build hands it one more, so a call that made more than the bound shows, and aborts, instead of stopping at it.



The documentation for this class was generated from the following file native/inc/doppler/dsss_receiver/sym_hold_private.h