summaryrefslogtreecommitdiff
path: root/gr-blocks/include
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2013-02-28 09:44:24 -0800
committerJohnathan Corgan <johnathan@corganlabs.com>2013-02-28 09:51:32 -0800
commit51c02f87a08efa4e679630771ec7dd0605e4986a (patch)
tree3201074186d887beb4db9d9f40843ea081891573 /gr-blocks/include
parentc4edfc69a1e2e5b6800d00a2436fb3c8d5ef3233 (diff)
blocks: added gr::blocks::socket_pdu
Diffstat (limited to 'gr-blocks/include')
-rw-r--r--gr-blocks/include/blocks/CMakeLists.txt3
-rw-r--r--gr-blocks/include/blocks/socket_pdu.h53
2 files changed, 55 insertions, 1 deletions
diff --git a/gr-blocks/include/blocks/CMakeLists.txt b/gr-blocks/include/blocks/CMakeLists.txt
index 48e399d065..cea725d360 100644
--- a/gr-blocks/include/blocks/CMakeLists.txt
+++ b/gr-blocks/include/blocks/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -134,6 +134,7 @@ install(FILES
rms_ff.h
short_to_char.h
short_to_float.h
+ socket_pdu.h
stream_mux.h
stream_to_streams.h
stream_to_vector.h
diff --git a/gr-blocks/include/blocks/socket_pdu.h b/gr-blocks/include/blocks/socket_pdu.h
new file mode 100644
index 0000000000..1a67f8358c
--- /dev/null
+++ b/gr-blocks/include/blocks/socket_pdu.h
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013 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 INCLUDED_BLOCKS_SOCKET_PDU_H
+#define INCLUDED_BLOCKS_SOCKET_PDU_H
+
+#include <blocks/api.h>
+#include <gr_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief Creates socket interface and translates traffic to PDUs
+ * \ingroup net_blk
+ */
+ class BLOCKS_API socket_pdu : virtual public gr_block
+ {
+ public:
+ // gr::blocks::socket_pdu::sptr
+ typedef boost::shared_ptr<socket_pdu> sptr;
+
+ /*!
+ * \brief Construct a SOCKET PDU interface
+ * \param dev Device name to create
+ * \param MTU Maximum Transmission Unit size
+ */
+ static sptr make(std::string type, std::string addr, std::string port, int MTU=10000);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INCLUDED_BLOCKS_SOCKET_PDU_H */