mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-07-06 12:02:55 +00:00
Use https instead of http in links when available. Minor fixes
This commit is contained in:
parent
98edb768fd
commit
87fb81b972
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
###################################################################
|
###################################################################
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 Frederic Heem, <frederic.heem@telsey.it>
|
# Copyright (c) 2006 Frederic Heem, <frederic.heem@telsey.it>
|
||||||
@ -112,11 +111,11 @@ CHECK_FUNCTION_EXISTS("pcap_set_datalink" HAVE_PCAP_SET_DATALINK)
|
|||||||
|
|
||||||
#Is pcap found ?
|
#Is pcap found ?
|
||||||
IF(PCAP_INCLUDE_DIRS AND PCAP_LIBRARIES)
|
IF(PCAP_INCLUDE_DIRS AND PCAP_LIBRARIES)
|
||||||
SET( PCAP_FOUND "YES" )
|
SET( PCAP_FOUND true )
|
||||||
ENDIF(PCAP_INCLUDE_DIRS AND PCAP_LIBRARIES)
|
ENDIF(PCAP_INCLUDE_DIRS AND PCAP_LIBRARIES)
|
||||||
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
PCAP_LIBRARIES
|
PCAP_LIBRARIES
|
||||||
PCAP_INCLUDE_DIRS
|
PCAP_INCLUDE_DIRS
|
||||||
)
|
)
|
||||||
|
@ -22,31 +22,31 @@ list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
|
|||||||
# Optional drivers
|
# Optional drivers
|
||||||
|
|
||||||
if(ENABLE_RAW_UDP)
|
if(ENABLE_RAW_UDP)
|
||||||
# - Try to find libpcap include dirs and libraries
|
# - Try to find libpcap include dirs and libraries
|
||||||
#
|
#
|
||||||
# Usage of this module as follows:
|
# Usage of this module as follows:
|
||||||
#
|
#
|
||||||
# find_package(PCAP)
|
# find_package(PCAP)
|
||||||
#
|
#
|
||||||
# Variables used by this module, they can change the default behaviour and need
|
# Variables used by this module, they can change the default behaviour and need
|
||||||
# to be set before calling find_package:
|
# to be set before calling find_package:
|
||||||
#
|
#
|
||||||
# PCAP_ROOT_DIR Set this variable to the root installation of
|
# PCAP_ROOT_DIR Set this variable to the root installation of
|
||||||
# libpcap if the module has problems finding the
|
# libpcap if the module has problems finding the
|
||||||
# proper installation path.
|
# proper installation path.
|
||||||
#
|
#
|
||||||
# Variables defined by this module:
|
# Variables defined by this module:
|
||||||
#
|
#
|
||||||
# PCAP_FOUND System has libpcap, include and library dirs found
|
# PCAP_FOUND System has libpcap, include and library dirs found
|
||||||
# PCAP_INCLUDE_DIR The libpcap include directories.
|
# PCAP_INCLUDE_DIR The libpcap include directories.
|
||||||
# PCAP_LIBRARY The libpcap library (possibly includes a thread
|
# PCAP_LIBRARY The libpcap library (possibly includes a thread
|
||||||
# library e.g. required by pf_ring's libpcap)
|
# library e.g. required by pf_ring's libpcap)
|
||||||
# HAVE_PF_RING If a found version of libpcap supports PF_RING
|
# HAVE_PF_RING If a found version of libpcap supports PF_RING
|
||||||
find_package(PCAP)
|
find_package(PCAP)
|
||||||
if(NOT PCAP_FOUND)
|
if(NOT PCAP_FOUND)
|
||||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
||||||
endif()
|
endif()
|
||||||
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc)
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -50,8 +50,7 @@ CustomUDPSignalSource::CustomUDPSignalSource(ConfigurationInterface* configurati
|
|||||||
std::string default_dump_file = "./data/signal_source.dat";
|
std::string default_dump_file = "./data/signal_source.dat";
|
||||||
std::string default_item_type = "gr_complex";
|
std::string default_item_type = "gr_complex";
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
dump_ = configuration->property(role + ".dump", false);
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename",
|
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
||||||
default_dump_file);
|
|
||||||
|
|
||||||
// network PARAMETERS
|
// network PARAMETERS
|
||||||
std::string default_capture_device = "eth0";
|
std::string default_capture_device = "eth0";
|
||||||
@ -62,7 +61,6 @@ CustomUDPSignalSource::CustomUDPSignalSource(ConfigurationInterface* configurati
|
|||||||
int port = configuration->property(role + ".port", default_port);
|
int port = configuration->property(role + ".port", default_port);
|
||||||
int payload_bytes = configuration->property(role + ".payload_bytes", 1024);
|
int payload_bytes = configuration->property(role + ".payload_bytes", 1024);
|
||||||
|
|
||||||
|
|
||||||
RF_channels_ = configuration->property(role + ".RF_channels", 1);
|
RF_channels_ = configuration->property(role + ".RF_channels", 1);
|
||||||
channels_in_udp_ = configuration->property(role + ".channels_in_udp", 1);
|
channels_in_udp_ = configuration->property(role + ".channels_in_udp", 1);
|
||||||
IQ_swap_ = configuration->property(role + ".IQ_swap", false);
|
IQ_swap_ = configuration->property(role + ".IQ_swap", false);
|
||||||
@ -70,7 +68,7 @@ CustomUDPSignalSource::CustomUDPSignalSource(ConfigurationInterface* configurati
|
|||||||
std::string default_sample_type = "cbyte";
|
std::string default_sample_type = "cbyte";
|
||||||
std::string sample_type = configuration->property(role + ".sample_type", default_sample_type);
|
std::string sample_type = configuration->property(role + ".sample_type", default_sample_type);
|
||||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||||
//output item size is always gr_complex
|
// output item size is always gr_complex
|
||||||
item_size_ = sizeof(gr_complex);
|
item_size_ = sizeof(gr_complex);
|
||||||
|
|
||||||
udp_gnss_rx_source_ = gr_complex_ip_packet_source::make(capture_device,
|
udp_gnss_rx_source_ = gr_complex_ip_packet_source::make(capture_device,
|
||||||
@ -95,7 +93,6 @@ CustomUDPSignalSource::CustomUDPSignalSource(ConfigurationInterface* configurati
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (dump_)
|
if (dump_)
|
||||||
{
|
{
|
||||||
for (int n = 0; n < channels_in_udp_; n++)
|
for (int n = 0; n < channels_in_udp_; n++)
|
||||||
@ -114,7 +111,7 @@ CustomUDPSignalSource::~CustomUDPSignalSource()
|
|||||||
|
|
||||||
void CustomUDPSignalSource::connect(gr::top_block_sptr top_block)
|
void CustomUDPSignalSource::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
//connect null sinks to unused streams
|
// connect null sinks to unused streams
|
||||||
for (int n = 0; n < channels_in_udp_; n++)
|
for (int n = 0; n < channels_in_udp_; n++)
|
||||||
{
|
{
|
||||||
top_block->connect(udp_gnss_rx_source_, n, null_sinks_.at(n), 0);
|
top_block->connect(udp_gnss_rx_source_, n, null_sinks_.at(n), 0);
|
||||||
@ -134,7 +131,7 @@ void CustomUDPSignalSource::connect(gr::top_block_sptr top_block)
|
|||||||
|
|
||||||
void CustomUDPSignalSource::disconnect(gr::top_block_sptr top_block)
|
void CustomUDPSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
//disconnect null sinks to unused streams
|
// disconnect null sinks to unused streams
|
||||||
for (int n = 0; n < channels_in_udp_; n++)
|
for (int n = 0; n < channels_in_udp_; n++)
|
||||||
{
|
{
|
||||||
top_block->disconnect(udp_gnss_rx_source_, n, null_sinks_.at(n), 0);
|
top_block->disconnect(udp_gnss_rx_source_, n, null_sinks_.at(n), 0);
|
||||||
@ -163,6 +160,7 @@ gr::basic_block_sptr CustomUDPSignalSource::get_right_block()
|
|||||||
return udp_gnss_rx_source_;
|
return udp_gnss_rx_source_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gr::basic_block_sptr CustomUDPSignalSource::get_right_block(__attribute__((unused)) int RF_channel)
|
gr::basic_block_sptr CustomUDPSignalSource::get_right_block(__attribute__((unused)) int RF_channel)
|
||||||
{
|
{
|
||||||
return udp_gnss_rx_source_;
|
return udp_gnss_rx_source_;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -18,35 +18,34 @@
|
|||||||
|
|
||||||
|
|
||||||
if(ENABLE_RAW_UDP)
|
if(ENABLE_RAW_UDP)
|
||||||
# - Try to find libpcap include dirs and libraries
|
# - Try to find libpcap include dirs and libraries
|
||||||
#
|
#
|
||||||
# Usage of this module as follows:
|
# Usage of this module as follows:
|
||||||
#
|
#
|
||||||
# find_package(PCAP)
|
# find_package(PCAP)
|
||||||
#
|
#
|
||||||
# Variables used by this module, they can change the default behaviour and need
|
# Variables used by this module, they can change the default behaviour and need
|
||||||
# to be set before calling find_package:
|
# to be set before calling find_package:
|
||||||
#
|
#
|
||||||
# PCAP_ROOT_DIR Set this variable to the root installation of
|
# PCAP_ROOT_DIR Set this variable to the root installation of
|
||||||
# libpcap if the module has problems finding the
|
# libpcap if the module has problems finding the
|
||||||
# proper installation path.
|
# proper installation path.
|
||||||
#
|
#
|
||||||
# Variables defined by this module:
|
# Variables defined by this module:
|
||||||
#
|
#
|
||||||
# PCAP_FOUND System has libpcap, include and library dirs found
|
# PCAP_FOUND System has libpcap, include and library dirs found
|
||||||
# PCAP_INCLUDE_DIR The libpcap include directories.
|
# PCAP_INCLUDE_DIR The libpcap include directories.
|
||||||
# PCAP_LIBRARY The libpcap library (possibly includes a thread
|
# PCAP_LIBRARY The libpcap library (possibly includes a thread
|
||||||
# library e.g. required by pf_ring's libpcap)
|
# library e.g. required by pf_ring's libpcap)
|
||||||
# HAVE_PF_RING If a found version of libpcap supports PF_RING
|
# HAVE_PF_RING If a found version of libpcap supports PF_RING
|
||||||
find_package(PCAP)
|
find_package(PCAP)
|
||||||
if(NOT PCAP_FOUND)
|
if(NOT PCAP_FOUND)
|
||||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
||||||
endif()
|
endif()
|
||||||
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
|
||||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
|
||||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
|
||||||
|
|
||||||
endif(ENABLE_RAW_UDP)
|
endif(ENABLE_RAW_UDP)
|
||||||
|
|
||||||
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
|
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
|
||||||
|
@ -24,17 +24,16 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <gnuradio/io_signature.h>
|
|
||||||
#include "gr_complex_ip_packet_source.h"
|
#include "gr_complex_ip_packet_source.h"
|
||||||
|
#include <gnuradio/io_signature.h>
|
||||||
|
|
||||||
#include <string.h>
|
//#include <cstdlib>
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define FIFO_SIZE 1472000
|
#define FIFO_SIZE 1472000
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -40,6 +40,7 @@
|
|||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <net/ethernet.h>
|
#include <net/ethernet.h>
|
||||||
#include <netinet/if_ether.h>
|
#include <netinet/if_ether.h>
|
||||||
|
#include <string>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
class gr_complex_ip_packet_source : virtual public gr::sync_block
|
class gr_complex_ip_packet_source : virtual public gr::sync_block
|
||||||
@ -77,12 +78,9 @@ private:
|
|||||||
|
|
||||||
void demux_samples(gr_vector_void_star output_items, int num_samples_readed);
|
void demux_samples(gr_vector_void_star output_items, int num_samples_readed);
|
||||||
void my_pcap_loop_thread(pcap_t *pcap_handle);
|
void my_pcap_loop_thread(pcap_t *pcap_handle);
|
||||||
|
|
||||||
void pcap_callback(u_char *args, const struct pcap_pkthdr *pkthdr, const u_char *packet);
|
void pcap_callback(u_char *args, const struct pcap_pkthdr *pkthdr, const u_char *packet);
|
||||||
|
|
||||||
static void static_pcap_callback(u_char *args, const struct pcap_pkthdr *pkthdr, const u_char *packet);
|
static void static_pcap_callback(u_char *args, const struct pcap_pkthdr *pkthdr, const u_char *packet);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef boost::shared_ptr<gr_complex_ip_packet_source> sptr;
|
typedef boost::shared_ptr<gr_complex_ip_packet_source> sptr;
|
||||||
static sptr make(std::string src_device,
|
static sptr make(std::string src_device,
|
||||||
@ -108,9 +106,9 @@ public:
|
|||||||
gr_vector_const_void_star &input_items,
|
gr_vector_const_void_star &input_items,
|
||||||
gr_vector_void_star &output_items);
|
gr_vector_void_star &output_items);
|
||||||
|
|
||||||
//Called by gnuradio to enable drivers, etc for i/o devices.
|
// Called by gnuradio to enable drivers, etc for i/o devices.
|
||||||
bool start();
|
bool start();
|
||||||
//Called by gnuradio to disable drivers, etc for i/o devices.
|
// Called by gnuradio to disable drivers, etc for i/o devices.
|
||||||
bool stop();
|
bool stop();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* \author Javier Arribas jarribas (at) cttc.es
|
* \author Javier Arribas jarribas (at) cttc.es
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
@ -25,7 +25,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* \author Javier Arribas jarribas (at) cttc.es
|
* \author Javier Arribas jarribas (at) cttc.es
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
@ -25,7 +25,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user