GNU Radio's DSD Package
p25p1_ldu.h
Go to the documentation of this file.
1 
2 #ifndef P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133
3 #define P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133
4 
5 #include "dsd.h"
6 
7 #include "p25p1_hdu.h"
8 #include "p25p1_const.h"
9 #include "p25p1_heuristics.h"
10 
11 /**
12  * Separate imbe frames and deinterleave.
13  * This important methods read the IMBE data from the stream and passes it to the vocoder to produce audio.
14  * \param opts The DSD options.
15  * \param state The DSD state.
16  * \status_count An index that allows us to skip the status words interleaved every 36 dibit in the data
17  * stream.
18  */
19 void process_IMBE (dsd_opts* opts, dsd_state* state, int* status_count);
20 
21 /**
22  * Reads an hex word, its parity bits and attempts to error correct it using the Hamming FEC.
23  * \param opts The DSD options.
24  * \param state The DSD state.
25  * \param hex Pointer where to store the read hex word. Six bytes, one per bit.
26  * \param status_count An index that allows us to skip the status words interleaved every 36 dibit in the data
27  * stream.
28  * \param analog_singal_array Pointer to a sequence of AnalogSignal elements.
29  * \param analog_signal_index The current index in the analog_singal_array. This value is increased on each
30  * dibit read.
31  */
32 void read_and_correct_hex_word (dsd_opts* opts, dsd_state* state, char* hex, int* status_count,
33  AnalogSignal* analog_signal_array, int* analog_signal_index);
34 
35 /**
36  * Correct the information in analog_signal_array according with the content of data, which has been
37  * error corrected and should be valid.
38  * \param Dibits that have already been error corrected and we trust are correct.
39  * \count Number of dibits.
40  * \param analog_signal_array Pointer to a sequence of AnalogSignal elements, as many as the value of count.
41  */
42 void correct_hamming_dibits(char* hex_data, int hex_count, AnalogSignal* analog_signal_array);
43 
44 /**
45  * Logs some debug info.
46  */
47 void debug_ldu_header(dsd_state* state);
48 
49 #endif // P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133
Definition: dsd.h:128
void process_IMBE(dsd_opts *opts, dsd_state *state, int *status_count)
void read_and_correct_hex_word(dsd_opts *opts, dsd_state *state, char *hex, int *status_count, AnalogSignal *analog_signal_array, int *analog_signal_index)
Definition: p25p1_heuristics.h:23
void correct_hamming_dibits(char *hex_data, int hex_count, AnalogSignal *analog_signal_array)
Definition: dsd.h:61