From 4478cb86a5dc9fccf66c2cdd5806419b70c3837e Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Thu, 29 Nov 2012 19:46:29 -0800 Subject: Adding PDU to tagged stream and tagged stream to PDU blocks along with QA python non-stream-connected blocks still need a new thread context --- gnuradio-core/src/lib/io/gr_pdu.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 gnuradio-core/src/lib/io/gr_pdu.h (limited to 'gnuradio-core/src/lib/io/gr_pdu.h') diff --git a/gnuradio-core/src/lib/io/gr_pdu.h b/gnuradio-core/src/lib/io/gr_pdu.h new file mode 100644 index 000000000..3bea83740 --- /dev/null +++ b/gnuradio-core/src/lib/io/gr_pdu.h @@ -0,0 +1,38 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio 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. + * + * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef GR_PDU_H +#define GR_PDU_H + +#include +#include + +#define pdu_port_id pmt::mp("pdus") +#define pdu_length_tag pmt::mp("pdu_length") + +enum gr_pdu_vector_type { BYTE, FLOAT, COMPLEX }; + +size_t gr_pdu_itemsize(gr_pdu_vector_type type); +bool gr_pdu_type_matches(gr_pdu_vector_type type, pmt::pmt_t v); +pmt::pmt_t gr_pdu_make_vector(gr_pdu_vector_type type, const uint8_t* buf, size_t items); + +#endif -- cgit From 5dc1ccc01120a6f32f83f5e5fa79bc34b83f1619 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Sat, 1 Dec 2012 13:49:33 -0800 Subject: core: cleanup on pdu/msg blocks --- gnuradio-core/src/lib/io/gr_pdu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnuradio-core/src/lib/io/gr_pdu.h') diff --git a/gnuradio-core/src/lib/io/gr_pdu.h b/gnuradio-core/src/lib/io/gr_pdu.h index 3bea83740..67519c89d 100644 --- a/gnuradio-core/src/lib/io/gr_pdu.h +++ b/gnuradio-core/src/lib/io/gr_pdu.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. + * Copyright 2012 Free Software Foundation, Inc. * * This file is part of GNU Radio * -- cgit From 52ca5e2765b7a4532d26502b5b76b7c85c5019d7 Mon Sep 17 00:00:00 2001 From: Tim O'Shea Date: Fri, 7 Dec 2012 09:28:41 -0800 Subject: core: added gr_tuntap_pdu, gr_socket_pdu, and msg passing enhancements --- gnuradio-core/src/lib/io/gr_pdu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gnuradio-core/src/lib/io/gr_pdu.h') diff --git a/gnuradio-core/src/lib/io/gr_pdu.h b/gnuradio-core/src/lib/io/gr_pdu.h index 67519c89d..5ed9cdded 100644 --- a/gnuradio-core/src/lib/io/gr_pdu.h +++ b/gnuradio-core/src/lib/io/gr_pdu.h @@ -34,5 +34,6 @@ enum gr_pdu_vector_type { BYTE, FLOAT, COMPLEX }; size_t gr_pdu_itemsize(gr_pdu_vector_type type); bool gr_pdu_type_matches(gr_pdu_vector_type type, pmt::pmt_t v); pmt::pmt_t gr_pdu_make_vector(gr_pdu_vector_type type, const uint8_t* buf, size_t items); +gr_pdu_vector_type type_from_pmt(pmt::pmt_t vector); #endif -- cgit From 1bb31c97fb2b764f8133c844102558c0db046b05 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Thu, 20 Dec 2012 19:20:11 -0800 Subject: core: fixed pdu MSVC compatibility issues --- gnuradio-core/src/lib/io/gr_pdu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnuradio-core/src/lib/io/gr_pdu.h') diff --git a/gnuradio-core/src/lib/io/gr_pdu.h b/gnuradio-core/src/lib/io/gr_pdu.h index 5ed9cdded..a5ae87db7 100644 --- a/gnuradio-core/src/lib/io/gr_pdu.h +++ b/gnuradio-core/src/lib/io/gr_pdu.h @@ -29,7 +29,7 @@ #define pdu_port_id pmt::mp("pdus") #define pdu_length_tag pmt::mp("pdu_length") -enum gr_pdu_vector_type { BYTE, FLOAT, COMPLEX }; +enum gr_pdu_vector_type { pdu_byte, pdu_float, pdu_complex }; size_t gr_pdu_itemsize(gr_pdu_vector_type type); bool gr_pdu_type_matches(gr_pdu_vector_type type, pmt::pmt_t v); -- cgit