diff options
author | tracierenea <tracie.perez@mavs.uta.edu> | 2014-07-12 11:37:22 -0500 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2015-10-15 10:40:22 -0400 |
commit | 68bcd7305b51a6aa8bfdc0220da3b5ec9c2763a7 (patch) | |
tree | cfce98b848758dc42dc016bf78e5f6481077fba1 /gr-fec/lib/ldpc_par_chk_mtrx.cc | |
parent | bbaa0294e50f2aab02b6413f7e2f17a23fca81b2 (diff) |
fec: LDPC: Adding 3 LDPC-related xml files for GRC.
Also changed constructor for ldpc_par_chk_mtrx to take a filename
string instead of pointer, because I think works better for GRC?
Tried adding these blocks to the example flowgraph ber_curve_gen, and
it runs, but the QT QUI Bercurve sink just displays a plot with points
at 0,0. Still troubleshooting that...
Diffstat (limited to 'gr-fec/lib/ldpc_par_chk_mtrx.cc')
-rw-r--r-- | gr-fec/lib/ldpc_par_chk_mtrx.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gr-fec/lib/ldpc_par_chk_mtrx.cc b/gr-fec/lib/ldpc_par_chk_mtrx.cc index 3045b15611..56c14d6d0c 100644 --- a/gr-fec/lib/ldpc_par_chk_mtrx.cc +++ b/gr-fec/lib/ldpc_par_chk_mtrx.cc @@ -32,9 +32,9 @@ namespace gr { namespace fec { namespace code { - ldpc_par_chk_mtrx::ldpc_par_chk_mtrx(const std::string &filename, unsigned int gap) + ldpc_par_chk_mtrx::ldpc_par_chk_mtrx(const std::string filename, unsigned int gap) { - read_matrix_from_file(&filename); + read_matrix_from_file(filename); d_gap = gap; set_parameters_for_encoding(); } // Constructor @@ -110,7 +110,7 @@ namespace gr { } void - ldpc_par_chk_mtrx::read_matrix_from_file(const std::string *alist_file) + ldpc_par_chk_mtrx::read_matrix_from_file(const std::string filename) { /* This function reads in an alist file and creates the corresponding parity check matrix. The format of alist @@ -120,10 +120,10 @@ namespace gr { std::ifstream inputFile; // Open the alist file (needs a C-string) - inputFile.open((*alist_file).c_str()); + inputFile.open((filename).c_str()); if (!inputFile) { std::cout << "There was a problem opening file " - << *alist_file << " for reading.\n"; + << filename << " for reading.\n"; exit(1); } |