JS8Call-Improved master
Loading...
Searching...
No Matches
js8::SoftCombiner< N > Class Template Reference

Cache and combine repeated LLR frames for the same decode candidate. More...

#include <soft_combiner.h>

Classes

struct  Key
 Lookup key describing a decode candidate. More...
struct  Combined
 Result returned by combine() describing combined LLRs. More...

Public Member Functions

 SoftCombiner ()
 Construct a SoftCombiner with defaults.
 SoftCombiner (bool enabled, bool runSelfTest=true)
 Construct a SoftCombiner with explicit enable flag.
Key makeKey (int mode, float f1, float dt, std::array< float, N > const &llr0, std::array< float, N > const &llr1) const
 Create a Key for a candidate from its parameters and LLRs.
Combined combine (Key const &key, std::array< float, N > const &llr0, std::array< float, N > const &llr1, std::chrono::seconds ttl)
 Attempt to combine incoming LLRs with cached repeats.
void markDecoded (Key const &key)
 Remove cached repeats for a candidate that has been decoded.
void flush (std::chrono::seconds ttl)
 Remove cached entries older than ttl.

Detailed Description

template<std::size_t N>
class js8::SoftCombiner< N >

Cache and combine repeated LLR frames for the same decode candidate.

Uses a coarse freq/dt bin and a small LLR signature as the key; repeated receptions accumulate LLRs to improve decode probability without changing over-the-air behavior. The combiner is templated on the LLR length N so the caller binds it to the decoder's bit count. Typical usage:

  • Call makeKey() to construct a lookup key for a candidate.
  • Call combine() with the candidate's LLRs to accumulate and retrieve combined LLRs and repeat count.

Constructor & Destructor Documentation

◆ SoftCombiner() [1/2]

template<std::size_t N>
js8::SoftCombiner< N >::SoftCombiner ( )
inline

Construct a SoftCombiner with defaults.

The default constructor queries the environment to decide whether soft-combining is enabled.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SoftCombiner() [2/2]

template<std::size_t N>
js8::SoftCombiner< N >::SoftCombiner ( bool enabled,
bool runSelfTest = true )
inlineexplicit

Construct a SoftCombiner with explicit enable flag.

Parameters
enabledWhether combining is active.
runSelfTestIf true, run a self-test when constructing.

Member Function Documentation

◆ combine()

template<std::size_t N>
Combined js8::SoftCombiner< N >::combine ( Key const & key,
std::array< float, N > const & llr0,
std::array< float, N > const & llr1,
std::chrono::seconds ttl )
inline

Attempt to combine incoming LLRs with cached repeats.

Parameters
keyCandidate key constructed by makeKey().
llr0LLR0 values for this reception.
llr1LLR1 values for this reception.
ttlTime-to-live for cached repeats; older entries are flushed.
Returns
Combined describing the output LLRs and repeat count.
Here is the call graph for this function:

◆ flush()

template<std::size_t N>
void js8::SoftCombiner< N >::flush ( std::chrono::seconds ttl)
inline

Remove cached entries older than ttl.

Parameters
ttlTime-to-live; entries not seen within ttl are purged.
Here is the caller graph for this function:

◆ makeKey()

template<std::size_t N>
Key js8::SoftCombiner< N >::makeKey ( int mode,
float f1,
float dt,
std::array< float, N > const & llr0,
std::array< float, N > const & llr1 ) const
inline

Create a Key for a candidate from its parameters and LLRs.

Parameters
modeSubmode/mode index.
f1Frequency estimate (Hz) used to compute a coarse bin.
dtTiming offset (s) used to compute a coarse bin.
llr0LLR0 array for the candidate.
llr1LLR1 array for the candidate.
Returns
Constructed Key with computed signature.

◆ markDecoded()

template<std::size_t N>
void js8::SoftCombiner< N >::markDecoded ( Key const & key)
inline

Remove cached repeats for a candidate that has been decoded.

Parameters
keyCandidate key whose cached entries should be removed.

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