Initial Commit

This commit is contained in:
Jordan Sherer
2018-02-08 21:28:33 -05:00
commit 678c1d3966
14352 changed files with 3176737 additions and 0 deletions
@@ -0,0 +1,54 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_ALGORITHM_REMOVE_HPP
#define BOOST_COMPUTE_ALGORITHM_REMOVE_HPP
#include <boost/compute/lambda.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/algorithm/remove_if.hpp>
#include <boost/compute/type_traits/vector_size.hpp>
namespace boost {
namespace compute {
/// Removes each element equal to \p value in the range [\p first,
/// \p last).
///
/// \see remove_if()
template<class Iterator, class T>
inline Iterator remove(Iterator first,
Iterator last,
const T &value,
command_queue &queue = system::default_queue())
{
typedef typename std::iterator_traits<Iterator>::value_type value_type;
using ::boost::compute::_1;
using ::boost::compute::lambda::all;
if(vector_size<value_type>::value == 1){
return ::boost::compute::remove_if(first,
last,
_1 == value,
queue);
}
else {
return ::boost::compute::remove_if(first,
last,
all(_1 == value),
queue);
}
}
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_ALGORITHM_REMOVE_HPP
@@ -0,0 +1,16 @@
#
# QCustomPlot Plot Examples
#
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = refspec
TEMPLATE = app
SOURCES += main.cpp mainwindow.cpp qcustomplot.cpp
HEADERS += mainwindow.h qcustomplot.h
FORMS += mainwindow.ui
@@ -0,0 +1,29 @@
subroutine flat1a(psavg,nsmo,s2,nh,nsteps,nhmax,nsmax)
real psavg(nh)
real s2(nhmax,nsmax)
real x(8192)
ia=nsmo/2 + 1
ib=nh - nsmo/2 - 1
do i=ia,ib
call pctile(psavg(i-nsmo/2),nsmo,50,x(i))
enddo
do i=1,ia-1
x(i)=x(ia)
enddo
do i=ib+1,nh
x(i)=x(ib)
enddo
do i=1,nh
psavg(i)=psavg(i)/x(i)
do j=1,nsteps
s2(i,j)=s2(i,j)/x(i)
enddo
enddo
return
end subroutine flat1a
@@ -0,0 +1,33 @@
# /* **************************************************************************
# * *
# * (C) Copyright Edward Diener 2011. *
# * (C) Copyright Paul Mensonides 2011. *
# * Distributed under the Boost Software License, Version 1.0. (See *
# * accompanying file LICENSE_1_0.txt or copy at *
# * http://www.boost.org/LICENSE_1_0.txt) *
# * *
# ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_ARRAY_ENUM_HPP
# define BOOST_PREPROCESSOR_ARRAY_ENUM_HPP
#
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/config/config.hpp>
# include <boost/preprocessor/tuple/rem.hpp>
#
# /* BOOST_PP_ARRAY_ENUM */
#
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
# define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(BOOST_PP_TUPLE_REM_CTOR, array)
# define BOOST_PP_ARRAY_ENUM_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args)
# define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(m ## args,)
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
# define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(array)
# define BOOST_PP_ARRAY_ENUM_I(array) BOOST_PP_TUPLE_REM_CTOR ## array
# else
# define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_TUPLE_REM_CTOR array
# endif
#
# endif
@@ -0,0 +1,336 @@
// Copyright 2005-2009 Daniel James.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP)
#define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP
#include <boost/config.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#include <boost/config/no_tr1/cmath.hpp>
// Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have
// sufficiently good floating point support to not require any
// workarounds.
//
// When set to 0, the library tries to automatically
// use the best available implementation. This normally works well, but
// breaks when ambiguities are created by odd namespacing of the functions.
//
// Note that if this is set to 0, the library should still take full
// advantage of the platform's floating point support.
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(__LIBCOMO__)
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
// Rogue Wave library:
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(_LIBCPP_VERSION)
// libc++
# define BOOST_HASH_CONFORMANT_FLOATS 1
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
// GNU libstdc++ 3
# if defined(__GNUC__) && __GNUC__ >= 4
# define BOOST_HASH_CONFORMANT_FLOATS 1
# else
# define BOOST_HASH_CONFORMANT_FLOATS 0
# endif
#elif defined(__STL_CONFIG_H)
// generic SGI STL
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(__MSL_CPP__)
// MSL standard lib:
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(__IBMCPP__)
// VACPP std lib (probably conformant for much earlier version).
# if __IBMCPP__ >= 1210
# define BOOST_HASH_CONFORMANT_FLOATS 1
# else
# define BOOST_HASH_CONFORMANT_FLOATS 0
# endif
#elif defined(MSIPL_COMPILE_H)
// Modena C++ standard library
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
// Dinkumware Library (this has to appear after any possible replacement libraries):
# if _CPPLIB_VER >= 405
# define BOOST_HASH_CONFORMANT_FLOATS 1
# else
# define BOOST_HASH_CONFORMANT_FLOATS 0
# endif
#else
# define BOOST_HASH_CONFORMANT_FLOATS 0
#endif
#if BOOST_HASH_CONFORMANT_FLOATS
// The standard library is known to be compliant, so don't use the
// configuration mechanism.
namespace boost {
namespace hash_detail {
template <typename Float>
struct call_ldexp {
typedef Float float_type;
inline Float operator()(Float x, int y) const {
return std::ldexp(x, y);
}
};
template <typename Float>
struct call_frexp {
typedef Float float_type;
inline Float operator()(Float x, int* y) const {
return std::frexp(x, y);
}
};
template <typename Float>
struct select_hash_type
{
typedef Float type;
};
}
}
#else // BOOST_HASH_CONFORMANT_FLOATS == 0
// The C++ standard requires that the C float functions are overloarded
// for float, double and long double in the std namespace, but some of the older
// library implementations don't support this. On some that don't, the C99
// float functions (frexpf, frexpl, etc.) are available.
//
// The following tries to automatically detect which are available.
namespace boost {
namespace hash_detail {
// Returned by dummy versions of the float functions.
struct not_found {
// Implicitly convertible to float and long double in order to avoid
// a compile error when the dummy float functions are used.
inline operator float() const { return 0; }
inline operator long double() const { return 0; }
};
// A type for detecting the return type of functions.
template <typename T> struct is;
template <> struct is<float> { char x[10]; };
template <> struct is<double> { char x[20]; };
template <> struct is<long double> { char x[30]; };
template <> struct is<boost::hash_detail::not_found> { char x[40]; };
// Used to convert the return type of a function to a type for sizeof.
template <typename T> is<T> float_type(T);
// call_ldexp
//
// This will get specialized for float and long double
template <typename Float> struct call_ldexp
{
typedef double float_type;
inline double operator()(double a, int b) const
{
using namespace std;
return ldexp(a, b);
}
};
// call_frexp
//
// This will get specialized for float and long double
template <typename Float> struct call_frexp
{
typedef double float_type;
inline double operator()(double a, int* b) const
{
using namespace std;
return frexp(a, b);
}
};
}
}
// A namespace for dummy functions to detect when the actual function we want
// isn't available. ldexpl, ldexpf etc. might be added tby the macros below.
//
// AFAICT these have to be outside of the boost namespace, as if they're in
// the boost namespace they'll always be preferable to any other function
// (since the arguments are built in types, ADL can't be used).
namespace boost_hash_detect_float_functions {
template <class Float> boost::hash_detail::not_found ldexp(Float, int);
template <class Float> boost::hash_detail::not_found frexp(Float, int*);
}
// Macros for generating specializations of call_ldexp and call_frexp.
//
// check_cpp and check_c99 check if the C++ or C99 functions are available.
//
// Then the call_* functions select an appropriate implementation.
//
// I used c99_func in a few places just to get a unique name.
//
// Important: when using 'using namespace' at namespace level, include as
// little as possible in that namespace, as Visual C++ has an odd bug which
// can cause the namespace to be imported at the global level. This seems to
// happen mainly when there's a template in the same namesapce.
#define BOOST_HASH_CALL_FLOAT_FUNC(cpp_func, c99_func, type1, type2) \
namespace boost_hash_detect_float_functions { \
template <class Float> \
boost::hash_detail::not_found c99_func(Float, type2); \
} \
\
namespace boost { \
namespace hash_detail { \
namespace c99_func##_detect { \
using namespace std; \
using namespace boost_hash_detect_float_functions; \
\
struct check { \
static type1 x; \
static type2 y; \
BOOST_STATIC_CONSTANT(bool, cpp = \
sizeof(float_type(cpp_func(x,y))) \
== sizeof(is<type1>)); \
BOOST_STATIC_CONSTANT(bool, c99 = \
sizeof(float_type(c99_func(x,y))) \
== sizeof(is<type1>)); \
}; \
} \
\
template <bool x> \
struct call_c99_##c99_func : \
boost::hash_detail::call_##cpp_func<double> {}; \
\
template <> \
struct call_c99_##c99_func<true> { \
typedef type1 float_type; \
\
template <typename T> \
inline type1 operator()(type1 a, T b) const \
{ \
using namespace std; \
return c99_func(a, b); \
} \
}; \
\
template <bool x> \
struct call_cpp_##c99_func : \
call_c99_##c99_func< \
::boost::hash_detail::c99_func##_detect::check::c99 \
> {}; \
\
template <> \
struct call_cpp_##c99_func<true> { \
typedef type1 float_type; \
\
template <typename T> \
inline type1 operator()(type1 a, T b) const \
{ \
using namespace std; \
return cpp_func(a, b); \
} \
}; \
\
template <> \
struct call_##cpp_func<type1> : \
call_cpp_##c99_func< \
::boost::hash_detail::c99_func##_detect::check::cpp \
> {}; \
} \
}
#define BOOST_HASH_CALL_FLOAT_MACRO(cpp_func, c99_func, type1, type2) \
namespace boost { \
namespace hash_detail { \
\
template <> \
struct call_##cpp_func<type1> { \
typedef type1 float_type; \
inline type1 operator()(type1 x, type2 y) const { \
return c99_func(x, y); \
} \
}; \
} \
}
#if defined(ldexpf)
BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpf, float, int)
#else
BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpf, float, int)
#endif
#if defined(ldexpl)
BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpl, long double, int)
#else
BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpl, long double, int)
#endif
#if defined(frexpf)
BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpf, float, int*)
#else
BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpf, float, int*)
#endif
#if defined(frexpl)
BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpl, long double, int*)
#else
BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpl, long double, int*)
#endif
#undef BOOST_HASH_CALL_FLOAT_MACRO
#undef BOOST_HASH_CALL_FLOAT_FUNC
namespace boost
{
namespace hash_detail
{
template <typename Float1, typename Float2>
struct select_hash_type_impl {
typedef double type;
};
template <>
struct select_hash_type_impl<float, float> {
typedef float type;
};
template <>
struct select_hash_type_impl<long double, long double> {
typedef long double type;
};
// select_hash_type
//
// If there is support for a particular floating point type, use that
// otherwise use double (there's always support for double).
template <typename Float>
struct select_hash_type : select_hash_type_impl<
BOOST_DEDUCED_TYPENAME call_ldexp<Float>::float_type,
BOOST_DEDUCED_TYPENAME call_frexp<Float>::float_type
> {};
}
}
#endif // BOOST_HASH_CONFORMANT_FLOATS
#endif
@@ -0,0 +1,283 @@
// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
//------------------------------------------------------------------------------
// this file has been generated from the master.hpp file in the same directory
# define BOOST_FT_mfp 0
# define BOOST_FT_syntax BOOST_FT_type_function
# if ! ! (4 & (BOOST_FT_variations))
# if (519 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv
# define BOOST_FT_flags 519
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (4 & (BOOST_FT_variations))
# if (263 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv
# define BOOST_FT_flags 263
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if !BOOST_FT_NO_CV_FUNC_SUPPORT
# if ! ! (4 & (BOOST_FT_variations))
# if (1543 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv const
# define BOOST_FT_flags 1543
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (4 & (BOOST_FT_variations))
# if (1287 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv const
# define BOOST_FT_flags 1287
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (4 & (BOOST_FT_variations))
# if (2567 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv volatile
# define BOOST_FT_flags 2567
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (4 & (BOOST_FT_variations))
# if (2311 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv volatile
# define BOOST_FT_flags 2311
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (4 & (BOOST_FT_variations))
# if (3591 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv const volatile
# define BOOST_FT_flags 3591
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (4 & (BOOST_FT_variations))
# if (3335 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv const volatile
# define BOOST_FT_flags 3335
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# endif
# undef BOOST_FT_syntax
# define BOOST_FT_syntax BOOST_FT_type_function_pointer
# if ! ! (8 & (BOOST_FT_variations))
# if (523 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv
# define BOOST_FT_flags 523
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (8 & (BOOST_FT_variations))
# if (267 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv
# define BOOST_FT_flags 267
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# undef BOOST_FT_syntax
# define BOOST_FT_syntax BOOST_FT_type_function_reference
# if ! ! (16 & (BOOST_FT_variations))
# if (531 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv
# define BOOST_FT_flags 531
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (16 & (BOOST_FT_variations))
# if (275 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv
# define BOOST_FT_flags 275
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# undef BOOST_FT_syntax
# undef BOOST_FT_mfp
# define BOOST_FT_mfp 1
# define BOOST_FT_syntax BOOST_FT_type_member_function_pointer
# if ! ! (96 & (BOOST_FT_variations))
# if (609 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv
# define BOOST_FT_flags 609
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (96 & (BOOST_FT_variations))
# if (353 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv
# define BOOST_FT_flags 353
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (96 & (BOOST_FT_variations))
# if (1633 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv const
# define BOOST_FT_flags 1633
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (96 & (BOOST_FT_variations))
# if (1377 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv const
# define BOOST_FT_flags 1377
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (96 & (BOOST_FT_variations))
# if (2657 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv volatile
# define BOOST_FT_flags 2657
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (96 & (BOOST_FT_variations))
# if (2401 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv volatile
# define BOOST_FT_flags 2401
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (96 & (BOOST_FT_variations))
# if (3681 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv const volatile
# define BOOST_FT_flags 3681
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# if ! ! (96 & (BOOST_FT_variations))
# if (3425 & (BOOST_FT_cond)) == (BOOST_FT_cond)
# define BOOST_FT_ell ...
# define BOOST_FT_nullary_param
# define BOOST_FT_cv const volatile
# define BOOST_FT_flags 3425
# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
# undef BOOST_FT_flags
# endif
# endif
# undef BOOST_FT_syntax
# undef BOOST_FT_mfp
@@ -0,0 +1,144 @@
#ifndef BOOST_MPL_MAP_AUX_AT_IMPL_HPP_INCLUDED
#define BOOST_MPL_MAP_AUX_AT_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/at_fwd.hpp>
#include <boost/mpl/long.hpp>
#include <boost/mpl/map/aux_/tag.hpp>
#include <boost/mpl/aux_/order_impl.hpp>
#include <boost/mpl/aux_/overload_names.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/ptr_to_ref.hpp>
#include <boost/mpl/aux_/static_cast.hpp>
#include <boost/mpl/aux_/config/typeof.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#if !defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
# include <boost/mpl/eval_if.hpp>
# include <boost/mpl/pair.hpp>
# include <boost/mpl/void.hpp>
# include <boost/mpl/aux_/config/static_constant.hpp>
#endif
namespace boost { namespace mpl {
#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
template< typename Map, typename Key >
struct m_at
{
typedef aux::type_wrapper<Key> key_;
typedef __typeof__( BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(
Map
, BOOST_MPL_AUX_STATIC_CAST(key_*, 0)
) ) type;
};
template<>
struct at_impl< aux::map_tag >
{
template< typename Map, typename Key > struct apply
: aux::wrapped_type< typename m_at<
Map
, Key
>::type >
{
};
};
// agurt 31/jan/04: two-step implementation for the sake of GCC 3.x
template< typename Map, long order >
struct item_by_order_impl
{
typedef __typeof__( BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(
Map
, BOOST_MPL_AUX_STATIC_CAST(long_<order>*, 0)
) ) type;
};
template< typename Map, long order >
struct item_by_order
: aux::wrapped_type<
typename item_by_order_impl<Map,order>::type
>
{
};
#else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Map, long n > struct m_at
{
typedef void_ type;
};
# else
template< long n > struct m_at_impl
{
template< typename Map > struct result_
{
typedef void_ type;
};
};
template< typename Map, long n > struct m_at
{
typedef typename m_at_impl<n>::result_<Map>::type type;
};
# endif
template<>
struct at_impl< aux::map_tag >
{
template< typename Map, typename Key > struct apply
{
typedef typename m_at< Map, (x_order_impl<Map,Key>::value - 2) >::type item_;
typedef typename eval_if<
is_void_<item_>
, void_
, second<item_>
>::type type;
};
};
template< typename Map, long order > struct is_item_masked
{
BOOST_STATIC_CONSTANT(bool, value =
sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
Map
, BOOST_MPL_AUX_STATIC_CAST(long_<order>*, 0)
) ) == sizeof(aux::yes_tag)
);
};
template< typename Map, long order > struct item_by_order
{
typedef typename eval_if_c<
is_item_masked<Map,order>::value
, void_
, m_at<Map,(order - 2)>
>::type type;
};
#endif
}}
#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
@@ -0,0 +1,179 @@
/*
[auto_generated]
boost/numeric/odeint/integrate/integrate_n_steps.hpp
[begin_description]
Integration of n steps with constant time size. Adaptive and dense-output methods are fully supported.
[end_description]
Copyright 2011-2013 Karsten Ahnert
Copyright 2011-2015 Mario Mulansky
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
#include <boost/type_traits/is_same.hpp>
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
#include <boost/numeric/odeint/integrate/null_observer.hpp>
#include <boost/numeric/odeint/integrate/detail/integrate_n_steps.hpp>
namespace boost {
namespace numeric {
namespace odeint {
/*
* Integrates n steps
*
* the two overloads are needed in order to solve the forwarding problem
*/
template< class Stepper , class System , class State , class Time , class Observer , class StepOverflowChecker >
Time integrate_n_steps(
Stepper stepper , System system , State &start_state ,
Time start_time , Time dt , size_t num_of_steps ,
Observer observer , StepOverflowChecker checker )
{
// unwrap references
typedef typename odeint::unwrap_reference< Stepper >::type stepper_type;
typedef typename odeint::unwrap_reference< Observer >::type observer_type;
typedef typename odeint::unwrap_reference< StepOverflowChecker >::type checker_type;
typedef typename stepper_type::stepper_category stepper_category;
return detail::integrate_n_steps(
checked_stepper<stepper_type, checker_type>(stepper, checker),
system , start_state ,
start_time , dt , num_of_steps ,
checked_observer<observer_type, checker_type>(observer, checker),
stepper_category() );
}
/**
* \brief Solves the forwarding problem, can be called with Boost.Range as start_state.
*/
template< class Stepper , class System , class State , class Time , class Observer , class StepOverflowChecker >
Time integrate_n_steps(
Stepper stepper , System system , const State &start_state ,
Time start_time , Time dt , size_t num_of_steps ,
Observer observer , StepOverflowChecker checker )
{
typedef typename odeint::unwrap_reference< Stepper >::type stepper_type;
typedef typename odeint::unwrap_reference< Observer >::type observer_type;
typedef typename odeint::unwrap_reference< StepOverflowChecker >::type checker_type;
typedef typename stepper_type::stepper_category stepper_category;
return detail::integrate_n_steps(
checked_stepper<stepper_type, checker_type>(stepper, checker),
system , start_state ,
start_time , dt , num_of_steps ,
checked_observer<observer_type, checker_type>(observer, checker),
stepper_category() );
}
/**
* \brief The same function as above, but without checker.
*/
template< class Stepper , class System , class State , class Time , class Observer >
Time integrate_n_steps(
Stepper stepper , System system , State &start_state ,
Time start_time , Time dt , size_t num_of_steps , Observer observer )
{
typedef typename odeint::unwrap_reference<Stepper>::type::stepper_category stepper_category;
return detail::integrate_n_steps(
stepper , system , start_state ,
start_time , dt , num_of_steps ,
observer , stepper_category() );
}
/**
* \brief Solves the forwarding problem, can be called with Boost.Range as start_state.
*/
template< class Stepper , class System , class State , class Time , class Observer >
Time integrate_n_steps(
Stepper stepper , System system , const State &start_state ,
Time start_time , Time dt , size_t num_of_steps , Observer observer )
{
typedef typename odeint::unwrap_reference<Stepper>::type::stepper_category stepper_category;
return detail::integrate_n_steps(
stepper , system , start_state ,
start_time , dt , num_of_steps ,
observer , stepper_category() );
}
/**
* \brief The same function as above, but without observer calls.
*/
template< class Stepper , class System , class State , class Time >
Time integrate_n_steps(
Stepper stepper , System system , State &start_state ,
Time start_time , Time dt , size_t num_of_steps )
{
return integrate_n_steps(stepper, system, start_state, start_time,
dt, num_of_steps, null_observer());
}
/**
* \brief Solves the forwarding problem, can be called with Boost.Range as start_state.
*/
template< class Stepper , class System , class State , class Time >
Time integrate_n_steps(
Stepper stepper , System system , const State &start_state ,
Time start_time , Time dt , size_t num_of_steps )
{
return integrate_n_steps(stepper, system, start_state, start_time,
dt, num_of_steps, null_observer());
}
/************* DOXYGEN *************/
/**
* \fn Time integrate_n_steps( Stepper stepper , System system , State &start_state , Time start_time , Time dt , size_t num_of_steps , Observer observer )
* \brief Integrates the ODE with constant step size.
*
* This function is similar to integrate_const. The observer is called at
* equidistant time intervals t0 + n*dt.
* If the Stepper is a normal stepper without step size control, dt is also
* used for the numerical scheme. If a ControlledStepper is provided, the
* algorithm might reduce the step size to meet the error bounds, but it is
* ensured that the observer is always called at equidistant time points
* t0 + n*dt. If a DenseOutputStepper is used, the step size also may vary
* and the dense output is used to call the observer at equidistant time
* points. The final integration time is always t0 + num_of_steps*dt.
* If a max_step_checker is provided as StepOverflowChecker, a
* no_progress_errror is thrown if too many steps (default: 500) are
* performed without progress, i.e. in between observer calls. If no
* checker is provided, no such overflow check is performed.
*
* \param stepper The stepper to be used for numerical integration.
* \param system Function/Functor defining the rhs of the ODE.
* \param start_state The initial condition x0.
* \param start_time The initial time t0.
* \param dt The time step between observer calls, _not_ necessarily the
* time step of the integration.
* \param num_of_steps Number of steps to be performed
* \param observer Function/Functor called at equidistant time intervals.
* \param checker [optional] Functor to check for step count overflows, if no
* checker is provided, no exception is thrown.
* \return The number of steps performed.
*/
} // namespace odeint
} // namespace numeric
} // namespace boost
#endif // BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
@@ -0,0 +1,105 @@
#include "Modes.hpp"
#include <algorithm>
#include <QString>
#include <QVariant>
#include <QModelIndex>
#include "moc_Modes.cpp"
namespace
{
// human readable strings for each Mode enumeration value
char const * const mode_names[] =
{
"",
"JT65",
"JT9",
"JT4",
"WSPR",
"Echo",
"ISCAT",
"MSK144",
"QRA64",
"FreqCal"
};
std::size_t constexpr mode_names_size = sizeof (mode_names) / sizeof (mode_names[0]);
}
Modes::Modes (QObject * parent)
: QAbstractListModel {parent}
{
static_assert (mode_names_size == MODES_END_SENTINAL_AND_COUNT,
"mode_names array must match Mode enumeration");
}
char const * Modes::name (Mode m)
{
return mode_names[static_cast<int> (m)];
}
auto Modes::value (QString const& s) -> Mode
{
auto end = mode_names + mode_names_size;
auto p = std::find_if (mode_names, end
, [&s] (char const * const name) {
return name == s;
});
return p != end ? static_cast<Mode> (p - mode_names) : NULL_MODE;
}
QVariant Modes::data (QModelIndex const& index, int role) const
{
QVariant item;
if (index.isValid ())
{
auto const& row = index.row ();
switch (role)
{
case Qt::ToolTipRole:
case Qt::AccessibleDescriptionRole:
item = tr ("Mode");
break;
case Qt::EditRole:
item = static_cast<Mode> (row);
break;
case Qt::DisplayRole:
case Qt::AccessibleTextRole:
item = mode_names[row];
break;
case Qt::TextAlignmentRole:
item = Qt::AlignHCenter + Qt::AlignVCenter;
break;
}
}
return item;
}
QVariant Modes::headerData (int section, Qt::Orientation orientation, int role) const
{
QVariant result;
if (Qt::DisplayRole == role && Qt::Horizontal == orientation)
{
result = tr ("Mode");
}
else
{
result = QAbstractListModel::headerData (section, orientation, role);
}
return result;
}
#if !defined (QT_NO_DEBUG_STREAM)
ENUM_QDEBUG_OPS_IMPL (Modes, Mode);
#endif
ENUM_QDATASTREAM_OPS_IMPL (Modes, Mode);
ENUM_CONVERSION_OPS_IMPL (Modes, Mode);
@@ -0,0 +1,121 @@
//
//=======================================================================
// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#ifndef BOOST_GRAPH_DETAIL_EDGE_HPP
#define BOOST_GRAPH_DETAIL_EDGE_HPP
#include <iosfwd>
#include <boost/functional/hash.hpp>
namespace boost {
namespace detail {
template <typename Directed, typename Vertex>
struct edge_base
{
inline edge_base() {}
inline edge_base(Vertex s, Vertex d)
: m_source(s), m_target(d) { }
Vertex m_source;
Vertex m_target;
};
template <typename Directed, typename Vertex>
class edge_desc_impl : public edge_base<Directed,Vertex> {
typedef edge_desc_impl self;
typedef edge_base<Directed,Vertex> Base;
public:
typedef void property_type;
inline edge_desc_impl() : m_eproperty(0) {}
inline edge_desc_impl(Vertex s, Vertex d, const property_type* eplug)
: Base(s,d), m_eproperty(const_cast<property_type*>(eplug)) { }
property_type* get_property() { return m_eproperty; }
const property_type* get_property() const { return m_eproperty; }
// protected:
property_type* m_eproperty;
};
template <class D, class V>
inline bool
operator==(const detail::edge_desc_impl<D,V>& a,
const detail::edge_desc_impl<D,V>& b)
{
return a.get_property() == b.get_property();
}
template <class D, class V>
inline bool
operator!=(const detail::edge_desc_impl<D,V>& a,
const detail::edge_desc_impl<D,V>& b)
{
return ! (a.get_property() == b.get_property());
}
// Order edges according to the address of their property object
template <class D, class V>
inline bool
operator<(const detail::edge_desc_impl<D,V>& a,
const detail::edge_desc_impl<D,V>& b)
{
return a.get_property() < b.get_property();
}
template <class D, class V>
inline bool
operator<=(const detail::edge_desc_impl<D,V>& a,
const detail::edge_desc_impl<D,V>& b)
{
return a.get_property() <= b.get_property();
}
template <class D, class V>
inline bool
operator>(const detail::edge_desc_impl<D,V>& a,
const detail::edge_desc_impl<D,V>& b)
{
return a.get_property() > b.get_property();
}
template <class D, class V>
inline bool
operator>=(const detail::edge_desc_impl<D,V>& a,
const detail::edge_desc_impl<D,V>& b)
{
return a.get_property() >= b.get_property();
}
} //namespace detail
} // namespace boost
namespace std {
template <class Char, class Traits, class D, class V>
std::basic_ostream<Char, Traits>&
operator<<(std::basic_ostream<Char, Traits>& os,
const boost::detail::edge_desc_impl<D,V>& e)
{
return os << "(" << e.m_source << "," << e.m_target << ")";
}
}
// Boost's functional/hash
namespace boost {
template<typename D, typename V>
struct hash<boost::detail::edge_desc_impl<D, V> >
{
std::size_t operator()(const boost::detail::edge_desc_impl<D, V> & x) const
{ return hash_value(x.get_property()); }
};
}
#endif // BOOST_GRAPH_DETAIL_DETAIL_EDGE_HPP
@@ -0,0 +1,70 @@
program msk144code
! Provides examples of message packing, bit and symbol ordering,
! LDPC encoding, and other necessary details of the MSK144 protocol.
use packjt
character msg*22,msgsent*22,decoded,bad*1,msgtype*13,mygrid*6
integer*4 i4tone(144)
logical*1 bcontest
include 'testmsg.f90'
data mygrid/'FN20qi'/
nargs=iargc()
if(nargs.ne.1) then
print*,'Usage: msk144code "message"'
print*,' msk144code -t'
print*,' '
print*,'Examples:'
print*,' msk144code "KA1ABC WB9XYZ EN37"'
print*,' msk144code "<KA1ABC WB9XYZ> R-03"'
print*,' msk144code "KA1ABC WB9XYZ R EN37"'
go to 999
endif
call getarg(1,msg)
nmsg=1
if(msg(1:2).eq."-t") then
testmsg(NTEST+1)="<KA1ABC WB9XYZ> -03"
testmsg(NTEST+2)="<KA1ABC WB9XYZ> R+03"
testmsg(NTEST+3)="<KA1ABC WB9XYZ> RRR"
testmsg(NTEST+4)="<KA1ABC WB9XYZ> 73"
testmsg(NTEST+5)="KA1ABC WB9XYZ R EN37"
nmsg=NTEST+5
endif
write(*,1010)
1010 format(" Message Decoded Err? Type"/ &
74("-"))
do imsg=1,nmsg
if(nmsg.gt.1) msg=testmsg(imsg)
call fmtmsg(msg,iz) !To upper case, collapse multiple blanks
i1=len(trim(msg))-5
bcontest=.false.
if(msg(i1:i1+1).eq.'R ') bcontest=.true.
ichk=0
call genmsk144(msg,mygrid,ichk,bcontest,msgsent,i4tone,itype)
msgtype=""
if(itype.eq.1) msgtype="Std Msg"
if(itype.eq.2) msgtype="Type 1 prefix"
if(itype.eq.3) msgtype="Type 1 suffix"
if(itype.eq.4) msgtype="Type 2 prefix"
if(itype.eq.5) msgtype="Type 2 suffix"
if(itype.eq.6) msgtype="Free text"
if(itype.eq.7) msgtype="Hashed calls"
bad=" "
if(msgsent.ne.msg) bad="*"
write(*,1020) imsg,msg,msgsent,bad,itype,msgtype
1020 format(i2,'.',2x,a22,2x,a22,3x,a1,i3,": ",a13)
enddo
if(nmsg.eq.1) then
n=144
if(msg(1:1).eq."<") n=40
write(*,1030) i4tone(1:n)
1030 format(/'Channel symbols'/(72i1))
endif
999 end program msk144code
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,22 @@
/*==============================================================================
Copyright (c) 2001-2010 Joel de Guzman
Copyright (c) 2010-2011 Thomas Heller
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
namespace placeholders
{
typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED;
typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED;
expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}};
expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}};
}
namespace arg_names
{
typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED;
typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED;
expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}};
expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}};
}
@@ -0,0 +1,46 @@
#include "SplashScreen.hpp"
#include <QPixmap>
#include <QVBoxLayout>
#include <QCheckBox>
#include <QCoreApplication>
#include "revision_utils.hpp"
#include "pimpl_impl.hpp"
class SplashScreen::impl
{
public:
impl ()
: checkbox_ {"Do not show this again"}
{
main_layout_.addStretch ();
main_layout_.addWidget (&checkbox_, 0, Qt::AlignRight);
}
QVBoxLayout main_layout_;
QCheckBox checkbox_;
};
SplashScreen::SplashScreen ()
: QSplashScreen {QPixmap {":/splash.png"}, Qt::WindowStaysOnTopHint}
{
setLayout (&m_->main_layout_);
showMessage ("<h2>" + QString {"WSJT-X v" +
QCoreApplication::applicationVersion() + " " +
revision ()}.simplified () + "</h2>"
"V1.7 has many new features, most aimed at VHF/UHF/Microwave users.<br /><br />"
"The release notes have more details.<br /><br />"
"Send issue reports to wsjtgroup@yahoogroups.com, and be sure to save .wav<br />"
"files where appropriate.<br /><br />"
"<b>Open the Help menu and select Release Notes for more details.</b><br />"
"<img src=\":/icon_128x128.png\" />"
"<img src=\":/gpl-v3-logo.svg\" height=\"80\" />", Qt::AlignCenter);
connect (&m_->checkbox_, &QCheckBox::stateChanged, [this] (int s) {
if (Qt::Checked == s) Q_EMIT disabled ();
});
}
SplashScreen::~SplashScreen ()
{
}
@@ -0,0 +1,87 @@
//-----------------------------------------------------------------------------
// boost variant/detail/enable_recursive_fwd.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
#define BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
#include <boost/mpl/aux_/config/ctps.hpp>
#include <boost/mpl/bool_fwd.hpp>
# include <boost/mpl/bool.hpp>
namespace boost {
namespace detail { namespace variant {
///////////////////////////////////////////////////////////////////////////////
// (detail) tag recursive_flag
//
// Signifies that the variant should perform recursive substituion.
//
template <typename T>
struct recursive_flag
{
typedef T type;
};
///////////////////////////////////////////////////////////////////////////////
// (detail) metafunction is_recursive_flag
//
// Signifies that the variant should perform recursive substituion.
//
template <typename T>
struct is_recursive_flag
: mpl::false_
{
};
template <typename T>
struct is_recursive_flag< recursive_flag<T> >
: mpl::true_
{
};
///////////////////////////////////////////////////////////////////////////////
// (detail) metafunction enable_recursive
//
// Attempts recursive_variant_ tag substitution, wrapping with
// boost::recursive_wrapper if substituion occurs w/ non-indirect result
// (i.e., not a reference or pointer) *and* NoWrapper is false_.
//
template <
typename T
, typename RecursiveVariant
, typename NoWrapper = mpl::false_
>
struct enable_recursive;
///////////////////////////////////////////////////////////////////////////////
// (detail) metafunction class quoted_enable_recursive
//
// Same behavior as enable_recursive metafunction (see above).
//
template <
typename RecursiveVariant
, typename NoWrapper = mpl::false_
>
struct quoted_enable_recursive;
}} // namespace detail::variant
} // namespace boost
#endif // BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
@@ -0,0 +1,32 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP
#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/mass.hpp>
#include <boost/units/physical_dimensions/time.hpp>
namespace boost {
namespace units {
/// derived dimension for energy : L^2 M T^-2
typedef derived_dimension<length_base_dimension,2,
mass_base_dimension,1,
time_base_dimension,-2>::type energy_dimension;
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP
@@ -0,0 +1,71 @@
// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BACK_REFERENCE_DWA2002510_HPP
# define BACK_REFERENCE_DWA2002510_HPP
# include <boost/python/detail/prefix.hpp>
# include <boost/python/object_fwd.hpp>
# include <boost/python/detail/dependent.hpp>
# include <boost/python/detail/raw_pyobject.hpp>
namespace boost { namespace python {
template <class T>
struct back_reference
{
private: // types
typedef typename detail::dependent<object,T>::type source_t;
public:
typedef T type;
back_reference(PyObject*, T);
source_t const& source() const;
T get() const;
private:
source_t m_source;
T m_value;
};
template<typename T>
class is_back_reference
{
public:
BOOST_STATIC_CONSTANT(bool, value = false);
};
template<typename T>
class is_back_reference<back_reference<T> >
{
public:
BOOST_STATIC_CONSTANT(bool, value = true);
};
//
// implementations
//
template <class T>
back_reference<T>::back_reference(PyObject* p, T x)
: m_source(detail::borrowed_reference(p))
, m_value(x)
{
}
template <class T>
typename back_reference<T>::source_t const& back_reference<T>::source() const
{
return m_source;
}
template <class T>
T back_reference<T>::get() const
{
return m_value;
}
}} // namespace boost::python
#endif // BACK_REFERENCE_DWA2002510_HPP
@@ -0,0 +1,76 @@
#ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
#define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/iterator_tags.hpp>
#include <boost/mpl/next_prior.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/list/aux_/item.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/lambda_spec.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Node >
struct l_iter
{
typedef aux::l_iter_tag tag;
typedef forward_iterator_tag category;
};
template< typename Node >
struct deref< l_iter<Node> >
{
typedef typename Node::item type;
};
template< typename Node >
struct next< l_iter<Node> >
{
typedef l_iter< typename Node::next > type;
};
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template< typename Node >
struct l_iter
{
typedef aux::l_iter_tag tag;
typedef forward_iterator_tag category;
typedef typename Node::item type;
typedef l_iter< typename mpl::next<Node>::type > next;
};
#endif
template<> struct l_iter<l_end>
{
typedef aux::l_iter_tag tag;
typedef forward_iterator_tag category;
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
typedef na type;
typedef l_iter next;
#endif
};
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter)
}}
#endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
@@ -0,0 +1,142 @@
/*=============================================================================
Copyright (c) 1998-2003 Joel de Guzman
Copyright (c) 2001 Daniel Nuffer
Copyright (c) 2002 Hartmut Kaiser
http://spirit.sourceforge.net/
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#if !defined(BOOST_SPIRIT_INTERSECTION_HPP)
#define BOOST_SPIRIT_INTERSECTION_HPP
#include <boost/spirit/home/classic/namespace.hpp>
#include <boost/spirit/home/classic/core/parser.hpp>
#include <boost/spirit/home/classic/core/primitives/primitives.hpp>
#include <boost/spirit/home/classic/core/composite/composite.hpp>
#include <boost/spirit/home/classic/meta/as_parser.hpp>
namespace boost { namespace spirit {
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
///////////////////////////////////////////////////////////////////////////
//
// intersection class
//
// Handles expressions of the form:
//
// a & b
//
// where a and b are parsers. The expression returns a composite
// parser that matches a and b. One (not both) of the operands may
// be a literal char, wchar_t or a primitive string char const*,
// wchar_t const*.
//
// The expression is short circuit evaluated. b is never touched
// when a is returns a no-match.
//
///////////////////////////////////////////////////////////////////////////
struct intersection_parser_gen;
template <typename A, typename B>
struct intersection
: public binary<A, B, parser<intersection<A, B> > >
{
typedef intersection<A, B> self_t;
typedef binary_parser_category parser_category_t;
typedef intersection_parser_gen parser_generator_t;
typedef binary<A, B, parser<self_t> > base_t;
intersection(A const& a, B const& b)
: base_t(a, b) {}
template <typename ScannerT>
typename parser_result<self_t, ScannerT>::type
parse(ScannerT const& scan) const
{
typedef typename parser_result<self_t, ScannerT>::type result_t;
typedef typename ScannerT::iterator_t iterator_t;
iterator_t save = scan.first;
if (result_t hl = this->left().parse(scan))
{
ScannerT bscan(scan.first, scan.first, scan);
scan.first = save;
result_t hr = this->right().parse(bscan);
if (hl.length() == hr.length())
return hl;
}
return scan.no_match();
}
};
struct intersection_parser_gen
{
template <typename A, typename B>
struct result
{
typedef
intersection<
typename as_parser<A>::type
, typename as_parser<B>::type
>
type;
};
template <typename A, typename B>
static intersection<
typename as_parser<A>::type
, typename as_parser<B>::type
>
generate(A const& a, B const& b)
{
return intersection<BOOST_DEDUCED_TYPENAME as_parser<A>::type,
BOOST_DEDUCED_TYPENAME as_parser<B>::type>
(as_parser<A>::convert(a), as_parser<B>::convert(b));
}
};
template <typename A, typename B>
intersection<A, B>
operator&(parser<A> const& a, parser<B> const& b);
template <typename A>
intersection<A, chlit<char> >
operator&(parser<A> const& a, char b);
template <typename B>
intersection<chlit<char>, B>
operator&(char a, parser<B> const& b);
template <typename A>
intersection<A, strlit<char const*> >
operator&(parser<A> const& a, char const* b);
template <typename B>
intersection<strlit<char const*>, B>
operator&(char const* a, parser<B> const& b);
template <typename A>
intersection<A, chlit<wchar_t> >
operator&(parser<A> const& a, wchar_t b);
template <typename B>
intersection<chlit<wchar_t>, B>
operator&(wchar_t a, parser<B> const& b);
template <typename A>
intersection<A, strlit<wchar_t const*> >
operator&(parser<A> const& a, wchar_t const* b);
template <typename B>
intersection<strlit<wchar_t const*>, B>
operator&(wchar_t const* a, parser<B> const& b);
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
}} // namespace BOOST_SPIRIT_CLASSIC_NS
#endif
#include <boost/spirit/home/classic/core/composite/impl/intersection.ipp>
@@ -0,0 +1,72 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Eric Niebler
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_SINGLE_VIEW_05052005_0335)
#define BOOST_FUSION_SINGLE_VIEW_05052005_0335
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/view/single_view/single_view_iterator.hpp>
#include <boost/fusion/view/single_view/detail/at_impl.hpp>
#include <boost/fusion/view/single_view/detail/begin_impl.hpp>
#include <boost/fusion/view/single_view/detail/end_impl.hpp>
#include <boost/fusion/view/single_view/detail/size_impl.hpp>
#include <boost/fusion/view/single_view/detail/value_at_impl.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/int.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
struct single_view_tag;
struct random_access_traversal_tag;
struct fusion_sequence_tag;
template <typename T>
struct single_view : sequence_base<single_view<T> >
{
typedef single_view_tag fusion_tag;
typedef fusion_sequence_tag tag; // this gets picked up by MPL
typedef random_access_traversal_tag category;
typedef mpl::true_ is_view;
typedef mpl::int_<1> size;
typedef T value_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
single_view()
: val() {}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
explicit single_view(typename detail::call_param<T>::type in_val)
: val(in_val) {}
value_type val;
};
template <typename T>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline single_view<typename detail::as_fusion_element<T>::type>
make_single_view(T const& v)
{
return single_view<typename detail::as_fusion_element<T>::type>(v);
}
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif
@@ -0,0 +1,429 @@
subroutine multimode_decoder(ss,id2,params,nfsample)
!$ use omp_lib
use prog_args
use timer_module, only: timer
use jt4_decode
use jt65_decode
use jt9_decode
use ft8_decode
include 'jt9com.f90'
include 'timer_common.inc'
type, extends(jt4_decoder) :: counting_jt4_decoder
integer :: decoded
end type counting_jt4_decoder
type, extends(jt65_decoder) :: counting_jt65_decoder
integer :: decoded
end type counting_jt65_decoder
type, extends(jt9_decoder) :: counting_jt9_decoder
integer :: decoded
end type counting_jt9_decoder
type, extends(ft8_decoder) :: counting_ft8_decoder
integer :: decoded
end type counting_ft8_decoder
real ss(184,NSMAX)
logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat
integer*2 id2(NTMAX*12000)
type(params_block) :: params
real*4 dd(NTMAX*12000)
save
type(counting_jt4_decoder) :: my_jt4
type(counting_jt65_decoder) :: my_jt65
type(counting_jt9_decoder) :: my_jt9
type(counting_ft8_decoder) :: my_ft8
! initialize decode counts
my_jt4%decoded = 0
my_jt65%decoded = 0
my_jt9%decoded = 0
my_ft8%decoded = 0
single_decode=iand(params%nexp_decode,32).ne.0
bVHF=iand(params%nexp_decode,64).ne.0
if(mod(params%nranera,2).eq.0) ntrials=10**(params%nranera/2)
if(mod(params%nranera,2).eq.1) ntrials=3*10**(params%nranera/2)
if(params%nranera.eq.0) ntrials=0
nfail=0
10 if (params%nagain) then
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown', &
position='append',iostat=ios)
else
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown', &
iostat=ios)
end if
if(ios.ne.0) then
nfail=nfail+1
if(nfail.le.3) then
call sleep_msec(10)
go to 10
endif
endif
if(params%nmode.eq.8) then
! We're in FT8 mode
call timer('decft8 ',0)
newdat=params%newdat
call my_ft8%decode(ft8_decoded,id2,params%nQSOProgress,params%nfqso, &
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
params%nexp_decode,params%ndepth,logical(params%nagain), &
logical(params%lapon),params%napwid,params%mycall, &
params%mygrid,params%hiscall,params%hisgrid)
call timer('decft8 ',1)
go to 800
endif
rms=sqrt(dot_product(float(id2(300000:310000)), &
float(id2(300000:310000)))/10000.0)
if(rms.lt.2.0) go to 800
! Zap data at start that might come from T/R switching transient?
nadd=100
k=0
bad0=.false.
do i=1,240
sq=0.
do n=1,nadd
k=k+1
sq=sq + float(id2(k))**2
enddo
rms=sqrt(sq/nadd)
if(rms.gt.10000.0) then
bad0=.true.
kbad=k
rmsbad=rms
endif
enddo
if(bad0) then
nz=min(NTMAX*12000,kbad+100)
! id2(1:nz)=0 ! temporarily disabled as it can breaak the JT9 decoder, maybe others
endif
if(params%nmode.eq.4 .or. params%nmode.eq.65) open(14,file=trim(temp_dir)// &
'/avemsg.txt',status='unknown')
if(params%nmode.eq.164) open(17,file=trim(temp_dir)//'/red.dat', &
status='unknown')
if(params%nmode.eq.4) then
jz=52*nfsample
if(params%newdat) then
if(nfsample.eq.12000) call wav11(id2,jz,dd)
if(nfsample.eq.11025) dd(1:jz)=id2(1:jz)
endif
call my_jt4%decode(jt4_decoded,dd,jz,params%nutc,params%nfqso, &
params%ntol,params%emedelay,params%dttol,logical(params%nagain), &
params%ndepth,logical(params%nclearave),params%minsync, &
params%minw,params%nsubmode,params%mycall,params%hiscall, &
params%hisgrid,params%nlist,params%listutc,jt4_average)
go to 800
endif
npts65=52*12000
if(params%nmode.eq.164) npts65=54*12000
if(baddata(id2,npts65)) then
nsynced=0
ndecoded=0
go to 800
endif
ntol65=params%ntol !### is this OK? ###
newdat65=params%newdat
newdat9=params%newdat
!$call omp_set_dynamic(.true.)
!$omp parallel sections num_threads(2) copyin(/timer_private/) shared(ndecoded) if(.true.) !iif() needed on Mac
!$omp section
if(params%nmode.eq.65 .or. params%nmode.eq.164 .or. &
(params%nmode.eq.(65+9) .and. params%ntxmode.eq.65)) then
! We're in JT65 or QRA64 mode, or should do JT65 first
if(newdat65) dd(1:npts65)=id2(1:npts65)
nf1=params%nfa
nf2=params%nfb
call timer('jt65a ',0)
call my_jt65%decode(jt65_decoded,dd,npts65,newdat65,params%nutc, &
nf1,nf2,params%nfqso,ntol65,params%nsubmode,params%minsync, &
logical(params%nagain),params%n2pass,logical(params%nrobust), &
ntrials,params%naggressive,params%ndepth,params%emedelay, &
logical(params%nclearave),params%mycall,params%hiscall, &
params%hisgrid,params%nexp_decode)
call timer('jt65a ',1)
else if(params%nmode.eq.9 .or. (params%nmode.eq.(65+9) .and. params%ntxmode.eq.9)) then
! We're in JT9 mode, or should do JT9 first
call timer('decjt9 ',0)
call my_jt9%decode(jt9_decoded,ss,id2,params%nfqso, &
newdat9,params%npts8,params%nfa,params%nfsplit,params%nfb, &
params%ntol,params%nzhsym,logical(params%nagain),params%ndepth, &
params%nmode,params%nsubmode,params%nexp_decode)
call timer('decjt9 ',1)
endif
!$omp section
if(params%nmode.eq.(65+9)) then !Do the other mode (we're in dual mode)
if (params%ntxmode.eq.9) then
if(newdat65) dd(1:npts65)=id2(1:npts65)
nf1=params%nfa
nf2=params%nfb
call timer('jt65a ',0)
call my_jt65%decode(jt65_decoded,dd,npts65,newdat65,params%nutc, &
nf1,nf2,params%nfqso,ntol65,params%nsubmode,params%minsync, &
logical(params%nagain),params%n2pass,logical(params%nrobust), &
ntrials,params%naggressive,params%ndepth,params%emedelay, &
logical(params%nclearave),params%mycall,params%hiscall, &
params%hisgrid,params%nexp_decode)
call timer('jt65a ',1)
else
call timer('decjt9 ',0)
call my_jt9%decode(jt9_decoded,ss,id2,params%nfqso, &
newdat9,params%npts8,params%nfa,params%nfsplit,params%nfb, &
params%ntol,params%nzhsym,logical(params%nagain), &
params%ndepth,params%nmode,params%nsubmode,params%nexp_decode)
call timer('decjt9 ',1)
end if
endif
!$omp end parallel sections
! JT65 is not yet producing info for nsynced, ndecoded.
800 ndecoded = my_jt4%decoded + my_jt65%decoded + my_jt9%decoded + my_ft8%decoded
write(*,1010) nsynced,ndecoded
1010 format('<DecodeFinished>',2i4)
call flush(6)
close(13)
if(params%nmode.eq.4 .or. params%nmode.eq.65) close(14)
return
contains
subroutine jt4_decoded(this,snr,dt,freq,have_sync,sync,is_deep, &
decoded0,qual,ich,is_average,ave)
implicit none
class(jt4_decoder), intent(inout) :: this
integer, intent(in) :: snr
real, intent(in) :: dt
integer, intent(in) :: freq
logical, intent(in) :: have_sync
logical, intent(in) :: is_deep
character(len=1), intent(in) :: sync
character(len=22), intent(in) :: decoded0
real, intent(in) :: qual
integer, intent(in) :: ich
logical, intent(in) :: is_average
integer, intent(in) :: ave
character*22 decoded
character*3 cflags
if(ich.eq.-99) stop !Silence compiler warning
if (have_sync) then
decoded=decoded0
cflags=' '
if(decoded.ne.' ') cflags='f '
if(is_deep) then
cflags(1:2)='d1'
write(cflags(3:3),'(i1)') min(int(qual),9)
if(qual.ge.10.0) cflags(3:3)='*'
if(qual.lt.3.0) decoded(22:22)='?'
endif
if(is_average) then
write(cflags(2:2),'(i1)') min(ave,9)
if(ave.ge.10) cflags(2:2)='*'
endif
write(*,1000) params%nutc,snr,dt,freq,sync,decoded,cflags
1000 format(i4.4,i4,f5.1,i5,1x,'$',a1,1x,a22,1x,a3)
else
write(*,1000) params%nutc,snr,dt,freq
end if
select type(this)
type is (counting_jt4_decoder)
this%decoded = this%decoded + 1
end select
end subroutine jt4_decoded
subroutine jt4_average (this, used, utc, sync, dt, freq, flip)
implicit none
class(jt4_decoder), intent(inout) :: this
logical, intent(in) :: used
integer, intent(in) :: utc
real, intent(in) :: sync
real, intent(in) :: dt
integer, intent(in) :: freq
logical, intent(in) :: flip
character(len=1) :: cused, csync
cused = '.'
csync = '*'
if (used) cused = '$'
if (flip) csync = '$'
write(14,1000) cused,utc,sync,dt,freq,csync
1000 format(a1,i5.4,f6.1,f6.2,i6,1x,a1)
end subroutine jt4_average
subroutine jt65_decoded(this,sync,snr,dt,freq,drift,nflip,width, &
decoded0,ft,qual,nsmo,nsum,minsync)
use jt65_decode
implicit none
class(jt65_decoder), intent(inout) :: this
real, intent(in) :: sync
integer, intent(in) :: snr
real, intent(in) :: dt
integer, intent(in) :: freq
integer, intent(in) :: drift
integer, intent(in) :: nflip
real, intent(in) :: width
character(len=22), intent(in) :: decoded0
integer, intent(in) :: ft
integer, intent(in) :: qual
integer, intent(in) :: nsmo
integer, intent(in) :: nsum
integer, intent(in) :: minsync
integer i,nft
logical is_deep,is_average
character decoded*22,csync*2,cflags*3
if(width.eq.-9999.0) stop !Silence compiler warning
!$omp critical(decode_results)
decoded=decoded0
cflags=' '
is_deep=ft.eq.2
if(ft.ge.80) then !QRA64 mode
nft=ft-100
csync=': '
if(sync-3.4.ge.float(minsync) .or. nft.ge.0) csync=':*'
if(nft.lt.0) then
write(*,1009) params%nutc,snr,dt,freq,csync,decoded
else
write(*,1009) params%nutc,snr,dt,freq,csync,decoded,nft
1009 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,i2)
endif
write(13,1011) params%nutc,nint(sync),snr,dt,float(freq),drift, &
decoded,nft
1011 format(i4.4,i4,i5,f6.2,f8.0,i4,3x,a22,' QRA64',i3)
go to 100
endif
if(ft.eq.0 .and. minsync.ge.0 .and. int(sync).lt.minsync) then
write(*,1010) params%nutc,snr,dt,freq
else
is_average=nsum.ge.2
if(bVHF .and. ft.gt.0) then
cflags='f '
if(is_deep) then
cflags(1:2)='d1'
write(cflags(3:3),'(i1)') min(qual,9)
if(qual.ge.10) cflags(3:3)='*'
if(qual.lt.3) decoded(22:22)='?'
endif
if(is_average) then
write(cflags(2:2),'(i1)') min(nsum,9)
if(nsum.ge.10) cflags(2:2)='*'
endif
endif
csync='# '
i=0
if(bVHF .and. nflip.ne.0 .and. &
sync.ge.max(0.0,float(minsync))) then
csync='#*'
if(nflip.eq.-1) then
csync='##'
if(decoded.ne.' ') then
do i=22,1,-1
if(decoded(i:i).ne.' ') exit
enddo
if(i.gt.18) i=18
decoded(i+2:i+4)='OOO'
endif
endif
endif
write(*,1010) params%nutc,snr,dt,freq,csync,decoded,cflags
1010 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,1x,a3)
endif
write(13,1012) params%nutc,nint(sync),snr,dt,float(freq),drift, &
decoded,ft,nsum,nsmo
1012 format(i4.4,i4,i5,f6.2,f8.0,i4,3x,a22,' JT65',3i3)
100 call flush(6)
!$omp end critical(decode_results)
select type(this)
type is (counting_jt65_decoder)
this%decoded = this%decoded + 1
end select
end subroutine jt65_decoded
subroutine jt9_decoded (this, sync, snr, dt, freq, drift, decoded)
use jt9_decode
implicit none
class(jt9_decoder), intent(inout) :: this
real, intent(in) :: sync
integer, intent(in) :: snr
real, intent(in) :: dt
real, intent(in) :: freq
integer, intent(in) :: drift
character(len=22), intent(in) :: decoded
!$omp critical(decode_results)
write(*,1000) params%nutc,snr,dt,nint(freq),decoded
1000 format(i4.4,i4,f5.1,i5,1x,'@ ',1x,a22)
write(13,1002) params%nutc,nint(sync),snr,dt,freq,drift,decoded
1002 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a22,' JT9')
call flush(6)
!$omp end critical(decode_results)
select type(this)
type is (counting_jt9_decoder)
this%decoded = this%decoded + 1
end select
end subroutine jt9_decoded
subroutine ft8_decoded (this,sync,snr,dt,freq,decoded,nap,qual)
use ft8_decode
implicit none
class(ft8_decoder), intent(inout) :: this
real, intent(in) :: sync
integer, intent(in) :: snr
real, intent(in) :: dt
real, intent(in) :: freq
character(len=22), intent(in) :: decoded
integer, intent(in) :: nap
real, intent(in) :: qual
character*2 annot
character*22 decoded0
decoded0=decoded
annot=' '
if(nap.ne.0) then
write(annot,'(a1,i1)') 'a',nap
if(qual.lt.0.17) decoded0(22:22)='?'
endif
write(*,1000) params%nutc,snr,dt,nint(freq),decoded0,annot
1000 format(i6.6,i4,f5.1,i5,' ~ ',1x,a22,1x,a2)
write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded0
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a22,' FT8')
call flush(6)
call flush(13)
select type(this)
type is (counting_ft8_decoder)
this%decoded = this%decoded + 1
end select
return
end subroutine ft8_decoded
end subroutine multimode_decoder
@@ -0,0 +1,163 @@
// (C) Copyright John Maddock 2005.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
#ifndef BOOST_TT_IS_SIGNED_HPP_INCLUDED
#define BOOST_TT_IS_SIGNED_HPP_INCLUDED
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/is_enum.hpp>
#include <climits>
namespace boost {
#if !defined( __CODEGEARC__ )
#if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) && \
!(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\
!defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
namespace detail{
template <class T>
struct is_signed_values
{
//
// Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's
// rather than "real" static constants simply doesn't work or give
// the correct answer.
//
typedef typename remove_cv<T>::type no_cv_t;
static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
static const no_cv_t zero = (static_cast<no_cv_t>(0));
};
template <class T>
struct is_signed_helper
{
typedef typename remove_cv<T>::type no_cv_t;
BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values<T>::minus_one > boost::detail::is_signed_values<T>::zero)));
};
template <bool integral_type>
struct is_signed_select_helper
{
template <class T>
struct rebind
{
typedef is_signed_helper<T> type;
};
};
template <>
struct is_signed_select_helper<false>
{
template <class T>
struct rebind
{
typedef false_type type;
};
};
template <class T>
struct is_signed_impl
{
typedef ::boost::detail::is_signed_select_helper< ::boost::is_integral<T>::value || ::boost::is_enum<T>::value> selector;
typedef typename selector::template rebind<T> binder;
typedef typename binder::type type;
BOOST_STATIC_CONSTANT(bool, value = type::value);
};
}
template <class T> struct is_signed : public integral_constant<bool, boost::detail::is_signed_impl<T>::value> {};
#else
template <class T> struct is_signed : public false_type{};
#endif
#else //defined( __CODEGEARC__ )
template <class T> struct is_signed : public integral_constant<bool, __is_signed(T)>{};
#endif
template <> struct is_signed<signed char> : public true_type{};
template <> struct is_signed<const signed char> : public true_type{};
template <> struct is_signed<volatile signed char> : public true_type{};
template <> struct is_signed<const volatile signed char> : public true_type{};
template <> struct is_signed<short> : public true_type{};
template <> struct is_signed<const short> : public true_type{};
template <> struct is_signed<volatile short> : public true_type{};
template <> struct is_signed<const volatile short> : public true_type{};
template <> struct is_signed<int> : public true_type{};
template <> struct is_signed<const int> : public true_type{};
template <> struct is_signed<volatile int> : public true_type{};
template <> struct is_signed<const volatile int> : public true_type{};
template <> struct is_signed<long> : public true_type{};
template <> struct is_signed<const long> : public true_type{};
template <> struct is_signed<volatile long> : public true_type{};
template <> struct is_signed<const volatile long> : public true_type{};
template <> struct is_signed<unsigned char> : public false_type{};
template <> struct is_signed<const unsigned char> : public false_type{};
template <> struct is_signed<volatile unsigned char> : public false_type{};
template <> struct is_signed<const volatile unsigned char> : public false_type{};
template <> struct is_signed<unsigned short> : public false_type{};
template <> struct is_signed<const unsigned short> : public false_type{};
template <> struct is_signed<volatile unsigned short> : public false_type{};
template <> struct is_signed<const volatile unsigned short> : public false_type{};
template <> struct is_signed<unsigned int> : public false_type{};
template <> struct is_signed<const unsigned int> : public false_type{};
template <> struct is_signed<volatile unsigned int> : public false_type{};
template <> struct is_signed<const volatile unsigned int> : public false_type{};
template <> struct is_signed<unsigned long> : public false_type{};
template <> struct is_signed<const unsigned long> : public false_type{};
template <> struct is_signed<volatile unsigned long> : public false_type{};
template <> struct is_signed<const volatile unsigned long> : public false_type{};
#ifdef BOOST_HAS_LONG_LONG
template <> struct is_signed< ::boost::long_long_type> : public true_type{};
template <> struct is_signed<const ::boost::long_long_type> : public true_type{};
template <> struct is_signed<volatile ::boost::long_long_type> : public true_type{};
template <> struct is_signed<const volatile ::boost::long_long_type> : public true_type{};
template <> struct is_signed< ::boost::ulong_long_type> : public false_type{};
template <> struct is_signed<const ::boost::ulong_long_type> : public false_type{};
template <> struct is_signed<volatile ::boost::ulong_long_type> : public false_type{};
template <> struct is_signed<const volatile ::boost::ulong_long_type> : public false_type{};
#endif
#if defined(CHAR_MIN)
#if CHAR_MIN != 0
template <> struct is_signed<char> : public true_type{};
template <> struct is_signed<const char> : public true_type{};
template <> struct is_signed<volatile char> : public true_type{};
template <> struct is_signed<const volatile char> : public true_type{};
#else
template <> struct is_signed<char> : public false_type{};
template <> struct is_signed<const char> : public false_type{};
template <> struct is_signed<volatile char> : public false_type{};
template <> struct is_signed<const volatile char> : public false_type{};
#endif
#endif
#if defined(WCHAR_MIN) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
#if WCHAR_MIN != 0
template <> struct is_signed<wchar_t> : public true_type{};
template <> struct is_signed<const wchar_t> : public true_type{};
template <> struct is_signed<volatile wchar_t> : public true_type{};
template <> struct is_signed<const volatile wchar_t> : public true_type{};
#else
template <> struct is_signed<wchar_t> : public false_type{};
template <> struct is_signed<const wchar_t> : public false_type{};
template <> struct is_signed<volatile wchar_t> : public false_type{};
template <> struct is_signed<const volatile wchar_t> : public false_type{};
#endif
#endif
} // namespace boost
#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
@@ -0,0 +1,35 @@
/*=============================================================================
Copyright (c) 2009 Christopher Schmidt
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_IMPL_HPP
#define BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_IMPL_HPP
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
namespace boost { namespace fusion { namespace extension
{
template <typename>
struct value_of_impl;
template <>
struct value_of_impl<set_iterator_tag>
{
template <typename It>
struct apply
{
typedef typename
result_of::value_at<
typename It::seq_type::storage_type
, typename It::index
>::type
type;
};
};
}}}
#endif
@@ -0,0 +1,167 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_DIM_HPP
#define BOOST_UNITS_DIM_HPP
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/arithmetic.hpp>
#include <boost/units/config.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/detail/dim_impl.hpp>
/// \file dim.hpp
/// \brief Handling of fundamental dimension/exponent pairs.
namespace boost {
namespace units {
namespace detail {
struct dim_tag { };
}
/// \brief Dimension tag/exponent pair for a single fundamental dimension.
///
/// \details
/// The dim class represents a single dimension tag/dimension exponent pair.
/// That is, @c dim<tag_type,value_type> is a pair where @c tag_type represents the
/// fundamental dimension being represented and @c value_type represents the
/// exponent of that fundamental dimension as a @c static_rational. @c tag_type must
/// be a derived from a specialization of @c base_dimension.
/// Specialization of the following Boost.MPL metafunctions are provided
///
/// - @c mpl::plus for two @c dims
/// - @c mpl::minus for two @c dims
/// - @c mpl::negate for a @c dim
///
/// These metafunctions all operate on the exponent, and require
/// that the @c dim operands have the same base dimension tag.
/// In addition, multiplication and division by @c static_rational
/// is supported.
///
/// - @c mpl::times for a @c static_rational and a @c dim in either order
/// - @c mpl::divides for a @c static_rational and a @c dim in either order
///
/// These metafunctions likewise operate on the exponent only.
template<typename T,typename V>
struct dim
{
typedef dim type;
typedef detail::dim_tag tag;
typedef T tag_type;
typedef V value_type;
};
} // namespace units
} // namespace boost
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dim, 2)
#endif
#ifndef BOOST_UNITS_DOXYGEN
namespace boost {
namespace mpl {
// define MPL operators acting on dim<T,V>
template<>
struct plus_impl<boost::units::detail::dim_tag,boost::units::detail::dim_tag>
{
template<class T0, class T1>
struct apply
{
BOOST_STATIC_ASSERT((boost::is_same<typename T0::tag_type,typename T1::tag_type>::value == true));
typedef boost::units::dim<typename T0::tag_type, typename mpl::plus<typename T0::value_type, typename T1::value_type>::type> type;
};
};
template<>
struct minus_impl<boost::units::detail::dim_tag,boost::units::detail::dim_tag>
{
template<class T0, class T1>
struct apply
{
BOOST_STATIC_ASSERT((boost::is_same<typename T0::tag_type,typename T1::tag_type>::value == true));
typedef boost::units::dim<typename T0::tag_type, typename mpl::minus<typename T0::value_type, typename T1::value_type>::type> type;
};
};
template<>
struct times_impl<boost::units::detail::dim_tag,boost::units::detail::static_rational_tag>
{
template<class T0, class T1>
struct apply
{
typedef boost::units::dim<typename T0::tag_type, typename mpl::times<typename T0::value_type, T1>::type> type;
};
};
template<>
struct times_impl<boost::units::detail::static_rational_tag,boost::units::detail::dim_tag>
{
template<class T0, class T1>
struct apply
{
typedef boost::units::dim<typename T1::tag_type, typename mpl::times<T0, typename T1::value_type>::type> type;
};
};
template<>
struct divides_impl<boost::units::detail::dim_tag,boost::units::detail::static_rational_tag>
{
template<class T0, class T1>
struct apply
{
typedef boost::units::dim<typename T0::tag_type, typename mpl::divides<typename T0::value_type, T1>::type> type;
};
};
template<>
struct divides_impl<boost::units::detail::static_rational_tag,boost::units::detail::dim_tag>
{
template<class T0, class T1>
struct apply
{
typedef boost::units::dim<typename T1::tag_type, typename mpl::divides<T0, typename T1::value_type>::type> type;
};
};
template<>
struct negate_impl<boost::units::detail::dim_tag>
{
template<class T0>
struct apply
{
typedef boost::units::dim<typename T0::tag_type,typename mpl::negate<typename T0::value_type>::type> type;
};
};
} // namespace mpl
} // namespace boost
#endif
#endif // BOOST_UNITS_DIM_HPP
@@ -0,0 +1,240 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTERPROCESS_DETAIL_SYNC_UTILS_HPP
#define BOOST_INTERPROCESS_DETAIL_SYNC_UTILS_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/detail/win32_api.hpp>
#include <boost/interprocess/sync/spin/mutex.hpp>
#include <boost/interprocess/exceptions.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp>
#include <boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp>
//Shield against external warnings
#include <boost/interprocess/detail/config_external_begin.hpp>
#include <boost/unordered/unordered_map.hpp>
#include <boost/interprocess/detail/config_external_end.hpp>
#include <boost/container/map.hpp>
#include <cstddef>
namespace boost {
namespace interprocess {
namespace ipcdetail {
inline bool bytes_to_str(const void *mem, const std::size_t mem_length, char *out_str, std::size_t &out_length)
{
const std::size_t need_mem = mem_length*2+1;
if(out_length < need_mem){
out_length = need_mem;
return false;
}
const char Characters [] =
{ '0', '1', '2', '3', '4', '5', '6', '7'
, '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
std::size_t char_counter = 0;
const char *buf = (const char *)mem;
for(std::size_t i = 0; i != mem_length; ++i){
out_str[char_counter++] = Characters[(buf[i]&0xF0)>>4];
out_str[char_counter++] = Characters[(buf[i]&0x0F)];
}
out_str[char_counter] = 0;
return true;
}
class sync_id
{
public:
typedef __int64 internal_type;
sync_id(const void *map_addr)
: map_addr_(map_addr)
{ winapi::query_performance_counter(&rand_); }
explicit sync_id(internal_type val, const void *map_addr)
: map_addr_(map_addr)
{ rand_ = val; }
const internal_type &internal_pod() const
{ return rand_; }
internal_type &internal_pod()
{ return rand_; }
const void *map_address() const
{ return map_addr_; }
friend std::size_t hash_value(const sync_id &m)
{ return boost::hash_value(m.rand_); }
friend bool operator==(const sync_id &l, const sync_id &r)
{ return l.rand_ == r.rand_ && l.map_addr_ == r.map_addr_; }
private:
internal_type rand_;
const void * const map_addr_;
};
class sync_handles
{
public:
enum type { MUTEX, SEMAPHORE };
private:
struct address_less
{
bool operator()(sync_id const * const l, sync_id const * const r) const
{ return l->map_address() < r->map_address(); }
};
typedef boost::unordered_map<sync_id, void*> umap_type;
typedef boost::container::map<const sync_id*, umap_type::iterator, address_less> map_type;
static const std::size_t LengthOfGlobal = sizeof("Global\\boost.ipc")-1;
static const std::size_t StrSize = LengthOfGlobal + (sizeof(sync_id)*2+1);
typedef char NameBuf[StrSize];
void fill_name(NameBuf &name, const sync_id &id)
{
const char *n = "Global\\boost.ipc";
std::size_t i = 0;
do{
name[i] = n[i];
++i;
} while(n[i]);
std::size_t len = sizeof(NameBuf) - LengthOfGlobal;
bytes_to_str(&id.internal_pod(), sizeof(id.internal_pod()), &name[LengthOfGlobal], len);
}
void throw_if_error(void *hnd_val)
{
if(!hnd_val){
error_info err(winapi::get_last_error());
throw interprocess_exception(err);
}
}
void* open_or_create_semaphore(const sync_id &id, unsigned int initial_count)
{
NameBuf name;
fill_name(name, id);
permissions unrestricted_security;
unrestricted_security.set_unrestricted();
winapi_semaphore_wrapper sem_wrapper;
bool created;
sem_wrapper.open_or_create
(name, (long)initial_count, winapi_semaphore_wrapper::MaxCount, unrestricted_security, created);
throw_if_error(sem_wrapper.handle());
return sem_wrapper.release();
}
void* open_or_create_mutex(const sync_id &id)
{
NameBuf name;
fill_name(name, id);
permissions unrestricted_security;
unrestricted_security.set_unrestricted();
winapi_mutex_wrapper mtx_wrapper;
mtx_wrapper.open_or_create(name, unrestricted_security);
throw_if_error(mtx_wrapper.handle());
return mtx_wrapper.release();
}
public:
void *obtain_mutex(const sync_id &id, bool *popen_created = 0)
{
umap_type::value_type v(id, (void*)0);
scoped_lock<spin_mutex> lock(mtx_);
umap_type::iterator it = umap_.insert(v).first;
void *&hnd_val = it->second;
if(!hnd_val){
map_[&it->first] = it;
hnd_val = open_or_create_mutex(id);
if(popen_created) *popen_created = true;
}
else if(popen_created){
*popen_created = false;
}
return hnd_val;
}
void *obtain_semaphore(const sync_id &id, unsigned int initial_count, bool *popen_created = 0)
{
umap_type::value_type v(id, (void*)0);
scoped_lock<spin_mutex> lock(mtx_);
umap_type::iterator it = umap_.insert(v).first;
void *&hnd_val = it->second;
if(!hnd_val){
map_[&it->first] = it;
hnd_val = open_or_create_semaphore(id, initial_count);
if(popen_created) *popen_created = true;
}
else if(popen_created){
*popen_created = false;
}
return hnd_val;
}
void destroy_handle(const sync_id &id)
{
scoped_lock<spin_mutex> lock(mtx_);
umap_type::iterator it = umap_.find(id);
umap_type::iterator itend = umap_.end();
if(it != itend){
winapi::close_handle(it->second);
const map_type::key_type &k = &it->first;
map_.erase(k);
umap_.erase(it);
}
}
void destroy_syncs_in_range(const void *addr, std::size_t size)
{
const sync_id low_id(addr);
const sync_id hig_id(static_cast<const char*>(addr)+size);
scoped_lock<spin_mutex> lock(mtx_);
map_type::iterator itlow(map_.lower_bound(&low_id)),
ithig(map_.lower_bound(&hig_id));
while(itlow != ithig){
void * const hnd = umap_[*itlow->first];
winapi::close_handle(hnd);
umap_.erase(*itlow->first);
itlow = map_.erase(itlow);
}
}
private:
spin_mutex mtx_;
umap_type umap_;
map_type map_;
};
} //namespace ipcdetail {
} //namespace interprocess {
} //namespace boost {
#include <boost/interprocess/detail/config_end.hpp>
#endif //BOOST_INTERPROCESS_DETAIL_SYNC_UTILS_HPP
@@ -0,0 +1,110 @@
// Copyright Neil Groves 2009. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED
#define BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED
#include <boost/concept_check.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/ref.hpp>
#include <algorithm>
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)
#include <xutility>
#endif
namespace boost
{
namespace range
{
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)
namespace for_each_detail
{
template<typename Iterator, typename UnaryFunction>
inline UnaryFunction
for_each_impl(Iterator first, Iterator last, UnaryFunction fun,
typename ::boost::enable_if<
is_reference_wrapper<UnaryFunction>,
void
>::type* = 0)
{
typedef typename std::_Get_unchecked_type<Iterator>::type
unchecked_iterator;
unchecked_iterator unchecked_last = std::_Unchecked(last);
for (unchecked_iterator unchecked_first = std::_Unchecked(first); first != last; ++first)
fun.get()(*unchecked_first);
return fun;
}
template<typename Iterator, typename UnaryFunction>
inline UnaryFunction
for_each_impl(Iterator first, Iterator last, UnaryFunction fn,
typename disable_if<
is_reference_wrapper<UnaryFunction>,
void
>::type* = 0)
{
return std::for_each<Iterator, UnaryFunction>(first, last, fn);
}
}
#endif
/// \brief template function for_each
///
/// range-based version of the for_each std algorithm
///
/// \pre SinglePassRange is a model of the SinglePassRangeConcept
/// \pre UnaryFunction is a model of the UnaryFunctionConcept
template< class SinglePassRange, class UnaryFunction >
inline UnaryFunction for_each(SinglePassRange & rng, UnaryFunction fun)
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)
return for_each_detail::for_each_impl<
typename range_iterator<SinglePassRange>::type,
UnaryFunction
>(boost::begin(rng), boost::end(rng), fun);
#else
return std::for_each<
BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type,
UnaryFunction
>(boost::begin(rng),boost::end(rng),fun);
#endif
}
/// \overload
template< class SinglePassRange, class UnaryFunction >
inline UnaryFunction for_each(const SinglePassRange& rng, UnaryFunction fun)
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)
return for_each_detail::for_each_impl<
typename range_iterator<const SinglePassRange>::type,
UnaryFunction
>(boost::begin(rng), boost::end(rng), fun);
#else
return std::for_each<
BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type,
UnaryFunction
>(boost::begin(rng), boost::end(rng), fun);
#endif
}
} // namespace range
using range::for_each;
} // namespace boost
#endif // include guard
@@ -0,0 +1,13 @@
// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef OVERLOADS_DWA2002101_HPP
# define OVERLOADS_DWA2002101_HPP
# include <boost/python/detail/prefix.hpp>
# include <boost/python/detail/overloads_fwd.hpp>
# include <boost/python/detail/defaults_def.hpp>
#endif // OVERLOADS_DWA2002101_HPP
@@ -0,0 +1,197 @@
// (C) Copyright Gennadiy Rozental 2001.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision$
//
// Description : result reporting facilties
// ***************************************************************************
#ifndef BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
#define BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
// Boost.Test
#include <boost/test/results_reporter.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/framework.hpp>
#include <boost/test/output/plain_report_formatter.hpp>
#include <boost/test/output/xml_report_formatter.hpp>
#include <boost/test/tree/visitor.hpp>
#include <boost/test/tree/test_unit.hpp>
#include <boost/test/tree/traverse.hpp>
// Boost
#include <boost/scoped_ptr.hpp>
#include <boost/io/ios_state.hpp>
typedef ::boost::io::ios_base_all_saver io_saver_type;
// STL
#include <iostream>
#include <boost/test/detail/suppress_warnings.hpp>
//____________________________________________________________________________//
namespace boost {
namespace unit_test {
namespace results_reporter {
// ************************************************************************** //
// ************** result reporter implementation ************** //
// ************************************************************************** //
namespace {
struct results_reporter_impl : test_tree_visitor {
// Constructor
results_reporter_impl()
: m_stream( &std::cerr )
, m_stream_state_saver( new io_saver_type( std::cerr ) )
, m_report_level( CONFIRMATION_REPORT )
, m_formatter( new output::plain_report_formatter )
{}
// test tree visitor interface implementation
void visit( test_case const& tc )
{
m_formatter->test_unit_report_start( tc, *m_stream );
m_formatter->test_unit_report_finish( tc, *m_stream );
}
bool test_suite_start( test_suite const& ts )
{
m_formatter->test_unit_report_start( ts, *m_stream );
if( m_report_level == DETAILED_REPORT && !results_collector.results( ts.p_id ).p_skipped )
return true;
m_formatter->test_unit_report_finish( ts, *m_stream );
return false;
}
void test_suite_finish( test_suite const& ts )
{
m_formatter->test_unit_report_finish( ts, *m_stream );
}
typedef scoped_ptr<io_saver_type> saver_ptr;
// Data members
std::ostream* m_stream;
saver_ptr m_stream_state_saver;
report_level m_report_level;
scoped_ptr<format> m_formatter;
};
results_reporter_impl& s_rr_impl() { static results_reporter_impl the_inst; return the_inst; }
} // local namespace
// ************************************************************************** //
// ************** report configuration ************** //
// ************************************************************************** //
void
set_level( report_level l )
{
if( l != INV_REPORT_LEVEL )
s_rr_impl().m_report_level = l;
}
//____________________________________________________________________________//
void
set_stream( std::ostream& ostr )
{
s_rr_impl().m_stream = &ostr;
s_rr_impl().m_stream_state_saver.reset( new io_saver_type( ostr ) );
}
//____________________________________________________________________________//
std::ostream&
get_stream()
{
return *s_rr_impl().m_stream;
}
//____________________________________________________________________________//
void
set_format( output_format rf )
{
switch( rf ) {
default:
case OF_CLF:
set_format( new output::plain_report_formatter );
break;
case OF_XML:
set_format( new output::xml_report_formatter );
break;
}
}
//____________________________________________________________________________//
void
set_format( results_reporter::format* f )
{
if( f )
s_rr_impl().m_formatter.reset( f );
}
//____________________________________________________________________________//
// ************************************************************************** //
// ************** report initiation ************** //
// ************************************************************************** //
void
make_report( report_level l, test_unit_id id )
{
if( l == INV_REPORT_LEVEL )
l = s_rr_impl().m_report_level;
if( l == NO_REPORT )
return;
if( id == INV_TEST_UNIT_ID )
id = framework::master_test_suite().p_id;
s_rr_impl().m_stream_state_saver->restore();
report_level bkup = s_rr_impl().m_report_level;
s_rr_impl().m_report_level = l;
s_rr_impl().m_formatter->results_report_start( *s_rr_impl().m_stream );
switch( l ) {
case CONFIRMATION_REPORT:
s_rr_impl().m_formatter->do_confirmation_report( framework::get<test_unit>( id ), *s_rr_impl().m_stream );
break;
case SHORT_REPORT:
case DETAILED_REPORT:
traverse_test_tree( id, s_rr_impl() );
break;
default:
break;
}
s_rr_impl().m_formatter->results_report_finish( *s_rr_impl().m_stream );
s_rr_impl().m_report_level = bkup;
}
//____________________________________________________________________________//
} // namespace results_reporter
} // namespace unit_test
} // namespace boost
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
@@ -0,0 +1,29 @@
#ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED
#define BOOST_MPL_LAMBDA_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/lambda_fwd.hpp>
#include <boost/mpl/bind.hpp>
#include <boost/mpl/aux_/config/lambda.hpp>
#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
# include <boost/mpl/aux_/full_lambda.hpp>
#else
# include <boost/mpl/aux_/lambda_no_ctps.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS
#endif
#endif // BOOST_MPL_LAMBDA_HPP_INCLUDED
@@ -0,0 +1,642 @@
// -*- Mode: C++ -*-
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#ifdef QT5
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QThread>
#include <QTimer>
#include <QDateTime>
#include <QList>
#include <QAudioDeviceInfo>
#include <QScopedPointer>
#include <QDir>
#include <QProgressDialog>
#include <QAbstractSocket>
#include <QHostAddress>
#include <QPointer>
#include <QSet>
#include <QVector>
#include <QFuture>
#include <QFutureWatcher>
#include "AudioDevice.hpp"
#include "commons.h"
#include "Radio.hpp"
#include "Modes.hpp"
#include "FrequencyList.hpp"
#include "Configuration.hpp"
#include "WSPRBandHopping.hpp"
#include "Transceiver.hpp"
#include "DisplayManual.hpp"
#include "psk_reporter.h"
#include "logbook/logbook.h"
#include "decodedtext.h"
#include "commons.h"
#include "astro.h"
#include "MessageBox.hpp"
#include "NetworkAccessManager.hpp"
#define NUM_JT4_SYMBOLS 206 //(72+31)*2, embedded sync
#define NUM_JT65_SYMBOLS 126 //63 data + 63 sync
#define NUM_JT9_SYMBOLS 85 //69 data + 16 sync
#define NUM_WSPR_SYMBOLS 162 //(50+31)*2, embedded sync
#define NUM_WSPR_LF_SYMBOLS 412 //300 data + 109 sync + 3 ramp
#define NUM_ISCAT_SYMBOLS 1291 //30*11025/256
#define NUM_MSK144_SYMBOLS 144 //s8 + d48 + s8 + d80
#define NUM_QRA64_SYMBOLS 84 //63 data + 21 sync
#define NUM_FT8_SYMBOLS 79
#define NUM_CW_SYMBOLS 250
#define TX_SAMPLE_RATE 48000
#define N_WIDGETS 24
extern int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols
extern int volatile icw[NUM_CW_SYMBOLS]; //Dits for CW ID
//--------------------------------------------------------------- MainWindow
namespace Ui {
class MainWindow;
}
class QSettings;
class QLineEdit;
class QFont;
class QHostInfo;
class EchoGraph;
class FastGraph;
class WideGraph;
class LogQSO;
class Transceiver;
class MessageAveraging;
class MessageClient;
class QTime;
class WSPRBandHopping;
class HelpTextWindow;
class WSPRNet;
class SoundOutput;
class Modulator;
class SoundInput;
class Detector;
class SampleDownloader;
class MultiSettings;
class EqualizationToolsDialog;
class MainWindow : public QMainWindow
{
Q_OBJECT;
public:
using Frequency = Radio::Frequency;
using FrequencyDelta = Radio::FrequencyDelta;
using Mode = Modes::Mode;
explicit MainWindow(QDir const& temp_directory, bool multiple, MultiSettings *,
QSharedMemory *shdmem, unsigned downSampleFactor,
QSplashScreen *,
QWidget *parent = nullptr);
~MainWindow();
public slots:
void showSoundInError(const QString& errorMsg);
void showSoundOutError(const QString& errorMsg);
void showStatusMessage(const QString& statusMsg);
void dataSink(qint64 frames);
void fastSink(qint64 frames);
void diskDat();
void freezeDecode(int n);
void guiUpdate();
void doubleClickOnCall(bool shift, bool ctrl);
void doubleClickOnCall2(bool shift, bool ctrl);
void readFromStdout();
void p1ReadFromStdout();
void setXIT(int n, Frequency base = 0u);
void setFreq4(int rxFreq, int txFreq);
void msgAvgDecode2();
void fastPick(int x0, int x1, int y);
protected:
void keyPressEvent (QKeyEvent *) override;
void closeEvent(QCloseEvent *) override;
void childEvent(QChildEvent *) override;
bool eventFilter(QObject *, QEvent *) override;
private slots:
void on_tx1_editingFinished();
void on_tx2_editingFinished();
void on_tx3_editingFinished();
void on_tx4_editingFinished();
void on_tx5_currentTextChanged (QString const&);
void on_tx6_editingFinished();
void on_actionSettings_triggered();
void on_monitorButton_clicked (bool);
void on_actionAbout_triggered();
void on_autoButton_clicked (bool);
void on_stopTxButton_clicked();
void on_stopButton_clicked();
void on_actionRelease_Notes_triggered ();
void on_actionOnline_User_Guide_triggered();
void on_actionLocal_User_Guide_triggered();
void on_actionWide_Waterfall_triggered();
void on_actionOpen_triggered();
void on_actionOpen_next_in_directory_triggered();
void on_actionDecode_remaining_files_in_directory_triggered();
void on_actionDelete_all_wav_files_in_SaveDir_triggered();
void on_actionOpen_log_directory_triggered ();
void on_actionNone_triggered();
void on_actionSave_all_triggered();
void on_actionKeyboard_shortcuts_triggered();
void on_actionSpecial_mouse_commands_triggered();
void on_DecodeButton_clicked (bool);
void decode();
void decodeBusy(bool b);
void on_EraseButton_clicked();
void on_txFirstCheckBox_stateChanged(int arg1);
void set_dateTimeQSO(int m_ntx);
void set_ntx(int n);
void on_txrb1_toggled(bool status);
void on_txrb1_doubleClicked ();
void on_txrb2_toggled(bool status);
void on_txrb3_toggled(bool status);
void on_txrb4_toggled(bool status);
void on_txrb4_doubleClicked ();
void on_txrb5_toggled(bool status);
void on_txrb5_doubleClicked ();
void on_txrb6_toggled(bool status);
void on_txb1_clicked();
void on_txb1_doubleClicked ();
void on_txb2_clicked();
void on_txb3_clicked();
void on_txb4_clicked();
void on_txb4_doubleClicked ();
void on_txb5_clicked();
void on_txb5_doubleClicked ();
void on_txb6_clicked();
void on_lookupButton_clicked();
void on_addButton_clicked();
void on_dxCallEntry_textChanged (QString const&);
void on_dxGridEntry_textChanged (QString const&);
void on_dxCallEntry_returnPressed ();
void on_genStdMsgsPushButton_clicked();
void on_logQSOButton_clicked();
void on_actionJT9_triggered();
void on_actionJT65_triggered();
void on_actionJT9_JT65_triggered();
void on_actionJT4_triggered();
void on_actionFT8_triggered();
void on_TxFreqSpinBox_valueChanged(int arg1);
void on_actionSave_decoded_triggered();
void on_actionQuickDecode_toggled (bool);
void on_actionMediumDecode_toggled (bool);
void on_actionDeepestDecode_toggled (bool);
void bumpFqso(int n);
void on_actionErase_ALL_TXT_triggered();
void on_actionErase_wsjtx_log_adi_triggered();
void startTx2();
void startP1();
void stopTx();
void stopTx2();
void on_pbCallCQ_clicked();
void on_pbAnswerCaller_clicked();
void on_pbSendRRR_clicked();
void on_pbAnswerCQ_clicked();
void on_pbSendReport_clicked();
void on_pbSend73_clicked();
void on_rbGenMsg_clicked(bool checked);
void on_rbFreeText_clicked(bool checked);
void on_freeTextMsg_currentTextChanged (QString const&);
void on_rptSpinBox_valueChanged(int n);
void killFile();
void on_tuneButton_clicked (bool);
void on_pbR2T_clicked();
void on_pbT2R_clicked();
void acceptQSO2(QDateTime const&, QString const& call, QString const& grid
, Frequency dial_freq, QString const& mode
, QString const& rpt_sent, QString const& rpt_received
, QString const& tx_power, QString const& comments
, QString const& name, QDateTime const&);
void on_bandComboBox_currentIndexChanged (int index);
void on_bandComboBox_activated (int index);
void on_readFreq_clicked();
void on_pbTxMode_clicked();
void on_RxFreqSpinBox_valueChanged(int n);
void on_cbTxLock_clicked(bool checked);
void on_outAttenuation_valueChanged (int);
void rigOpen ();
void handle_transceiver_update (Transceiver::TransceiverState const&);
void handle_transceiver_failure (QString const& reason);
void on_actionAstronomical_data_toggled (bool);
void on_actionShort_list_of_add_on_prefixes_and_suffixes_triggered();
void band_changed (Frequency);
void monitor (bool);
void stop_tuning ();
void stopTuneATU();
void auto_tx_mode(bool);
void on_actionMessage_averaging_triggered();
void on_actionInclude_averaging_toggled (bool);
void on_actionInclude_correlation_toggled (bool);
void on_actionEnable_AP_DXcall_toggled (bool);
void VHF_features_enabled(bool b);
void on_sbSubmode_valueChanged(int n);
void on_cbShMsgs_toggled(bool b);
void on_cbSWL_toggled(bool b);
void on_cbTx6_toggled(bool b);
void on_cbMenus_toggled(bool b);
void on_cbFirst_toggled(bool b);
void on_cbAutoSeq_toggled(bool b);
void networkError (QString const&);
void on_ClrAvgButton_clicked();
void on_actionWSPR_triggered();
void on_actionWSPR_LF_triggered();
void on_syncSpinBox_valueChanged(int n);
void on_TxPowerComboBox_currentIndexChanged(const QString &arg1);
void on_sbTxPercent_valueChanged(int n);
void on_cbUploadWSPR_Spots_toggled(bool b);
void WSPR_config(bool b);
void uploadSpots();
void TxAgain();
void uploadResponse(QString response);
void on_WSPRfreqSpinBox_valueChanged(int n);
void on_pbTxNext_clicked(bool b);
void on_actionEcho_Graph_triggered();
void on_actionEcho_triggered();
void on_actionISCAT_triggered();
void on_actionFast_Graph_triggered();
void fast_decode_done();
void on_actionMeasure_reference_spectrum_triggered();
void on_actionErase_reference_spectrum_triggered();
void on_actionMeasure_phase_response_triggered();
void on_sbTR_valueChanged (int);
void on_sbFtol_valueChanged (int);
void on_cbFast9_clicked(bool b);
void on_sbCQTxFreq_valueChanged(int n);
void on_cbCQTx_toggled(bool b);
void on_actionMSK144_triggered();
void on_actionQRA64_triggered();
void on_actionFreqCal_triggered();
void splash_done ();
private:
Q_SIGNAL void initializeAudioOutputStream (QAudioDeviceInfo,
unsigned channels, unsigned msBuffered) const;
Q_SIGNAL void stopAudioOutputStream () const;
Q_SIGNAL void startAudioInputStream (QAudioDeviceInfo const&,
int framesPerBuffer, AudioDevice * sink,
unsigned downSampleFactor, AudioDevice::Channel) const;
Q_SIGNAL void suspendAudioInputStream () const;
Q_SIGNAL void resumeAudioInputStream () const;
Q_SIGNAL void startDetector (AudioDevice::Channel) const;
Q_SIGNAL void FFTSize (unsigned) const;
Q_SIGNAL void detectorClose () const;
Q_SIGNAL void finished () const;
Q_SIGNAL void transmitFrequency (double) const;
Q_SIGNAL void endTransmitMessage (bool quick = false) const;
Q_SIGNAL void tune (bool = true) const;
Q_SIGNAL void sendMessage (unsigned symbolsLength, double framesPerSymbol,
double frequency, double toneSpacing,
SoundOutput *, AudioDevice::Channel = AudioDevice::Mono,
bool synchronize = true, bool fastMode = false, double dBSNR = 99.,
int TRperiod=60) const;
Q_SIGNAL void outAttenuationChanged (qreal) const;
Q_SIGNAL void toggleShorthand () const;
private:
void astroUpdate ();
void writeAllTxt(QString message);
void auto_sequence (QString const& message, unsigned start_tolerance, unsigned stop_tolerance);
void hideMenus(bool b);
NetworkAccessManager m_network_manager;
bool m_valid;
QSplashScreen * m_splash;
QString m_revision;
bool m_multiple;
MultiSettings * m_multi_settings;
QPushButton * m_configurations_button;
QSettings * m_settings;
QScopedPointer<Ui::MainWindow> ui;
// other windows
Configuration m_config;
WSPRBandHopping m_WSPR_band_hopping;
bool m_WSPR_tx_next;
MessageBox m_rigErrorMessageBox;
QScopedPointer<SampleDownloader> m_sampleDownloader;
QScopedPointer<EqualizationToolsDialog> m_equalizationToolsDialog;
QScopedPointer<WideGraph> m_wideGraph;
QScopedPointer<EchoGraph> m_echoGraph;
QScopedPointer<FastGraph> m_fastGraph;
QScopedPointer<LogQSO> m_logDlg;
QScopedPointer<Astro> m_astroWidget;
QScopedPointer<HelpTextWindow> m_shortcuts;
QScopedPointer<HelpTextWindow> m_prefixes;
QScopedPointer<HelpTextWindow> m_mouseCmnds;
QScopedPointer<MessageAveraging> m_msgAvgWidget;
Transceiver::TransceiverState m_rigState;
Frequency m_lastDialFreq;
QString m_lastBand;
QString m_lastCallsign;
Frequency m_dialFreqRxWSPR; // best guess at WSPR QRG
Detector * m_detector;
unsigned m_FFTSize;
SoundInput * m_soundInput;
Modulator * m_modulator;
SoundOutput * m_soundOutput;
QThread m_audioThread;
qint64 m_msErase;
qint64 m_secBandChanged;
qint64 m_freqMoon;
Frequency m_freqNominal;
Frequency m_freqTxNominal;
Astro::Correction m_astroCorrection;
double m_s6;
double m_tRemaining;
float m_DTtol;
float m_t0;
float m_t1;
float m_t0Pick;
float m_t1Pick;
float m_fCPUmskrtd;
qint32 m_waterfallAvg;
qint32 m_ntx;
bool m_gen_message_is_cq;
bool m_send_RR73;
qint32 m_timeout;
qint32 m_XIT;
qint32 m_setftx;
qint32 m_ndepth;
qint32 m_sec0;
qint32 m_RxLog;
qint32 m_nutc0;
qint32 m_ntr;
qint32 m_tx;
qint32 m_hsym;
qint32 m_TRperiod;
qint32 m_nsps;
qint32 m_hsymStop;
qint32 m_inGain;
qint32 m_ncw;
qint32 m_secID;
qint32 m_idleMinutes;
qint32 m_nSubMode;
qint32 m_nclearave;
qint32 m_minSync;
qint32 m_dBm;
qint32 m_pctx;
qint32 m_nseq;
qint32 m_nWSPRdecodes;
qint32 m_k0;
qint32 m_kdone;
qint32 m_nPick;
FrequencyList::const_iterator m_frequency_list_fcal_iter;
qint32 m_nTx73;
qint32 m_UTCdisk;
qint32 m_wait;
bool m_btxok; //True if OK to transmit
bool m_diskData;
bool m_loopall;
bool m_decoderBusy;
bool m_txFirst;
bool m_auto;
bool m_restart;
bool m_startAnother;
bool m_saveDecoded;
bool m_saveAll;
bool m_widebandDecode;
bool m_call3Modified;
bool m_dataAvailable;
bool m_bDecoded;
bool m_noSuffix;
bool m_blankLine;
bool m_decodedText2;
bool m_freeText;
bool m_sentFirst73;
int m_currentMessageType;
QString m_currentMessage;
int m_lastMessageType;
QString m_lastMessageSent;
bool m_lockTxFreq;
bool m_bShMsgs;
bool m_bSWL;
bool m_uploadSpots;
bool m_uploading;
bool m_txNext;
bool m_grid6;
bool m_tuneup;
bool m_bTxTime;
bool m_rxDone;
bool m_bSimplex; // not using split even if it is available
bool m_bEchoTxOK;
bool m_bTransmittedEcho;
bool m_bEchoTxed;
bool m_bFastMode;
bool m_bFast9;
bool m_bFastDecodeCalled;
bool m_bDoubleClickAfterCQnnn;
bool m_bRefSpec;
bool m_bClearRefSpec;
bool m_bTrain;
bool m_bUseRef;
bool m_bFastDone;
bool m_bAltV;
bool m_bNoMoreFiles;
bool m_bQRAsyncWarned;
bool m_bDoubleClicked;
bool m_bCallingCQ;
bool m_bAutoReply;
enum
{
CALLING,
REPLYING,
REPORT,
ROGER_REPORT,
ROGERS,
SIGNOFF
}
m_QSOProgress;
int m_ihsym;
int m_nzap;
int m_npts8;
float m_px;
float m_pxmax;
float m_df3;
int m_iptt0;
bool m_btxok0;
int m_nsendingsh;
double m_onAirFreq0;
bool m_first_error;
char m_msg[100][80];
// labels in status bar
QLabel tx_status_label;
QLabel config_label;
QLabel mode_label;
QLabel last_tx_label;
QLabel auto_tx_label;
QLabel band_hopping_label;
QProgressBar progressBar;
QLabel watchdog_label;
QFuture<void> m_wav_future;
QFutureWatcher<void> m_wav_future_watcher;
QFutureWatcher<void> watcher3;
QFutureWatcher<QString> m_saveWAVWatcher;
QProcess proc_jt9;
QProcess p1;
QProcess p3;
WSPRNet *wsprNet;
QTimer m_guiTimer;
QTimer ptt1Timer; //StartTx delay
QTimer ptt0Timer; //StopTx delay
QTimer logQSOTimer;
QTimer killFileTimer;
QTimer tuneButtonTimer;
QTimer uploadTimer;
QTimer tuneATU_Timer;
QTimer TxAgainTimer;
QTimer minuteTimer;
QTimer splashTimer;
QTimer p1Timer;
QString m_path;
QString m_baseCall;
QString m_hisCall;
QString m_hisGrid;
QString m_appDir;
QString m_palette;
QString m_dateTime;
QString m_mode;
QString m_modeTx;
QString m_fnameWE; // save path without extension
QString m_rpt;
QString m_rptSent;
QString m_rptRcvd;
QString m_qsoStart;
QString m_qsoStop;
QString m_cmnd;
QString m_cmndP1;
QString m_msgSent0;
QString m_fileToSave;
QString m_calls;
QSet<QString> m_pfx;
QSet<QString> m_sfx;
QDateTime m_dateTimeQSOOn;
QSharedMemory *mem_jt9;
LogBook m_logBook;
DecodedText m_QSOText;
unsigned m_msAudioOutputBuffered;
unsigned m_framesAudioInputBuffered;
unsigned m_downSampleFactor;
QThread::Priority m_audioThreadPriority;
bool m_bandEdited;
bool m_splitMode;
bool m_monitoring;
bool m_tx_when_ready;
bool m_transmitting;
bool m_tune;
bool m_tx_watchdog; // true when watchdog triggered
bool m_block_pwr_tooltip;
bool m_PwrBandSetOK;
bool m_bVHFwarned;
Frequency m_lastMonitoredFrequency;
double m_toneSpacing;
int m_firstDecode;
QProgressDialog m_optimizingProgress;
QTimer m_heartbeat;
MessageClient * m_messageClient;
PSK_Reporter *psk_Reporter;
DisplayManual m_manual;
QHash<QString, QVariant> m_pwrBandTxMemory; // Remembers power level by band
QHash<QString, QVariant> m_pwrBandTuneMemory; // Remembers power level by band for tuning
QByteArray m_geometryNoControls;
QVector<double> m_phaseEqCoefficients;
//---------------------------------------------------- private functions
void readSettings();
void setDecodedTextFont (QFont const&);
void writeSettings();
void createStatusBar();
void updateStatusBar();
void genStdMsgs(QString rpt, bool unconditional = false);
void genCQMsg();
void clearDX ();
void lookup();
void ba2msg(QByteArray ba, char* message);
void msgtype(QString t, QLineEdit* tx);
void stub();
void statusChanged();
void fixStop();
bool shortList(QString callsign);
void transmit (double snr = 99.);
void rigFailure (QString const& reason);
void pskSetLocal ();
void pskPost(DecodedText decodedtext);
void displayDialFrequency ();
void transmitDisplay (bool);
void processMessage(QString const& messages, qint32 position, bool ctrl = false, bool alt = false);
void replyToCQ (QTime, qint32 snr, float delta_time, quint32 delta_frequency, QString const& mode, QString const& message_text);
void replayDecodes ();
void postDecode (bool is_new, QString const& message);
void postWSPRDecode (bool is_new, QStringList message_parts);
void enable_DXCC_entity (bool on);
void switch_mode (Mode);
void WSPR_scheduling ();
void freqCalStep();
void setRig (Frequency = 0); // zero frequency means no change
void WSPR_history(Frequency dialFreq, int ndecodes);
QString WSPR_hhmm(int n);
void fast_config(bool b);
void CQTxFreq();
QString save_wave_file (QString const& name
, short const * data
, int seconds
, QString const& my_callsign
, QString const& my_grid
, QString const& mode
, qint32 sub_mode
, Frequency frequency
, QString const& his_call
, QString const& his_grid) const;
void read_wav_file (QString const& fname);
void decodeDone ();
void subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
void subProcessError (QProcess *, QProcess::ProcessError);
void statusUpdate () const;
void update_watchdog_label ();
void on_the_minute ();
void add_child_to_event_filter (QObject *);
void remove_child_from_event_filter (QObject *);
void setup_status_bar (bool vhf);
void tx_watchdog (bool triggered);
int nWidgets(QString t);
void displayWidgets(int n);
void vhfWarning();
QChar current_submode () const; // returns QChar {0} if sub mode is
// not appropriate
void write_transmit_entry (QString const& file_name);
};
extern int killbyname(const char* progName);
extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
int minChan[], int maxChan[],
int minSpeed[], int maxSpeed[]);
extern int next_tx_state(int pctx);
#endif // MAINWINDOW_H
@@ -0,0 +1,421 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LogQSO</class>
<widget class="QDialog" name="LogQSO">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Click OK to confirm the following QSO:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lab1">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Call</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="call"/>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="lab2">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Start</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDateTimeEdit" name="start_date_time">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="displayFormat">
<string>dd/MM/yyyy HH:mm:ss</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="lab2_3">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>End</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDateTimeEdit" name="end_date_time">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="displayFormat">
<string>dd/MM/yyyy HH:mm:ss</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="lab4">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Mode</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mode">
<property name="maximumSize">
<size>
<width>70</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QLabel" name="lab5">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Band</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="band">
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QLabel" name="lab6">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Rpt Sent</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="sent">
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QLabel" name="lab7">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Rpt Rcvd</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="rcvd">
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QLabel" name="lab8">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Grid</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="grid">
<property name="maximumSize">
<size>
<width>70</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QLabel" name="lab9">
<property name="enabled">
<bool>true</bool>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Name</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="name">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Tx power</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="txPower"/>
</item>
<item>
<widget class="QCheckBox" name="cbTxPower">
<property name="text">
<string>Retain</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lab10">
<property name="enabled">
<bool>true</bool>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Comments</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="comments">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbComments">
<property name="text">
<string>Retain</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>call</tabstop>
<tabstop>start_date_time</tabstop>
<tabstop>end_date_time</tabstop>
<tabstop>mode</tabstop>
<tabstop>band</tabstop>
<tabstop>sent</tabstop>
<tabstop>rcvd</tabstop>
<tabstop>grid</tabstop>
<tabstop>name</tabstop>
<tabstop>txPower</tabstop>
<tabstop>cbTxPower</tabstop>
<tabstop>comments</tabstop>
<tabstop>cbComments</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>LogQSO</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>LogQSO</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>