commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 99/148: removed unused copy handler


From: git
Subject: [Commit-gnuradio] [gnuradio] 99/148: removed unused copy handler
Date: Mon, 15 Aug 2016 00:47:28 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

nwest pushed a commit to annotated tag old_usrp_devel_udp
in repository gnuradio.

commit 5c43f08ac3f6cdc015ad88babafcc1c1b6d3b573
Author: Josh Blum <address@hidden>
Date:   Fri Dec 18 15:59:32 2009 -0800

    removed unused copy handler
---
 usrp2/host/include/usrp2/Makefile.am    |  3 +-
 usrp2/host/include/usrp2/copy_handler.h | 51 ----------------------------
 usrp2/host/lib/Makefile.am              |  1 -
 usrp2/host/lib/copy_handler.cc          | 60 ---------------------------------
 4 files changed, 1 insertion(+), 114 deletions(-)

diff --git a/usrp2/host/include/usrp2/Makefile.am 
b/usrp2/host/include/usrp2/Makefile.am
index cfc90aa..24184b9 100644
--- a/usrp2/host/include/usrp2/Makefile.am
+++ b/usrp2/host/include/usrp2/Makefile.am
@@ -1,5 +1,5 @@
 #
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008, 2009 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,6 @@ usrp2includedir = $(includedir)/usrp2
 
 usrp2include_HEADERS = \
        copiers.h \
-       copy_handler.h \
        data_handler.h \
        mimo_config.h \
        rx_nop_handler.h \
diff --git a/usrp2/host/include/usrp2/copy_handler.h 
b/usrp2/host/include/usrp2/copy_handler.h
deleted file mode 100644
index aef14ca..0000000
--- a/usrp2/host/include/usrp2/copy_handler.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_COPY_HANDLER_H
-#define INCLUDED_COPY_HANDLER_H
-
-#include <usrp2/data_handler.h>
-#include <boost/utility.hpp>
-
-namespace usrp2 {
-
-  class copy_handler : public data_handler, boost::noncopyable 
-  {
-    uint8_t *d_dest;      // next write pointer
-    size_t   d_space;     // space left in destination buffer
-    size_t   d_bytes;     // total bytes copied
-    size_t   d_times;     // number of times invoked
-
-  public:
-    copy_handler(void *dest, size_t len);
-    ~copy_handler();
- 
-    virtual data_handler::result operator()(const void *base, size_t len);
-
-    size_t bytes() const { return d_bytes; }
-    size_t times() const { return d_times; }
-
-    static const size_t MIN_COPY_LEN = 1484; // FIXME: calculate eth packet - 
thdr
-    bool full() const { return d_space < MIN_COPY_LEN; }
-  };
-    
-} // namespace usrp2
-
-#endif /* INCLUDED_COPY_HANDLER_H */
diff --git a/usrp2/host/lib/Makefile.am b/usrp2/host/lib/Makefile.am
index d186d6c..a88a7bf 100644
--- a/usrp2/host/lib/Makefile.am
+++ b/usrp2/host/lib/Makefile.am
@@ -34,7 +34,6 @@ lib_LTLIBRARIES = \
 libusrp2_la_SOURCES = \
        control.cc \
        copiers.cc \
-       copy_handler.cc \
        data_handler.cc \
        eth_buffer.cc \
        eth_ctrl_transport.cc \
diff --git a/usrp2/host/lib/copy_handler.cc b/usrp2/host/lib/copy_handler.cc
deleted file mode 100644
index 9275908..0000000
--- a/usrp2/host/lib/copy_handler.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <usrp2/copy_handler.h>
-#include <iostream>
-#include <string.h>
-
-namespace usrp2 {
-  
-  copy_handler::copy_handler(void *dest, size_t len)
-    : d_dest((uint8_t *)dest), d_space(len), d_bytes(0), d_times(0)
-  {
-  }
-  
-  copy_handler::~copy_handler()
-  {
-    // NOP
-  }
-  
-  data_handler::result
-  copy_handler::operator()(const void *base, size_t len)
-  {
-    if (len > d_space)
-      return KEEP|DONE; // can't do anything, retry later
-    
-    memcpy(&d_dest[d_bytes], base, len);
-    d_space -= len;
-    d_bytes += len;
-    d_times++;
-
-    if (d_space < MIN_COPY_LEN)
-      return DONE; // don't call me anymore
-    
-    return 0;
-  }
-  
-} // namespace usrp2
-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]