From 2b96ec82f5971f658426450301d77a80deee67e2 Mon Sep 17 00:00:00 2001 From: lofaldli Date: Wed, 15 Jun 2016 15:00:35 +0200 Subject: [PATCH] update licence info --- include/ccsds/ccsds_decoder.h | 2 +- include/ccsds/ccsds_encoder.h | 2 +- lib/ccsds.h | 21 +++++++++++++++++++ lib/ccsds_decoder_impl.cc | 2 +- lib/ccsds_decoder_impl.h | 2 +- lib/ccsds_encoder_impl.cc | 2 +- lib/ccsds_encoder_impl.h | 2 +- lib/reed_solomon.cc | 20 ++++++++++++++++++ lib/reed_solomon.h | 21 +++++++++++++++++++ python/qa_ccsds_decoder.py | 12 +++++------ python/qa_ccsds_encoder.py | 38 ++++++++++++++++++++++++++--------- 11 files changed, 103 insertions(+), 21 deletions(-) diff --git a/include/ccsds/ccsds_decoder.h b/include/ccsds/ccsds_decoder.h index 031b576..b5fba0e 100644 --- a/include/ccsds/ccsds_decoder.h +++ b/include/ccsds/ccsds_decoder.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2016 <+YOU OR YOUR COMPANY+>. + * Copyright 2016 André Løfaldli. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/ccsds/ccsds_encoder.h b/include/ccsds/ccsds_encoder.h index 1d0e3f3..7f24bf2 100644 --- a/include/ccsds/ccsds_encoder.h +++ b/include/ccsds/ccsds_encoder.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2016 <+YOU OR YOUR COMPANY+>. + * Copyright 2016 André Løfaldli. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lib/ccsds.h b/lib/ccsds.h index 315415e..ffaba5a 100644 --- a/lib/ccsds.h +++ b/lib/ccsds.h @@ -1,3 +1,24 @@ +/* -*- c++ -*- */ +/* + * Copyright 2016 André Løfaldli. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + #ifndef __CCSDS_H__ #define __CCSDS_H__ diff --git a/lib/ccsds_decoder_impl.cc b/lib/ccsds_decoder_impl.cc index 3cab50a..4d23c8a 100644 --- a/lib/ccsds_decoder_impl.cc +++ b/lib/ccsds_decoder_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2016 <+YOU OR YOUR COMPANY+>. + * Copyright 2016 André Løfaldli. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lib/ccsds_decoder_impl.h b/lib/ccsds_decoder_impl.h index 47d3f66..04afd1b 100644 --- a/lib/ccsds_decoder_impl.h +++ b/lib/ccsds_decoder_impl.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2016 <+YOU OR YOUR COMPANY+>. + * Copyright 2016 André Løfaldli. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lib/ccsds_encoder_impl.cc b/lib/ccsds_encoder_impl.cc index 580df22..955deb5 100644 --- a/lib/ccsds_encoder_impl.cc +++ b/lib/ccsds_encoder_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2016 <+YOU OR YOUR COMPANY+>. + * Copyright 2016 André Løfaldli. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lib/ccsds_encoder_impl.h b/lib/ccsds_encoder_impl.h index 263386c..7568d51 100644 --- a/lib/ccsds_encoder_impl.h +++ b/lib/ccsds_encoder_impl.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2016 <+YOU OR YOUR COMPANY+>. + * Copyright 2016 André Løfaldli. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lib/reed_solomon.cc b/lib/reed_solomon.cc index d20753a..9e70aa3 100644 --- a/lib/reed_solomon.cc +++ b/lib/reed_solomon.cc @@ -1,3 +1,23 @@ +/* -*- c++ -*- */ +/* + * Copyright 2016 André Løfaldli. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + #include "reed_solomon.h" #include diff --git a/lib/reed_solomon.h b/lib/reed_solomon.h index 565e6db..8126fb5 100644 --- a/lib/reed_solomon.h +++ b/lib/reed_solomon.h @@ -1,3 +1,24 @@ +/* -*- c++ -*- */ +/* + * Copyright 2016 André Løfaldli. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + #ifndef INCLUDED_REED_SOLOMON_H #define INCLUDED_REED_SOLOMON_H diff --git a/python/qa_ccsds_decoder.py b/python/qa_ccsds_decoder.py index 721b27f..58cd9e8 100755 --- a/python/qa_ccsds_decoder.py +++ b/python/qa_ccsds_decoder.py @@ -1,23 +1,23 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Copyright 2016 <+YOU OR YOUR COMPANY+>. -# +# +# Copyright 2016 André Løfaldli. +# # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # This software is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this software; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from gnuradio import blocks diff --git a/python/qa_ccsds_encoder.py b/python/qa_ccsds_encoder.py index a236884..2d5da4a 100755 --- a/python/qa_ccsds_encoder.py +++ b/python/qa_ccsds_encoder.py @@ -1,27 +1,28 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# -# Copyright 2016 <+YOU OR YOUR COMPANY+>. -# +# +# Copyright 2016 André Løfaldli. +# # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # This software is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this software; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from gnuradio import blocks import ccsds_swig as ccsds +import pmt, time class qa_ccsds_encoder (gr_unittest.TestCase): @@ -32,9 +33,28 @@ def tearDown (self): self.tb = None def test_001_t (self): - # set up fg - self.tb.run () - # check data + port = pmt.intern("in") + enc = ccsds.ccsds_encoder() + dec = ccsds.ccsds_decoder() + dbg = blocks.message_debug() + self.tb.connect(enc, dec) + self.tb.msg_connect(dec, "out", dbg, "store") + + src_data = [x%256 for x in range(1115)] + src_vec = pmt.init_u8vector(len(src_data), src_data) + msg = pmt.cons(pmt.PMT_NIL, src_vec) + + self.tb.start() + enc.to_basic_block()._post(port, msg) + + while dbg.num_messages() < 1: + time.sleep(0.1) + + self.tb.stop() + self.tb.wait() + + mgs2 = dbg.get_message(0) + print pmt.cdr(msg) if __name__ == '__main__':