AHP® XC Correlators API
AHP XC Correlators
Loading...
Searching...
No Matches
Functions

Functions

DLL_EXPORT ahp_xc_packetahp_xc_alloc_packet (void)
 Allocate and return a packet structure.
 
DLL_EXPORT ahp_xc_packetahp_xc_copy_packet (ahp_xc_packet *packet)
 Allocate and return a copy of a packet structure.
 
DLL_EXPORT void ahp_xc_free_packet (ahp_xc_packet *packet)
 Free a previously allocated packet structure.
 
DLL_EXPORT ahp_xc_sampleahp_xc_alloc_samples (uint64_t nlines, size_t size)
 Allocate and return a samples array.
 
DLL_EXPORT ahp_xc_sampleahp_xc_copy_samples (ahp_xc_sample *src, uint64_t nlines, size_t size)
 Allocate and return a copy of the passed samples array.
 
DLL_EXPORT void ahp_xc_free_samples (uint64_t nlines, ahp_xc_sample *samples)
 Free a previously allocated samples array.
 
DLL_EXPORT int32_t ahp_xc_get_packet (ahp_xc_packet *packet)
 Grab a data packet.
 
DLL_EXPORT void ahp_xc_start_autocorrelation_scan (uint32_t index, off_t start, size_t size, size_t step)
 Initiate an autocorrelation scan.
 
DLL_EXPORT void ahp_xc_end_autocorrelation_scan (uint32_t index)
 End an autocorrelation scan.
 
DLL_EXPORT int32_t ahp_xc_scan_autocorrelations (uint32_t nlines, uint32_t *indexes, ahp_xc_sample **autocorrelations, off_t *starts, size_t *sizes, size_t *steps, int32_t *interrupt, double *percent)
 Scan all available delay channels and get autocorrelations of each input.
 
DLL_EXPORT void ahp_xc_start_crosscorrelation_scan (uint32_t index, off_t start, size_t size, size_t step)
 Initiate a crosscorrelation scan.
 
DLL_EXPORT void ahp_xc_end_crosscorrelation_scan (uint32_t index)
 End a crosscorrelation scan.
 
DLL_EXPORT int32_t ahp_xc_scan_crosscorrelations (uint32_t index1, uint32_t index2, ahp_xc_sample **crosscorrelations, off_t start1, size_t size1, off_t start2, size_t size2, size_t step, int32_t *interrupt, double *percent)
 Scan all available delay channels and get crosscorrelations of each input with others.
 

Detailed Description

Function Documentation

◆ ahp_xc_alloc_packet()

DLL_EXPORT ahp_xc_packet * ahp_xc_alloc_packet ( void  )
Returns
Returns a new ahp_xc_packet structure pointer

◆ ahp_xc_alloc_samples()

DLL_EXPORT ahp_xc_sample * ahp_xc_alloc_samples ( uint64_t  nlines,
size_t  size 
)
Parameters
nlinesThe Number of samples to be allocated.
lenThe lag_size and correlations field size of each sample.
Returns
Returns the new allocated ahp_xc_sample array
See also
ahp_xc_free_samples
ahp_xc_copy_samples
ahp_xc_sample
ahp_xc_packet

◆ ahp_xc_copy_packet()

DLL_EXPORT ahp_xc_packet * ahp_xc_copy_packet ( ahp_xc_packet packet)
Returns
Returns a new ahp_xc_packet structure pointer

◆ ahp_xc_copy_samples()

DLL_EXPORT ahp_xc_sample * ahp_xc_copy_samples ( ahp_xc_sample src,
uint64_t  nlines,
size_t  size 
)
Parameters
srcThe source samples array.
nlinesThe Number of samples to be allocated.
lenThe lag_size and correlations field size of each sample.
Returns
Returns the ahp_xc_sample array copy of src
See also
ahp_xc_alloc_samples
ahp_xc_free_samples
ahp_xc_sample
ahp_xc_packet

◆ ahp_xc_end_autocorrelation_scan()

DLL_EXPORT void ahp_xc_end_autocorrelation_scan ( uint32_t  index)
Parameters
indexThe line index.

◆ ahp_xc_end_crosscorrelation_scan()

DLL_EXPORT void ahp_xc_end_crosscorrelation_scan ( uint32_t  index)
Parameters
indexThe line index.

◆ ahp_xc_free_packet()

DLL_EXPORT void ahp_xc_free_packet ( ahp_xc_packet packet)
Parameters
packetpointer to the ahp_xc_packet structure to be freed

◆ ahp_xc_free_samples()

DLL_EXPORT void ahp_xc_free_samples ( uint64_t  nlines,
ahp_xc_sample samples 
)
Parameters
nlinesThe Number of samples to be allocated.
samplesthe ahp_xc_sample array to be freed
See also
ahp_xc_alloc_samples
ahp_xc_copy_samples
ahp_xc_sample
ahp_xc_packet

◆ ahp_xc_get_packet()

DLL_EXPORT int32_t ahp_xc_get_packet ( ahp_xc_packet packet)
Parameters
packetThe ahp_xc_packet structure to be filled.
Returns
Returns non-zero on error
See also
ahp_xc_set_channel_auto
ahp_xc_set_channel_cross
ahp_xc_alloc_packet
ahp_xc_free_packet
ahp_xc_packet

◆ ahp_xc_scan_autocorrelations()

DLL_EXPORT int32_t ahp_xc_scan_autocorrelations ( uint32_t  nlines,
uint32_t *  indexes,
ahp_xc_sample **  autocorrelations,
off_t *  starts,
size_t *  sizes,
size_t *  steps,
int32_t *  interrupt,
double *  percent 
)
Parameters
nlinesthe number of inputs for this scan.
indexesthe input indexes list.
autocorrelationsAn ahp_xc_sample array pointer, can be NULL. Will be allocated by reference and filled by this function.
startsFirst channel to be scanned list.
sizesNumber of channels to be scanned list.
stepsThe scan steps in channels.
interruptThis should point32_t to an int32_t variable, when setting to 1, on a separate thread, scanning will be interrupted.
percentLike interrupt a variable, passed by reference that will be updated with the percent of completion.
Returns
Returns the number of channels scanned
See also
ahp_xc_get_delaysize
ahp_xc_sample

◆ ahp_xc_scan_crosscorrelations()

DLL_EXPORT int32_t ahp_xc_scan_crosscorrelations ( uint32_t  index1,
uint32_t  index2,
ahp_xc_sample **  crosscorrelations,
off_t  start1,
size_t  size1,
off_t  start2,
size_t  size2,
size_t  step,
int32_t *  interrupt,
double *  percent 
)
Parameters
index1the first input index.
index2the second input index.
crosscorrelationsAn ahp_xc_sample array pointer, can be NULL. Will be allocated by reference and filled by this function.
start1Initial channel on index1 input.
size1Number of channels to scan on index1 input.
start2Initial channel on index2 input.
size2Number of channels to scan on index2 input.
stepThe scan step in channels.
interruptThis should point32_t to an int32_t variable, when setting to 1, on a separate thread, scanning will be interrupted.
percentLike interrupt a variable, passed by reference that will be updated with the percent of completion.
Returns
Returns the number of channels scanned
See also
ahp_xc_get_delaysize
ahp_xc_sample

◆ ahp_xc_start_autocorrelation_scan()

DLL_EXPORT void ahp_xc_start_autocorrelation_scan ( uint32_t  index,
off_t  start,
size_t  size,
size_t  step 
)
Parameters
indexThe line index.
startThe starting channel for this scan.
sizeThe number of channels to scan afterwards.
stepThe scan step in channels.

◆ ahp_xc_start_crosscorrelation_scan()

DLL_EXPORT void ahp_xc_start_crosscorrelation_scan ( uint32_t  index,
off_t  start,
size_t  size,
size_t  step 
)
Parameters
indexThe line index.
startthe starting channel for this scan.
sizeThe number of channels to scan afterwards.
stepThe scan step in channels.