msourcecf

Multi-signal source generator object

Public Functions

msourcecf msourcecf_create(unsigned int _M, unsigned int _m, float _as)
msourcecf msourcecf_copy(msourcecf _q)
msourcecf msourcecf_create_default()
int msourcecf_destroy(msourcecf _q)
int msourcecf_print(msourcecf _q)
int msourcecf_reset(msourcecf _q)
typedef int (* msourcecf_callback)(void * _userdata, float complex * _v, unsigned int _n)
int msourcecf_add_user(msourcecf _q, float _fc, float _bw, float _gain, void * _userdata, MSOURCE(_callback) _callback)
int msourcecf_add_tone(msourcecf _q, float _fc, float _bw, float _gain)
int msourcecf_add_chirp(msourcecf _q, float _fc, float _bw, float _gain, float _duration, int _negate, int _repeat)
int msourcecf_add_noise(msourcecf _q, float _fc, float _bw, float _gain)
int msourcecf_add_modem(msourcecf _q, float _fc, float _bw, float _gain, int _ms, unsigned int _m, float _beta)
int msourcecf_add_fsk(msourcecf _q, float _fc, float _bw, float _gain, unsigned int _m, unsigned int _k)
int msourcecf_add_gmsk(msourcecf _q, float _fc, float _bw, float _gain, unsigned int _m, float _bt)
int msourcecf_remove(msourcecf _q, int _id)
int msourcecf_enable(msourcecf _q, int _id)
int msourcecf_disable(msourcecf _q, int _id)
unsigned long long int msourcecf_get_num_samples(msourcecf _q)
int msourcecf_get_num_samples_source(msourcecf _q, int _id, unsigned long int * _num_samples)
int msourcecf_set_gain(msourcecf _q, int _id, float _gain)
int msourcecf_get_gain(msourcecf _q, int _id, float * _gain)
int msourcecf_set_frequency(msourcecf _q, int _id, float _dphi)
int msourcecf_get_frequency(msourcecf _q, int _id, float * _dphi)
int msourcecf_write_samples(msourcecf _q, float complex * _buf, unsigned int _buf_len)

Interfaces

msourcecf msourcecf_create(unsigned int _M, unsigned int _m, float _as)

Create msource object by specifying channelizer parameters

  • _M : number of channels in analysis channelizer object
  • _m : prototype channelizer filter semi-length
  • _as : prototype channelizer filter stop-band suppression (dB)

msourcecf msourcecf_copy(msourcecf _q)

Copy object recursively, including all internal objects and state

msourcecf msourcecf_create_default()

Create default msource object with default parameters: M = 1200, m = 4, as = 60

int msourcecf_destroy(msourcecf _q)

Destroy msource object

int msourcecf_print(msourcecf _q)

Print msource object

int msourcecf_reset(msourcecf _q)

Reset msource object

typedef int (* msourcecf_callback)(void * _userdata, float complex * _v, unsigned int _n)

user-defined callback for generating samples

  • _userdata :
  • _v :
  • _n :

int msourcecf_add_user(msourcecf _q, float _fc, float _bw, float _gain, void * _userdata, MSOURCE(_callback) _callback)

Add user-defined signal generator

  • _q :
  • _fc :
  • _bw :
  • _gain :
  • _userdata :
  • _callback :

int msourcecf_add_tone(msourcecf _q, float _fc, float _bw, float _gain)

Add tone to signal generator, returning id of signal

  • _q :
  • _fc :
  • _bw :
  • _gain :

int msourcecf_add_chirp(msourcecf _q, float _fc, float _bw, float _gain, float _duration, int _negate, int _repeat)

Add chirp to signal generator, returning id of signal

  • _q : multi-signal source object
  • _fc :
  • _bw :
  • _gain :
  • _duration : duration of chirp [samples]
  • _negate : negate frequency direction
  • _repeat :

int msourcecf_add_noise(msourcecf _q, float _fc, float _bw, float _gain)

Add noise source to signal generator, returning id of signal

  • _q : multi-signal source object
  • _fc : ...
  • _bw : ...
  • _gain :

int msourcecf_add_modem(msourcecf _q, float _fc, float _bw, float _gain, int _ms, unsigned int _m, float _beta)

Add modem signal source, returning id of signal

  • _q : multi-signal source object
  • _fc :
  • _bw :
  • _gain :
  • _ms : modulation scheme, e.g. LIQUID_MODEM_QPSK
  • _m : filter delay (symbols), 0 < _m
  • _beta : filter excess bandwidth, 0 < _beta <= 1

int msourcecf_add_fsk(msourcecf _q, float _fc, float _bw, float _gain, unsigned int _m, unsigned int _k)

Add frequency-shift keying modem signal source, returning id of signal

  • _q : multi-signal source object
  • _fc :
  • _bw :
  • _gain :
  • _m : bits per symbol, _bps > 0
  • _k : samples/symbol, 2^_m <= _k

int msourcecf_add_gmsk(msourcecf _q, float _fc, float _bw, float _gain, unsigned int _m, float _bt)

Add GMSK modem signal source, returning id of signal

  • _q : multi-signal source object
  • _fc :
  • _bw :
  • _gain :
  • _m : filter delay (symbols), 0 < _m
  • _bt : filter bandwidth-time factor, 0 < _bt <= 1

int msourcecf_remove(msourcecf _q, int _id)

Remove signal with a particular id, returning 0 upon success

  • _q : multi-signal source object
  • _id : signal source id

int msourcecf_enable(msourcecf _q, int _id)

Enable signal source with a particular id

  • _q :
  • _id :

int msourcecf_disable(msourcecf _q, int _id)

Disable signal source with a particular id

  • _q :
  • _id :

unsigned long long int msourcecf_get_num_samples(msourcecf _q)

Get number of samples generated by the object so far

  • _q : msource object

int msourcecf_get_num_samples_source(msourcecf _q, int _id, unsigned long int * _num_samples)

Get number of samples generated by specific source so far

  • _q : msource object
  • _id : source id
  • _num_samples : pointer to number of samples generated

int msourcecf_set_gain(msourcecf _q, int _id, float _gain)

Set gain in decibels on signal

  • _q : msource object
  • _id : source id
  • _gain : signal gain [dB]

int msourcecf_get_gain(msourcecf _q, int _id, float * _gain)

Get gain in decibels on signal

  • _q : msource object
  • _id : source id
  • _gain : signal gain output [dB]

int msourcecf_set_frequency(msourcecf _q, int _id, float _dphi)

Set carrier offset to signal

  • _q : msource object
  • _id : source id
  • _dphi :

int msourcecf_get_frequency(msourcecf _q, int _id, float * _dphi)

Get carrier offset to signal

  • _q : msource object
  • _id : source id
  • _dphi :

int msourcecf_write_samples(msourcecf _q, float complex * _buf, unsigned int _buf_len)

Write block of samples to output buffer

  • _q : synchronizer object
  • _buf : output buffer, shape: (_buf_len, 1)
  • _buf_len : output buffer size