change name to gr-foo
This commit is contained in:
+6
-6
@@ -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)
|
||||
|
||||
+7
-7
@@ -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
|
||||
)
|
||||
|
||||
@@ -29,5 +29,5 @@ install(FILES
|
||||
periodic_msg_source.h
|
||||
string_to_blob.h
|
||||
wireshark_connector.h
|
||||
DESTINATION include/ccs
|
||||
DESTINATION include/foo
|
||||
)
|
||||
@@ -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 <gnuradio/attributes.h>
|
||||
|
||||
#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 */
|
||||
@@ -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 <ccs/api.h>
|
||||
#include <foo/api.h>
|
||||
#include <gnuradio/sync_block.h>
|
||||
|
||||
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<burst_tagger> 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 */
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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 <ccs/api.h>
|
||||
#include <foo/api.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
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<packet_dropper> 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 */
|
||||
@@ -14,16 +14,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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 <ccs/api.h>
|
||||
#include <foo/api.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
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 */
|
||||
@@ -14,16 +14,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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 <ccs/api.h>
|
||||
#include <foo/api.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
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 */
|
||||
@@ -14,16 +14,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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 <ccs/api.h>
|
||||
#include <foo/api.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
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 */
|
||||
@@ -14,16 +14,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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 <ccs/api.h>
|
||||
#include <foo/api.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
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 */
|
||||
@@ -14,16 +14,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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 <ccs/api.h>
|
||||
#include <foo/api.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
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 */
|
||||
+12
-12
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 <ccs/burst_tagger.h>
|
||||
#include <foo/burst_tagger.h>
|
||||
|
||||
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 */
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <ccs/packet_dropper.h>
|
||||
#include <foo/packet_dropper.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <gnuradio/block_detail.h>
|
||||
#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),
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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 <ccs/packet_dropper.h>
|
||||
#include <foo/packet_dropper.h>
|
||||
|
||||
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 */
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <ccs/packet_pad.h>
|
||||
#include <foo/packet_pad.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace gr::ccs;
|
||||
using namespace gr::foo;
|
||||
|
||||
|
||||
class packet_pad_impl : public packet_pad {
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <ccs/pdu_to_blob.h>
|
||||
#include <foo/pdu_to_blob.h>
|
||||
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <string>
|
||||
|
||||
using namespace gr::ccs;
|
||||
using namespace gr::foo;
|
||||
|
||||
class pdu_to_blob_impl : public pdu_to_blob {
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <ccs/periodic_msg_source.h>
|
||||
#include <foo/periodic_msg_source.h>
|
||||
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <gnuradio/block_detail.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace gr::ccs;
|
||||
using namespace gr::foo;
|
||||
|
||||
class periodic_msg_source_impl : public periodic_msg_source {
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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 <gnuradio/attributes.h>
|
||||
#include <cppunit/TestSuite.h>
|
||||
|
||||
//! 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_ */
|
||||
@@ -14,13 +14,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <ccs/string_to_blob.h>
|
||||
#include <foo/string_to_blob.h>
|
||||
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <gnuradio/block_detail.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace gr::ccs;
|
||||
using namespace gr::foo;
|
||||
|
||||
class string_to_blob_impl : public string_to_blob {
|
||||
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
#include <cppunit/XmlOutputter.h>
|
||||
|
||||
#include <gnuradio/unittests.h>
|
||||
#include "qa_ccs.h"
|
||||
#include "qa_foo.h"
|
||||
#include <iostream>
|
||||
|
||||
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);
|
||||
@@ -15,14 +15,14 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "wireshark_connector_impl.h"
|
||||
#include <ccs/wireshark_connector.h>
|
||||
#include <foo/wireshark_connector.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <sys/time.h>
|
||||
|
||||
using namespace gr::ccs;
|
||||
using namespace gr::foo;
|
||||
|
||||
|
||||
class wireshark_connector_impl : public wireshark_connector {
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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 <boost/cstdint.hpp>
|
||||
|
||||
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 */
|
||||
|
||||
@@ -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)
|
||||
|
||||
+2
-2
@@ -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
|
||||
#
|
||||
|
||||
+7
-7
@@ -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
|
||||
)
|
||||
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user