From 3006afc700c18e4e33ab7f765ed53a23f523f2f5 Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Wed, 5 Jun 2013 06:44:42 +0200 Subject: [PATCH] change name to gr-foo --- CMakeLists.txt | 12 +++---- grc/CMakeLists.txt | 14 ++++---- ..._burst_tagger.xml => foo_burst_tagger.xml} | 0 ...ket_dropper.xml => foo_packet_dropper.xml} | 0 ...{ccs_packet_pad.xml => foo_packet_pad.xml} | 0 ...cs_pdu_to_blob.xml => foo_pdu_to_blob.xml} | 0 ...source.xml => foo_periodic_msg_source.xml} | 0 ...ing_to_blob.xml => foo_string_to_blob.xml} | 0 ...nector.xml => foo_wireshark_connector.xml} | 0 include/{ccs => foo}/CMakeLists.txt | 2 +- include/{ccs => foo}/api.h | 12 +++---- include/{ccs => foo}/burst_tagger.h | 14 ++++---- include/{ccs => foo}/packet_dropper.h | 14 ++++---- include/{ccs => foo}/packet_pad.h | 14 ++++---- include/{ccs => foo}/pdu_to_blob.h | 14 ++++---- include/{ccs => foo}/periodic_msg_source.h | 14 ++++---- include/{ccs => foo}/string_to_blob.h | 14 ++++---- include/{ccs => foo}/wireshark_connector.h | 14 ++++---- lib/CMakeLists.txt | 24 +++++++------- lib/burst_tagger_impl.cc | 4 +-- lib/burst_tagger_impl.h | 12 +++---- lib/packet_dropper_impl.cc | 4 +-- lib/packet_dropper_impl.h | 12 +++---- lib/packet_pad_impl.cc | 4 +-- lib/pdu_to_blob_impl.cc | 4 +-- lib/periodic_msg_source_impl.cc | 4 +-- lib/{qa_ccs.cc => qa_foo.cc} | 6 ++-- lib/{qa_ccs.h => qa_foo.h} | 8 ++--- lib/string_to_blob_impl.cc | 4 +-- lib/{test_ccs.cc => test_foo.cc} | 6 ++-- lib/wireshark_connector_impl.cc | 4 +-- lib/wireshark_connector_impl.h | 10 +++--- python/CMakeLists.txt | 4 +-- python/__init__.py | 4 +-- swig/CMakeLists.txt | 14 ++++---- swig/ccs_swig.i | 33 ------------------- swig/foo_swig.i | 33 +++++++++++++++++++ 37 files changed, 166 insertions(+), 166 deletions(-) rename grc/{ccs_burst_tagger.xml => foo_burst_tagger.xml} (100%) rename grc/{ccs_packet_dropper.xml => foo_packet_dropper.xml} (100%) rename grc/{ccs_packet_pad.xml => foo_packet_pad.xml} (100%) rename grc/{ccs_pdu_to_blob.xml => foo_pdu_to_blob.xml} (100%) rename grc/{ccs_periodic_msg_source.xml => foo_periodic_msg_source.xml} (100%) rename grc/{ccs_string_to_blob.xml => foo_string_to_blob.xml} (100%) rename grc/{ccs_wireshark_connector.xml => foo_wireshark_connector.xml} (100%) rename include/{ccs => foo}/CMakeLists.txt (97%) rename include/{ccs => foo}/api.h (82%) rename include/{ccs => foo}/burst_tagger.h (80%) rename include/{ccs => foo}/packet_dropper.h (79%) rename include/{ccs => foo}/packet_pad.h (80%) rename include/{ccs => foo}/pdu_to_blob.h (79%) rename include/{ccs => foo}/periodic_msg_source.h (79%) rename include/{ccs => foo}/string_to_blob.h (78%) rename include/{ccs => foo}/wireshark_connector.h (77%) rename lib/{qa_ccs.cc => qa_foo.cc} (91%) rename lib/{qa_ccs.h => qa_foo.h} (91%) rename lib/{test_ccs.cc => test_foo.cc} (91%) delete mode 100644 swig/ccs_swig.i create mode 100644 swig/foo_swig.i diff --git a/CMakeLists.txt b/CMakeLists.txt index 42508a6..6fd8371 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ # Project setup ######################################################################## cmake_minimum_required(VERSION 2.6) -project(gr-ccs CXX C) +project(gr-foo CXX C) enable_testing() #select the release build type by default to get optimization flags @@ -61,7 +61,7 @@ set(Boost_ADDITIONAL_VERSIONS find_package(Boost "1.35" COMPONENTS filesystem system) if(NOT Boost_FOUND) - message(FATAL_ERROR "Boost required to compile ccs") + message(FATAL_ERROR "Boost required to compile foo") endif() ######################################################################## @@ -70,7 +70,7 @@ endif() include(GrPlatform) #define LIB_SUFFIX set(GR_RUNTIME_DIR bin) set(GR_LIBRARY_DIR lib${LIB_SUFFIX}) -set(GR_INCLUDE_DIR include/ccs) +set(GR_INCLUDE_DIR include/foo) set(GR_DATA_DIR share) set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME}) set(GR_DOC_DIR ${GR_DATA_DIR}/doc) @@ -96,10 +96,10 @@ find_package(CppUnit) # find_package(Gnuradio "version") if(NOT GNURADIO_RUNTIME_FOUND) - message(FATAL_ERROR "GnuRadio Runtime required to compile ccs") + message(FATAL_ERROR "GnuRadio Runtime required to compile foo") endif() if(NOT CPPUNIT_FOUND) - message(FATAL_ERROR "CppUnit required to compile ccs") + message(FATAL_ERROR "CppUnit required to compile foo") endif() ######################################################################## @@ -137,7 +137,7 @@ add_custom_target(uninstall ######################################################################## # Add subdirectories ######################################################################## -add_subdirectory(include/ccs) +add_subdirectory(include/foo) add_subdirectory(lib) add_subdirectory(swig) add_subdirectory(python) diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index a57e346..48db919 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -18,12 +18,12 @@ # Boston, MA 02110-1301, USA. install(FILES - ccs_burst_tagger.xml - ccs_packet_dropper.xml - ccs_packet_pad.xml - ccs_pdu_to_blob.xml - ccs_periodic_msg_source.xml - ccs_string_to_blob.xml - ccs_wireshark_connector.xml + foo_burst_tagger.xml + foo_packet_dropper.xml + foo_packet_pad.xml + foo_pdu_to_blob.xml + foo_periodic_msg_source.xml + foo_string_to_blob.xml + foo_wireshark_connector.xml DESTINATION share/gnuradio/grc/blocks ) diff --git a/grc/ccs_burst_tagger.xml b/grc/foo_burst_tagger.xml similarity index 100% rename from grc/ccs_burst_tagger.xml rename to grc/foo_burst_tagger.xml diff --git a/grc/ccs_packet_dropper.xml b/grc/foo_packet_dropper.xml similarity index 100% rename from grc/ccs_packet_dropper.xml rename to grc/foo_packet_dropper.xml diff --git a/grc/ccs_packet_pad.xml b/grc/foo_packet_pad.xml similarity index 100% rename from grc/ccs_packet_pad.xml rename to grc/foo_packet_pad.xml diff --git a/grc/ccs_pdu_to_blob.xml b/grc/foo_pdu_to_blob.xml similarity index 100% rename from grc/ccs_pdu_to_blob.xml rename to grc/foo_pdu_to_blob.xml diff --git a/grc/ccs_periodic_msg_source.xml b/grc/foo_periodic_msg_source.xml similarity index 100% rename from grc/ccs_periodic_msg_source.xml rename to grc/foo_periodic_msg_source.xml diff --git a/grc/ccs_string_to_blob.xml b/grc/foo_string_to_blob.xml similarity index 100% rename from grc/ccs_string_to_blob.xml rename to grc/foo_string_to_blob.xml diff --git a/grc/ccs_wireshark_connector.xml b/grc/foo_wireshark_connector.xml similarity index 100% rename from grc/ccs_wireshark_connector.xml rename to grc/foo_wireshark_connector.xml diff --git a/include/ccs/CMakeLists.txt b/include/foo/CMakeLists.txt similarity index 97% rename from include/ccs/CMakeLists.txt rename to include/foo/CMakeLists.txt index 4502bee..6fb73e8 100644 --- a/include/ccs/CMakeLists.txt +++ b/include/foo/CMakeLists.txt @@ -29,5 +29,5 @@ install(FILES periodic_msg_source.h string_to_blob.h wireshark_connector.h - DESTINATION include/ccs + DESTINATION include/foo ) diff --git a/include/ccs/api.h b/include/foo/api.h similarity index 82% rename from include/ccs/api.h rename to include/foo/api.h index 629ab8c..dddb402 100644 --- a/include/ccs/api.h +++ b/include/foo/api.h @@ -19,15 +19,15 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_CCS_API_H -#define INCLUDED_CCS_API_H +#ifndef INCLUDED_FOO_API_H +#define INCLUDED_FOO_API_H #include -#ifdef gnuradio_ccs_EXPORTS -# define CCS_API __GR_ATTR_EXPORT +#ifdef gnuradio_foo_EXPORTS +# define FOO_API __GR_ATTR_EXPORT #else -# define CCS_API __GR_ATTR_IMPORT +# define FOO_API __GR_ATTR_IMPORT #endif -#endif /* INCLUDED_CCS_API_H */ +#endif /* INCLUDED_FOO_API_H */ diff --git a/include/ccs/burst_tagger.h b/include/foo/burst_tagger.h similarity index 80% rename from include/ccs/burst_tagger.h rename to include/foo/burst_tagger.h index 76072f6..f42a95b 100644 --- a/include/ccs/burst_tagger.h +++ b/include/foo/burst_tagger.h @@ -18,24 +18,24 @@ */ -#ifndef INCLUDED_CCS_BURST_TAGGER_H -#define INCLUDED_CCS_BURST_TAGGER_H +#ifndef INCLUDED_FOO_BURST_TAGGER_H +#define INCLUDED_FOO_BURST_TAGGER_H -#include +#include #include namespace gr { -namespace ccs { +namespace foo { - class CCS_API burst_tagger : virtual public gr::sync_block { + class FOO_API burst_tagger : virtual public gr::sync_block { public: typedef boost::shared_ptr sptr; static sptr make(pmt::pmt_t tag_name); }; -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_CCS_BURST_TAGGER_H */ +#endif /* INCLUDED_FOO_BURST_TAGGER_H */ diff --git a/include/ccs/packet_dropper.h b/include/foo/packet_dropper.h similarity index 79% rename from include/ccs/packet_dropper.h rename to include/foo/packet_dropper.h index b08e4a2..9171d0b 100644 --- a/include/ccs/packet_dropper.h +++ b/include/foo/packet_dropper.h @@ -14,22 +14,22 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef INCLUDED_GR_CCS_PACKET_DROPPER_H -#define INCLUDED_GR_CCS_PACKET_DROPPER_H +#ifndef INCLUDED_GR_FOO_PACKET_DROPPER_H +#define INCLUDED_GR_FOO_PACKET_DROPPER_H -#include +#include #include namespace gr { -namespace ccs { +namespace foo { - class CCS_API packet_dropper : virtual public gr::block + class FOO_API packet_dropper : virtual public gr::block { public: typedef boost::shared_ptr sptr; static sptr make(double drop_rate, unsigned long seed); }; -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_GR_CCS_PACKET_DROPPER_H */ +#endif /* INCLUDED_GR_FOO_PACKET_DROPPER_H */ diff --git a/include/ccs/packet_pad.h b/include/foo/packet_pad.h similarity index 80% rename from include/ccs/packet_pad.h rename to include/foo/packet_pad.h index c6a8fad..5d751c7 100644 --- a/include/ccs/packet_pad.h +++ b/include/foo/packet_pad.h @@ -14,16 +14,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef INCLUDED_CCS_PACKET_PAD_H -#define INCLUDED_CCS_PACKET_PAD_H +#ifndef INCLUDED_FOO_PACKET_PAD_H +#define INCLUDED_FOO_PACKET_PAD_H -#include +#include #include namespace gr { -namespace ccs { +namespace foo { -class CCS_API packet_pad : virtual public gr::block +class FOO_API packet_pad : virtual public gr::block { public: @@ -32,7 +32,7 @@ public: }; -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_CCS_PACKET_PAD_H */ +#endif /* INCLUDED_FOO_PACKET_PAD_H */ diff --git a/include/ccs/pdu_to_blob.h b/include/foo/pdu_to_blob.h similarity index 79% rename from include/ccs/pdu_to_blob.h rename to include/foo/pdu_to_blob.h index e0acfe0..5e18e3e 100644 --- a/include/ccs/pdu_to_blob.h +++ b/include/foo/pdu_to_blob.h @@ -14,16 +14,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef INCLUDED_CCS_PDU_TO_BLOB_H -#define INCLUDED_CCS_PDU_TO_BLOB_H +#ifndef INCLUDED_FOO_PDU_TO_BLOB_H +#define INCLUDED_FOO_PDU_TO_BLOB_H -#include +#include #include namespace gr { -namespace ccs { +namespace foo { -class CCS_API pdu_to_blob : virtual public gr::block +class FOO_API pdu_to_blob : virtual public gr::block { public: @@ -32,7 +32,7 @@ public: }; -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_CCS_PDU_TO_BLOB_H */ +#endif /* INCLUDED_FOO_PDU_TO_BLOB_H */ diff --git a/include/ccs/periodic_msg_source.h b/include/foo/periodic_msg_source.h similarity index 79% rename from include/ccs/periodic_msg_source.h rename to include/foo/periodic_msg_source.h index 6fd2c1d..02f1738 100644 --- a/include/ccs/periodic_msg_source.h +++ b/include/foo/periodic_msg_source.h @@ -14,16 +14,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef INCLUDED_CCS_PERIODIC_MSG_SOURCE_H -#define INCLUDED_CCS_PERIODIC_MSG_SOURCE_H +#ifndef INCLUDED_FOO_PERIODIC_MSG_SOURCE_H +#define INCLUDED_FOO_PERIODIC_MSG_SOURCE_H -#include +#include #include namespace gr { -namespace ccs { +namespace foo { -class CCS_API periodic_msg_source : virtual public gr::block +class FOO_API periodic_msg_source : virtual public gr::block { public: @@ -32,7 +32,7 @@ public: }; -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_CCS_PERIODIC_MSG_SOURCE */ +#endif /* INCLUDED_FOO_PERIODIC_MSG_SOURCE */ diff --git a/include/ccs/string_to_blob.h b/include/foo/string_to_blob.h similarity index 78% rename from include/ccs/string_to_blob.h rename to include/foo/string_to_blob.h index a72f74c..f246d32 100644 --- a/include/ccs/string_to_blob.h +++ b/include/foo/string_to_blob.h @@ -14,16 +14,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef INCLUDED_CCS_STRING_TO_BLOB_H -#define INCLUDED_CCS_STRING_TO_BLOB_H +#ifndef INCLUDED_FOO_STRING_TO_BLOB_H +#define INCLUDED_FOO_STRING_TO_BLOB_H -#include +#include #include namespace gr { -namespace ccs { +namespace foo { -class CCS_API string_to_blob : virtual public gr::block +class FOO_API string_to_blob : virtual public gr::block { public: @@ -32,7 +32,7 @@ public: }; -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_CCS_STRING_TO_BLOB_H */ +#endif /* INCLUDED_FOO_STRING_TO_BLOB_H */ diff --git a/include/ccs/wireshark_connector.h b/include/foo/wireshark_connector.h similarity index 77% rename from include/ccs/wireshark_connector.h rename to include/foo/wireshark_connector.h index 371919b..d3384cd 100644 --- a/include/ccs/wireshark_connector.h +++ b/include/foo/wireshark_connector.h @@ -14,16 +14,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef INCLUDED_GR_CCS_WIRESHARK_CONNECTOR_H -#define INCLUDED_GR_CCS_WIRESHARK_CONNECTOR_H +#ifndef INCLUDED_GR_FOO_WIRESHARK_CONNECTOR_H +#define INCLUDED_GR_FOO_WIRESHARK_CONNECTOR_H -#include +#include #include namespace gr { -namespace ccs { +namespace foo { -class CCS_API wireshark_connector : virtual public gr::block +class FOO_API wireshark_connector : virtual public gr::block { public: @@ -31,7 +31,7 @@ public: static sptr make(bool debug= false); }; -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_GR_CCS_WIRESHARK_CONNECTOR_H */ +#endif /* INCLUDED_GR_FOO_WIRESHARK_CONNECTOR_H */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 9956e51..cabc325 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -25,7 +25,7 @@ include(GrPlatform) #define LIB_SUFFIX include_directories(${Boost_INCLUDE_DIR}) link_directories(${Boost_LIBRARY_DIRS}) -list(APPEND ccs_sources +list(APPEND foo_sources burst_tagger_impl.cc packet_dropper_impl.cc packet_pad_impl.cc @@ -35,14 +35,14 @@ list(APPEND ccs_sources wireshark_connector_impl.cc ) -add_library(gnuradio-ccs SHARED ${ccs_sources}) -target_link_libraries(gnuradio-ccs ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}) -set_target_properties(gnuradio-ccs PROPERTIES DEFINE_SYMBOL "gnuradio_ccs_EXPORTS") +add_library(gnuradio-foo SHARED ${foo_sources}) +target_link_libraries(gnuradio-foo ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}) +set_target_properties(gnuradio-foo PROPERTIES DEFINE_SYMBOL "gnuradio_foo_EXPORTS") ######################################################################## # Install built library files ######################################################################## -install(TARGETS gnuradio-ccs +install(TARGETS gnuradio-foo LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file RUNTIME DESTINATION bin # .dll file @@ -55,19 +55,19 @@ include(GrTest) include_directories(${CPPUNIT_INCLUDE_DIRS}) -list(APPEND test_ccs_sources - ${CMAKE_CURRENT_SOURCE_DIR}/test_ccs.cc - ${CMAKE_CURRENT_SOURCE_DIR}/qa_ccs.cc +list(APPEND test_foo_sources + ${CMAKE_CURRENT_SOURCE_DIR}/test_foo.cc + ${CMAKE_CURRENT_SOURCE_DIR}/qa_foo.cc ) -add_executable(test-ccs ${test_ccs_sources}) +add_executable(test-foo ${test_foo_sources}) target_link_libraries( - test-ccs + test-foo ${GNURADIO_RUNTIME_LIBRARIES} ${Boost_LIBRARIES} ${CPPUNIT_LIBRARIES} - gnuradio-ccs + gnuradio-foo ) -GR_ADD_TEST(test_ccs test-ccs) +GR_ADD_TEST(test_foo test-foo) diff --git a/lib/burst_tagger_impl.cc b/lib/burst_tagger_impl.cc index fa92bb1..640d13a 100644 --- a/lib/burst_tagger_impl.cc +++ b/lib/burst_tagger_impl.cc @@ -23,7 +23,7 @@ #define dout std::cout namespace gr { -namespace ccs { +namespace foo { burst_tagger_impl::burst_tagger_impl(pmt::pmt_t tag_name) : gr::sync_block("burst_tagger", @@ -114,6 +114,6 @@ burst_tagger::sptr burst_tagger::make(pmt::pmt_t tag_name) { } -} /* namespace ccs */ +} /* namespace foo */ } /* namespace gr */ diff --git a/lib/burst_tagger_impl.h b/lib/burst_tagger_impl.h index bd2952b..38b4bd2 100644 --- a/lib/burst_tagger_impl.h +++ b/lib/burst_tagger_impl.h @@ -18,13 +18,13 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_CCS_BURST_TAGGER_IMPL_H -#define INCLUDED_CCS_BURST_TAGGER_IMPL_H +#ifndef INCLUDED_FOO_BURST_TAGGER_IMPL_H +#define INCLUDED_FOO_BURST_TAGGER_IMPL_H -#include +#include namespace gr { -namespace ccs { +namespace foo { class burst_tagger_impl : public burst_tagger { private: @@ -43,8 +43,8 @@ namespace ccs { gr_vector_void_star &output_items); }; -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_CCS_BURST_TAGGER_IMPL_H */ +#endif /* INCLUDED_FOO_BURST_TAGGER_IMPL_H */ diff --git a/lib/packet_dropper_impl.cc b/lib/packet_dropper_impl.cc index 849154d..b8188b0 100644 --- a/lib/packet_dropper_impl.cc +++ b/lib/packet_dropper_impl.cc @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -#include +#include #include #include #include "packet_dropper_impl.h" -using namespace gr::ccs; +using namespace gr::foo; packet_dropper_impl::packet_dropper_impl(double drop_rate, unsigned long seed) : d_drop_rate(drop_rate), d_generator(seed), d_distribution(0.0,1.0), diff --git a/lib/packet_dropper_impl.h b/lib/packet_dropper_impl.h index 75c309c..597cbb2 100644 --- a/lib/packet_dropper_impl.h +++ b/lib/packet_dropper_impl.h @@ -15,14 +15,14 @@ * along with this program. If not, see . */ -#ifndef INCLUDED_GR_CCS_PACKET_DROPPER_IMPL_H -#define INCLUDED_GR_CCS_PACKET_DROPPER_IMPL_H +#ifndef INCLUDED_GR_FOO_PACKET_DROPPER_IMPL_H +#define INCLUDED_GR_FOO_PACKET_DROPPER_IMPL_H -#include +#include namespace gr { -namespace ccs { - class CCS_API packet_dropper_impl : public packet_dropper { +namespace foo { + class FOO_API packet_dropper_impl : public packet_dropper { private: double d_drop_rate; std::default_random_engine d_generator; @@ -34,4 +34,4 @@ namespace ccs { } } -#endif /* INCLUDED_GR_CCS_PACKET_DROPPER_IMPL_H */ +#endif /* INCLUDED_GR_FOO_PACKET_DROPPER_IMPL_H */ diff --git a/lib/packet_pad_impl.cc b/lib/packet_pad_impl.cc index f769215..50e3f58 100644 --- a/lib/packet_pad_impl.cc +++ b/lib/packet_pad_impl.cc @@ -14,12 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include +#include #include #include -using namespace gr::ccs; +using namespace gr::foo; class packet_pad_impl : public packet_pad { diff --git a/lib/pdu_to_blob_impl.cc b/lib/pdu_to_blob_impl.cc index 552e232..5924c54 100644 --- a/lib/pdu_to_blob_impl.cc +++ b/lib/pdu_to_blob_impl.cc @@ -14,12 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include +#include #include #include -using namespace gr::ccs; +using namespace gr::foo; class pdu_to_blob_impl : public pdu_to_blob { diff --git a/lib/periodic_msg_source_impl.cc b/lib/periodic_msg_source_impl.cc index 530cac9..b6b0067 100644 --- a/lib/periodic_msg_source_impl.cc +++ b/lib/periodic_msg_source_impl.cc @@ -14,13 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include +#include #include #include #include -using namespace gr::ccs; +using namespace gr::foo; class periodic_msg_source_impl : public periodic_msg_source { diff --git a/lib/qa_ccs.cc b/lib/qa_foo.cc similarity index 91% rename from lib/qa_ccs.cc rename to lib/qa_foo.cc index d15f0bc..d804212 100644 --- a/lib/qa_ccs.cc +++ b/lib/qa_foo.cc @@ -25,12 +25,12 @@ * add them here. */ -#include "qa_ccs.h" +#include "qa_foo.h" CppUnit::TestSuite * -qa_ccs::suite() +qa_foo::suite() { - CppUnit::TestSuite *s = new CppUnit::TestSuite("ccs"); + CppUnit::TestSuite *s = new CppUnit::TestSuite("foo"); return s; } diff --git a/lib/qa_ccs.h b/lib/qa_foo.h similarity index 91% rename from lib/qa_ccs.h rename to lib/qa_foo.h index 609d745..be40c43 100644 --- a/lib/qa_ccs.h +++ b/lib/qa_foo.h @@ -20,19 +20,19 @@ * Boston, MA 02110-1301, USA. */ -#ifndef _QA_CCS_H_ -#define _QA_CCS_H_ +#ifndef _QA_FOO_H_ +#define _QA_FOO_H_ #include #include //! collect all the tests for the gr-filter directory -class __GR_ATTR_EXPORT qa_ccs +class __GR_ATTR_EXPORT qa_foo { public: //! return suite of tests for all of gr-filter directory static CppUnit::TestSuite *suite(); }; -#endif /* _QA_CCS_H_ */ +#endif /* _QA_FOO_H_ */ diff --git a/lib/string_to_blob_impl.cc b/lib/string_to_blob_impl.cc index 1782edb..7a5c786 100644 --- a/lib/string_to_blob_impl.cc +++ b/lib/string_to_blob_impl.cc @@ -14,13 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include +#include #include #include #include -using namespace gr::ccs; +using namespace gr::foo; class string_to_blob_impl : public string_to_blob { diff --git a/lib/test_ccs.cc b/lib/test_foo.cc similarity index 91% rename from lib/test_ccs.cc rename to lib/test_foo.cc index 7aaeec4..4454389 100644 --- a/lib/test_ccs.cc +++ b/lib/test_foo.cc @@ -28,17 +28,17 @@ #include #include -#include "qa_ccs.h" +#include "qa_foo.h" #include int main (int argc, char **argv) { CppUnit::TextTestRunner runner; - std::ofstream xmlfile(get_unittest_path("ccs.xml").c_str()); + std::ofstream xmlfile(get_unittest_path("foo.xml").c_str()); CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile); - runner.addTest(qa_ccs::suite()); + runner.addTest(qa_foo::suite()); runner.setOutputter(xmlout); bool was_successful = runner.run("", false); diff --git a/lib/wireshark_connector_impl.cc b/lib/wireshark_connector_impl.cc index 4fa082a..adf397a 100644 --- a/lib/wireshark_connector_impl.cc +++ b/lib/wireshark_connector_impl.cc @@ -15,14 +15,14 @@ * along with this program. If not, see . */ #include "wireshark_connector_impl.h" -#include +#include #include #include #include #include -using namespace gr::ccs; +using namespace gr::foo; class wireshark_connector_impl : public wireshark_connector { diff --git a/lib/wireshark_connector_impl.h b/lib/wireshark_connector_impl.h index a4d98c4..379f497 100644 --- a/lib/wireshark_connector_impl.h +++ b/lib/wireshark_connector_impl.h @@ -14,13 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef INCLUDED_GR_CCS_WIRESHARK_CONNECTOR_IMPL_H -#define INCLUDED_GR_CCS_WIRESHARK_CONNECTOR_IMPL_H +#ifndef INCLUDED_GR_FOO_WIRESHARK_CONNECTOR_IMPL_H +#define INCLUDED_GR_FOO_WIRESHARK_CONNECTOR_IMPL_H #include namespace gr { -namespace ccs { +namespace foo { enum LINK_LAYER_PROTOCOL { ZIGBEE = 195 @@ -43,7 +43,7 @@ struct pcap_pkt { uint32_t orig_len; /* actual length of packet */ }__attribute__((packed)); -} // namespace ccs +} // namespace foo } // namespace gr -#endif /* INCLUDED_GR_CCS_WIRESHARK_CONNECTOR_IMPL_H */ +#endif /* INCLUDED_GR_FOO_WIRESHARK_CONNECTOR_IMPL_H */ diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 2112b9f..0e4f1b3 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -31,7 +31,7 @@ endif() GR_PYTHON_INSTALL( FILES __init__.py - DESTINATION ${GR_PYTHON_DIR}/ccs + DESTINATION ${GR_PYTHON_DIR}/foo ) ######################################################################## @@ -39,5 +39,5 @@ GR_PYTHON_INSTALL( ######################################################################## include(GrTest) -set(GR_TEST_TARGET_DEPS gnuradio-ccs) +set(GR_TEST_TARGET_DEPS gnuradio-foo) set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig) diff --git a/python/__init__.py b/python/__init__.py index bad8d1b..1be5feb 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -41,8 +41,8 @@ if _RTLD_GLOBAL != 0: # ---------------------------------------------------------------- -# import swig generated symbols into the ccs namespace -from ccs_swig import * +# import swig generated symbols into the foo namespace +from foo_swig import * # import any pure python here # diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index 97fc7ff..1ef9b52 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -35,23 +35,23 @@ foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS}) list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig) endforeach(incdir) -set(GR_SWIG_LIBRARIES gnuradio-ccs) -set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccs_swig_doc.i) +set(GR_SWIG_LIBRARIES gnuradio-foo) +set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/foo_swig_doc.i) set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include) -GR_SWIG_MAKE(ccs_swig ccs_swig.i) +GR_SWIG_MAKE(foo_swig foo_swig.i) ######################################################################## # Install the build swig module ######################################################################## -GR_SWIG_INSTALL(TARGETS ccs_swig DESTINATION ${GR_PYTHON_DIR}/ccs) +GR_SWIG_INSTALL(TARGETS foo_swig DESTINATION ${GR_PYTHON_DIR}/foo) ######################################################################## # Install swig .i files for development ######################################################################## install( FILES - ccs_swig.i - ${CMAKE_CURRENT_BINARY_DIR}/ccs_swig_doc.i - DESTINATION ${GR_INCLUDE_DIR}/ccs/swig + foo_swig.i + ${CMAKE_CURRENT_BINARY_DIR}/foo_swig_doc.i + DESTINATION ${GR_INCLUDE_DIR}/foo/swig ) diff --git a/swig/ccs_swig.i b/swig/ccs_swig.i deleted file mode 100644 index 09df45b..0000000 --- a/swig/ccs_swig.i +++ /dev/null @@ -1,33 +0,0 @@ -#define CCS_API - -%include "gnuradio.i" - -//load generated python docstrings -%include "ccs_swig_doc.i" - -%{ -#include "ccs/burst_tagger.h" -#include "ccs/packet_dropper.h" -#include "ccs/packet_pad.h" -#include "ccs/pdu_to_blob.h" -#include "ccs/periodic_msg_source.h" -#include "ccs/string_to_blob.h" -#include "ccs/wireshark_connector.h" -%} - - -%include "ccs/burst_tagger.h" -%include "ccs/packet_dropper.h" -%include "ccs/packet_pad.h" -%include "ccs/pdu_to_blob.h" -%include "ccs/periodic_msg_source.h" -%include "ccs/string_to_blob.h" -%include "ccs/wireshark_connector.h" - -GR_SWIG_BLOCK_MAGIC2(ccs, burst_tagger); -GR_SWIG_BLOCK_MAGIC2(ccs, packet_dropper); -GR_SWIG_BLOCK_MAGIC2(ccs, wireshark_connector); -GR_SWIG_BLOCK_MAGIC2(ccs, packet_pad); -GR_SWIG_BLOCK_MAGIC2(ccs, pdu_to_blob); -GR_SWIG_BLOCK_MAGIC2(ccs, periodic_msg_source); -GR_SWIG_BLOCK_MAGIC2(ccs, string_to_blob); diff --git a/swig/foo_swig.i b/swig/foo_swig.i new file mode 100644 index 0000000..99f4250 --- /dev/null +++ b/swig/foo_swig.i @@ -0,0 +1,33 @@ +#define FOO_API + +%include "gnuradio.i" + +//load generated python docstrings +%include "foo_swig_doc.i" + +%{ +#include "foo/burst_tagger.h" +#include "foo/packet_dropper.h" +#include "foo/packet_pad.h" +#include "foo/pdu_to_blob.h" +#include "foo/periodic_msg_source.h" +#include "foo/string_to_blob.h" +#include "foo/wireshark_connector.h" +%} + + +%include "foo/burst_tagger.h" +%include "foo/packet_dropper.h" +%include "foo/packet_pad.h" +%include "foo/pdu_to_blob.h" +%include "foo/periodic_msg_source.h" +%include "foo/string_to_blob.h" +%include "foo/wireshark_connector.h" + +GR_SWIG_BLOCK_MAGIC2(foo, burst_tagger); +GR_SWIG_BLOCK_MAGIC2(foo, packet_dropper); +GR_SWIG_BLOCK_MAGIC2(foo, wireshark_connector); +GR_SWIG_BLOCK_MAGIC2(foo, packet_pad); +GR_SWIG_BLOCK_MAGIC2(foo, pdu_to_blob); +GR_SWIG_BLOCK_MAGIC2(foo, periodic_msg_source); +GR_SWIG_BLOCK_MAGIC2(foo, string_to_blob);