/* -*- c++ -*- */ /* * Copyright 2009, 2010, 2011, 2012, 2013, 2014 Max H. Parke KA1RBI * * 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_OP25_REPEATER_P25P1_VOICE_DECODE_H #define INCLUDED_OP25_REPEATER_P25P1_VOICE_DECODE_H #include #include #include #include #include #include "imbe_vocoder/imbe_vocoder.h" #include "imbe_decoder.h" #include "software_imbe_decoder.h" namespace gr { namespace op25_repeater { typedef std::vector bit_vector; class p25p1_voice_decode { private: // Nothing to declare in this block. public: p25p1_voice_decode(bool verbose_flag, const char* udp_host, int udp_port, std::deque &_output_queue); ~p25p1_voice_decode(); void rxframe(const uint32_t u[]); void rxchar(const char* c, int len); private: static const int RXBUF_MAX = 80; /* data items */ int write_sock; struct sockaddr_in write_sock_addr; int write_bufp; char write_buf[512]; char rxbuf[RXBUF_MAX]; int rxbufp ; imbe_vocoder vocoder; software_imbe_decoder software_decoder; bool d_software_imbe_decoder; std::deque &output_queue; bool opt_verbose; int opt_udp_port; /* local methods */ void init_sock(const char* udp_host, int udp_port); }; } // namespace op25_repeater } // namespace gr #endif /* INCLUDED_OP25_REPEATER_P25P1_VOICE_DECODE_H */