Compare commits

..

No commits in common. "master" and "0.1.4" have entirely different histories.

367 changed files with 25356 additions and 75130 deletions

View File

@ -1,34 +0,0 @@
version: 2.1
jobs:
build:
docker:
- image: cimg/base:current-22.04
resource_class: medium
environment:
- CACHE_DIR: ~/build/wxWidgets/staticlib
steps:
- checkout
- restore_cache:
keys:
- cache-{{ checksum ".circleci/scripts/build_wxwidgets.sh" }}
- run:
name: Install Dependencies
command: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libpulse-dev libgtk-3-dev freeglut3 freeglut3-dev libhamlib-dev
- run:
name: Build wxWidgets
command: bash .circleci/scripts/build_wxwidgets.sh
- run:
name: Build LiquidDSP
command: bash .circleci/scripts/build_liquiddsp.sh
- run:
name: Build SoapySDR
command: bash .circleci/scripts/build_soapysdr.sh
- run:
name: Build CubicSDR
command: bash .circleci/scripts/build_cubicsdr.sh
- save_cache:
key: cache-{{ checksum ".circleci/scripts/build_wxwidgets.sh" }}
paths:
- ~/build/wxWidgets/staticlib

View File

@ -1,5 +0,0 @@
# CubicSDR
mkdir -p $HOME/build/cjcliffe/CubicSDR-build
cd $HOME/build/cjcliffe/CubicSDR-build
cmake ~/project -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=$HOME/build/wxWidgets/staticlib/bin/wx-config -DUSE_HAMLIB=1 -DENABLE_DIGITAL_LAB=1
make -j2

View File

@ -1,14 +0,0 @@
# Liquid-DSP
mkdir -p $HOME/build/jgaeddert
cd $HOME/build/jgaeddert
git clone https://github.com/jgaeddert/liquid-dsp.git
cd $HOME/build/jgaeddert/liquid-dsp
./bootstrap.sh
echo "Configuring liquid-dsp.."
./configure > /dev/null
echo "Building liquid-dsp.."
make -j2 > /dev/null
sudo make install

View File

@ -1,13 +0,0 @@
# Soapy SDR
mkdir -p $HOME/build/pothosware/SoapySDR-build
cd $HOME/build/pothosware
git clone https://github.com/pothosware/SoapySDR.git
cd $HOME/build/pothosware/SoapySDR-build
cmake $HOME/build/pothosware/SoapySDR -DCMAKE_BUILD_TYPE=Release
echo "Building SoapySDR.."
make -j2 > /dev/null
sudo make install

View File

@ -1,29 +0,0 @@
# wxWidgets
if [ -f "$HOME/build/wxWidgets/staticlib/bin/wx-config" ]; then
echo "wxWidgets cache found; skipping.."
exit 0
else
echo "wxWidgets cache not found; building.."
fi
echo "Fetch wxWidgets.."
mkdir -p $HOME/build/wxWidgets/staticlib
cd $HOME/build/wxWidgets
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.tar.bz2 > /dev/null
echo "Unpacking wxWidgets.."
tar -xvjf wxWidgets-3.2.1.tar.bz2 > /dev/null
cd wxWidgets-3.2.1/
./autogen.sh
if [ "$(uname)" == "Linux" ]; then
./configure --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webview --disable-webviewwebkit --prefix=`echo $HOME/build/wxWidgets/staticlib` CXXFLAGS="-std=c++0x"
elif [ "$(uname)" == "Darwin" ]; then
./configure --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --with-mac --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo $HOME/build/wxWidgets/staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr
fi
echo "Building wxWidgets.."
make V=1 -j2
make install

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
build/
cmake_build/
cmake_build_msvc/
dist/

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Exec=CubicSDR %u
Icon=@CMAKE_INSTALL_PREFIX@/share/cubicsdr/CubicSDR
Icon=/usr/share/cubicsdr/CubicSDR.png
Terminal=false
Name=CubicSDR
GenericName=CubicSDR

11
LICENSE
View File

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
CubicSDR
Copyright (C) 2014 Charles J. Cliffe
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -329,7 +329,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
@ -337,3 +337,4 @@ proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

183
README.md
View File

@ -1,45 +1,174 @@
CubicSDR [![CircleCI](https://dl.circleci.com/status-badge/img/gh/cjcliffe/CubicSDR/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/cjcliffe/CubicSDR/tree/master)
CubicSDR
========
Cross-Platform Software-Defined Radio Application
- The latest releases are available on the [CubicSDR Releases](https://github.com/cjcliffe/CubicSDR/releases) page.
- Build instructions can be found at the [CubicSDR Wiki](https://github.com/cjcliffe/CubicSDR/wiki) page.
- Manual is available at [cubicsdr.readthedocs.io](http://cubicsdr.readthedocs.io).
- Manual contributions can be submitted to the [CubicSDR-Manual](https://github.com/cjcliffe/CubicSDR-Manual) repository.
Utilizes:
--------
- liquid-dsp (http://liquidsdr.org/ -- https://github.com/jgaeddert/liquid-dsp)
- SoapySDR (http://www.pothosware.com/ -- https://github.com/pothosware/SoapySDR)
- RtAudio (http://www.music.mcgill.ca/~gary/rtaudio/ -- http://github.com/thestk/rtaudio/)
- liquid-dsp (http://liquidsdr.org/ https://github.com/jgaeddert/liquid-dsp)
- FFTW (http://www.fftw.org/ https://github.com/FFTW/fftw3)
- RtAudio (http://www.music.mcgill.ca/~gary/rtaudio/ http://github.com/thestk/rtaudio/)
- Osmocom RTLSDR (http://sdr.osmocom.org/trac/wiki/rtl-sdr)
- LodePNG (http://lodev.org/lodepng/)
- BMFont (http://www.angelcode.com/ -- http://www.angelcode.com/products/bmfont/)
- BMFont (http://www.angelcode.com/ http://www.angelcode.com/products/bmfont/)
- Bitstream Vera font (http://en.wikipedia.org/wiki/Bitstream_Vera)
- OpenGL (https://www.opengl.org/)
- wxWidgets (https://www.wxwidgets.org/)
- CMake (http://www.cmake.org/)
Optional Libs:
--------
- FFTW3 (can be compiled into liquid-dsp if desired) (http://www.fftw.org/ -- https://github.com/FFTW/fftw3)
- hamlib (https://github.com/Hamlib/Hamlib)
Recommended minimum requirements:
Features and Status:
--------------------
- Multi-core processor system with at least 1GB RAM.
- Graphics card with at least 128MB video memory and OpenGL 3.x or ES 2.0 support.
- OSX 10.9+ for Mac binary releases.
- Windows 7+ for 64 or 32-bit Windows binary releases.
- Linux and other embedded distribution support yet to be indexed, known to at least work on Debian 8+ and Ubuntu 14+.
- Simple UI
- Devices
- [x] RTL-SDR
- [ ] rtl_tcp client
- [ ] gr-osmosdr
- Basic Features
- [x] Device Selection
- [x] Bandwidth
- [x] Color scheme
- [x] Load/Save session
- [x] Audio sample rate
- [x] Device PPM
- [ ] Default preferences
- [ ] Audio defaults
- [x] Device defaults
- [ ] Bookmarks
- [ ] History
- [ ] Run as rtl_tcp server and visualize control
- Neat Visuals
- [ ] 2D visuals
- [x] Y Scope
- [x] Spectrum
- [x] Waterfall
- [x] Add faint grid for sense of scale
- [ ] Audio Spectrum
- [ ] X/Y Scope
- [ ] Indicate outer spectrum edges when zoomed
- [ ] 3D visuals
- [ ] I/Q helix
- Demodulation:
- [ ] Basic modular expansion
- [x] Multiple demodulators per IQ stream
- [x] Audio device selection
- [x] Modes
- [x] FM
- [x] FM stereo
- [x] AM
- [x] LSB
- [x] USB
- [x] DSB
- [x] I/Q
- [ ] Controls
- [x] Display Frequency and allow manual adjustments
- [x] Allow selection of demodulation type
- [x] Display separate zoomed-in view of current waterfall and spectrum, allow adjustments
- [x] Display signal level and allow squelch control
- [x] Display audio output selection
- [x] Volume control
- [x] Direct frequency input
- [ ] Mute
- [ ] Waterfall speed
- [ ] RTL-SDR Gain
- Basic Input Controls
- [x] Drag spectrum to change center frequency
- [x] Hold shift and click on waterfall to create a new demodulator
- [x] Clicking waterfall adds new demodulator when none visible
- [x] Drag center of demodulator on waterfall to change frequency
- [x] Drag edge of demodulator on waterfall to change bandwidth
- [x] Double-Click to move demodulator to frequency within it's current range
- [x] Hold alt and drag range on waterfall to set demodulator frequency + bandwidth
- [x] Hold alt+shift and drag range on waterfall for a new demodulator
- [x] Hover demodulator on waterfall and press 'space' to toggle stereo
- [x] Hover demodulator on waterfall and press 'd' or 'delete' to delete it
- [x] Keyboard arrows adjust frequency, shift for faster change
- [ ] Undo / Redo action
- I/Q Recording and playback
- [ ] Recording
- [ ] Record waterfall output to PNG file chunks of desired height
- [ ] Record I/Q input data
- [ ] Simultaneously record demod decimated I/Q and audio
- [ ] Playback
- Audio
- [ ] Recording
- Implement digital demodulation supported by liquid-dsp: (http://liquidsdr.org/doc/modem.html)
- [ ] Demodulator Lab
- [ ] Demodulator I/Q input filtering
- [ ] Audio output filtering
- [ ] Toggle current demodulator exclusively into "Lab" mode
- [ ] Additional visualizations for audio and I/Q stream
- [ ] Audio Spectrum
- [ ] Constellation / X-Y Scope
- [ ] Digital demodulation status and controls
- [ ] Demodulator AGC, Equalization controls
- [ ] Lock AGC and Equalization when digital lock obtained
- [ ] Digital output
- [ ] Output console
- [ ] Capture file (auto?)
- [ ] Network output
- [ ] Block device output
- [ ] Digital modes available to implement
- [ ] PSK
- [ ] DPSK
- [ ] ASK
- [ ] QAM
- [ ] APSK
- [ ] BPSK
- [ ] QPSK
- [ ] OOK
- [ ] SQAM
- [ ] Star Modem
- [ ] MFSK
- [ ] CPFSK
- Optimization
- [x] Eliminate large waterfall texture uploads
- [ ] Update visuals to OpenGL 3.x / OpenGL ES
- [ ] Resolve constant refresh on visuals that don't change often
- [ ] Resolve all driver/platform vertical sync issues
- [ ] Group and divide IQ data distribution workload instead of 100% distribution per instance
Platform build scripts and test builds:
--------------------------------------
- MacOS (https://github.com/cjcliffe/CubicSDR-macOSBuild)
- Windows (https://github.com/cjcliffe/CubicSDR-WinBuild)
- Linux (AppImage) (https://github.com/cjcliffe/CubicSDR-AppImageKit)
Advanced Goals and ideas:
------------------------
- Design a plan for expansion via modules (dylib/dll/lua)
- Support shell-based stdin/stdout tools for direct output/playback to/from CLI audio processing apps (i.e. DSD on OSX)
- Update visuals to support OpenGL ES
- Basic demodulator filter(s) that can be enabled and tweaked visually
- Support multiple simultaneous device usage
* Categorize devices by antenna connections
* Allow locked frequencies to activate unused devices to continue demodulation on same antenna
- Integrate LUA
* Expose liquid-dsp functionality
* Scriptable liquid-dsp demodulation
* Scriptable digital demodulation output handlers
- Create block output devices on *nix?
- Create socket outputs?
- Visual outputs?
* Take control of additional devices and spawning new demodulators (i.e. trunkers)
* Script manager / live editor
* Provide scriptable liquid-dsp modulation for trancievers?
* Allow scripts to launch/run headless (no UI)
- "PVR" like mode with waterfall time shifting
- L/R and surround-sound balance settings for separating and listening to mono streams
- Add tool for converting decimated I/Q recording to video
- Select video features such as title/demodulation/scope/waterfall/etc
- Render to video from GL frames->ffmpeg/mencoder /w demodulated audio
- Accessability / Control
- USB/MIDI control surfaces
- Joystick / gamepad input
- Vibration / force-feeback
- Investigate compilation via emscripten using rtl_tcp for input
- Create web server+rtl_tcp bundle for embedded devices
- Use emscripten compiled CubicSDR via embedded web server
Target Platforms:
----------------
- [x] OSX
- [x] Windows
- [x] Linux
- [ ] HTML5
License:
-------
- GPL-2.0+
- GPL

View File

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,161 @@
#.rst:
# CMakeParseArguments
# -------------------
#
#
#
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords>
# <multi_value_keywords> args...)
#
# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions
# for parsing the arguments given to that macro or function. It
# processes the arguments and defines a set of variables which hold the
# values of the respective options.
#
# The <options> argument contains all options for the respective macro,
# i.e. keywords which can be used when calling the macro without any
# value following, like e.g. the OPTIONAL keyword of the install()
# command.
#
# The <one_value_keywords> argument contains all keywords for this macro
# which are followed by one value, like e.g. DESTINATION keyword of the
# install() command.
#
# The <multi_value_keywords> argument contains all keywords for this
# macro which can be followed by more than one value, like e.g. the
# TARGETS or FILES keywords of the install() command.
#
# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
# keywords listed in <options>, <one_value_keywords> and
# <multi_value_keywords> a variable composed of the given <prefix>
# followed by "_" and the name of the respective keyword. These
# variables will then hold the respective value from the argument list.
# For the <options> keywords this will be TRUE or FALSE.
#
# All remaining arguments are collected in a variable
# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see
# whether your macro was called with unrecognized parameters.
#
# As an example here a my_install() macro, which takes similar arguments
# as the real install() command:
#
# ::
#
# function(MY_INSTALL)
# set(options OPTIONAL FAST)
# set(oneValueArgs DESTINATION RENAME)
# set(multiValueArgs TARGETS CONFIGURATIONS)
# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}"
# "${multiValueArgs}" ${ARGN} )
# ...
#
#
#
# Assume my_install() has been called like this:
#
# ::
#
# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
#
#
#
# After the cmake_parse_arguments() call the macro will have set the
# following variables:
#
# ::
#
# MY_INSTALL_OPTIONAL = TRUE
# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
# MY_INSTALL_DESTINATION = "bin"
# MY_INSTALL_RENAME = "" (was not used)
# MY_INSTALL_TARGETS = "foo;bar"
# MY_INSTALL_CONFIGURATIONS = "" (was not used)
# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
#
#
#
# You can then continue and process these variables.
#
# Keywords terminate lists of values, e.g. if directly after a
# one_value_keyword another recognized keyword follows, this is
# interpreted as the beginning of the new option. E.g.
# my_install(TARGETS foo DESTINATION OPTIONAL) would result in
# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION
# would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
#=============================================================================
# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
return()
endif()
set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
# first set all result variables to empty/FALSE
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
set(${prefix}_${arg_name})
endforeach()
foreach(option ${_optionNames})
set(${prefix}_${option} FALSE)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS)
set(insideValues FALSE)
set(currentArgName)
# now iterate over all arguments and fill the result variables
foreach(currentArg ${ARGN})
list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
if(insideValues)
if("${insideValues}" STREQUAL "SINGLE")
set(${prefix}_${currentArgName} ${currentArg})
set(insideValues FALSE)
elseif("${insideValues}" STREQUAL "MULTI")
list(APPEND ${prefix}_${currentArgName} ${currentArg})
endif()
else()
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
endif()
else()
if(NOT ${optionIndex} EQUAL -1)
set(${prefix}_${currentArg} TRUE)
set(insideValues FALSE)
elseif(NOT ${singleArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "SINGLE")
elseif(NOT ${multiArgIndex} EQUAL -1)
set(currentArgName ${currentArg})
set(${prefix}_${currentArgName})
set(insideValues "MULTI")
endif()
endif()
endforeach()
# propagate the result variables to the caller:
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
endfunction()

View File

@ -1,22 +0,0 @@
# - Find LIQUID
# Find the native LIQUID includes and library
#
# LIQUID_INCLUDES - where to find LIQUID.h
# LIQUID_LIBRARIES - List of libraries when using LIQUID.
# LIQUID_FOUND - True if LIQUID found.
if (LIQUID_INCLUDES)
# Already in cache, be silent
set (LIQUID_FIND_QUIETLY TRUE)
endif (LIQUID_INCLUDES)
find_path (LIQUID_INCLUDES liquid/liquid.h)
find_library (LIQUID_LIBRARIES NAMES liquid)
# handle the QUIETLY and REQUIRED arguments and set LIQUID_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (LIQUID DEFAULT_MSG LIQUID_LIBRARIES LIQUID_INCLUDES)
#mark_as_advanced (LIQUID_LIBRARIES LIQUID_INCLUDES)

View File

@ -0,0 +1,382 @@
#.rst:
# FindPackageHandleStandardArgs
# -----------------------------
#
#
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
#
# This function is intended to be used in FindXXX.cmake modules files.
# It handles the REQUIRED, QUIET and version-related arguments to
# find_package(). It also sets the <packagename>_FOUND variable. The
# package is considered found if all variables <var1>... listed contain
# valid results, e.g. valid filepaths.
#
# There are two modes of this function. The first argument in both
# modes is the name of the Find-module where it is called (in original
# casing).
#
# The first simple mode looks like this:
#
# ::
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name>
# (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
#
# If the variables <var1> to <varN> are all valid, then
# <UPPERCASED_NAME>_FOUND will be set to TRUE. If DEFAULT_MSG is given
# as second argument, then the function will generate itself useful
# success and error messages. You can also supply a custom error
# message for the failure case. This is not recommended.
#
# The second mode is more powerful and also supports version checking:
#
# ::
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME
# [FOUND_VAR <resultVar>]
# [REQUIRED_VARS <var1>...<varN>]
# [VERSION_VAR <versionvar>]
# [HANDLE_COMPONENTS]
# [CONFIG_MODE]
# [FAIL_MESSAGE "Custom failure message"] )
#
# In this mode, the name of the result-variable can be set either to
# either <UPPERCASED_NAME>_FOUND or <OriginalCase_Name>_FOUND using the
# FOUND_VAR option. Other names for the result-variable are not
# allowed. So for a Find-module named FindFooBar.cmake, the two
# possible names are FooBar_FOUND and FOOBAR_FOUND. It is recommended
# to use the original case version. If the FOUND_VAR option is not
# used, the default is <UPPERCASED_NAME>_FOUND.
#
# As in the simple mode, if <var1> through <varN> are all valid,
# <packagename>_FOUND will be set to TRUE. After REQUIRED_VARS the
# variables which are required for this package are listed. Following
# VERSION_VAR the name of the variable can be specified which holds the
# version of the package which has been found. If this is done, this
# version will be checked against the (potentially) specified required
# version used in the find_package() call. The EXACT keyword is also
# handled. The default messages include information about the required
# version and the version which has been actually found, both if the
# version is ok or not. If the package supports components, use the
# HANDLE_COMPONENTS option to enable handling them. In this case,
# find_package_handle_standard_args() will report which components have
# been found and which are missing, and the <packagename>_FOUND variable
# will be set to FALSE if any of the required components (i.e. not the
# ones listed after OPTIONAL_COMPONENTS) are missing. Use the option
# CONFIG_MODE if your FindXXX.cmake module is a wrapper for a
# find_package(... NO_MODULE) call. In this case VERSION_VAR will be
# set to <NAME>_VERSION and the macro will automatically check whether
# the Config module was found. Via FAIL_MESSAGE a custom failure
# message can be specified, if this is not used, the default message
# will be displayed.
#
# Example for mode 1:
#
# ::
#
# find_package_handle_standard_args(LibXml2 DEFAULT_MSG
# LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
#
#
#
# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to
# TRUE. If it is not found and REQUIRED was used, it fails with
# FATAL_ERROR, independent whether QUIET was used or not. If it is
# found, success will be reported, including the content of <var1>. On
# repeated Cmake runs, the same message won't be printed again.
#
# Example for mode 2:
#
# ::
#
# find_package_handle_standard_args(LibXslt
# FOUND_VAR LibXslt_FOUND
# REQUIRED_VARS LibXslt_LIBRARIES LibXslt_INCLUDE_DIRS
# VERSION_VAR LibXslt_VERSION_STRING)
#
# In this case, LibXslt is considered to be found if the variable(s)
# listed after REQUIRED_VAR are all valid, i.e. LibXslt_LIBRARIES and
# LibXslt_INCLUDE_DIRS in this case. The result will then be stored in
# LibXslt_FOUND . Also the version of LibXslt will be checked by using
# the version contained in LibXslt_VERSION_STRING. Since no
# FAIL_MESSAGE is given, the default messages will be printed.
#
# Another example for mode 2:
#
# ::
#
# find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
# find_package_handle_standard_args(Automoc4 CONFIG_MODE)
#
# In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4
# NO_MODULE) and adds an additional search directory for automoc4. Here
# the result will be stored in AUTOMOC4_FOUND. The following
# FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
# success/error message.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
# internal helper macro
macro(_FPHSA_FAILURE_MESSAGE _msg)
if (${_NAME}_FIND_REQUIRED)
message(FATAL_ERROR "${_msg}")
else ()
if (NOT ${_NAME}_FIND_QUIETLY)
message(STATUS "${_msg}")
endif ()
endif ()
endmacro()
# internal helper macro to generate the failure message when used in CONFIG_MODE:
macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
# <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
if(${_NAME}_CONFIG)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
else()
# If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
# List them all in the error message:
if(${_NAME}_CONSIDERED_CONFIGS)
set(configsText "")
list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
math(EXPR configsCount "${configsCount} - 1")
foreach(currentConfigIndex RANGE ${configsCount})
list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
set(configsText "${configsText} ${filename} (version ${version})\n")
endforeach()
if (${_NAME}_NOT_FOUND_MESSAGE)
set(configsText "${configsText} Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n")
endif()
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
else()
# Simple case: No Config-file was found at all:
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
endif()
endif()
endmacro()
function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
# new extended or in the "old" mode:
set(options CONFIG_MODE HANDLE_COMPONENTS)
set(oneValueArgs FAIL_MESSAGE VERSION_VAR FOUND_VAR)
set(multiValueArgs REQUIRED_VARS)
set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
if(${INDEX} EQUAL -1)
set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
set(FPHSA_REQUIRED_VARS ${ARGN})
set(FPHSA_VERSION_VAR)
else()
CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
if(FPHSA_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
endif()
if(NOT FPHSA_FAIL_MESSAGE)
set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG")
endif()
endif()
# now that we collected all arguments, process them
if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG")
set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
endif()
# In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
# when it successfully found the config-file, including version checking:
if(FPHSA_CONFIG_MODE)
list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
set(FPHSA_VERSION_VAR ${_NAME}_VERSION)
endif()
if(NOT FPHSA_REQUIRED_VARS)
message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
endif()
list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
string(TOUPPER ${_NAME} _NAME_UPPER)
string(TOLOWER ${_NAME} _NAME_LOWER)
if(FPHSA_FOUND_VAR)
if(FPHSA_FOUND_VAR MATCHES "^${_NAME}_FOUND$" OR FPHSA_FOUND_VAR MATCHES "^${_NAME_UPPER}_FOUND$")
set(_FOUND_VAR ${FPHSA_FOUND_VAR})
else()
message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_NAME}_FOUND\" and \"${_NAME_UPPER}_FOUND\" are valid names.")
endif()
else()
set(_FOUND_VAR ${_NAME_UPPER}_FOUND)
endif()
# collect all variables which were not found, so they can be printed, so the
# user knows better what went wrong (#6375)
set(MISSING_VARS "")
set(DETAILS "")
# check if all passed variables are valid
unset(${_FOUND_VAR})
foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
if(NOT ${_CURRENT_VAR})
set(${_FOUND_VAR} FALSE)
set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
else()
set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
endif()
endforeach()
if(NOT "${${_FOUND_VAR}}" STREQUAL "FALSE")
set(${_FOUND_VAR} TRUE)
endif()
# component handling
unset(FOUND_COMPONENTS_MSG)
unset(MISSING_COMPONENTS_MSG)
if(FPHSA_HANDLE_COMPONENTS)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(${_NAME}_${comp}_FOUND)
if(NOT DEFINED FOUND_COMPONENTS_MSG)
set(FOUND_COMPONENTS_MSG "found components: ")
endif()
set(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}")
else()
if(NOT DEFINED MISSING_COMPONENTS_MSG)
set(MISSING_COMPONENTS_MSG "missing components: ")
endif()
set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}")
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_FOUND_VAR} FALSE)
set(MISSING_VARS "${MISSING_VARS} ${comp}")
endif()
endif()
endforeach()
set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}")
set(DETAILS "${DETAILS}[c${COMPONENT_MSG}]")
endif()
# version handling:
set(VERSION_MSG "")
set(VERSION_OK TRUE)
set(VERSION ${${FPHSA_VERSION_VAR}})
# check with DEFINED here as the requested or found version may be "0"
if (DEFINED ${_NAME}_FIND_VERSION)
if(DEFINED ${FPHSA_VERSION_VAR})
if(${_NAME}_FIND_VERSION_EXACT) # exact version required
# count the dots in the version string
string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${VERSION}")
# add one dot because there is one dot more than there are components
string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS)
if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT)
# Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT
# is at most 4 here. Therefore a simple lookup table is used.
if (${_NAME}_FIND_VERSION_COUNT EQUAL 1)
set(_VERSION_REGEX "[^.]*")
elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2)
set(_VERSION_REGEX "[^.]*\\.[^.]*")
elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3)
set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*")
else ()
set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*")
endif ()
string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${VERSION}")
unset(_VERSION_REGEX)
if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD)
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
set(VERSION_OK FALSE)
else ()
set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
endif ()
unset(_VERSION_HEAD)
else ()
if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL VERSION)
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
set(VERSION_OK FALSE)
else ()
set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
endif ()
endif ()
unset(_VERSION_DOTS)
else() # minimum version specified:
if (${_NAME}_FIND_VERSION VERSION_GREATER VERSION)
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
set(VERSION_OK FALSE)
else ()
set(VERSION_MSG "(found suitable version \"${VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")")
endif ()
endif()
else()
# if the package was not found, but a version was given, add that to the output:
if(${_NAME}_FIND_VERSION_EXACT)
set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
else()
set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
endif()
endif()
else ()
if(VERSION)
set(VERSION_MSG "(found version \"${VERSION}\")")
endif()
endif ()
if(VERSION_OK)
set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
else()
set(${_FOUND_VAR} FALSE)
endif()
# print the result:
if (${_FOUND_VAR})
FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
else ()
if(FPHSA_CONFIG_MODE)
_FPHSA_HANDLE_FAILURE_CONFIG_MODE()
else()
if(NOT VERSION_OK)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
else()
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
endif()
endif()
endif ()
set(${_FOUND_VAR} ${${_FOUND_VAR}} PARENT_SCOPE)
endfunction()

View File

@ -0,0 +1,57 @@
#.rst:
# FindPackageMessage
# ------------------
#
#
#
# FIND_PACKAGE_MESSAGE(<name> "message for user" "find result details")
#
# This macro is intended to be used in FindXXX.cmake modules files. It
# will print a message once for each unique find result. This is useful
# for telling the user where a package was found. The first argument
# specifies the name (XXX) of the package. The second argument
# specifies the message to display. The third argument lists details
# about the find result so that if they change the message will be
# displayed again. The macro also obeys the QUIET argument to the
# find_package command.
#
# Example:
#
# ::
#
# if(X11_FOUND)
# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
# else()
# ...
# endif()
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
function(FIND_PACKAGE_MESSAGE pkg msg details)
# Avoid printing a message repeatedly for the same find result.
if(NOT ${pkg}_FIND_QUIETLY)
string(REPLACE "\n" "" details "${details}")
set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
# The message has not yet been printed.
message(STATUS "${msg}")
# Save the find details in the cache to avoid printing the same
# message again.
set("${DETAILS_VAR}" "${details}"
CACHE INTERNAL "Details about finding ${pkg}")
endif()
endif()
endfunction()

View File

@ -1,48 +0,0 @@
# https://github.com/idiap/juicer/blob/master/cmake/FindRtAudio.cmake
#
# Copyright 2015 by Idiap Research Institute
#
# Licensed under 3-clause BSD.
#
# Author(s):
# Phil Garner, November 2015
#
# ...but basically copied from FindSndFile in libube, in turn from the examples
# on the web.
#
#
# Try to find RtAudio
# Once done this will define
# RTAUDIO_FOUND - System has RtAudio
# RTAUDIO_INCLUDE_DIR - The RtAudio include directories
# RTAUDIO_LIBRARIES - The libraries needed to use RtAudio
# RTAUDIO_DEFINITIONS - Compiler switches required for using RtAudio
# RTAUDIO_VERSION_STRING - the version of RtAudio found
#
find_package(PkgConfig)
pkg_check_modules(PC_RTAUDIO rtaudio)
set(RTAUDIO_DEFINITIONS ${PC_RTAUDIO_CFLAGS_OTHER})
set(RTAUDIO_VERSION_STRING ${PC_RTAUDIO_VERSION})
find_path(
RTAUDIO_INCLUDE_DIR RtAudio.h
HINTS ${PC_RTAUDIO_INCLUDEDIR} ${PC_RTAUDIO_INCLUDE_DIRS}
)
find_library(
RTAUDIO_LIBRARIES NAMES rtaudio
HINTS ${PC_RTAUDIO_LIBDIR} ${PC_RTAUDIO_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
RtAudio
REQUIRED_VARS RTAUDIO_LIBRARIES RTAUDIO_INCLUDE_DIR
VERSION_VAR RTAUDIO_VERSION_STRING
)
#mark_as_advanced(RTAUDIO_INCLUDE_DIR RTAUDIO_LIBRARIES)

View File

@ -1,77 +0,0 @@
# - Try to find Hamlib
# Author: George L. Emigh - AB4BD
#
# Change Log: Charles J. Cliffe <cj@cubicproductions.com>
# Updates:
# Jan 2015 - Add /opt/ paths for OSX MacPorts
# - Fix HAMLIB_INCLUDE_DIR absolute search
# - Add static lib support
# TODO:
# Windows support
#
# HAMLIB_FOUND - system has Hamlib
# HAMLIB_LIBRARY - location of the library for hamlib
# HAMLIB_INCLUDE_DIR - location of the include files for hamlib
set(HAMLIB_FOUND FALSE)
find_path(HAMLIB_INCLUDE_DIR
NAMES hamlib/rig.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
)
find_library(HAMLIB_LIBRARY
NAMES hamlib
PATHS
/usr/lib64/hamlib
/usr/lib/hamlib
/usr/lib64
/usr/lib
/usr/local/lib64/hamlib
/usr/local/lib/hamlib
/usr/local/lib64
/usr/local/lib
/opt/local/lib
/opt/local/lib/hamlib
)
find_library(HAMLIB_STATIC_LIBRARY
NAMES libhamlib.a
PATHS
/usr/lib64/hamlib
/usr/lib/hamlib
/usr/lib64
/usr/lib
/usr/local/lib64/hamlib
/usr/local/lib/hamlib
/usr/local/lib64
/usr/local/lib
/opt/local/lib
/opt/local/lib/hamlib
)
GET_FILENAME_COMPONENT(HAMLIB_LIB_FOLDER ${HAMLIB_STATIC_LIBRARY} DIRECTORY)
file(GLOB HAMLIB_STATIC_MODS ${HAMLIB_LIB_FOLDER}/hamlib-*.a)
if(HAMLIB_INCLUDE_DIR AND HAMLIB_LIBRARY)
set(HAMLIB_FOUND TRUE)
# message(STATUS "Hamlib version: ${VERSION}")
message(STATUS "Found hamlib library at: ${HAMLIB_LIBRARY}")
message(STATUS "Found hamlib static library at: ${HAMLIB_STATIC_LIBRARY}")
message(STATUS "Found hamlib static modules: ${HAMLIB_STATIC_MODS}")
message(STATUS "Found hamlib include directory at: ${HAMLIB_INCLUDE_DIR}")
endif(HAMLIB_INCLUDE_DIR AND HAMLIB_LIBRARY)
IF(NOT HAMLIB_FOUND)
IF(NOT HAMLIB_FIND_QUIETLY)
MESSAGE(STATUS "HAMLIB was not found.")
ELSE(NOT HAMLIB_FIND_QUIETLY)
IF(HAMLIB_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "HAMLIB was not found.")
ENDIF(HAMLIB_FIND_REQUIRED)
ENDIF(NOT HAMLIB_FIND_QUIETLY)
ENDIF(NOT HAMLIB_FOUND)

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
IF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
MESSAGE(FATAL_ERROR "Cannot find install manifest: '${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt'")
ENDIF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
FILE(READ "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt" files)
STRING(REGEX REPLACE " " ";" files "${files}")
STRING(REGEX REPLACE "\n" ";" files "${files}")
FOREACH(file ${files})
MESSAGE(STATUS "Uninstalling '$ENV{DESTDIR}${file}'")
IF(EXISTS "$ENV{DESTDIR}${file}")
EXEC_PROGRAM(
"${CMAKE_COMMAND}" ARGS "-E remove '$ENV{DESTDIR}${file}'"
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
IF(NOT "${rm_retval}" STREQUAL 0)
MESSAGE(FATAL_ERROR "Problem when removing '$ENV{DESTDIR}${file}'")
ENDIF(NOT "${rm_retval}" STREQUAL 0)
ELSE(EXISTS "$ENV{DESTDIR}${file}")
MESSAGE(STATUS "File '$ENV{DESTDIR}${file}' does not exist.")
ENDIF(EXISTS "$ENV{DESTDIR}${file}")
ENDFOREACH(file)

View File

@ -1,11 +0,0 @@
#!/bin/bash
for f in ${APPS}/Contents/**/*.dylib
do
/usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" $f
done
for f in ${APPS}/Contents/MacOS/modules/*.so
do
/usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" $f
done
/usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" ${APPS}

View File

@ -1,2 +0,0 @@
#!/bin/bash
/usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" CubicSDR-${CPACK_PACKAGE_VERSION}-Darwin.dmg

View File

@ -14,7 +14,7 @@
namespace CubicVR {
enum class aabb_intersect { AABB_DISJOINT, AABB_A_INSIDE_B, AABB_B_INSIDE_A, AABB_INTERSECT };
enum aabb_enum { AABB_DISJOINT, AABB_A_INSIDE_B, AABB_B_INSIDE_A, AABB_INTERSECT };
struct aabb {
vec3 min, max;
@ -76,33 +76,33 @@ namespace CubicVR {
CubicVR.enums.aabb.B_INSIDE_A if boxB is inside boxA
CubicVR.enums.aabb.DISJOINT if AABBs are disjoint (do not intersect)
*/
aabb_intersect intersects(aabb boxA, aabb boxB) {
aabb_enum intersects(aabb boxA, aabb boxB) {
// Disjoint
if( boxA.min[0] > boxB.max[0] || boxA.max[0] < boxB.min[0] ){
return aabb_intersect::AABB_DISJOINT;
return AABB_DISJOINT;
}
if( boxA.min[1] > boxB.max[1] || boxA.max[1] < boxB.min[1] ){
return aabb_intersect::AABB_DISJOINT;
return AABB_DISJOINT;
}
if( boxA.min[2] > boxB.max[2] || boxA.max[2] < boxB.min[2] ){
return aabb_intersect::AABB_DISJOINT;
return AABB_DISJOINT;
}
// boxA is inside boxB.
if( boxA.min[0] >= boxB.min[0] && boxA.max[0] <= boxB.max[0] &&
boxA.min[1] >= boxB.min[1] && boxA.max[1] <= boxB.max[1] &&
boxA.min[2] >= boxB.min[2] && boxA.max[2] <= boxB.max[2]) {
return aabb_intersect::AABB_A_INSIDE_B;
return AABB_A_INSIDE_B;
}
// boxB is inside boxA.
if( boxB.min[0] >= boxA.min[0] && boxB.max[0] <= boxA.max[0] &&
boxB.min[1] >= boxA.min[1] && boxB.max[1] <= boxA.max[1] &&
boxB.min[2] >= boxA.min[2] && boxB.max[2] <= boxA.max[2]) {
return aabb_intersect::AABB_B_INSIDE_A;
return AABB_B_INSIDE_A;
}
// Otherwise AABB's intersect.
return aabb_intersect::AABB_INTERSECT;
return AABB_INTERSECT;
}
};
};

View File

@ -12,7 +12,7 @@
#include <iostream>
#include "vec3.h"
#include <cstring>
#include <stddef.h>
namespace CubicVR {
#define mat3SG(c,x,y) \
@ -20,20 +20,14 @@ namespace CubicVR {
c & COMBINE(set,x)(mat3 value) { y = value; return *this; }
struct mat3 {
__float a,b,c,d,e,f,g,h,i;
//access as-array:
inline __float& operator [] (size_t i) {
__float* as_array = (__float*)this;
return (as_array[i]);
}
// __float operator [] (unsigned i) const { return ((__float *)this)[i]; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
operator __float*() const { return (__float *)this; }
inline const __float& operator [] (size_t i) const {
__float* as_array = (__float*)this;
return (as_array[i]);
}
mat3(__float ai,__float bi,__float ci,__float di,__float ei,__float fi,__float gi,__float hi,__float ii) {
a = ai; b = bi; c = ci; d = di; e = ei; f = fi; g = gi; h = hi; i = ii;
};

View File

@ -15,35 +15,21 @@
#include "vec4.h"
#include "mat3.h"
#include <cmath>
#include <stddef.h>
namespace CubicVR {
using namespace std;
#define mat4SG(c,x,y) \
mat4 COMBINE(get,x)() { return y; } \
c & COMBINE(set,x)(mat4 value) { y = value; return *this; }
struct mat4 {
//16 elements
__float a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p;
//access as-array:
inline __float& operator [] (size_t i) {
__float* as_array = (__float*)this;
return (as_array[i]);
}
__float a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;
inline const __float& operator [] (size_t i) const {
__float* as_array = (__float*)this;
return (as_array[i]);
}
//To be accessed by GL API directly, accessed by pointer.
//operator* overloading is way too dangerous, especially in ptr != NULL
//tests.
inline __float* to_ptr() const { return (__float *)this; }
// __float operator [] (unsigned i) const { return ((__float *)this)[i]; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
operator __float*() const { return (__float *)this; }
mat4(__float ai,__float bi,__float ci,__float di,__float ei,__float fi,__float gi,__float hi,__float ii,__float ji,__float ki,__float li,__float mi,__float ni,__float oi,__float pi) {
a = ai; b = bi; c = ci; d = di; e = ei; f = fi; g = gi; h = hi; i = ii; j = ji; k = ki; l = li; m = mi; n = ni; o = oi; p = pi;
}
@ -56,7 +42,7 @@ namespace CubicVR {
return mat4(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f);
}
static mat4 multiply(mat4 mLeft, mat4 mRight, bool /* updated */) {
static mat4 multiply(mat4 mLeft, mat4 mRight, bool updated) {
mat4 mOut;
mOut[0] = mLeft[0] * mRight[0] + mLeft[4] * mRight[1] + mLeft[8] * mRight[2] + mLeft[12] * mRight[3];
@ -79,7 +65,7 @@ namespace CubicVR {
return mOut;
};
static vec3 multiply(mat4 m1, vec3 m2, bool /* updated */) {
static vec3 multiply(mat4 m1, vec3 m2, bool updated) {
vec3 mOut;
mOut[0] = m1[0] * m2[0] + m1[4] * m2[1] + m1[8] * m2[2] + m1[12];
@ -92,11 +78,11 @@ namespace CubicVR {
__float A = (right + left) / (right - left);
__float B = (top + bottom) / (top - bottom);
__float C = - (zFar + zNear) / (zFar - zNear);
__float D = - (-2.0f * zFar * zNear) / (zFar - zNear);
__float D = - (-2.0 * zFar * zNear) / (zFar - zNear);
return mat4((2.0f * zNear) / (right - left), 0, A, 0,
0, (2.0f * zNear) / (top - bottom), B, 0,
return mat4((2.0 * zNear) / (right - left), 0, A, 0,
0, (2.0 * zNear) / (top - bottom), B, 0,
0, 0, C, D,
0, 0, -1, 0);
};
@ -277,19 +263,22 @@ namespace CubicVR {
static mat4 transform(vec3 position, vec3 rotation, vec3 scale) {
mat4 m = mat4::identity();
m *= mat4::translate(position[0],position[1],position[2]);
if (!(rotation[0] == 0 && rotation[1] == 0 && rotation[2] == 0)) {
m *= mat4::rotate(rotation[0], rotation[1], rotation[2]);
if (position!=NULL) {
m *= mat4::translate(position[0],position[1],position[2]);
}
if (!(scale[0] == 1 && scale[1] == 1 && scale[2] == 1)) {
m *= mat4::scale(scale[0],scale[1],scale[2]);
if (rotation!=NULL) {
if (!(rotation[0] == 0 && rotation[1] == 0 && rotation[2] == 0)) {
m *= mat4::rotate(rotation[0],rotation[1],rotation[2]);
}
}
if (scale!=NULL) {
if (!(scale[0] == 1 && scale[1] == 1 && scale[2] == 1)) {
m *= mat4::scale(scale[0],scale[1],scale[2]);
}
}
return m;
};
static vec4 vec4_multiply(vec4 m1, mat4 m2) {
vec4 mOut;
@ -323,8 +312,8 @@ namespace CubicVR {
return mat4::translate(-eyex,-eyey,-eyez) * mat4( side[0], up[0], -forward[0], 0, side[1], up[1], -forward[1], 0, side[2], up[2], -forward[2], 0, 0, 0, 0, 1);
};
static vec3 unProject(mat4 pMatrix, mat4 mvMatrix, float width, float height, float winx, float winy, float /* winz */) {
vec4 p(((winx / width) * 2.0f) - 1.0f, -(((winy / height) * 2.0f) - 1.0f), 1.0f, 1.0f);
static vec3 unProject(mat4 pMatrix, mat4 mvMatrix, float width, float height, float winx, float winy, float winz) {
vec4 p(((winx / width) * 2.0) - 1.0, -(((winy / height) * 2.0) - 1.0), 1.0, 1.0);
vec4 invp = mat4::vec4_multiply(mat4::vec4_multiply(p, mat4::inverse(pMatrix)), mat4::inverse(mvMatrix));

View File

@ -73,7 +73,7 @@ namespace CubicVR {
void pushMatrix(mat4 m) {
c_stack++;
m_stack[c_stack] = m;
m_stack[c_stack] = (m ? m : getIdentity());
}
void popMatrix() {
@ -88,10 +88,14 @@ namespace CubicVR {
m_cache.clear();
c_stack = 0;
valid = 0;
delete result;
result = mat4::identity();
m_stack[0] = init_mat;
if (init_mat != NULL) {
m_stack[0] = init_mat;
} else {
setIdentity();
}
}
void translate(__float x, __float y, __float z) {

View File

@ -12,7 +12,6 @@
#include <iostream>
#include <cmath>
#include "cubic_types.h"
#include <stddef.h>
namespace CubicVR {
#define vec2SG(c,x,y) \
@ -21,27 +20,20 @@ namespace CubicVR {
struct vec2 {
__float x, y;
public:
__float& u() { return x; }
__float& v() { return y; }
//access as-array:
inline __float& operator [] (size_t i) {
__float* as_array = (__float*)this;
return (as_array[i]);
}
inline const __float& operator [] (size_t i) const {
__float* as_array = (__float*)this;
return (as_array[i]);
}
// __float operator [] (unsigned i) const { return ((__float *)this)[i]; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
vec2 (__float xi,__float yi) { x = xi; y = yi; }
vec2 () { x = y = 0.0f; }
operator __float*() const { return (__float *)this; }
vec2 operator*(__float v) { return vec2( x*v, y*v ); }
// vec2 operator*(vec2 v) { return vec2::cross(*this,v); }
vec2 operator+(vec2 v) { return vec2::add(*this,v); }
vec2 operator-(vec2 v) { return vec2::subtract(*this,v); }

View File

@ -12,7 +12,6 @@
#include <iostream>
#include "cubic_types.h"
#include <cmath>
#include <stddef.h>
namespace CubicVR {
@ -24,24 +23,19 @@ namespace CubicVR {
struct vec3 {
__float x,y,z;
operator __float*() const { return (__float *)this; }
__float& r() { return x; }
__float& g() { return y; }
__float& b() { return z; }
//access as-array:
inline __float& operator [] (size_t i) {
__float* as_array = (__float*)this;
return (as_array[i]);
}
inline const __float& operator [] (size_t i) const {
__float* as_array = (__float*)this;
return (as_array[i]);
}
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
vec3 (__float xi,__float yi,__float zi) { x = xi; y = yi; z = zi; }
vec3 () { x = y = z = 0.0f; }
vec3 operator*(__float v) { return vec3(x*v, y*v, z*v); }
vec3 operator*(vec3 v) { return vec3::cross(*this,v); }
vec3 operator+(vec3 v) { return vec3::add(*this,v); }

View File

@ -12,7 +12,6 @@
#include <iostream>
#include "cubic_types.h"
#include <cmath>
#include <stddef.h>
namespace CubicVR {
@ -21,29 +20,23 @@ namespace CubicVR {
c & COMBINE(set,x)(vec3 value) { y = value; return *this; }
struct vec4 {
__float x, y, z, w;
__float x,y,z,w;
public:
__float& r() { return x; }
__float& g() { return y; }
__float& b() { return z; }
__float& a() { return w; }
//access as-array:
inline __float& operator [] (size_t i) {
__float* as_array = (__float*)this;
return (as_array[i]);
}
inline const __float& operator [] (size_t i) const {
__float* as_array = (__float*)this;
return (as_array[i]);
}
// __float operator [] (unsigned i) const { return ((__float *)this)[i]; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
vec4 (__float xi,__float yi,__float zi,__float wi) { x = xi; y = yi; z = zi; w = wi; }
vec4 () { x = y = z = w = 0.0f; }
operator __float*() const { return (__float *)this; }
vec4 operator*(__float v) { return vec4(x*v, y*v, z*v, w*v); }
// vec4 operator*(vec4 v) { return vec4::cross(*this,v); }
// vec4 operator+(vec4 v) { return vec4::add(*this,v); }

BIN
external/fftw-3.3.4/32/libfftw3f-3.dll vendored Normal file

Binary file not shown.

BIN
external/fftw-3.3.4/32/libfftw3f-3.exp vendored Normal file

Binary file not shown.

BIN
external/fftw-3.3.4/32/libfftw3f-3.lib vendored Normal file

Binary file not shown.

BIN
external/fftw-3.3.4/64/libfftw3f-3.a vendored Normal file

Binary file not shown.

1013
external/fftw-3.3.4/64/libfftw3f-3.def vendored Normal file

File diff suppressed because it is too large Load Diff

BIN
external/fftw-3.3.4/64/libfftw3f-3.dll vendored Normal file

Binary file not shown.

BIN
external/fftw-3.3.4/64/libfftw3f-3.exp vendored Normal file

Binary file not shown.

414
external/fftw-3.3.4/fftw3.h vendored Normal file
View File

@ -0,0 +1,414 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* The following statement of license applies *only* to this header file,
* and *not* to the other files distributed with FFTW or derived therefrom:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/***************************** NOTE TO USERS *********************************
*
* THIS IS A HEADER FILE, NOT A MANUAL
*
* If you want to know how to use FFTW, please read the manual,
* online at http://www.fftw.org/doc/ and also included with FFTW.
* For a quick start, see the manual's tutorial section.
*
* (Reading header files to learn how to use a library is a habit
* stemming from code lacking a proper manual. Arguably, it's a
* *bad* habit in most cases, because header files can contain
* interfaces that are not part of the public, stable API.)
*
****************************************************************************/
#ifndef FFTW3_H
#define FFTW3_H
#include <stdio.h>
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
/* If <complex.h> is included, use the C99 complex type. Otherwise
define a type bit-compatible with C99 complex */
#if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
# define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C
#else
# define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2]
#endif
#define FFTW_CONCAT(prefix, name) prefix ## name
#define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name)
#define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name)
#define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name)
#define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name)
/* IMPORTANT: for Windows compilers, you should add a line
*/
#define FFTW_DLL
/*
here and in kernel/ifftw.h if you are compiling/using FFTW as a
DLL, in order to do the proper importing/exporting, or
alternatively compile with -DFFTW_DLL or the equivalent
command-line flag. This is not necessary under MinGW/Cygwin, where
libtool does the imports/exports automatically. */
#if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__))
/* annoying Windows syntax for shared-library declarations */
# if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */
# define FFTW_EXTERN extern __declspec(dllexport)
# else /* user is calling FFTW; import symbol */
# define FFTW_EXTERN extern __declspec(dllimport)
# endif
#else
# define FFTW_EXTERN extern
#endif
enum fftw_r2r_kind_do_not_use_me {
FFTW_R2HC=0, FFTW_HC2R=1, FFTW_DHT=2,
FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6,
FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10
};
struct fftw_iodim_do_not_use_me {
int n; /* dimension size */
int is; /* input stride */
int os; /* output stride */
};
#include <stddef.h> /* for ptrdiff_t */
struct fftw_iodim64_do_not_use_me {
ptrdiff_t n; /* dimension size */
ptrdiff_t is; /* input stride */
ptrdiff_t os; /* output stride */
};
typedef void (*fftw_write_char_func_do_not_use_me)(char c, void *);
typedef int (*fftw_read_char_func_do_not_use_me)(void *);
/*
huge second-order macro that defines prototypes for all API
functions. We expand this macro for each supported precision
X: name-mangling macro
R: real data type
C: complex data type
*/
#define FFTW_DEFINE_API(X, R, C) \
\
FFTW_DEFINE_COMPLEX(R, C); \
\
typedef struct X(plan_s) *X(plan); \
\
typedef struct fftw_iodim_do_not_use_me X(iodim); \
typedef struct fftw_iodim64_do_not_use_me X(iodim64); \
\
typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \
\
typedef fftw_write_char_func_do_not_use_me X(write_char_func); \
typedef fftw_read_char_func_do_not_use_me X(read_char_func); \
\
FFTW_EXTERN void X(execute)(const X(plan) p); \
\
FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \
C *in, C *out, int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \
C *in, C *out, int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
int sign, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, C *out, \
int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_split_dft)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *ro, R *io, \
unsigned flags); \
\
FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \
FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \
R *ro, R *io); \
\
FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
C *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \
R *in, C *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1, \
R *in, C *out, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1, \
int n2, \
R *in, C *out, unsigned flags); \
\
\
FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \
int howmany, \
C *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1, \
C *in, R *out, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1, \
int n2, \
C *in, R *out, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_split_dft_r2c)( \
int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \
int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, C *out, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank, \
const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
C *in, R *out, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_r2c)( \
int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *ro, R *io, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_guru64_split_dft_c2r)( \
int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *ri, R *ii, R *out, \
unsigned flags); \
\
FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \
FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \
\
FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \
R *in, R *ro, R *io); \
FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \
R *ri, R *ii, R *out); \
\
FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \
int howmany, \
R *in, const int *inembed, \
int istride, int idist, \
R *out, const int *onembed, \
int ostride, int odist, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \
X(r2r_kind) kind, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \
X(r2r_kind) kind0, X(r2r_kind) kind1, \
unsigned flags); \
FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2, \
R *in, R *out, X(r2r_kind) kind0, \
X(r2r_kind) kind1, X(r2r_kind) kind2, \
unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \
int howmany_rank, \
const X(iodim) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN X(plan) X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, \
int howmany_rank, \
const X(iodim64) *howmany_dims, \
R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \
\
FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \
\
FFTW_EXTERN void X(destroy_plan)(X(plan) p); \
FFTW_EXTERN void X(forget_wisdom)(void); \
FFTW_EXTERN void X(cleanup)(void); \
\
FFTW_EXTERN void X(set_timelimit)(double t); \
\
FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \
FFTW_EXTERN int X(init_threads)(void); \
FFTW_EXTERN void X(cleanup_threads)(void); \
\
FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename); \
FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \
FFTW_EXTERN char *X(export_wisdom_to_string)(void); \
FFTW_EXTERN void X(export_wisdom)(X(write_char_func) write_char, \
void *data); \
FFTW_EXTERN int X(import_system_wisdom)(void); \
FFTW_EXTERN int X(import_wisdom_from_filename)(const char *filename); \
FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \
FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \
FFTW_EXTERN int X(import_wisdom)(X(read_char_func) read_char, void *data); \
\
FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \
FFTW_EXTERN void X(print_plan)(const X(plan) p); \
FFTW_EXTERN char *X(sprint_plan)(const X(plan) p); \
\
FFTW_EXTERN void *X(malloc)(size_t n); \
FFTW_EXTERN R *X(alloc_real)(size_t n); \
FFTW_EXTERN C *X(alloc_complex)(size_t n); \
FFTW_EXTERN void X(free)(void *p); \
\
FFTW_EXTERN void X(flops)(const X(plan) p, \
double *add, double *mul, double *fmas); \
FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \
FFTW_EXTERN double X(cost)(const X(plan) p); \
\
FFTW_EXTERN int X(alignment_of)(R *p); \
FFTW_EXTERN const char X(version)[]; \
FFTW_EXTERN const char X(cc)[]; \
FFTW_EXTERN const char X(codelet_optim)[];
/* end of FFTW_DEFINE_API macro */
FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex)
FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
/* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64
for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \
&& !(defined(__ICC) || defined(__INTEL_COMPILER)) \
&& (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
# if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
/* note: __float128 is a typedef, which is not supported with the _Complex
keyword in gcc, so instead we use this ugly __attribute__ version.
However, we can't simply pass the __attribute__ version to
FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer
types. Hence redefining FFTW_DEFINE_COMPLEX. Ugh. */
# undef FFTW_DEFINE_COMPLEX
# define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C
# endif
FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex)
#endif
#define FFTW_FORWARD (-1)
#define FFTW_BACKWARD (+1)
#define FFTW_NO_TIMELIMIT (-1.0)
/* documented flags */
#define FFTW_MEASURE (0U)
#define FFTW_DESTROY_INPUT (1U << 0)
#define FFTW_UNALIGNED (1U << 1)
#define FFTW_CONSERVE_MEMORY (1U << 2)
#define FFTW_EXHAUSTIVE (1U << 3) /* NO_EXHAUSTIVE is default */
#define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */
#define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */
#define FFTW_ESTIMATE (1U << 6)
#define FFTW_WISDOM_ONLY (1U << 21)
/* undocumented beyond-guru flags */
#define FFTW_ESTIMATE_PATIENT (1U << 7)
#define FFTW_BELIEVE_PCOST (1U << 8)
#define FFTW_NO_DFT_R2HC (1U << 9)
#define FFTW_NO_NONTHREADED (1U << 10)
#define FFTW_NO_BUFFERING (1U << 11)
#define FFTW_NO_INDIRECT_OP (1U << 12)
#define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */
#define FFTW_NO_RANK_SPLITS (1U << 14)
#define FFTW_NO_VRANK_SPLITS (1U << 15)
#define FFTW_NO_VRECURSE (1U << 16)
#define FFTW_NO_SIMD (1U << 17)
#define FFTW_NO_SLOW (1U << 18)
#define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19)
#define FFTW_ALLOW_PRUNING (1U << 20)
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* FFTW3_H */

View File

@ -1,408 +0,0 @@
EXPORTS
CRC32_function @1
amp_check_backend @2
amp_cleanup @3
amp_close @4
amp_confparam_lookup @5
amp_ext_lookup @6
amp_get_caps @7
amp_get_conf @8
amp_get_ext_level @9
amp_get_freq @10
amp_get_info @11
amp_get_level @12
amp_get_powerstat @13
amp_has_get_level @14
amp_init @15
amp_list_foreach @16
amp_load_all_backends @17
amp_load_backend @18
amp_open @19
amp_parse_level @20
amp_probe_all @21
amp_register @22
amp_reset @23
amp_set_conf @24
amp_set_freq @25
amp_set_powerstat @26
amp_sprintf_level @27
amp_strlevel @28
amp_token_lookup @29
amp_unregister @30
azimuth_long_path @31
cookie_use @32 DATA
debugmsgsave @33 DATA
debugmsgsave2 @34 DATA
debugmsgsave3 @35 DATA
dec2dmmm @36
dec2dms @37
distance_long_path @38
dmmm2dec @39
dms2dec @40
dot10ths_to_millis @41
dump_hex @42
elapsed_ms @43
from_bcd @44
from_bcd_be @45
get_rig_conf_type @46
hamlib_copyright @47 DATA
hamlib_copyright2 @48 DATA
hamlib_version @49 DATA
hamlib_version2 @50 DATA
hl_usleep @51
initamps4_dummy @52
initamps4_kpa1500 @53
initrigs4_adat @54
initrigs4_alinco @55
initrigs4_aor @56
initrigs4_barrett @57
initrigs4_dorji @58
initrigs4_drake @59
initrigs4_dummy @60
initrigs4_elad @61
initrigs4_flexradio @62
initrigs4_icm710 @63
initrigs4_icmarine @64
initrigs4_icom @65
initrigs4_jrc @66
initrigs4_kachina @67
initrigs4_kenwood @68
initrigs4_kit @69
initrigs4_lowe @70
initrigs4_pcr @71
initrigs4_prm80 @72
initrigs4_racal @73
initrigs4_rft @74
initrigs4_rs @75
initrigs4_skanti @76
initrigs4_tapr @77
initrigs4_tentec @78
initrigs4_tuner @79
initrigs4_uniden @80
initrigs4_winradio @81
initrigs4_wj @82
initrigs4_yaesu @83
initrots4_amsat @84
initrots4_ars @85
initrots4_celestron @86
initrots4_cnctrk @87
initrots4_dummy @88
initrots4_easycomm @89
initrots4_ether6 @90
initrots4_fodtrack @91
initrots4_gs232a @92
initrots4_heathkit @93
initrots4_ioptron @94
initrots4_kit @95
initrots4_m2 @96
initrots4_meade @97
initrots4_prosistel @98
initrots4_radant @99
initrots4_rotorez @100
initrots4_sartek @101
initrots4_satel @102
initrots4_spid @103
initrots4_ts7400 @104
locator2longlat @105
longlat2locator @106
millis_to_dot10ths @107
morse_code_dot_to_millis @108
netrigctl_get_vfo_mode @109
network_multicast_server @110
par_lock @111
par_read_control @112
par_read_data @113
par_read_status @114
par_unlock @115
par_write_control @116
par_write_data @117
parse_hoststr @118
port_close @119
port_open @120
print_ext_param @121
probeallrigs4_adat @122
probeallrigs4_drake @123
probeallrigs4_elad @124
probeallrigs4_icom @125
probeallrigs4_kenwood @126
probeallrigs4_lowe @127
probeallrigs4_uniden @128
probeallrigs4_yaesu @129
qrb @130
read_block @131
read_string @132
rig_check_backend @133
rig_check_cache_timeout @134
rig_cleanup @135
rig_close @136
rig_confparam_lookup @137
rig_cookie @138
rig_copyright @139
rig_debug @140
rig_ext_func_foreach @141
rig_ext_level_foreach @142
rig_ext_lookup @143
rig_ext_lookup_tok @144
rig_ext_parm_foreach @145
rig_ext_token_lookup @146
rig_flush @147
rig_force_cache_timeout @148
rig_get_ant @149
rig_get_cache @150
rig_get_cache_timeout_ms @151
rig_get_caps @152
rig_get_caps_cptr @153
rig_get_caps_int @154
rig_get_chan_all @155
rig_get_chan_all_cb @156
rig_get_channel @157
rig_get_clock @158
rig_get_conf @159
rig_get_ctcss_sql @160
rig_get_ctcss_tone @161
rig_get_dcd @162
rig_get_dcs_code @163
rig_get_dcs_sql @164
rig_get_ext_func @165
rig_get_ext_level @166
rig_get_ext_parm @167
rig_get_freq @168
rig_get_func @169
rig_get_function_ptr @170
rig_get_info @171
rig_get_level @172
rig_get_mem @173
rig_get_mem_all @174
rig_get_mem_all_cb @175
rig_get_mode @176
rig_get_parm @177
rig_get_powerstat @178
rig_get_ptt @179
rig_get_range @180
rig_get_resolution @181
rig_get_rig_info @182
rig_get_rit @183
rig_get_rptr_offs @184
rig_get_rptr_shift @185
rig_get_split_freq @186
rig_get_split_freq_mode @187
rig_get_split_mode @188
rig_get_split_vfo @189
rig_get_trn @190
rig_get_ts @191
rig_get_twiddle @192
rig_get_vfo @193
rig_get_vfo_info @194
rig_get_vfo_list @195
rig_get_xit @196
rig_has_get_func @197
rig_has_get_level @198
rig_has_get_parm @199
rig_has_scan @200
rig_has_set_func @201
rig_has_set_level @202
rig_has_set_parm @203
rig_has_vfo_op @204
rig_idx2setting @205
rig_init @206
rig_license @207
rig_list_foreach @208
rig_list_foreach_model @209
rig_load_all_backends @210
rig_load_backend @211
rig_lookup_mem_caps @212
rig_mW2power @213
rig_mem_count @214
rig_need_debug @215
rig_no_restore_ai @216
rig_open @217
rig_parse_func @218
rig_parse_level @219
rig_parse_mode @220
rig_parse_mtype @221
rig_parse_parm @222
rig_parse_rptr_shift @223
rig_parse_scan @224
rig_parse_vfo @225
rig_parse_vfo_op @226
rig_passband_narrow @227
rig_passband_normal @228
rig_passband_wide @229
rig_power2mW @230
rig_probe @231
rig_probe_all @232
rig_raw2val @233
rig_raw2val_float @234
rig_recv_dtmf @235
rig_register @236
rig_reset @237
rig_scan @238
rig_send_dtmf @239
rig_send_morse @240
rig_send_voice_mem @241
rig_set_ant @242
rig_set_bank @243
rig_set_cache_timeout_ms @244
rig_set_chan_all @245
rig_set_chan_all_cb @246
rig_set_channel @247
rig_set_clock @248
rig_set_conf @249
rig_set_ctcss_sql @250
rig_set_ctcss_tone @251
rig_set_dcd_callback @252
rig_set_dcs_code @253
rig_set_dcs_sql @254
rig_set_debug @255
rig_set_debug_callback @256
rig_set_debug_file @257
rig_set_debug_time_stamp @258
rig_set_ext_func @259
rig_set_ext_level @260
rig_set_ext_parm @261
rig_set_freq @262
rig_set_freq_callback @263
rig_set_func @264
rig_set_level @265
rig_set_mem @266
rig_set_mem_all @267
rig_set_mem_all_cb @268
rig_set_mode @269
rig_set_mode_callback @270
rig_set_parm @271
rig_set_pltune_callback @272
rig_set_powerstat @273
rig_set_ptt @274
rig_set_ptt_callback @275
rig_set_rit @276
rig_set_rptr_offs @277
rig_set_rptr_shift @278
rig_set_spectrum_callback @279
rig_set_split_freq @280
rig_set_split_freq_mode @281
rig_set_split_mode @282
rig_set_split_vfo @283
rig_set_trn @284
rig_set_ts @285
rig_set_twiddle @286
rig_set_uplink @287
rig_set_vfo @288
rig_set_vfo_callback @289
rig_set_vfo_opt @290
rig_set_xit @291
rig_setting2idx @292
rig_sprintf_ant @293
rig_sprintf_func @294
rig_sprintf_level @295
rig_sprintf_level_gran @296
rig_sprintf_mode @297
rig_sprintf_parm @298
rig_sprintf_parm_gran @299
rig_sprintf_scan @300
rig_sprintf_spectrum_avg_modes @301
rig_sprintf_spectrum_modes @302
rig_sprintf_spectrum_spans @303
rig_sprintf_vfo @304
rig_sprintf_vfop @305
rig_stop_morse @306
rig_stragclevel @307
rig_strfunc @308
rig_strlevel @309
rig_strmtype @310
rig_strparm @311
rig_strptrshift @312
rig_strrmode @313
rig_strrmodes @314
rig_strscan @315
rig_strspectrummode @316
rig_strstatus @317
rig_strvfo @318
rig_strvfop @319
rig_token_foreach @320
rig_token_lookup @321
rig_unregister @322
rig_version @323
rig_vfo_op @324
rig_wait_morse @325
rigerror @326
rot_check_backend @327
rot_cleanup @328
rot_close @329
rot_confparam_lookup @330
rot_ext_func_foreach @331
rot_ext_level_foreach @332
rot_ext_lookup @333
rot_ext_lookup_tok @334
rot_ext_parm_foreach @335
rot_ext_token_lookup @336
rot_get_caps @337
rot_get_conf @338
rot_get_ext_func @339
rot_get_ext_level @340
rot_get_ext_parm @341
rot_get_func @342
rot_get_info @343
rot_get_level @344
rot_get_parm @345
rot_get_position @346
rot_get_status @347
rot_has_get_func @348
rot_has_get_level @349
rot_has_get_parm @350
rot_has_set_func @351
rot_has_set_level @352
rot_has_set_parm @353
rot_init @354
rot_list_foreach @355
rot_load_all_backends @356
rot_load_backend @357
rot_move @358
rot_open @359
rot_park @360
rot_parse_func @361
rot_parse_level @362
rot_parse_parm @363
rot_probe_all @364
rot_register @365
rot_reset @366
rot_set_conf @367
rot_set_ext_func @368
rot_set_ext_level @369
rot_set_ext_parm @370
rot_set_func @371
rot_set_level @372
rot_set_parm @373
rot_set_position @374
rot_sprintf_func @375
rot_sprintf_level @376
rot_sprintf_level_gran @377
rot_sprintf_parm @378
rot_sprintf_parm_gran @379
rot_sprintf_status @380
rot_stop @381
rot_strfunc @382
rot_strlevel @383
rot_strparm @384
rot_strstatus @385
rot_token_foreach @386
rot_token_lookup @387
rot_unregister @388
ser_get_car @389
ser_get_cts @390
ser_get_dsr @391
ser_get_dtr @392
ser_get_rts @393
ser_set_brk @394
ser_set_dtr @395
ser_set_rts @396
serial_flush @397
serial_open @398
serial_setup @399
sprintf_freq @400
sprintf_level_ext @401
sync_callback @402
to_bcd @403
to_bcd_be @404
vfo_fixup @405
vfo_fixup2a @406
write_block @407

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,408 +0,0 @@
EXPORTS
CRC32_function @1
amp_check_backend @2
amp_cleanup @3
amp_close @4
amp_confparam_lookup @5
amp_ext_lookup @6
amp_get_caps @7
amp_get_conf @8
amp_get_ext_level @9
amp_get_freq @10
amp_get_info @11
amp_get_level @12
amp_get_powerstat @13
amp_has_get_level @14
amp_init @15
amp_list_foreach @16
amp_load_all_backends @17
amp_load_backend @18
amp_open @19
amp_parse_level @20
amp_probe_all @21
amp_register @22
amp_reset @23
amp_set_conf @24
amp_set_freq @25
amp_set_powerstat @26
amp_sprintf_level @27
amp_strlevel @28
amp_token_lookup @29
amp_unregister @30
azimuth_long_path @31
cookie_use @32 DATA
debugmsgsave @33 DATA
debugmsgsave2 @34 DATA
debugmsgsave3 @35 DATA
dec2dmmm @36
dec2dms @37
distance_long_path @38
dmmm2dec @39
dms2dec @40
dot10ths_to_millis @41
dump_hex @42
elapsed_ms @43
from_bcd @44
from_bcd_be @45
get_rig_conf_type @46
hamlib_copyright @47 DATA
hamlib_copyright2 @48 DATA
hamlib_version @49 DATA
hamlib_version2 @50 DATA
hl_usleep @51
initamps4_dummy @52
initamps4_kpa1500 @53
initrigs4_adat @54
initrigs4_alinco @55
initrigs4_aor @56
initrigs4_barrett @57
initrigs4_dorji @58
initrigs4_drake @59
initrigs4_dummy @60
initrigs4_elad @61
initrigs4_flexradio @62
initrigs4_icm710 @63
initrigs4_icmarine @64
initrigs4_icom @65
initrigs4_jrc @66
initrigs4_kachina @67
initrigs4_kenwood @68
initrigs4_kit @69
initrigs4_lowe @70
initrigs4_pcr @71
initrigs4_prm80 @72
initrigs4_racal @73
initrigs4_rft @74
initrigs4_rs @75
initrigs4_skanti @76
initrigs4_tapr @77
initrigs4_tentec @78
initrigs4_tuner @79
initrigs4_uniden @80
initrigs4_winradio @81
initrigs4_wj @82
initrigs4_yaesu @83
initrots4_amsat @84
initrots4_ars @85
initrots4_celestron @86
initrots4_cnctrk @87
initrots4_dummy @88
initrots4_easycomm @89
initrots4_ether6 @90
initrots4_fodtrack @91
initrots4_gs232a @92
initrots4_heathkit @93
initrots4_ioptron @94
initrots4_kit @95
initrots4_m2 @96
initrots4_meade @97
initrots4_prosistel @98
initrots4_radant @99
initrots4_rotorez @100
initrots4_sartek @101
initrots4_satel @102
initrots4_spid @103
initrots4_ts7400 @104
locator2longlat @105
longlat2locator @106
millis_to_dot10ths @107
morse_code_dot_to_millis @108
netrigctl_get_vfo_mode @109
network_multicast_server @110
par_lock @111
par_read_control @112
par_read_data @113
par_read_status @114
par_unlock @115
par_write_control @116
par_write_data @117
parse_hoststr @118
port_close @119
port_open @120
print_ext_param @121
probeallrigs4_adat @122
probeallrigs4_drake @123
probeallrigs4_elad @124
probeallrigs4_icom @125
probeallrigs4_kenwood @126
probeallrigs4_lowe @127
probeallrigs4_uniden @128
probeallrigs4_yaesu @129
qrb @130
read_block @131
read_string @132
rig_check_backend @133
rig_check_cache_timeout @134
rig_cleanup @135
rig_close @136
rig_confparam_lookup @137
rig_cookie @138
rig_copyright @139
rig_debug @140
rig_ext_func_foreach @141
rig_ext_level_foreach @142
rig_ext_lookup @143
rig_ext_lookup_tok @144
rig_ext_parm_foreach @145
rig_ext_token_lookup @146
rig_flush @147
rig_force_cache_timeout @148
rig_get_ant @149
rig_get_cache @150
rig_get_cache_timeout_ms @151
rig_get_caps @152
rig_get_caps_cptr @153
rig_get_caps_int @154
rig_get_chan_all @155
rig_get_chan_all_cb @156
rig_get_channel @157
rig_get_clock @158
rig_get_conf @159
rig_get_ctcss_sql @160
rig_get_ctcss_tone @161
rig_get_dcd @162
rig_get_dcs_code @163
rig_get_dcs_sql @164
rig_get_ext_func @165
rig_get_ext_level @166
rig_get_ext_parm @167
rig_get_freq @168
rig_get_func @169
rig_get_function_ptr @170
rig_get_info @171
rig_get_level @172
rig_get_mem @173
rig_get_mem_all @174
rig_get_mem_all_cb @175
rig_get_mode @176
rig_get_parm @177
rig_get_powerstat @178
rig_get_ptt @179
rig_get_range @180
rig_get_resolution @181
rig_get_rig_info @182
rig_get_rit @183
rig_get_rptr_offs @184
rig_get_rptr_shift @185
rig_get_split_freq @186
rig_get_split_freq_mode @187
rig_get_split_mode @188
rig_get_split_vfo @189
rig_get_trn @190
rig_get_ts @191
rig_get_twiddle @192
rig_get_vfo @193
rig_get_vfo_info @194
rig_get_vfo_list @195
rig_get_xit @196
rig_has_get_func @197
rig_has_get_level @198
rig_has_get_parm @199
rig_has_scan @200
rig_has_set_func @201
rig_has_set_level @202
rig_has_set_parm @203
rig_has_vfo_op @204
rig_idx2setting @205
rig_init @206
rig_license @207
rig_list_foreach @208
rig_list_foreach_model @209
rig_load_all_backends @210
rig_load_backend @211
rig_lookup_mem_caps @212
rig_mW2power @213
rig_mem_count @214
rig_need_debug @215
rig_no_restore_ai @216
rig_open @217
rig_parse_func @218
rig_parse_level @219
rig_parse_mode @220
rig_parse_mtype @221
rig_parse_parm @222
rig_parse_rptr_shift @223
rig_parse_scan @224
rig_parse_vfo @225
rig_parse_vfo_op @226
rig_passband_narrow @227
rig_passband_normal @228
rig_passband_wide @229
rig_power2mW @230
rig_probe @231
rig_probe_all @232
rig_raw2val @233
rig_raw2val_float @234
rig_recv_dtmf @235
rig_register @236
rig_reset @237
rig_scan @238
rig_send_dtmf @239
rig_send_morse @240
rig_send_voice_mem @241
rig_set_ant @242
rig_set_bank @243
rig_set_cache_timeout_ms @244
rig_set_chan_all @245
rig_set_chan_all_cb @246
rig_set_channel @247
rig_set_clock @248
rig_set_conf @249
rig_set_ctcss_sql @250
rig_set_ctcss_tone @251
rig_set_dcd_callback @252
rig_set_dcs_code @253
rig_set_dcs_sql @254
rig_set_debug @255
rig_set_debug_callback @256
rig_set_debug_file @257
rig_set_debug_time_stamp @258
rig_set_ext_func @259
rig_set_ext_level @260
rig_set_ext_parm @261
rig_set_freq @262
rig_set_freq_callback @263
rig_set_func @264
rig_set_level @265
rig_set_mem @266
rig_set_mem_all @267
rig_set_mem_all_cb @268
rig_set_mode @269
rig_set_mode_callback @270
rig_set_parm @271
rig_set_pltune_callback @272
rig_set_powerstat @273
rig_set_ptt @274
rig_set_ptt_callback @275
rig_set_rit @276
rig_set_rptr_offs @277
rig_set_rptr_shift @278
rig_set_spectrum_callback @279
rig_set_split_freq @280
rig_set_split_freq_mode @281
rig_set_split_mode @282
rig_set_split_vfo @283
rig_set_trn @284
rig_set_ts @285
rig_set_twiddle @286
rig_set_uplink @287
rig_set_vfo @288
rig_set_vfo_callback @289
rig_set_vfo_opt @290
rig_set_xit @291
rig_setting2idx @292
rig_sprintf_ant @293
rig_sprintf_func @294
rig_sprintf_level @295
rig_sprintf_level_gran @296
rig_sprintf_mode @297
rig_sprintf_parm @298
rig_sprintf_parm_gran @299
rig_sprintf_scan @300
rig_sprintf_spectrum_avg_modes @301
rig_sprintf_spectrum_modes @302
rig_sprintf_spectrum_spans @303
rig_sprintf_vfo @304
rig_sprintf_vfop @305
rig_stop_morse @306
rig_stragclevel @307
rig_strfunc @308
rig_strlevel @309
rig_strmtype @310
rig_strparm @311
rig_strptrshift @312
rig_strrmode @313
rig_strrmodes @314
rig_strscan @315
rig_strspectrummode @316
rig_strstatus @317
rig_strvfo @318
rig_strvfop @319
rig_token_foreach @320
rig_token_lookup @321
rig_unregister @322
rig_version @323
rig_vfo_op @324
rig_wait_morse @325
rigerror @326
rot_check_backend @327
rot_cleanup @328
rot_close @329
rot_confparam_lookup @330
rot_ext_func_foreach @331
rot_ext_level_foreach @332
rot_ext_lookup @333
rot_ext_lookup_tok @334
rot_ext_parm_foreach @335
rot_ext_token_lookup @336
rot_get_caps @337
rot_get_conf @338
rot_get_ext_func @339
rot_get_ext_level @340
rot_get_ext_parm @341
rot_get_func @342
rot_get_info @343
rot_get_level @344
rot_get_parm @345
rot_get_position @346
rot_get_status @347
rot_has_get_func @348
rot_has_get_level @349
rot_has_get_parm @350
rot_has_set_func @351
rot_has_set_level @352
rot_has_set_parm @353
rot_init @354
rot_list_foreach @355
rot_load_all_backends @356
rot_load_backend @357
rot_move @358
rot_open @359
rot_park @360
rot_parse_func @361
rot_parse_level @362
rot_parse_parm @363
rot_probe_all @364
rot_register @365
rot_reset @366
rot_set_conf @367
rot_set_ext_func @368
rot_set_ext_level @369
rot_set_ext_parm @370
rot_set_func @371
rot_set_level @372
rot_set_parm @373
rot_set_position @374
rot_sprintf_func @375
rot_sprintf_level @376
rot_sprintf_level_gran @377
rot_sprintf_parm @378
rot_sprintf_parm_gran @379
rot_sprintf_status @380
rot_stop @381
rot_strfunc @382
rot_strlevel @383
rot_strparm @384
rot_strstatus @385
rot_token_foreach @386
rot_token_lookup @387
rot_unregister @388
ser_get_car @389
ser_get_cts @390
ser_get_dsr @391
ser_get_dtr @392
ser_get_rts @393
ser_set_brk @394
ser_set_dtr @395
ser_set_rts @396
serial_flush @397
serial_open @398
serial_setup @399
sprintf_freq @400
sprintf_level_ext @401
sync_callback @402
to_bcd @403
to_bcd_be @404
vfo_fixup @405
vfo_fixup2a @406
write_block @407

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,15 +0,0 @@
The Hamlib specific dependencies on Windows platforms are:
- libwinpthread-1.dll
for both x86 and x64,
and also
- libgcc_s_sjlj-1.dll for x86 targets only.
Those dependencies are installed from external/msvc/[x86|x64] dirs.
In addition, Hamlib also uses libusb but since it is a common
dependency with SoapySDR, it is not included in the external dirs.
For Hamlib v4.x releases, only the export file 'libhamlib-4.def' is provided, so we need to re-generate .lib to work on Visual Studio projects:
- Open the 'Developper Command Prompt for VS 2022'
- For Win32, go to hamlib/32 directory and run 'LIB /DEF:libhamlib-4.def /MACHINE:X86'
- For Win64, go to hamlib/64 directory and run 'LIB /DEF:libhamlib-4.def /MACHINE:X64'

View File

@ -1,446 +0,0 @@
/*
* Hamlib Interface - Amplifier API header
* Copyright (c) 2000-2005 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _AMPLIFIER_H
#define _AMPLIFIER_H 1
#include <hamlib/rig.h>
#include <hamlib/amplist.h>
/**
* \addtogroup amplifier
* @{
*/
/**
* \brief Hamlib amplifier data structures.
*
* \file amplifier.h
*
* This file contains the data structures and declarations for the Hamlib
* amplifier Application Programming Interface (API).
*
* See the amplifier.c file for details on the amplifier API functions.
*/
__BEGIN_DECLS
/* Forward struct references */
struct amp;
struct amp_state;
/**
* \brief Main amplifier handle type definition.
*
* \typedef typedef struct amp AMP
*
* The #AMP handle is returned by amp_init() and is passed as a parameter to
* every amplifier specific API call.
*
* amp_cleanup() must be called when this handle is no longer needed.
*/
typedef struct amp AMP;
/**
* \brief Type definition for
* <a href="https://en.wikipedia.org/wiki/Standing_wave_ratio" >SWR (Standing Wave Ratio)</a>.
*
* \typedef typedef float swr_t
*
* The \a swr_t type is used as a parameter for the amp_get_swr() function.
*
* The unit of \a swr_t is 1.0 to the maximum value reported by the amplifier's
* internal antenna system tuner, i.e.
* <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a>,
* representing the ratio of 1.0:1 to Maximum:1.
*/
typedef float swr_t;
/**
* \brief Type definition for the
* <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a>
* tuning values of
* <a href="https://en.wikipedia.org/wiki/Capacitance" >capacitance</a>
* and
* <a href="https://en.wikipedia.org/wiki/Inductance" >inductance</a>.
*
* \typedef typedef float tune_value_t
*
* The \a tune_value_t type is used as a parameter for amp_get_level().
*
* The unit of \a tune_value_t is
* <a href="https://en.wikipedia.org/wiki/Farad" >picoFarads (pF)</a>
* or
* <a href="https://en.wikipedia.org/wiki/Henry_(unit)" >nanoHenrys (nH)</a>.
*/
typedef int tune_value_t;
/**
* \brief The token in the netampctl protocol for returning an error condition code.
*/
#define NETAMPCTL_RET "RPRT "
//! @cond Doxygen_Suppress
typedef enum
{
AMP_RESET_MEM, // erase tuner memory
AMP_RESET_FAULT, // reset any fault
AMP_RESET_AMP // for kpa1500
} amp_reset_t;
//! @endcond
/**
* \brief Amplifier type flags
*/
typedef enum
{
AMP_FLAG_1 = (1 << 1), /*!< TBD */
AMP_FLAG_2 = (1 << 2) /*!< TBD */
} amp_type_t;
//! @cond Doxygen_Suppress
// TBD AMP_TYPE
#define AMP_TYPE_MASK (AMP_FLAG_1|AMP_FLAG_2)
#define AMP_TYPE_OTHER 0
#define AMP_TYPE_1 AMP_FLAG_1
#define AMP_TYPE_2 AMP_FLAG_2
#define AMP_TYPE_ALL (AMP_FLAG_1|AMP_FLAG_2)
//! @endcond
//! @cond Doxygen_Suppress
enum amp_level_e
{
AMP_LEVEL_NONE = 0, /*!< '' -- No Level. */
AMP_LEVEL_SWR = (1 << 0), /*!< \c SWR 1.0 or greater. */
AMP_LEVEL_NH = (1 << 1), /*!< \c Tune setting in nanohenries. */
AMP_LEVEL_PF = (1 << 2), /*!< \c Tune setting in picofarads. */
AMP_LEVEL_PWR_INPUT = (1 << 3), /*!< \c Power reading from amplifier. */
AMP_LEVEL_PWR_FWD = (1 << 4), /*!< \c Power reading forward. */
AMP_LEVEL_PWR_REFLECTED = (1 << 5), /*!< \c Power reading reverse. */
AMP_LEVEL_PWR_PEAK = (1 << 6), /*!< \c Power reading peak. */
AMP_LEVEL_FAULT = (1 << 7) /*!< \c Fault code. */
};
//! @endcond
//! @cond Doxygen_Suppress
#define AMP_LEVEL_FLOAT_LIST (AMP_LEVEL_SWR)
#define AMP_LEVEL_STRING_LIST (AMP_LEVEL_FAULT)
#define AMP_LEVEL_IS_FLOAT(l) ((l)&AMP_LEVEL_FLOAT_LIST)
#define AMP_LEVEL_IS_STRING(l) ((l)&AMP_LEVEL_STRING_LIST)
//! @endcond
/* Basic amp type, can store some useful info about different amplifiers. Each
* lib must be able to populate this structure, so we can make useful
* enquiries about capabilities.
*/
//! @cond Doxygen_Suppress
#define AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg
//! @endcond
/**
* \brief Amplifier capabilities.
*
* \struct amp_caps
*
* The main idea of this struct is that it will be defined by the backend
* amplifier driver and will remain read-only for the application. Fields
* that need to be modifiable by the application are copied into the
* amp_state structure, which is the private memory area of the #AMP instance.
*
* This way you can have several amplifiers running within the same
* application, sharing the amp_caps structure of the backend, while keeping
* their own customized data.
*
* \b Note: Don't move fields around and only add new fields at the end of the
* amp_caps structure. Shared libraries and DLLs depend on a constant
* structure to maintain compatibility.
*/
struct amp_caps
{
amp_model_t amp_model; /*!< Amplifier model as defined in amplist.h. */
const char *model_name; /*!< Model name, e.g. MM-5k. */
const char *mfg_name; /*!< Manufacturer, e.g. Moonbeam. */
const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */
const char *copyright; /*!< Copyright info (should be LGPL). */
enum rig_status_e status; /*!< Driver status. */
int amp_type; /*!< Amplifier type. */
enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */
int serial_rate_min; /*!< Minimal serial speed. */
int serial_rate_max; /*!< Maximal serial speed. */
int serial_data_bits; /*!< Number of data bits. */
int serial_stop_bits; /*!< Number of stop bits. */
enum serial_parity_e serial_parity; /*!< Parity. */
enum serial_handshake_e serial_handshake; /*!< Handshake. */
int write_delay; /*!< Write delay. */
int post_write_delay; /*!< Post-write delay. */
int timeout; /*!< Timeout. */
int retry; /*!< Number of retries if a command fails. */
const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
const char *amp_model_macro_name; /*!< Model macro name. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
/*
* Amp Admin API
*
*/
int (*amp_init)(AMP *amp); /*!< Pointer to backend implementation of ::amp_init(). */
int (*amp_cleanup)(AMP *amp); /*!< Pointer to backend implementation of ::amp_cleanup(). */
int (*amp_open)(AMP *amp); /*!< Pointer to backend implementation of ::amp_open(). */
int (*amp_close)(AMP *amp); /*!< Pointer to backend implementation of ::amp_close(). */
int (*set_freq)(AMP *amp, freq_t val); /*!< Pointer to backend implementation of ::amp_set_freq(). */
int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of ::amp_get_freq(). */
int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */
int (*get_conf)(AMP *amp, token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
int (*reset)(AMP *amp, amp_reset_t reset); /*!< Pointer to backend implementation of ::amp_reset(). */
int (*get_level)(AMP *amp, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_level(). */
int (*get_ext_level)(AMP *amp, token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */
int (*set_powerstat)(AMP *amp, powerstat_t status); /*!< Pointer to backend implementation of ::amp_set_powerstat(). */
int (*get_powerstat)(AMP *amp, powerstat_t *status); /*!< Pointer to backend implementation of ::amp_get_powerstat(). */
/* get firmware info, etc. */
const char *(*get_info)(AMP *amp); /*!< Pointer to backend implementation of ::amp_get_info(). */
//! @cond Doxygen_Suppress
setting_t levels;
unsigned ext_levels;
//! @endcond
const struct confparams *extlevels; /*!< Extension levels list. \sa extamp.c */
const struct confparams *extparms; /*!< Extension parameters list. \sa extamp.c */
const char *macro_name; /*!< Amplifier model macro name. */
};
/**
* \brief Amplifier state structure.
*
* \struct amp_state
*
* This structure contains live data, as well as a copy of capability fields
* that may be updated, i.e. customized while the #AMP handle is instantiated.
*
* It is fine to move fields around, as this kind of struct should not be
* initialized like amp_caps are.
*/
struct amp_state
{
/*
* overridable fields
*/
/*
* non overridable fields, internal use
*/
hamlib_port_t ampport; /*!< Amplifier port (internal use). */
int comm_state; /*!< Comm port state, opened/closed. */
rig_ptr_t priv; /*!< Pointer to private amplifier state data. */
rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
setting_t has_get_level; /*!< List of get levels. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
};
/**
* \brief Master amplifier structure.
*
* \struct amp
*
* Master amplifier data structure acting as the #AMP handle for the
* controlled amplifier. A pointer to this structure is returned by the
* amp_init() API function and is passed as a parameter to every amplifier
* specific API call.
*
* \sa amp_init(), amp_caps, amp_state
*/
struct amp
{
struct amp_caps *caps; /*!< Amplifier caps. */
struct amp_state state; /*!< Amplifier state. */
};
//! @cond Doxygen_Suppress
/* --------------- API function prototypes -----------------*/
extern HAMLIB_EXPORT(AMP *)
amp_init HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_open HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_close HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_cleanup HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_set_conf HAMLIB_PARAMS((AMP *amp,
token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
amp_get_conf HAMLIB_PARAMS((AMP *amp,
token_t token,
char *val));
extern HAMLIB_EXPORT(int)
amp_set_powerstat HAMLIB_PARAMS((AMP *amp,
powerstat_t status));
extern HAMLIB_EXPORT(int)
amp_get_powerstat HAMLIB_PARAMS((AMP *amp,
powerstat_t *status));
/*
* General API commands, from most primitive to least.. )
* List Set/Get functions pairs
*/
extern HAMLIB_EXPORT(int)
amp_get_freq HAMLIB_PARAMS((AMP *amp,
freq_t *freq));
extern HAMLIB_EXPORT(int)
amp_set_freq HAMLIB_PARAMS((AMP *amp,
freq_t freq));
extern HAMLIB_EXPORT(int)
amp_reset HAMLIB_PARAMS((AMP *amp,
amp_reset_t reset));
extern HAMLIB_EXPORT(const char *)
amp_get_info HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_get_level HAMLIB_PARAMS((AMP *amp, setting_t level, value_t *val));
extern HAMLIB_EXPORT(int)
amp_register HAMLIB_PARAMS((const struct amp_caps *caps));
extern HAMLIB_EXPORT(int)
amp_unregister HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct amp_caps *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
amp_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
amp_check_backend HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(amp_model_t)
amp_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int)
amp_token_foreach HAMLIB_PARAMS((AMP *amp,
int (*cfunc)(const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
amp_confparam_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(token_t)
amp_token_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(const struct amp_caps *)
amp_get_caps HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(setting_t)
amp_has_get_level HAMLIB_PARAMS((AMP *amp,
setting_t level));
extern HAMLIB_EXPORT(const struct confparams *)
amp_ext_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(int)
amp_get_ext_level HAMLIB_PARAMS((AMP *amp,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t);
extern HAMLIB_EXPORT(const struct confparams *)
rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
const char *name));
extern HAMLIB_EXPORT(setting_t) amp_parse_level(const char *s);
extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t);
//! @endcond
/**
* \brief Convenience macro for generating debugging messages.
*
* \def amp_debug
*
* This is an alias of the rig_debug() function call and is used in the same
* manner.
*/
#define amp_debug rig_debug
__END_DECLS
#endif /* _AMPLIFIER_H */
/** @} */

View File

@ -1,120 +0,0 @@
/*
* Hamlib Interface - list of known amplifiers
* Copyright (c) 2000-2011 by Stephane Fillod
* Copyright (c) 2000-2002 by Frank Singleton
* Copyright (C) 2019 by Michael Black W9MDB. Derived from rotlist.h
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _AMPLIST_H
#define _AMPLIST_H 1
//! @cond Doxygen_Suppress
#define AMP_MAKE_MODEL(a,b) ((a)*100+(b))
#define AMP_BACKEND_NUM(a) ((a)/100)
//! @endcond
/**
* \addtogroup amplifier
* @{
*/
/**
* \brief Hamlib amplifier model definitions.
*
* \file amplist.h
*
* This file contains amplifier model definitions for the Hamlib amplifier
* Application Programming Interface (API). Each distinct amplifier type has
* a unique model number (ID) and is used by Hamlib to identify and
* distinguish between the different hardware drivers. The exact model
* numbers can be acquired using the macros in this file. To obtain a list of
* supported amplifier branches, one can use the statically defined
* AMP_BACKEND_LIST macro (defined in configure.ac). To obtain a full list of
* supported amplifiers (including each model in every branch), the
* foreach_opened_amp() API function can be used.
*
* The model number, or ID, is used to tell Hamlib which amplifier the client
* wishes to use which is done with the amp_init() API call.
*/
/**
* \brief A macro that returns the model number for an unknown model.
*
* \def AMP_MODEL_NONE
*
* The none backend, as the name suggests, does nothing. It is mainly for
* internal use.
*/
#define AMP_MODEL_NONE 0
/**
* \brief A macro that returns the model number for the DUMMY backend.
*
* \def AMP_MODEL_DUMMY
*
* The DUMMY backend, as the name suggests, is a backend which performs no
* hardware operations and always behaves as one would expect. It can be
* thought of as a hardware simulator and is very useful for testing client
* applications.
*/
/**
* \brief A macro that returns the model number for the NETAMPCTL backend.
*
* \def AMP_MODEL_NETAMPCTL
*
* The NETAMPCTL backend allows use of the `ampctld` daemon through the normal
* Hamlib API.
*/
//! @cond Doxygen_Suppress
#define AMP_DUMMY 0
#define AMP_BACKEND_DUMMY "dummy"
//! @endcond
#define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1)
#define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2)
/**
* \brief A macro that returns the model number of the KPA1500 backend.
*
* \def AMP_MODEL_ELECRAFT_KPA1500
*
* The KPA1500 backend can be used with amplifiers that support the Elecraft
* KPA-1500 protocol.
*/
//! @cond Doxygen_Suppress
#define AMP_ELECRAFT 2
#define AMP_BACKEND_ELECRAFT "elecraft"
//! @endcond
#define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1)
//#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2)
/**
* \brief Convenience type definition for an amplifier model.
*
* \typedef typedef int amp_model_t
*/
typedef int amp_model_t;
#endif /* _AMPLIST_H */
/** @} */

File diff suppressed because it is too large Load Diff

View File

@ -1,90 +0,0 @@
/*
* Hamlib Win32 DLL build definitions
* Copyright (c) 2001-2009 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/*
* Provide definitions to compile in Windows
* using C-friendly options, e.g.
*
* HAMLIB_API -> __cdecl
* HAMLIB_EXPORT, HAMLIB_EXPORT_VAR -> __declspec(dllexport)
* BACKEND_EXPORT, BACKEND_EXPORT_VAR -> __declspec(dllexport)
*
* No effect in non-Windows environments.
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
# undef HAMLIB_IMPEXP
# undef HAMLIB_CPP_IMPEXP
# undef HAMLIB_API
# undef HAMLIB_EXPORT
# undef HAMLIB_EXPORT_VAR
# undef BACKEND_EXPORT
# undef BACKEND_EXPORT_VAR
# undef HAMLIB_DLL_IMPORT
# undef HAMLIB_DLL_EXPORT
# if defined (__BORLANDC__)
# define HAMLIB_DLL_IMPORT __import
# define HAMLIB_DLL_EXPORT __export
# else
# define HAMLIB_DLL_IMPORT __declspec(dllimport)
# define HAMLIB_DLL_EXPORT __declspec(dllexport)
# endif
# ifdef DLL_EXPORT
/* HAMLIB_API may be set to __stdcall for VB, .. */
# define HAMLIB_API __cdecl
# ifdef IN_HAMLIB
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT
# define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT
# else
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_IMPORT
# define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT
# endif
# else
/* static build, only export the backend entry points for lt_dlsym */
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT
# endif
#endif
/* Take care of non-cygwin platforms */
#if !defined(HAMLIB_IMPEXP)
# define HAMLIB_IMPEXP
#endif
#if !defined(HAMLIB_CPP_IMPEXP)
# define HAMLIB_CPP_IMPEXP
#endif
#if !defined(HAMLIB_API)
# define HAMLIB_API
#endif
#if !defined(HAMLIB_EXPORT)
# define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
#endif
#if !defined(HAMLIB_EXPORT_VAR)
# define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
#endif
#if !defined(BACKEND_EXPORT)
# define BACKEND_EXPORT(type) HAMLIB_CPP_IMPEXP type HAMLIB_API
#endif
#if !defined(BACKEND_EXPORT_VAR)
# define BACKEND_EXPORT_VAR(type) HAMLIB_CPP_IMPEXP type
#endif

View File

@ -1,662 +0,0 @@
/*
* Hamlib Interface - list of known rigs
* Copyright (c) 2000-2003 by Frank Singleton
* Copyright (c) 2000-2015 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _RIGLIST_H
#define _RIGLIST_H 1
//! @cond Doxygen_Suppress
// The rig model number is designed to fit in a 32-bit int
// As of 2020-02-18 we have 33 backends defined
// With a max of 1000 models per backend we get total a model number range of 1001-33001
// This MAX was 100 prior to 2020-02-18 and Icom was close to running out of the 100 range
#define MAX_MODELS_PER_BACKEND 1000
#define RIG_MAKE_MODEL(a,b) ((a)*MAX_MODELS_PER_BACKEND+(b))
#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND)
/*! \file riglist.h
* \brief Hamlib rig(radio) model definitions.
*
* This file contains rig model definitions for the Hamlib rig API. Each
* distinct rig type has a unique model number (ID) and is used by hamlib to
* identify and distinguish between the different hardware drivers. The
* exact model numbers can be acquired using the macros in this file. To
* obtain a list of supported rig branches, one can use the statically
* defined RIG_BACKEND_LIST macro. To obtain a full list of supported rig
* (including each model in every branch), the foreach_opened_rig() API
* function can be used.
*
* The model number, or ID, is used to tell hamlib, which rig the client
* whishes to use. It is done with the rig_init() API call.
*/
#define RIG_MODEL_NONE 0
/*! \def RIG_MODEL_DUMMY
* \brief A macro that returns the model number for the dummy backend.
*
* The dummy backend, as the name suggests, is a backend which performs no
* hardware operations and always behaves as one would expect. It can be
* thought of as a hardware simulator and is very useful for testing client
* applications.
*
* It has also been expanded to provide support to "virtual" type of rigs
* such as the network rig control backend and W1HKJ's Flrig application.
*/
#define RIG_DUMMY 0
#define RIG_BACKEND_DUMMY "dummy"
#define RIG_MODEL_DUMMY RIG_MAKE_MODEL(RIG_DUMMY, 1)
#define RIG_MODEL_NETRIGCTL RIG_MAKE_MODEL(RIG_DUMMY, 2)
#define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3)
#define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4)
#define RIG_MODEL_TRXMANAGER_RIG RIG_MAKE_MODEL(RIG_DUMMY, 5)
#define RIG_MODEL_DUMMY_NOVFO RIG_MAKE_MODEL(RIG_DUMMY, 6)
#define RIG_MODEL_TCI1X RIG_MAKE_MODEL(RIG_DUMMY, 7)
/*
* Yaesu
*/
#define RIG_YAESU 1
#define RIG_BACKEND_YAESU "yaesu"
#define RIG_MODEL_FT847 RIG_MAKE_MODEL(RIG_YAESU, 1)
#define RIG_MODEL_FT1000 RIG_MAKE_MODEL(RIG_YAESU, 2)
#define RIG_MODEL_FT1000D RIG_MAKE_MODEL(RIG_YAESU, 3)
#define RIG_MODEL_FT1000MPMKV RIG_MAKE_MODEL(RIG_YAESU, 4)
#define RIG_MODEL_FT747 RIG_MAKE_MODEL(RIG_YAESU, 5)
#define RIG_MODEL_FT757 RIG_MAKE_MODEL(RIG_YAESU, 6)
#define RIG_MODEL_FT757GXII RIG_MAKE_MODEL(RIG_YAESU, 7)
#define RIG_MODEL_FT575 RIG_MAKE_MODEL(RIG_YAESU, 8)
#define RIG_MODEL_FT767 RIG_MAKE_MODEL(RIG_YAESU, 9)
#define RIG_MODEL_FT736R RIG_MAKE_MODEL(RIG_YAESU, 10)
#define RIG_MODEL_FT840 RIG_MAKE_MODEL(RIG_YAESU, 11)
#define RIG_MODEL_FT820 RIG_MAKE_MODEL(RIG_YAESU, 12)
#define RIG_MODEL_FT900 RIG_MAKE_MODEL(RIG_YAESU, 13)
#define RIG_MODEL_FT920 RIG_MAKE_MODEL(RIG_YAESU, 14)
#define RIG_MODEL_FT890 RIG_MAKE_MODEL(RIG_YAESU, 15)
#define RIG_MODEL_FT990 RIG_MAKE_MODEL(RIG_YAESU, 16)
#define RIG_MODEL_FRG100 RIG_MAKE_MODEL(RIG_YAESU, 17)
#define RIG_MODEL_FRG9600 RIG_MAKE_MODEL(RIG_YAESU, 18)
#define RIG_MODEL_FRG8800 RIG_MAKE_MODEL(RIG_YAESU, 19)
#define RIG_MODEL_FT817 RIG_MAKE_MODEL(RIG_YAESU, 20)
#define RIG_MODEL_FT100 RIG_MAKE_MODEL(RIG_YAESU, 21)
#define RIG_MODEL_FT857 RIG_MAKE_MODEL(RIG_YAESU, 22)
#define RIG_MODEL_FT897 RIG_MAKE_MODEL(RIG_YAESU, 23)
#define RIG_MODEL_FT1000MP RIG_MAKE_MODEL(RIG_YAESU, 24)
#define RIG_MODEL_FT1000MPMKVFLD RIG_MAKE_MODEL(RIG_YAESU, 25)
#define RIG_MODEL_VR5000 RIG_MAKE_MODEL(RIG_YAESU, 26)
#define RIG_MODEL_FT450 RIG_MAKE_MODEL(RIG_YAESU, 27)
#define RIG_MODEL_FT950 RIG_MAKE_MODEL(RIG_YAESU, 28)
#define RIG_MODEL_FT2000 RIG_MAKE_MODEL(RIG_YAESU, 29)
#define RIG_MODEL_FT9000 RIG_MAKE_MODEL(RIG_YAESU, 30)
#define RIG_MODEL_FT980 RIG_MAKE_MODEL(RIG_YAESU, 31)
#define RIG_MODEL_FTDX5000 RIG_MAKE_MODEL(RIG_YAESU, 32)
#define RIG_MODEL_VX1700 RIG_MAKE_MODEL(RIG_YAESU, 33)
#define RIG_MODEL_FTDX1200 RIG_MAKE_MODEL(RIG_YAESU, 34)
#define RIG_MODEL_FT991 RIG_MAKE_MODEL(RIG_YAESU, 35)
#define RIG_MODEL_FT891 RIG_MAKE_MODEL(RIG_YAESU, 36)
#define RIG_MODEL_FTDX3000 RIG_MAKE_MODEL(RIG_YAESU, 37)
#define RIG_MODEL_FT847UNI RIG_MAKE_MODEL(RIG_YAESU, 38)
#define RIG_MODEL_FT600 RIG_MAKE_MODEL(RIG_YAESU, 39)
#define RIG_MODEL_FTDX101D RIG_MAKE_MODEL(RIG_YAESU, 40)
#define RIG_MODEL_FT818 RIG_MAKE_MODEL(RIG_YAESU, 41)
#define RIG_MODEL_FTDX10 RIG_MAKE_MODEL(RIG_YAESU, 42)
#define RIG_MODEL_FT897D RIG_MAKE_MODEL(RIG_YAESU, 43)
#define RIG_MODEL_FTDX101MP RIG_MAKE_MODEL(RIG_YAESU, 44)
#define RIG_MODEL_MCHFQRP RIG_MAKE_MODEL(RIG_YAESU, 45)
/*
* Kenwood
*/
#define RIG_KENWOOD 2
#define RIG_BACKEND_KENWOOD "kenwood"
#define RIG_MODEL_TS50 RIG_MAKE_MODEL(RIG_KENWOOD, 1)
#define RIG_MODEL_TS440 RIG_MAKE_MODEL(RIG_KENWOOD, 2)
#define RIG_MODEL_TS450S RIG_MAKE_MODEL(RIG_KENWOOD, 3)
#define RIG_MODEL_TS570D RIG_MAKE_MODEL(RIG_KENWOOD, 4)
#define RIG_MODEL_TS690S RIG_MAKE_MODEL(RIG_KENWOOD, 5)
#define RIG_MODEL_TS711 RIG_MAKE_MODEL(RIG_KENWOOD, 6)
#define RIG_MODEL_TS790 RIG_MAKE_MODEL(RIG_KENWOOD, 7)
#define RIG_MODEL_TS811 RIG_MAKE_MODEL(RIG_KENWOOD, 8)
#define RIG_MODEL_TS850 RIG_MAKE_MODEL(RIG_KENWOOD, 9)
#define RIG_MODEL_TS870S RIG_MAKE_MODEL(RIG_KENWOOD, 10)
#define RIG_MODEL_TS940 RIG_MAKE_MODEL(RIG_KENWOOD, 11)
#define RIG_MODEL_TS950S RIG_MAKE_MODEL(RIG_KENWOOD, 12)
#define RIG_MODEL_TS950SDX RIG_MAKE_MODEL(RIG_KENWOOD, 13)
#define RIG_MODEL_TS2000 RIG_MAKE_MODEL(RIG_KENWOOD, 14)
#define RIG_MODEL_R5000 RIG_MAKE_MODEL(RIG_KENWOOD, 15)
#define RIG_MODEL_TS570S RIG_MAKE_MODEL(RIG_KENWOOD, 16)
#define RIG_MODEL_THD7A RIG_MAKE_MODEL(RIG_KENWOOD, 17)
#define RIG_MODEL_THD7AG RIG_MAKE_MODEL(RIG_KENWOOD, 18)
#define RIG_MODEL_THF6A RIG_MAKE_MODEL(RIG_KENWOOD, 19)
#define RIG_MODEL_THF7E RIG_MAKE_MODEL(RIG_KENWOOD, 20)
#define RIG_MODEL_K2 RIG_MAKE_MODEL(RIG_KENWOOD, 21)
#define RIG_MODEL_TS930 RIG_MAKE_MODEL(RIG_KENWOOD, 22)
#define RIG_MODEL_THG71 RIG_MAKE_MODEL(RIG_KENWOOD, 23)
#define RIG_MODEL_TS680S RIG_MAKE_MODEL(RIG_KENWOOD, 24)
#define RIG_MODEL_TS140S RIG_MAKE_MODEL(RIG_KENWOOD, 25)
#define RIG_MODEL_TMD700 RIG_MAKE_MODEL(RIG_KENWOOD, 26)
#define RIG_MODEL_TMV7 RIG_MAKE_MODEL(RIG_KENWOOD, 27)
#define RIG_MODEL_TS480 RIG_MAKE_MODEL(RIG_KENWOOD, 28)
#define RIG_MODEL_K3 RIG_MAKE_MODEL(RIG_KENWOOD, 29)
#define RIG_MODEL_TRC80 RIG_MAKE_MODEL(RIG_KENWOOD, 30)
#define RIG_MODEL_TS590S RIG_MAKE_MODEL(RIG_KENWOOD, 31)
#define RIG_MODEL_TRANSFOX RIG_MAKE_MODEL(RIG_KENWOOD, 32) /* SigFox Transfox */
#define RIG_MODEL_THD72A RIG_MAKE_MODEL(RIG_KENWOOD, 33)
#define RIG_MODEL_TMD710 RIG_MAKE_MODEL(RIG_KENWOOD, 34)
#define RIG_MODEL_TMV71 RIG_MAKE_MODEL(RIG_KENWOOD, 35)
#define RIG_MODEL_F6K RIG_MAKE_MODEL(RIG_KENWOOD, 36) /* Flex 6000 Series */
#define RIG_MODEL_TS590SG RIG_MAKE_MODEL(RIG_KENWOOD, 37)
#define RIG_MODEL_XG3 RIG_MAKE_MODEL(RIG_KENWOOD, 38) /* Elecraft XG-3 signal generator */
#define RIG_MODEL_TS990S RIG_MAKE_MODEL(RIG_KENWOOD, 39)
#define RIG_MODEL_HPSDR RIG_MAKE_MODEL(RIG_KENWOOD, 40) /* OpenHPSDR, PiHPSDR */
#define RIG_MODEL_TS890S RIG_MAKE_MODEL(RIG_KENWOOD, 41)
#define RIG_MODEL_THD74 RIG_MAKE_MODEL(RIG_KENWOOD, 42)
#define RIG_MODEL_K3S RIG_MAKE_MODEL(RIG_KENWOOD, 43)
#define RIG_MODEL_KX2 RIG_MAKE_MODEL(RIG_KENWOOD, 44)
#define RIG_MODEL_KX3 RIG_MAKE_MODEL(RIG_KENWOOD, 45)
#define RIG_MODEL_PT8000A RIG_MAKE_MODEL(RIG_KENWOOD, 46)
#define RIG_MODEL_K4 RIG_MAKE_MODEL(RIG_KENWOOD, 47)
#define RIG_MODEL_POWERSDR RIG_MAKE_MODEL(RIG_KENWOOD, 48)
#define RIG_MODEL_MALACHITE RIG_MAKE_MODEL(RIG_KENWOOD, 49)
/*
* Icom
*/
#define RIG_ICOM 3
#define RIG_BACKEND_ICOM "icom"
#define RIG_MODEL_IC1271 RIG_MAKE_MODEL(RIG_ICOM, 1)
#define RIG_MODEL_IC1275 RIG_MAKE_MODEL(RIG_ICOM, 2)
#define RIG_MODEL_IC271 RIG_MAKE_MODEL(RIG_ICOM, 3)
#define RIG_MODEL_IC275 RIG_MAKE_MODEL(RIG_ICOM, 4)
#define RIG_MODEL_IC375 RIG_MAKE_MODEL(RIG_ICOM, 5)
#define RIG_MODEL_IC471 RIG_MAKE_MODEL(RIG_ICOM, 6)
#define RIG_MODEL_IC475 RIG_MAKE_MODEL(RIG_ICOM, 7)
#define RIG_MODEL_IC575 RIG_MAKE_MODEL(RIG_ICOM, 8)
#define RIG_MODEL_IC706 RIG_MAKE_MODEL(RIG_ICOM, 9)
#define RIG_MODEL_IC706MKII RIG_MAKE_MODEL(RIG_ICOM, 10)
#define RIG_MODEL_IC706MKIIG RIG_MAKE_MODEL(RIG_ICOM, 11)
#define RIG_MODEL_IC707 RIG_MAKE_MODEL(RIG_ICOM, 12)
#define RIG_MODEL_IC718 RIG_MAKE_MODEL(RIG_ICOM, 13)
#define RIG_MODEL_IC725 RIG_MAKE_MODEL(RIG_ICOM, 14)
#define RIG_MODEL_IC726 RIG_MAKE_MODEL(RIG_ICOM, 15)
#define RIG_MODEL_IC728 RIG_MAKE_MODEL(RIG_ICOM, 16)
#define RIG_MODEL_IC729 RIG_MAKE_MODEL(RIG_ICOM, 17)
#define RIG_MODEL_IC731 RIG_MAKE_MODEL(RIG_ICOM, 18)
#define RIG_MODEL_IC735 RIG_MAKE_MODEL(RIG_ICOM, 19)
#define RIG_MODEL_IC736 RIG_MAKE_MODEL(RIG_ICOM, 20)
#define RIG_MODEL_IC737 RIG_MAKE_MODEL(RIG_ICOM, 21)
#define RIG_MODEL_IC738 RIG_MAKE_MODEL(RIG_ICOM, 22)
#define RIG_MODEL_IC746 RIG_MAKE_MODEL(RIG_ICOM, 23)
#define RIG_MODEL_IC751 RIG_MAKE_MODEL(RIG_ICOM, 24)
#define RIG_MODEL_IC751A RIG_MAKE_MODEL(RIG_ICOM, 25)
#define RIG_MODEL_IC756 RIG_MAKE_MODEL(RIG_ICOM, 26)
#define RIG_MODEL_IC756PRO RIG_MAKE_MODEL(RIG_ICOM, 27)
#define RIG_MODEL_IC761 RIG_MAKE_MODEL(RIG_ICOM, 28)
#define RIG_MODEL_IC765 RIG_MAKE_MODEL(RIG_ICOM, 29)
#define RIG_MODEL_IC775 RIG_MAKE_MODEL(RIG_ICOM, 30)
#define RIG_MODEL_IC781 RIG_MAKE_MODEL(RIG_ICOM, 31)
#define RIG_MODEL_IC820 RIG_MAKE_MODEL(RIG_ICOM, 32)
//#define RIG_MODEL_IC821 RIG_MAKE_MODEL(RIG_ICOM, 33) // not implemented and can be reused
#define RIG_MODEL_IC821H RIG_MAKE_MODEL(RIG_ICOM, 34)
#define RIG_MODEL_IC970 RIG_MAKE_MODEL(RIG_ICOM, 35)
#define RIG_MODEL_ICR10 RIG_MAKE_MODEL(RIG_ICOM, 36)
#define RIG_MODEL_ICR71 RIG_MAKE_MODEL(RIG_ICOM, 37)
#define RIG_MODEL_ICR72 RIG_MAKE_MODEL(RIG_ICOM, 38)
#define RIG_MODEL_ICR75 RIG_MAKE_MODEL(RIG_ICOM, 39)
#define RIG_MODEL_ICR7000 RIG_MAKE_MODEL(RIG_ICOM, 40)
#define RIG_MODEL_ICR7100 RIG_MAKE_MODEL(RIG_ICOM, 41)
#define RIG_MODEL_ICR8500 RIG_MAKE_MODEL(RIG_ICOM, 42)
#define RIG_MODEL_ICR9000 RIG_MAKE_MODEL(RIG_ICOM, 43)
#define RIG_MODEL_IC910 RIG_MAKE_MODEL(RIG_ICOM, 44)
#define RIG_MODEL_IC78 RIG_MAKE_MODEL(RIG_ICOM, 45)
#define RIG_MODEL_IC746PRO RIG_MAKE_MODEL(RIG_ICOM, 46)
#define RIG_MODEL_IC756PROII RIG_MAKE_MODEL(RIG_ICOM, 47) /* 48-53 defined below */
#define RIG_MODEL_ICID1 RIG_MAKE_MODEL(RIG_ICOM, 54)
#define RIG_MODEL_IC703 RIG_MAKE_MODEL(RIG_ICOM, 55)
#define RIG_MODEL_IC7800 RIG_MAKE_MODEL(RIG_ICOM, 56)
#define RIG_MODEL_IC756PROIII RIG_MAKE_MODEL(RIG_ICOM, 57)
#define RIG_MODEL_ICR20 RIG_MAKE_MODEL(RIG_ICOM, 58) /* 59 defined below */
#define RIG_MODEL_IC7000 RIG_MAKE_MODEL(RIG_ICOM, 60)
#define RIG_MODEL_IC7200 RIG_MAKE_MODEL(RIG_ICOM, 61)
#define RIG_MODEL_IC7700 RIG_MAKE_MODEL(RIG_ICOM, 62)
#define RIG_MODEL_IC7600 RIG_MAKE_MODEL(RIG_ICOM, 63) /* 64 defined below */
#define RIG_MODEL_IC92D RIG_MAKE_MODEL(RIG_ICOM, 65)
#define RIG_MODEL_ICR9500 RIG_MAKE_MODEL(RIG_ICOM, 66)
#define RIG_MODEL_IC7410 RIG_MAKE_MODEL(RIG_ICOM, 67)
#define RIG_MODEL_IC9100 RIG_MAKE_MODEL(RIG_ICOM, 68)
#define RIG_MODEL_ICRX7 RIG_MAKE_MODEL(RIG_ICOM, 69)
#define RIG_MODEL_IC7100 RIG_MAKE_MODEL(RIG_ICOM, 70)
#define RIG_MODEL_ID5100 RIG_MAKE_MODEL(RIG_ICOM, 71)
#define RIG_MODEL_IC2730 RIG_MAKE_MODEL(RIG_ICOM, 72)
#define RIG_MODEL_IC7300 RIG_MAKE_MODEL(RIG_ICOM, 73)
#define RIG_MODEL_PERSEUS RIG_MAKE_MODEL(RIG_ICOM, 74)
#define RIG_MODEL_IC785x RIG_MAKE_MODEL(RIG_ICOM, 75)
#define RIG_MODEL_X108G RIG_MAKE_MODEL(RIG_ICOM, 76) /* Xiegu X108 */
#define RIG_MODEL_ICR6 RIG_MAKE_MODEL(RIG_ICOM, 77)
#define RIG_MODEL_IC7610 RIG_MAKE_MODEL(RIG_ICOM, 78)
#define RIG_MODEL_ICR8600 RIG_MAKE_MODEL(RIG_ICOM, 79)
#define RIG_MODEL_ICR30 RIG_MAKE_MODEL(RIG_ICOM, 80)
#define RIG_MODEL_IC9700 RIG_MAKE_MODEL(RIG_ICOM, 81)
#define RIG_MODEL_ID4100 RIG_MAKE_MODEL(RIG_ICOM, 82)
#define RIG_MODEL_ID31 RIG_MAKE_MODEL(RIG_ICOM, 83)
#define RIG_MODEL_ID51 RIG_MAKE_MODEL(RIG_ICOM, 84)
#define RIG_MODEL_IC705 RIG_MAKE_MODEL(RIG_ICOM, 85)
/* next one is 86 */
/*
* Optoelectronics (CI-V)
*/
#define RIG_MODEL_MINISCOUT RIG_MAKE_MODEL(RIG_ICOM, 48)
#define RIG_MODEL_XPLORER RIG_MAKE_MODEL(RIG_ICOM, 49)
#define RIG_MODEL_OS535 RIG_MAKE_MODEL(RIG_ICOM, 52)
#define RIG_MODEL_OS456 RIG_MAKE_MODEL(RIG_ICOM, 53)
/*
* TenTec (CI-V)
*/
#define RIG_MODEL_OMNIVI RIG_MAKE_MODEL(RIG_ICOM, 50)
#define RIG_MODEL_OMNIVIP RIG_MAKE_MODEL(RIG_ICOM, 51) /* OMNI-VI+ */
#define RIG_MODEL_PARAGON2 RIG_MAKE_MODEL(RIG_ICOM, 59)
#define RIG_MODEL_DELTAII RIG_MAKE_MODEL(RIG_ICOM, 64)
/*
* Icom PCR
*/
#define RIG_PCR 4
#define RIG_BACKEND_PCR "pcr"
#define RIG_MODEL_PCR1000 RIG_MAKE_MODEL(RIG_PCR, 1)
#define RIG_MODEL_PCR100 RIG_MAKE_MODEL(RIG_PCR, 2)
#define RIG_MODEL_PCR1500 RIG_MAKE_MODEL(RIG_PCR, 3)
#define RIG_MODEL_PCR2500 RIG_MAKE_MODEL(RIG_PCR, 4)
/*
* AOR
*/
#define RIG_AOR 5
#define RIG_BACKEND_AOR "aor"
#define RIG_MODEL_AR8200 RIG_MAKE_MODEL(RIG_AOR, 1)
#define RIG_MODEL_AR8000 RIG_MAKE_MODEL(RIG_AOR, 2)
#define RIG_MODEL_AR7030 RIG_MAKE_MODEL(RIG_AOR, 3)
#define RIG_MODEL_AR5000 RIG_MAKE_MODEL(RIG_AOR, 4)
#define RIG_MODEL_AR3030 RIG_MAKE_MODEL(RIG_AOR, 5)
#define RIG_MODEL_AR3000A RIG_MAKE_MODEL(RIG_AOR, 6)
#define RIG_MODEL_AR3000 RIG_MAKE_MODEL(RIG_AOR, 7)
#define RIG_MODEL_AR2700 RIG_MAKE_MODEL(RIG_AOR, 8)
#define RIG_MODEL_AR2500 RIG_MAKE_MODEL(RIG_AOR, 9)
#define RIG_MODEL_AR16 RIG_MAKE_MODEL(RIG_AOR, 10)
#define RIG_MODEL_SDU5500 RIG_MAKE_MODEL(RIG_AOR, 11)
#define RIG_MODEL_SDU5000 RIG_MAKE_MODEL(RIG_AOR, 12)
#define RIG_MODEL_AR8600 RIG_MAKE_MODEL(RIG_AOR, 13)
#define RIG_MODEL_AR5000A RIG_MAKE_MODEL(RIG_AOR, 14)
#define RIG_MODEL_AR7030P RIG_MAKE_MODEL(RIG_AOR, 15)
#define RIG_MODEL_SR2200 RIG_MAKE_MODEL(RIG_AOR, 16)
/*
* JRC
*/
#define RIG_JRC 6
#define RIG_BACKEND_JRC "jrc"
#define RIG_MODEL_JST145 RIG_MAKE_MODEL(RIG_JRC, 1)
#define RIG_MODEL_JST245 RIG_MAKE_MODEL(RIG_JRC, 2)
#define RIG_MODEL_CMH530 RIG_MAKE_MODEL(RIG_JRC, 3)
#define RIG_MODEL_NRD345 RIG_MAKE_MODEL(RIG_JRC, 4)
#define RIG_MODEL_NRD525 RIG_MAKE_MODEL(RIG_JRC, 5)
#define RIG_MODEL_NRD535 RIG_MAKE_MODEL(RIG_JRC, 6)
#define RIG_MODEL_NRD545 RIG_MAKE_MODEL(RIG_JRC, 7)
/*
* Radio Shack
* Actually, they might be either Icom or Uniden. TBC --SF
*/
#define RIG_RADIOSHACK 7
#define RIG_BACKEND_RADIOSHACK "radioshack"
#define RIG_MODEL_RS64 RIG_MAKE_MODEL(RIG_RADIOSHACK, 1) /* PRO-64 */
#define RIG_MODEL_RS2005 RIG_MAKE_MODEL(RIG_RADIOSHACK, 2) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2006 RIG_MAKE_MODEL(RIG_RADIOSHACK, 3) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2035 RIG_MAKE_MODEL(RIG_RADIOSHACK, 4) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2042 RIG_MAKE_MODEL(RIG_RADIOSHACK, 5) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2041 RIG_MAKE_MODEL(RIG_RADIOSHACK, 6) /* PRO-2041 */
/*
* Uniden
*/
#define RIG_UNIDEN 8
#define RIG_BACKEND_UNIDEN "uniden"
#define RIG_MODEL_BC780 RIG_MAKE_MODEL(RIG_UNIDEN, 1) /* Uniden BC780 - Trunk Tracker "Desktop Radio" */
#define RIG_MODEL_BC245 RIG_MAKE_MODEL(RIG_UNIDEN, 2)
#define RIG_MODEL_BC895 RIG_MAKE_MODEL(RIG_UNIDEN, 3)
#define RIG_MODEL_PRO2052 RIG_MAKE_MODEL(RIG_UNIDEN, 4) /* Radio Shack PRO-2052 */
#define RIG_MODEL_BC235 RIG_MAKE_MODEL(RIG_UNIDEN, 5)
#define RIG_MODEL_BC250 RIG_MAKE_MODEL(RIG_UNIDEN, 6)
#define RIG_MODEL_BC785 RIG_MAKE_MODEL(RIG_UNIDEN, 7)
#define RIG_MODEL_BC786 RIG_MAKE_MODEL(RIG_UNIDEN, 8)
#define RIG_MODEL_BCT8 RIG_MAKE_MODEL(RIG_UNIDEN, 9)
#define RIG_MODEL_BCD396T RIG_MAKE_MODEL(RIG_UNIDEN, 10)
#define RIG_MODEL_BCD996T RIG_MAKE_MODEL(RIG_UNIDEN, 11)
#define RIG_MODEL_BC898 RIG_MAKE_MODEL(RIG_UNIDEN, 12)
/*
* Drake
*/
#define RIG_DRAKE 9
#define RIG_BACKEND_DRAKE "drake"
#define RIG_MODEL_DKR8 RIG_MAKE_MODEL(RIG_DRAKE, 1)
#define RIG_MODEL_DKR8A RIG_MAKE_MODEL(RIG_DRAKE, 2)
#define RIG_MODEL_DKR8B RIG_MAKE_MODEL(RIG_DRAKE, 3)
/*
* Lowe
*/
#define RIG_LOWE 10
#define RIG_BACKEND_LOWE "lowe"
#define RIG_MODEL_HF150 RIG_MAKE_MODEL(RIG_LOWE, 1)
#define RIG_MODEL_HF225 RIG_MAKE_MODEL(RIG_LOWE, 2)
#define RIG_MODEL_HF250 RIG_MAKE_MODEL(RIG_LOWE, 3)
#define RIG_MODEL_HF235 RIG_MAKE_MODEL(RIG_LOWE, 4)
/*
* Racal
*/
#define RIG_RACAL 11
#define RIG_BACKEND_RACAL "racal"
#define RIG_MODEL_RA3790 RIG_MAKE_MODEL(RIG_RACAL, 1)
#define RIG_MODEL_RA3720 RIG_MAKE_MODEL(RIG_RACAL, 2)
#define RIG_MODEL_RA6790 RIG_MAKE_MODEL(RIG_RACAL, 3)
#define RIG_MODEL_RA3710 RIG_MAKE_MODEL(RIG_RACAL, 4)
#define RIG_MODEL_RA3702 RIG_MAKE_MODEL(RIG_RACAL, 5)
/*
* Watkins-Johnson
*/
#define RIG_WJ 12
#define RIG_BACKEND_WJ "wj"
#define RIG_MODEL_HF1000 RIG_MAKE_MODEL(RIG_WJ, 1)
#define RIG_MODEL_HF1000A RIG_MAKE_MODEL(RIG_WJ, 2)
#define RIG_MODEL_WJ8711 RIG_MAKE_MODEL(RIG_WJ, 3)
#define RIG_MODEL_WJ8888 RIG_MAKE_MODEL(RIG_WJ, 4)
/*
* Rohde & Schwarz--ek
*/
#define RIG_EK 13
#define RIG_BACKEND_EK "ek"
#define RIG_MODEL_ESM500 RIG_MAKE_MODEL(RIG_EK, 1)
#define RIG_MODEL_EK890 RIG_MAKE_MODEL(RIG_EK, 2)
#define RIG_MODEL_EK891 RIG_MAKE_MODEL(RIG_EK, 3)
#define RIG_MODEL_EK895 RIG_MAKE_MODEL(RIG_EK, 4)
#define RIG_MODEL_EK070 RIG_MAKE_MODEL(RIG_EK, 5)
/*
* Skanti
*/
#define RIG_SKANTI 14
#define RIG_BACKEND_SKANTI "skanti"
#define RIG_MODEL_TRP7000 RIG_MAKE_MODEL(RIG_SKANTI, 1)
#define RIG_MODEL_TRP8000 RIG_MAKE_MODEL(RIG_SKANTI, 2)
#define RIG_MODEL_TRP9000 RIG_MAKE_MODEL(RIG_SKANTI, 3)
#define RIG_MODEL_TRP8255 RIG_MAKE_MODEL(RIG_SKANTI, 4)
/*
* WiNRADiO/LinRADiO
*/
#define RIG_WINRADIO 15
#define RIG_BACKEND_WINRADIO "winradio"
#define RIG_MODEL_WR1000 RIG_MAKE_MODEL(RIG_WINRADIO, 1)
#define RIG_MODEL_WR1500 RIG_MAKE_MODEL(RIG_WINRADIO, 2)
#define RIG_MODEL_WR1550 RIG_MAKE_MODEL(RIG_WINRADIO, 3)
#define RIG_MODEL_WR3100 RIG_MAKE_MODEL(RIG_WINRADIO, 4)
#define RIG_MODEL_WR3150 RIG_MAKE_MODEL(RIG_WINRADIO, 5)
#define RIG_MODEL_WR3500 RIG_MAKE_MODEL(RIG_WINRADIO, 6)
#define RIG_MODEL_WR3700 RIG_MAKE_MODEL(RIG_WINRADIO, 7)
#define RIG_MODEL_G303 RIG_MAKE_MODEL(RIG_WINRADIO, 8)
#define RIG_MODEL_G313 RIG_MAKE_MODEL(RIG_WINRADIO, 9)
#define RIG_MODEL_G305 RIG_MAKE_MODEL(RIG_WINRADIO, 10)
#define RIG_MODEL_G315 RIG_MAKE_MODEL(RIG_WINRADIO, 11)
/*
* Ten Tec
*/
#define RIG_TENTEC 16
#define RIG_BACKEND_TENTEC "tentec"
#define RIG_MODEL_TT550 RIG_MAKE_MODEL(RIG_TENTEC, 1) /* Pegasus */
#define RIG_MODEL_TT538 RIG_MAKE_MODEL(RIG_TENTEC, 2) /* Jupiter */
#define RIG_MODEL_RX320 RIG_MAKE_MODEL(RIG_TENTEC, 3)
#define RIG_MODEL_RX340 RIG_MAKE_MODEL(RIG_TENTEC, 4)
#define RIG_MODEL_RX350 RIG_MAKE_MODEL(RIG_TENTEC, 5)
#define RIG_MODEL_TT526 RIG_MAKE_MODEL(RIG_TENTEC, 6) /* 6N2 */
#define RIG_MODEL_TT516 RIG_MAKE_MODEL(RIG_TENTEC, 7) /* Argonaut V */
#define RIG_MODEL_TT565 RIG_MAKE_MODEL(RIG_TENTEC, 8) /* Orion */
#define RIG_MODEL_TT585 RIG_MAKE_MODEL(RIG_TENTEC, 9) /* Paragon */
#define RIG_MODEL_TT588 RIG_MAKE_MODEL(RIG_TENTEC, 11) /* Omni-VII */
#define RIG_MODEL_RX331 RIG_MAKE_MODEL(RIG_TENTEC, 12)
#define RIG_MODEL_TT599 RIG_MAKE_MODEL(RIG_TENTEC, 13) /* Eagle */
/*
* Alinco
*/
#define RIG_ALINCO 17
#define RIG_BACKEND_ALINCO "alinco"
#define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1)
#define RIG_MODEL_DXSR8 RIG_MAKE_MODEL(RIG_ALINCO, 2)
/*
* Kachina
*/
#define RIG_KACHINA 18
#define RIG_BACKEND_KACHINA "kachina"
#define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1)
/*
* Gnuradio backend
*/
#define RIG_GNURADIO 20
#define RIG_BACKEND_GNURADIO "gnuradio"
#define RIG_MODEL_GNURADIO RIG_MAKE_MODEL(RIG_GNURADIO, 1) /* dev model, Chirp source */
#define RIG_MODEL_MC4020 RIG_MAKE_MODEL(RIG_GNURADIO, 2) /* MC4020 */
#define RIG_MODEL_GRAUDIO RIG_MAKE_MODEL(RIG_GNURADIO, 3) /* Sound card source */
#define RIG_MODEL_GRAUDIOIQ RIG_MAKE_MODEL(RIG_GNURADIO, 4) /* I&Q stereo sound card source */
#define RIG_MODEL_USRP_G RIG_MAKE_MODEL(RIG_GNURADIO, 5) /* Universal Software Radio Peripheral */
/*
* Microtune tuners
*/
#define RIG_MICROTUNE 21
#define RIG_BACKEND_MICROTUNE "microtune"
#define RIG_MODEL_MICROTUNE_4937 RIG_MAKE_MODEL(RIG_MICROTUNE, 1) /* eval board */
#define RIG_MODEL_MICROTUNE_4702 RIG_MAKE_MODEL(RIG_MICROTUNE, 2) /* Alan's */
#define RIG_MODEL_MICROTUNE_4707 RIG_MAKE_MODEL(RIG_MICROTUNE, 3)
/*
* TAPR
*/
#define RIG_TAPR 22
#define RIG_BACKEND_TAPR "tapr"
#define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1)
/*
* Flex-radio
*/
#define RIG_FLEXRADIO 23
#define RIG_BACKEND_FLEXRADIO "flexradio"
#define RIG_MODEL_SDR1000 RIG_MAKE_MODEL(RIG_FLEXRADIO, 1)
#define RIG_MODEL_SDR1000RFE RIG_MAKE_MODEL(RIG_FLEXRADIO, 2)
#define RIG_MODEL_DTTSP RIG_MAKE_MODEL(RIG_FLEXRADIO, 3)
#define RIG_MODEL_DTTSP_UDP RIG_MAKE_MODEL(RIG_FLEXRADIO, 4)
/*
* VEB Funkwerk Köpenick RFT
*/
#define RIG_RFT 24
#define RIG_BACKEND_RFT "rft"
#define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1)
/*
* Various kits
*/
#define RIG_KIT 25
#define RIG_BACKEND_KIT "kit"
#define RIG_MODEL_ELEKTOR304 RIG_MAKE_MODEL(RIG_KIT, 1)
#define RIG_MODEL_DRT1 RIG_MAKE_MODEL(RIG_KIT, 2)
#define RIG_MODEL_DWT RIG_MAKE_MODEL(RIG_KIT, 3)
#define RIG_MODEL_USRP0 RIG_MAKE_MODEL(RIG_KIT, 4) /* prototype */
#define RIG_MODEL_USRP RIG_MAKE_MODEL(RIG_KIT, 5)
#define RIG_MODEL_DDS60 RIG_MAKE_MODEL(RIG_KIT, 6)
#define RIG_MODEL_ELEKTOR507 RIG_MAKE_MODEL(RIG_KIT, 7) /* Elektor SDR USB */
#define RIG_MODEL_MINIVNA RIG_MAKE_MODEL(RIG_KIT, 8)
#define RIG_MODEL_SI570AVRUSB RIG_MAKE_MODEL(RIG_KIT, 9) /* SoftRock Si570 AVR */
#define RIG_MODEL_PMSDR RIG_MAKE_MODEL(RIG_KIT, 10)
#define RIG_MODEL_SI570PICUSB RIG_MAKE_MODEL(RIG_KIT, 11) /* SoftRock Si570 PIC */
#define RIG_MODEL_FIFISDR RIG_MAKE_MODEL(RIG_KIT, 12) /* FiFi-SDR USB */
#define RIG_MODEL_FUNCUBEDONGLE RIG_MAKE_MODEL(RIG_KIT, 13) /* FunCUBE Dongle */
#define RIG_MODEL_HIQSDR RIG_MAKE_MODEL(RIG_KIT, 14) /* HiQSDR */
#define RIG_MODEL_FASDR RIG_MAKE_MODEL(RIG_KIT,15) /* Funkamateur Sdr */
#define RIG_MODEL_SI570PEABERRY1 RIG_MAKE_MODEL(RIG_KIT, 16) /* Peaberry V1 */
#define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */
#define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */
#define RIG_MODEL_RSHFIQ RIG_MAKE_MODEL(RIG_KIT, 19) /* RS-HFIQ */
/*
* SW/FM/TV tuner cards supported by Video4Linux,*BSD, ..
*/
#define RIG_TUNER 26
#define RIG_BACKEND_TUNER "tuner"
#define RIG_MODEL_V4L RIG_MAKE_MODEL(RIG_TUNER, 1)
#define RIG_MODEL_V4L2 RIG_MAKE_MODEL(RIG_TUNER, 2)
/*
* Rohde & Schwarz--rs
*/
#define RIG_RS 27
#define RIG_BACKEND_RS "rs"
#define RIG_MODEL_ESMC RIG_MAKE_MODEL(RIG_RS, 1)
#define RIG_MODEL_EB200 RIG_MAKE_MODEL(RIG_RS, 2)
#define RIG_MODEL_XK2100 RIG_MAKE_MODEL(RIG_RS, 3)
/*
* Phillips/Simoco PRM80
*/
#define RIG_PRM80 28
#define RIG_BACKEND_PRM80 "prm80"
#define RIG_MODEL_PRM8060 RIG_MAKE_MODEL(RIG_PRM80, 1)
#define RIG_MODEL_PRM8070 RIG_MAKE_MODEL(RIG_PRM80, 2)
/*
* ADAT by HB9CBU
*
* ADDED: frgo (DG1SBG), 2012-01-01
*/
#define RIG_ADAT 29
#define RIG_BACKEND_ADAT "adat"
#define RIG_MODEL_ADT_200A RIG_MAKE_MODEL(RIG_ADAT, 1)
/*
* ICOM Marine
*/
#define RIG_ICMARINE 30
#define RIG_BACKEND_ICMARINE "icmarine"
#define RIG_MODEL_IC_M700PRO RIG_MAKE_MODEL(RIG_ICMARINE, 1)
#define RIG_MODEL_IC_M802 RIG_MAKE_MODEL(RIG_ICMARINE, 2)
#define RIG_MODEL_IC_M710 RIG_MAKE_MODEL(RIG_ICMARINE, 3)
#define RIG_MODEL_IC_M803 RIG_MAKE_MODEL(RIG_ICMARINE, 4)
/*
* Dorji transceiver modules
*/
#define RIG_DORJI 31
#define RIG_BACKEND_DORJI "dorji"
#define RIG_MODEL_DORJI_DRA818V RIG_MAKE_MODEL(RIG_DORJI, 1)
#define RIG_MODEL_DORJI_DRA818U RIG_MAKE_MODEL(RIG_DORJI, 2)
/*
* Barrett
*/
#define RIG_BARRETT 32
#define RIG_BACKEND_BARRETT "barrett"
#define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1)
#define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2)
/*
* Elad
*/
#define RIG_ELAD 33
#define RIG_BACKEND_ELAD "elad"
#define RIG_MODEL_ELAD_FDM_DUO RIG_MAKE_MODEL(RIG_ELAD, 1)
//! @endcond
/*
* TODO:
RIG_MODEL_KWZ30, KNEISNER +DOERING
RIG_MODEL_E1800, DASA-Telefunken
etc.
*/
/*! \typedef typedef int rig_model_t
\brief Convenience type definition for rig model.
*/
typedef uint32_t rig_model_t;
/*
* struct rig_backend_list {
* rig_model_t model;
* const char *backend;
* } rig_backend_list[] = RIG_LIST;
*
* TODO:
*
{ RIG_RADIOSHACK, RIG_BACKEND_RADIOSHACK }, \
*/
#endif /* _RIGLIST_H */

View File

@ -1,805 +0,0 @@
/*
* Hamlib Interface - Rotator API header
* Copyright (c) 2000-2005 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _ROTATOR_H
#define _ROTATOR_H 1
#include <hamlib/rig.h>
#include <hamlib/rotlist.h>
/**
* \addtogroup rotator
* @{
*/
/**
* \file rotator.h
* \brief Hamlib rotator data structures.
*
* This file contains the data structures and declarations for the Hamlib
* rotator Application Programming Interface (API).
*
* See the rotator.c file for more details on the rotator API functions.
*/
__BEGIN_DECLS
/* Forward struct references */
struct rot;
struct rot_state;
/**
* \typedef typedef struct s_rot ROT
* \brief Main rotator handle type definition.
*
* The #ROT handle is returned by rot_init() and is passed as a parameter to
* every rotator specific API call.
*
* rot_cleanup() must be called when this handle is no longer needed.
*/
typedef struct s_rot ROT;
/**
* \typedef typedef float elevation_t
* \brief Type definition for elevation.
*
* The \a elevation_t type is used as parameter for the rot_set_position() and
* rot_get_position() functions.
*
* Unless specified otherwise, the unit of \a elevation_t is decimal degrees.
*/
typedef float elevation_t;
/**
* \typedef typedef float azimuth_t
* \brief Type definition for azimuth.
*
* The \a azimuth_t type is used as parameter for the rot_set_position() and
* rot_get_position() functions.
*
* Unless specified otherwise, the unit of \a azimuth_t is decimal degrees.
*/
typedef float azimuth_t;
/**
* \brief The token in the netrotctl protocol for returning an error condition code.
*/
#define NETROTCTL_RET "RPRT "
/**
* \def ROT_RESET_ALL
* \brief A macro that returns the flag for the \b reset operation.
*
* \sa rot_reset(), rot_reset_t
*/
#define ROT_RESET_ALL 1
/**
* \typedef typedef int rot_reset_t
* \brief Type definition for rotator reset.
*
* The \a rot_reset_t type is used as parameter for the rot_reset() API
* function.
*/
typedef int rot_reset_t;
/**
* \brief Rotator type flags for bitmasks.
*/
typedef enum {
ROT_FLAG_AZIMUTH = (1 << 1), /*!< Azimuth */
ROT_FLAG_ELEVATION = (1 << 2) /*!< Elevation */
} rot_type_t;
//! @cond Doxygen_Suppress
/* So far only used in ests/dumpcaps_rot.c. */
#define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
//! @endcond
/**
* \def ROT_TYPE_OTHER
* \brief Other type of rotator.
* \def ROT_TYPE_AZIMUTH
* \brief Azimuth only rotator.
* \def ROT_TYPE_ELEVATION
* \brief Elevation only rotator.
* \def ROT_TYPE_AZEL
* \brief Combination azimuth/elevation rotator.
*/
#define ROT_TYPE_OTHER 0
#define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH
#define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION
#define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
/**
* \def ROT_MOVE_UP
* \brief A macro that returns the flag for the \b UP direction.
*
* This macro defines the value of the \b UP direction which can be
* used with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_RIGHT, ROT_MOVE_CW
*/
#define ROT_MOVE_UP (1<<1)
/**
* \def ROT_MOVE_DOWN
* \brief A macro that returns the flag for the \b DOWN direction.
*
* This macro defines the value of the \b DOWN direction which can be
* used with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_DOWN (1<<2)
/**
* \def ROT_MOVE_LEFT
* \brief A macro that returns the flag for the \b LEFT direction.
*
* This macro defines the value of the \b LEFT direction which can be
* used with the rot_move function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_LEFT (1<<3)
/**
* \def ROT_MOVE_CCW
* \brief A macro that returns the flag for the \b counterclockwise direction.
*
* This macro defines the value of the \b counterclockwise direction which
* can be used with the rot_move() function. This value is equivalent to
* ROT_MOVE_LEFT.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_CCW ROT_MOVE_LEFT
/**
* \def ROT_MOVE_RIGHT
* \brief A macro that returns the flag for the \b RIGHT direction.
*
* This macro defines the value of the \b RIGHT direction which can be used
* with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_CW
*/
#define ROT_MOVE_RIGHT (1<<4)
/**
* \def ROT_MOVE_CW
* \brief A macro that returns the flag for the \b clockwise direction.
*
* This macro defines the value of the \b clockwise direction which can be
* used with the rot_move() function. This value is equivalent to
* ROT_MOVE_RIGHT.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_RIGHT
*/
#define ROT_MOVE_CW ROT_MOVE_RIGHT
/**
* \brief Rotator status flags
*/
typedef enum {
ROT_STATUS_NONE = 0, /*!< '' -- No status. */
ROT_STATUS_BUSY = (1 << 0), /*!< Rotator is busy, not accepting commands. */
ROT_STATUS_MOVING = (1 << 1), /*!< Rotator is currently moving (direction type not specified). */
ROT_STATUS_MOVING_AZ = (1 << 2), /*!< Azimuth rotator is currently moving (direction not specified). */
ROT_STATUS_MOVING_LEFT = (1 << 3), /*!< Azimuth rotator is currently moving left. */
ROT_STATUS_MOVING_RIGHT = (1 << 4), /*!< Azimuth rotator is currently moving right. */
ROT_STATUS_MOVING_EL = (1 << 5), /*!< Elevation rotator is currently moving (direction not specified). */
ROT_STATUS_MOVING_UP = (1 << 6), /*!< Elevation rotator is currently moving up. */
ROT_STATUS_MOVING_DOWN = (1 << 7), /*!< Elevation rotator is currently moving down. */
ROT_STATUS_LIMIT_UP = (1 << 8), /*!< The elevation rotator has reached its limit to move up. */
ROT_STATUS_LIMIT_DOWN = (1 << 9), /*!< The elevation rotator has reached its limit to move down.*/
ROT_STATUS_LIMIT_LEFT = (1 << 10), /*!< The azimuth rotator has reached its limit to move left (CCW). */
ROT_STATUS_LIMIT_RIGHT = (1 << 11), /*!< The azimuth rotator has reached its limit to move right (CW). */
ROT_STATUS_OVERLAP_UP = (1 << 12), /*!< The elevation rotator has rotated up past 360 degrees. */
ROT_STATUS_OVERLAP_DOWN = (1 << 13), /*!< The elevation rotator has rotated down past 0 degrees. */
ROT_STATUS_OVERLAP_LEFT = (1 << 14), /*!< The azimuth rotator has rotated left (CCW) past 0 degrees. */
ROT_STATUS_OVERLAP_RIGHT = (1 << 16), /*!< The azimuth rotator has rotated right (CW) past 360 degrees. */
} rot_status_t;
//! @cond Doxygen_Suppress
/* So far only used in tests/sprintflst.c. */
#define ROT_STATUS_N(n) (1u<<(n))
//! @endcond
/**
* \brief Macro for not changing the rotator speed with move() function.
*/
#define ROT_SPEED_NOCHANGE (-1)
/**
* \brief Rotator Level Settings.
*
* Various operating levels supported by a rotator.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_level(), rot_strlevel()
*/
enum rot_level_e {
ROT_LEVEL_NONE = 0, /*!< '' -- No Level. */
ROT_LEVEL_SPEED = (1 << 0), /*!< \c SPEED -- Rotation speed, arg int (default range 1-100 if not specified). */
ROT_LEVEL_63 = CONSTANT_64BIT_FLAG(63), /*!< **Future use**, last level. */
};
//! @cond Doxygen_Suppress
#define ROT_LEVEL_FLOAT_LIST (0)
#define ROT_LEVEL_READONLY_LIST (0)
#define ROT_LEVEL_IS_FLOAT(l) ((l)&ROT_LEVEL_FLOAT_LIST)
#define ROT_LEVEL_SET(l) ((l)&~ROT_LEVEL_READONLY_LIST)
//! @endcond
/** @cond Doxygen_Suppress
* FIXME: The following needs more explanation about how STRING relates
* to this macro.
* @endcond
*/
/**
* \brief Rotator Parameters
*
* Parameters are settings that are not related to core rotator functionality,
* i.e. antenna rotation.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_parm(), rot_strparm()
*/
enum rot_parm_e {
ROT_PARM_NONE = 0, /*!< '' -- No Parm */
};
//! @cond Doxygen_Suppress
#define ROT_PARM_FLOAT_LIST (0)
#define ROT_PARM_READONLY_LIST (0)
#define ROT_PARM_IS_FLOAT(l) ((l)&ROT_PARM_FLOAT_LIST)
#define ROT_PARM_SET(l) ((l)&~ROT_PARM_READONLY_LIST)
//! @endcond
/** @cond Doxygen_Suppress
* FIXME: The following needs more explanation about how STRING relates
* to these macros.
* @endcond
*/
/**
* \brief Rotator Function Settings.
*
* Various operating functions supported by a rotator.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_func(), rot_strfunc()
*/
#define ROT_FUNC_NONE 0 /*!< '' -- No Function */
#ifndef SWIGLUAHIDE
/* Hide the top 32 bits from the old Lua binding as they can't be represented */
#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< **Future use**, ROT_FUNC items. */
/* 63 is this highest bit number that can be used */
#endif
/* Basic rot type, can store some useful info about different rotators. Each
* lib must be able to populate this structure, so we can make useful
* enquiries about capabilities.
*/
/**
* \struct rot_caps
* \brief Rotator capability data structure.
*
* The main idea of this structure is that it will be defined by the backend
* rotator driver, and will remain read-only for the application. Fields that
* need to be modifiable by the application are copied into the rot_state
* structure, which is the private memory area of the #ROT instance.
*
* This way, you can have several rotators running within the same
* application, sharing the rot_caps structure of the backend, while keeping
* their own customized data.
*
* \b Note: Don't move fields around and only add new fields at the end of the
* rot_caps structure. Shared libraries and DLLs depend on a constant
* structure to maintain compatibility.
*/
struct rot_caps {
rot_model_t rot_model; /*!< Rotator model as defined in rotlist.h. */
const char *model_name; /*!< Model name, e.g. TT-360. */
const char *mfg_name; /*!< Manufacturer, e.g. Tower Torquer. */
const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */
const char *copyright; /*!< Copyright info (should be LGPL). */
enum rig_status_e status; /*!< Driver status. */
int rot_type; /*!< Rotator type. */
enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */
int serial_rate_min; /*!< Minimal serial speed. */
int serial_rate_max; /*!< Maximal serial speed. */
int serial_data_bits; /*!< Number of data bits. */
int serial_stop_bits; /*!< Number of stop bits. */
enum serial_parity_e serial_parity; /*!< Parity. */
enum serial_handshake_e serial_handshake; /*!< Handshake. */
int write_delay; /*!< Write delay. */
int post_write_delay; /*!< Post-write delay. */
int timeout; /*!< Timeout. */
int retry; /*!< Number of retries if command fails. */
setting_t has_get_func; /*!< List of get functions. */
setting_t has_set_func; /*!< List of set functions. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
setting_t has_get_parm; /*!< List of get parameters. */
setting_t has_set_parm; /*!< List of set parameters. */
rot_status_t has_status; /*!< Supported status flags. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps). */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps). */
const struct confparams *extparms; /*!< Extension parameters list, \sa rot_ext.c. */
const struct confparams *extlevels; /*!< Extension levels list, \sa rot_ext.c. */
const struct confparams *extfuncs; /*!< Extension functions list, \sa rot_ext.c. */
int *ext_tokens; /*!< Extension token list. */
/*
* Movement range, az is relative to North
* negative values allowed for overlap
*/
azimuth_t min_az; /*!< Lower limit for azimuth (relative to North). */
azimuth_t max_az; /*!< Upper limit for azimuth (relative to North). */
elevation_t
min_el; /*!< Lower limit for elevation. */
elevation_t
max_el; /*!< Upper limit for elevation. */
const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
/*
* Rot Admin API
*
*/
int (*rot_init)(ROT *rot); /*!< Pointer to backend implementation of ::rot_init(). */
int (*rot_cleanup)(ROT *rot); /*!< Pointer to backend implementation of ::rot_cleanup(). */
int (*rot_open)(ROT *rot); /*!< Pointer to backend implementation of ::rot_open(). */
int (*rot_close)(ROT *rot); /*!< Pointer to backend implementation of ::rot_close(). */
int (*set_conf)(ROT *rot, token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */
int (*get_conf)(ROT *rot, token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); /*!< Pointer to backend implementation of ::rot_set_position(). */
int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); /*!< Pointer to backend implementation of ::rot_get_position(). */
int (*stop)(ROT *rot); /*!< Pointer to backend implementation of ::rot_stop(). */
int (*park)(ROT *rot); /*!< Pointer to backend implementation of ::rot_park(). */
int (*reset)(ROT *rot, rot_reset_t reset); /*!< Pointer to backend implementation of ::rot_reset(). */
int (*move)(ROT *rot, int direction, int speed); /*!< Pointer to backend implementation of ::rot_move(). */
/* get firmware info, etc. */
const char * (*get_info)(ROT *rot); /*!< Pointer to backend implementation of ::rot_get_info(). */
int (*set_level)(ROT *rot, setting_t level, value_t val); /*!< Pointer to backend implementation of ::rot_set_level(). */
int (*get_level)(ROT *rot, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::rot_get_level(). */
int (*set_func)(ROT *rot, setting_t func, int status); /*!< Pointer to backend implementation of ::rot_set_func(). */
int (*get_func)(ROT *rot, setting_t func, int *status); /*!< Pointer to backend implementation of ::rot_get_func(). */
int (*set_parm)(ROT *rot, setting_t parm, value_t val); /*!< Pointer to backend implementation of ::rot_set_parm(). */
int (*get_parm)(ROT *rot, setting_t parm, value_t *val); /*!< Pointer to backend implementation of ::rot_get_parm(). */
int (*set_ext_level)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */
int (*get_ext_level)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */
int (*set_ext_func)(ROT *rot, token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */
int (*get_ext_func)(ROT *rot, token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */
int (*set_ext_parm)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */
int (*get_ext_parm)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */
int (*get_status)(ROT *rot, rot_status_t *status); /*!< Pointer to backend implementation of ::rot_get_status(). */
const char *macro_name; /*!< Rotator model macro name. */
};
//! @cond Doxygen_Suppress
#define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg
//! @endcond
/**
* \struct rot_state
* \brief Rotator state structure
*
* This structure contains live data, as well as a copy of capability fields
* that may be updated, i.e. customized while the #ROT handle is instantiated.
*
* It is fine to move fields around, as this kind of structure should not be
* initialized like rot_caps are.
*/
struct rot_state {
/*
* overridable fields
*/
azimuth_t min_az; /*!< Lower limit for azimuth (overridable). */
azimuth_t max_az; /*!< Upper limit for azimuth (overridable). */
elevation_t min_el; /*!< Lower limit for elevation (overridable). */
elevation_t max_el; /*!< Upper limit for elevation (overridable). */
int south_zero; /*!< South is zero degrees. */
azimuth_t az_offset; /*!< Offset to be applied to azimuth. */
elevation_t el_offset; /*!< Offset to be applied to elevation. */
setting_t has_get_func; /*!< List of get functions. */
setting_t has_set_func; /*!< List of set functions. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
setting_t has_get_parm; /*!< List of get parameters. */
setting_t has_set_parm; /*!< List of set parameters. */
rot_status_t has_status; /*!< Supported status flags. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
/*
* non overridable fields, internal use
*/
hamlib_port_t rotport; /*!< Rotator port (internal use). */
hamlib_port_t rotport2; /*!< 2nd Rotator port (internal use). */
int comm_state; /*!< Comm port state, i.e. opened or closed. */
rig_ptr_t priv; /*!< Pointer to private rotator state data. */
rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested. */
/* etc... */
};
/**
* \struct s_rot
* \brief Master rotator structure.
*
* This is the master data structure acting as the #ROT handle for the
* controlled rotator. A pointer to this structure is returned by the
* rot_init() API function and is passed as a parameter to every rotator
* specific API call.
*
* \sa rot_init(), rot_caps, rot_state
*/
struct s_rot {
struct rot_caps *caps; /*!< Rotator caps. */
struct rot_state state; /*!< Rotator state. */
};
//! @cond Doxygen_Suppress
/* --------------- API function prototypes -----------------*/
extern HAMLIB_EXPORT(ROT *)
rot_init HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_open HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_close HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_cleanup HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_set_conf HAMLIB_PARAMS((ROT *rot,
token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
rot_get_conf HAMLIB_PARAMS((ROT *rot,
token_t token,
char *val));
/*
* General API commands, from most primitive to least.. )
* List Set/Get functions pairs
*/
extern HAMLIB_EXPORT(int)
rot_set_position HAMLIB_PARAMS((ROT *rot,
azimuth_t azimuth,
elevation_t elevation));
extern HAMLIB_EXPORT(int)
rot_get_position HAMLIB_PARAMS((ROT *rot,
azimuth_t *azimuth,
elevation_t *elevation));
extern HAMLIB_EXPORT(int)
rot_stop HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_park HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_reset HAMLIB_PARAMS((ROT *rot,
rot_reset_t reset));
extern HAMLIB_EXPORT(int)
rot_move HAMLIB_PARAMS((ROT *rot,
int direction,
int speed));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_level HAMLIB_PARAMS((ROT *rot,
setting_t level));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_level HAMLIB_PARAMS((ROT *rot,
setting_t level));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_parm HAMLIB_PARAMS((ROT *rot,
setting_t parm));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_parm HAMLIB_PARAMS((ROT *rot,
setting_t parm));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_func HAMLIB_PARAMS((ROT *rot,
setting_t func));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_func HAMLIB_PARAMS((ROT *rot,
setting_t func));
extern HAMLIB_EXPORT(int)
rot_set_func HAMLIB_PARAMS((ROT *rot,
setting_t func,
int status));
extern HAMLIB_EXPORT(int)
rot_get_func HAMLIB_PARAMS((ROT *rot,
setting_t func,
int *status));
extern HAMLIB_EXPORT(int)
rot_set_level HAMLIB_PARAMS((ROT *rig,
setting_t level,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_level HAMLIB_PARAMS((ROT *rig,
setting_t level,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_parm HAMLIB_PARAMS((ROT *rig,
setting_t parm,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_parm HAMLIB_PARAMS((ROT *rig,
setting_t parm,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_ext_level HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_ext_level HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_ext_func HAMLIB_PARAMS((ROT *rig,
token_t token,
int status));
extern HAMLIB_EXPORT(int)
rot_get_ext_func HAMLIB_PARAMS((ROT *rig,
token_t token,
int *status));
extern HAMLIB_EXPORT(int)
rot_set_ext_parm HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_ext_parm HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(const char *)
rot_get_info HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_get_status HAMLIB_PARAMS((ROT *rot,
rot_status_t *status));
extern HAMLIB_EXPORT(int)
rot_register HAMLIB_PARAMS((const struct rot_caps *caps));
extern HAMLIB_EXPORT(int)
rot_unregister HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rot_caps *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
rot_check_backend HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(rot_model_t)
rot_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int)
rot_token_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rot_confparam_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(token_t)
rot_token_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(int)
rot_ext_func_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_ext_level_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_ext_parm_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rot_ext_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(const struct confparams *)
rot_ext_lookup_tok HAMLIB_PARAMS((ROT *rot,
token_t token));
extern HAMLIB_EXPORT(token_t)
rot_ext_token_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(const struct rot_caps *)
rot_get_caps HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
qrb HAMLIB_PARAMS((double lon1,
double lat1,
double lon2,
double lat2,
double *distance,
double *azimuth));
extern HAMLIB_EXPORT(double)
distance_long_path HAMLIB_PARAMS((double distance));
extern HAMLIB_EXPORT(double)
azimuth_long_path HAMLIB_PARAMS((double azimuth));
extern HAMLIB_EXPORT(int)
longlat2locator HAMLIB_PARAMS((double longitude,
double latitude,
char *locator_res,
int pair_count));
extern HAMLIB_EXPORT(int)
locator2longlat HAMLIB_PARAMS((double *longitude,
double *latitude,
const char *locator));
extern HAMLIB_EXPORT(double)
dms2dec HAMLIB_PARAMS((int degrees,
int minutes,
double seconds,
int sw));
extern HAMLIB_EXPORT(int)
dec2dms HAMLIB_PARAMS((double dec,
int *degrees,
int *minutes,
double *seconds,
int *sw));
extern HAMLIB_EXPORT(int)
dec2dmmm HAMLIB_PARAMS((double dec,
int *degrees,
double *minutes,
int *sw));
extern HAMLIB_EXPORT(double)
dmmm2dec HAMLIB_PARAMS((int degrees,
double minutes,
double seconds,
int sw));
extern HAMLIB_EXPORT(setting_t) rot_parse_func(const char *s);
extern HAMLIB_EXPORT(setting_t) rot_parse_level(const char *s);
extern HAMLIB_EXPORT(setting_t) rot_parse_parm(const char *s);
extern HAMLIB_EXPORT(const char *) rot_strfunc(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strlevel(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strparm(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strstatus(rot_status_t);
//! @endcond
/**
* \def rot_debug
* \brief Convenience macro for generating debugging messages.
*
* This is an alias of the rig_debug() function call and is used in the same
* manner.
*/
#define rot_debug rig_debug
__END_DECLS
#endif /* _ROTATOR_H */
/** @} */

View File

@ -1,637 +0,0 @@
/*
* Hamlib Interface - list of known rotators
* Copyright (c) 2000-2011 by Stephane Fillod
* Copyright (c) 2000-2002 by Frank Singleton
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef _ROTLIST_H
#define _ROTLIST_H 1
//! @cond Doxygen_Suppress
#define ROT_MAKE_MODEL(a,b) ((a)*100+(b))
#define ROT_BACKEND_NUM(a) ((a)/100)
//! @endcond
/**
* \addtogroup rotator
* @{
*/
/**
* \file rotlist.h
* \brief Hamlib rotator model definitions.
*
* This file contains rotator model definitions for the Hamlib rotator
* Application Programming Interface (API). Each distinct rotator type has a
* unique model number (ID) and is used by Hamlib to identify and distinguish
* between the different hardware drivers. The exact model numbers can be
* acquired using the macros in this file. To obtain a list of supported
* rotator branches, one can use the statically defined ROT_BACKEND_LIST macro
* (defined in configure.ac). To obtain a full list of supported rotators
* (including each model in every branch), the foreach_opened_rot() API
* function can be used.
*
* The model number, or ID, is used to tell Hamlib which rotator the client
* wishes to use which is done with the rot_init() API call.
*/
/**
* \def ROT_MODEL_NONE
* \brief A macro that returns the model number for an unknown model.
*
* The none backend, as the name suggests, does nothing. It is mainly for
* internal use.
*/
#define ROT_MODEL_NONE 0
/**
* \brief A macro that returns the model number for the DUMMY backend.
*
* \def ROT_MODEL_DUMMY
*
* The DUMMY backend, as the name suggests, is a backend which performs
* no hardware operations and always behaves as one would expect. It can
* be thought of as a hardware simulator and is very useful for testing
* client applications.
*/
/**
* \brief A macro that returns the model number for the NETROTCTL backend.
*
* \def ROT_MODEL_NETROTCTL
*
* The NETROTCTL backend allows use of the `rotctld` daemon through the normal
* Hamlib API.
*/
//! @cond Doxygen_Suppress
#define ROT_DUMMY 0
#define ROT_BACKEND_DUMMY "dummy"
//! @endcond
#define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1)
#define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2)
/**
* \brief A macro that returns the model number of the EASYCOMM 1 backend.
*
* \def ROT_MODEL_EASYCOMM1
*
* The EASYCOMM1 backend can be used with rotators that support the EASYCOMM
* I Standard.
*/
/**
* \brief A macro that returns the model number of the EASYCOMM 2 backend.
*
* \def ROT_MODEL_EASYCOMM2
*
* The EASYCOMM2 backend can be used with rotators that support the EASYCOMM
* II Standard.
*/
/**
* \brief A macro that returns the model number of the EASYCOMM 3 backend.
*
* \def ROT_MODEL_EASYCOMM3
*
* The EASYCOMM3 backend can be used with rotators that support the EASYCOMM
* III Standard.
*/
//! @cond Doxygen_Suppress
#define ROT_EASYCOMM 2
#define ROT_BACKEND_EASYCOMM "easycomm"
//! @endcond
#define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1)
#define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2)
#define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4)
/**
* \brief A macro that returns the model number of the FODTRACK backend.
*
* \def ROT_MODEL_FODTRACK
*
* The FODTRACK backend can be used with rotators that support the FODTRACK
* Standard.
*/
//! @cond Doxygen_Suppress
#define ROT_FODTRACK 3
#define ROT_BACKEND_FODTRACK "fodtrack"
//! @endcond
#define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1)
/**
* \brief A macro that returns the model number of the ROTOREZ backend.
*
* \def ROT_MODEL_ROTOREZ
*
* The ROTOREZ backend can be used with Hy-Gain rotators that support the
* extended DCU command set by the Idiom Press Rotor-EZ board.
*/
/**
* \brief A macro that returns the model number of the ROTORCARD backend.
*
* \def ROT_MODEL_ROTORCARD
*
* The ROTORCARD backend can be used with Yaesu rotators that support the
* extended DCU command set by the Idiom Press Rotor Card board.
*/
/**
* \brief A macro that returns the model number of the DCU backend.
*
* \def ROT_MODEL_DCU
*
* The DCU backend can be used with rotators that support the DCU command set
* by Hy-Gain (currently the DCU-1).
*/
/**
* \brief A macro that returns the model number of the ERC backend.
*
* \def ROT_MODEL_ERC
*
* The ERC backend can be used with rotators that support the DCU command set
* by DF9GR (currently the ERC).
*/
/**
* \brief A macro that returns the model number of the RT21 backend.
*
* \def ROT_MODEL_RT21
*
* The RT21 backend can be used with rotators that support the DCU command set
* by Green Heron (currently the RT-21).
*/
//! @cond Doxygen_Suppress
#define ROT_ROTOREZ 4
#define ROT_BACKEND_ROTOREZ "rotorez"
//! @endcond
#define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1)
#define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2)
#define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3)
#define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4)
#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)
/**
* \brief A macro that returns the model number of the SARTEK1 backend.
*
* \def ROT_MODEL_SARTEK1
*
* The SARTEK1 backend can be used with rotators that support the SARtek
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_SARTEK 5
#define ROT_BACKEND_SARTEK "sartek"
//! @endcond
#define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1)
/**
* \brief A macro that returns the model number of the GS232A backend.
*
* \def ROT_MODEL_GS232A
*
* The GS232A backend can be used with rotators that support the GS-232A
* protocol.
*/
/**
* \brief A macro that returns the model number of the GS232 backend.
*
* \def ROT_MODEL_GS232_GENERIC
*
* The GS232_GENERIC backend can be used with rotators that support the
* generic (even if not coded correctly) GS-232 protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B backend.
*
* \def ROT_MODEL_GS232B
*
* The GS232B backend can be used with rotators that support the GS232B
* protocol.
*/
/**
* \brief A macro that returns the model number of the F1TETRACKER backend.
*
* \def ROT_MODEL_F1TETRACKER
*
* The F1TETRACKER backend can be used with rotators that support the F1TE
* Tracker protocol.
*/
/**
* \brief A macro that returns the model number of the GS23 backend.
*
* \def ROT_MODEL_GS23
*
* The GS23 backend can be used with rotators that support the GS-23 protocol.
*/
/**
* \brief A macro that returns the model number of the GS232 backend.
*
* \def ROT_MODEL_GS232
*
* The GS232 backend can be used with rotators that support the GS-232
* protocol.
*/
/**
* \brief A macro that returns the model number of the LVB backend.
*
* \def ROT_MODEL_LVB
*
* The LVB backend can be used with rotators that support the G6LVB AMSAT LVB
* Tracker GS-232 based protocol.
*/
/**
* \brief A macro that returns the model number of the ST2 backend.
*
* \def ROT_MODEL_ST2
*
* The ST2 backend can be used with rotators that support the Fox Delta ST2
* GS-232 based protocol.
*/
/**
* \brief A macro that returns the model number of the GS232A_AZ Azimuth backend.
*
* \def ROT_MODEL_GS232A_AZ
*
* The GS232A_AZ backend can be used with azimuth rotators that support the
* GS-232A protocol.
*/
/**
* \brief A macro that returns the model number of the GS232A_EL Elevation backend.
*
* \def ROT_MODEL_GS232A_EL
*
* The GS232A_EL backend can be used with elevation rotators that support the
* GS-232A protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B_AZ Azimuth backend.
*
* \def ROT_MODEL_GS232B_AZ
*
* The GS232B_AZ backend can be used with azimuth rotators that support the
* GS-232B protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B_EL Elevation backend.
*
* \def ROT_MODEL_GS232B_EL
*
* The GS232B_EL backend can be used with elevation rotators that support the
* GS-232B protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_GS232A 6
#define ROT_BACKEND_GS232A "gs232a"
//! @endcond
#define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1)
#define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */
#define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3)
#define ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4)
#define ROT_MODEL_GS23 ROT_MAKE_MODEL(ROT_GS232A, 5)
#define ROT_MODEL_GS232 ROT_MAKE_MODEL(ROT_GS232A, 6) /* Not A or B */
#define ROT_MODEL_LVB ROT_MAKE_MODEL(ROT_GS232A, 7)
#define ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8)
#define ROT_MODEL_GS232A_AZ ROT_MAKE_MODEL(ROT_GS232A, 9)
#define ROT_MODEL_GS232A_EL ROT_MAKE_MODEL(ROT_GS232A, 10)
#define ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11)
#define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12)
/**
* \brief A macro that returns the model number of the PCROTOR backend.
*
* \def ROT_MODEL_PCROTOR
*
* The PCROTOR backend is a member of the kit backend group that can be used
* with home brewed rotators.
*/
//! @cond Doxygen_Suppress
#define ROT_KIT 7
#define ROT_BACKEND_KIT "kit"
//! @endcond
#define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1)
/**
* \brief A macro that returns the model number of the HD1780 backend.
*
* \def ROT_MODEL_HD1780
*
* The HD1780 backend can be used with rotators that support the Heathkit
* HD-1780 protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_HEATHKIT 8
#define ROT_BACKEND_HEATHKIT "heathkit"
//! @endcond
#define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1)
/**
* \brief A macro that returns the model number of the ROT2PROG backend.
*
* \def ROT_MODEL_SPID_ROT2PROG
*
* The SPID_ROT2PROG backend can be used with rotators that support the SPID
* azimuth and elevation protocol.
*/
/**
* \brief A macro that returns the model number of the ROT1PROG backend.
*
* \def ROT_MODEL_SPID_ROT1PROG
*
* The SPID_ROT1PROG backend can be used with rotators that support the SPID
* azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the SPID_MD01_ROT2PROG backend.
*
* \def ROT_MODEL_SPID_MD01_ROT2PROG
*
* The SPID_MD01_ROT2PROG backend can be used with rotators that support the
* extended SPID ROT2PROG azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_SPID 9
#define ROT_BACKEND_SPID "spid"
//! @endcond
#define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1)
#define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2)
#define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3)
/**
* \brief A macro that returns the model number of the RC2800 backend.
*
* \def ROT_MODEL_RC2800
*
* The RC2800 backend can be used with rotators that support the M2 (M
* Squared) RC2800 protocol.
*/
/**
* \brief A macro that returns the model number of the RC2800_EARLY_AZ
* backend.
*
* \def ROT_MODEL_RC2800_EARLY_AZ
*
* The RC2800_EARLY_AZ backend can be used with rotators that support the M2
* (M Squared) RC2800 early azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the RC2800_EARLY_AZEL
* backend.
*
* \def ROT_MODEL_RC2800_EARLY_AZEL
*
* The RC2800_EARLY_AZEL backend can be used with rotators that support the M2
* (M Squared) RC2800 early azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_M2 10
#define ROT_BACKEND_M2 "m2"
//! @endcond
#define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1)
#define ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2)
#define ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3)
/**
* \brief A macro that returns the model number of the RCI_AZEL backend.
*
* \def ROT_MODEL_RCI_AZEL
*
* The RCI_AZEL backend can be used with rotators that support the ARS azimuth
* and elevation protocol.
*/
/**
* \brief A macro that returns the model number of the RCI_AZ backend.
*
* \def ROT_MODEL_RCI_AZ
*
* The RCI_AZ backend can be used with rotators that support the ARS azimuth
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_ARS 11
#define ROT_BACKEND_ARS "ars"
//! @endcond
#define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1)
#define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2)
/**
* \brief A macro that returns the model number of the IF100 backend.
*
* \def ROT_MODEL_IF100
*
* The IF100 backend can be used with rotators that support the AMSAT IF-100
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_AMSAT 12
#define ROT_BACKEND_AMSAT "amsat"
//! @endcond
#define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1)
/**
* \brief A macro that returns the model number of the TS7400 backend.
*
* \def ROT_MODEL_TS7400
*
* The TS7400 backend supports an embedded ARM board using the TS-7400 Linux
* board. More information is at https://www.embeddedarm.com
*/
//! @cond Doxygen_Suppress
#define ROT_TS7400 13
#define ROT_BACKEND_TS7400 "ts7400"
//! @endcond
#define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1)
/**
* \brief A macro that returns the model number of the NEXSTAR backend.
*
* \def ROT_MODEL_NEXSTAR
*
* The NEXSTAR backend can be used with rotators that support the Celestron
* NexStar protocol and alike.
*/
//! @cond Doxygen_Suppress
#define ROT_CELESTRON 14
#define ROT_BACKEND_CELESTRON "celestron"
//! @endcond
#define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1)
/**
* \brief A macro that returns the model number of the ETHER6 backend.
*
* \def ROT_MODEL_ETHER6
*
* The ETHER6 backend can be used with rotators that support the Ether6
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_ETHER6 15
#define ROT_BACKEND_ETHER6 "ether6"
//! @endcond
#define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1)
/**
* \brief A macro that returns the model number of the CNCTRK backend.
*
* \def ROT_MODEL_CNCTRK
*
* The CNCTRK backend can be used with rotators that support the LinuxCNC
* running Axis GUI interface.
*/
//! @cond Doxygen_Suppress
#define ROT_CNCTRK 16
#define ROT_BACKEND_CNCTRK "cnctrk"
//! @endcond
#define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1)
/**
* \brief A macro that returns the model number of the PROSISTEL_D_AZ backend.
*
* \def ROT_MODEL_PROSISTEL_D_AZ
*
* The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel
* azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the PROSISTEL_D_EL backend.
*
* \def ROT_MODEL_PROSISTEL_D_EL
*
* The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel
* elevation protocol.
*/
/**
* \brief A macro that returns the model number of the
* PROSISTEL_COMBI_TRACK_AZEL backend.
*
* \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL
*
* The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that
* support the Prosistel combination azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_PROSISTEL 17
#define ROT_BACKEND_PROSISTEL "prosistel"
//! @endcond
#define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1)
#define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2)
#define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3)
/**
* \brief A macro that returns the model number of the MEADE backend.
*
* \def ROT_MODEL_MEADE
*
* The MEADE backend can be used with Meade telescope rotators like the
* DS-2000.
*/
//! @cond Doxygen_Suppress
#define ROT_MEADE 18
#define ROT_BACKEND_MEADE "meade"
//! @endcond
#define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1)
/**
* \brief A macro that returns the model number of the IOPTRON backend.
*
* \def ROT_MODEL_IOPTRON
*
* The IOPTRON backend can be used with IOPTRON telescope mounts.
*/
//! @cond Doxygen_Suppress
#define ROT_IOPTRON 19
#define ROT_BACKEND_IOPTRON "ioptron"
//! @endcond
#define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1)
/**
* \brief A macro that returns the model number of the INDI backend.
*
* \def ROT_MODEL_INDI
*
* The INDI backend can be used with rotators that support the INDI interface.
*/
//! @cond Doxygen_Suppress
#define ROT_INDI 20
#define ROT_BACKEND_INDI "indi"
//! @endcond
#define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1)
/**
* \brief A macro that returns the model number of the SATEL backend.
*
* \def ROT_MODEL_SATEL
*
* The SATEL backend can be used with rotators that support the VE5FP
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_SATEL 21
#define ROT_BACKEND_SATEL "satel"
//! @endcond
#define ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1)
/**
* \brief A macro that returns the model number of the RADANT backend.
*
* \def ROT_MODEL_RADANT
*
* The RADANT backend can be used with rotators that support the MS232
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_RADANT 22
#define ROT_BACKEND_RADANT "radant"
//! @endcond
#define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1)
#define ROT_ANDROIDSENSOR 23
#define ROT_BACKEND_ANDROIDSENSOR "androidsensor"
#define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1)
/**
* \brief Convenience type definition for a rotator model.
*
* \typedef typedef int rot_model_t
*/
typedef int rot_model_t;
#endif /* _ROTLIST_H */
/** @} */

View File

@ -1,11 +0,0 @@
- Building libliquid.dll and libliquid.a:
-----------------------------------------
- Install the Msys2 distribution as described on their site (https://msys2.github.io/)
- Add mingw32 and mingw64 compiler to the Msys2 installation.
- Copy config.h, makefile.mingw32, makefile.mingw64 in the liquid-dsp root directory.
- Run a Msys2 Win32 shell (mingw32.exe) and execute 'make -f makefile.mingw32 -j clean' then 'make -f makefile.mingw32 -j' to compile a libliquid.dll 32bit Windows Dll.
- Run a Msys2 Win64 shell (mingw64.exe) and execute 'make -f makefile.mingw64 -j clean' then 'make -f makefile.mingw64 -j' to compile a libliquid.dll 64bit Windows Dll.
This process generates a .dll, .a together with libliquid.def the listing exported functions, and libliquid.lib the import lib matching the dll.
In order to develop with Visual Studio, you need both the include/liquid.h at source level, and the libliquid.lib import library referenced in your project.

View File

@ -1,290 +0,0 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
#ifndef __LIQUID_CONFIG_H__
#define __LIQUID_CONFIG_H__
/* Define to 1 to support Advanced Bit Manipulation */
#define HAVE_ABM 1
/* Define to 1 to support Multi-Precision Add-Carry Instruction Extensions */
#define HAVE_ADX 1
/* Define to 1 to support Advanced Encryption Standard New Instruction Set
(AES-NI) */
/* #define HAVE_AES 1 */
/* Support Altivec instructions */
/* #undef HAVE_ALTIVEC */
/* Define to 1 to support Advanced Vector Extensions */
/* #define HAVE_AVX 1 */
/* Define to 1 to support Advanced Vector Extensions 2 */
/* #define HAVE_AVX2 1 */
/* Define to 1 to support AVX-512 Byte and Word Instructions */
/* #undef HAVE_AVX512_BW */
/* Define to 1 to support AVX-512 Conflict Detection Instructions */
/* #undef HAVE_AVX512_CD */
/* Define to 1 to support AVX-512 Doubleword and Quadword Instructions */
/* #undef HAVE_AVX512_DQ */
/* Define to 1 to support AVX-512 Exponential & Reciprocal Instructions */
/* #undef HAVE_AVX512_ER */
/* Define to 1 to support AVX-512 Foundation Extensions */
/* #undef HAVE_AVX512_F */
/* Define to 1 to support AVX-512 Integer Fused Multiply Add Instructions */
/* #undef HAVE_AVX512_IFMA */
/* Define to 1 to support AVX-512 Conflict Prefetch Instructions */
/* #undef HAVE_AVX512_PF */
/* Define to 1 to support AVX-512 Vector Byte Manipulation Instructions */
/* #undef HAVE_AVX512_VBMI */
/* Define to 1 to support AVX-512 Vector Length Extensions */
/* #undef HAVE_AVX512_VL */
/* Define to 1 to support Bit Manipulation Instruction Set 1 */
#define HAVE_BMI1 1
/* Define to 1 to support Bit Manipulation Instruction Set 2 */
#define HAVE_BMI2 1
/* Define to 1 if you have the `cargf' function. */
#define HAVE_CARGF 1
/* Define to 1 if you have the `cexpf' function. */
#define HAVE_CEXPF 1
/* Define to 1 if you have the `cimagf' function. */
#define HAVE_CIMAGF 1
/* Define to 1 if you have the <complex.h> header file. */
#define HAVE_COMPLEX_H 1
/* Define to 1 if you have the `cosf' function. */
#define HAVE_COSF 1
/* Define to 1 if you have the `crealf' function. */
#define HAVE_CREALF 1
/* Define to 1 if you have the `expf' function. */
#define HAVE_EXPF 1
/* Define to 1 if you have the <fec.h> header file. */
/* #undef HAVE_FEC_H */
/* Define to 1 if you have the <fftw3.h> header file. */
/* #undef HAVE_FFTW3_H */
/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1
/* Define to 1 to support Fused Multiply-Add Extensions 3 */
#define HAVE_FMA3 1
/* Define to 1 to support Fused Multiply-Add Extensions 4 */
/* #undef HAVE_FMA4 */
/* Define to 1 if you have the `free' function. */
#define HAVE_FREE 1
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `c' library (-lc). */
#define HAVE_LIBC 1
/* Define to 1 if you have the `fec' library (-lfec). */
/* #undef HAVE_LIBFEC */
/* Define to 1 if you have the `fftw3f' library (-lfftw3f). */
/* #undef HAVE_LIBFFTW3F */
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the `malloc' function. */
#define HAVE_MALLOC 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 to support Multimedia Extensions */
#define HAVE_MMX 1
/* Define to 1 to support Memory Protection Extensions */
/* #undef HAVE_MPX */
/* Define to 1 to support Prefetch Vector Data Into Caches WT1 */
/* #undef HAVE_PREFETCHWT1 */
/* Define to 1 to support Digital Random Number Generator */
#define HAVE_RDRND 1
/* Define to 1 if you have the `realloc' function. */
#define HAVE_REALLOC 1
/* Define to 1 to support Secure Hash Algorithm Extension */
/* #undef HAVE_SHA */
/* Define to 1 if you have the `sinf' function. */
#define HAVE_SINF 1
/* Define to 1 if you have the `sqrtf' function. */
#define HAVE_SQRTF 1
/* Define to 1 to support Streaming SIMD Extensions */
#define HAVE_SSE 1
/* Define to 1 to support Streaming SIMD Extensions */
#define HAVE_SSE2 1
/* Define to 1 to support Streaming SIMD Extensions 3 */
#define HAVE_SSE3 1
/* Define to 1 to support Streaming SIMD Extensions 4.1 */
#define HAVE_SSE4_1 1
/* Define to 1 to support Streaming SIMD Extensions 4.2 */
#define HAVE_SSE4_2 1
/* Define to 1 to support AMD Streaming SIMD Extensions 4a */
/* #undef HAVE_SSE4a */
/* Define to 1 to support Supplemental Streaming SIMD Extensions 3 */
#define HAVE_SSSE3 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Support VSX instructions */
/* #undef HAVE_VSX */
/* Define to 1 to support eXtended Operations Extensions */
/* #undef HAVE_XOP */
/* Force internal FFT even if libfftw is available */
#undef LIQUID_FFTOVERRIDE
/* Force overriding of SIMD (use portable C code) */
/* #undef LIQUID_SIMDOVERRIDE */
/* Enable strict program exit on error */
/* #undef LIQUID_STRICT_EXIT */
/* Suppress printing errors to stderr */
/* #undef LIQUID_SUPPRESS_ERROR_OUTPUT */
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "joseph@liquidsdr.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "liquid-dsp"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "liquid-dsp 1.5"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "liquid-dsp"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.5"
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long int', as computed by sizeof. */
#define SIZEOF_LONG_INT 8
/* The size of `long long int', as computed by sizeof. */
#define SIZEOF_LONG_LONG_INT 8
/* The size of `short int', as computed by sizeof. */
#define SIZEOF_SHORT_INT 2
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
/* #undef _UINT32_T */
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
/* #undef _UINT8_T */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */
/* Define to rpl_realloc if the replacement function should be used. */
/* #undef realloc */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to the type of an unsigned integer type of width exactly 32 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint32_t */
/* Define to the type of an unsigned integer type of width exactly 8 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint8_t */
#endif // __LIQUID_CONFIG_H__

Binary file not shown.

1871
external/liquid-dsp/gcc/32/libliquid.def vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

1871
external/liquid-dsp/gcc/64/libliquid.def vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
external/liquid-dsp/msvc/32/libliquid.a vendored Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
external/liquid-dsp/msvc/64/libliquid.a vendored Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/*
LodePNG version 20180819
LodePNG version 20141130
Copyright (c) 2005-2018 Lode Vandevenne
Copyright (c) 2005-2014 Lode Vandevenne
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -28,7 +28,12 @@ freely, subject to the following restrictions:
#include <string.h> /*for size_t*/
extern const char* LODEPNG_VERSION_STRING;
#ifdef __cplusplus
#include <vector>
#include <string>
#endif /*__cplusplus*/
#define LODEPNG_VERSION_STRING "20141130"
/*
The following #defines are used to create code sections. They can be disabled
@ -36,8 +41,6 @@ to disable code sections, which can give faster compile time and smaller binary.
The "NO_COMPILE" defines are designed to be used to pass as defines to the
compiler command to disable them without modifying this header, e.g.
-DLODEPNG_NO_COMPILE_ZLIB for gcc.
In addition to those below, you can also define LODEPNG_NO_COMPILE_CRC to
allow implementing a custom lodepng_crc32.
*/
/*deflate & zlib. If disabled, you must specify alternative zlib functions in
the custom_zlib field of the compress and decompress settings*/
@ -81,11 +84,6 @@ source files with custom allocators.*/
#endif
#endif
#ifdef LODEPNG_COMPILE_CPP
#include <vector>
#include <string>
#endif /*LODEPNG_COMPILE_CPP*/
#ifdef LODEPNG_COMPILE_PNG
/*The PNG color types (also used for raw).*/
typedef enum LodePNGColorType
@ -215,8 +213,8 @@ Same as the other decode functions, but instead takes a filename as input.
unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h,
const std::string& filename,
LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8);
#endif /* LODEPNG_COMPILE_DISK */
#endif /* LODEPNG_COMPILE_DECODER */
#endif //LODEPNG_COMPILE_DISK
#endif //LODEPNG_COMPILE_DECODER
#ifdef LODEPNG_COMPILE_ENCODER
/*Same as lodepng_encode_memory, but encodes to an std::vector. colortype
@ -239,9 +237,9 @@ unsigned encode(const std::string& filename,
unsigned encode(const std::string& filename,
const std::vector<unsigned char>& in, unsigned w, unsigned h,
LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8);
#endif /* LODEPNG_COMPILE_DISK */
#endif /* LODEPNG_COMPILE_ENCODER */
} /* namespace lodepng */
#endif //LODEPNG_COMPILE_DISK
#endif //LODEPNG_COMPILE_ENCODER
} //namespace lodepng
#endif /*LODEPNG_COMPILE_CPP*/
#endif /*LODEPNG_COMPILE_PNG*/
@ -255,7 +253,6 @@ const char* lodepng_error_text(unsigned code);
typedef struct LodePNGDecompressSettings LodePNGDecompressSettings;
struct LodePNGDecompressSettings
{
/* Check LodePNGDecoderSettings for more ignorable errors such as ignore_crc */
unsigned ignore_adler32; /*if 1, continue and don't give an error message if the Adler32 checksum is corrupted*/
/*use custom zlib decoder instead of built in one (default: null)*/
@ -410,35 +407,23 @@ typedef struct LodePNGInfo
/*header (IHDR), palette (PLTE) and transparency (tRNS) chunks*/
unsigned compression_method;/*compression method of the original file. Always 0.*/
unsigned filter_method; /*filter method of the original file*/
unsigned interlace_method; /*interlace method of the original file: 0=none, 1=Adam7*/
unsigned interlace_method; /*interlace method of the original file*/
LodePNGColorMode color; /*color type and bits, palette and transparency of the PNG file*/
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
/*
Suggested background color chunk (bKGD)
suggested background color chunk (bKGD)
This color uses the same color mode as the PNG (except alpha channel), which can be 1-bit to 16-bit.
This uses the same color mode and bit depth as the PNG (except no alpha channel),
with values truncated to the bit depth in the unsigned integer.
For greyscale PNGs, r, g and b will all 3 be set to the same. When encoding
the encoder writes the red one. For palette PNGs: When decoding, the RGB value
will be stored, not a palette index. But when encoding, specify the index of
the palette in background_r, the other two are then ignored.
For greyscale and palette PNGs, the value is stored in background_r. The values
in background_g and background_b are then unused.
So when decoding, you may get these in a different color mode than the one you requested
for the raw pixels.
When encoding with auto_convert, you must use the color model defined in info_png.color for
these values. The encoder normally ignores info_png.color when auto_convert is on, but will
use it to interpret these values (and convert copies of them to its chosen color model).
When encoding, avoid setting this to an expensive color, such as a non-grey value
when the image is grey, or the compression will be worse since it will be forced to
write the PNG with a more expensive color mode (when auto_convert is on).
The decoder does not use this background color to edit the color of pixels. This is a
completely optional metadata feature.
The decoder does not use this background color to edit the color of pixels.
*/
unsigned background_defined; /*is a suggested background color given?*/
unsigned background_r; /*red/grey/palette component of suggested background color*/
unsigned background_r; /*red component of suggested background color*/
unsigned background_g; /*green component of suggested background color*/
unsigned background_b; /*blue component of suggested background color*/
@ -449,10 +434,6 @@ typedef struct LodePNGInfo
text_strings, while text_keys are keywords that give a short description what
the actual text represents, e.g. Title, Author, Description, or anything else.
All the string fields below including keys, names and language tags are null terminated.
The PNG specification uses null characters for the keys, names and tags, and forbids null
characters to appear in the main text which is why we can use null termination everywhere here.
A keyword is minimum 1 character and maximum 79 characters long. It's
discouraged to use a single line length longer than 79 characters for texts.
@ -485,86 +466,11 @@ typedef struct LodePNGInfo
unsigned phys_unit; /*may be 0 (unknown unit) or 1 (metre)*/
/*
Color profile related chunks: gAMA, cHRM, sRGB, iCPP
LodePNG does not apply any color conversions on pixels in the encoder or decoder and does not interpret these color
profile values. It merely passes on the information. If you wish to use color profiles and convert colors, please
use these values with a color management library.
See the PNG, ICC and sRGB specifications for more information about the meaning of these values.
*/
/* gAMA chunk: optional, overridden by sRGB or iCCP if those are present. */
unsigned gama_defined; /* Whether a gAMA chunk is present (0 = not present, 1 = present). */
unsigned gama_gamma; /* Gamma exponent times 100000 */
/* cHRM chunk: optional, overridden by sRGB or iCCP if those are present. */
unsigned chrm_defined; /* Whether a cHRM chunk is present (0 = not present, 1 = present). */
unsigned chrm_white_x; /* White Point x times 100000 */
unsigned chrm_white_y; /* White Point y times 100000 */
unsigned chrm_red_x; /* Red x times 100000 */
unsigned chrm_red_y; /* Red y times 100000 */
unsigned chrm_green_x; /* Green x times 100000 */
unsigned chrm_green_y; /* Green y times 100000 */
unsigned chrm_blue_x; /* Blue x times 100000 */
unsigned chrm_blue_y; /* Blue y times 100000 */
/*
sRGB chunk: optional. May not appear at the same time as iCCP.
If gAMA is also present gAMA must contain value 45455.
If cHRM is also present cHRM must contain respectively 31270,32900,64000,33000,30000,60000,15000,6000.
*/
unsigned srgb_defined; /* Whether an sRGB chunk is present (0 = not present, 1 = present). */
unsigned srgb_intent; /* Rendering intent: 0=perceptual, 1=rel. colorimetric, 2=saturation, 3=abs. colorimetric */
/*
iCCP chunk: optional. May not appear at the same time as sRGB.
LodePNG does not parse or use the ICC profile (except its color space header field for an edge case), a
separate library to handle the ICC data (not included in LodePNG) format is needed to use it for color
management and conversions.
For encoding, if iCCP is present, gAMA and cHRM are recommended to be added as well with values that match the ICC
profile as closely as possible, if you wish to do this you should provide the correct values for gAMA and cHRM and
enable their '_defined' flags since LodePNG will not automatically compute them from the ICC profile.
For encoding, the ICC profile is required by the PNG specification to be an "RGB" profile for non-grey
PNG color types and a "GRAY" profile for grey PNG color types. If you disable auto_convert, you must ensure
the ICC profile type matches your requested color type, else the encoder gives an error. If auto_convert is
enabled (the default), and the ICC profile is not a good match for the pixel data, this will result in an encoder
error if the pixel data has non-grey pixels for a GRAY profile, or a silent less-optimal compression of the pixel
data if the pixels could be encoded as greyscale but the ICC profile is RGB.
To avoid this do not set an ICC profile in the image unless there is a good reason for it, and when doing so
make sure you compute it carefully to avoid the above problems.
*/
unsigned iccp_defined; /* Whether an iCCP chunk is present (0 = not present, 1 = present). */
char* iccp_name; /* Null terminated string with profile name, 1-79 bytes */
/*
The ICC profile in iccp_profile_size bytes.
Don't allocate this buffer yourself. Use the init/cleanup functions
correctly and use lodepng_set_icc and lodepng_clear_icc.
*/
unsigned char* iccp_profile;
unsigned iccp_profile_size; /* The size of iccp_profile in bytes */
/* End of color profile related chunks */
/*
unknown chunks: chunks not known by LodePNG, passed on byte for byte.
There are 3 buffers, one for each position in the PNG where unknown chunks can appear.
Each buffer contains all unknown chunks for that position consecutively.
The 3 positions are:
0: between IHDR and PLTE, 1: between PLTE and IDAT, 2: between IDAT and IEND.
For encoding, do not store critical chunks or known chunks that are enabled with a "_defined" flag
above in here, since the encoder will blindly follow this and could then encode an invalid PNG file
(such as one with two IHDR chunks or the disallowed combination of sRGB with iCCP). But do use
this if you wish to store an ancillary chunk that is not supported by LodePNG (such as sPLT or hIST),
or any non-standard PNG chunk.
unknown chunks
There are 3 buffers, one for each position in the PNG where unknown chunks can appear
each buffer contains all unknown chunks for that position consecutively
The 3 buffers are the unknown chunks between certain critical chunks:
0: IHDR-PLTE, 1: PLTE-IDAT, 2: IDAT-IEND
Do not allocate or traverse this data yourself. Use the chunk traversing functions declared
later, such as lodepng_chunk_next and lodepng_chunk_append, to read/write this struct.
*/
@ -580,16 +486,12 @@ void lodepng_info_cleanup(LodePNGInfo* info);
unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source);
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str); /*push back both texts at once*/
void lodepng_clear_text(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/
unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str); /*push back both texts at once*/
void lodepng_clear_itext(LodePNGInfo* info); /*use this to clear the itexts again after you filled them in*/
unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag,
const char* transkey, const char* str); /*push back the 4 texts of 1 chunk at once*/
void lodepng_clear_itext(LodePNGInfo* info); /*use this to clear the itexts again after you filled them in*/
/*replaces if exists*/
unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size);
void lodepng_clear_icc(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
/*
@ -604,7 +506,7 @@ For 16-bit per channel colors, uses big endian format like PNG does.
Return value is LodePNG error code
*/
unsigned lodepng_convert(unsigned char* out, const unsigned char* in,
const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in,
LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in,
unsigned w, unsigned h);
#ifdef LODEPNG_COMPILE_DECODER
@ -616,14 +518,7 @@ typedef struct LodePNGDecoderSettings
{
LodePNGDecompressSettings zlibsettings; /*in here is the setting to ignore Adler32 checksums*/
/* Check LodePNGDecompressSettings for more ignorable errors such as ignore_adler32 */
unsigned ignore_crc; /*ignore CRC checksums*/
unsigned ignore_critical; /*ignore unknown critical chunks*/
unsigned ignore_end; /*ignore issues at end of file if possible (missing IEND chunk, too large chunk, ...)*/
/* TODO: make a system involving warnings with levels and a strict mode instead. Other potentially recoverable
errors: srgb rendering intent value, size of content of ancillary chunks, more than 79 characters for some
strings, placement/combination rules for ancillary chunks, crc of unknown chunks, allowed characters
in string keys, etc... */
unsigned color_convert; /*whether to convert the PNG to the color type you want. Default: yes*/
@ -643,7 +538,7 @@ typedef enum LodePNGFilterStrategy
{
/*every filter at zero*/
LFS_ZERO,
/*Use filter that gives minimum sum, as described in the official PNG filter heuristic.*/
/*Use filter that gives minumum sum, as described in the official PNG filter heuristic.*/
LFS_MINSUM,
/*Use the filter type that gives smallest Shannon entropy for this scanline. Depending
on the image, this is better or worse than minsum.*/
@ -657,30 +552,24 @@ typedef enum LodePNGFilterStrategy
LFS_PREDEFINED
} LodePNGFilterStrategy;
/*Gives characteristics about the integer RGBA colors of the image (count, alpha channel usage, bit depth, ...),
which helps decide which color model to use for encoding.
Used internally by default if "auto_convert" is enabled. Public because it's useful for custom algorithms.
NOTE: This is not related to the ICC color profile, search "iccp_profile" instead to find the ICC/chromacity/...
fields in this header file.*/
/*Gives characteristics about the colors of the image, which helps decide which color model to use for encoding.
Used internally by default if "auto_convert" is enabled. Public because it's useful for custom algorithms.*/
typedef struct LodePNGColorProfile
{
unsigned colored; /*not greyscale*/
unsigned key; /*image is not opaque and color key is possible instead of full alpha*/
unsigned short key_r; /*key values, always as 16-bit, in 8-bit case the byte is duplicated, e.g. 65535 means 255*/
unsigned key; /*if true, image is not opaque. Only if true and alpha is false, color key is possible.*/
unsigned short key_r; /*these values are always in 16-bit bitdepth in the profile*/
unsigned short key_g;
unsigned short key_b;
unsigned alpha; /*image is not opaque and alpha channel or alpha palette required*/
unsigned alpha; /*alpha channel or alpha palette required*/
unsigned numcolors; /*amount of colors, up to 257. Not valid if bits == 16.*/
unsigned char palette[1024]; /*Remembers up to the first 256 RGBA colors, in no particular order*/
unsigned bits; /*bits per channel (not for palette). 1,2 or 4 for greyscale only. 16 if 16-bit per channel required.*/
size_t numpixels;
} LodePNGColorProfile;
void lodepng_color_profile_init(LodePNGColorProfile* profile);
/*Get a LodePNGColorProfile of the image. The profile must already have been inited.
NOTE: This is not related to the ICC color profile, search "iccp_profile" instead to find the ICC/chromacity/...
fields in this header file.*/
/*Get a LodePNGColorProfile of the image.*/
unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
const unsigned char* image, unsigned w, unsigned h,
const LodePNGColorMode* mode_in);
@ -740,7 +629,7 @@ typedef struct LodePNGState
LodePNGInfo info_png; /*info of the PNG image obtained after decoding*/
unsigned error;
#ifdef LODEPNG_COMPILE_CPP
/* For the lodepng::State subclass. */
//For the lodepng::State subclass.
virtual ~LodePNGState(){}
#endif
} LodePNGState;
@ -762,7 +651,7 @@ unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h,
/*
Read the PNG header, but not the actual data. This returns only the information
that is in the IHDR chunk of the PNG, such as width, height and color type. The
that is in the header chunk of the PNG, such as width, height and color type. The
information is placed in the info_png field of the LodePNGState.
*/
unsigned lodepng_inspect(unsigned* w, unsigned* h,
@ -783,23 +672,11 @@ The lodepng_chunk functions are normally not needed, except to traverse the
unknown chunks stored in the LodePNGInfo struct, or add new ones to it.
It also allows traversing the chunks of an encoded PNG file yourself.
The chunk pointer always points to the beginning of the chunk itself, that is
the first byte of the 4 length bytes.
In the PNG file format, chunks have the following format:
-4 bytes length: length of the data of the chunk in bytes (chunk itself is 12 bytes longer)
-4 bytes chunk name (ASCII a-z,A-Z only, see below)
-length bytes of data (may be 0 bytes if length was 0)
-4 bytes of CRC, computed on chunk name + data
The first chunk starts at the 8th byte of the PNG file, the entire rest of the file
exists out of concatenated chunks with the above format.
PNG standard chunk ASCII naming conventions:
-First byte: uppercase = critical, lowercase = ancillary
-Second byte: uppercase = public, lowercase = private
-Third byte: must be uppercase
-Fourth byte: uppercase = unsafe to copy, lowercase = safe to copy
PNG standard chunk naming conventions:
First byte: uppercase = critical, lowercase = ancillary
Second byte: uppercase = public, lowercase = private
Third byte: must be uppercase
Fourth byte: uppercase = unsafe to copy, lowercase = safe to copy
*/
/*
@ -834,12 +711,7 @@ unsigned lodepng_chunk_check_crc(const unsigned char* chunk);
/*generates the correct CRC from the data and puts it in the last 4 bytes of the chunk*/
void lodepng_chunk_generate_crc(unsigned char* chunk);
/*
Iterate to next chunks, allows iterating through all chunks of the PNG file. Expects at least 4 readable
bytes of memory in the input pointer. Will output pointer to the start of the next chunk or the end of the
file if there is no more chunk after this. Start this process at the 8th byte of the PNG file. In a non-corrupt
PNG file, the last chunk should have name "IEND".
*/
/*iterate to next chunks. don't use on IEND chunk, as there is no next chunk then*/
unsigned char* lodepng_chunk_next(unsigned char* chunk);
const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk);
@ -939,7 +811,7 @@ unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const
#endif /*LODEPNG_COMPILE_DISK*/
#ifdef LODEPNG_COMPILE_CPP
/* The LodePNG C++ wrapper uses std::vectors instead of manually allocated memory buffers. */
//The LodePNG C++ wrapper uses std::vectors instead of manually allocated memory buffers.
namespace lodepng
{
#ifdef LODEPNG_COMPILE_PNG
@ -953,7 +825,7 @@ class State : public LodePNGState
};
#ifdef LODEPNG_COMPILE_DECODER
/* Same as other lodepng::decode, but using a State for more settings and information. */
//Same as other lodepng::decode, but using a State for more settings and information.
unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h,
State& state,
const unsigned char* in, size_t insize);
@ -963,7 +835,7 @@ unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h,
#endif /*LODEPNG_COMPILE_DECODER*/
#ifdef LODEPNG_COMPILE_ENCODER
/* Same as other lodepng::encode, but using a State for more settings and information. */
//Same as other lodepng::encode, but using a State for more settings and information.
unsigned encode(std::vector<unsigned char>& out,
const unsigned char* in, unsigned w, unsigned h,
State& state);
@ -974,60 +846,56 @@ unsigned encode(std::vector<unsigned char>& out,
#ifdef LODEPNG_COMPILE_DISK
/*
Load a file from disk into an std::vector.
return value: error code (0 means ok)
Load a file from disk into an std::vector. If the vector is empty, then either
the file doesn't exist or is an empty file.
*/
unsigned load_file(std::vector<unsigned char>& buffer, const std::string& filename);
void load_file(std::vector<unsigned char>& buffer, const std::string& filename);
/*
Save the binary data in an std::vector to a file on disk. The file is overwritten
without warning.
*/
unsigned save_file(const std::vector<unsigned char>& buffer, const std::string& filename);
#endif /* LODEPNG_COMPILE_DISK */
#endif /* LODEPNG_COMPILE_PNG */
void save_file(const std::vector<unsigned char>& buffer, const std::string& filename);
#endif //LODEPNG_COMPILE_DISK
#endif //LODEPNG_COMPILE_PNG
#ifdef LODEPNG_COMPILE_ZLIB
#ifdef LODEPNG_COMPILE_DECODER
/* Zlib-decompress an unsigned char buffer */
//Zlib-decompress an unsigned char buffer
unsigned decompress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings);
/* Zlib-decompress an std::vector */
//Zlib-decompress an std::vector
unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in,
const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings);
#endif /* LODEPNG_COMPILE_DECODER */
#endif //LODEPNG_COMPILE_DECODER
#ifdef LODEPNG_COMPILE_ENCODER
/* Zlib-compress an unsigned char buffer */
//Zlib-compress an unsigned char buffer
unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
const LodePNGCompressSettings& settings = lodepng_default_compress_settings);
/* Zlib-compress an std::vector */
//Zlib-compress an std::vector
unsigned compress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in,
const LodePNGCompressSettings& settings = lodepng_default_compress_settings);
#endif /* LODEPNG_COMPILE_ENCODER */
#endif /* LODEPNG_COMPILE_ZLIB */
} /* namespace lodepng */
#endif //LODEPNG_COMPILE_ENCODER
#endif //LODEPNG_COMPILE_ZLIB
} //namespace lodepng
#endif /*LODEPNG_COMPILE_CPP*/
/*
TODO:
[.] test if there are no memory leaks or security exploits - done a lot but needs to be checked often
[.] check compatibility with various compilers - done but needs to be redone for every newer version
[.] check compatibility with vareous compilers - done but needs to be redone for every newer version
[X] converting color to 16-bit per channel types
[X] support color profile chunk types (but never let them touch RGB values by default)
[ ] support all public PNG chunk types
[ ] read all public PNG chunk types (but never let the color profile and gamma ones touch RGB values)
[ ] make sure encoder generates no chunks with size > (2^31)-1
[ ] partial decoding (stream processing)
[X] let the "isFullyOpaque" function check color keys and transparent palettes too
[X] better name for the variables "codes", "codesD", "codelengthcodes", "clcl" and "lldl"
[ ] don't stop decoding on errors like 69, 57, 58 (make warnings)
[ ] make warnings like: oob palette, checksum fail, data after iend, wrong/unknown crit chunk, no null terminator in text, ...
[ ] errors with line numbers (and version)
[ ] make option to choose if the raw image with non multiple of 8 bits per scanline should have padding bits or not
[ ] let the C++ wrapper catch exceptions coming from the standard library and return LodePNG error codes
[ ] allow user to provide custom color conversion functions, e.g. for premultiplied alpha, padding bits or not, ...
[ ] allow user to give data (void*) to custom allocator
*/
#endif /*LODEPNG_H inclusion guard*/
@ -1057,9 +925,8 @@ LodePNG Documentation
10. examples
10.1. decoder C++ example
10.2. decoder C example
11. state settings reference
12. changes
13. contact information
11. changes
12. contact information
1. about
@ -1685,51 +1552,8 @@ int main(int argc, char *argv[])
return 0;
}
11. state settings reference
----------------------------
A quick reference of some settings to set on the LodePNGState
For decoding:
state.decoder.zlibsettings.ignore_adler32: ignore ADLER32 checksums
state.decoder.zlibsettings.custom_...: use custom inflate function
state.decoder.ignore_crc: ignore CRC checksums
state.decoder.ignore_critical: ignore unknown critical chunks
state.decoder.ignore_end: ignore missing IEND chunk. May fail if this corruption causes other errors
state.decoder.color_convert: convert internal PNG color to chosen one
state.decoder.read_text_chunks: whether to read in text metadata chunks
state.decoder.remember_unknown_chunks: whether to read in unknown chunks
state.info_raw.colortype: desired color type for decoded image
state.info_raw.bitdepth: desired bit depth for decoded image
state.info_raw....: more color settings, see struct LodePNGColorMode
state.info_png....: no settings for decoder but ouput, see struct LodePNGInfo
For encoding:
state.encoder.zlibsettings.btype: disable compression by setting it to 0
state.encoder.zlibsettings.use_lz77: use LZ77 in compression
state.encoder.zlibsettings.windowsize: tweak LZ77 windowsize
state.encoder.zlibsettings.minmatch: tweak min LZ77 length to match
state.encoder.zlibsettings.nicematch: tweak LZ77 match where to stop searching
state.encoder.zlibsettings.lazymatching: try one more LZ77 matching
state.encoder.zlibsettings.custom_...: use custom deflate function
state.encoder.auto_convert: choose optimal PNG color type, if 0 uses info_png
state.encoder.filter_palette_zero: PNG filter strategy for palette
state.encoder.filter_strategy: PNG filter strategy to encode with
state.encoder.force_palette: add palette even if not encoding to one
state.encoder.add_id: add LodePNG identifier and version as a text chunk
state.encoder.text_compression: use compressed text chunks for metadata
state.info_raw.colortype: color type of raw input image you provide
state.info_raw.bitdepth: bit depth of raw input image you provide
state.info_raw: more color settings, see struct LodePNGColorMode
state.info_png.color.colortype: desired color type if auto_convert is false
state.info_png.color.bitdepth: desired bit depth if auto_convert is false
state.info_png.color....: more color settings, see struct LodePNGColorMode
state.info_png....: more PNG related settings, see struct LodePNGInfo
12. changes
11. changes
-----------
The version number of LodePNG is the date of the change given in the format
@ -1738,20 +1562,6 @@ yyyymmdd.
Some changes aren't backwards compatible. Those are indicated with a (!)
symbol.
*) 19 aug 2018 (!): fixed color mode bKGD is encoded with and made it use palette
index in case of palette.
*) 10 aug 2018 (!): added support for gAMA, cHRM, sRGB and iCCP chunks. This
change is backwards compatible unless you relied on unknown_chunks for those.
*) 11 jun 2018: less restrictive check for pixel size integer overflow
*) 14 jan 2018: allow optionally ignoring a few more recoverable errors
*) 17 sep 2017: fix memory leak for some encoder input error cases
*) 27 nov 2016: grey+alpha auto color model detection bugfix
*) 18 apr 2016: Changed qsort to custom stable sort (for platforms w/o qsort).
*) 09 apr 2016: Fixed colorkey usage detection, and better file loading (within
the limits of pure C90).
*) 08 dec 2015: Made load_file function return error if file can't be opened.
*) 24 okt 2015: Bugfix with decoding to palette output.
*) 18 apr 2015: Boundary PM instead of just package-merge for faster encoding.
*) 23 aug 2014: Reduced needless memory usage of decoder.
*) 28 jun 2014: Removed fix_png setting, always support palette OOB for
simplicity. Made ColorProfile public.
@ -1776,7 +1586,7 @@ symbol.
*) 22 apr 2012 (!): Made interface more consistent, renaming a lot. Removed
redundant C++ codec classes. Reduced amount of structs. Everything changed,
but it is cleaner now imho and functionality remains the same. Also fixed
several bugs and shrunk the implementation code. Made new samples.
several bugs and shrinked the implementation code. Made new samples.
*) 6 nov 2011 (!): By default, the encoder now automatically chooses the best
PNG color model and bit depth, based on the amount and type of colors of the
raw image. For this, autoLeaveOutAlphaChannel replaced by auto_choose_color.
@ -1811,7 +1621,7 @@ symbol.
*) 20 jan 2008: support for unknown chunks allowing using LodePNG for an editor.
*) 18 jan 2008: support for tIME and pHYs chunks added to encoder and decoder.
*) 17 jan 2008: ability to encode and decode compressed zTXt chunks added
Also various fixes, such as in the deflate and the padding bits code.
Also vareous fixes, such as in the deflate and the padding bits code.
*) 13 jan 2008: Added ability to encode Adam7-interlaced images. Improved
filtering code of encoder.
*) 07 jan 2008: (!) changed LodePNG to use ISO C90 instead of C++. A
@ -1882,7 +1692,7 @@ symbol.
*) 12 aug 2005: Initial release (C++, decoder only)
13. contact information
12. contact information
-----------------------
Feel free to contact me with suggestions, problems, comments, ... concerning
@ -1894,5 +1704,5 @@ Domain: gmail dot com.
Account: lode dot vandevenne.
Copyright (c) 2005-2018 Lode Vandevenne
Copyright (c) 2005-2014 Lode Vandevenne
*/

Binary file not shown.

BIN
external/msvc/x64/vcredist_x64.exe vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
external/msvc/x86/vcredist_x86.exe vendored Normal file

Binary file not shown.

29
external/rs232/README vendored
View File

@ -1,29 +0,0 @@
Cross-platform serial / RS232 library
Version 0.21, 11/10/2015
The MIT License (MIT)
Supported platforms:
- Windows (XP / Win7, possibly 8 and 10)
- Linux
- MacOS X
Copyright (c) 2007 - 2015 Frédéric Meslin
Contact: fredericmeslin@hotmail.com, @marzacdev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,13 +0,0 @@
# rs232
C / C++ RS232 cross-platform serial library
Version 0.21, 11/10/2015
Supported platforms:
- Windows (XP / Win7, possibly 8 and 10)
- Linux
- MacOS X
Copyright (c) 2013-2015 Frédéric Meslin
Email: fredericmeslin@hotmail.com
Website: www.fredslab.net
Twitter: @marzacdev

View File

@ -1,261 +0,0 @@
/*
Cross-platform serial / RS232 library
Version 0.21, 11/10/2015
-> LINUX and MacOS implementation
-> rs232-linux.c
The MIT License (MIT)
Copyright (c) 2013-2015 Frédéric Meslin, Florent Touchard
Email: fredericmeslin@hotmail.com
Website: www.fredslab.net
Twitter: @marzacdev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#if defined(__unix__) || defined(__unix) || \
defined(__APPLE__) && defined(__MACH__)
#define _DARWIN_C_SOURCE
#include "rs232.h"
#include <unistd.h>
#define __USE_MISC // For CRTSCTS
#include <termios.h>
#include <fcntl.h>
#include <dirent.h>
#define __USE_SVID // For strdup
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/*****************************************************************************/
/** Base name for COM devices */
#if defined(__APPLE__) && defined(__MACH__)
static const char * devBases[] = {
"tty."
};
static int noBases = 1;
#else
static const char * devBases[] = {
"ttyACM", "ttyUSB", "rfcomm", "ttyS"
};
static int noBases = 4;
#endif
/*****************************************************************************/
typedef struct {
char * port;
int handle;
} COMDevice;
#define COM_MAXDEVICES 64
static COMDevice comDevices[COM_MAXDEVICES];
static int noDevices = 0;
/*****************************************************************************/
/** Private functions */
void _AppendDevices(const char * base);
int _BaudFlag(int BaudRate);
/*****************************************************************************/
int comEnumerate()
{
for (int i = 0; i < noDevices; i++) {
if (comDevices[i].port) free(comDevices[i].port);
comDevices[i].port = NULL;
}
noDevices = 0;
for (int i = 0; i < noBases; i++)
_AppendDevices(devBases[i]);
return noDevices;
}
void comTerminate()
{
comCloseAll();
for (int i = 0; i < noDevices; i++) {
if (comDevices[i].port) free(comDevices[i].port);
comDevices[i].port = NULL;
}
}
int comGetNoPorts()
{
return noDevices;
}
/*****************************************************************************/
int comFindPort(const char * name)
{
int p;
for (p = 0; p < noDevices; p++)
if (strcmp(name, comDevices[p].port) == 0)
return p;
return -1;
}
const char * comGetInternalName(int index)
{
#define COM_MAXNAME 128
static char name[COM_MAXNAME];
if (index >= noDevices || index < 0)
return NULL;
sprintf(name, "/dev/%s", comDevices[index].port);
return name;
}
const char * comGetPortName(int index) {
if (index >= noDevices || index < 0)
return NULL;
return comDevices[index].port;
}
/*****************************************************************************/
int comOpen(int index, int baudrate)
{
if (index >= noDevices || index < 0)
return 0;
// Close if already open
COMDevice * com = &comDevices[index];
if (com->handle >= 0) comClose(index);
// Open port
printf("Try %s \n", comGetInternalName(index));
int handle = open(comGetInternalName(index), O_RDWR | O_NOCTTY | O_NDELAY);
if (handle < 0)
return 0;
printf("Open %s \n", comGetInternalName(index));
// General configuration
struct termios config;
memset(&config, 0, sizeof(config));
tcgetattr(handle, &config);
config.c_iflag &= ~(INLCR | ICRNL);
config.c_iflag |= IGNPAR | IGNBRK;
config.c_oflag &= ~(OPOST | ONLCR | OCRNL);
config.c_cflag &= ~(PARENB | PARODD | CSTOPB | CSIZE | CRTSCTS);
config.c_cflag |= CLOCAL | CREAD | CS8;
config.c_lflag &= ~(ICANON | ISIG | ECHO);
int flag = _BaudFlag(baudrate);
cfsetospeed(&config, flag);
cfsetispeed(&config, flag);
// Timeouts configuration
config.c_cc[VTIME] = 1;
config.c_cc[VMIN] = 0;
//fcntl(handle, F_SETFL, FNDELAY);
// Validate configuration
if (tcsetattr(handle, TCSANOW, &config) < 0) {
close(handle);
return 0;
}
com->handle = handle;
return 1;
}
void comClose(int index)
{
if (index >= noDevices || index < 0)
return;
COMDevice * com = &comDevices[index];
if (com->handle < 0)
return;
tcdrain(com->handle);
close(com->handle);
com->handle = -1;
}
void comCloseAll()
{
for (int i = 0; i < noDevices; i++)
comClose(i);
}
/*****************************************************************************/
int comWrite(int index, const char * buffer, size_t len)
{
if (index >= noDevices || index < 0)
return 0;
if (comDevices[index].handle <= 0)
return 0;
int res = write(comDevices[index].handle, buffer, len);
if (res < 0)
res = 0;
return res;
}
int comRead(int index, char * buffer, size_t len)
{
if (index >= noDevices || index < 0)
return 0;
if (comDevices[index].handle <= 0)
return 0;
int res = read(comDevices[index].handle, buffer, len);
if (res < 0)
res = 0;
return res;
}
/*****************************************************************************/
int _BaudFlag(int BaudRate)
{
switch(BaudRate)
{
case 50: return B50; break;
case 110: return B110; break;
case 134: return B134; break;
case 150: return B150; break;
case 200: return B200; break;
case 300: return B300; break;
case 600: return B600; break;
case 1200: return B1200; break;
case 1800: return B1800; break;
case 2400: return B2400; break;
case 4800: return B4800; break;
case 9600: return B9600; break;
case 19200: return B19200; break;
case 38400: return B38400; break;
case 57600: return B57600; break;
case 115200: return B115200; break;
case 230400: return B230400; break;
default : return B0; break;
}
}
void _AppendDevices(const char * base)
{
int baseLen = strlen(base);
struct dirent * dp;
// Enumerate devices
DIR * dirp = opendir("/dev");
while ((dp = readdir(dirp)) && noDevices < COM_MAXDEVICES) {
if (strlen(dp->d_name) >= baseLen) {
if (memcmp(base, dp->d_name, baseLen) == 0) {
COMDevice * com = &comDevices[noDevices ++];
com->port = (char *) strdup(dp->d_name);
com->handle = -1;
}
}
}
closedir(dirp);
}
#endif // unix

View File

@ -1,253 +0,0 @@
/*
Cross-platform serial / RS232 library
Version 0.21, 11/10/2015
-> WIN32 implementation
-> rs232-win.c
The MIT License (MIT)
Copyright (c) 2013-2015 Frédéric Meslin, Florent Touchard
Email: fredericmeslin@hotmail.com
Website: www.fredslab.net
Twitter: @marzacdev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifdef _WIN32
#include "rs232.h"
#include <stdio.h>
#include <string.h>
#include <Windows.h>
/*****************************************************************************/
typedef struct {
int port;
void * handle;
} COMDevice;
/*****************************************************************************/
#define COM_MAXDEVICES 64
static COMDevice comDevices[COM_MAXDEVICES];
static int noDevices = 0;
#define COM_MINDEVNAME 16384
const char * comPtn = "COM???";
/*****************************************************************************/
const char * findPattern(const char * string, const char * pattern, int * value);
const char * portInternalName(int index);
/*****************************************************************************/
int comEnumerate()
{
// Get devices information text
size_t size = COM_MINDEVNAME;
char * list = (char *) malloc(size);
SetLastError(0);
QueryDosDeviceA(NULL, list, size);
while (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
size *= 2;
char * nlist = (char *) realloc(list, size);
if (!nlist) {
free(list);
return 0;
}
list = nlist;
SetLastError(0);
QueryDosDeviceA(NULL, list, size);
}
// Gather all COM ports
int port;
const char * nlist = findPattern(list, comPtn, &port);
noDevices = 0;
while(port > 0 && noDevices < COM_MAXDEVICES) {
COMDevice * com = &comDevices[noDevices ++];
com->port = port;
com->handle = 0;
nlist = findPattern(nlist, comPtn, &port);
}
free(list);
return noDevices;
}
void comTerminate()
{
comCloseAll();
}
int comGetNoPorts()
{
return noDevices;
}
/*****************************************************************************/
const char * comGetPortName(int index)
{
#define COM_MAXNAME 32
static char name[COM_MAXNAME];
if (index < 0 || index >= noDevices)
return 0;
sprintf(name, "COM%i", comDevices[index].port);
return name;
}
int comFindPort(const char * name)
{
for (int i = 0; i < noDevices; i++)
if (strcmp(name, comGetPortName(i)) == 0)
return i;
return -1;
}
const char * comGetInternalName(int index)
{
#define COM_MAXNAME 32
static char name[COM_MAXNAME];
if (index < 0 || index >= noDevices)
return 0;
sprintf(name, "//./COM%i", comDevices[index].port);
return name;
}
/*****************************************************************************/
int comOpen(int index, int baudrate)
{
DCB config;
COMMTIMEOUTS timeouts;
if (index < 0 || index >= noDevices)
return 0;
// Close if already open
COMDevice * com = &comDevices[index];
if (com->handle) comClose(index);
// Open COM port
void * handle = CreateFileA(comGetInternalName(index), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (handle == INVALID_HANDLE_VALUE)
return 0;
com->handle = handle;
// Prepare read / write timeouts
SetupComm(handle, 64, 64);
timeouts.ReadIntervalTimeout = MAXDWORD;
timeouts.ReadTotalTimeoutConstant = 0;
timeouts.WriteTotalTimeoutConstant = 0;
timeouts.ReadTotalTimeoutMultiplier = 0;
timeouts.WriteTotalTimeoutMultiplier = 0;
SetCommTimeouts(handle, &timeouts);
// Prepare serial communication format
GetCommState(handle, &config);
config.BaudRate = baudrate;
config.fBinary = true;
config.fParity = 0;
config.fErrorChar = 0;
config.fNull = 0;
config.fAbortOnError = 0;
config.ByteSize = 8;
config.Parity = 0;
config.StopBits = 0;
config.EvtChar = '\n';
// Set the port state
if (SetCommState(handle, &config) == 0) {
CloseHandle(handle);
return 0;
}
return 1;
}
void comClose(int index)
{
if (index < 0 || index >= noDevices)
return;
COMDevice * com = &comDevices[index];
if (!com->handle)
return;
CloseHandle(com->handle);
com->handle = 0;
}
void comCloseAll()
{
for (int i = 0; i < noDevices; i++)
comClose(i);
}
/*****************************************************************************/
int comWrite(int index, const char * buffer, size_t len)
{
if (index < 0 || index >= noDevices)
return 0;
COMDevice * com = &comDevices[index];
uint32_t bytes = 0;
WriteFile(com->handle, buffer, len, (LPDWORD)&bytes, NULL);
return bytes;
}
int comRead(int index, char * buffer, size_t len)
{
if (index < 0 || index >= noDevices)
return 0;
COMDevice * com = &comDevices[index];
uint32_t bytes = 0;
ReadFile(com->handle, buffer, len, (LPDWORD)&bytes, NULL);
return bytes;
}
/*****************************************************************************/
const char * findPattern(const char * string, const char * pattern, int * value)
{
char c, n = 0;
const char * sp = string;
const char * pp = pattern;
// Check for the string pattern
while (1) {
c = *sp ++;
if (c == '\0') {
if (*pp == '?') break;
if (*sp == '\0') break;
n = 0;
pp = pattern;
}else{
if (*pp == '?') {
// Expect a digit
if (c >= '0' && c <= '9') {
n = n * 10 + (c - '0');
if (*pp ++ == '\0') break;
}else{
n = 0;
pp = comPtn;
}
}else{
// Expect a character
if (c == *pp) {
if (*pp ++ == '\0') break;
}else{
n = 0;
pp = comPtn;
}
}
}
}
// Return the value
* value = n;
return sp;
}
#endif // _WIN32

156
external/rs232/rs232.h vendored
View File

@ -1,156 +0,0 @@
/*
Cross-platform serial / RS232 library
Version 0.21, 11/10/2015
-> All platforms header
-> rs232.h
The MIT License (MIT)
Copyright (c) 2013-2015 Frédéric Meslin, Florent Touchard
Email: fredericmeslin@hotmail.com
Website: www.fredslab.net
Twitter: @marzacdev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifndef RS232_H
#define RS232_H
// TODO: convert to C++ class
//#ifdef __cplusplus
//extern "C" {
//#endif
#include <stdint.h>
#include <stdlib.h>
/*****************************************************************************/
/* Doxywizard specific */
/**
* \mainpage RS232
* \section intro_sec C / C++ RS232 cross-platform serial library
* <b>Version 0.21 - 11/10/2015</b>
*
* Supported platforms:
* - Windows (XP / Win7, possibly 8 and 10)
* - Linux
* - MacOS X
*
* Copyright (c) 2013-2015 Fr&eacute;d&eacute;ric Meslin, Florent Touchard <br>
* Email: fredericmeslin@hotmail.com <br>
* Website: www.fredslab.net <br>
* Twitter: \@marzacdev <br>
*/
/*****************************************************************************/
/**
* \fn int comEnumerate()
* \brief Enumerate available serial ports (Serial, USB serial, Bluetooth serial)
* \return number of enumerated ports
*/
int comEnumerate();
/**
* \fn int comGetNoPorts()
* \brief Return the number of enumerated ports
* \return number of enumerated ports
*/
int comGetNoPorts();
/**
* \fn int comTerminate()
* \brief Release ports and memory resources used by the library
*/
void comTerminate();
/**
* \fn const char * comGetPortName(int index)
* \brief Get port user-friendly name
* \param[in] index port index
* \return null terminated port name
*/
const char * comGetPortName(int index);
/**
* \fn const char * comGetInternalName(int index)
* \brief Get port operating-system name
* \param[in] index port index
* \return null terminated port name
*/
const char * comGetInternalName(int index);
/**
* \fn int comFindPort(const char * name)
* \brief Try to find a port given its user-friendly name
* \param[in] name port name (case sensitive)
* \return index of found port or -1 if not enumerated
*/
int comFindPort(const char * name);
/*****************************************************************************/
/**
* \fn int comOpen(int index, int baudrate)
* \brief Try to open a port at a specific baudrate
* \brief (No parity, single stop bit, no hardware flow control)
* \param[in] index port index
* \param[in] baudrate port baudrate
* \return 1 if opened, 0 if not available
*/
int comOpen(int index, int baudrate);
/**
* \fn void comClose(int index)
* \brief Close an opened port
* \param[in] index port index
*/
void comClose(int index);
/**
* \fn void comCloseAll()
* \brief Close all opened ports
*/
void comCloseAll();
/*****************************************************************************/
/**
* \fn int comWrite(int index, const char * buffer, size_t len)
* \brief Write data to the port (non-blocking)
* \param[in] index port index
* \param[in] buffer pointer to transmit buffer
* \param[in] len length of transmit buffer in bytes
* \return number of bytes transferred
*/
int comWrite(int index, const char * buffer, size_t len);
/**
* \fn int comRead(int index, const char * buffer, size_t len)
* \brief Read data from the port (non-blocking)
* \param[in] index port index
* \param[in] buffer pointer to receive buffer
* \param[in] len length of receive buffer in bytes
* \return number of bytes transferred
*/
int comRead(int index, char * buffer, size_t len);
//#ifdef __cplusplus
//}
//#endif
#endif // RS232_H

View File

@ -0,0 +1,212 @@
#pragma once
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
devpkey.h
Abstract:
Defines property keys for the Plug and Play Device Property API.
Author:
Jim Cavalaris (jamesca) 10-14-2003
Environment:
User-mode only.
Revision History:
14-October-2003 jamesca
Creation and initial implementation.
20-June-2006 dougb
Copied Jim's version replaced "DEFINE_DEVPROPKEY(DEVPKEY_" with "DEFINE_PROPERTYKEY(PKEY_"
--*/
//#include <devpropdef.h>
//
// _NAME
//
DEFINE_PROPERTYKEY(PKEY_NAME, 0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10); // DEVPROP_TYPE_STRING
//
// Device properties
// These PKEYs correspond to the old setupapi SPDRP_XXX properties
//
DEFINE_PROPERTYKEY(PKEY_Device_DeviceDesc, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 2); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_HardwareIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_CompatibleIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 4); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_Service, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 6); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_Class, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 9); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_ClassGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 10); // DEVPROP_TYPE_GUID
DEFINE_PROPERTYKEY(PKEY_Device_Driver, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 11); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_ConfigFlags, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 12); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_Manufacturer, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_LocationInfo, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 15); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_PDOName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 16); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_Capabilities, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 17); // DEVPROP_TYPE_UNINT32
DEFINE_PROPERTYKEY(PKEY_Device_UINumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 18); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_UpperFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 19); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_LowerFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 20); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_BusTypeGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 21); // DEVPROP_TYPE_GUID
DEFINE_PROPERTYKEY(PKEY_Device_LegacyBusType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 22); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_BusNumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 23); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_EnumeratorName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 24); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_Security, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
DEFINE_PROPERTYKEY(PKEY_Device_SecuritySDS, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DevType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 27); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_Exclusive, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 28); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_Characteristics, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 29); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_Address, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 30); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_UINumberDescFormat, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 31); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_PowerData, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 32); // DEVPROP_TYPE_BINARY
DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicy, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 33); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyDefault, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 34); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyOverride, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 35); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_InstallState, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 36); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_LocationPaths, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 37); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_BaseContainerId, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 38); // DEVPROP_TYPE_GUID
//
// Device properties
// These PKEYs correspond to a device's status and problem code
//
DEFINE_PROPERTYKEY(PKEY_Device_DevNodeStatus, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 2); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_ProblemCode, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 3); // DEVPROP_TYPE_UINT32
//
// Device properties
// These PKEYs correspond to device relations
//
DEFINE_PROPERTYKEY(PKEY_Device_EjectionRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 4); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_RemovalRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 5); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_PowerRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 6); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_BusRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 7); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_Parent, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 8); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_Children, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 9); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_Siblings, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 10); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_TransportRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 11); // DEVPROP_TYPE_STRING_LIST
//
// Other Device properties
//
DEFINE_PROPERTYKEY(PKEY_Device_Reported, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 2); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_Device_Legacy, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 3); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_Device_InstanceId, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_ContainerId, 0x8c7ed206, 0x3f8a, 0x4827, 0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c, 2); // DEVPROP_TYPE_GUID
DEFINE_PROPERTYKEY(PKEY_Device_ModelId, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 2); // DEVPROP_TYPE_GUID
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyNameAttributes, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 3); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_ManufacturerAttributes, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 4); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_PresenceNotForDevice, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 5); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_Numa_Proximity_Domain, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 1); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_DHP_Rebalance_Policy, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 2); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_Numa_Node, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 3); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_BusReportedDeviceDesc, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 4); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_InstallInProgress, 0x83da6326, 0x97a6, 0x4088, 0x94, 0x53, 0xa1, 0x92, 0x3f, 0x57, 0x3b, 0x29, 9); // DEVPROP_TYPE_BOOLEAN
//
// Device driver properties
//
DEFINE_PROPERTYKEY(PKEY_Device_DriverDate, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2); // DEVPROP_TYPE_FILETIME
DEFINE_PROPERTYKEY(PKEY_Device_DriverVersion, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DriverDesc, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 4); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DriverInfPath, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 5); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSection, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 6); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSectionExt, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 7); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_MatchingDeviceId, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 8); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DriverProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 9); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DriverPropPageProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 10); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DriverCoInstallers, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 11); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerTags, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 12); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerExceptions, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 13); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_Device_DriverRank, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 14); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_DriverLogoLevel, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 15); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_Device_NoConnectSound, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 17); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_Device_GenericDriverInstalled, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 18); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_Device_AdditionalSoftwareRequested, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 19);// DEVPROP_TYPE_BOOLEAN
//
// Device safe-removal properties
//
DEFINE_PROPERTYKEY(PKEY_Device_SafeRemovalRequired, 0xafd97640, 0x86a3, 0x4210, 0xb6, 0x7c, 0x28, 0x9c, 0x41, 0xaa, 0xbe, 0x55, 2); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_Device_SafeRemovalRequiredOverride, 0xafd97640, 0x86a3, 0x4210, 0xb6, 0x7c, 0x28, 0x9c, 0x41, 0xaa, 0xbe, 0x55, 3);// DEVPROP_TYPE_BOOLEAN
//
// Device properties that were set by the driver package that was installed
// on the device.
//
DEFINE_PROPERTYKEY(PKEY_DrvPkg_Model, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 2); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DrvPkg_VendorWebSite, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 3); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DrvPkg_DetailedDescription, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 4); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DrvPkg_DocumentationLink, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 5); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DrvPkg_Icon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 6); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_DrvPkg_BrandingIcon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 7); // DEVPROP_TYPE_STRING_LIST
//
// Device setup class properties
// These PKEYs correspond to the old setupapi SPCRP_XXX properties
//
DEFINE_PROPERTYKEY(PKEY_DeviceClass_UpperFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 19); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_DeviceClass_LowerFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 20); // DEVPROP_TYPE_STRING_LIST
DEFINE_PROPERTYKEY(PKEY_DeviceClass_Security, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
DEFINE_PROPERTYKEY(PKEY_DeviceClass_SecuritySDS, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceClass_DevType, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 27); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_DeviceClass_Exclusive, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 28); // DEVPROP_TYPE_UINT32
DEFINE_PROPERTYKEY(PKEY_DeviceClass_Characteristics, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 29); // DEVPROP_TYPE_UINT32
//
// Device setup class properties
// These PKEYs correspond to registry values under the device class GUID key
//
DEFINE_PROPERTYKEY(PKEY_DeviceClass_Name, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 2); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassName, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 3); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceClass_Icon, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 4); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassInstaller, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 5); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceClass_PropPageProvider, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 6); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoInstallClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 7); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoDisplayClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 8); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_DeviceClass_SilentInstall, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 9); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoUseClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 10); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_DeviceClass_DefaultService, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 11); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceClass_IconPath, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 12); // DEVPROP_TYPE_STRING_LIST
//
// Other Device setup class properties
//
DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassCoInstallers, 0x713d1703, 0xa2e2, 0x49f5, 0x92, 0x14, 0x56, 0x47, 0x2e, 0xf3, 0xda, 0x5c, 2); // DEVPROP_TYPE_STRING_LIST
//
// Device interface properties
//
DEFINE_PROPERTYKEY(PKEY_DeviceInterface_FriendlyName, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 2); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Enabled, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 3); // DEVPROP_TYPE_BOOLEAN
DEFINE_PROPERTYKEY(PKEY_DeviceInterface_ClassGuid, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 4); // DEVPROP_TYPE_GUID
//
// Device interface class properties
//
DEFINE_PROPERTYKEY(PKEY_DeviceInterfaceClass_DefaultInterface, 0x14c83a99, 0x0b3f, 0x44b7, 0xbe, 0x4c, 0xa1, 0x78, 0xd3, 0x99, 0x05, 0x64, 2); // DEVPROP_TYPE_STRING

View File

@ -1,62 +0,0 @@
# RtAudio
![Build Status](https://github.com/thestk/rtaudio/actions/workflows/ci.yml/badge.svg)
A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO and WASAPI) operating systems.
By Gary P. Scavone, 2001-2021 (and many other developers!)
This distribution of RtAudio contains the following:
- doc: RtAudio documentation (see doc/html/index.html)
- tests: example RtAudio programs
- include: header and source files necessary for ASIO, DS & OSS compilation
- tests/Windows: Visual C++ .net test program workspace and projects
## Overview
RtAudio is a set of C++ classes that provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X and Windows (DirectSound, ASIO and WASAPI) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives:
- object-oriented C++ design
- simple, common API across all supported platforms
- only one source and one header file for easy inclusion in programming projects
- allow simultaneous multi-api support
- support dynamic connection of devices
- provide extensive audio device parameter control
- allow audio device capability probing
- automatic internal conversion for data format, channel number compensation, (de)interleaving, and byte-swapping
RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance. See the \ref apinotes section for information specific to each of the supported audio APIs.
## Building
Several build systems are available. These are:
- autotools (`./autogen.sh; make` from git, or `./configure; make` from tarball release)
- CMake (`mkdir build; cd build; ../cmake; make`)
- meson (`meson build; cd build; ninja`)
See `install.txt` for more instructions about how to select the audio backend API. By
default all detected APIs will be enabled.
We recommend using the autotools-based build for packaging purposes. Please note that
RtAudio is designed as a single `.cpp` and `.h` file so that it is easy to copy directly
into a project. In that case you need to define the appropriate flags for the desired
backend APIs.
## FAQ
### Why does audio only come to one ear when I choose 1-channel output?
RtAudio doesn't automatically turn 1-channel output into stereo output with copied values
to each channel, it really only opens one channel. So, if this is the behaviour you want,
you have to do this copying in your audio stream callback.
## Further Reading
For complete documentation on RtAudio, see the doc directory of the distribution or surf to http://www.music.mcgill.ca/~gary/rtaudio/.
## Legal and ethical:
The RtAudio license is similar to the MIT License. Please see [LICENSE](LICENSE).

File diff suppressed because it is too large Load Diff

View File

@ -7,11 +7,10 @@
and OSS), Macintosh OS X (CoreAudio and Jack), and Windows
(DirectSound, ASIO and WASAPI) operating systems.
RtAudio GitHub site: https://github.com/thestk/rtaudio
RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/
RtAudio: realtime audio i/o C++ classes
Copyright (c) 2001-2021 Gary P. Scavone
Copyright (c) 2001-2014 Gary P. Scavone
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
@ -46,25 +45,11 @@
#ifndef __RTAUDIO_H
#define __RTAUDIO_H
#define RTAUDIO_VERSION "5.2.0"
#if defined _WIN32 || defined __CYGWIN__
#if defined(RTAUDIO_EXPORT)
#define RTAUDIO_DLL_PUBLIC __declspec(dllexport)
#else
#define RTAUDIO_DLL_PUBLIC
#endif
#else
#if __GNUC__ >= 4
#define RTAUDIO_DLL_PUBLIC __attribute__( (visibility( "default" )) )
#else
#define RTAUDIO_DLL_PUBLIC
#endif
#endif
#define RTAUDIO_VERSION "4.1.1"
#include <string>
#include <vector>
#include <stdexcept>
#include <exception>
#include <iostream>
/*! \typedef typedef unsigned long RtAudioFormat;
@ -101,7 +86,6 @@ static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/mi
- \e RTAUDIO_MINIMIZE_LATENCY: Attempt to set stream parameters for lowest possible latency.
- \e RTAUDIO_HOG_DEVICE: Attempt grab device for exclusive use.
- \e RTAUDIO_ALSA_USE_DEFAULT: Use the "default" PCM device (ALSA only).
- \e RTAUDIO_JACK_DONT_CONNECT: Do not automatically connect ports (JACK only).
By default, RtAudio streams pass and receive audio data from the
client in an interleaved format. By passing the
@ -117,7 +101,7 @@ static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/mi
Certain audio APIs offer a number of parameters that influence the
I/O latency of a stream. By default, RtAudio will attempt to set
these parameters internally for robust (glitch-free) performance
(though some APIs, like Windows DirectSound, make this difficult).
(though some APIs, like Windows Direct Sound, make this difficult).
By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream()
function, internal stream settings will be influenced in an attempt
to minimize stream latency, though possibly at the expense of stream
@ -133,9 +117,6 @@ static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/mi
If the RTAUDIO_ALSA_USE_DEFAULT flag is set, RtAudio will attempt to
open the "default" PCM device when using the ALSA API. Note that this
will override any specified input or output device id.
If the RTAUDIO_JACK_DONT_CONNECT flag is set, RtAudio will not attempt
to automatically connect the ports of the client to the audio device.
*/
typedef unsigned int RtAudioStreamFlags;
static const RtAudioStreamFlags RTAUDIO_NONINTERLEAVED = 0x1; // Use non-interleaved buffers (default = interleaved).
@ -143,7 +124,6 @@ static const RtAudioStreamFlags RTAUDIO_MINIMIZE_LATENCY = 0x2; // Attempt to s
static const RtAudioStreamFlags RTAUDIO_HOG_DEVICE = 0x4; // Attempt grab device and prevent use by others.
static const RtAudioStreamFlags RTAUDIO_SCHEDULE_REALTIME = 0x8; // Try to select realtime scheduling for callback thread.
static const RtAudioStreamFlags RTAUDIO_ALSA_USE_DEFAULT = 0x10; // Use the "default" PCM device (ALSA only).
static const RtAudioStreamFlags RTAUDIO_JACK_DONT_CONNECT = 0x20; // Do not automatically connect ports (JACK only).
/*! \typedef typedef unsigned long RtAudioStreamStatus;
\brief RtAudio stream status (over- or underflow) flags.
@ -194,7 +174,6 @@ static const RtAudioStreamStatus RTAUDIO_OUTPUT_UNDERFLOW = 0x2; // The output
\param userData A pointer to optional data provided by the client
when opening the stream (default = NULL).
\return
To continue normal stream operation, the RtAudioCallback function
should return a value of zero. To stop the stream and drain the
output buffer, the function should return a value of one. To abort
@ -216,7 +195,7 @@ typedef int (*RtAudioCallback)( void *outputBuffer, void *inputBuffer,
*/
/************************************************************************/
class RTAUDIO_DLL_PUBLIC RtAudioError : public std::runtime_error
class RtAudioError : public std::exception
{
public:
//! Defined RtAudioError types.
@ -226,31 +205,34 @@ class RTAUDIO_DLL_PUBLIC RtAudioError : public std::runtime_error
UNSPECIFIED, /*!< The default, unspecified error type. */
NO_DEVICES_FOUND, /*!< No devices found on system. */
INVALID_DEVICE, /*!< An invalid device ID was specified. */
MEMORY_ERROR, /*!< An error occurred during memory allocation. */
MEMORY_ERROR, /*!< An error occured during memory allocation. */
INVALID_PARAMETER, /*!< An invalid parameter was specified to a function. */
INVALID_USE, /*!< The function was called incorrectly. */
DRIVER_ERROR, /*!< A system driver error occurred. */
SYSTEM_ERROR, /*!< A system error occurred. */
THREAD_ERROR /*!< A thread error occurred. */
DRIVER_ERROR, /*!< A system driver error occured. */
SYSTEM_ERROR, /*!< A system error occured. */
THREAD_ERROR /*!< A thread error occured. */
};
//! The constructor.
RtAudioError( const std::string& message,
Type type = RtAudioError::UNSPECIFIED )
: std::runtime_error(message), type_(type) {}
RtAudioError( const std::string& message, Type type = RtAudioError::UNSPECIFIED ) throw() : message_(message), type_(type) {}
//! The destructor.
virtual ~RtAudioError( void ) throw() {}
//! Prints thrown error message to stderr.
virtual void printMessage( void ) const
{ std::cerr << '\n' << what() << "\n\n"; }
virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }
//! Returns the thrown error message type.
virtual const Type& getType(void) const { return type_; }
virtual const Type& getType(void) const throw() { return type_; }
//! Returns the thrown error message string.
virtual const std::string getMessage(void) const
{ return std::string(what()); }
virtual const std::string& getMessage(void) const throw() { return message_; }
//! Returns the thrown error message as a c-style string.
virtual const char* what( void ) const throw() { return message_.c_str(); }
protected:
std::string message_;
Type type_;
};
@ -276,7 +258,7 @@ typedef void (*RtAudioErrorCallback)( RtAudioError::Type type, const std::string
class RtApi;
class RTAUDIO_DLL_PUBLIC RtAudio
class RtAudio
{
public:
@ -290,30 +272,37 @@ class RTAUDIO_DLL_PUBLIC RtAudio
MACOSX_CORE, /*!< Macintosh OS-X Core Audio API. */
WINDOWS_WASAPI, /*!< The Microsoft WASAPI API. */
WINDOWS_ASIO, /*!< The Steinberg Audio Stream I/O API. */
WINDOWS_DS, /*!< The Microsoft DirectSound API. */
RTAUDIO_DUMMY, /*!< A compilable but non-functional API. */
NUM_APIS /*!< Number of values in this enum. */
WINDOWS_DS, /*!< The Microsoft Direct Sound API. */
RTAUDIO_DUMMY /*!< A compilable but non-functional API. */
};
//! The public device information structure for returning queried values.
struct DeviceInfo {
bool probed; /*!< true if the device capabilities were successfully probed. */
std::string name; /*!< Character string device identifier. */
unsigned int outputChannels{}; /*!< Maximum output channels supported by device. */
unsigned int inputChannels{}; /*!< Maximum input channels supported by device. */
unsigned int duplexChannels{}; /*!< Maximum simultaneous input/output channels supported by device. */
bool isDefaultOutput{false}; /*!< true if this is the default output device. */
bool isDefaultInput{false}; /*!< true if this is the default input device. */
unsigned int outputChannels; /*!< Maximum output channels supported by device. */
unsigned int inputChannels; /*!< Maximum input channels supported by device. */
unsigned int duplexChannels; /*!< Maximum simultaneous input/output channels supported by device. */
bool isDefaultOutput; /*!< true if this is the default output device. */
bool isDefaultInput; /*!< true if this is the default input device. */
std::vector<unsigned int> sampleRates; /*!< Supported sample rates (queried from list of standard rates). */
unsigned int preferredSampleRate{}; /*!< Preferred sample rate, e.g. for WASAPI the system sample rate. */
RtAudioFormat nativeFormats{}; /*!< Bit mask of supported data formats. */
RtAudioFormat nativeFormats; /*!< Bit mask of supported data formats. */
// Default constructor.
DeviceInfo()
:probed(false), outputChannels(0), inputChannels(0), duplexChannels(0),
isDefaultOutput(false), isDefaultInput(false), nativeFormats(0) {}
};
//! The structure for specifying input or output stream parameters.
//! The structure for specifying input or ouput stream parameters.
struct StreamParameters {
unsigned int deviceId{}; /*!< Device index (0 to getDeviceCount() - 1). */
unsigned int nChannels{}; /*!< Number of channels. */
unsigned int firstChannel{}; /*!< First channel index on device (default = 0). */
unsigned int deviceId; /*!< Device index (0 to getDeviceCount() - 1). */
unsigned int nChannels; /*!< Number of channels. */
unsigned int firstChannel; /*!< First channel index on device (default = 0). */
// Default constructor.
StreamParameters()
: deviceId(0), nChannels(0), firstChannel(0) {}
};
//! The structure for specifying stream options.
@ -341,7 +330,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
Certain audio APIs offer a number of parameters that influence the
I/O latency of a stream. By default, RtAudio will attempt to set
these parameters internally for robust (glitch-free) performance
(though some APIs, like Windows DirectSound, make this difficult).
(though some APIs, like Windows Direct Sound, make this difficult).
By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream()
function, internal stream settings will be influenced in an attempt
to minimize stream latency, though possibly at the expense of stream
@ -374,14 +363,18 @@ class RTAUDIO_DLL_PUBLIC RtAudio
RtAudio with Jack, each instance must have a unique client name.
*/
struct StreamOptions {
RtAudioStreamFlags flags{}; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT). */
unsigned int numberOfBuffers{}; /*!< Number of stream buffers. */
RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT). */
unsigned int numberOfBuffers; /*!< Number of stream buffers. */
std::string streamName; /*!< A stream name (currently used only in Jack). */
int priority{}; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */
int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */
// Default constructor.
StreamOptions()
: flags(0), numberOfBuffers(0), priority(0) {}
};
//! A static function to determine the current RtAudio version.
static std::string getVersion( void );
static std::string getVersion( void ) throw();
//! A static function to determine the available compiled audio APIs.
/*!
@ -389,30 +382,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
the enumerated list values. Note that there can be more than one
API compiled for certain operating systems.
*/
static void getCompiledApi( std::vector<RtAudio::Api> &apis );
//! Return the name of a specified compiled audio API.
/*!
This obtains a short lower-case name used for identification purposes.
This value is guaranteed to remain identical across library versions.
If the API is unknown, this function will return the empty string.
*/
static std::string getApiName( RtAudio::Api api );
//! Return the display name of a specified compiled audio API.
/*!
This obtains a long name used for display purposes.
If the API is unknown, this function will return the empty string.
*/
static std::string getApiDisplayName( RtAudio::Api api );
//! Return the compiled audio API having the given name.
/*!
A case insensitive comparison will check the specified name
against the list of compiled APIs, and return the one which
matches. On failure, the function returns UNSPECIFIED.
*/
static RtAudio::Api getCompiledApiByName( const std::string &name );
static void getCompiledApi( std::vector<RtAudio::Api> &apis ) throw();
//! The class constructor.
/*!
@ -430,10 +400,10 @@ class RTAUDIO_DLL_PUBLIC RtAudio
If a stream is running or open, it will be stopped and closed
automatically.
*/
~RtAudio();
~RtAudio() throw();
//! Returns the audio API specifier for the current instance of RtAudio.
RtAudio::Api getCurrentApi( void );
RtAudio::Api getCurrentApi( void ) throw();
//! A public function that queries for the number of audio devices available.
/*!
@ -441,7 +411,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
is called, thus supporting devices connected \e after instantiation. If
a system error occurs during processing, a warning will be issued.
*/
unsigned int getDeviceCount( void );
unsigned int getDeviceCount( void ) throw();
//! Return an RtAudio::DeviceInfo structure for a specified device number.
/*!
@ -464,7 +434,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
client's responsibility to verify that a device is available
before attempting to open a stream.
*/
unsigned int getDefaultOutputDevice( void );
unsigned int getDefaultOutputDevice( void ) throw();
//! A function that returns the index of the default input device.
/*!
@ -474,7 +444,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
client's responsibility to verify that a device is available
before attempting to open a stream.
*/
unsigned int getDefaultInputDevice( void );
unsigned int getDefaultInputDevice( void ) throw();
//! A public function for opening a stream with the specified parameters.
/*!
@ -514,7 +484,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
lowest allowable value is used. The actual value used is
returned via the structure argument. The parameter is API dependent.
\param errorCallback A client-defined function that will be invoked
when an error has occurred.
when an error has occured.
*/
void openStream( RtAudio::StreamParameters *outputParameters,
RtAudio::StreamParameters *inputParameters,
@ -527,7 +497,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
If a stream is not open, this function issues a warning and
returns (no exception is thrown).
*/
void closeStream( void );
void closeStream( void ) throw();
//! A function that starts a stream.
/*!
@ -557,10 +527,10 @@ class RTAUDIO_DLL_PUBLIC RtAudio
void abortStream( void );
//! Returns true if a stream is open and false if not.
bool isStreamOpen( void ) const;
bool isStreamOpen( void ) const throw();
//! Returns true if the stream is running and false if it is stopped or not open.
bool isStreamRunning( void ) const;
bool isStreamRunning( void ) const throw();
//! Returns the number of elapsed seconds since the stream was started.
/*!
@ -594,7 +564,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
unsigned int getStreamSampleRate( void );
//! Specify whether warning messages should be printed to stderr.
void showWarnings( bool value = true );
void showWarnings( bool value = true ) throw();
protected:
@ -603,34 +573,29 @@ class RTAUDIO_DLL_PUBLIC RtAudio
};
// Operating system dependent thread functionality.
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_WASAPI__)
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <process.h>
#include <stdint.h>
typedef uintptr_t ThreadHandle;
typedef CRITICAL_SECTION StreamMutex;
#else
#elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)
// Using pthread library for various flavors of unix.
#include <pthread.h>
typedef pthread_t ThreadHandle;
typedef pthread_mutex_t StreamMutex;
#endif
// Setup for "dummy" behavior if no apis specified.
#if !(defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_WASAPI__) \
|| defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) \
|| defined(__LINUX_OSS__) || defined(__MACOSX_CORE__))
#else // Setup for "dummy" behavior
#define __RTAUDIO_DUMMY__
typedef int ThreadHandle;
typedef int StreamMutex;
#endif
@ -638,15 +603,19 @@ class RTAUDIO_DLL_PUBLIC RtAudio
// between the private RtAudio stream structure and global callback
// handling functions.
struct CallbackInfo {
void *object{}; // Used as a "this" pointer.
ThreadHandle thread{};
void *callback{};
void *userData{};
void *errorCallback{};
void *apiInfo{}; // void pointer for API specific callback information
bool isRunning{false};
bool doRealtime{false};
int priority{};
void *object; // Used as a "this" pointer.
ThreadHandle thread;
void *callback;
void *userData;
void *errorCallback;
void *apiInfo; // void pointer for API specific callback information
bool isRunning;
bool doRealtime;
int priority;
// Default constructor.
CallbackInfo()
:object(0), callback(0), userData(0), errorCallback(0), apiInfo(0), isRunning(false), doRealtime(false) {}
};
// **************************************************************** //
@ -673,12 +642,13 @@ class S24 {
S24() {}
S24& operator = ( const int& i ) {
c3[0] = (unsigned char)(i & 0x000000ff);
c3[1] = (unsigned char)((i & 0x0000ff00) >> 8);
c3[2] = (unsigned char)((i & 0x00ff0000) >> 16);
c3[0] = (i & 0x000000ff);
c3[1] = (i & 0x0000ff00) >> 8;
c3[2] = (i & 0x00ff0000) >> 16;
return *this;
}
S24( const S24& v ) { *this = v; }
S24( const double& d ) { *this = (int) d; }
S24( const float& f ) { *this = (int) f; }
S24( const signed short& s ) { *this = (int) s; }
@ -698,7 +668,7 @@ class S24 {
#include <sstream>
class RTAUDIO_DLL_PUBLIC RtApi
class RtApi
{
public:
@ -853,22 +823,22 @@ protected:
//
// **************************************************************** //
inline RtAudio::Api RtAudio :: getCurrentApi( void ) { return rtapi_->getCurrentApi(); }
inline unsigned int RtAudio :: getDeviceCount( void ) { return rtapi_->getDeviceCount(); }
inline RtAudio::Api RtAudio :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }
inline unsigned int RtAudio :: getDeviceCount( void ) throw() { return rtapi_->getDeviceCount(); }
inline RtAudio::DeviceInfo RtAudio :: getDeviceInfo( unsigned int device ) { return rtapi_->getDeviceInfo( device ); }
inline unsigned int RtAudio :: getDefaultInputDevice( void ) { return rtapi_->getDefaultInputDevice(); }
inline unsigned int RtAudio :: getDefaultOutputDevice( void ) { return rtapi_->getDefaultOutputDevice(); }
inline void RtAudio :: closeStream( void ) { return rtapi_->closeStream(); }
inline unsigned int RtAudio :: getDefaultInputDevice( void ) throw() { return rtapi_->getDefaultInputDevice(); }
inline unsigned int RtAudio :: getDefaultOutputDevice( void ) throw() { return rtapi_->getDefaultOutputDevice(); }
inline void RtAudio :: closeStream( void ) throw() { return rtapi_->closeStream(); }
inline void RtAudio :: startStream( void ) { return rtapi_->startStream(); }
inline void RtAudio :: stopStream( void ) { return rtapi_->stopStream(); }
inline void RtAudio :: abortStream( void ) { return rtapi_->abortStream(); }
inline bool RtAudio :: isStreamOpen( void ) const { return rtapi_->isStreamOpen(); }
inline bool RtAudio :: isStreamRunning( void ) const { return rtapi_->isStreamRunning(); }
inline bool RtAudio :: isStreamOpen( void ) const throw() { return rtapi_->isStreamOpen(); }
inline bool RtAudio :: isStreamRunning( void ) const throw() { return rtapi_->isStreamRunning(); }
inline long RtAudio :: getStreamLatency( void ) { return rtapi_->getStreamLatency(); }
inline unsigned int RtAudio :: getStreamSampleRate( void ) { return rtapi_->getStreamSampleRate(); }
inline double RtAudio :: getStreamTime( void ) { return rtapi_->getStreamTime(); }
inline void RtAudio :: setStreamTime( double time ) { return rtapi_->setStreamTime( time ); }
inline void RtAudio :: showWarnings( bool value ) { rtapi_->showWarnings( value ); }
inline void RtAudio :: showWarnings( bool value ) throw() { rtapi_->showWarnings( value ); }
// RtApi Subclass prototypes.
@ -882,20 +852,21 @@ public:
RtApiCore();
~RtApiCore();
RtAudio::Api getCurrentApi( void ) override { return RtAudio::MACOSX_CORE; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
unsigned int getDefaultOutputDevice( void ) override;
unsigned int getDefaultInputDevice( void ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
RtAudio::Api getCurrentApi( void ) { return RtAudio::MACOSX_CORE; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
unsigned int getDefaultOutputDevice( void );
unsigned int getDefaultInputDevice( void );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
long getStreamLatency( void );
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesirable results!
// will most likely produce highly undesireable results!
bool callbackEvent( AudioDeviceID deviceId,
const AudioBufferList *inBufferList,
const AudioBufferList *outBufferList );
@ -905,7 +876,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options ) override;
RtAudio::StreamOptions *options );
static const char* getErrorCode( OSStatus code );
};
@ -919,18 +890,19 @@ public:
RtApiJack();
~RtApiJack();
RtAudio::Api getCurrentApi( void ) override { return RtAudio::UNIX_JACK; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
RtAudio::Api getCurrentApi( void ) { return RtAudio::UNIX_JACK; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
long getStreamLatency( void );
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesirable results!
// will most likely produce highly undesireable results!
bool callbackEvent( unsigned long nframes );
private:
@ -938,9 +910,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options ) override;
bool shouldAutoconnect_;
RtAudio::StreamOptions *options );
};
#endif
@ -953,20 +923,19 @@ public:
RtApiAsio();
~RtApiAsio();
RtAudio::Api getCurrentApi( void ) override { return RtAudio::WINDOWS_ASIO; }
unsigned int getDeviceCount( void ) override;
unsigned int getDefaultOutputDevice( void ) override;
unsigned int getDefaultInputDevice( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_ASIO; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
long getStreamLatency( void );
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesirable results!
// will most likely produce highly undesireable results!
bool callbackEvent( long bufferIndex );
private:
@ -977,7 +946,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options ) override;
RtAudio::StreamOptions *options );
};
#endif
@ -990,20 +959,21 @@ public:
RtApiDs();
~RtApiDs();
RtAudio::Api getCurrentApi( void ) override { return RtAudio::WINDOWS_DS; }
unsigned int getDeviceCount( void ) override;
unsigned int getDefaultOutputDevice( void ) override;
unsigned int getDefaultInputDevice( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_DS; }
unsigned int getDeviceCount( void );
unsigned int getDefaultOutputDevice( void );
unsigned int getDefaultInputDevice( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
long getStreamLatency( void );
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesirable results!
// will most likely produce highly undesireable results!
void callbackEvent( void );
private:
@ -1015,7 +985,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options ) override;
RtAudio::StreamOptions *options );
};
#endif
@ -1028,15 +998,17 @@ class RtApiWasapi : public RtApi
{
public:
RtApiWasapi();
virtual ~RtApiWasapi();
~RtApiWasapi();
RtAudio::Api getCurrentApi( void ) override { return RtAudio::WINDOWS_WASAPI; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_WASAPI; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
unsigned int getDefaultOutputDevice( void );
unsigned int getDefaultInputDevice( void );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
private:
bool coInitialized_;
@ -1045,7 +1017,7 @@ private:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int* bufferSize,
RtAudio::StreamOptions* options ) override;
RtAudio::StreamOptions* options );
static DWORD WINAPI runWasapiThread( void* wasapiPtr );
static DWORD WINAPI stopWasapiThread( void* wasapiPtr );
@ -1063,18 +1035,18 @@ public:
RtApiAlsa();
~RtApiAlsa();
RtAudio::Api getCurrentApi() override { return RtAudio::LINUX_ALSA; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
RtAudio::Api getCurrentApi() { return RtAudio::LINUX_ALSA; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesirable results!
// will most likely produce highly undesireable results!
void callbackEvent( void );
private:
@ -1084,7 +1056,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options ) override;
RtAudio::StreamOptions *options );
};
#endif
@ -1095,27 +1067,28 @@ class RtApiPulse: public RtApi
{
public:
~RtApiPulse();
RtAudio::Api getCurrentApi() override { return RtAudio::LINUX_PULSE; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
RtAudio::Api getCurrentApi() { return RtAudio::LINUX_PULSE; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesirable results!
// will most likely produce highly undesireable results!
void callbackEvent( void );
private:
void collectDeviceInfo( void );
std::vector<RtAudio::DeviceInfo> devices_;
void saveDeviceInfo( void );
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options ) override;
RtAudio::StreamOptions *options );
};
#endif
@ -1128,18 +1101,18 @@ public:
RtApiOss();
~RtApiOss();
RtAudio::Api getCurrentApi() override { return RtAudio::LINUX_OSS; }
unsigned int getDeviceCount( void ) override;
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) override;
void closeStream( void ) override;
void startStream( void ) override;
void stopStream( void ) override;
void abortStream( void ) override;
RtAudio::Api getCurrentApi() { return RtAudio::LINUX_OSS; }
unsigned int getDeviceCount( void );
RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
void closeStream( void );
void startStream( void );
void stopStream( void );
void abortStream( void );
// This function is intended for internal use only. It must be
// public because it is called by the internal callback handler,
// which is not a member of RtAudio. External use of this function
// will most likely produce highly undesirable results!
// will most likely produce highly undesireable results!
void callbackEvent( void );
private:
@ -1147,7 +1120,7 @@ public:
bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options ) override;
RtAudio::StreamOptions *options );
};
#endif
@ -1159,20 +1132,20 @@ class RtApiDummy: public RtApi
public:
RtApiDummy() { errorText_ = "RtApiDummy: This class provides no functionality."; error( RtAudioError::WARNING ); }
RtAudio::Api getCurrentApi( void ) override { return RtAudio::RTAUDIO_DUMMY; }
unsigned int getDeviceCount( void ) override { return 0; }
RtAudio::DeviceInfo getDeviceInfo( unsigned int /*device*/ ) override { RtAudio::DeviceInfo info; return info; }
void closeStream( void ) override {}
void startStream( void ) override {}
void stopStream( void ) override {}
void abortStream( void ) override {}
RtAudio::Api getCurrentApi( void ) { return RtAudio::RTAUDIO_DUMMY; }
unsigned int getDeviceCount( void ) { return 0; }
RtAudio::DeviceInfo getDeviceInfo( unsigned int /*device*/ ) { RtAudio::DeviceInfo info; return info; }
void closeStream( void ) {}
void startStream( void ) {}
void stopStream( void ) {}
void abortStream( void ) {}
private:
bool probeDeviceOpen( unsigned int /*device*/, StreamMode /*mode*/, unsigned int /*channels*/,
unsigned int /*firstChannel*/, unsigned int /*sampleRate*/,
RtAudioFormat /*format*/, unsigned int * /*bufferSize*/,
RtAudio::StreamOptions * /*options*/ ) override { return false; }
RtAudio::StreamOptions * /*options*/ ) { return false; }
};
#endif

61
external/rtaudio/readme vendored Normal file
View File

@ -0,0 +1,61 @@
RtAudio - a set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO and WASAPI) operating systems.
By Gary P. Scavone, 2001-2014.
This distribution of RtAudio contains the following:
doc: RtAudio documentation (see doc/html/index.html)
tests: example RtAudio programs
include: header and source files necessary for ASIO, DS & OSS compilation
tests/Windows: Visual C++ .net test program workspace and projects
OVERVIEW:
RtAudio is a set of C++ classes that provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, JACK, and OSS), Macintosh OS X, SGI, and Windows (DirectSound, ASIO and WASAPI) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives:
- object-oriented C++ design
- simple, common API across all supported platforms
- only one source and one header file for easy inclusion in programming projects
- allow simultaneous multi-api support
- support dynamic connection of devices
- provide extensive audio device parameter control
- allow audio device capability probing
- automatic internal conversion for data format, channel number compensation, (de)interleaving, and byte-swapping
RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance. See the \ref apinotes section for information specific to each of the supported audio APIs.
FURTHER READING:
For complete documentation on RtAudio, see the doc directory of the distribution or surf to http://www.music.mcgill.ca/~gary/rtaudio/.
LEGAL AND ETHICAL:
The RtAudio license is similar to the MIT License.
RtAudio: a set of realtime audio i/o C++ classes
Copyright (c) 2001-2014 Gary P. Scavone
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Any person wishing to distribute modifications to the Software is
asked to send the modifications to the original developer so that
they can be incorporated into the canonical version. This is,
however, not a binding provision of this license.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

4
external/rtl-sdr-release/AUTHORS vendored Normal file
View File

@ -0,0 +1,4 @@
Steve Markgraf <steve@steve-m.de>
Dimitri Stolnikov <horiz0n@gmx.net>
Hoernchen <la@tfc-server.de>
Kyle Keen <keenerd@gmail.com>

339
external/rtl-sdr-release/COPYING vendored Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

504
external/rtl-sdr-release/COPYING.libusbx vendored Normal file
View File

@ -0,0 +1,504 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

6
external/rtl-sdr-release/README vendored Normal file
View File

@ -0,0 +1,6 @@
rtl-sdr
turns your Realtek RTL2832 based DVB dongle into a SDR receiver
======================================================================
For more information see:
http://sdr.osmocom.org/trac/wiki/rtl-sdr

View File

@ -0,0 +1,10 @@
The Windows build is using
https://github.com/libusbx/libusbx 33ba1231a1b07425eaa83935f84b2e4b7f904f35
and
http://sources.redhat.com/pthreads-win32/ cvs
See the corresponding COPYING* files for the license text.
You might need to grab the runtime from
http://www.microsoft.com/en-us/download/details.aspx?id=8328
or
http://www.microsoft.com/en-us/download/details.aspx?id=13523

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More