-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Group ID Check in Transmission Sink * last voice update * Update main.cc * Update call.h * Update call.h * debug * Update p25_recorder_decode.cc * accurate time diff on writes * Update transmission_sink.cc * Update transmission_sink.cc * additional group id spot * Update transmission_sink.cc * no Forecasts! * Revert "no Forecasts!" This reverts commit eca65e5. * let it rip * Update transmission_sink.cc * Update transmission_sink.cc * removed record_more stuff * better dbug * Update main.cc * Update main.cc * fixed loop * fix grp compare for smartnet and p25 * Update call_impl.cc * Update transmission_sink.cc * Update transmission_sink.cc * Update p25_recorder_decode.cc * Update main.cc * print out state of recorder during group mismatch * Update transmission_sink.cc * count Termination tooo * Update transmission_sink.cc * Update main.cc * Update main.cc * Update main.cc * Update main.cc * Update main.cc * Update main.cc * Update transmission_sink.cc * Update main.cc * Update main.cc * refining the messages * Switching back to processing UPDATEs as UPDATEs * Update p25p1_fdma.cc * Update transmission_sink.cc * I am going to totally forget to set this back * Update main.cc * different messages * Update main.cc * Update main.cc * upgrades * Update main.cc * Update transmission_sink.cc * might clear the buffer of blocks on stop * Update p25_recorder_impl.cc * not clean * adding latency manager * only start recording when the correct group ID is seen * Ignore TG Mismatch If Recorder gets a mismatched TG it will ignore til end of the transmission * Latency measurements seems to break when you have the tags go through a lot of downsampling * slight fixes * new FSK4 * different * cleaned up * Update p25_recorder_decode.cc * not having Updates start Calls * or maybe we should do updates * update FLL Band Edge * backed out most of the debugging * clean up for compiling * Update p25p2_tdma.cc * Config Option to turn on/off new calls from UPDATE
- Loading branch information
1 parent
15bed14
commit 6d68897
Showing
50 changed files
with
1,489 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2011,2012 Free Software Foundation, Inc. | ||
# | ||
# This file was generated by gr_modtool, a tool from the GNU Radio framework | ||
# This file is a part of gr-latency_manager | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
######################################################################## | ||
# Install public header files | ||
######################################################################## | ||
install(FILES | ||
api.h | ||
DESTINATION include/gnuradio/latency_manager | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2011 Free Software Foundation, Inc. | ||
* | ||
* This file was generated by gr_modtool, a tool from the GNU Radio framework | ||
* This file is a part of gr-latency_manager | ||
* | ||
* SPDX-License-Identifier: GPL-3.0-or-later | ||
* | ||
*/ | ||
|
||
#ifndef INCLUDED_LATENCY_MANAGER_API_H | ||
#define INCLUDED_LATENCY_MANAGER_API_H | ||
|
||
#include <gnuradio/attributes.h> | ||
|
||
#ifdef gnuradio_latency_manager_EXPORTS | ||
#define LATENCY_MANAGER_API __GR_ATTR_EXPORT | ||
#else | ||
#define LATENCY_MANAGER_API __GR_ATTR_IMPORT | ||
#endif | ||
|
||
#endif /* INCLUDED_LATENCY_MANAGER_API_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* -*- c++ -*- */ | ||
/* | ||
* Copyright 2019 Derek Kozel. | ||
* | ||
* This 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. | ||
* | ||
* This software 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 software; see the file COPYING. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street, | ||
* Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef INCLUDED_LATENCY_MANAGER_LATENCY_MANAGER_H | ||
#define INCLUDED_LATENCY_MANAGER_LATENCY_MANAGER_H | ||
|
||
#include "./api.h" | ||
#include <gnuradio/sync_block.h> | ||
|
||
namespace gr { | ||
namespace latency_manager { | ||
|
||
/*! | ||
* \brief <+description of block+> | ||
* \ingroup latency_manager | ||
* | ||
*/ | ||
class LATENCY_MANAGER_API latency_manager : virtual public gr::sync_block | ||
{ | ||
public: | ||
typedef std::shared_ptr<latency_manager> sptr; | ||
|
||
static sptr make(int max_tags_in_flight, int tag_interval, int itemsize); | ||
}; | ||
|
||
} // namespace latency_manager | ||
} // namespace gr | ||
|
||
#endif /* INCLUDED_LATENCY_MANAGER_LATENCY_MANAGER_H */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* -*- c++ -*- */ | ||
/* | ||
* Copyright 2019 Derek Kozel. | ||
* | ||
* This 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. | ||
* | ||
* This software 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 software; see the file COPYING. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street, | ||
* Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef INCLUDED_LATENCY_MANAGER_TAG_TO_MSG_H | ||
#define INCLUDED_LATENCY_MANAGER_TAG_TO_MSG_H | ||
|
||
#include "./api.h" | ||
#include <gnuradio/sync_block.h> | ||
|
||
namespace gr { | ||
namespace latency_manager { | ||
|
||
/*! | ||
* \brief <+description of block+> | ||
* \ingroup latency_manager | ||
* | ||
*/ | ||
class LATENCY_MANAGER_API tag_to_msg : virtual public gr::sync_block | ||
{ | ||
public: | ||
typedef std::shared_ptr<tag_to_msg> sptr; | ||
|
||
static sptr make(size_t sizeof_stream_item, | ||
const std::string& name, | ||
const std::string& key_filter = ""); | ||
|
||
/*! | ||
* \brief Returns a vector of tag_t items as of the last call to | ||
* work. | ||
*/ | ||
virtual std::vector<tag_t> current_tags() = 0; | ||
|
||
/*! | ||
* \brief Return the total number of tags in the tag queue. | ||
*/ | ||
virtual int num_tags() = 0; | ||
|
||
/*! | ||
* \brief Set the display of tags to stdout on/off. | ||
*/ | ||
virtual void set_display(bool d) = 0; | ||
|
||
/*! | ||
* \brief Set a new key to filter with. | ||
*/ | ||
virtual void set_key_filter(const std::string& key_filter) = 0; | ||
|
||
/*! | ||
* \brief Get the current filter key. | ||
*/ | ||
virtual std::string key_filter() const = 0; | ||
}; | ||
} // namespace latency_manager | ||
} // namespace gr | ||
|
||
#endif /* INCLUDED_LATENCY_MANAGER_TAG_TO_MSG_H */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright 2011,2012,2016,2018,2019 Free Software Foundation, Inc. | ||
# | ||
# This file was generated by gr_modtool, a tool from the GNU Radio framework | ||
# This file is a part of gr-latency_manager | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
######################################################################## | ||
# Setup library | ||
######################################################################## | ||
include(GrPlatform) #define LIB_SUFFIX | ||
list(APPEND latency_manager_sources | ||
tag_to_msg_impl.cc | ||
latency_manager_impl.cc | ||
) | ||
|
||
set(latency_manager_sources "${latency_manager_sources}" PARENT_SCOPE) | ||
if(NOT latency_manager_sources) | ||
MESSAGE(STATUS "No C++ sources... skipping lib/") | ||
return() | ||
endif(NOT latency_manager_sources) | ||
|
||
add_library(gnuradio-latency_manager SHARED ${latency_manager_sources}) | ||
target_link_libraries(gnuradio-latency_manager gnuradio::gnuradio-runtime) | ||
target_include_directories(gnuradio-latency_manager | ||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include> | ||
PUBLIC $<INSTALL_INTERFACE:include> | ||
) | ||
set_target_properties(gnuradio-latency_manager PROPERTIES DEFINE_SYMBOL "gnuradio_latency_manager_EXPORTS") | ||
|
||
if(APPLE) | ||
set_target_properties(gnuradio-latency_manager PROPERTIES | ||
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" | ||
) | ||
endif(APPLE) | ||
|
||
######################################################################## | ||
# Install built library files | ||
######################################################################## | ||
include(GrMiscUtils) | ||
GR_LIBRARY_FOO(gnuradio-latency_manager) | ||
|
||
######################################################################## | ||
# Print summary | ||
######################################################################## | ||
message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") | ||
message(STATUS "Building for version: ${VERSION} / ${LIBVER}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* -*- c++ -*- */ | ||
/* | ||
* Copyright 2019 Derek Kozel. | ||
* | ||
* This 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. | ||
* | ||
* This software 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 software; see the file COPYING. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street, | ||
* Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifdef HAVE_CONFIG_H | ||
#include "config.h" | ||
#endif | ||
|
||
#include <gnuradio/io_signature.h> | ||
#include "latency_manager_impl.h" | ||
#include <boost/thread/thread.hpp> | ||
|
||
namespace gr { | ||
namespace latency_manager { | ||
|
||
latency_manager::sptr | ||
latency_manager::make(int max_tags_in_flight, int tag_interval, int itemsize) | ||
{ | ||
return gnuradio::get_initial_sptr | ||
(new latency_manager_impl(max_tags_in_flight, tag_interval, itemsize)); | ||
} | ||
|
||
void latency_manager_impl::add_token(pmt::pmt_t msg) | ||
{ | ||
d_tokens++; | ||
//std::cout << "Tokens: " << d_tokens << " : Added one\n"; | ||
} | ||
|
||
latency_manager_impl::latency_manager_impl(int max_tags_in_flight, int tag_interval, int itemsize) | ||
: gr::sync_block("latency_manager", | ||
gr::io_signature::make(1, 1, itemsize), | ||
gr::io_signature::make(1, 1, itemsize)), | ||
d_itemsize(itemsize), | ||
d_tag_interval(tag_interval), | ||
d_tag_phase(0) | ||
{ | ||
d_tokens = max_tags_in_flight; | ||
message_port_register_in(pmt::mp("token")); | ||
set_msg_handler(pmt::mp("token"), [this](pmt::pmt_t msg) { this->add_token(msg); }); | ||
d_tag.key = pmt::intern("latency_strobe"); | ||
d_tag.srcid = alias_pmt(); | ||
|
||
} | ||
|
||
latency_manager_impl::~latency_manager_impl() | ||
{ | ||
} | ||
|
||
int | ||
latency_manager_impl::work(int noutput_items, | ||
gr_vector_const_void_star &input_items, | ||
gr_vector_void_star &output_items) | ||
{ | ||
const char *in = (const char*) input_items[0]; | ||
char *out = (char *) output_items[0]; | ||
|
||
int copy_count = std::min(noutput_items, d_tag_phase + d_tokens * d_tag_interval); | ||
std::memcpy(out, in, copy_count * d_itemsize); | ||
//std::cout << "Copied: " << copy_count << "\n"; | ||
int tag_loc = d_tag_phase; | ||
while (tag_loc < copy_count) { | ||
|
||
d_tag.offset = nitems_written(0) + tag_loc; | ||
d_tag.value = pmt::from_long(tag_loc); | ||
//std::cout << "Add Tag: " << tag_loc << " nitems_written: " << nitems_written(0) << "\n"; | ||
add_item_tag(0,d_tag); | ||
tag_loc += d_tag_interval; | ||
d_tokens--; | ||
} | ||
d_tag_phase = tag_loc - copy_count; | ||
if(copy_count == 0) { | ||
boost::this_thread::sleep(boost::posix_time::microseconds(long(100))); | ||
} | ||
return copy_count; | ||
} | ||
} /* namespace latency_manager */ | ||
} /* namespace gr */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* -*- c++ -*- */ | ||
/* | ||
* Copyright 2019 Derek Kozel. | ||
* | ||
* This 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. | ||
* | ||
* This software 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 software; see the file COPYING. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street, | ||
* Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef INCLUDED_LATENCY_MANAGER_LATENCY_MANAGER_IMPL_H | ||
#define INCLUDED_LATENCY_MANAGER_LATENCY_MANAGER_IMPL_H | ||
|
||
#include "../include/latency_manager.h" | ||
|
||
namespace gr { | ||
namespace latency_manager { | ||
|
||
class latency_manager_impl : public latency_manager | ||
{ | ||
private: | ||
int d_tokens; | ||
void add_token(pmt::pmt_t tag); | ||
int d_itemsize; | ||
int d_tag_interval; | ||
int d_tag_phase; | ||
tag_t d_tag; | ||
|
||
public: | ||
latency_manager_impl(int max_tags_in_flight, int tag_interval, int itemsize); | ||
~latency_manager_impl(); | ||
|
||
// Where all the action really happens | ||
int work( | ||
int noutput_items, | ||
gr_vector_const_void_star &input_items, | ||
gr_vector_void_star &output_items | ||
); | ||
}; | ||
|
||
} // namespace latency_manager | ||
} // namespace gr | ||
|
||
#endif /* INCLUDED_LATENCY_MANAGER_LATENCY_MANAGER_IMPL_H */ | ||
|
Oops, something went wrong.