summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/io/gr_pdu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib/io/gr_pdu.cc')
-rw-r--r--gnuradio-core/src/lib/io/gr_pdu.cc36
1 files changed, 31 insertions, 5 deletions
diff --git a/gnuradio-core/src/lib/io/gr_pdu.cc b/gnuradio-core/src/lib/io/gr_pdu.cc
index c5290b610..f33eed0a3 100644
--- a/gnuradio-core/src/lib/io/gr_pdu.cc
+++ b/gnuradio-core/src/lib/io/gr_pdu.cc
@@ -1,7 +1,33 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gr_pdu.h>
-size_t gr_pdu_itemsize(gr_pdu_vector_type type){
+size_t
+gr_pdu_itemsize(gr_pdu_vector_type type){
switch(type){
case BYTE:
return 1;
@@ -14,7 +40,8 @@ size_t gr_pdu_itemsize(gr_pdu_vector_type type){
}
}
-bool gr_pdu_type_matches(gr_pdu_vector_type type, pmt::pmt_t v){
+bool
+gr_pdu_type_matches(gr_pdu_vector_type type, pmt::pmt_t v){
switch(type){
case BYTE:
return pmt::pmt_is_u8vector(v);
@@ -27,7 +54,8 @@ 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){
+pmt::pmt_t
+gr_pdu_make_vector(gr_pdu_vector_type type, const uint8_t* buf, size_t items){
switch(type){
case BYTE:
return pmt::pmt_init_u8vector(items, buf);
@@ -39,5 +67,3 @@ pmt::pmt_t gr_pdu_make_vector(gr_pdu_vector_type type, const uint8_t* buf, size_
throw std::runtime_error("bad type!");
}
}
-
-