From: wittend99
Date: Fri, 12 Oct 2012 21:49:51 +0000 (+0000)
Subject: Convert line endings to UNIX style for readability.
X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=04782fc24145a689873589506aae4dcca6524c3d;p=freetel-svn-tracking.git
Convert line endings to UNIX style for readability.
git-svn-id: https://svn.code.sf.net/p/freetel/code@745 01035d8c-6547-0410-b346-abe4f91aad63
---
diff --git a/fdmdv2/build/fdmdv2.mk b/fdmdv2/build/fdmdv2.mk
index 2b96faaa..d06bdb59 100644
--- a/fdmdv2/build/fdmdv2.mk
+++ b/fdmdv2/build/fdmdv2.mk
@@ -13,7 +13,7 @@ CurrentFileName :=
CurrentFilePath :=
CurrentFileFullPath :=
User :=OFA-Staff
-Date :=10/9/2012
+Date :=10/12/2012
CodeLitePath :="C:\bin\CodeLite"
LinkerName :=g++
SharedObjectLinkerName :=g++ -shared -fPIC
@@ -50,8 +50,8 @@ LibPath := $(LibraryPathSwitch). $(LibraryPathSwitch)/bin/MinGW/m
AR := ar rcus
CXX := g++
CC := gcc
-CXXFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"674\" $(Preprocessors)
-CFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"674\" $(Preprocessors)
+CXXFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"744\" $(Preprocessors)
+CFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"744\" $(Preprocessors)
##
diff --git a/fdmdv2/build/fdmdv2.workspace b/fdmdv2/build/fdmdv2.workspace
index bd99de20..db92989a 100644
--- a/fdmdv2/build/fdmdv2.workspace
+++ b/fdmdv2/build/fdmdv2.workspace
@@ -9,4 +9,7 @@
+
+
+
diff --git a/fdmdv2/extern/include/portaudiocpp/AsioDeviceAdapter.hxx b/fdmdv2/extern/include/portaudiocpp/AsioDeviceAdapter.hxx
index 3291457a..a107c848 100644
--- a/fdmdv2/extern/include/portaudiocpp/AsioDeviceAdapter.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/AsioDeviceAdapter.hxx
@@ -28,7 +28,7 @@ namespace portaudio
void showControlPanel(void *systemSpecific);
- const char *inputChannelName(int channelIndex) const;
+ const char *inputChannelName(int channelIndex) const;
const char *outputChannelName(int channelIndex) const;
private:
diff --git a/fdmdv2/extern/include/portaudiocpp/AutoSystem.hxx b/fdmdv2/extern/include/portaudiocpp/AutoSystem.hxx
index 7c5889e5..be4da1a0 100644
--- a/fdmdv2/extern/include/portaudiocpp/AutoSystem.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/AutoSystem.hxx
@@ -1,62 +1,62 @@
-#ifndef INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
-#define INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudiocpp/System.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-namespace portaudio
-{
-
-
- //////
- /// @brief A RAII idiom class to ensure automatic clean-up when an exception is
- /// raised.
- ///
- /// A simple helper class which uses the 'Resource Acquisition is Initialization'
- /// idiom (RAII). Use this class to initialize/terminate the System rather than
- /// using System directly. AutoSystem must be created on stack and must be valid
- /// throughout the time you wish to use PortAudioCpp. Your 'main' function might be
- /// a good place for it.
- ///
- /// To avoid having to type portaudio::System::instance().xyz() all the time, it's usually
- /// a good idea to make a reference to the System which can be accessed directly.
- /// @verbatim
- /// portaudio::AutoSys autoSys;
- /// portaudio::System &sys = portaudio::System::instance();
- /// @endverbatim
- //////
- class AutoSystem
- {
- public:
- AutoSystem(bool initialize = true)
- {
- if (initialize)
- System::initialize();
- }
-
- ~AutoSystem()
- {
- if (System::exists())
- System::terminate();
- }
-
- void initialize()
- {
- System::initialize();
- }
-
- void terminate()
- {
- System::terminate();
- }
- };
-
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
+#ifndef INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
+#define INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+ //////
+ /// @brief A RAII idiom class to ensure automatic clean-up when an exception is
+ /// raised.
+ ///
+ /// A simple helper class which uses the 'Resource Acquisition is Initialization'
+ /// idiom (RAII). Use this class to initialize/terminate the System rather than
+ /// using System directly. AutoSystem must be created on stack and must be valid
+ /// throughout the time you wish to use PortAudioCpp. Your 'main' function might be
+ /// a good place for it.
+ ///
+ /// To avoid having to type portaudio::System::instance().xyz() all the time, it's usually
+ /// a good idea to make a reference to the System which can be accessed directly.
+ /// @verbatim
+ /// portaudio::AutoSys autoSys;
+ /// portaudio::System &sys = portaudio::System::instance();
+ /// @endverbatim
+ //////
+ class AutoSystem
+ {
+ public:
+ AutoSystem(bool initialize = true)
+ {
+ if (initialize)
+ System::initialize();
+ }
+
+ ~AutoSystem()
+ {
+ if (System::exists())
+ System::terminate();
+ }
+
+ void initialize()
+ {
+ System::initialize();
+ }
+
+ void terminate()
+ {
+ System::terminate();
+ }
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/BlockingStream.hxx b/fdmdv2/extern/include/portaudiocpp/BlockingStream.hxx
index 9653550f..7b67c073 100644
--- a/fdmdv2/extern/include/portaudiocpp/BlockingStream.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/BlockingStream.hxx
@@ -1,45 +1,45 @@
-#ifndef INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
-#define INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudiocpp/Stream.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-namespace portaudio
-{
-
-
-
- //////
- /// @brief Stream class for blocking read/write-style input and output.
- //////
- class BlockingStream : public Stream
- {
- public:
- BlockingStream();
- BlockingStream(const StreamParameters ¶meters);
- ~BlockingStream();
-
- void open(const StreamParameters ¶meters);
-
- void read(void *buffer, unsigned long numFrames);
- void write(const void *buffer, unsigned long numFrames);
-
- signed long availableReadSize() const;
- signed long availableWriteSize() const;
-
- private:
- BlockingStream(const BlockingStream &); // non-copyable
- BlockingStream &operator=(const BlockingStream &); // non-copyable
- };
-
-
-
-} // portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
-
+#ifndef INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+#define INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudiocpp/Stream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+
+ //////
+ /// @brief Stream class for blocking read/write-style input and output.
+ //////
+ class BlockingStream : public Stream
+ {
+ public:
+ BlockingStream();
+ BlockingStream(const StreamParameters ¶meters);
+ ~BlockingStream();
+
+ void open(const StreamParameters ¶meters);
+
+ void read(void *buffer, unsigned long numFrames);
+ void write(const void *buffer, unsigned long numFrames);
+
+ signed long availableReadSize() const;
+ signed long availableWriteSize() const;
+
+ private:
+ BlockingStream(const BlockingStream &); // non-copyable
+ BlockingStream &operator=(const BlockingStream &); // non-copyable
+ };
+
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+
diff --git a/fdmdv2/extern/include/portaudiocpp/CFunCallbackStream.hxx b/fdmdv2/extern/include/portaudiocpp/CFunCallbackStream.hxx
index f4d5918d..f01f028d 100644
--- a/fdmdv2/extern/include/portaudiocpp/CFunCallbackStream.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/CFunCallbackStream.hxx
@@ -1,49 +1,49 @@
-#ifndef INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX
-#define INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-#include "portaudiocpp/CallbackStream.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s)
-namespace portaudio
-{
- class StreamParameters;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
- // -----------------------------------------------------------------------------------
-
- //////
- /// @brief Callback stream using a free function with C linkage. It's important that the function
- /// the passed function pointer points to is declared ``extern "C"''.
- //////
- class CFunCallbackStream : public CallbackStream
- {
- public:
- CFunCallbackStream();
- CFunCallbackStream(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData);
- ~CFunCallbackStream();
-
- void open(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData);
-
- private:
- CFunCallbackStream(const CFunCallbackStream &); // non-copyable
- CFunCallbackStream &operator=(const CFunCallbackStream &); // non-copyable
- };
-
- // -----------------------------------------------------------------------------------
-} // portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
-
+#ifndef INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s)
+namespace portaudio
+{
+ class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Callback stream using a free function with C linkage. It's important that the function
+ /// the passed function pointer points to is declared ``extern "C"''.
+ //////
+ class CFunCallbackStream : public CallbackStream
+ {
+ public:
+ CFunCallbackStream();
+ CFunCallbackStream(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData);
+ ~CFunCallbackStream();
+
+ void open(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData);
+
+ private:
+ CFunCallbackStream(const CFunCallbackStream &); // non-copyable
+ CFunCallbackStream &operator=(const CFunCallbackStream &); // non-copyable
+ };
+
+ // -----------------------------------------------------------------------------------
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+
diff --git a/fdmdv2/extern/include/portaudiocpp/CallbackInterface.hxx b/fdmdv2/extern/include/portaudiocpp/CallbackInterface.hxx
index 18d473b2..dfd313d2 100644
--- a/fdmdv2/extern/include/portaudiocpp/CallbackInterface.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/CallbackInterface.hxx
@@ -1,47 +1,47 @@
-#ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
-#define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
-
-// ---------------------------------------------------------------------------------------
-#include "portaudio.h"
-
-// ---------------------------------------------------------------------------------------
-namespace portaudio
-{
- // -----------------------------------------------------------------------------------
- //////
- /// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the
- /// paCallbackFun method).
- //////
- class CallbackInterface
- {
- public:
- virtual ~CallbackInterface() {}
- virtual int paCallbackFun(
- const void *inputBuffer,
- void *outputBuffer,
- unsigned long numFrames,
- const PaStreamCallbackTimeInfo *timeInfo,
- PaStreamCallbackFlags statusFlags
- ) = 0;
- };
-
- // -----------------------------------------------------------------------------------
- namespace impl
- {
- extern "C"
- {
- int callbackInterfaceToPaCallbackAdapter(
- const void *inputBuffer,
- void *outputBuffer,
- unsigned long numFrames,
- const PaStreamCallbackTimeInfo *timeInfo,
- PaStreamCallbackFlags statusFlags,
- void *userData
- );
- } // extern "C"
- }
- // -----------------------------------------------------------------------------------
-} // namespace portaudio
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
+#ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
+#define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
+
+// ---------------------------------------------------------------------------------------
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+ //////
+ /// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the
+ /// paCallbackFun method).
+ //////
+ class CallbackInterface
+ {
+ public:
+ virtual ~CallbackInterface() {}
+ virtual int paCallbackFun(
+ const void *inputBuffer,
+ void *outputBuffer,
+ unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo,
+ PaStreamCallbackFlags statusFlags
+ ) = 0;
+ };
+
+ // -----------------------------------------------------------------------------------
+ namespace impl
+ {
+ extern "C"
+ {
+ int callbackInterfaceToPaCallbackAdapter(
+ const void *inputBuffer,
+ void *outputBuffer,
+ unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData
+ );
+ } // extern "C"
+ }
+ // -----------------------------------------------------------------------------------
+} // namespace portaudio
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/CallbackStream.hxx b/fdmdv2/extern/include/portaudiocpp/CallbackStream.hxx
index 810b900c..834a3c2b 100644
--- a/fdmdv2/extern/include/portaudiocpp/CallbackStream.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/CallbackStream.hxx
@@ -1,37 +1,37 @@
-#ifndef INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
-#define INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
-
-// ---------------------------------------------------------------------------------------
-#include "portaudio.h"
-#include "portaudiocpp/Stream.hxx"
-
-// ---------------------------------------------------------------------------------------
-// Declaration(s):
-namespace portaudio
-{
-
-
- //////
- /// @brief Base class for all Streams which use a callback-based mechanism.
- //////
- class CallbackStream : public Stream
- {
- protected:
- CallbackStream();
- virtual ~CallbackStream();
-
- public:
- // stream info (time-varying)
- double cpuLoad() const;
-
- private:
- CallbackStream(const CallbackStream &); // non-copyable
- CallbackStream &operator=(const CallbackStream &); // non-copyable
- };
-
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
+#ifndef INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+#include "portaudio.h"
+#include "portaudiocpp/Stream.hxx"
+
+// ---------------------------------------------------------------------------------------
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Base class for all Streams which use a callback-based mechanism.
+ //////
+ class CallbackStream : public Stream
+ {
+ protected:
+ CallbackStream();
+ virtual ~CallbackStream();
+
+ public:
+ // stream info (time-varying)
+ double cpuLoad() const;
+
+ private:
+ CallbackStream(const CallbackStream &); // non-copyable
+ CallbackStream &operator=(const CallbackStream &); // non-copyable
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/CppFunCallbackStream.hxx b/fdmdv2/extern/include/portaudiocpp/CppFunCallbackStream.hxx
index 08d1aabe..c43b6431 100644
--- a/fdmdv2/extern/include/portaudiocpp/CppFunCallbackStream.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/CppFunCallbackStream.hxx
@@ -1,86 +1,86 @@
-#ifndef INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
-#define INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-#include "portaudiocpp/CallbackStream.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class StreamParameters;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
-
- namespace impl
- {
- extern "C"
- {
- int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
- void *userData);
- } // extern "C"
- }
-
- // -----------------------------------------------------------------------------------
-
- //////
- /// @brief Callback stream using a C++ function (either a free function or a static function)
- /// callback.
- //////
- class FunCallbackStream : public CallbackStream
- {
- public:
- typedef int (*CallbackFunPtr)(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
- void *userData);
-
- // -------------------------------------------------------------------------------
-
- //////
- /// @brief Simple structure containing a function pointer to the C++ callback function and a
- /// (void) pointer to the user supplied data.
- //////
- struct CppToCCallbackData
- {
- CppToCCallbackData();
- CppToCCallbackData(CallbackFunPtr funPtr, void *userData);
- void init(CallbackFunPtr funPtr, void *userData);
-
- CallbackFunPtr funPtr;
- void *userData;
- };
-
- // -------------------------------------------------------------------------------
-
- FunCallbackStream();
- FunCallbackStream(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData);
- ~FunCallbackStream();
-
- void open(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData);
-
- private:
- FunCallbackStream(const FunCallbackStream &); // non-copyable
- FunCallbackStream &operator=(const FunCallbackStream &); // non-copyable
-
- CppToCCallbackData adapterData_;
-
- void open(const StreamParameters ¶meters);
- };
-
-
-} // portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
+#ifndef INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ namespace impl
+ {
+ extern "C"
+ {
+ int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
+ void *userData);
+ } // extern "C"
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Callback stream using a C++ function (either a free function or a static function)
+ /// callback.
+ //////
+ class FunCallbackStream : public CallbackStream
+ {
+ public:
+ typedef int (*CallbackFunPtr)(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
+ void *userData);
+
+ // -------------------------------------------------------------------------------
+
+ //////
+ /// @brief Simple structure containing a function pointer to the C++ callback function and a
+ /// (void) pointer to the user supplied data.
+ //////
+ struct CppToCCallbackData
+ {
+ CppToCCallbackData();
+ CppToCCallbackData(CallbackFunPtr funPtr, void *userData);
+ void init(CallbackFunPtr funPtr, void *userData);
+
+ CallbackFunPtr funPtr;
+ void *userData;
+ };
+
+ // -------------------------------------------------------------------------------
+
+ FunCallbackStream();
+ FunCallbackStream(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData);
+ ~FunCallbackStream();
+
+ void open(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData);
+
+ private:
+ FunCallbackStream(const FunCallbackStream &); // non-copyable
+ FunCallbackStream &operator=(const FunCallbackStream &); // non-copyable
+
+ CppToCCallbackData adapterData_;
+
+ void open(const StreamParameters ¶meters);
+ };
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/Device.hxx b/fdmdv2/extern/include/portaudiocpp/Device.hxx
index db5018fa..6b579f6d 100644
--- a/fdmdv2/extern/include/portaudiocpp/Device.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/Device.hxx
@@ -1,91 +1,91 @@
-#ifndef INCLUDED_PORTAUDIO_DEVICE_HXX
-#define INCLUDED_PORTAUDIO_DEVICE_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include
-
-#include "portaudio.h"
-
-#include "portaudiocpp/SampleDataFormat.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class System;
- class HostApi;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
- //////
- /// @brief Class which represents a PortAudio device in the System.
- ///
- /// A single physical device in the system may have multiple PortAudio
- /// Device representations using different HostApi 's though. A Device
- /// can be half-duplex or full-duplex. A half-duplex Device can be used
- /// to create a half-duplex Stream. A full-duplex Device can be used to
- /// create a full-duplex Stream. If supported by the HostApi, two
- /// half-duplex Devices can even be used to create a full-duplex Stream.
- ///
- /// Note that Device objects are very light-weight and can be passed around
- /// by-value.
- //////
- class Device
- {
- public:
- // query info: name, max in channels, max out channels,
- // default low/hight input/output latency, default sample rate
- PaDeviceIndex index() const;
- const char *name() const;
- int maxInputChannels() const;
- int maxOutputChannels() const;
- PaTime defaultLowInputLatency() const;
- PaTime defaultHighInputLatency() const;
- PaTime defaultLowOutputLatency() const;
- PaTime defaultHighOutputLatency() const;
- double defaultSampleRate() const;
-
- bool isInputOnlyDevice() const; // extended
- bool isOutputOnlyDevice() const; // extended
- bool isFullDuplexDevice() const; // extended
- bool isSystemDefaultInputDevice() const; // extended
- bool isSystemDefaultOutputDevice() const; // extended
- bool isHostApiDefaultInputDevice() const; // extended
- bool isHostApiDefaultOutputDevice() const; // extended
-
- bool operator==(const Device &rhs);
- bool operator!=(const Device &rhs);
-
- // host api reference
- HostApi &hostApi();
- const HostApi &hostApi() const;
-
- private:
- PaDeviceIndex index_;
- const PaDeviceInfo *info_;
-
- private:
- friend class System;
-
- explicit Device(PaDeviceIndex index);
- ~Device();
-
- Device(const Device &); // non-copyable
- Device &operator=(const Device &); // non-copyable
- };
-
- // -----------------------------------------------------------------------------------
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_DEVICE_HXX
-
+#ifndef INCLUDED_PORTAUDIO_DEVICE_HXX
+#define INCLUDED_PORTAUDIO_DEVICE_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include
+
+#include "portaudio.h"
+
+#include "portaudiocpp/SampleDataFormat.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class System;
+ class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+ //////
+ /// @brief Class which represents a PortAudio device in the System.
+ ///
+ /// A single physical device in the system may have multiple PortAudio
+ /// Device representations using different HostApi 's though. A Device
+ /// can be half-duplex or full-duplex. A half-duplex Device can be used
+ /// to create a half-duplex Stream. A full-duplex Device can be used to
+ /// create a full-duplex Stream. If supported by the HostApi, two
+ /// half-duplex Devices can even be used to create a full-duplex Stream.
+ ///
+ /// Note that Device objects are very light-weight and can be passed around
+ /// by-value.
+ //////
+ class Device
+ {
+ public:
+ // query info: name, max in channels, max out channels,
+ // default low/hight input/output latency, default sample rate
+ PaDeviceIndex index() const;
+ const char *name() const;
+ int maxInputChannels() const;
+ int maxOutputChannels() const;
+ PaTime defaultLowInputLatency() const;
+ PaTime defaultHighInputLatency() const;
+ PaTime defaultLowOutputLatency() const;
+ PaTime defaultHighOutputLatency() const;
+ double defaultSampleRate() const;
+
+ bool isInputOnlyDevice() const; // extended
+ bool isOutputOnlyDevice() const; // extended
+ bool isFullDuplexDevice() const; // extended
+ bool isSystemDefaultInputDevice() const; // extended
+ bool isSystemDefaultOutputDevice() const; // extended
+ bool isHostApiDefaultInputDevice() const; // extended
+ bool isHostApiDefaultOutputDevice() const; // extended
+
+ bool operator==(const Device &rhs);
+ bool operator!=(const Device &rhs);
+
+ // host api reference
+ HostApi &hostApi();
+ const HostApi &hostApi() const;
+
+ private:
+ PaDeviceIndex index_;
+ const PaDeviceInfo *info_;
+
+ private:
+ friend class System;
+
+ explicit Device(PaDeviceIndex index);
+ ~Device();
+
+ Device(const Device &); // non-copyable
+ Device &operator=(const Device &); // non-copyable
+ };
+
+ // -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_DEVICE_HXX
+
diff --git a/fdmdv2/extern/include/portaudiocpp/DirectionSpecificStreamParameters.hxx b/fdmdv2/extern/include/portaudiocpp/DirectionSpecificStreamParameters.hxx
index 5001149b..d09a7c58 100644
--- a/fdmdv2/extern/include/portaudiocpp/DirectionSpecificStreamParameters.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/DirectionSpecificStreamParameters.hxx
@@ -1,77 +1,77 @@
-#ifndef INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
-#define INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include
-
-#include "portaudio.h"
-
-#include "portaudiocpp/System.hxx"
-#include "portaudiocpp/SampleDataFormat.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class Device;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
- //////
- /// @brief All parameters for one direction (either in or out) of a Stream. Together with
- /// parameters common to both directions, two DirectionSpecificStreamParameters can make up
- /// a StreamParameters object which contains all parameters for a Stream.
- //////
- class DirectionSpecificStreamParameters
- {
- public:
- static DirectionSpecificStreamParameters null();
-
- DirectionSpecificStreamParameters();
- DirectionSpecificStreamParameters(const Device &device, int numChannels, SampleDataFormat format,
- bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo);
-
- // Set up methods:
- void setDevice(const Device &device);
- void setNumChannels(int numChannels);
-
- void setSampleFormat(SampleDataFormat format, bool interleaved = true);
- void setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved = true);
-
- void setSuggestedLatency(PaTime latency);
-
- void setHostApiSpecificStreamInfo(void *streamInfo);
-
- // Accessor methods:
- PaStreamParameters *paStreamParameters();
- const PaStreamParameters *paStreamParameters() const;
-
- Device &device() const;
- int numChannels() const;
-
- SampleDataFormat sampleFormat() const;
- bool isSampleFormatInterleaved() const;
- bool isSampleFormatHostApiSpecific() const;
- PaSampleFormat hostApiSpecificSampleFormat() const;
-
- PaTime suggestedLatency() const;
-
- void *hostApiSpecificStreamInfo() const;
-
- private:
- PaStreamParameters paStreamParameters_;
- };
-
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
+#ifndef INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
+#define INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include
+
+#include "portaudio.h"
+
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/SampleDataFormat.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class Device;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+ //////
+ /// @brief All parameters for one direction (either in or out) of a Stream. Together with
+ /// parameters common to both directions, two DirectionSpecificStreamParameters can make up
+ /// a StreamParameters object which contains all parameters for a Stream.
+ //////
+ class DirectionSpecificStreamParameters
+ {
+ public:
+ static DirectionSpecificStreamParameters null();
+
+ DirectionSpecificStreamParameters();
+ DirectionSpecificStreamParameters(const Device &device, int numChannels, SampleDataFormat format,
+ bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo);
+
+ // Set up methods:
+ void setDevice(const Device &device);
+ void setNumChannels(int numChannels);
+
+ void setSampleFormat(SampleDataFormat format, bool interleaved = true);
+ void setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved = true);
+
+ void setSuggestedLatency(PaTime latency);
+
+ void setHostApiSpecificStreamInfo(void *streamInfo);
+
+ // Accessor methods:
+ PaStreamParameters *paStreamParameters();
+ const PaStreamParameters *paStreamParameters() const;
+
+ Device &device() const;
+ int numChannels() const;
+
+ SampleDataFormat sampleFormat() const;
+ bool isSampleFormatInterleaved() const;
+ bool isSampleFormatHostApiSpecific() const;
+ PaSampleFormat hostApiSpecificSampleFormat() const;
+
+ PaTime suggestedLatency() const;
+
+ void *hostApiSpecificStreamInfo() const;
+
+ private:
+ PaStreamParameters paStreamParameters_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/Exception.hxx b/fdmdv2/extern/include/portaudiocpp/Exception.hxx
index 96e4ad2f..7e1b25ed 100644
--- a/fdmdv2/extern/include/portaudiocpp/Exception.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/Exception.hxx
@@ -1,108 +1,108 @@
-#ifndef INCLUDED_PORTAUDIO_EXCEPTION_HXX
-#define INCLUDED_PORTAUDIO_EXCEPTION_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include
-
-#include "portaudio.h"
-
-// ---------------------------------------------------------------------------------------
-
-namespace portaudio
-{
-
- //////
- /// @brief Base class for all exceptions PortAudioCpp can throw.
- ///
- /// Class is derived from std::exception.
- //////
- class Exception : public std::exception
- {
- public:
- virtual ~Exception() throw() {}
-
- virtual const char *what() const throw() = 0;
- };
-
- // -----------------------------------------------------------------------------------
-
- //////
- /// @brief Wrapper for PortAudio error codes to C++ exceptions.
- ///
- /// It wraps up PortAudio's error handling mechanism using
- /// C++ exceptions and is derived from std::exception for
- /// easy exception handling and to ease integration with
- /// other code.
- ///
- /// To know what exceptions each function may throw, look up
- /// the errors that can occure in the PortAudio documentation
- /// for the equivalent functions.
- ///
- /// Some functions are likely to throw an exception (such as
- /// Stream::open(), etc) and these should always be called in
- /// try{} catch{} blocks and the thrown exceptions should be
- /// handled properly (ie. the application shouldn't just abort,
- /// but merely display a warning dialog to the user or something).
- /// However nearly all functions in PortAudioCpp are capable
- /// of throwing exceptions. When a function like Stream::isStopped()
- /// throws an exception, it's such an exceptional state that it's
- /// not likely that it can be recovered. PaExceptions such as these
- /// can ``safely'' be left to be handled by some outer catch-all-like
- /// mechanism for unrecoverable errors.
- //////
- class PaException : public Exception
- {
- public:
- explicit PaException(PaError error);
-
- const char *what() const throw();
-
- PaError paError() const;
- const char *paErrorText() const;
-
- bool isHostApiError() const; // extended
- long lastHostApiError() const;
- const char *lastHostApiErrorText() const;
-
- bool operator==(const PaException &rhs) const;
- bool operator!=(const PaException &rhs) const;
-
- private:
- PaError error_;
- };
-
- // -----------------------------------------------------------------------------------
-
- //////
- /// @brief Exceptions specific to PortAudioCpp (ie. exceptions which do not have an
- /// equivalent PortAudio error code).
- //////
- class PaCppException : public Exception
- {
- public:
- enum ExceptionSpecifier
- {
- UNABLE_TO_ADAPT_DEVICE
- };
-
- PaCppException(ExceptionSpecifier specifier);
-
- const char *what() const throw();
-
- ExceptionSpecifier specifier() const;
-
- bool operator==(const PaCppException &rhs) const;
- bool operator!=(const PaCppException &rhs) const;
-
- private:
- ExceptionSpecifier specifier_;
- };
-
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_EXCEPTION_HXX
-
+#ifndef INCLUDED_PORTAUDIO_EXCEPTION_HXX
+#define INCLUDED_PORTAUDIO_EXCEPTION_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+ //////
+ /// @brief Base class for all exceptions PortAudioCpp can throw.
+ ///
+ /// Class is derived from std::exception.
+ //////
+ class Exception : public std::exception
+ {
+ public:
+ virtual ~Exception() throw() {}
+
+ virtual const char *what() const throw() = 0;
+ };
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Wrapper for PortAudio error codes to C++ exceptions.
+ ///
+ /// It wraps up PortAudio's error handling mechanism using
+ /// C++ exceptions and is derived from std::exception for
+ /// easy exception handling and to ease integration with
+ /// other code.
+ ///
+ /// To know what exceptions each function may throw, look up
+ /// the errors that can occure in the PortAudio documentation
+ /// for the equivalent functions.
+ ///
+ /// Some functions are likely to throw an exception (such as
+ /// Stream::open(), etc) and these should always be called in
+ /// try{} catch{} blocks and the thrown exceptions should be
+ /// handled properly (ie. the application shouldn't just abort,
+ /// but merely display a warning dialog to the user or something).
+ /// However nearly all functions in PortAudioCpp are capable
+ /// of throwing exceptions. When a function like Stream::isStopped()
+ /// throws an exception, it's such an exceptional state that it's
+ /// not likely that it can be recovered. PaExceptions such as these
+ /// can ``safely'' be left to be handled by some outer catch-all-like
+ /// mechanism for unrecoverable errors.
+ //////
+ class PaException : public Exception
+ {
+ public:
+ explicit PaException(PaError error);
+
+ const char *what() const throw();
+
+ PaError paError() const;
+ const char *paErrorText() const;
+
+ bool isHostApiError() const; // extended
+ long lastHostApiError() const;
+ const char *lastHostApiErrorText() const;
+
+ bool operator==(const PaException &rhs) const;
+ bool operator!=(const PaException &rhs) const;
+
+ private:
+ PaError error_;
+ };
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Exceptions specific to PortAudioCpp (ie. exceptions which do not have an
+ /// equivalent PortAudio error code).
+ //////
+ class PaCppException : public Exception
+ {
+ public:
+ enum ExceptionSpecifier
+ {
+ UNABLE_TO_ADAPT_DEVICE
+ };
+
+ PaCppException(ExceptionSpecifier specifier);
+
+ const char *what() const throw();
+
+ ExceptionSpecifier specifier() const;
+
+ bool operator==(const PaCppException &rhs) const;
+ bool operator!=(const PaCppException &rhs) const;
+
+ private:
+ ExceptionSpecifier specifier_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_EXCEPTION_HXX
+
diff --git a/fdmdv2/extern/include/portaudiocpp/HostApi.hxx b/fdmdv2/extern/include/portaudiocpp/HostApi.hxx
index a51cfe07..1f8080a4 100644
--- a/fdmdv2/extern/include/portaudiocpp/HostApi.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/HostApi.hxx
@@ -1,76 +1,76 @@
-#ifndef INCLUDED_PORTAUDIO_HOSTAPI_HXX
-#define INCLUDED_PORTAUDIO_HOSTAPI_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-#include "portaudiocpp/System.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class Device;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
-
- //////
- /// @brief HostApi represents a host API (usually type of driver) in the System.
- ///
- /// A single System can support multiple HostApi's each one typically having
- /// a set of Devices using that HostApi (usually driver type). All Devices in
- /// the HostApi can be enumerated and the default input/output Device for this
- /// HostApi can be retreived.
- //////
- class HostApi
- {
- public:
- typedef System::DeviceIterator DeviceIterator;
-
- // query info: id, name, numDevices
- PaHostApiTypeId typeId() const;
- PaHostApiIndex index() const;
- const char *name() const;
- int deviceCount() const;
-
- // iterate devices
- DeviceIterator devicesBegin();
- DeviceIterator devicesEnd();
-
- // default devices
- Device &defaultInputDevice() const;
- Device &defaultOutputDevice() const;
-
- // comparison operators
- bool operator==(const HostApi &rhs) const;
- bool operator!=(const HostApi &rhs) const;
-
- private:
- const PaHostApiInfo *info_;
- Device **devices_;
-
- private:
- friend class System;
-
- explicit HostApi(PaHostApiIndex index);
- ~HostApi();
-
- HostApi(const HostApi &); // non-copyable
- HostApi &operator=(const HostApi &); // non-copyable
- };
-
-
-}
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_HOSTAPI_HXX
-
+#ifndef INCLUDED_PORTAUDIO_HOSTAPI_HXX
+#define INCLUDED_PORTAUDIO_HOSTAPI_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class Device;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief HostApi represents a host API (usually type of driver) in the System.
+ ///
+ /// A single System can support multiple HostApi's each one typically having
+ /// a set of Devices using that HostApi (usually driver type). All Devices in
+ /// the HostApi can be enumerated and the default input/output Device for this
+ /// HostApi can be retreived.
+ //////
+ class HostApi
+ {
+ public:
+ typedef System::DeviceIterator DeviceIterator;
+
+ // query info: id, name, numDevices
+ PaHostApiTypeId typeId() const;
+ PaHostApiIndex index() const;
+ const char *name() const;
+ int deviceCount() const;
+
+ // iterate devices
+ DeviceIterator devicesBegin();
+ DeviceIterator devicesEnd();
+
+ // default devices
+ Device &defaultInputDevice() const;
+ Device &defaultOutputDevice() const;
+
+ // comparison operators
+ bool operator==(const HostApi &rhs) const;
+ bool operator!=(const HostApi &rhs) const;
+
+ private:
+ const PaHostApiInfo *info_;
+ Device **devices_;
+
+ private:
+ friend class System;
+
+ explicit HostApi(PaHostApiIndex index);
+ ~HostApi();
+
+ HostApi(const HostApi &); // non-copyable
+ HostApi &operator=(const HostApi &); // non-copyable
+ };
+
+
+}
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_HOSTAPI_HXX
+
diff --git a/fdmdv2/extern/include/portaudiocpp/InterfaceCallbackStream.hxx b/fdmdv2/extern/include/portaudiocpp/InterfaceCallbackStream.hxx
index 5e03035b..63ebf40b 100644
--- a/fdmdv2/extern/include/portaudiocpp/InterfaceCallbackStream.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/InterfaceCallbackStream.hxx
@@ -1,49 +1,49 @@
-#ifndef INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
-#define INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-#include "portaudiocpp/CallbackStream.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s)
-namespace portaudio
-{
- class StreamParameters;
- class CallbackInterface;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
-
- //////
- /// @brief Callback stream using an instance of an object that's derived from the CallbackInterface
- /// interface.
- //////
- class InterfaceCallbackStream : public CallbackStream
- {
- public:
- InterfaceCallbackStream();
- InterfaceCallbackStream(const StreamParameters ¶meters, CallbackInterface &instance);
- ~InterfaceCallbackStream();
-
- void open(const StreamParameters ¶meters, CallbackInterface &instance);
-
- private:
- InterfaceCallbackStream(const InterfaceCallbackStream &); // non-copyable
- InterfaceCallbackStream &operator=(const InterfaceCallbackStream &); // non-copyable
- };
-
-
-} // portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
+#ifndef INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s)
+namespace portaudio
+{
+ class StreamParameters;
+ class CallbackInterface;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Callback stream using an instance of an object that's derived from the CallbackInterface
+ /// interface.
+ //////
+ class InterfaceCallbackStream : public CallbackStream
+ {
+ public:
+ InterfaceCallbackStream();
+ InterfaceCallbackStream(const StreamParameters ¶meters, CallbackInterface &instance);
+ ~InterfaceCallbackStream();
+
+ void open(const StreamParameters ¶meters, CallbackInterface &instance);
+
+ private:
+ InterfaceCallbackStream(const InterfaceCallbackStream &); // non-copyable
+ InterfaceCallbackStream &operator=(const InterfaceCallbackStream &); // non-copyable
+ };
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/MemFunCallbackStream.hxx b/fdmdv2/extern/include/portaudiocpp/MemFunCallbackStream.hxx
index a04c5be3..4e70f265 100644
--- a/fdmdv2/extern/include/portaudiocpp/MemFunCallbackStream.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/MemFunCallbackStream.hxx
@@ -1,107 +1,107 @@
-#ifndef INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
-#define INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-#include "portaudiocpp/CallbackStream.hxx"
-#include "portaudiocpp/CallbackInterface.hxx"
-#include "portaudiocpp/StreamParameters.hxx"
-#include "portaudiocpp/Exception.hxx"
-#include "portaudiocpp/InterfaceCallbackStream.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-namespace portaudio
-{
-
-
- //////
- /// @brief Callback stream using a class's member function as a callback. Template argument T is the type of the
- /// class of which a member function is going to be used.
- ///
- /// Example usage:
- /// @verbatim MemFunCallback stream = MemFunCallbackStream(parameters, *this, &MyClass::myCallbackFunction); @endverbatim
- //////
- template
- class MemFunCallbackStream : public CallbackStream
- {
- public:
- typedef int (T::*CallbackFunPtr)(const void *, void *, unsigned long, const PaStreamCallbackTimeInfo *,
- PaStreamCallbackFlags);
-
- // -------------------------------------------------------------------------------
-
- MemFunCallbackStream()
- {
- }
-
- MemFunCallbackStream(const StreamParameters ¶meters, T &instance, CallbackFunPtr memFun) : adapter_(instance, memFun)
- {
- open(parameters);
- }
-
- ~MemFunCallbackStream()
- {
- close();
- }
-
- void open(const StreamParameters ¶meters, T &instance, CallbackFunPtr memFun)
- {
- // XXX: need to check if already open?
-
- adapter_.init(instance, memFun);
- open(parameters);
- }
-
- private:
- MemFunCallbackStream(const MemFunCallbackStream &); // non-copyable
- MemFunCallbackStream &operator=(const MemFunCallbackStream &); // non-copyable
-
- //////
- /// @brief Inner class which adapts a member function callback to a CallbackInterface compliant
- /// class (so it can be adapted using the paCallbackAdapter function).
- //////
- class MemFunToCallbackInterfaceAdapter : public CallbackInterface
- {
- public:
- MemFunToCallbackInterfaceAdapter() {}
- MemFunToCallbackInterfaceAdapter(T &instance, CallbackFunPtr memFun) : instance_(&instance), memFun_(memFun) {}
-
- void init(T &instance, CallbackFunPtr memFun)
- {
- instance_ = &instance;
- memFun_ = memFun;
- }
-
- int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)
- {
- return (instance_->*memFun_)(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);
- }
-
- private:
- T *instance_;
- CallbackFunPtr memFun_;
- };
-
- MemFunToCallbackInterfaceAdapter adapter_;
-
- void open(const StreamParameters ¶meters)
- {
- PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(),
- parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter,
- static_cast(&adapter_));
-
- if (err != paNoError)
- throw PaException(err);
- }
- };
-
-
-} // portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+#ifndef INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+#include "portaudiocpp/CallbackInterface.hxx"
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/InterfaceCallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Callback stream using a class's member function as a callback. Template argument T is the type of the
+ /// class of which a member function is going to be used.
+ ///
+ /// Example usage:
+ /// @verbatim MemFunCallback stream = MemFunCallbackStream(parameters, *this, &MyClass::myCallbackFunction); @endverbatim
+ //////
+ template
+ class MemFunCallbackStream : public CallbackStream
+ {
+ public:
+ typedef int (T::*CallbackFunPtr)(const void *, void *, unsigned long, const PaStreamCallbackTimeInfo *,
+ PaStreamCallbackFlags);
+
+ // -------------------------------------------------------------------------------
+
+ MemFunCallbackStream()
+ {
+ }
+
+ MemFunCallbackStream(const StreamParameters ¶meters, T &instance, CallbackFunPtr memFun) : adapter_(instance, memFun)
+ {
+ open(parameters);
+ }
+
+ ~MemFunCallbackStream()
+ {
+ close();
+ }
+
+ void open(const StreamParameters ¶meters, T &instance, CallbackFunPtr memFun)
+ {
+ // XXX: need to check if already open?
+
+ adapter_.init(instance, memFun);
+ open(parameters);
+ }
+
+ private:
+ MemFunCallbackStream(const MemFunCallbackStream &); // non-copyable
+ MemFunCallbackStream &operator=(const MemFunCallbackStream &); // non-copyable
+
+ //////
+ /// @brief Inner class which adapts a member function callback to a CallbackInterface compliant
+ /// class (so it can be adapted using the paCallbackAdapter function).
+ //////
+ class MemFunToCallbackInterfaceAdapter : public CallbackInterface
+ {
+ public:
+ MemFunToCallbackInterfaceAdapter() {}
+ MemFunToCallbackInterfaceAdapter(T &instance, CallbackFunPtr memFun) : instance_(&instance), memFun_(memFun) {}
+
+ void init(T &instance, CallbackFunPtr memFun)
+ {
+ instance_ = &instance;
+ memFun_ = memFun;
+ }
+
+ int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)
+ {
+ return (instance_->*memFun_)(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);
+ }
+
+ private:
+ T *instance_;
+ CallbackFunPtr memFun_;
+ };
+
+ MemFunToCallbackInterfaceAdapter adapter_;
+
+ void open(const StreamParameters ¶meters)
+ {
+ PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(),
+ parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter,
+ static_cast(&adapter_));
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+ };
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/PortAudioCpp.hxx b/fdmdv2/extern/include/portaudiocpp/PortAudioCpp.hxx
index 9b9dfe36..0b9fdee7 100644
--- a/fdmdv2/extern/include/portaudiocpp/PortAudioCpp.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/PortAudioCpp.hxx
@@ -1,109 +1,109 @@
-#ifndef INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
-#define INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
-
-// ---------------------------------------------------------------------------------------
-
-//////
-/// @mainpage PortAudioCpp
-///
-/// PortAudioCpp - A Native C++ Binding of PortAudio V19
-/// PortAudio
-///
-/// PortAudio is a portable and mature C API for accessing audio hardware. It offers both callback-based and blocking
-/// style input and output, deals with sample data format conversions, dithering and much more. There are a large number
-/// of implementations available for various platforms including Windows MME, Windows DirectX, Windows and MacOS (Classic)
-/// ASIO, MacOS Classic SoundManager, MacOS X CoreAudio, OSS (Linux), Linux ALSA, JACK (MacOS X and Linux) and SGI Irix
-/// AL. Note that, currently not all of these implementations are equally complete or up-to-date (as PortAudio V19 is
-/// still in development). Because PortAudio has a C API, it can easily be called from a variety of other programming
-/// languages.
-///
-/// PortAudioCpp
-///
-/// Although, it is possible to use PortAudio's C API from within a C++ program, this is usually a little awkward
-/// as procedural and object-oriented paradigms need to be mixed. PortAudioCpp aims to resolve this by encapsulating
-/// PortAudio's C API to form an equivalent object-oriented C++ API. It provides a more natural integration of PortAudio
-/// into C++ programs as well as a more structured interface. PortAudio's concepts were preserved as much as possible and
-/// no additional features were added except for some `convenience methods'.
-///
-///
-/// PortAudioCpp's main features are:
-///
-/// - Structured object model.
-/// - C++ exception handling instead of C-style error return codes.
-/// - Handling of callbacks using free functions (C and C++), static functions, member functions or instances of classes
-/// derived from a given interface.
-/// - STL compliant iterators to host APIs and devices.
-/// - Some additional convenience functions to more easily set up and use PortAudio.
-///
-///
-///
-/// PortAudioCpp requires a recent version of the PortAudio V19 source code. This can be obtained from CVS or as a snapshot
-/// from the website. The examples also require the ASIO 2 SDK which can be obtained from the Steinberg website. Alternatively, the
-/// examples can easily be modified to compile without needing ASIO.
-///
-///
-/// Supported platforms:
-///
-/// - Microsoft Visual C++ 6.0, 7.0 (.NET 2002) and 7.1 (.NET 2003).
-/// - GNU G++ 2.95 and G++ 3.3.
-///
-/// Other platforms should be easily supported as PortAudioCpp is platform-independent and (reasonably) C++ standard compliant.
-///
-///
-/// This documentation mainly provides information specific to PortAudioCpp. For a more complete explaination of all of the
-/// concepts used, please consult the PortAudio documentation.
-///
-///
-/// PortAudioCpp was developed by Merlijn Blaauw with many great suggestions and help from Ross Bencina. Ludwig Schwardt provided
-/// GNU/Linux build files and checked G++ compatibility. PortAudioCpp may be used under the same licensing, conditions and
-/// warranty as PortAudio. See the PortAudio license for more details.
-///
-/// Links
-///
-/// Official PortAudio site.
-///
-//////
-
-// ---------------------------------------------------------------------------------------
-
-//////
-/// @namespace portaudio
-///
-/// To avoid name collision, everything in PortAudioCpp is in the portaudio
-/// namespace. If this name is too long it's usually pretty safe to use an
-/// alias like ``namespace pa = portaudio;''.
-//////
-
-// ---------------------------------------------------------------------------------------
-
-//////
-/// @file PortAudioCpp.hxx
-/// An include-all header file (for lazy programmers and using pre-compiled headers).
-//////
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-#include "portaudiocpp/AutoSystem.hxx"
-#include "portaudiocpp/BlockingStream.hxx"
-#include "portaudiocpp/CallbackInterface.hxx"
-#include "portaudiocpp/CallbackStream.hxx"
-#include "portaudiocpp/CFunCallbackStream.hxx"
-#include "portaudiocpp/CppFunCallbackStream.hxx"
-#include "portaudiocpp/Device.hxx"
-#include "portaudiocpp/Exception.hxx"
-#include "portaudiocpp/HostApi.hxx"
-#include "portaudiocpp/InterfaceCallbackStream.hxx"
-#include "portaudiocpp/MemFunCallbackStream.hxx"
-#include "portaudiocpp/SampleDataFormat.hxx"
-#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
-#include "portaudiocpp/Stream.hxx"
-#include "portaudiocpp/StreamParameters.hxx"
-#include "portaudiocpp/System.hxx"
-#include "portaudiocpp/SystemDeviceIterator.hxx"
-#include "portaudiocpp/SystemHostApiIterator.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
+#ifndef INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
+#define INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @mainpage PortAudioCpp
+///
+/// PortAudioCpp - A Native C++ Binding of PortAudio V19
+/// PortAudio
+///
+/// PortAudio is a portable and mature C API for accessing audio hardware. It offers both callback-based and blocking
+/// style input and output, deals with sample data format conversions, dithering and much more. There are a large number
+/// of implementations available for various platforms including Windows MME, Windows DirectX, Windows and MacOS (Classic)
+/// ASIO, MacOS Classic SoundManager, MacOS X CoreAudio, OSS (Linux), Linux ALSA, JACK (MacOS X and Linux) and SGI Irix
+/// AL. Note that, currently not all of these implementations are equally complete or up-to-date (as PortAudio V19 is
+/// still in development). Because PortAudio has a C API, it can easily be called from a variety of other programming
+/// languages.
+///
+/// PortAudioCpp
+///
+/// Although, it is possible to use PortAudio's C API from within a C++ program, this is usually a little awkward
+/// as procedural and object-oriented paradigms need to be mixed. PortAudioCpp aims to resolve this by encapsulating
+/// PortAudio's C API to form an equivalent object-oriented C++ API. It provides a more natural integration of PortAudio
+/// into C++ programs as well as a more structured interface. PortAudio's concepts were preserved as much as possible and
+/// no additional features were added except for some `convenience methods'.
+///
+///
+/// PortAudioCpp's main features are:
+///
+/// - Structured object model.
+/// - C++ exception handling instead of C-style error return codes.
+/// - Handling of callbacks using free functions (C and C++), static functions, member functions or instances of classes
+/// derived from a given interface.
+/// - STL compliant iterators to host APIs and devices.
+/// - Some additional convenience functions to more easily set up and use PortAudio.
+///
+///
+///
+/// PortAudioCpp requires a recent version of the PortAudio V19 source code. This can be obtained from CVS or as a snapshot
+/// from the website. The examples also require the ASIO 2 SDK which can be obtained from the Steinberg website. Alternatively, the
+/// examples can easily be modified to compile without needing ASIO.
+///
+///
+/// Supported platforms:
+///
+/// - Microsoft Visual C++ 6.0, 7.0 (.NET 2002) and 7.1 (.NET 2003).
+/// - GNU G++ 2.95 and G++ 3.3.
+///
+/// Other platforms should be easily supported as PortAudioCpp is platform-independent and (reasonably) C++ standard compliant.
+///
+///
+/// This documentation mainly provides information specific to PortAudioCpp. For a more complete explaination of all of the
+/// concepts used, please consult the PortAudio documentation.
+///
+///
+/// PortAudioCpp was developed by Merlijn Blaauw with many great suggestions and help from Ross Bencina. Ludwig Schwardt provided
+/// GNU/Linux build files and checked G++ compatibility. PortAudioCpp may be used under the same licensing, conditions and
+/// warranty as PortAudio. See the PortAudio license for more details.
+///
+/// Links
+///
+/// Official PortAudio site.
+///
+//////
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @namespace portaudio
+///
+/// To avoid name collision, everything in PortAudioCpp is in the portaudio
+/// namespace. If this name is too long it's usually pretty safe to use an
+/// alias like ``namespace pa = portaudio;''.
+//////
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @file PortAudioCpp.hxx
+/// An include-all header file (for lazy programmers and using pre-compiled headers).
+//////
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/AutoSystem.hxx"
+#include "portaudiocpp/BlockingStream.hxx"
+#include "portaudiocpp/CallbackInterface.hxx"
+#include "portaudiocpp/CallbackStream.hxx"
+#include "portaudiocpp/CFunCallbackStream.hxx"
+#include "portaudiocpp/CppFunCallbackStream.hxx"
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/InterfaceCallbackStream.hxx"
+#include "portaudiocpp/MemFunCallbackStream.hxx"
+#include "portaudiocpp/SampleDataFormat.hxx"
+#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
+#include "portaudiocpp/Stream.hxx"
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+#include "portaudiocpp/SystemHostApiIterator.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/SampleDataFormat.hxx b/fdmdv2/extern/include/portaudiocpp/SampleDataFormat.hxx
index 5224768b..dc563106 100644
--- a/fdmdv2/extern/include/portaudiocpp/SampleDataFormat.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/SampleDataFormat.hxx
@@ -1,35 +1,35 @@
-#ifndef INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
-#define INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-// ---------------------------------------------------------------------------------------
-
-namespace portaudio
-{
-
-
- //////
- /// @brief PortAudio sample data formats.
- ///
- /// Small helper enum to wrap the PortAudio defines.
- //////
- enum SampleDataFormat
- {
- INVALID_FORMAT = 0,
- FLOAT32 = paFloat32,
- INT32 = paInt32,
- INT24 = paInt24,
- INT16 = paInt16,
- INT8 = paInt8,
- UINT8 = paUInt8
- };
-
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
+#ifndef INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
+#define INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+ //////
+ /// @brief PortAudio sample data formats.
+ ///
+ /// Small helper enum to wrap the PortAudio defines.
+ //////
+ enum SampleDataFormat
+ {
+ INVALID_FORMAT = 0,
+ FLOAT32 = paFloat32,
+ INT32 = paInt32,
+ INT24 = paInt24,
+ INT16 = paInt16,
+ INT8 = paInt8,
+ UINT8 = paUInt8
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/Stream.hxx b/fdmdv2/extern/include/portaudiocpp/Stream.hxx
index 80c363d0..7be73f9c 100644
--- a/fdmdv2/extern/include/portaudiocpp/Stream.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/Stream.hxx
@@ -1,82 +1,82 @@
-#ifndef INCLUDED_PORTAUDIO_STREAM_HXX
-#define INCLUDED_PORTAUDIO_STREAM_HXX
-
-#include "portaudio.h"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class StreamParameters;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
-
- //////
- /// @brief A Stream represents an active or inactive input and/or output data
- /// stream in the System.
- ///
- /// Concrete Stream classes should ensure themselves being in a closed state at
- /// destruction (i.e. by calling their own close() method in their deconstructor).
- /// Following good C++ programming practices, care must be taken to ensure no
- /// exceptions are thrown by the deconstructor of these classes. As a consequence,
- /// clients need to explicitly call close() to ensure the stream closed successfully.
- ///
- /// The Stream object can be used to manipulate the Stream's state. Also, time-constant
- /// and time-varying information about the Stream can be retreived.
- //////
- class Stream
- {
- public:
- // Opening/closing:
- virtual ~Stream();
-
- virtual void close();
- bool isOpen() const;
-
- // Additional set up:
- void setStreamFinishedCallback(PaStreamFinishedCallback *callback);
-
- // State management:
- void start();
- void stop();
- void abort();
-
- bool isStopped() const;
- bool isActive() const;
-
- // Stream info (time-constant, but might become time-variant soon):
- PaTime inputLatency() const;
- PaTime outputLatency() const;
- double sampleRate() const;
-
- // Stream info (time-varying):
- PaTime time() const;
-
- // Accessors for PortAudio PaStream, useful for interfacing
- // with PortAudio add-ons (such as PortMixer) for instance:
- const PaStream *paStream() const;
- PaStream *paStream();
-
- protected:
- Stream(); // abstract class
-
- PaStream *stream_;
-
- private:
- Stream(const Stream &); // non-copyable
- Stream &operator=(const Stream &); // non-copyable
- };
-
-
-} // namespace portaudio
-
-
-#endif // INCLUDED_PORTAUDIO_STREAM_HXX
-
+#ifndef INCLUDED_PORTAUDIO_STREAM_HXX
+#define INCLUDED_PORTAUDIO_STREAM_HXX
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief A Stream represents an active or inactive input and/or output data
+ /// stream in the System.
+ ///
+ /// Concrete Stream classes should ensure themselves being in a closed state at
+ /// destruction (i.e. by calling their own close() method in their deconstructor).
+ /// Following good C++ programming practices, care must be taken to ensure no
+ /// exceptions are thrown by the deconstructor of these classes. As a consequence,
+ /// clients need to explicitly call close() to ensure the stream closed successfully.
+ ///
+ /// The Stream object can be used to manipulate the Stream's state. Also, time-constant
+ /// and time-varying information about the Stream can be retreived.
+ //////
+ class Stream
+ {
+ public:
+ // Opening/closing:
+ virtual ~Stream();
+
+ virtual void close();
+ bool isOpen() const;
+
+ // Additional set up:
+ void setStreamFinishedCallback(PaStreamFinishedCallback *callback);
+
+ // State management:
+ void start();
+ void stop();
+ void abort();
+
+ bool isStopped() const;
+ bool isActive() const;
+
+ // Stream info (time-constant, but might become time-variant soon):
+ PaTime inputLatency() const;
+ PaTime outputLatency() const;
+ double sampleRate() const;
+
+ // Stream info (time-varying):
+ PaTime time() const;
+
+ // Accessors for PortAudio PaStream, useful for interfacing
+ // with PortAudio add-ons (such as PortMixer) for instance:
+ const PaStream *paStream() const;
+ PaStream *paStream();
+
+ protected:
+ Stream(); // abstract class
+
+ PaStream *stream_;
+
+ private:
+ Stream(const Stream &); // non-copyable
+ Stream &operator=(const Stream &); // non-copyable
+ };
+
+
+} // namespace portaudio
+
+
+#endif // INCLUDED_PORTAUDIO_STREAM_HXX
+
diff --git a/fdmdv2/extern/include/portaudiocpp/StreamParameters.hxx b/fdmdv2/extern/include/portaudiocpp/StreamParameters.hxx
index d9b90e9e..32f5f21a 100644
--- a/fdmdv2/extern/include/portaudiocpp/StreamParameters.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/StreamParameters.hxx
@@ -1,77 +1,77 @@
-#ifndef INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
-#define INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
- //////
- /// @brief The entire set of parameters needed to configure and open
- /// a Stream.
- ///
- /// It contains parameters of input, output and shared parameters.
- /// Using the isSupported() method, the StreamParameters can be
- /// checked if opening a Stream using this StreamParameters would
- /// succeed or not. Accessors are provided to higher-level parameters
- /// aswell as the lower-level parameters which are mainly intended for
- /// internal use.
- //////
- class StreamParameters
- {
- public:
- StreamParameters();
- StreamParameters(const DirectionSpecificStreamParameters &inputParameters,
- const DirectionSpecificStreamParameters &outputParameters, double sampleRate,
- unsigned long framesPerBuffer, PaStreamFlags flags);
-
- // Set up for direction-specific:
- void setInputParameters(const DirectionSpecificStreamParameters ¶meters);
- void setOutputParameters(const DirectionSpecificStreamParameters ¶meters);
-
- // Set up for common parameters:
- void setSampleRate(double sampleRate);
- void setFramesPerBuffer(unsigned long framesPerBuffer);
- void setFlag(PaStreamFlags flag);
- void unsetFlag(PaStreamFlags flag);
- void clearFlags();
-
- // Validation:
- bool isSupported() const;
-
- // Accessors (direction-specific):
- DirectionSpecificStreamParameters &inputParameters();
- const DirectionSpecificStreamParameters &inputParameters() const;
- DirectionSpecificStreamParameters &outputParameters();
- const DirectionSpecificStreamParameters &outputParameters() const;
-
- // Accessors (common):
- double sampleRate() const;
- unsigned long framesPerBuffer() const;
- PaStreamFlags flags() const;
- bool isFlagSet(PaStreamFlags flag) const;
-
- private:
- // Half-duplex specific parameters:
- DirectionSpecificStreamParameters inputParameters_;
- DirectionSpecificStreamParameters outputParameters_;
-
- // Common parameters:
- double sampleRate_;
- unsigned long framesPerBuffer_;
- PaStreamFlags flags_;
- };
-
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
+#ifndef INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
+#define INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+ //////
+ /// @brief The entire set of parameters needed to configure and open
+ /// a Stream.
+ ///
+ /// It contains parameters of input, output and shared parameters.
+ /// Using the isSupported() method, the StreamParameters can be
+ /// checked if opening a Stream using this StreamParameters would
+ /// succeed or not. Accessors are provided to higher-level parameters
+ /// aswell as the lower-level parameters which are mainly intended for
+ /// internal use.
+ //////
+ class StreamParameters
+ {
+ public:
+ StreamParameters();
+ StreamParameters(const DirectionSpecificStreamParameters &inputParameters,
+ const DirectionSpecificStreamParameters &outputParameters, double sampleRate,
+ unsigned long framesPerBuffer, PaStreamFlags flags);
+
+ // Set up for direction-specific:
+ void setInputParameters(const DirectionSpecificStreamParameters ¶meters);
+ void setOutputParameters(const DirectionSpecificStreamParameters ¶meters);
+
+ // Set up for common parameters:
+ void setSampleRate(double sampleRate);
+ void setFramesPerBuffer(unsigned long framesPerBuffer);
+ void setFlag(PaStreamFlags flag);
+ void unsetFlag(PaStreamFlags flag);
+ void clearFlags();
+
+ // Validation:
+ bool isSupported() const;
+
+ // Accessors (direction-specific):
+ DirectionSpecificStreamParameters &inputParameters();
+ const DirectionSpecificStreamParameters &inputParameters() const;
+ DirectionSpecificStreamParameters &outputParameters();
+ const DirectionSpecificStreamParameters &outputParameters() const;
+
+ // Accessors (common):
+ double sampleRate() const;
+ unsigned long framesPerBuffer() const;
+ PaStreamFlags flags() const;
+ bool isFlagSet(PaStreamFlags flag) const;
+
+ private:
+ // Half-duplex specific parameters:
+ DirectionSpecificStreamParameters inputParameters_;
+ DirectionSpecificStreamParameters outputParameters_;
+
+ // Common parameters:
+ double sampleRate_;
+ unsigned long framesPerBuffer_;
+ PaStreamFlags flags_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
diff --git a/fdmdv2/extern/include/portaudiocpp/System.hxx b/fdmdv2/extern/include/portaudiocpp/System.hxx
index 014cc20b..2e48cf1e 100644
--- a/fdmdv2/extern/include/portaudiocpp/System.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/System.hxx
@@ -1,107 +1,107 @@
-#ifndef INCLUDED_PORTAUDIO_SYSTEM_HXX
-#define INCLUDED_PORTAUDIO_SYSTEM_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class Device;
- class Stream;
- class HostApi;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
-
- //////
- /// @brief System singleton which represents the PortAudio system.
- ///
- /// The System is used to initialize/terminate PortAudio and provide
- /// a single acccess point to the PortAudio System (instance()).
- /// It can be used to iterate through all HostApi 's in the System as
- /// well as all devices in the System. It also provides some utility
- /// functionality of PortAudio.
- ///
- /// Terminating the System will also abort and close the open streams.
- /// The Stream objects will need to be deallocated by the client though
- /// (it's usually a good idea to have them cleaned up automatically).
- //////
- class System
- {
- public:
- class HostApiIterator; // forward declaration
- class DeviceIterator; // forward declaration
-
- // -------------------------------------------------------------------------------
-
- static int version();
- static const char *versionText();
-
- static void initialize();
- static void terminate();
-
- static System &instance();
- static bool exists();
-
- // -------------------------------------------------------------------------------
-
- // host apis:
- HostApiIterator hostApisBegin();
- HostApiIterator hostApisEnd();
-
- HostApi &defaultHostApi();
-
- HostApi &hostApiByTypeId(PaHostApiTypeId type);
- HostApi &hostApiByIndex(PaHostApiIndex index);
-
- int hostApiCount();
-
- // -------------------------------------------------------------------------------
-
- // devices:
- DeviceIterator devicesBegin();
- DeviceIterator devicesEnd();
-
- Device &defaultInputDevice();
- Device &defaultOutputDevice();
-
- Device &deviceByIndex(PaDeviceIndex index);
-
- int deviceCount();
-
- static Device &nullDevice();
-
- // -------------------------------------------------------------------------------
-
- // misc:
- void sleep(long msec);
- int sizeOfSample(PaSampleFormat format);
-
- private:
- System();
- ~System();
-
- static System *instance_;
- static int initCount_;
-
- static HostApi **hostApis_;
- static Device **devices_;
-
- static Device *nullDevice_;
- };
-
-
-} // namespace portaudio
-
-
-#endif // INCLUDED_PORTAUDIO_SYSTEM_HXX
-
+#ifndef INCLUDED_PORTAUDIO_SYSTEM_HXX
+#define INCLUDED_PORTAUDIO_SYSTEM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class Device;
+ class Stream;
+ class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief System singleton which represents the PortAudio system.
+ ///
+ /// The System is used to initialize/terminate PortAudio and provide
+ /// a single acccess point to the PortAudio System (instance()).
+ /// It can be used to iterate through all HostApi 's in the System as
+ /// well as all devices in the System. It also provides some utility
+ /// functionality of PortAudio.
+ ///
+ /// Terminating the System will also abort and close the open streams.
+ /// The Stream objects will need to be deallocated by the client though
+ /// (it's usually a good idea to have them cleaned up automatically).
+ //////
+ class System
+ {
+ public:
+ class HostApiIterator; // forward declaration
+ class DeviceIterator; // forward declaration
+
+ // -------------------------------------------------------------------------------
+
+ static int version();
+ static const char *versionText();
+
+ static void initialize();
+ static void terminate();
+
+ static System &instance();
+ static bool exists();
+
+ // -------------------------------------------------------------------------------
+
+ // host apis:
+ HostApiIterator hostApisBegin();
+ HostApiIterator hostApisEnd();
+
+ HostApi &defaultHostApi();
+
+ HostApi &hostApiByTypeId(PaHostApiTypeId type);
+ HostApi &hostApiByIndex(PaHostApiIndex index);
+
+ int hostApiCount();
+
+ // -------------------------------------------------------------------------------
+
+ // devices:
+ DeviceIterator devicesBegin();
+ DeviceIterator devicesEnd();
+
+ Device &defaultInputDevice();
+ Device &defaultOutputDevice();
+
+ Device &deviceByIndex(PaDeviceIndex index);
+
+ int deviceCount();
+
+ static Device &nullDevice();
+
+ // -------------------------------------------------------------------------------
+
+ // misc:
+ void sleep(long msec);
+ int sizeOfSample(PaSampleFormat format);
+
+ private:
+ System();
+ ~System();
+
+ static System *instance_;
+ static int initCount_;
+
+ static HostApi **hostApis_;
+ static Device **devices_;
+
+ static Device *nullDevice_;
+ };
+
+
+} // namespace portaudio
+
+
+#endif // INCLUDED_PORTAUDIO_SYSTEM_HXX
+
diff --git a/fdmdv2/extern/include/portaudiocpp/SystemDeviceIterator.hxx b/fdmdv2/extern/include/portaudiocpp/SystemDeviceIterator.hxx
index 8dc8ed67..6d11cca7 100644
--- a/fdmdv2/extern/include/portaudiocpp/SystemDeviceIterator.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/SystemDeviceIterator.hxx
@@ -1,66 +1,66 @@
-#ifndef INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
-#define INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include
-#include
-
-#include "portaudiocpp/System.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class Device;
- class HostApi;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
-
- //////
- /// @brief Iterator class for iterating through all Devices in a System.
- ///
- /// Devices will be iterated by iterating all Devices in each
- /// HostApi in the System. Compliant with the STL bidirectional
- /// iterator concept.
- //////
- class System::DeviceIterator
- {
- public:
- typedef std::bidirectional_iterator_tag iterator_category;
- typedef Device value_type;
- typedef ptrdiff_t difference_type;
- typedef Device * pointer;
- typedef Device & reference;
-
- Device &operator*() const;
- Device *operator->() const;
-
- DeviceIterator &operator++();
- DeviceIterator operator++(int);
- DeviceIterator &operator--();
- DeviceIterator operator--(int);
-
- bool operator==(const DeviceIterator &rhs);
- bool operator!=(const DeviceIterator &rhs);
-
- private:
- friend class System;
- friend class HostApi;
- Device **ptr_;
- };
-
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
-
+#ifndef INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+#define INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include
+#include
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class Device;
+ class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Iterator class for iterating through all Devices in a System.
+ ///
+ /// Devices will be iterated by iterating all Devices in each
+ /// HostApi in the System. Compliant with the STL bidirectional
+ /// iterator concept.
+ //////
+ class System::DeviceIterator
+ {
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef Device value_type;
+ typedef ptrdiff_t difference_type;
+ typedef Device * pointer;
+ typedef Device & reference;
+
+ Device &operator*() const;
+ Device *operator->() const;
+
+ DeviceIterator &operator++();
+ DeviceIterator operator++(int);
+ DeviceIterator &operator--();
+ DeviceIterator operator--(int);
+
+ bool operator==(const DeviceIterator &rhs);
+ bool operator!=(const DeviceIterator &rhs);
+
+ private:
+ friend class System;
+ friend class HostApi;
+ Device **ptr_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+
diff --git a/fdmdv2/extern/include/portaudiocpp/SystemHostApiIterator.hxx b/fdmdv2/extern/include/portaudiocpp/SystemHostApiIterator.hxx
index 82988776..ee6ee0ce 100644
--- a/fdmdv2/extern/include/portaudiocpp/SystemHostApiIterator.hxx
+++ b/fdmdv2/extern/include/portaudiocpp/SystemHostApiIterator.hxx
@@ -1,61 +1,61 @@
-#ifndef INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
-#define INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include
-#include
-
-#include "portaudiocpp/System.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class HostApi;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
-
- //////
- /// @brief Iterator class for iterating through all HostApis in a System.
- ///
- /// Compliant with the STL bidirectional iterator concept.
- //////
- class System::HostApiIterator
- {
- public:
- typedef std::bidirectional_iterator_tag iterator_category;
- typedef Device value_type;
- typedef ptrdiff_t difference_type;
- typedef HostApi * pointer;
- typedef HostApi & reference;
-
- HostApi &operator*() const;
- HostApi *operator->() const;
-
- HostApiIterator &operator++();
- HostApiIterator operator++(int);
- HostApiIterator &operator--();
- HostApiIterator operator--(int);
-
- bool operator==(const HostApiIterator &rhs);
- bool operator!=(const HostApiIterator &rhs);
-
- private:
- friend class System;
- HostApi **ptr_;
- };
-
-
-} // namespace portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
+#ifndef INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
+#define INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include
+#include
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Iterator class for iterating through all HostApis in a System.
+ ///
+ /// Compliant with the STL bidirectional iterator concept.
+ //////
+ class System::HostApiIterator
+ {
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef Device value_type;
+ typedef ptrdiff_t difference_type;
+ typedef HostApi * pointer;
+ typedef HostApi & reference;
+
+ HostApi &operator*() const;
+ HostApi *operator->() const;
+
+ HostApiIterator &operator++();
+ HostApiIterator operator++(int);
+ HostApiIterator &operator--();
+ HostApiIterator operator--(int);
+
+ bool operator==(const HostApiIterator &rhs);
+ bool operator!=(const HostApiIterator &rhs);
+
+ private:
+ friend class System;
+ HostApi **ptr_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
diff --git a/fdmdv2/extern/include/rig.h b/fdmdv2/extern/include/rig.h
index 745ecf9b..ed23a2ae 100644
--- a/fdmdv2/extern/include/rig.h
+++ b/fdmdv2/extern/include/rig.h
@@ -1,1724 +1,1724 @@
-/*
- * Hamlib Interface - API header
- * Copyright (c) 2000-2003 by Frank Singleton
- * Copyright (c) 2000-2012 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 _RIG_H
-#define _RIG_H 1
-
-#include
-#include
-
-#include /* list in another file to not mess up w/ this one */
-
-/**
- * \addtogroup rig
- * @{
- */
-
-/*! \file rig.h
- * \brief Hamlib rig data structures.
- *
- * This file contains the data structures and definitions for the Hamlib rig API.
- * see the rig.c file for more details on the rig API.
- */
-
-
-/* __BEGIN_DECLS should be used at the beginning of your declarations,
- * so that C++ compilers don't mangle their names. Use __END_DECLS at
- * the end of C declarations. */
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
-
-/* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
- * that don't understand ANSI C prototypes still work, and ANSI C
- * compilers can issue warnings about type mismatches. */
-#undef HAMLIB_PARAMS
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN__) || defined(_WIN32) || defined(__cplusplus)
-# define HAMLIB_PARAMS(protos) protos
-# define rig_ptr_t void*
-#else
-# define HAMLIB_PARAMS(protos) ()
-# define rig_ptr_t char*
-#endif
-
-#include
-
-
-__BEGIN_DECLS
-
-extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
-extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
-
-/**
- * \brief Hamlib error codes
- * Error code definition that can be returned by the Hamlib functions.
- * Unless stated otherwise, Hamlib functions return the negative value
- * of rig_errcode_e definitions in case of error, or 0 when successful.
- */
-enum rig_errcode_e {
- RIG_OK=0, /*!< No error, operation completed sucessfully */
- RIG_EINVAL, /*!< invalid parameter */
- RIG_ECONF, /*!< invalid configuration (serial,..) */
- RIG_ENOMEM, /*!< memory shortage */
- RIG_ENIMPL, /*!< function not implemented, but will be */
- RIG_ETIMEOUT, /*!< communication timed out */
- RIG_EIO, /*!< IO error, including open failed */
- RIG_EINTERNAL, /*!< Internal Hamlib error, huh! */
- RIG_EPROTO, /*!< Protocol error */
- RIG_ERJCTED, /*!< Command rejected by the rig */
- RIG_ETRUNC, /*!< Command performed, but arg truncated */
- RIG_ENAVAIL, /*!< function not available */
- RIG_ENTARGET, /*!< VFO not targetable */
- RIG_BUSERROR, /*!< Error talking on the bus */
- RIG_BUSBUSY, /*!< Collision on the bus */
- RIG_EARG, /*!< NULL RIG handle or any invalid pointer parameter in get arg */
- RIG_EVFO, /*!< Invalid VFO */
- RIG_EDOM /*!< Argument out of domain of func */
-};
-
-/** \brief Token in the netrigctl protocol for returning error code */
-#define NETRIGCTL_RET "RPRT "
-
-/**
- *\brief Hamlib debug levels
- *
- * REM: Numeric order matters for debug level
- *
- * \sa rig_set_debug
- */
-enum rig_debug_level_e {
- RIG_DEBUG_NONE = 0, /*!< no bug reporting */
- RIG_DEBUG_BUG, /*!< serious bug */
- RIG_DEBUG_ERR, /*!< error case (e.g. protocol, memory allocation) */
- RIG_DEBUG_WARN, /*!< warning */
- RIG_DEBUG_VERBOSE, /*!< verbose */
- RIG_DEBUG_TRACE /*!< tracing */
-};
-
-/* --------------- Rig capabilities -----------------*/
-
-/* Forward struct references */
-
-struct rig;
-struct rig_state;
-
-/*!
- * \brief Rig structure definition (see rig for details).
- */
-typedef struct rig RIG;
-
-#define RIGNAMSIZ 30
-#define RIGVERSIZ 8
-#define FILPATHLEN 100
-#define FRQRANGESIZ 30
-#define MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */
-#define TSLSTSIZ 20 /* max tuning step list size, zero ended */
-#define FLTLSTSIZ 42 /* max mode/filter list size, zero ended */
-#define MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
-#define CHANLSTSIZ 16 /* max mem_list size, zero ended */
-#define MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
-
-
-/**
- * \brief CTCSS and DCS type definition.
- *
- * Continuous Tone Controlled Squelch System (CTCSS)
- * sub-audible tone frequency are expressed in \em tenth of Hz.
- * For example, the subaudible tone of 88.5 Hz is represented within
- * Hamlib by 885.
- *
- * Digitally-Coded Squelch codes are simple direct integers.
- */
-typedef unsigned int tone_t;
-
-/**
- * \brief Port type
- */
-typedef enum rig_port_e {
- RIG_PORT_NONE = 0, /*!< No port */
- RIG_PORT_SERIAL, /*!< Serial */
- RIG_PORT_NETWORK, /*!< Network socket type */
- RIG_PORT_DEVICE, /*!< Device driver, like the WiNRADiO */
- RIG_PORT_PACKET, /*!< AX.25 network type, e.g. SV8CS protocol */
- RIG_PORT_DTMF, /*!< DTMF protocol bridge via another rig, eg. Kenwood Sky Cmd System */
- RIG_PORT_ULTRA, /*!< IrDA Ultra protocol! */
- RIG_PORT_RPC, /*!< RPC wrapper */
- RIG_PORT_PARALLEL, /*!< Parallel port */
- RIG_PORT_USB, /*!< USB port */
- RIG_PORT_UDP_NETWORK, /*!< UDP Network socket type */
- RIG_PORT_CM108 /*!< CM108 GPIO */
-} rig_port_t;
-
-/**
- * \brief Serial parity
- */
-enum serial_parity_e {
- RIG_PARITY_NONE = 0, /*!< No parity */
- RIG_PARITY_ODD, /*!< Odd */
- RIG_PARITY_EVEN, /*!< Even */
- RIG_PARITY_MARK, /*!< Mark */
- RIG_PARITY_SPACE /*!< Space */
-};
-
-/**
- * \brief Serial handshake
- */
-enum serial_handshake_e {
- RIG_HANDSHAKE_NONE = 0, /*!< No handshake */
- RIG_HANDSHAKE_XONXOFF, /*!< Software XON/XOFF */
- RIG_HANDSHAKE_HARDWARE /*!< Hardware CTS/RTS */
-};
-
-
-/**
- * \brief Serial control state
- */
-enum serial_control_state_e {
- RIG_SIGNAL_UNSET = 0, /*!< Unset or tri-state */
- RIG_SIGNAL_ON, /*!< ON */
- RIG_SIGNAL_OFF /*!< OFF */
-};
-
-/** \brief Rig type flags */
-typedef enum {
- RIG_FLAG_RECEIVER = (1<<1), /*!< Receiver */
- RIG_FLAG_TRANSMITTER = (1<<2), /*!< Transmitter */
- RIG_FLAG_SCANNER = (1<<3), /*!< Scanner */
-
- RIG_FLAG_MOBILE = (1<<4), /*!< mobile sized */
- RIG_FLAG_HANDHELD = (1<<5), /*!< handheld sized */
- RIG_FLAG_COMPUTER = (1<<6), /*!< "Computer" rig */
- RIG_FLAG_TRUNKING = (1<<7), /*!< has trunking */
- RIG_FLAG_APRS = (1<<8), /*!< has APRS */
- RIG_FLAG_TNC = (1<<9), /*!< has TNC */
- RIG_FLAG_DXCLUSTER = (1<<10), /*!< has DXCluster */
- RIG_FLAG_TUNER = (1<<11) /*!< dumb tuner */
-} rig_type_t;
-
-#define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
-#define RIG_TYPE_MASK (RIG_FLAG_TRANSCEIVER|RIG_FLAG_SCANNER|RIG_FLAG_MOBILE|RIG_FLAG_HANDHELD|RIG_FLAG_COMPUTER|RIG_FLAG_TRUNKING|RIG_FLAG_TUNER)
-
-#define RIG_TYPE_OTHER 0
-#define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
-#define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
-#define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
-#define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
-#define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
-#define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
-#define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
-#define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
-#define RIG_TYPE_TUNER RIG_FLAG_TUNER
-
-
-/**
- * \brief Development status of the backend
- */
-enum rig_status_e {
- RIG_STATUS_ALPHA = 0, /*!< Alpha quality, i.e. development */
- RIG_STATUS_UNTESTED, /*!< Written from available specs, rig unavailable for test, feedback wanted! */
- RIG_STATUS_BETA, /*!< Beta quality */
- RIG_STATUS_STABLE, /*!< Stable */
- RIG_STATUS_BUGGY /*!< Was stable, but something broke it! */
-/* RIG_STATUS_NEW * *!< Initial release of code
- * !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
-};
-
-/** \brief Map all deprecated RIG_STATUS_NEW references to RIG_STATUS_UNTESTED for backward compatibility */
-#define RIG_STATUS_NEW RIG_STATUS_UNTESTED
-
-/**
- * \brief Repeater shift type
- */
-typedef enum {
- RIG_RPT_SHIFT_NONE = 0, /*!< No repeater shift */
- RIG_RPT_SHIFT_MINUS, /*!< "-" shift */
- RIG_RPT_SHIFT_PLUS /*!< "+" shift */
-} rptr_shift_t;
-
-/**
- * \brief Split mode
- */
-typedef enum {
- RIG_SPLIT_OFF = 0, /*!< Split mode disabled */
- RIG_SPLIT_ON /*!< Split mode enabled */
-} split_t;
-
-/**
- * \brief Frequency type,
- * Frequency type unit in Hz, able to hold SHF frequencies.
- */
-typedef double freq_t;
-/** \brief printf(3) format to be used for freq_t type */
-#define PRIfreq "f"
-/** \brief scanf(3) format to be used for freq_t type */
-#define SCNfreq "lf"
-#define FREQFMT SCNfreq
-
-/**
- * \brief Short frequency type
- * Frequency in Hz restricted to 31bits, suitable for offsets, shifts, etc..
- */
-typedef signed long shortfreq_t;
-
-#define Hz(f) ((freq_t)(f))
-#define kHz(f) ((freq_t)((f)*(freq_t)1000))
-#define MHz(f) ((freq_t)((f)*(freq_t)1000000))
-#define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
-
-#define s_Hz(f) ((shortfreq_t)(f))
-#define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
-#define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
-#define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
-
-#define RIG_FREQ_NONE Hz(0)
-
-
-/**
- * \brief VFO definition
- *
- * There are several ways of using a vfo_t. For most cases, using RIG_VFO_A,
- * RIG_VFO_B, RIG_VFO_CURR, etc., as opaque macros should suffice.
- *
- * Strictly speaking a VFO is Variable Frequency Oscillator.
- * Here, it is referred as a tunable channel, from the radio operator's
- * point of view. The channel can be designated individually by its real
- * number, or by using an alias.
- *
- * Aliases may or may not be honored by a backend and are defined using
- * high significant bits, i.e. RIG_VFO_MEM, RIG_VFO_MAIN, etc.
- *
- */
-typedef int vfo_t;
-
-/** \brief '' -- used in caps */
-#define RIG_VFO_NONE 0
-
-#define RIG_VFO_TX_FLAG (1<<30)
-
-/** \brief \c currVFO -- current "tunable channel"/VFO */
-#define RIG_VFO_CURR (1<<29)
-
-/** \brief \c MEM -- means Memory mode, to be used with set_vfo */
-#define RIG_VFO_MEM (1<<28)
-
-/** \brief \c VFO -- means (last or any)VFO mode, with set_vfo */
-#define RIG_VFO_VFO (1<<27)
-
-#define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
-
-/** \brief \c TX -- alias for split tx or uplink, of VFO_CURR */
-#define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
-
-/** \brief \c RX -- alias for split rx or downlink */
-#define RIG_VFO_RX RIG_VFO_CURR
-
-/** \brief \c Main -- alias for MAIN */
-#define RIG_VFO_MAIN (1<<26)
-/** \brief \c Sub -- alias for SUB */
-#define RIG_VFO_SUB (1<<25)
-
-#define RIG_VFO_N(n) (1<<(n))
-
-/** \brief \c VFOA -- VFO A */
-#define RIG_VFO_A RIG_VFO_N(0)
-/** \brief \c VFOB -- VFO B */
-#define RIG_VFO_B RIG_VFO_N(1)
-/** \brief \c VFOC -- VFO C */
-#define RIG_VFO_C RIG_VFO_N(2)
-
-
-/*
- * targetable bitfields, for internal use.
- * RIG_TARGETABLE_PURE means a pure targetable radio on every command
- */
-#define RIG_TARGETABLE_NONE 0
-#define RIG_TARGETABLE_FREQ (1<<0)
-#define RIG_TARGETABLE_MODE (1<<1)
-#define RIG_TARGETABLE_PURE (1<<2)
-#define RIG_TARGETABLE_TONE (1<<3)
-#define RIG_TARGETABLE_FUNC (1<<4)
-#define RIG_TARGETABLE_ALL 0x7fffffff
-
-
-#define RIG_PASSBAND_NORMAL s_Hz(0)
-/**
- * \brief Passband width, in Hz
- * \sa rig_passband_normal, rig_passband_narrow, rig_passband_wide
- */
-typedef shortfreq_t pbwidth_t;
-
-
-/**
- * \brief DCD status
- */
-typedef enum dcd_e {
- RIG_DCD_OFF = 0, /*!< Squelch closed */
- RIG_DCD_ON /*!< Squelch open */
-} dcd_t;
-
-/**
- * \brief DCD type
- * \sa rig_get_dcd
- */
-typedef enum {
- RIG_DCD_NONE = 0, /*!< No DCD available */
- RIG_DCD_RIG, /*!< Rig has DCD status support, i.e. rig has get_dcd cap */
- RIG_DCD_SERIAL_DSR, /*!< DCD status from serial DSR signal */
- RIG_DCD_SERIAL_CTS, /*!< DCD status from serial CTS signal */
- RIG_DCD_SERIAL_CAR, /*!< DCD status from serial CD signal */
- RIG_DCD_PARALLEL, /*!< DCD status from parallel port pin */
- RIG_DCD_CM108 /*!< DCD status from CM108 vol dn pin */
-} dcd_type_t;
-
-
-/**
- * \brief PTT status
- */
-typedef enum {
- RIG_PTT_OFF = 0, /*!< PTT desactivated */
- RIG_PTT_ON, /*!< PTT activated */
- RIG_PTT_ON_MIC, /*!< PTT Mic only, fallbacks on RIG_PTT_ON if unavailable */
- RIG_PTT_ON_DATA /*!< PTT Data (Mic-muted), fallbacks on RIG_PTT_ON if unavailable */
-} ptt_t;
-
-/**
- * \brief PTT type
- * \sa rig_get_ptt
- */
-typedef enum {
- RIG_PTT_NONE = 0, /*!< No PTT available */
- RIG_PTT_RIG, /*!< Legacy PTT */
- RIG_PTT_SERIAL_DTR, /*!< PTT control through serial DTR signal */
- RIG_PTT_SERIAL_RTS, /*!< PTT control through serial RTS signal */
- RIG_PTT_PARALLEL, /*!< PTT control through parallel port */
- RIG_PTT_RIG_MICDATA, /*!< Legacy PTT, supports RIG_PTT_ON_MIC/RIG_PTT_ON_DATA */
- RIG_PTT_CM108 /*!< PTT control through CM108 GPIO pin */
-} ptt_type_t;
-
-/**
- * \brief Radio power state
- */
-typedef enum {
- RIG_POWER_OFF = 0, /*!< Power off */
- RIG_POWER_ON = (1<<0), /*!< Power on */
- RIG_POWER_STANDBY = (1<<1) /*!< Standby */
-} powerstat_t;
-
-/**
- * \brief Reset operation
- */
-typedef enum {
- RIG_RESET_NONE = 0, /*!< No reset */
- RIG_RESET_SOFT = (1<<0), /*!< Software reset */
- RIG_RESET_VFO = (1<<1), /*!< VFO reset */
- RIG_RESET_MCALL = (1<<2), /*!< Memory clear */
- RIG_RESET_MASTER = (1<<3) /*!< Master reset */
-} reset_t;
-
-
-/**
- * \brief VFO operation
- *
- * A VFO operation is an action on a VFO (or tunable memory).
- * The difference with a function is that an action has no on/off
- * status, it is performed at once.
- *
- * Note: the vfo argument for some vfo operation may be irrelevant,
- * and thus will be ignored.
- *
- * The VFO/MEM "mode" is set by rig_set_vfo.\n
- * \c STRING used in rigctl
- *
- * \sa rig_parse_vfo_op() rig_strvfop()
- */
-typedef enum {
- RIG_OP_NONE = 0, /*!< '' No VFO_OP */
- RIG_OP_CPY = (1<<0), /*!< \c CPY -- VFO A = VFO B */
- RIG_OP_XCHG = (1<<1), /*!< \c XCHG -- Exchange VFO A/B */
- RIG_OP_FROM_VFO = (1<<2), /*!< \c FROM_VFO -- VFO->MEM */
- RIG_OP_TO_VFO = (1<<3), /*!< \c TO_VFO -- MEM->VFO */
- RIG_OP_MCL = (1<<4), /*!< \c MCL -- Memory clear */
- RIG_OP_UP = (1<<5), /*!< \c UP -- UP increment VFO freq by tuning step*/
- RIG_OP_DOWN = (1<<6), /*!< \c DOWN -- DOWN decrement VFO freq by tuning step*/
- RIG_OP_BAND_UP = (1<<7), /*!< \c BAND_UP -- Band UP */
- RIG_OP_BAND_DOWN = (1<<8), /*!< \c BAND_DOWN -- Band DOWN */
- RIG_OP_LEFT = (1<<9), /*!< \c LEFT -- LEFT */
- RIG_OP_RIGHT = (1<<10),/*!< \c RIGHT -- RIGHT */
- RIG_OP_TUNE = (1<<11),/*!< \c TUNE -- Start tune */
- RIG_OP_TOGGLE = (1<<12) /*!< \c TOGGLE -- Toggle VFOA and VFOB */
-} vfo_op_t;
-
-
-/**
- * \brief Rig Scan operation
- *
- * Various scan operations supported by a rig.\n
- * \c STRING used in rigctl
- *
- * \sa rig_parse_scan() rig_strscan()
- */
-typedef enum {
- RIG_SCAN_NONE = 0, /*!< '' No Scan */
- RIG_SCAN_STOP = RIG_SCAN_NONE, /*!< \c STOP -- Stop scanning */
- RIG_SCAN_MEM = (1<<0), /*!< \c MEM -- Scan all memory channels */
- RIG_SCAN_SLCT = (1<<1), /*!< \c SLCT -- Scan all selected memory channels */
- RIG_SCAN_PRIO = (1<<2), /*!< \c PRIO -- Priority watch (mem or call channel) */
- RIG_SCAN_PROG = (1<<3), /*!< \c PROG -- Programmed(edge) scan */
- RIG_SCAN_DELTA = (1<<4), /*!< \c DELTA -- delta-f scan */
- RIG_SCAN_VFO = (1<<5), /*!< \c VFO -- most basic scan */
- RIG_SCAN_PLT = (1<<6) /*!< \c PLT -- Scan using pipelined tuning */
-} scan_t;
-
-/**
- * \brief configuration token
- */
-typedef long token_t;
-
-#define RIG_CONF_END 0
-
-/**
- * \brief parameter types
- *
- * Used with configuration, parameter and extra-parm tables.
- *
- * Current internal implementation
- * NUMERIC: val.f or val.i
- * COMBO: val.i, starting from 0. Points to a table of strings or asci stored values.
- * STRING: val.s or val.cs
- * CHECKBUTTON: val.i 0/1
- */
-
-/* strongly inspired from soundmodem. Thanks Thomas! */
-
-enum rig_conf_e {
- RIG_CONF_STRING, /*!< String type */
- RIG_CONF_COMBO, /*!< Combo type */
- RIG_CONF_NUMERIC, /*!< Numeric type integer or real */
- RIG_CONF_CHECKBUTTON, /*!< on/off type */
- RIG_CONF_BUTTON /*!< Button type */
-};
-
-#define RIG_COMBO_MAX 8
-
-/**
- * \brief Configuration parameter structure.
- */
-struct confparams {
- token_t token; /*!< Conf param token ID */
- const char *name; /*!< Param name, no spaces allowed */
- const char *label; /*!< Human readable label */
- const char *tooltip; /*!< Hint on the parameter */
- const char *dflt; /*!< Default value */
- enum rig_conf_e type; /*!< Type of the parameter */
- union { /*!< */
- struct { /*!< */
- float min; /*!< Minimum value */
- float max; /*!< Maximum value */
- float step; /*!< Step */
- } n; /*!< Numeric type */
- struct { /*!< */
- const char *combostr[RIG_COMBO_MAX]; /*!< Combo list */
- } c; /*!< Combo type */
- } u; /*!< Type union */
-};
-
-/** \brief Announce
- *
- * Designate optional speech synthesizer.
- */
-typedef enum {
- RIG_ANN_NONE = 0, /*!< None */
- RIG_ANN_OFF = RIG_ANN_NONE, /*!< disable announces */
- RIG_ANN_FREQ = (1<<0), /*!< Announce frequency */
- RIG_ANN_RXMODE = (1<<1), /*!< Announce receive mode */
- RIG_ANN_CW = (1<<2), /*!< CW */
- RIG_ANN_ENG = (1<<3), /*!< English */
- RIG_ANN_JAP = (1<<4) /*!< Japan */
-} ann_t;
-
-
-/**
- * \brief Antenna number
- */
-typedef int ant_t;
-
-#define RIG_ANT_NONE 0
-#define RIG_ANT_N(n) ((ant_t)1<<(n))
-#define RIG_ANT_1 RIG_ANT_N(0)
-#define RIG_ANT_2 RIG_ANT_N(1)
-#define RIG_ANT_3 RIG_ANT_N(2)
-#define RIG_ANT_4 RIG_ANT_N(3)
-#define RIG_ANT_5 RIG_ANT_N(4)
-
-/**
- * \brief AGC delay settings
- */
-/* TODO: kill me, and replace by real AGC delay */
-enum agc_level_e {
- RIG_AGC_OFF = 0,
- RIG_AGC_SUPERFAST,
- RIG_AGC_FAST,
- RIG_AGC_SLOW,
- RIG_AGC_USER, /*!< user selectable */
- RIG_AGC_MEDIUM,
- RIG_AGC_AUTO
-};
-
-/**
- * \brief Level display meters
- */
-enum meter_level_e {
- RIG_METER_NONE = 0, /*< No display meter */
- RIG_METER_SWR = (1<<0), /*< Stationary Wave Ratio */
- RIG_METER_COMP = (1<<1), /*< Compression level */
- RIG_METER_ALC = (1<<2), /*< ALC */
- RIG_METER_IC = (1<<3), /*< IC */
- RIG_METER_DB = (1<<4), /*< DB */
- RIG_METER_PO = (1<<5), /*< Power Out */
- RIG_METER_VDD = (1<<6) /*< Final Amp Voltage */
-};
-
-/**
- * \brief Universal approach for passing values
- * \sa rig_set_level, rig_get_level, rig_set_parm, rig_get_parm
- */
-typedef union {
- signed int i; /*!< Signed integer */
- float f; /*!< Single precision float */
- char *s; /*!< Pointer to char string */
- const char *cs; /*!< Pointer to constant char string */
-} value_t;
-
-/** \brief Rig Level Settings
- *
- * Various operating levels supported by a rig.\n
- * \c STRING used in rigctl
- *
- * \sa rig_parse_level() rig_strlevel()
- */
-
-enum rig_level_e {
- RIG_LEVEL_NONE = 0, /*!< '' -- No Level */
- RIG_LEVEL_PREAMP = (1<<0), /*!< \c PREAMP -- Preamp, arg int (dB) */
- RIG_LEVEL_ATT = (1<<1), /*!< \c ATT -- Attenuator, arg int (dB) */
- RIG_LEVEL_VOX = (1<<2), /*!< \c VOX -- VOX delay, arg int (tenth of seconds) */
- RIG_LEVEL_AF = (1<<3), /*!< \c AF -- Volume, arg float [0.0 ... 1.0] */
- RIG_LEVEL_RF = (1<<4), /*!< \c RF -- RF gain (not TX power), arg float [0.0 ... 1.0] */
- RIG_LEVEL_SQL = (1<<5), /*!< \c SQL -- Squelch, arg float [0.0 ... 1.0] */
- RIG_LEVEL_IF = (1<<6), /*!< \c IF -- IF, arg int (Hz) */
- RIG_LEVEL_APF = (1<<7), /*!< \c APF -- Audio Peak Filter, arg float [0.0 ... 1.0] */
- RIG_LEVEL_NR = (1<<8), /*!< \c NR -- Noise Reduction, arg float [0.0 ... 1.0] */
- RIG_LEVEL_PBT_IN = (1<<9), /*!< \c PBT_IN -- Twin PBT (inside), arg float [0.0 ... 1.0] */
- RIG_LEVEL_PBT_OUT = (1<<10),/*!< \c PBT_OUT -- Twin PBT (outside), arg float [0.0 ... 1.0] */
- RIG_LEVEL_CWPITCH = (1<<11),/*!< \c CWPITCH -- CW pitch, arg int (Hz) */
- RIG_LEVEL_RFPOWER = (1<<12),/*!< \c RFPOWER -- RF Power, arg float [0.0 ... 1.0] */
- RIG_LEVEL_MICGAIN = (1<<13),/*!< \c MICGAIN -- MIC Gain, arg float [0.0 ... 1.0] */
- RIG_LEVEL_KEYSPD = (1<<14),/*!< \c KEYSPD -- Key Speed, arg int (WPM) */
- RIG_LEVEL_NOTCHF = (1<<15),/*!< \c NOTCHF -- Notch Freq., arg int (Hz) */
- RIG_LEVEL_COMP = (1<<16),/*!< \c COMP -- Compressor, arg float [0.0 ... 1.0] */
- RIG_LEVEL_AGC = (1<<17),/*!< \c AGC -- AGC, arg int (see enum agc_level_e) */
- RIG_LEVEL_BKINDL = (1<<18),/*!< \c BKINDL -- BKin Delay, arg int (tenth of dots) */
- RIG_LEVEL_BALANCE = (1<<19),/*!< \c BAL -- Balance (Dual Watch), arg float [0.0 ... 1.0] */
- RIG_LEVEL_METER = (1<<20),/*!< \c METER -- Display meter, arg int (see enum meter_level_e) */
-
- RIG_LEVEL_VOXGAIN = (1<<21),/*!< \c VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0] */
- RIG_LEVEL_VOXDELAY = RIG_LEVEL_VOX, /*!< Synonym of RIG_LEVEL_VOX */
- RIG_LEVEL_ANTIVOX = (1<<22),/*!< \c ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0] */
- RIG_LEVEL_SLOPE_LOW = (1<<23),/*!< \c SLOPE_LOW -- Slope tune, low frequency cut, */
- RIG_LEVEL_SLOPE_HIGH = (1<<24),/*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, */
- RIG_LEVEL_BKIN_DLYMS = (1<<25),/*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */
-
- /*!< These ones are not settable */
- RIG_LEVEL_RAWSTR = (1<<26),/*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */
- RIG_LEVEL_SQLSTAT = (1<<27),/*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */
- RIG_LEVEL_SWR = (1<<28),/*!< \c SWR -- SWR, arg float [0.0 ... infinite] */
- RIG_LEVEL_ALC = (1<<29),/*!< \c ALC -- ALC, arg float */
- RIG_LEVEL_STRENGTH =(1<<30) /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */
- /*RIG_LEVEL_BWC = (1<<31)*/ /*!< Bandwidth Control, arg int (Hz) */
-};
-
-#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX)
-
-#define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SQLSTAT|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR)
-
-#define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
-#define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
-
-
-/**
- * \brief Rig Parameters
- *
- * Parameters are settings that are not VFO specific.\n
- * \c STRING used in rigctl
- *
- * \sa rig_parse_parm() rig_strparm()
- */
-enum rig_parm_e {
- RIG_PARM_NONE = 0, /*!< '' -- No Parm */
- RIG_PARM_ANN = (1<<0), /*!< \c ANN -- "Announce" level, see ann_t */
- RIG_PARM_APO = (1<<1), /*!< \c APO -- Auto power off, int in minute */
- RIG_PARM_BACKLIGHT = (1<<2), /*!< \c BACKLIGHT -- LCD light, float [0.0 ... 1.0] */
- RIG_PARM_BEEP = (1<<4), /*!< \c BEEP -- Beep on keypressed, int (0,1) */
- RIG_PARM_TIME = (1<<5), /*!< \c TIME -- hh:mm:ss, int in seconds from 00:00:00 */
- RIG_PARM_BAT = (1<<6), /*!< \c BAT -- battery level, float [0.0 ... 1.0] */
- RIG_PARM_KEYLIGHT = (1<<7) /*!< \c KEYLIGHT -- Button backlight, on/off */
-};
-
-#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT)
-#define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
-
-#define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
-#define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
-
-#define RIG_SETTING_MAX 32
-/**
- * \brief Setting
- *
- * This can be a func, a level or a parm.
- * Each bit designates one of them.
- */
-typedef unsigned long setting_t;
-
-/*
- * tranceive mode, ie. the rig notify the host of any event,
- * like freq changed, mode changed, etc.
- */
-#define RIG_TRN_OFF 0
-#define RIG_TRN_RIG 1
-#define RIG_TRN_POLL 2
-
-
-/**
- * \brief Rig Function Settings
- *
- * Various operating functions supported by a rig.\n
- * \c STRING used in rigctl
- *
- * \sa rig_parse_func() rig_strfunc()
- */
-enum rig_func_e {
- RIG_FUNC_NONE = 0, /*!< '' -- No Function */
- RIG_FUNC_FAGC = (1<<0), /*!< \c FAGC -- Fast AGC */
- RIG_FUNC_NB = (1<<1), /*!< \c NB -- Noise Blanker */
- RIG_FUNC_COMP = (1<<2), /*!< \c COMP -- Speech Compression */
- RIG_FUNC_VOX = (1<<3), /*!< \c VOX -- Voice Operated Relay */
- RIG_FUNC_TONE = (1<<4), /*!< \c TONE -- CTCSS Tone */
- RIG_FUNC_TSQL = (1<<5), /*!< \c TSQL -- CTCSS Activate/De-activate */
- RIG_FUNC_SBKIN = (1<<6), /*!< \c SBKIN -- Semi Break-in (CW mode) */
- RIG_FUNC_FBKIN = (1<<7), /*!< \c FBKIN -- Full Break-in (CW mode) */
- RIG_FUNC_ANF = (1<<8), /*!< \c ANF -- Automatic Notch Filter (DSP) */
- RIG_FUNC_NR = (1<<9), /*!< \c NR -- Noise Reduction (DSP) */
- RIG_FUNC_AIP = (1<<10),/*!< \c AIP -- RF pre-amp (AIP on Kenwood, IPO on Yaesu, etc.) */
- RIG_FUNC_APF = (1<<11),/*!< \c APF -- Auto Passband/Audio Peak Filter */
- RIG_FUNC_MON = (1<<12),/*!< \c MON -- Monitor transmitted signal */
- RIG_FUNC_MN = (1<<13),/*!< \c MN -- Manual Notch */
- RIG_FUNC_RF = (1<<14),/*!< \c RF -- RTTY Filter */
- RIG_FUNC_ARO = (1<<15),/*!< \c ARO -- Auto Repeater Offset */
- RIG_FUNC_LOCK = (1<<16),/*!< \c LOCK -- Lock */
- RIG_FUNC_MUTE = (1<<17),/*!< \c MUTE -- Mute */
- RIG_FUNC_VSC = (1<<18),/*!< \c VSC -- Voice Scan Control */
- RIG_FUNC_REV = (1<<19),/*!< \c REV -- Reverse transmit and receive frequencies */
- RIG_FUNC_SQL = (1<<20),/*!< \c SQL -- Turn Squelch Monitor on/off */
- RIG_FUNC_ABM = (1<<21),/*!< \c ABM -- Auto Band Mode */
- RIG_FUNC_BC = (1<<22),/*!< \c BC -- Beat Canceller */
- RIG_FUNC_MBC = (1<<23),/*!< \c MBC -- Manual Beat Canceller */
- /* (1<<24), used to be RIG_FUNC_LMP, see RIG_PARM_BACKLIGHT instead) */
- RIG_FUNC_AFC = (1<<25),/*!< \c AFC -- Auto Frequency Control ON/OFF */
- RIG_FUNC_SATMODE = (1<<26),/*!< \c SATMODE -- Satellite mode ON/OFF */
- RIG_FUNC_SCOPE = (1<<27),/*!< \c SCOPE -- Simple bandscope ON/OFF */
- RIG_FUNC_RESUME = (1<<28),/*!< \c RESUME -- Scan auto-resume */
- RIG_FUNC_TBURST = (1<<29),/*!< \c TBURST -- 1750 Hz tone burst */
- RIG_FUNC_TUNER = (1<<30) /*!< \c TUNER -- Enable automatic tuner */
-};
-
-/*
- * power unit macros, converts to mW
- * This is limited to 2MW on 32 bits systems.
- */
-#define mW(p) ((int)(p))
-#define Watts(p) ((int)((p)*1000))
-#define W(p) Watts(p)
-#define kW(p) ((int)((p)*1000000L))
-
-/**
- * \brief Radio mode
- *
- * Various modes supported by a rig.\n
- * \c STRING used in rigctl
- *
- * \sa rig_parse_mode() rig_strrmode()
- */
-typedef enum {
- RIG_MODE_NONE = 0, /*!< '' -- None */
- RIG_MODE_AM = (1<<0), /*!< \c AM -- Amplitude Modulation */
- RIG_MODE_CW = (1<<1), /*!< \c CW -- CW "normal" sideband */
- RIG_MODE_USB = (1<<2), /*!< \c USB -- Upper Side Band */
- RIG_MODE_LSB = (1<<3), /*!< \c LSB -- Lower Side Band */
- RIG_MODE_RTTY = (1<<4), /*!< \c RTTY -- Radio Teletype */
- RIG_MODE_FM = (1<<5), /*!< \c FM -- "narrow" band FM */
- RIG_MODE_WFM = (1<<6), /*!< \c WFM -- broadcast wide FM */
- RIG_MODE_CWR = (1<<7), /*!< \c CWR -- CW "reverse" sideband */
- RIG_MODE_RTTYR = (1<<8), /*!< \c RTTYR -- RTTY "reverse" sideband */
- RIG_MODE_AMS = (1<<9), /*!< \c AMS -- Amplitude Modulation Synchronous */
- RIG_MODE_PKTLSB = (1<<10),/*!< \c PKTLSB -- Packet/Digital LSB mode (dedicated port) */
- RIG_MODE_PKTUSB = (1<<11),/*!< \c PKTUSB -- Packet/Digital USB mode (dedicated port) */
- RIG_MODE_PKTFM = (1<<12),/*!< \c PKTFM -- Packet/Digital FM mode (dedicated port) */
- RIG_MODE_ECSSUSB = (1<<13),/*!< \c ECSSUSB -- Exalted Carrier Single Sideband USB */
- RIG_MODE_ECSSLSB = (1<<14),/*!< \c ECSSLSB -- Exalted Carrier Single Sideband LSB */
- RIG_MODE_FAX = (1<<15),/*!< \c FAX -- Facsimile Mode */
- RIG_MODE_SAM = (1<<16),/*!< \c SAM -- Synchronous AM double sideband */
- RIG_MODE_SAL = (1<<17),/*!< \c SAL -- Synchronous AM lower sideband */
- RIG_MODE_SAH = (1<<18),/*!< \c SAH -- Synchronous AM upper (higher) sideband */
- RIG_MODE_DSB = (1<<19), /*!< \c DSB -- Double sideband suppressed carrier */
- RIG_MODE_TESTS_MAX /*!< \c MUST ALWAYS BE LAST, Max Count for dumpcaps.c */
-} rmode_t;
-
-
-/** \brief macro for backends, not to be used by rig_set_mode et al. */
-#define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
-
-/** \brief macro for backends, not to be used by rig_set_mode et al. */
-#define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
-
-
-#define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
-#define RIG_IS_DBLST_END(d) ((d)==0)
-
-/**
- * \brief Frequency range
- *
- * Put together a group of this struct in an array to define
- * what frequencies your rig has access to.
- */
-typedef struct freq_range_list {
- freq_t start; /*!< Start frequency */
- freq_t end; /*!< End frequency */
- rmode_t modes; /*!< Bit field of RIG_MODE's */
- int low_power; /*!< Lower RF power in mW, -1 for no power (ie. rx list) */
- int high_power; /*!< Higher RF power in mW, -1 for no power (ie. rx list) */
- vfo_t vfo; /*!< VFO list equipped with this range */
- ant_t ant; /*!< Antenna list equipped with this range, 0 means all */
-} freq_range_t;
-
-#define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
-#define RIG_IS_FRNG_END(r) ((r).start == Hz(0) && (r).end == Hz(0))
-
-#define RIG_ITU_REGION1 1
-#define RIG_ITU_REGION2 2
-#define RIG_ITU_REGION3 3
-
-/**
- * \brief Tuning step definition
- *
- * Lists the tuning steps available for each mode.
- *
- * If a ts field in the list has RIG_TS_ANY value,
- * this means the rig allows its tuning step to be
- * set to any value ranging from the lowest to the
- * highest (if any) value in the list for that mode.
- * The tuning step must be sorted in the ascending
- * order, and the RIG_TS_ANY value, if present, must
- * be the last one in the list.
- *
- * Note also that the minimum frequency resolution
- * of the rig is determined by the lowest value
- * in the Tuning step list.
- *
- * \sa rig_set_ts, rig_get_resolution
- */
-struct tuning_step_list {
- rmode_t modes; /*!< Bit field of RIG_MODE's */
- shortfreq_t ts; /*!< Tuning step in Hz */
-};
-
-#define RIG_TS_ANY 0
-#define RIG_TS_END {RIG_MODE_NONE,0}
-#define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
-
-/**
- * \brief Filter definition
- *
- * Lists the filters available for each mode.
- *
- * If more than one filter is available for a given mode,
- * the first entry in the array will be the default
- * filter to use for the normal passband of this mode.
- * The first entry in the array below the default normal passband
- * is the default narrow passband and the first entry in the array
- * above the default normal passband is the default wide passband.
- * Note: if there's no lower width or upper width, then narrow or
- * respectively wide passband is equal to the default normal passband.
- *
- * If a width field in the list has RIG_FLT_ANY value,
- * this means the rig allows its passband width to be
- * set to any value ranging from the lowest to the
- * highest value (if any) in the list for that mode.
- * The RIG_FLT_ANY value, if present, must
- * be the last one in the list.
- *
- * The width field is the narrowest passband in a transmit/receive chain
- * with regard to different IF.
- *
- * \sa rig_set_mode, rig_passband_normal, rig_passband_narrow, rig_passband_wide
- */
-struct filter_list {
- rmode_t modes; /*!< Bit field of RIG_MODE's */
- pbwidth_t width; /*!< Passband width in Hz */
-};
-
-#define RIG_FLT_ANY 0
-#define RIG_FLT_END {RIG_MODE_NONE,0}
-#define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
-
-
-/** \brief Empty channel_t.flags field */
-#define RIG_CHFLAG_NONE 0
-/** \brief skip memory channel during scan (lock out), channel_t.flags */
-#define RIG_CHFLAG_SKIP (1<<0)
-/** \brief DATA port mode flag */
-#define RIG_CHFLAG_DATA (1<<1)
-
-/**
- * \brief Extension attribute definition
- *
- */
-struct ext_list {
- token_t token; /*!< Token ID */
- value_t val; /*!< Value */
-};
-
-#define RIG_EXT_END {0, {.i=0}}
-#define RIG_IS_EXT_END(x) ((x).token == 0)
-
-/**
- * \brief Channel structure
- *
- * The channel struct stores all the attributes peculiar to a VFO.
- *
- * \sa rig_set_channel, rig_get_channel
- */
-struct channel {
- int channel_num; /*!< Channel number */
- int bank_num; /*!< Bank number */
- vfo_t vfo; /*!< VFO */
- int ant; /*!< Selected antenna */
- freq_t freq; /*!< Receive frequency */
- rmode_t mode; /*!< Receive mode */
- pbwidth_t width; /*!< Receive passband width associated with mode */
-
- freq_t tx_freq; /*!< Transmit frequency */
- rmode_t tx_mode; /*!< Transmit mode */
- pbwidth_t tx_width; /*!< Transmit passband width associated with mode */
-
- split_t split; /*!< Split mode */
- vfo_t tx_vfo; /*!< Split transmit VFO */
-
- rptr_shift_t rptr_shift; /*!< Repeater shift */
- shortfreq_t rptr_offs; /*!< Repeater offset */
- shortfreq_t tuning_step; /*!< Tuning step */
- shortfreq_t rit; /*!< RIT */
- shortfreq_t xit; /*!< XIT */
- setting_t funcs; /*!< Function status */
- value_t levels[RIG_SETTING_MAX]; /*!< Level values */
- tone_t ctcss_tone; /*!< CTCSS tone */
- tone_t ctcss_sql; /*!< CTCSS squelch tone */
- tone_t dcs_code; /*!< DCS code */
- tone_t dcs_sql; /*!< DCS squelch code */
- int scan_group; /*!< Scan group */
- int flags; /*!< Channel flags, see RIG_CHFLAG's */
- char channel_desc[MAXCHANDESC]; /*!< Name */
- struct ext_list *ext_levels; /*!< Extension level value list, NULL ended. ext_levels can be NULL */
-};
-/** \brief Channel structure typedef */
-typedef struct channel channel_t;
-
-/**
- * \brief Channel capability definition
- *
- * Definition of the attributes that can be stored/retrieved in/from memory
- */
-struct channel_cap {
- unsigned bank_num:1; /*!< Bank number */
- unsigned vfo:1; /*!< VFO */
- unsigned ant:1; /*!< Selected antenna */
- unsigned freq:1; /*!< Receive frequency */
- unsigned mode:1; /*!< Receive mode */
- unsigned width:1; /*!< Receive passband width associated with mode */
-
- unsigned tx_freq:1; /*!< Transmit frequency */
- unsigned tx_mode:1; /*!< Transmit mode */
- unsigned tx_width:1; /*!< Transmit passband width associated with mode */
-
- unsigned split:1; /*!< Split mode */
- unsigned tx_vfo:1; /*!< Split transmit VFO */
- unsigned rptr_shift:1; /*!< Repeater shift */
- unsigned rptr_offs:1; /*!< Repeater offset */
- unsigned tuning_step:1; /*!< Tuning step */
- unsigned rit:1; /*!< RIT */
- unsigned xit:1; /*!< XIT */
- setting_t funcs; /*!< Function status */
- setting_t levels; /*!< Level values */
- unsigned ctcss_tone:1; /*!< CTCSS tone */
- unsigned ctcss_sql:1; /*!< CTCSS squelch tone */
- unsigned dcs_code:1; /*!< DCS code */
- unsigned dcs_sql:1; /*!< DCS squelch code */
- unsigned scan_group:1; /*!< Scan group */
- unsigned flags:1; /*!< Channel flags */
- unsigned channel_desc:1; /*!< Name */
- unsigned ext_levels:1; /*!< Extension level value list */
-};
-
-/** \brief Channel cap */
-typedef struct channel_cap channel_cap_t;
-
-
-/**
- * \brief Memory channel type definition
- *
- * Definition of memory types. Depending on the type, the content
- * of the memory channel has to be interpreted accordingly.
- * For instance, a RIG_MTYPE_EDGE channel_t will hold only a start
- * or stop frequency.
- *
- * \sa chan_list
- */
-typedef enum {
- RIG_MTYPE_NONE=0, /*!< None */
- RIG_MTYPE_MEM, /*!< Regular */
- RIG_MTYPE_EDGE, /*!< Scan edge */
- RIG_MTYPE_CALL, /*!< Call channel */
- RIG_MTYPE_MEMOPAD, /*!< Memory pad */
- RIG_MTYPE_SAT, /*!< Satellite */
- RIG_MTYPE_BAND, /*!< VFO/Band channel */
- RIG_MTYPE_PRIO /*!< Priority channel */
-} chan_type_t;
-
-/**
- * \brief Memory channel list definition
- *
- * Example for the Ic706MkIIG (99 memory channels, 2 scan edges, 2 call chans):
-\code
- chan_t chan_list[] = {
- { 1, 99, RIG_MTYPE_MEM },
- { 100, 103, RIG_MTYPE_EDGE },
- { 104, 105, RIG_MTYPE_CALL },
- RIG_CHAN_END
- }
-\endcode
- */
-struct chan_list {
- int start; /*!< Starting memory channel \b number */
- int end; /*!< Ending memory channel \b number */
- chan_type_t type; /*!< Memory type. see chan_type_t */
- channel_cap_t mem_caps; /*!< Definition of attributes that can be stored/retrieved */
-};
-
-#define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
-#define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
-/** \brief Special memory channel value to tell rig_lookup_mem_caps() to retrieve all the ranges */
-#define RIG_MEM_CAPS_ALL -1
-
-/** \brief chan_t type */
-typedef struct chan_list chan_t;
-
-/**
- * \brief level/parm granularity definition
- *
- * The granularity is undefined if min=0, max=0, and step=0.
- *
- * For float settings, if min.f=0 and max.f=0 (and step.f!=0),
- * max.f is assumed to be actually equal to 1.0.
- *
- * If step=0 (and min and/or max are not null), then this means step
- * can have maximum resolution, depending on type (int or float).
- */
-struct gran {
- value_t min; /*!< Minimum value */
- value_t max; /*!< Maximum value */
- value_t step; /*!< Step */
-};
-
-/** \brief gran_t type */
-typedef struct gran gran_t;
-
-
-/** \brief Calibration table struct */
-struct cal_table {
- int size; /*!< number of plots in the table */
- struct {
- int raw; /*!< raw (A/D) value, as returned by \a RIG_LEVEL_RAWSTR */
- int val; /*!< associated value, basically the measured dB value */
- } table[MAX_CAL_LENGTH]; /*!< table of plots */
-};
-
-/**
- * \brief calibration table type
- *
- * cal_table_t is a data type suited to hold linear calibration.
- * cal_table_t.size tells the number of plots cal_table_t.table contains.
- *
- * If a value is below or equal to cal_table_t.table[0].raw,
- * rig_raw2val() will return cal_table_t.table[0].val.
- *
- * If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw,
- * rig_raw2val() will return cal_table_t.table[cal_table_t.size-1].val.
- */
-typedef struct cal_table cal_table_t;
-
-#define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
-
-
-typedef int (*chan_cb_t) (RIG *, channel_t**, int, const chan_t*, rig_ptr_t);
-typedef int (*confval_cb_t) (RIG *, const struct confparams *, value_t *, rig_ptr_t);
-
-/**
- * \brief Rig data structure.
- *
- * Basic rig type, can store some useful info about different radios.
- * Each lib must be able to populate this structure, so we can make
- * useful inquiries about capabilities.
- *
- * The main idea of this struct is that it will be defined by the backend
- * rig driver, and will remain readonly for the application.
- * Fields that need to be modifiable by the application are
- * copied into the struct rig_state, which is a kind of private
- * of the RIG instance.
- * This way, you can have several rigs running within the same application,
- * sharing the struct rig_caps of the backend, while keeping their own
- * customized data.
- * NB: don't move fields around, as backend depends on it when initializing
- * their caps.
- */
-struct rig_caps {
- rig_model_t rig_model; /*!< Rig model. */
- const char *model_name; /*!< Model name. */
- const char *mfg_name; /*!< Manufacturer. */
- const char *version; /*!< Driver version. */
- const char *copyright; /*!< Copyright info. */
- enum rig_status_e status; /*!< Driver status. */
-
- int rig_type; /*!< Rig type. */
- ptt_type_t ptt_type; /*!< Type of the PTT port. */
- dcd_type_t dcd_type; /*!< Type of the DCD port. */
- rig_port_t port_type; /*!< Type of communication port. */
-
- int serial_rate_min; /*!< Minimum serial speed. */
- int serial_rate_max; /*!< Maximum 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; /*!< Delay between each byte sent out, in mS */
- int post_write_delay; /*!< Delay between each commands send out, in mS */
- int timeout; /*!< Timeout, in mS */
- int retry; /*!< Maximum number of retries if command fails, 0 to disable */
-
- 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 level */
- setting_t has_set_level; /*!< List of set level */
- setting_t has_get_parm; /*!< List of get parm */
- setting_t has_set_parm; /*!< List of set parm */
-
- 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 parm list, \sa ext.c */
- const struct confparams *extlevels; /*!< Extension level list, \sa ext.c */
-
- const tone_t *ctcss_list; /*!< CTCSS tones list, zero ended */
- const tone_t *dcs_list; /*!< DCS code list, zero ended */
-
- int preamp[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
- int attenuator[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
- shortfreq_t max_rit; /*!< max absolute RIT */
- shortfreq_t max_xit; /*!< max absolute XIT */
- shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */
-
- ann_t announces; /*!< Announces bit field list */
-
- vfo_op_t vfo_ops; /*!< VFO op bit field list */
- scan_t scan_ops; /*!< Scan bit field list */
- int targetable_vfo; /*!< Bit field list of direct VFO access commands */
- int transceive; /*!< Supported transceive mode */
-
- int bank_qty; /*!< Number of banks */
- int chan_desc_sz; /*!< Max length of memory channel name */
-
- chan_t chan_list[CHANLSTSIZ]; /*!< Channel list, zero ended */
-
- freq_range_t rx_range_list1[FRQRANGESIZ]; /*!< Receive frequency range list for ITU region 1 */
- freq_range_t tx_range_list1[FRQRANGESIZ]; /*!< Transmit frequency range list for ITU region 1 */
- freq_range_t rx_range_list2[FRQRANGESIZ]; /*!< Receive frequency range list for ITU region 2 */
- freq_range_t tx_range_list2[FRQRANGESIZ]; /*!< Transmit frequency range list for ITU region 2 */
-
- struct tuning_step_list tuning_steps[TSLSTSIZ]; /*!< Tuning step list */
- struct filter_list filters[FLTLSTSIZ]; /*!< mode/filter table, at -6dB */
-
- cal_table_t str_cal; /*!< S-meter calibration table */
-
- const struct confparams *cfgparams; /*!< Configuration parametres. */
- const rig_ptr_t priv; /*!< Private data. */
-
- /*
- * Rig API
- *
- */
-
- int (*rig_init) (RIG * rig);
- int (*rig_cleanup) (RIG * rig);
- int (*rig_open) (RIG * rig);
- int (*rig_close) (RIG * rig);
-
- /*
- * General API commands, from most primitive to least.. :()
- * List Set/Get functions pairs
- */
-
- int (*set_freq) (RIG * rig, vfo_t vfo, freq_t freq);
- int (*get_freq) (RIG * rig, vfo_t vfo, freq_t * freq);
-
- int (*set_mode) (RIG * rig, vfo_t vfo, rmode_t mode,
- pbwidth_t width);
- int (*get_mode) (RIG * rig, vfo_t vfo, rmode_t * mode,
- pbwidth_t * width);
-
- int (*set_vfo) (RIG * rig, vfo_t vfo);
- int (*get_vfo) (RIG * rig, vfo_t * vfo);
-
- int (*set_ptt) (RIG * rig, vfo_t vfo, ptt_t ptt);
- int (*get_ptt) (RIG * rig, vfo_t vfo, ptt_t * ptt);
- int (*get_dcd) (RIG * rig, vfo_t vfo, dcd_t * dcd);
-
- int (*set_rptr_shift) (RIG * rig, vfo_t vfo,
- rptr_shift_t rptr_shift);
- int (*get_rptr_shift) (RIG * rig, vfo_t vfo,
- rptr_shift_t * rptr_shift);
-
- int (*set_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t offs);
- int (*get_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t * offs);
-
- int (*set_split_freq) (RIG * rig, vfo_t vfo, freq_t tx_freq);
- int (*get_split_freq) (RIG * rig, vfo_t vfo, freq_t * tx_freq);
- int (*set_split_mode) (RIG * rig, vfo_t vfo, rmode_t tx_mode,
- pbwidth_t tx_width);
- int (*get_split_mode) (RIG * rig, vfo_t vfo, rmode_t * tx_mode,
- pbwidth_t * tx_width);
-
- int (*set_split_vfo) (RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
- int (*get_split_vfo) (RIG * rig, vfo_t vfo, split_t * split, vfo_t *tx_vfo);
-
- int (*set_rit) (RIG * rig, vfo_t vfo, shortfreq_t rit);
- int (*get_rit) (RIG * rig, vfo_t vfo, shortfreq_t * rit);
- int (*set_xit) (RIG * rig, vfo_t vfo, shortfreq_t xit);
- int (*get_xit) (RIG * rig, vfo_t vfo, shortfreq_t * xit);
-
- int (*set_ts) (RIG * rig, vfo_t vfo, shortfreq_t ts);
- int (*get_ts) (RIG * rig, vfo_t vfo, shortfreq_t * ts);
-
- int (*set_dcs_code) (RIG * rig, vfo_t vfo, tone_t code);
- int (*get_dcs_code) (RIG * rig, vfo_t vfo, tone_t * code);
- int (*set_tone) (RIG * rig, vfo_t vfo, tone_t tone);
- int (*get_tone) (RIG * rig, vfo_t vfo, tone_t * tone);
- int (*set_ctcss_tone) (RIG * rig, vfo_t vfo, tone_t tone);
- int (*get_ctcss_tone) (RIG * rig, vfo_t vfo, tone_t * tone);
-
- int (*set_dcs_sql) (RIG * rig, vfo_t vfo, tone_t code);
- int (*get_dcs_sql) (RIG * rig, vfo_t vfo, tone_t * code);
- int (*set_tone_sql) (RIG * rig, vfo_t vfo, tone_t tone);
- int (*get_tone_sql) (RIG * rig, vfo_t vfo, tone_t * tone);
- int (*set_ctcss_sql) (RIG * rig, vfo_t vfo, tone_t tone);
- int (*get_ctcss_sql) (RIG * rig, vfo_t vfo, tone_t * tone);
-
- int (*power2mW) (RIG * rig, unsigned int *mwpower, float power,
- freq_t freq, rmode_t mode);
- int (*mW2power) (RIG * rig, float *power, unsigned int mwpower,
- freq_t freq, rmode_t mode);
-
- int (*set_powerstat) (RIG * rig, powerstat_t status);
- int (*get_powerstat) (RIG * rig, powerstat_t * status);
- int (*reset) (RIG * rig, reset_t reset);
-
- int (*set_ant) (RIG * rig, vfo_t vfo, ant_t ant);
- int (*get_ant) (RIG * rig, vfo_t vfo, ant_t * ant);
-
- int (*set_level) (RIG * rig, vfo_t vfo, setting_t level,
- value_t val);
- int (*get_level) (RIG * rig, vfo_t vfo, setting_t level,
- value_t * val);
-
- int (*set_func) (RIG * rig, vfo_t vfo, setting_t func, int status);
- int (*get_func) (RIG * rig, vfo_t vfo, setting_t func,
- int *status);
-
- int (*set_parm) (RIG * rig, setting_t parm, value_t val);
- int (*get_parm) (RIG * rig, setting_t parm, value_t * val);
-
- int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val);
- int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val);
-
- int (*set_ext_parm)(RIG *rig, token_t token, value_t val);
- int (*get_ext_parm)(RIG *rig, token_t token, value_t *val);
-
- int (*set_conf) (RIG * rig, token_t token, const char *val);
- int (*get_conf) (RIG * rig, token_t token, char *val);
-
- int (*send_dtmf) (RIG * rig, vfo_t vfo, const char *digits);
- int (*recv_dtmf) (RIG * rig, vfo_t vfo, char *digits, int *length);
- int (*send_morse) (RIG * rig, vfo_t vfo, const char *msg);
-
- int (*set_bank) (RIG * rig, vfo_t vfo, int bank);
- int (*set_mem) (RIG * rig, vfo_t vfo, int ch);
- int (*get_mem) (RIG * rig, vfo_t vfo, int *ch);
- int (*vfo_op) (RIG * rig, vfo_t vfo, vfo_op_t op);
- int (*scan) (RIG * rig, vfo_t vfo, scan_t scan, int ch);
-
- int (*set_trn) (RIG * rig, int trn);
- int (*get_trn) (RIG * rig, int *trn);
-
- int (*decode_event) (RIG * rig);
-
- int (*set_channel) (RIG * rig, const channel_t * chan);
- int (*get_channel) (RIG * rig, channel_t * chan);
-
- const char *(*get_info) (RIG * rig);
-
- int (*set_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
- int (*get_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
-
- int (*set_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
- int (*get_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
-
- const char *clone_combo_set; /*!< String describing key combination to enter load cloning mode */
- const char *clone_combo_get; /*!< String describing key combination to enter save cloning mode */
-};
-
-/**
- * \brief Port definition
- *
- * Of course, looks like OO painstakingly programmed in C, sigh.
- */
-typedef struct {
- union {
- rig_port_t rig; /*!< Communication port type */
- ptt_type_t ptt; /*!< PTT port type */
- dcd_type_t dcd; /*!< DCD port type */
- } type;
- int fd; /*!< File descriptor */
- void* handle; /*!< handle for USB */
-
- int write_delay; /*!< Delay between each byte sent out, in mS */
- int post_write_delay; /*!< Delay between each commands send out, in mS */
- struct { int tv_sec,tv_usec; } post_write_date; /*!< hamlib internal use */
- int timeout; /*!< Timeout, in mS */
- int retry; /*!< Maximum number of retries, 0 to disable */
-
- char pathname[FILPATHLEN]; /*!< Port pathname */
- union {
- struct {
- int rate; /*!< Serial baud rate */
- int data_bits; /*!< Number of data bits */
- int stop_bits; /*!< Number of stop bits */
- enum serial_parity_e parity; /*!< Serial parity */
- enum serial_handshake_e handshake; /*!< Serial handshake */
- enum serial_control_state_e rts_state; /*!< RTS set state */
- enum serial_control_state_e dtr_state; /*!< DTR set state */
- } serial; /*!< serial attributes */
- struct {
- int pin; /*!< Parallel port pin number */
- } parallel; /*!< parallel attributes */
- struct {
- int ptt_bitnum; /*< Bit number for CM108 GPIO PTT */
- } cm108; /*!< CM108 attributes */
- struct {
- int vid; /*!< Vendor ID */
- int pid; /*!< Product ID */
- int conf; /*!< Configuration */
- int iface; /*!< interface */
- int alt; /*!< alternate */
- char *vendor_name; /*!< Vendor name (opt.) */
- char *product; /*!< Product (opt.) */
- } usb; /*!< USB attributes */
- } parm; /*!< Port parameter union */
-} hamlib_port_t;
-
-#if !defined(__APPLE__) || !defined(__cplusplus)
-typedef hamlib_port_t port_t;
-#endif
-
-
-/**
- * \brief Rig state containing live data and customized fields.
- *
- * This struct contains live data, as well as a copy of capability fields
- * that may be updated (ie. customized)
- *
- * It is fine to move fields around, as this kind of struct should
- * not be initialized like caps are.
- */
-struct rig_state {
- /*
- * overridable fields
- */
- hamlib_port_t rigport; /*!< Rig port (internal use). */
- hamlib_port_t pttport; /*!< PTT port (internal use). */
- hamlib_port_t dcdport; /*!< DCD port (internal use). */
-
- double vfo_comp; /*!< VFO compensation in PPM, 0.0 to disable */
-
- int itu_region; /*!< ITU region to select among freq_range_t */
- freq_range_t rx_range_list[FRQRANGESIZ]; /*!< Receive frequency range list */
- freq_range_t tx_range_list[FRQRANGESIZ]; /*!< Transmit frequency range list */
-
- struct tuning_step_list tuning_steps[TSLSTSIZ]; /*!< Tuning step list */
-
- struct filter_list filters[FLTLSTSIZ]; /*!< Mode/filter table, at -6dB */
-
- cal_table_t str_cal; /*!< S-meter calibration table */
-
- chan_t chan_list[CHANLSTSIZ]; /*!< Channel list, zero ended */
-
- shortfreq_t max_rit; /*!< max absolute RIT */
- shortfreq_t max_xit; /*!< max absolute XIT */
- shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */
-
- ann_t announces; /*!< Announces bit field list */
-
- int preamp[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
- int attenuator[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
-
- 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 level */
- setting_t has_set_level; /*!< List of set level */
- setting_t has_get_parm; /*!< List of get parm */
- setting_t has_set_parm; /*!< List of set parm */
-
- gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity */
- gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity */
-
-
- /*
- * non overridable fields, internal use
- */
-
- int hold_decode; /*!< set to 1 to hold the event decoder (async) otherwise 0 */
- vfo_t current_vfo; /*!< VFO currently set */
- int vfo_list; /*!< Complete list of VFO for this rig */
- int comm_state; /*!< Comm port state, opened/closed. */
- rig_ptr_t priv; /*!< Pointer to private rig state data. */
- rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
-
- int transceive; /*!< Whether the transceive mode is on */
- int poll_interval; /*!< Event notification polling period in milliseconds */
- freq_t current_freq; /*!< Frequency currently set */
- rmode_t current_mode; /*!< Mode currently set */
- pbwidth_t current_width; /*!< Passband width currently set */
- vfo_t tx_vfo; /*!< Tx VFO currently set */
- int mode_list; /*!< Complete list of modes for this rig */
-
-};
-
-
-typedef int (*vprintf_cb_t) (enum rig_debug_level_e, rig_ptr_t, const char *, va_list);
-
-typedef int (*freq_cb_t) (RIG *, vfo_t, freq_t, rig_ptr_t);
-typedef int (*mode_cb_t) (RIG *, vfo_t, rmode_t, pbwidth_t, rig_ptr_t);
-typedef int (*vfo_cb_t) (RIG *, vfo_t, rig_ptr_t);
-typedef int (*ptt_cb_t) (RIG *, vfo_t, ptt_t, rig_ptr_t);
-typedef int (*dcd_cb_t) (RIG *, vfo_t, dcd_t, rig_ptr_t);
-typedef int (*pltune_cb_t) (RIG *, vfo_t, freq_t *, rmode_t *, pbwidth_t *, rig_ptr_t);
-
-/**
- * \brief Callback functions and args for rig event.
- *
- * Some rigs are able to notify the host computer the operator changed
- * the freq/mode from the front panel, depressed a button, etc.
- *
- * Events from the rig are received through async io,
- * so callback functions will be called from the SIGIO sighandler context.
- *
- * Don't set these fields directly, use rig_set_freq_callback et. al. instead.
- *
- * Callbacks suit event based programming very well,
- * really appropriate in a GUI.
- *
- * \sa rig_set_freq_callback, rig_set_mode_callback, rig_set_vfo_callback,
- * rig_set_ptt_callback, rig_set_dcd_callback
- */
-struct rig_callbacks {
- freq_cb_t freq_event; /*!< Frequency change event */
- rig_ptr_t freq_arg; /*!< Frequency change argument */
- mode_cb_t mode_event; /*!< Mode change event */
- rig_ptr_t mode_arg; /*!< Mode change argument */
- vfo_cb_t vfo_event; /*!< VFO change event */
- rig_ptr_t vfo_arg; /*!< VFO change argument */
- ptt_cb_t ptt_event; /*!< PTT change event */
- rig_ptr_t ptt_arg; /*!< PTT change argument */
- dcd_cb_t dcd_event; /*!< DCD change event */
- rig_ptr_t dcd_arg; /*!< DCD change argument */
- pltune_cb_t pltune; /*!< Pipeline tuning module freq/mode/width callback */
- rig_ptr_t pltune_arg; /*!< Pipeline tuning argument */
- /* etc.. */
-};
-
-/**
- * \brief The Rig structure
- *
- * This is the master data structure, acting as a handle for the controlled
- * rig. A pointer to this structure is returned by the rig_init() API
- * function and is passed as a parameter to every rig specific API call.
- *
- * \sa rig_init(), rig_caps, rig_state
- */
-struct rig {
- struct rig_caps *caps; /*!< Pointer to rig capabilities (read only) */
- struct rig_state state; /*!< Rig state */
- struct rig_callbacks callbacks; /*!< registered event callbacks */
-};
-
-
-
-/* --------------- API function prototypes -----------------*/
-
-extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model));
-extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig));
-
- /*
- * General API commands, from most primitive to least.. :()
- * List Set/Get functions pairs
- */
-
-extern HAMLIB_EXPORT(int) rig_set_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t freq));
-extern HAMLIB_EXPORT(int) rig_get_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq));
-
-extern HAMLIB_EXPORT(int) rig_set_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width));
-extern HAMLIB_EXPORT(int) rig_get_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width));
-
-extern HAMLIB_EXPORT(int) rig_set_vfo HAMLIB_PARAMS((RIG *rig, vfo_t vfo));
-extern HAMLIB_EXPORT(int) rig_get_vfo HAMLIB_PARAMS((RIG *rig, vfo_t *vfo));
-
-extern HAMLIB_EXPORT(int) rig_set_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t ptt));
-extern HAMLIB_EXPORT(int) rig_get_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t *ptt));
-
-extern HAMLIB_EXPORT(int) rig_get_dcd HAMLIB_PARAMS((RIG *rig, vfo_t vfo, dcd_t *dcd));
-
-extern HAMLIB_EXPORT(int) rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift));
-extern HAMLIB_EXPORT(int) rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift));
-extern HAMLIB_EXPORT(int) rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rptr_offs));
-extern HAMLIB_EXPORT(int) rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs));
-
-extern HAMLIB_EXPORT(int) rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
-extern HAMLIB_EXPORT(int) rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
-extern HAMLIB_EXPORT(int) rig_set_dcs_code HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
-extern HAMLIB_EXPORT(int) rig_get_dcs_code HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
-
-extern HAMLIB_EXPORT(int) rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
-extern HAMLIB_EXPORT(int) rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
-extern HAMLIB_EXPORT(int) rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
-extern HAMLIB_EXPORT(int) rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
-
-extern HAMLIB_EXPORT(int) rig_set_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t tx_freq));
-extern HAMLIB_EXPORT(int) rig_get_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *tx_freq));
-extern HAMLIB_EXPORT(int) rig_set_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width));
-extern HAMLIB_EXPORT(int) rig_get_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width));
-extern HAMLIB_EXPORT(int) rig_set_split_vfo HAMLIB_PARAMS((RIG*, vfo_t rx_vfo, split_t split, vfo_t tx_vfo));
-extern HAMLIB_EXPORT(int) rig_get_split_vfo HAMLIB_PARAMS((RIG*, vfo_t rx_vfo, split_t *split, vfo_t *tx_vfo));
-#define rig_set_split(r,v,s) rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR)
-#define rig_get_split(r,v,s) ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); })
-
-extern HAMLIB_EXPORT(int) rig_set_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rit));
-extern HAMLIB_EXPORT(int) rig_get_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rit));
-extern HAMLIB_EXPORT(int) rig_set_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t xit));
-extern HAMLIB_EXPORT(int) rig_get_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *xit));
-
-extern HAMLIB_EXPORT(int) rig_set_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t ts));
-extern HAMLIB_EXPORT(int) rig_get_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *ts));
-
-extern HAMLIB_EXPORT(int) rig_power2mW HAMLIB_PARAMS((RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode));
-extern HAMLIB_EXPORT(int) rig_mW2power HAMLIB_PARAMS((RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode));
-
-extern HAMLIB_EXPORT(shortfreq_t) rig_get_resolution HAMLIB_PARAMS((RIG *rig, rmode_t mode));
-
-extern HAMLIB_EXPORT(int) rig_set_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t val));
-extern HAMLIB_EXPORT(int) rig_get_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t *val));
-
-#define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
-
-extern HAMLIB_EXPORT(int) rig_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t val));
-extern HAMLIB_EXPORT(int) rig_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t *val));
-
-extern HAMLIB_EXPORT(int) rig_set_conf HAMLIB_PARAMS((RIG *rig, token_t token, const char *val));
-extern HAMLIB_EXPORT(int) rig_get_conf HAMLIB_PARAMS((RIG *rig, token_t token, char *val));
-
-extern HAMLIB_EXPORT(int) rig_set_powerstat HAMLIB_PARAMS((RIG *rig, powerstat_t status));
-extern HAMLIB_EXPORT(int) rig_get_powerstat HAMLIB_PARAMS((RIG *rig, powerstat_t *status));
-
-extern HAMLIB_EXPORT(int) rig_reset HAMLIB_PARAMS((RIG *rig, reset_t reset)); /* dangerous! */
-
-extern HAMLIB_EXPORT(int) rig_set_ext_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
- token_t token, value_t val));
-extern HAMLIB_EXPORT(int) rig_get_ext_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
- token_t token, value_t *val));
-
-extern HAMLIB_EXPORT(int) rig_set_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t val));
-extern HAMLIB_EXPORT(int) rig_get_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t *val));
-
-extern HAMLIB_EXPORT(int) rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(RIG*, const struct confparams *, rig_ptr_t), rig_ptr_t data));
-extern HAMLIB_EXPORT(int) rig_ext_parm_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(RIG*, const struct confparams *, rig_ptr_t), rig_ptr_t data));
-extern HAMLIB_EXPORT(const struct confparams*) rig_ext_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
-extern HAMLIB_EXPORT(const struct confparams *) rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig, token_t token));
-extern HAMLIB_EXPORT(token_t) rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
-
-
-extern HAMLIB_EXPORT(int) rig_token_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data));
-extern HAMLIB_EXPORT(const struct confparams*) rig_confparam_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
-extern HAMLIB_EXPORT(token_t) rig_token_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
-
-extern HAMLIB_EXPORT(int) rig_close HAMLIB_PARAMS((RIG *rig));
-extern HAMLIB_EXPORT(int) rig_cleanup HAMLIB_PARAMS((RIG *rig));
-
-extern HAMLIB_EXPORT(int) rig_set_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t ant)); /* antenna */
-extern HAMLIB_EXPORT(int) rig_get_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t *ant));
-
-extern HAMLIB_EXPORT(setting_t) rig_has_get_level HAMLIB_PARAMS((RIG *rig, setting_t level));
-extern HAMLIB_EXPORT(setting_t) rig_has_set_level HAMLIB_PARAMS((RIG *rig, setting_t level));
-
-extern HAMLIB_EXPORT(setting_t) rig_has_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
-extern HAMLIB_EXPORT(setting_t) rig_has_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
-
-extern HAMLIB_EXPORT(setting_t) rig_has_get_func HAMLIB_PARAMS((RIG *rig, setting_t func));
-extern HAMLIB_EXPORT(setting_t) rig_has_set_func HAMLIB_PARAMS((RIG *rig, setting_t func));
-
-extern HAMLIB_EXPORT(int) rig_set_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func, int status));
-extern HAMLIB_EXPORT(int) rig_get_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func, int *status));
-
-extern HAMLIB_EXPORT(int) rig_send_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const char *digits));
-extern HAMLIB_EXPORT(int) rig_recv_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo, char *digits, int *length));
-extern HAMLIB_EXPORT(int) rig_send_morse HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const char *msg));
-
-extern HAMLIB_EXPORT(int) rig_set_bank HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int bank));
-extern HAMLIB_EXPORT(int) rig_set_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int ch));
-extern HAMLIB_EXPORT(int) rig_get_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int *ch));
-extern HAMLIB_EXPORT(int) rig_vfo_op HAMLIB_PARAMS((RIG *rig, vfo_t vfo, vfo_op_t op));
-extern HAMLIB_EXPORT(vfo_op_t) rig_has_vfo_op HAMLIB_PARAMS((RIG *rig, vfo_op_t op));
-extern HAMLIB_EXPORT(int) rig_scan HAMLIB_PARAMS((RIG *rig, vfo_t vfo, scan_t scan, int ch));
-extern HAMLIB_EXPORT(scan_t) rig_has_scan HAMLIB_PARAMS((RIG *rig, scan_t scan));
-
-extern HAMLIB_EXPORT(int) rig_set_channel HAMLIB_PARAMS((RIG *rig, const channel_t *chan)); /* mem */
-extern HAMLIB_EXPORT(int) rig_get_channel HAMLIB_PARAMS((RIG *rig, channel_t *chan));
-
-extern HAMLIB_EXPORT(int) rig_set_chan_all HAMLIB_PARAMS((RIG *rig, const channel_t chans[]));
-extern HAMLIB_EXPORT(int) rig_get_chan_all HAMLIB_PARAMS((RIG *rig, channel_t chans[]));
-extern HAMLIB_EXPORT(int) rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
-extern HAMLIB_EXPORT(int) rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
-
-extern HAMLIB_EXPORT(int) rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t));
-extern HAMLIB_EXPORT(int) rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t));
-extern HAMLIB_EXPORT(int) rig_set_mem_all HAMLIB_PARAMS((RIG *rig, const channel_t *chan, const struct confparams *, const value_t *));
-extern HAMLIB_EXPORT(int) rig_get_mem_all HAMLIB_PARAMS((RIG *rig, channel_t *chan, const struct confparams *, value_t *));
-extern HAMLIB_EXPORT(const chan_t *) rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig, int ch));
-extern HAMLIB_EXPORT(int) rig_mem_count HAMLIB_PARAMS((RIG *rig));
-
-
-extern HAMLIB_EXPORT(int) rig_set_trn HAMLIB_PARAMS((RIG *rig, int trn));
-extern HAMLIB_EXPORT(int) rig_get_trn HAMLIB_PARAMS((RIG *rig, int *trn));
-extern HAMLIB_EXPORT(int) rig_set_freq_callback HAMLIB_PARAMS((RIG *, freq_cb_t, rig_ptr_t));
-extern HAMLIB_EXPORT(int) rig_set_mode_callback HAMLIB_PARAMS((RIG *, mode_cb_t, rig_ptr_t));
-extern HAMLIB_EXPORT(int) rig_set_vfo_callback HAMLIB_PARAMS((RIG *, vfo_cb_t, rig_ptr_t));
-extern HAMLIB_EXPORT(int) rig_set_ptt_callback HAMLIB_PARAMS((RIG *, ptt_cb_t, rig_ptr_t));
-extern HAMLIB_EXPORT(int) rig_set_dcd_callback HAMLIB_PARAMS((RIG *, dcd_cb_t, rig_ptr_t));
-extern HAMLIB_EXPORT(int) rig_set_pltune_callback HAMLIB_PARAMS((RIG *, pltune_cb_t, rig_ptr_t));
-
-extern HAMLIB_EXPORT(const char *) rig_get_info HAMLIB_PARAMS((RIG *rig));
-
-extern HAMLIB_EXPORT(const struct rig_caps *) rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
-extern HAMLIB_EXPORT(const freq_range_t *) rig_get_range HAMLIB_PARAMS((const freq_range_t range_list[], freq_t freq, rmode_t mode));
-
-extern HAMLIB_EXPORT(pbwidth_t) rig_passband_normal HAMLIB_PARAMS((RIG *rig, rmode_t mode));
-extern HAMLIB_EXPORT(pbwidth_t) rig_passband_narrow HAMLIB_PARAMS((RIG *rig, rmode_t mode));
-extern HAMLIB_EXPORT(pbwidth_t) rig_passband_wide HAMLIB_PARAMS((RIG *rig, rmode_t mode));
-
-extern HAMLIB_EXPORT(const char *) rigerror HAMLIB_PARAMS((int errnum));
-
-extern HAMLIB_EXPORT(int) rig_setting2idx HAMLIB_PARAMS((setting_t s));
-#define rig_idx2setting(i) (1UL<<(i))
-
-/*
- * Even if these functions are prefixed with "rig_", they are not rig specific
- * Maybe "hamlib_" would have been better. Let me know. --SF
- */
-extern HAMLIB_EXPORT(void) rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
-#define rig_set_debug_level(level) rig_set_debug(level)
-extern HAMLIB_EXPORT(int) rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
-extern HAMLIB_EXPORT(void) rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, const char *fmt, ...));
-extern HAMLIB_EXPORT(vprintf_cb_t) rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, rig_ptr_t arg));
-extern HAMLIB_EXPORT(FILE*) rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
-
-extern HAMLIB_EXPORT(int) rig_register HAMLIB_PARAMS((const struct rig_caps *caps));
-extern HAMLIB_EXPORT(int) rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
-extern HAMLIB_EXPORT(int) rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps*, rig_ptr_t), rig_ptr_t data));
-extern HAMLIB_EXPORT(int) rig_load_backend HAMLIB_PARAMS((const char *be_name));
-extern HAMLIB_EXPORT(int) rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
-extern HAMLIB_EXPORT(int) rig_load_all_backends HAMLIB_PARAMS((void));
-
-typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
-extern HAMLIB_EXPORT(int) rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p, rig_probe_func_t, rig_ptr_t));
-extern HAMLIB_EXPORT(rig_model_t) rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
-
-
-/* Misc calls */
-extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
-extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
-extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
-extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
-extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
-extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
-extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
-extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
-extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
-extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
-
-extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
-extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
-extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
-extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
-extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
-extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
-extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
-extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
-extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
-
-
-__END_DECLS
-
-#endif /* _RIG_H */
-
-/*! @} */
+/*
+ * Hamlib Interface - API header
+ * Copyright (c) 2000-2003 by Frank Singleton
+ * Copyright (c) 2000-2012 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 _RIG_H
+#define _RIG_H 1
+
+#include
+#include
+
+#include /* list in another file to not mess up w/ this one */
+
+/**
+ * \addtogroup rig
+ * @{
+ */
+
+/*! \file rig.h
+ * \brief Hamlib rig data structures.
+ *
+ * This file contains the data structures and definitions for the Hamlib rig API.
+ * see the rig.c file for more details on the rig API.
+ */
+
+
+/* __BEGIN_DECLS should be used at the beginning of your declarations,
+ * so that C++ compilers don't mangle their names. Use __END_DECLS at
+ * the end of C declarations. */
+#undef __BEGIN_DECLS
+#undef __END_DECLS
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS /* empty */
+# define __END_DECLS /* empty */
+#endif
+
+/* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
+ * that don't understand ANSI C prototypes still work, and ANSI C
+ * compilers can issue warnings about type mismatches. */
+#undef HAMLIB_PARAMS
+#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN__) || defined(_WIN32) || defined(__cplusplus)
+# define HAMLIB_PARAMS(protos) protos
+# define rig_ptr_t void*
+#else
+# define HAMLIB_PARAMS(protos) ()
+# define rig_ptr_t char*
+#endif
+
+#include
+
+
+__BEGIN_DECLS
+
+extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
+extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
+
+/**
+ * \brief Hamlib error codes
+ * Error code definition that can be returned by the Hamlib functions.
+ * Unless stated otherwise, Hamlib functions return the negative value
+ * of rig_errcode_e definitions in case of error, or 0 when successful.
+ */
+enum rig_errcode_e {
+ RIG_OK=0, /*!< No error, operation completed sucessfully */
+ RIG_EINVAL, /*!< invalid parameter */
+ RIG_ECONF, /*!< invalid configuration (serial,..) */
+ RIG_ENOMEM, /*!< memory shortage */
+ RIG_ENIMPL, /*!< function not implemented, but will be */
+ RIG_ETIMEOUT, /*!< communication timed out */
+ RIG_EIO, /*!< IO error, including open failed */
+ RIG_EINTERNAL, /*!< Internal Hamlib error, huh! */
+ RIG_EPROTO, /*!< Protocol error */
+ RIG_ERJCTED, /*!< Command rejected by the rig */
+ RIG_ETRUNC, /*!< Command performed, but arg truncated */
+ RIG_ENAVAIL, /*!< function not available */
+ RIG_ENTARGET, /*!< VFO not targetable */
+ RIG_BUSERROR, /*!< Error talking on the bus */
+ RIG_BUSBUSY, /*!< Collision on the bus */
+ RIG_EARG, /*!< NULL RIG handle or any invalid pointer parameter in get arg */
+ RIG_EVFO, /*!< Invalid VFO */
+ RIG_EDOM /*!< Argument out of domain of func */
+};
+
+/** \brief Token in the netrigctl protocol for returning error code */
+#define NETRIGCTL_RET "RPRT "
+
+/**
+ *\brief Hamlib debug levels
+ *
+ * REM: Numeric order matters for debug level
+ *
+ * \sa rig_set_debug
+ */
+enum rig_debug_level_e {
+ RIG_DEBUG_NONE = 0, /*!< no bug reporting */
+ RIG_DEBUG_BUG, /*!< serious bug */
+ RIG_DEBUG_ERR, /*!< error case (e.g. protocol, memory allocation) */
+ RIG_DEBUG_WARN, /*!< warning */
+ RIG_DEBUG_VERBOSE, /*!< verbose */
+ RIG_DEBUG_TRACE /*!< tracing */
+};
+
+/* --------------- Rig capabilities -----------------*/
+
+/* Forward struct references */
+
+struct rig;
+struct rig_state;
+
+/*!
+ * \brief Rig structure definition (see rig for details).
+ */
+typedef struct rig RIG;
+
+#define RIGNAMSIZ 30
+#define RIGVERSIZ 8
+#define FILPATHLEN 100
+#define FRQRANGESIZ 30
+#define MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */
+#define TSLSTSIZ 20 /* max tuning step list size, zero ended */
+#define FLTLSTSIZ 42 /* max mode/filter list size, zero ended */
+#define MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
+#define CHANLSTSIZ 16 /* max mem_list size, zero ended */
+#define MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
+
+
+/**
+ * \brief CTCSS and DCS type definition.
+ *
+ * Continuous Tone Controlled Squelch System (CTCSS)
+ * sub-audible tone frequency are expressed in \em tenth of Hz.
+ * For example, the subaudible tone of 88.5 Hz is represented within
+ * Hamlib by 885.
+ *
+ * Digitally-Coded Squelch codes are simple direct integers.
+ */
+typedef unsigned int tone_t;
+
+/**
+ * \brief Port type
+ */
+typedef enum rig_port_e {
+ RIG_PORT_NONE = 0, /*!< No port */
+ RIG_PORT_SERIAL, /*!< Serial */
+ RIG_PORT_NETWORK, /*!< Network socket type */
+ RIG_PORT_DEVICE, /*!< Device driver, like the WiNRADiO */
+ RIG_PORT_PACKET, /*!< AX.25 network type, e.g. SV8CS protocol */
+ RIG_PORT_DTMF, /*!< DTMF protocol bridge via another rig, eg. Kenwood Sky Cmd System */
+ RIG_PORT_ULTRA, /*!< IrDA Ultra protocol! */
+ RIG_PORT_RPC, /*!< RPC wrapper */
+ RIG_PORT_PARALLEL, /*!< Parallel port */
+ RIG_PORT_USB, /*!< USB port */
+ RIG_PORT_UDP_NETWORK, /*!< UDP Network socket type */
+ RIG_PORT_CM108 /*!< CM108 GPIO */
+} rig_port_t;
+
+/**
+ * \brief Serial parity
+ */
+enum serial_parity_e {
+ RIG_PARITY_NONE = 0, /*!< No parity */
+ RIG_PARITY_ODD, /*!< Odd */
+ RIG_PARITY_EVEN, /*!< Even */
+ RIG_PARITY_MARK, /*!< Mark */
+ RIG_PARITY_SPACE /*!< Space */
+};
+
+/**
+ * \brief Serial handshake
+ */
+enum serial_handshake_e {
+ RIG_HANDSHAKE_NONE = 0, /*!< No handshake */
+ RIG_HANDSHAKE_XONXOFF, /*!< Software XON/XOFF */
+ RIG_HANDSHAKE_HARDWARE /*!< Hardware CTS/RTS */
+};
+
+
+/**
+ * \brief Serial control state
+ */
+enum serial_control_state_e {
+ RIG_SIGNAL_UNSET = 0, /*!< Unset or tri-state */
+ RIG_SIGNAL_ON, /*!< ON */
+ RIG_SIGNAL_OFF /*!< OFF */
+};
+
+/** \brief Rig type flags */
+typedef enum {
+ RIG_FLAG_RECEIVER = (1<<1), /*!< Receiver */
+ RIG_FLAG_TRANSMITTER = (1<<2), /*!< Transmitter */
+ RIG_FLAG_SCANNER = (1<<3), /*!< Scanner */
+
+ RIG_FLAG_MOBILE = (1<<4), /*!< mobile sized */
+ RIG_FLAG_HANDHELD = (1<<5), /*!< handheld sized */
+ RIG_FLAG_COMPUTER = (1<<6), /*!< "Computer" rig */
+ RIG_FLAG_TRUNKING = (1<<7), /*!< has trunking */
+ RIG_FLAG_APRS = (1<<8), /*!< has APRS */
+ RIG_FLAG_TNC = (1<<9), /*!< has TNC */
+ RIG_FLAG_DXCLUSTER = (1<<10), /*!< has DXCluster */
+ RIG_FLAG_TUNER = (1<<11) /*!< dumb tuner */
+} rig_type_t;
+
+#define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
+#define RIG_TYPE_MASK (RIG_FLAG_TRANSCEIVER|RIG_FLAG_SCANNER|RIG_FLAG_MOBILE|RIG_FLAG_HANDHELD|RIG_FLAG_COMPUTER|RIG_FLAG_TRUNKING|RIG_FLAG_TUNER)
+
+#define RIG_TYPE_OTHER 0
+#define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
+#define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
+#define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
+#define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
+#define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
+#define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
+#define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
+#define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
+#define RIG_TYPE_TUNER RIG_FLAG_TUNER
+
+
+/**
+ * \brief Development status of the backend
+ */
+enum rig_status_e {
+ RIG_STATUS_ALPHA = 0, /*!< Alpha quality, i.e. development */
+ RIG_STATUS_UNTESTED, /*!< Written from available specs, rig unavailable for test, feedback wanted! */
+ RIG_STATUS_BETA, /*!< Beta quality */
+ RIG_STATUS_STABLE, /*!< Stable */
+ RIG_STATUS_BUGGY /*!< Was stable, but something broke it! */
+/* RIG_STATUS_NEW * *!< Initial release of code
+ * !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
+};
+
+/** \brief Map all deprecated RIG_STATUS_NEW references to RIG_STATUS_UNTESTED for backward compatibility */
+#define RIG_STATUS_NEW RIG_STATUS_UNTESTED
+
+/**
+ * \brief Repeater shift type
+ */
+typedef enum {
+ RIG_RPT_SHIFT_NONE = 0, /*!< No repeater shift */
+ RIG_RPT_SHIFT_MINUS, /*!< "-" shift */
+ RIG_RPT_SHIFT_PLUS /*!< "+" shift */
+} rptr_shift_t;
+
+/**
+ * \brief Split mode
+ */
+typedef enum {
+ RIG_SPLIT_OFF = 0, /*!< Split mode disabled */
+ RIG_SPLIT_ON /*!< Split mode enabled */
+} split_t;
+
+/**
+ * \brief Frequency type,
+ * Frequency type unit in Hz, able to hold SHF frequencies.
+ */
+typedef double freq_t;
+/** \brief printf(3) format to be used for freq_t type */
+#define PRIfreq "f"
+/** \brief scanf(3) format to be used for freq_t type */
+#define SCNfreq "lf"
+#define FREQFMT SCNfreq
+
+/**
+ * \brief Short frequency type
+ * Frequency in Hz restricted to 31bits, suitable for offsets, shifts, etc..
+ */
+typedef signed long shortfreq_t;
+
+#define Hz(f) ((freq_t)(f))
+#define kHz(f) ((freq_t)((f)*(freq_t)1000))
+#define MHz(f) ((freq_t)((f)*(freq_t)1000000))
+#define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
+
+#define s_Hz(f) ((shortfreq_t)(f))
+#define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
+#define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
+#define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
+
+#define RIG_FREQ_NONE Hz(0)
+
+
+/**
+ * \brief VFO definition
+ *
+ * There are several ways of using a vfo_t. For most cases, using RIG_VFO_A,
+ * RIG_VFO_B, RIG_VFO_CURR, etc., as opaque macros should suffice.
+ *
+ * Strictly speaking a VFO is Variable Frequency Oscillator.
+ * Here, it is referred as a tunable channel, from the radio operator's
+ * point of view. The channel can be designated individually by its real
+ * number, or by using an alias.
+ *
+ * Aliases may or may not be honored by a backend and are defined using
+ * high significant bits, i.e. RIG_VFO_MEM, RIG_VFO_MAIN, etc.
+ *
+ */
+typedef int vfo_t;
+
+/** \brief '' -- used in caps */
+#define RIG_VFO_NONE 0
+
+#define RIG_VFO_TX_FLAG (1<<30)
+
+/** \brief \c currVFO -- current "tunable channel"/VFO */
+#define RIG_VFO_CURR (1<<29)
+
+/** \brief \c MEM -- means Memory mode, to be used with set_vfo */
+#define RIG_VFO_MEM (1<<28)
+
+/** \brief \c VFO -- means (last or any)VFO mode, with set_vfo */
+#define RIG_VFO_VFO (1<<27)
+
+#define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
+
+/** \brief \c TX -- alias for split tx or uplink, of VFO_CURR */
+#define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
+
+/** \brief \c RX -- alias for split rx or downlink */
+#define RIG_VFO_RX RIG_VFO_CURR
+
+/** \brief \c Main -- alias for MAIN */
+#define RIG_VFO_MAIN (1<<26)
+/** \brief \c Sub -- alias for SUB */
+#define RIG_VFO_SUB (1<<25)
+
+#define RIG_VFO_N(n) (1<<(n))
+
+/** \brief \c VFOA -- VFO A */
+#define RIG_VFO_A RIG_VFO_N(0)
+/** \brief \c VFOB -- VFO B */
+#define RIG_VFO_B RIG_VFO_N(1)
+/** \brief \c VFOC -- VFO C */
+#define RIG_VFO_C RIG_VFO_N(2)
+
+
+/*
+ * targetable bitfields, for internal use.
+ * RIG_TARGETABLE_PURE means a pure targetable radio on every command
+ */
+#define RIG_TARGETABLE_NONE 0
+#define RIG_TARGETABLE_FREQ (1<<0)
+#define RIG_TARGETABLE_MODE (1<<1)
+#define RIG_TARGETABLE_PURE (1<<2)
+#define RIG_TARGETABLE_TONE (1<<3)
+#define RIG_TARGETABLE_FUNC (1<<4)
+#define RIG_TARGETABLE_ALL 0x7fffffff
+
+
+#define RIG_PASSBAND_NORMAL s_Hz(0)
+/**
+ * \brief Passband width, in Hz
+ * \sa rig_passband_normal, rig_passband_narrow, rig_passband_wide
+ */
+typedef shortfreq_t pbwidth_t;
+
+
+/**
+ * \brief DCD status
+ */
+typedef enum dcd_e {
+ RIG_DCD_OFF = 0, /*!< Squelch closed */
+ RIG_DCD_ON /*!< Squelch open */
+} dcd_t;
+
+/**
+ * \brief DCD type
+ * \sa rig_get_dcd
+ */
+typedef enum {
+ RIG_DCD_NONE = 0, /*!< No DCD available */
+ RIG_DCD_RIG, /*!< Rig has DCD status support, i.e. rig has get_dcd cap */
+ RIG_DCD_SERIAL_DSR, /*!< DCD status from serial DSR signal */
+ RIG_DCD_SERIAL_CTS, /*!< DCD status from serial CTS signal */
+ RIG_DCD_SERIAL_CAR, /*!< DCD status from serial CD signal */
+ RIG_DCD_PARALLEL, /*!< DCD status from parallel port pin */
+ RIG_DCD_CM108 /*!< DCD status from CM108 vol dn pin */
+} dcd_type_t;
+
+
+/**
+ * \brief PTT status
+ */
+typedef enum {
+ RIG_PTT_OFF = 0, /*!< PTT desactivated */
+ RIG_PTT_ON, /*!< PTT activated */
+ RIG_PTT_ON_MIC, /*!< PTT Mic only, fallbacks on RIG_PTT_ON if unavailable */
+ RIG_PTT_ON_DATA /*!< PTT Data (Mic-muted), fallbacks on RIG_PTT_ON if unavailable */
+} ptt_t;
+
+/**
+ * \brief PTT type
+ * \sa rig_get_ptt
+ */
+typedef enum {
+ RIG_PTT_NONE = 0, /*!< No PTT available */
+ RIG_PTT_RIG, /*!< Legacy PTT */
+ RIG_PTT_SERIAL_DTR, /*!< PTT control through serial DTR signal */
+ RIG_PTT_SERIAL_RTS, /*!< PTT control through serial RTS signal */
+ RIG_PTT_PARALLEL, /*!< PTT control through parallel port */
+ RIG_PTT_RIG_MICDATA, /*!< Legacy PTT, supports RIG_PTT_ON_MIC/RIG_PTT_ON_DATA */
+ RIG_PTT_CM108 /*!< PTT control through CM108 GPIO pin */
+} ptt_type_t;
+
+/**
+ * \brief Radio power state
+ */
+typedef enum {
+ RIG_POWER_OFF = 0, /*!< Power off */
+ RIG_POWER_ON = (1<<0), /*!< Power on */
+ RIG_POWER_STANDBY = (1<<1) /*!< Standby */
+} powerstat_t;
+
+/**
+ * \brief Reset operation
+ */
+typedef enum {
+ RIG_RESET_NONE = 0, /*!< No reset */
+ RIG_RESET_SOFT = (1<<0), /*!< Software reset */
+ RIG_RESET_VFO = (1<<1), /*!< VFO reset */
+ RIG_RESET_MCALL = (1<<2), /*!< Memory clear */
+ RIG_RESET_MASTER = (1<<3) /*!< Master reset */
+} reset_t;
+
+
+/**
+ * \brief VFO operation
+ *
+ * A VFO operation is an action on a VFO (or tunable memory).
+ * The difference with a function is that an action has no on/off
+ * status, it is performed at once.
+ *
+ * Note: the vfo argument for some vfo operation may be irrelevant,
+ * and thus will be ignored.
+ *
+ * The VFO/MEM "mode" is set by rig_set_vfo.\n
+ * \c STRING used in rigctl
+ *
+ * \sa rig_parse_vfo_op() rig_strvfop()
+ */
+typedef enum {
+ RIG_OP_NONE = 0, /*!< '' No VFO_OP */
+ RIG_OP_CPY = (1<<0), /*!< \c CPY -- VFO A = VFO B */
+ RIG_OP_XCHG = (1<<1), /*!< \c XCHG -- Exchange VFO A/B */
+ RIG_OP_FROM_VFO = (1<<2), /*!< \c FROM_VFO -- VFO->MEM */
+ RIG_OP_TO_VFO = (1<<3), /*!< \c TO_VFO -- MEM->VFO */
+ RIG_OP_MCL = (1<<4), /*!< \c MCL -- Memory clear */
+ RIG_OP_UP = (1<<5), /*!< \c UP -- UP increment VFO freq by tuning step*/
+ RIG_OP_DOWN = (1<<6), /*!< \c DOWN -- DOWN decrement VFO freq by tuning step*/
+ RIG_OP_BAND_UP = (1<<7), /*!< \c BAND_UP -- Band UP */
+ RIG_OP_BAND_DOWN = (1<<8), /*!< \c BAND_DOWN -- Band DOWN */
+ RIG_OP_LEFT = (1<<9), /*!< \c LEFT -- LEFT */
+ RIG_OP_RIGHT = (1<<10),/*!< \c RIGHT -- RIGHT */
+ RIG_OP_TUNE = (1<<11),/*!< \c TUNE -- Start tune */
+ RIG_OP_TOGGLE = (1<<12) /*!< \c TOGGLE -- Toggle VFOA and VFOB */
+} vfo_op_t;
+
+
+/**
+ * \brief Rig Scan operation
+ *
+ * Various scan operations supported by a rig.\n
+ * \c STRING used in rigctl
+ *
+ * \sa rig_parse_scan() rig_strscan()
+ */
+typedef enum {
+ RIG_SCAN_NONE = 0, /*!< '' No Scan */
+ RIG_SCAN_STOP = RIG_SCAN_NONE, /*!< \c STOP -- Stop scanning */
+ RIG_SCAN_MEM = (1<<0), /*!< \c MEM -- Scan all memory channels */
+ RIG_SCAN_SLCT = (1<<1), /*!< \c SLCT -- Scan all selected memory channels */
+ RIG_SCAN_PRIO = (1<<2), /*!< \c PRIO -- Priority watch (mem or call channel) */
+ RIG_SCAN_PROG = (1<<3), /*!< \c PROG -- Programmed(edge) scan */
+ RIG_SCAN_DELTA = (1<<4), /*!< \c DELTA -- delta-f scan */
+ RIG_SCAN_VFO = (1<<5), /*!< \c VFO -- most basic scan */
+ RIG_SCAN_PLT = (1<<6) /*!< \c PLT -- Scan using pipelined tuning */
+} scan_t;
+
+/**
+ * \brief configuration token
+ */
+typedef long token_t;
+
+#define RIG_CONF_END 0
+
+/**
+ * \brief parameter types
+ *
+ * Used with configuration, parameter and extra-parm tables.
+ *
+ * Current internal implementation
+ * NUMERIC: val.f or val.i
+ * COMBO: val.i, starting from 0. Points to a table of strings or asci stored values.
+ * STRING: val.s or val.cs
+ * CHECKBUTTON: val.i 0/1
+ */
+
+/* strongly inspired from soundmodem. Thanks Thomas! */
+
+enum rig_conf_e {
+ RIG_CONF_STRING, /*!< String type */
+ RIG_CONF_COMBO, /*!< Combo type */
+ RIG_CONF_NUMERIC, /*!< Numeric type integer or real */
+ RIG_CONF_CHECKBUTTON, /*!< on/off type */
+ RIG_CONF_BUTTON /*!< Button type */
+};
+
+#define RIG_COMBO_MAX 8
+
+/**
+ * \brief Configuration parameter structure.
+ */
+struct confparams {
+ token_t token; /*!< Conf param token ID */
+ const char *name; /*!< Param name, no spaces allowed */
+ const char *label; /*!< Human readable label */
+ const char *tooltip; /*!< Hint on the parameter */
+ const char *dflt; /*!< Default value */
+ enum rig_conf_e type; /*!< Type of the parameter */
+ union { /*!< */
+ struct { /*!< */
+ float min; /*!< Minimum value */
+ float max; /*!< Maximum value */
+ float step; /*!< Step */
+ } n; /*!< Numeric type */
+ struct { /*!< */
+ const char *combostr[RIG_COMBO_MAX]; /*!< Combo list */
+ } c; /*!< Combo type */
+ } u; /*!< Type union */
+};
+
+/** \brief Announce
+ *
+ * Designate optional speech synthesizer.
+ */
+typedef enum {
+ RIG_ANN_NONE = 0, /*!< None */
+ RIG_ANN_OFF = RIG_ANN_NONE, /*!< disable announces */
+ RIG_ANN_FREQ = (1<<0), /*!< Announce frequency */
+ RIG_ANN_RXMODE = (1<<1), /*!< Announce receive mode */
+ RIG_ANN_CW = (1<<2), /*!< CW */
+ RIG_ANN_ENG = (1<<3), /*!< English */
+ RIG_ANN_JAP = (1<<4) /*!< Japan */
+} ann_t;
+
+
+/**
+ * \brief Antenna number
+ */
+typedef int ant_t;
+
+#define RIG_ANT_NONE 0
+#define RIG_ANT_N(n) ((ant_t)1<<(n))
+#define RIG_ANT_1 RIG_ANT_N(0)
+#define RIG_ANT_2 RIG_ANT_N(1)
+#define RIG_ANT_3 RIG_ANT_N(2)
+#define RIG_ANT_4 RIG_ANT_N(3)
+#define RIG_ANT_5 RIG_ANT_N(4)
+
+/**
+ * \brief AGC delay settings
+ */
+/* TODO: kill me, and replace by real AGC delay */
+enum agc_level_e {
+ RIG_AGC_OFF = 0,
+ RIG_AGC_SUPERFAST,
+ RIG_AGC_FAST,
+ RIG_AGC_SLOW,
+ RIG_AGC_USER, /*!< user selectable */
+ RIG_AGC_MEDIUM,
+ RIG_AGC_AUTO
+};
+
+/**
+ * \brief Level display meters
+ */
+enum meter_level_e {
+ RIG_METER_NONE = 0, /*< No display meter */
+ RIG_METER_SWR = (1<<0), /*< Stationary Wave Ratio */
+ RIG_METER_COMP = (1<<1), /*< Compression level */
+ RIG_METER_ALC = (1<<2), /*< ALC */
+ RIG_METER_IC = (1<<3), /*< IC */
+ RIG_METER_DB = (1<<4), /*< DB */
+ RIG_METER_PO = (1<<5), /*< Power Out */
+ RIG_METER_VDD = (1<<6) /*< Final Amp Voltage */
+};
+
+/**
+ * \brief Universal approach for passing values
+ * \sa rig_set_level, rig_get_level, rig_set_parm, rig_get_parm
+ */
+typedef union {
+ signed int i; /*!< Signed integer */
+ float f; /*!< Single precision float */
+ char *s; /*!< Pointer to char string */
+ const char *cs; /*!< Pointer to constant char string */
+} value_t;
+
+/** \brief Rig Level Settings
+ *
+ * Various operating levels supported by a rig.\n
+ * \c STRING used in rigctl
+ *
+ * \sa rig_parse_level() rig_strlevel()
+ */
+
+enum rig_level_e {
+ RIG_LEVEL_NONE = 0, /*!< '' -- No Level */
+ RIG_LEVEL_PREAMP = (1<<0), /*!< \c PREAMP -- Preamp, arg int (dB) */
+ RIG_LEVEL_ATT = (1<<1), /*!< \c ATT -- Attenuator, arg int (dB) */
+ RIG_LEVEL_VOX = (1<<2), /*!< \c VOX -- VOX delay, arg int (tenth of seconds) */
+ RIG_LEVEL_AF = (1<<3), /*!< \c AF -- Volume, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_RF = (1<<4), /*!< \c RF -- RF gain (not TX power), arg float [0.0 ... 1.0] */
+ RIG_LEVEL_SQL = (1<<5), /*!< \c SQL -- Squelch, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_IF = (1<<6), /*!< \c IF -- IF, arg int (Hz) */
+ RIG_LEVEL_APF = (1<<7), /*!< \c APF -- Audio Peak Filter, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_NR = (1<<8), /*!< \c NR -- Noise Reduction, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_PBT_IN = (1<<9), /*!< \c PBT_IN -- Twin PBT (inside), arg float [0.0 ... 1.0] */
+ RIG_LEVEL_PBT_OUT = (1<<10),/*!< \c PBT_OUT -- Twin PBT (outside), arg float [0.0 ... 1.0] */
+ RIG_LEVEL_CWPITCH = (1<<11),/*!< \c CWPITCH -- CW pitch, arg int (Hz) */
+ RIG_LEVEL_RFPOWER = (1<<12),/*!< \c RFPOWER -- RF Power, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_MICGAIN = (1<<13),/*!< \c MICGAIN -- MIC Gain, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_KEYSPD = (1<<14),/*!< \c KEYSPD -- Key Speed, arg int (WPM) */
+ RIG_LEVEL_NOTCHF = (1<<15),/*!< \c NOTCHF -- Notch Freq., arg int (Hz) */
+ RIG_LEVEL_COMP = (1<<16),/*!< \c COMP -- Compressor, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_AGC = (1<<17),/*!< \c AGC -- AGC, arg int (see enum agc_level_e) */
+ RIG_LEVEL_BKINDL = (1<<18),/*!< \c BKINDL -- BKin Delay, arg int (tenth of dots) */
+ RIG_LEVEL_BALANCE = (1<<19),/*!< \c BAL -- Balance (Dual Watch), arg float [0.0 ... 1.0] */
+ RIG_LEVEL_METER = (1<<20),/*!< \c METER -- Display meter, arg int (see enum meter_level_e) */
+
+ RIG_LEVEL_VOXGAIN = (1<<21),/*!< \c VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_VOXDELAY = RIG_LEVEL_VOX, /*!< Synonym of RIG_LEVEL_VOX */
+ RIG_LEVEL_ANTIVOX = (1<<22),/*!< \c ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0] */
+ RIG_LEVEL_SLOPE_LOW = (1<<23),/*!< \c SLOPE_LOW -- Slope tune, low frequency cut, */
+ RIG_LEVEL_SLOPE_HIGH = (1<<24),/*!< \c SLOPE_HIGH -- Slope tune, high frequency cut, */
+ RIG_LEVEL_BKIN_DLYMS = (1<<25),/*!< \c BKIN_DLYMS -- BKin Delay, arg int Milliseconds */
+
+ /*!< These ones are not settable */
+ RIG_LEVEL_RAWSTR = (1<<26),/*!< \c RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int */
+ RIG_LEVEL_SQLSTAT = (1<<27),/*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */
+ RIG_LEVEL_SWR = (1<<28),/*!< \c SWR -- SWR, arg float [0.0 ... infinite] */
+ RIG_LEVEL_ALC = (1<<29),/*!< \c ALC -- ALC, arg float */
+ RIG_LEVEL_STRENGTH =(1<<30) /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */
+ /*RIG_LEVEL_BWC = (1<<31)*/ /*!< Bandwidth Control, arg int (Hz) */
+};
+
+#define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX)
+
+#define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SQLSTAT|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR)
+
+#define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
+#define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
+
+
+/**
+ * \brief Rig Parameters
+ *
+ * Parameters are settings that are not VFO specific.\n
+ * \c STRING used in rigctl
+ *
+ * \sa rig_parse_parm() rig_strparm()
+ */
+enum rig_parm_e {
+ RIG_PARM_NONE = 0, /*!< '' -- No Parm */
+ RIG_PARM_ANN = (1<<0), /*!< \c ANN -- "Announce" level, see ann_t */
+ RIG_PARM_APO = (1<<1), /*!< \c APO -- Auto power off, int in minute */
+ RIG_PARM_BACKLIGHT = (1<<2), /*!< \c BACKLIGHT -- LCD light, float [0.0 ... 1.0] */
+ RIG_PARM_BEEP = (1<<4), /*!< \c BEEP -- Beep on keypressed, int (0,1) */
+ RIG_PARM_TIME = (1<<5), /*!< \c TIME -- hh:mm:ss, int in seconds from 00:00:00 */
+ RIG_PARM_BAT = (1<<6), /*!< \c BAT -- battery level, float [0.0 ... 1.0] */
+ RIG_PARM_KEYLIGHT = (1<<7) /*!< \c KEYLIGHT -- Button backlight, on/off */
+};
+
+#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT)
+#define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
+
+#define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
+#define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
+
+#define RIG_SETTING_MAX 32
+/**
+ * \brief Setting
+ *
+ * This can be a func, a level or a parm.
+ * Each bit designates one of them.
+ */
+typedef unsigned long setting_t;
+
+/*
+ * tranceive mode, ie. the rig notify the host of any event,
+ * like freq changed, mode changed, etc.
+ */
+#define RIG_TRN_OFF 0
+#define RIG_TRN_RIG 1
+#define RIG_TRN_POLL 2
+
+
+/**
+ * \brief Rig Function Settings
+ *
+ * Various operating functions supported by a rig.\n
+ * \c STRING used in rigctl
+ *
+ * \sa rig_parse_func() rig_strfunc()
+ */
+enum rig_func_e {
+ RIG_FUNC_NONE = 0, /*!< '' -- No Function */
+ RIG_FUNC_FAGC = (1<<0), /*!< \c FAGC -- Fast AGC */
+ RIG_FUNC_NB = (1<<1), /*!< \c NB -- Noise Blanker */
+ RIG_FUNC_COMP = (1<<2), /*!< \c COMP -- Speech Compression */
+ RIG_FUNC_VOX = (1<<3), /*!< \c VOX -- Voice Operated Relay */
+ RIG_FUNC_TONE = (1<<4), /*!< \c TONE -- CTCSS Tone */
+ RIG_FUNC_TSQL = (1<<5), /*!< \c TSQL -- CTCSS Activate/De-activate */
+ RIG_FUNC_SBKIN = (1<<6), /*!< \c SBKIN -- Semi Break-in (CW mode) */
+ RIG_FUNC_FBKIN = (1<<7), /*!< \c FBKIN -- Full Break-in (CW mode) */
+ RIG_FUNC_ANF = (1<<8), /*!< \c ANF -- Automatic Notch Filter (DSP) */
+ RIG_FUNC_NR = (1<<9), /*!< \c NR -- Noise Reduction (DSP) */
+ RIG_FUNC_AIP = (1<<10),/*!< \c AIP -- RF pre-amp (AIP on Kenwood, IPO on Yaesu, etc.) */
+ RIG_FUNC_APF = (1<<11),/*!< \c APF -- Auto Passband/Audio Peak Filter */
+ RIG_FUNC_MON = (1<<12),/*!< \c MON -- Monitor transmitted signal */
+ RIG_FUNC_MN = (1<<13),/*!< \c MN -- Manual Notch */
+ RIG_FUNC_RF = (1<<14),/*!< \c RF -- RTTY Filter */
+ RIG_FUNC_ARO = (1<<15),/*!< \c ARO -- Auto Repeater Offset */
+ RIG_FUNC_LOCK = (1<<16),/*!< \c LOCK -- Lock */
+ RIG_FUNC_MUTE = (1<<17),/*!< \c MUTE -- Mute */
+ RIG_FUNC_VSC = (1<<18),/*!< \c VSC -- Voice Scan Control */
+ RIG_FUNC_REV = (1<<19),/*!< \c REV -- Reverse transmit and receive frequencies */
+ RIG_FUNC_SQL = (1<<20),/*!< \c SQL -- Turn Squelch Monitor on/off */
+ RIG_FUNC_ABM = (1<<21),/*!< \c ABM -- Auto Band Mode */
+ RIG_FUNC_BC = (1<<22),/*!< \c BC -- Beat Canceller */
+ RIG_FUNC_MBC = (1<<23),/*!< \c MBC -- Manual Beat Canceller */
+ /* (1<<24), used to be RIG_FUNC_LMP, see RIG_PARM_BACKLIGHT instead) */
+ RIG_FUNC_AFC = (1<<25),/*!< \c AFC -- Auto Frequency Control ON/OFF */
+ RIG_FUNC_SATMODE = (1<<26),/*!< \c SATMODE -- Satellite mode ON/OFF */
+ RIG_FUNC_SCOPE = (1<<27),/*!< \c SCOPE -- Simple bandscope ON/OFF */
+ RIG_FUNC_RESUME = (1<<28),/*!< \c RESUME -- Scan auto-resume */
+ RIG_FUNC_TBURST = (1<<29),/*!< \c TBURST -- 1750 Hz tone burst */
+ RIG_FUNC_TUNER = (1<<30) /*!< \c TUNER -- Enable automatic tuner */
+};
+
+/*
+ * power unit macros, converts to mW
+ * This is limited to 2MW on 32 bits systems.
+ */
+#define mW(p) ((int)(p))
+#define Watts(p) ((int)((p)*1000))
+#define W(p) Watts(p)
+#define kW(p) ((int)((p)*1000000L))
+
+/**
+ * \brief Radio mode
+ *
+ * Various modes supported by a rig.\n
+ * \c STRING used in rigctl
+ *
+ * \sa rig_parse_mode() rig_strrmode()
+ */
+typedef enum {
+ RIG_MODE_NONE = 0, /*!< '' -- None */
+ RIG_MODE_AM = (1<<0), /*!< \c AM -- Amplitude Modulation */
+ RIG_MODE_CW = (1<<1), /*!< \c CW -- CW "normal" sideband */
+ RIG_MODE_USB = (1<<2), /*!< \c USB -- Upper Side Band */
+ RIG_MODE_LSB = (1<<3), /*!< \c LSB -- Lower Side Band */
+ RIG_MODE_RTTY = (1<<4), /*!< \c RTTY -- Radio Teletype */
+ RIG_MODE_FM = (1<<5), /*!< \c FM -- "narrow" band FM */
+ RIG_MODE_WFM = (1<<6), /*!< \c WFM -- broadcast wide FM */
+ RIG_MODE_CWR = (1<<7), /*!< \c CWR -- CW "reverse" sideband */
+ RIG_MODE_RTTYR = (1<<8), /*!< \c RTTYR -- RTTY "reverse" sideband */
+ RIG_MODE_AMS = (1<<9), /*!< \c AMS -- Amplitude Modulation Synchronous */
+ RIG_MODE_PKTLSB = (1<<10),/*!< \c PKTLSB -- Packet/Digital LSB mode (dedicated port) */
+ RIG_MODE_PKTUSB = (1<<11),/*!< \c PKTUSB -- Packet/Digital USB mode (dedicated port) */
+ RIG_MODE_PKTFM = (1<<12),/*!< \c PKTFM -- Packet/Digital FM mode (dedicated port) */
+ RIG_MODE_ECSSUSB = (1<<13),/*!< \c ECSSUSB -- Exalted Carrier Single Sideband USB */
+ RIG_MODE_ECSSLSB = (1<<14),/*!< \c ECSSLSB -- Exalted Carrier Single Sideband LSB */
+ RIG_MODE_FAX = (1<<15),/*!< \c FAX -- Facsimile Mode */
+ RIG_MODE_SAM = (1<<16),/*!< \c SAM -- Synchronous AM double sideband */
+ RIG_MODE_SAL = (1<<17),/*!< \c SAL -- Synchronous AM lower sideband */
+ RIG_MODE_SAH = (1<<18),/*!< \c SAH -- Synchronous AM upper (higher) sideband */
+ RIG_MODE_DSB = (1<<19), /*!< \c DSB -- Double sideband suppressed carrier */
+ RIG_MODE_TESTS_MAX /*!< \c MUST ALWAYS BE LAST, Max Count for dumpcaps.c */
+} rmode_t;
+
+
+/** \brief macro for backends, not to be used by rig_set_mode et al. */
+#define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
+
+/** \brief macro for backends, not to be used by rig_set_mode et al. */
+#define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
+
+
+#define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
+#define RIG_IS_DBLST_END(d) ((d)==0)
+
+/**
+ * \brief Frequency range
+ *
+ * Put together a group of this struct in an array to define
+ * what frequencies your rig has access to.
+ */
+typedef struct freq_range_list {
+ freq_t start; /*!< Start frequency */
+ freq_t end; /*!< End frequency */
+ rmode_t modes; /*!< Bit field of RIG_MODE's */
+ int low_power; /*!< Lower RF power in mW, -1 for no power (ie. rx list) */
+ int high_power; /*!< Higher RF power in mW, -1 for no power (ie. rx list) */
+ vfo_t vfo; /*!< VFO list equipped with this range */
+ ant_t ant; /*!< Antenna list equipped with this range, 0 means all */
+} freq_range_t;
+
+#define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
+#define RIG_IS_FRNG_END(r) ((r).start == Hz(0) && (r).end == Hz(0))
+
+#define RIG_ITU_REGION1 1
+#define RIG_ITU_REGION2 2
+#define RIG_ITU_REGION3 3
+
+/**
+ * \brief Tuning step definition
+ *
+ * Lists the tuning steps available for each mode.
+ *
+ * If a ts field in the list has RIG_TS_ANY value,
+ * this means the rig allows its tuning step to be
+ * set to any value ranging from the lowest to the
+ * highest (if any) value in the list for that mode.
+ * The tuning step must be sorted in the ascending
+ * order, and the RIG_TS_ANY value, if present, must
+ * be the last one in the list.
+ *
+ * Note also that the minimum frequency resolution
+ * of the rig is determined by the lowest value
+ * in the Tuning step list.
+ *
+ * \sa rig_set_ts, rig_get_resolution
+ */
+struct tuning_step_list {
+ rmode_t modes; /*!< Bit field of RIG_MODE's */
+ shortfreq_t ts; /*!< Tuning step in Hz */
+};
+
+#define RIG_TS_ANY 0
+#define RIG_TS_END {RIG_MODE_NONE,0}
+#define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
+
+/**
+ * \brief Filter definition
+ *
+ * Lists the filters available for each mode.
+ *
+ * If more than one filter is available for a given mode,
+ * the first entry in the array will be the default
+ * filter to use for the normal passband of this mode.
+ * The first entry in the array below the default normal passband
+ * is the default narrow passband and the first entry in the array
+ * above the default normal passband is the default wide passband.
+ * Note: if there's no lower width or upper width, then narrow or
+ * respectively wide passband is equal to the default normal passband.
+ *
+ * If a width field in the list has RIG_FLT_ANY value,
+ * this means the rig allows its passband width to be
+ * set to any value ranging from the lowest to the
+ * highest value (if any) in the list for that mode.
+ * The RIG_FLT_ANY value, if present, must
+ * be the last one in the list.
+ *
+ * The width field is the narrowest passband in a transmit/receive chain
+ * with regard to different IF.
+ *
+ * \sa rig_set_mode, rig_passband_normal, rig_passband_narrow, rig_passband_wide
+ */
+struct filter_list {
+ rmode_t modes; /*!< Bit field of RIG_MODE's */
+ pbwidth_t width; /*!< Passband width in Hz */
+};
+
+#define RIG_FLT_ANY 0
+#define RIG_FLT_END {RIG_MODE_NONE,0}
+#define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
+
+
+/** \brief Empty channel_t.flags field */
+#define RIG_CHFLAG_NONE 0
+/** \brief skip memory channel during scan (lock out), channel_t.flags */
+#define RIG_CHFLAG_SKIP (1<<0)
+/** \brief DATA port mode flag */
+#define RIG_CHFLAG_DATA (1<<1)
+
+/**
+ * \brief Extension attribute definition
+ *
+ */
+struct ext_list {
+ token_t token; /*!< Token ID */
+ value_t val; /*!< Value */
+};
+
+#define RIG_EXT_END {0, {.i=0}}
+#define RIG_IS_EXT_END(x) ((x).token == 0)
+
+/**
+ * \brief Channel structure
+ *
+ * The channel struct stores all the attributes peculiar to a VFO.
+ *
+ * \sa rig_set_channel, rig_get_channel
+ */
+struct channel {
+ int channel_num; /*!< Channel number */
+ int bank_num; /*!< Bank number */
+ vfo_t vfo; /*!< VFO */
+ int ant; /*!< Selected antenna */
+ freq_t freq; /*!< Receive frequency */
+ rmode_t mode; /*!< Receive mode */
+ pbwidth_t width; /*!< Receive passband width associated with mode */
+
+ freq_t tx_freq; /*!< Transmit frequency */
+ rmode_t tx_mode; /*!< Transmit mode */
+ pbwidth_t tx_width; /*!< Transmit passband width associated with mode */
+
+ split_t split; /*!< Split mode */
+ vfo_t tx_vfo; /*!< Split transmit VFO */
+
+ rptr_shift_t rptr_shift; /*!< Repeater shift */
+ shortfreq_t rptr_offs; /*!< Repeater offset */
+ shortfreq_t tuning_step; /*!< Tuning step */
+ shortfreq_t rit; /*!< RIT */
+ shortfreq_t xit; /*!< XIT */
+ setting_t funcs; /*!< Function status */
+ value_t levels[RIG_SETTING_MAX]; /*!< Level values */
+ tone_t ctcss_tone; /*!< CTCSS tone */
+ tone_t ctcss_sql; /*!< CTCSS squelch tone */
+ tone_t dcs_code; /*!< DCS code */
+ tone_t dcs_sql; /*!< DCS squelch code */
+ int scan_group; /*!< Scan group */
+ int flags; /*!< Channel flags, see RIG_CHFLAG's */
+ char channel_desc[MAXCHANDESC]; /*!< Name */
+ struct ext_list *ext_levels; /*!< Extension level value list, NULL ended. ext_levels can be NULL */
+};
+/** \brief Channel structure typedef */
+typedef struct channel channel_t;
+
+/**
+ * \brief Channel capability definition
+ *
+ * Definition of the attributes that can be stored/retrieved in/from memory
+ */
+struct channel_cap {
+ unsigned bank_num:1; /*!< Bank number */
+ unsigned vfo:1; /*!< VFO */
+ unsigned ant:1; /*!< Selected antenna */
+ unsigned freq:1; /*!< Receive frequency */
+ unsigned mode:1; /*!< Receive mode */
+ unsigned width:1; /*!< Receive passband width associated with mode */
+
+ unsigned tx_freq:1; /*!< Transmit frequency */
+ unsigned tx_mode:1; /*!< Transmit mode */
+ unsigned tx_width:1; /*!< Transmit passband width associated with mode */
+
+ unsigned split:1; /*!< Split mode */
+ unsigned tx_vfo:1; /*!< Split transmit VFO */
+ unsigned rptr_shift:1; /*!< Repeater shift */
+ unsigned rptr_offs:1; /*!< Repeater offset */
+ unsigned tuning_step:1; /*!< Tuning step */
+ unsigned rit:1; /*!< RIT */
+ unsigned xit:1; /*!< XIT */
+ setting_t funcs; /*!< Function status */
+ setting_t levels; /*!< Level values */
+ unsigned ctcss_tone:1; /*!< CTCSS tone */
+ unsigned ctcss_sql:1; /*!< CTCSS squelch tone */
+ unsigned dcs_code:1; /*!< DCS code */
+ unsigned dcs_sql:1; /*!< DCS squelch code */
+ unsigned scan_group:1; /*!< Scan group */
+ unsigned flags:1; /*!< Channel flags */
+ unsigned channel_desc:1; /*!< Name */
+ unsigned ext_levels:1; /*!< Extension level value list */
+};
+
+/** \brief Channel cap */
+typedef struct channel_cap channel_cap_t;
+
+
+/**
+ * \brief Memory channel type definition
+ *
+ * Definition of memory types. Depending on the type, the content
+ * of the memory channel has to be interpreted accordingly.
+ * For instance, a RIG_MTYPE_EDGE channel_t will hold only a start
+ * or stop frequency.
+ *
+ * \sa chan_list
+ */
+typedef enum {
+ RIG_MTYPE_NONE=0, /*!< None */
+ RIG_MTYPE_MEM, /*!< Regular */
+ RIG_MTYPE_EDGE, /*!< Scan edge */
+ RIG_MTYPE_CALL, /*!< Call channel */
+ RIG_MTYPE_MEMOPAD, /*!< Memory pad */
+ RIG_MTYPE_SAT, /*!< Satellite */
+ RIG_MTYPE_BAND, /*!< VFO/Band channel */
+ RIG_MTYPE_PRIO /*!< Priority channel */
+} chan_type_t;
+
+/**
+ * \brief Memory channel list definition
+ *
+ * Example for the Ic706MkIIG (99 memory channels, 2 scan edges, 2 call chans):
+\code
+ chan_t chan_list[] = {
+ { 1, 99, RIG_MTYPE_MEM },
+ { 100, 103, RIG_MTYPE_EDGE },
+ { 104, 105, RIG_MTYPE_CALL },
+ RIG_CHAN_END
+ }
+\endcode
+ */
+struct chan_list {
+ int start; /*!< Starting memory channel \b number */
+ int end; /*!< Ending memory channel \b number */
+ chan_type_t type; /*!< Memory type. see chan_type_t */
+ channel_cap_t mem_caps; /*!< Definition of attributes that can be stored/retrieved */
+};
+
+#define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
+#define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
+/** \brief Special memory channel value to tell rig_lookup_mem_caps() to retrieve all the ranges */
+#define RIG_MEM_CAPS_ALL -1
+
+/** \brief chan_t type */
+typedef struct chan_list chan_t;
+
+/**
+ * \brief level/parm granularity definition
+ *
+ * The granularity is undefined if min=0, max=0, and step=0.
+ *
+ * For float settings, if min.f=0 and max.f=0 (and step.f!=0),
+ * max.f is assumed to be actually equal to 1.0.
+ *
+ * If step=0 (and min and/or max are not null), then this means step
+ * can have maximum resolution, depending on type (int or float).
+ */
+struct gran {
+ value_t min; /*!< Minimum value */
+ value_t max; /*!< Maximum value */
+ value_t step; /*!< Step */
+};
+
+/** \brief gran_t type */
+typedef struct gran gran_t;
+
+
+/** \brief Calibration table struct */
+struct cal_table {
+ int size; /*!< number of plots in the table */
+ struct {
+ int raw; /*!< raw (A/D) value, as returned by \a RIG_LEVEL_RAWSTR */
+ int val; /*!< associated value, basically the measured dB value */
+ } table[MAX_CAL_LENGTH]; /*!< table of plots */
+};
+
+/**
+ * \brief calibration table type
+ *
+ * cal_table_t is a data type suited to hold linear calibration.
+ * cal_table_t.size tells the number of plots cal_table_t.table contains.
+ *
+ * If a value is below or equal to cal_table_t.table[0].raw,
+ * rig_raw2val() will return cal_table_t.table[0].val.
+ *
+ * If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw,
+ * rig_raw2val() will return cal_table_t.table[cal_table_t.size-1].val.
+ */
+typedef struct cal_table cal_table_t;
+
+#define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
+
+
+typedef int (*chan_cb_t) (RIG *, channel_t**, int, const chan_t*, rig_ptr_t);
+typedef int (*confval_cb_t) (RIG *, const struct confparams *, value_t *, rig_ptr_t);
+
+/**
+ * \brief Rig data structure.
+ *
+ * Basic rig type, can store some useful info about different radios.
+ * Each lib must be able to populate this structure, so we can make
+ * useful inquiries about capabilities.
+ *
+ * The main idea of this struct is that it will be defined by the backend
+ * rig driver, and will remain readonly for the application.
+ * Fields that need to be modifiable by the application are
+ * copied into the struct rig_state, which is a kind of private
+ * of the RIG instance.
+ * This way, you can have several rigs running within the same application,
+ * sharing the struct rig_caps of the backend, while keeping their own
+ * customized data.
+ * NB: don't move fields around, as backend depends on it when initializing
+ * their caps.
+ */
+struct rig_caps {
+ rig_model_t rig_model; /*!< Rig model. */
+ const char *model_name; /*!< Model name. */
+ const char *mfg_name; /*!< Manufacturer. */
+ const char *version; /*!< Driver version. */
+ const char *copyright; /*!< Copyright info. */
+ enum rig_status_e status; /*!< Driver status. */
+
+ int rig_type; /*!< Rig type. */
+ ptt_type_t ptt_type; /*!< Type of the PTT port. */
+ dcd_type_t dcd_type; /*!< Type of the DCD port. */
+ rig_port_t port_type; /*!< Type of communication port. */
+
+ int serial_rate_min; /*!< Minimum serial speed. */
+ int serial_rate_max; /*!< Maximum 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; /*!< Delay between each byte sent out, in mS */
+ int post_write_delay; /*!< Delay between each commands send out, in mS */
+ int timeout; /*!< Timeout, in mS */
+ int retry; /*!< Maximum number of retries if command fails, 0 to disable */
+
+ 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 level */
+ setting_t has_set_level; /*!< List of set level */
+ setting_t has_get_parm; /*!< List of get parm */
+ setting_t has_set_parm; /*!< List of set parm */
+
+ 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 parm list, \sa ext.c */
+ const struct confparams *extlevels; /*!< Extension level list, \sa ext.c */
+
+ const tone_t *ctcss_list; /*!< CTCSS tones list, zero ended */
+ const tone_t *dcs_list; /*!< DCS code list, zero ended */
+
+ int preamp[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
+ int attenuator[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
+ shortfreq_t max_rit; /*!< max absolute RIT */
+ shortfreq_t max_xit; /*!< max absolute XIT */
+ shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */
+
+ ann_t announces; /*!< Announces bit field list */
+
+ vfo_op_t vfo_ops; /*!< VFO op bit field list */
+ scan_t scan_ops; /*!< Scan bit field list */
+ int targetable_vfo; /*!< Bit field list of direct VFO access commands */
+ int transceive; /*!< Supported transceive mode */
+
+ int bank_qty; /*!< Number of banks */
+ int chan_desc_sz; /*!< Max length of memory channel name */
+
+ chan_t chan_list[CHANLSTSIZ]; /*!< Channel list, zero ended */
+
+ freq_range_t rx_range_list1[FRQRANGESIZ]; /*!< Receive frequency range list for ITU region 1 */
+ freq_range_t tx_range_list1[FRQRANGESIZ]; /*!< Transmit frequency range list for ITU region 1 */
+ freq_range_t rx_range_list2[FRQRANGESIZ]; /*!< Receive frequency range list for ITU region 2 */
+ freq_range_t tx_range_list2[FRQRANGESIZ]; /*!< Transmit frequency range list for ITU region 2 */
+
+ struct tuning_step_list tuning_steps[TSLSTSIZ]; /*!< Tuning step list */
+ struct filter_list filters[FLTLSTSIZ]; /*!< mode/filter table, at -6dB */
+
+ cal_table_t str_cal; /*!< S-meter calibration table */
+
+ const struct confparams *cfgparams; /*!< Configuration parametres. */
+ const rig_ptr_t priv; /*!< Private data. */
+
+ /*
+ * Rig API
+ *
+ */
+
+ int (*rig_init) (RIG * rig);
+ int (*rig_cleanup) (RIG * rig);
+ int (*rig_open) (RIG * rig);
+ int (*rig_close) (RIG * rig);
+
+ /*
+ * General API commands, from most primitive to least.. :()
+ * List Set/Get functions pairs
+ */
+
+ int (*set_freq) (RIG * rig, vfo_t vfo, freq_t freq);
+ int (*get_freq) (RIG * rig, vfo_t vfo, freq_t * freq);
+
+ int (*set_mode) (RIG * rig, vfo_t vfo, rmode_t mode,
+ pbwidth_t width);
+ int (*get_mode) (RIG * rig, vfo_t vfo, rmode_t * mode,
+ pbwidth_t * width);
+
+ int (*set_vfo) (RIG * rig, vfo_t vfo);
+ int (*get_vfo) (RIG * rig, vfo_t * vfo);
+
+ int (*set_ptt) (RIG * rig, vfo_t vfo, ptt_t ptt);
+ int (*get_ptt) (RIG * rig, vfo_t vfo, ptt_t * ptt);
+ int (*get_dcd) (RIG * rig, vfo_t vfo, dcd_t * dcd);
+
+ int (*set_rptr_shift) (RIG * rig, vfo_t vfo,
+ rptr_shift_t rptr_shift);
+ int (*get_rptr_shift) (RIG * rig, vfo_t vfo,
+ rptr_shift_t * rptr_shift);
+
+ int (*set_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t offs);
+ int (*get_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t * offs);
+
+ int (*set_split_freq) (RIG * rig, vfo_t vfo, freq_t tx_freq);
+ int (*get_split_freq) (RIG * rig, vfo_t vfo, freq_t * tx_freq);
+ int (*set_split_mode) (RIG * rig, vfo_t vfo, rmode_t tx_mode,
+ pbwidth_t tx_width);
+ int (*get_split_mode) (RIG * rig, vfo_t vfo, rmode_t * tx_mode,
+ pbwidth_t * tx_width);
+
+ int (*set_split_vfo) (RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
+ int (*get_split_vfo) (RIG * rig, vfo_t vfo, split_t * split, vfo_t *tx_vfo);
+
+ int (*set_rit) (RIG * rig, vfo_t vfo, shortfreq_t rit);
+ int (*get_rit) (RIG * rig, vfo_t vfo, shortfreq_t * rit);
+ int (*set_xit) (RIG * rig, vfo_t vfo, shortfreq_t xit);
+ int (*get_xit) (RIG * rig, vfo_t vfo, shortfreq_t * xit);
+
+ int (*set_ts) (RIG * rig, vfo_t vfo, shortfreq_t ts);
+ int (*get_ts) (RIG * rig, vfo_t vfo, shortfreq_t * ts);
+
+ int (*set_dcs_code) (RIG * rig, vfo_t vfo, tone_t code);
+ int (*get_dcs_code) (RIG * rig, vfo_t vfo, tone_t * code);
+ int (*set_tone) (RIG * rig, vfo_t vfo, tone_t tone);
+ int (*get_tone) (RIG * rig, vfo_t vfo, tone_t * tone);
+ int (*set_ctcss_tone) (RIG * rig, vfo_t vfo, tone_t tone);
+ int (*get_ctcss_tone) (RIG * rig, vfo_t vfo, tone_t * tone);
+
+ int (*set_dcs_sql) (RIG * rig, vfo_t vfo, tone_t code);
+ int (*get_dcs_sql) (RIG * rig, vfo_t vfo, tone_t * code);
+ int (*set_tone_sql) (RIG * rig, vfo_t vfo, tone_t tone);
+ int (*get_tone_sql) (RIG * rig, vfo_t vfo, tone_t * tone);
+ int (*set_ctcss_sql) (RIG * rig, vfo_t vfo, tone_t tone);
+ int (*get_ctcss_sql) (RIG * rig, vfo_t vfo, tone_t * tone);
+
+ int (*power2mW) (RIG * rig, unsigned int *mwpower, float power,
+ freq_t freq, rmode_t mode);
+ int (*mW2power) (RIG * rig, float *power, unsigned int mwpower,
+ freq_t freq, rmode_t mode);
+
+ int (*set_powerstat) (RIG * rig, powerstat_t status);
+ int (*get_powerstat) (RIG * rig, powerstat_t * status);
+ int (*reset) (RIG * rig, reset_t reset);
+
+ int (*set_ant) (RIG * rig, vfo_t vfo, ant_t ant);
+ int (*get_ant) (RIG * rig, vfo_t vfo, ant_t * ant);
+
+ int (*set_level) (RIG * rig, vfo_t vfo, setting_t level,
+ value_t val);
+ int (*get_level) (RIG * rig, vfo_t vfo, setting_t level,
+ value_t * val);
+
+ int (*set_func) (RIG * rig, vfo_t vfo, setting_t func, int status);
+ int (*get_func) (RIG * rig, vfo_t vfo, setting_t func,
+ int *status);
+
+ int (*set_parm) (RIG * rig, setting_t parm, value_t val);
+ int (*get_parm) (RIG * rig, setting_t parm, value_t * val);
+
+ int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val);
+ int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val);
+
+ int (*set_ext_parm)(RIG *rig, token_t token, value_t val);
+ int (*get_ext_parm)(RIG *rig, token_t token, value_t *val);
+
+ int (*set_conf) (RIG * rig, token_t token, const char *val);
+ int (*get_conf) (RIG * rig, token_t token, char *val);
+
+ int (*send_dtmf) (RIG * rig, vfo_t vfo, const char *digits);
+ int (*recv_dtmf) (RIG * rig, vfo_t vfo, char *digits, int *length);
+ int (*send_morse) (RIG * rig, vfo_t vfo, const char *msg);
+
+ int (*set_bank) (RIG * rig, vfo_t vfo, int bank);
+ int (*set_mem) (RIG * rig, vfo_t vfo, int ch);
+ int (*get_mem) (RIG * rig, vfo_t vfo, int *ch);
+ int (*vfo_op) (RIG * rig, vfo_t vfo, vfo_op_t op);
+ int (*scan) (RIG * rig, vfo_t vfo, scan_t scan, int ch);
+
+ int (*set_trn) (RIG * rig, int trn);
+ int (*get_trn) (RIG * rig, int *trn);
+
+ int (*decode_event) (RIG * rig);
+
+ int (*set_channel) (RIG * rig, const channel_t * chan);
+ int (*get_channel) (RIG * rig, channel_t * chan);
+
+ const char *(*get_info) (RIG * rig);
+
+ int (*set_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
+ int (*get_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
+
+ int (*set_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
+ int (*get_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
+
+ const char *clone_combo_set; /*!< String describing key combination to enter load cloning mode */
+ const char *clone_combo_get; /*!< String describing key combination to enter save cloning mode */
+};
+
+/**
+ * \brief Port definition
+ *
+ * Of course, looks like OO painstakingly programmed in C, sigh.
+ */
+typedef struct {
+ union {
+ rig_port_t rig; /*!< Communication port type */
+ ptt_type_t ptt; /*!< PTT port type */
+ dcd_type_t dcd; /*!< DCD port type */
+ } type;
+ int fd; /*!< File descriptor */
+ void* handle; /*!< handle for USB */
+
+ int write_delay; /*!< Delay between each byte sent out, in mS */
+ int post_write_delay; /*!< Delay between each commands send out, in mS */
+ struct { int tv_sec,tv_usec; } post_write_date; /*!< hamlib internal use */
+ int timeout; /*!< Timeout, in mS */
+ int retry; /*!< Maximum number of retries, 0 to disable */
+
+ char pathname[FILPATHLEN]; /*!< Port pathname */
+ union {
+ struct {
+ int rate; /*!< Serial baud rate */
+ int data_bits; /*!< Number of data bits */
+ int stop_bits; /*!< Number of stop bits */
+ enum serial_parity_e parity; /*!< Serial parity */
+ enum serial_handshake_e handshake; /*!< Serial handshake */
+ enum serial_control_state_e rts_state; /*!< RTS set state */
+ enum serial_control_state_e dtr_state; /*!< DTR set state */
+ } serial; /*!< serial attributes */
+ struct {
+ int pin; /*!< Parallel port pin number */
+ } parallel; /*!< parallel attributes */
+ struct {
+ int ptt_bitnum; /*< Bit number for CM108 GPIO PTT */
+ } cm108; /*!< CM108 attributes */
+ struct {
+ int vid; /*!< Vendor ID */
+ int pid; /*!< Product ID */
+ int conf; /*!< Configuration */
+ int iface; /*!< interface */
+ int alt; /*!< alternate */
+ char *vendor_name; /*!< Vendor name (opt.) */
+ char *product; /*!< Product (opt.) */
+ } usb; /*!< USB attributes */
+ } parm; /*!< Port parameter union */
+} hamlib_port_t;
+
+#if !defined(__APPLE__) || !defined(__cplusplus)
+typedef hamlib_port_t port_t;
+#endif
+
+
+/**
+ * \brief Rig state containing live data and customized fields.
+ *
+ * This struct contains live data, as well as a copy of capability fields
+ * that may be updated (ie. customized)
+ *
+ * It is fine to move fields around, as this kind of struct should
+ * not be initialized like caps are.
+ */
+struct rig_state {
+ /*
+ * overridable fields
+ */
+ hamlib_port_t rigport; /*!< Rig port (internal use). */
+ hamlib_port_t pttport; /*!< PTT port (internal use). */
+ hamlib_port_t dcdport; /*!< DCD port (internal use). */
+
+ double vfo_comp; /*!< VFO compensation in PPM, 0.0 to disable */
+
+ int itu_region; /*!< ITU region to select among freq_range_t */
+ freq_range_t rx_range_list[FRQRANGESIZ]; /*!< Receive frequency range list */
+ freq_range_t tx_range_list[FRQRANGESIZ]; /*!< Transmit frequency range list */
+
+ struct tuning_step_list tuning_steps[TSLSTSIZ]; /*!< Tuning step list */
+
+ struct filter_list filters[FLTLSTSIZ]; /*!< Mode/filter table, at -6dB */
+
+ cal_table_t str_cal; /*!< S-meter calibration table */
+
+ chan_t chan_list[CHANLSTSIZ]; /*!< Channel list, zero ended */
+
+ shortfreq_t max_rit; /*!< max absolute RIT */
+ shortfreq_t max_xit; /*!< max absolute XIT */
+ shortfreq_t max_ifshift; /*!< max absolute IF-SHIFT */
+
+ ann_t announces; /*!< Announces bit field list */
+
+ int preamp[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
+ int attenuator[MAXDBLSTSIZ]; /*!< Preamp list in dB, 0 terminated */
+
+ 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 level */
+ setting_t has_set_level; /*!< List of set level */
+ setting_t has_get_parm; /*!< List of get parm */
+ setting_t has_set_parm; /*!< List of set parm */
+
+ gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity */
+ gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity */
+
+
+ /*
+ * non overridable fields, internal use
+ */
+
+ int hold_decode; /*!< set to 1 to hold the event decoder (async) otherwise 0 */
+ vfo_t current_vfo; /*!< VFO currently set */
+ int vfo_list; /*!< Complete list of VFO for this rig */
+ int comm_state; /*!< Comm port state, opened/closed. */
+ rig_ptr_t priv; /*!< Pointer to private rig state data. */
+ rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
+
+ int transceive; /*!< Whether the transceive mode is on */
+ int poll_interval; /*!< Event notification polling period in milliseconds */
+ freq_t current_freq; /*!< Frequency currently set */
+ rmode_t current_mode; /*!< Mode currently set */
+ pbwidth_t current_width; /*!< Passband width currently set */
+ vfo_t tx_vfo; /*!< Tx VFO currently set */
+ int mode_list; /*!< Complete list of modes for this rig */
+
+};
+
+
+typedef int (*vprintf_cb_t) (enum rig_debug_level_e, rig_ptr_t, const char *, va_list);
+
+typedef int (*freq_cb_t) (RIG *, vfo_t, freq_t, rig_ptr_t);
+typedef int (*mode_cb_t) (RIG *, vfo_t, rmode_t, pbwidth_t, rig_ptr_t);
+typedef int (*vfo_cb_t) (RIG *, vfo_t, rig_ptr_t);
+typedef int (*ptt_cb_t) (RIG *, vfo_t, ptt_t, rig_ptr_t);
+typedef int (*dcd_cb_t) (RIG *, vfo_t, dcd_t, rig_ptr_t);
+typedef int (*pltune_cb_t) (RIG *, vfo_t, freq_t *, rmode_t *, pbwidth_t *, rig_ptr_t);
+
+/**
+ * \brief Callback functions and args for rig event.
+ *
+ * Some rigs are able to notify the host computer the operator changed
+ * the freq/mode from the front panel, depressed a button, etc.
+ *
+ * Events from the rig are received through async io,
+ * so callback functions will be called from the SIGIO sighandler context.
+ *
+ * Don't set these fields directly, use rig_set_freq_callback et. al. instead.
+ *
+ * Callbacks suit event based programming very well,
+ * really appropriate in a GUI.
+ *
+ * \sa rig_set_freq_callback, rig_set_mode_callback, rig_set_vfo_callback,
+ * rig_set_ptt_callback, rig_set_dcd_callback
+ */
+struct rig_callbacks {
+ freq_cb_t freq_event; /*!< Frequency change event */
+ rig_ptr_t freq_arg; /*!< Frequency change argument */
+ mode_cb_t mode_event; /*!< Mode change event */
+ rig_ptr_t mode_arg; /*!< Mode change argument */
+ vfo_cb_t vfo_event; /*!< VFO change event */
+ rig_ptr_t vfo_arg; /*!< VFO change argument */
+ ptt_cb_t ptt_event; /*!< PTT change event */
+ rig_ptr_t ptt_arg; /*!< PTT change argument */
+ dcd_cb_t dcd_event; /*!< DCD change event */
+ rig_ptr_t dcd_arg; /*!< DCD change argument */
+ pltune_cb_t pltune; /*!< Pipeline tuning module freq/mode/width callback */
+ rig_ptr_t pltune_arg; /*!< Pipeline tuning argument */
+ /* etc.. */
+};
+
+/**
+ * \brief The Rig structure
+ *
+ * This is the master data structure, acting as a handle for the controlled
+ * rig. A pointer to this structure is returned by the rig_init() API
+ * function and is passed as a parameter to every rig specific API call.
+ *
+ * \sa rig_init(), rig_caps, rig_state
+ */
+struct rig {
+ struct rig_caps *caps; /*!< Pointer to rig capabilities (read only) */
+ struct rig_state state; /*!< Rig state */
+ struct rig_callbacks callbacks; /*!< registered event callbacks */
+};
+
+
+
+/* --------------- API function prototypes -----------------*/
+
+extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model));
+extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig));
+
+ /*
+ * General API commands, from most primitive to least.. :()
+ * List Set/Get functions pairs
+ */
+
+extern HAMLIB_EXPORT(int) rig_set_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t freq));
+extern HAMLIB_EXPORT(int) rig_get_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq));
+
+extern HAMLIB_EXPORT(int) rig_set_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width));
+extern HAMLIB_EXPORT(int) rig_get_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width));
+
+extern HAMLIB_EXPORT(int) rig_set_vfo HAMLIB_PARAMS((RIG *rig, vfo_t vfo));
+extern HAMLIB_EXPORT(int) rig_get_vfo HAMLIB_PARAMS((RIG *rig, vfo_t *vfo));
+
+extern HAMLIB_EXPORT(int) rig_set_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t ptt));
+extern HAMLIB_EXPORT(int) rig_get_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t *ptt));
+
+extern HAMLIB_EXPORT(int) rig_get_dcd HAMLIB_PARAMS((RIG *rig, vfo_t vfo, dcd_t *dcd));
+
+extern HAMLIB_EXPORT(int) rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift));
+extern HAMLIB_EXPORT(int) rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift));
+extern HAMLIB_EXPORT(int) rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rptr_offs));
+extern HAMLIB_EXPORT(int) rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs));
+
+extern HAMLIB_EXPORT(int) rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
+extern HAMLIB_EXPORT(int) rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
+extern HAMLIB_EXPORT(int) rig_set_dcs_code HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
+extern HAMLIB_EXPORT(int) rig_get_dcs_code HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
+
+extern HAMLIB_EXPORT(int) rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
+extern HAMLIB_EXPORT(int) rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
+extern HAMLIB_EXPORT(int) rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
+extern HAMLIB_EXPORT(int) rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
+
+extern HAMLIB_EXPORT(int) rig_set_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t tx_freq));
+extern HAMLIB_EXPORT(int) rig_get_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *tx_freq));
+extern HAMLIB_EXPORT(int) rig_set_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width));
+extern HAMLIB_EXPORT(int) rig_get_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width));
+extern HAMLIB_EXPORT(int) rig_set_split_vfo HAMLIB_PARAMS((RIG*, vfo_t rx_vfo, split_t split, vfo_t tx_vfo));
+extern HAMLIB_EXPORT(int) rig_get_split_vfo HAMLIB_PARAMS((RIG*, vfo_t rx_vfo, split_t *split, vfo_t *tx_vfo));
+#define rig_set_split(r,v,s) rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR)
+#define rig_get_split(r,v,s) ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); })
+
+extern HAMLIB_EXPORT(int) rig_set_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rit));
+extern HAMLIB_EXPORT(int) rig_get_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rit));
+extern HAMLIB_EXPORT(int) rig_set_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t xit));
+extern HAMLIB_EXPORT(int) rig_get_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *xit));
+
+extern HAMLIB_EXPORT(int) rig_set_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t ts));
+extern HAMLIB_EXPORT(int) rig_get_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *ts));
+
+extern HAMLIB_EXPORT(int) rig_power2mW HAMLIB_PARAMS((RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode));
+extern HAMLIB_EXPORT(int) rig_mW2power HAMLIB_PARAMS((RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode));
+
+extern HAMLIB_EXPORT(shortfreq_t) rig_get_resolution HAMLIB_PARAMS((RIG *rig, rmode_t mode));
+
+extern HAMLIB_EXPORT(int) rig_set_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t val));
+extern HAMLIB_EXPORT(int) rig_get_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t *val));
+
+#define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
+
+extern HAMLIB_EXPORT(int) rig_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t val));
+extern HAMLIB_EXPORT(int) rig_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t *val));
+
+extern HAMLIB_EXPORT(int) rig_set_conf HAMLIB_PARAMS((RIG *rig, token_t token, const char *val));
+extern HAMLIB_EXPORT(int) rig_get_conf HAMLIB_PARAMS((RIG *rig, token_t token, char *val));
+
+extern HAMLIB_EXPORT(int) rig_set_powerstat HAMLIB_PARAMS((RIG *rig, powerstat_t status));
+extern HAMLIB_EXPORT(int) rig_get_powerstat HAMLIB_PARAMS((RIG *rig, powerstat_t *status));
+
+extern HAMLIB_EXPORT(int) rig_reset HAMLIB_PARAMS((RIG *rig, reset_t reset)); /* dangerous! */
+
+extern HAMLIB_EXPORT(int) rig_set_ext_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
+ token_t token, value_t val));
+extern HAMLIB_EXPORT(int) rig_get_ext_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
+ token_t token, value_t *val));
+
+extern HAMLIB_EXPORT(int) rig_set_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t val));
+extern HAMLIB_EXPORT(int) rig_get_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t *val));
+
+extern HAMLIB_EXPORT(int) rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(RIG*, const struct confparams *, rig_ptr_t), rig_ptr_t data));
+extern HAMLIB_EXPORT(int) rig_ext_parm_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(RIG*, const struct confparams *, rig_ptr_t), rig_ptr_t data));
+extern HAMLIB_EXPORT(const struct confparams*) rig_ext_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
+extern HAMLIB_EXPORT(const struct confparams *) rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig, token_t token));
+extern HAMLIB_EXPORT(token_t) rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
+
+
+extern HAMLIB_EXPORT(int) rig_token_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data));
+extern HAMLIB_EXPORT(const struct confparams*) rig_confparam_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
+extern HAMLIB_EXPORT(token_t) rig_token_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
+
+extern HAMLIB_EXPORT(int) rig_close HAMLIB_PARAMS((RIG *rig));
+extern HAMLIB_EXPORT(int) rig_cleanup HAMLIB_PARAMS((RIG *rig));
+
+extern HAMLIB_EXPORT(int) rig_set_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t ant)); /* antenna */
+extern HAMLIB_EXPORT(int) rig_get_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t *ant));
+
+extern HAMLIB_EXPORT(setting_t) rig_has_get_level HAMLIB_PARAMS((RIG *rig, setting_t level));
+extern HAMLIB_EXPORT(setting_t) rig_has_set_level HAMLIB_PARAMS((RIG *rig, setting_t level));
+
+extern HAMLIB_EXPORT(setting_t) rig_has_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
+extern HAMLIB_EXPORT(setting_t) rig_has_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
+
+extern HAMLIB_EXPORT(setting_t) rig_has_get_func HAMLIB_PARAMS((RIG *rig, setting_t func));
+extern HAMLIB_EXPORT(setting_t) rig_has_set_func HAMLIB_PARAMS((RIG *rig, setting_t func));
+
+extern HAMLIB_EXPORT(int) rig_set_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func, int status));
+extern HAMLIB_EXPORT(int) rig_get_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func, int *status));
+
+extern HAMLIB_EXPORT(int) rig_send_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const char *digits));
+extern HAMLIB_EXPORT(int) rig_recv_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo, char *digits, int *length));
+extern HAMLIB_EXPORT(int) rig_send_morse HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const char *msg));
+
+extern HAMLIB_EXPORT(int) rig_set_bank HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int bank));
+extern HAMLIB_EXPORT(int) rig_set_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int ch));
+extern HAMLIB_EXPORT(int) rig_get_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int *ch));
+extern HAMLIB_EXPORT(int) rig_vfo_op HAMLIB_PARAMS((RIG *rig, vfo_t vfo, vfo_op_t op));
+extern HAMLIB_EXPORT(vfo_op_t) rig_has_vfo_op HAMLIB_PARAMS((RIG *rig, vfo_op_t op));
+extern HAMLIB_EXPORT(int) rig_scan HAMLIB_PARAMS((RIG *rig, vfo_t vfo, scan_t scan, int ch));
+extern HAMLIB_EXPORT(scan_t) rig_has_scan HAMLIB_PARAMS((RIG *rig, scan_t scan));
+
+extern HAMLIB_EXPORT(int) rig_set_channel HAMLIB_PARAMS((RIG *rig, const channel_t *chan)); /* mem */
+extern HAMLIB_EXPORT(int) rig_get_channel HAMLIB_PARAMS((RIG *rig, channel_t *chan));
+
+extern HAMLIB_EXPORT(int) rig_set_chan_all HAMLIB_PARAMS((RIG *rig, const channel_t chans[]));
+extern HAMLIB_EXPORT(int) rig_get_chan_all HAMLIB_PARAMS((RIG *rig, channel_t chans[]));
+extern HAMLIB_EXPORT(int) rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
+extern HAMLIB_EXPORT(int) rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
+
+extern HAMLIB_EXPORT(int) rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t));
+extern HAMLIB_EXPORT(int) rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t));
+extern HAMLIB_EXPORT(int) rig_set_mem_all HAMLIB_PARAMS((RIG *rig, const channel_t *chan, const struct confparams *, const value_t *));
+extern HAMLIB_EXPORT(int) rig_get_mem_all HAMLIB_PARAMS((RIG *rig, channel_t *chan, const struct confparams *, value_t *));
+extern HAMLIB_EXPORT(const chan_t *) rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig, int ch));
+extern HAMLIB_EXPORT(int) rig_mem_count HAMLIB_PARAMS((RIG *rig));
+
+
+extern HAMLIB_EXPORT(int) rig_set_trn HAMLIB_PARAMS((RIG *rig, int trn));
+extern HAMLIB_EXPORT(int) rig_get_trn HAMLIB_PARAMS((RIG *rig, int *trn));
+extern HAMLIB_EXPORT(int) rig_set_freq_callback HAMLIB_PARAMS((RIG *, freq_cb_t, rig_ptr_t));
+extern HAMLIB_EXPORT(int) rig_set_mode_callback HAMLIB_PARAMS((RIG *, mode_cb_t, rig_ptr_t));
+extern HAMLIB_EXPORT(int) rig_set_vfo_callback HAMLIB_PARAMS((RIG *, vfo_cb_t, rig_ptr_t));
+extern HAMLIB_EXPORT(int) rig_set_ptt_callback HAMLIB_PARAMS((RIG *, ptt_cb_t, rig_ptr_t));
+extern HAMLIB_EXPORT(int) rig_set_dcd_callback HAMLIB_PARAMS((RIG *, dcd_cb_t, rig_ptr_t));
+extern HAMLIB_EXPORT(int) rig_set_pltune_callback HAMLIB_PARAMS((RIG *, pltune_cb_t, rig_ptr_t));
+
+extern HAMLIB_EXPORT(const char *) rig_get_info HAMLIB_PARAMS((RIG *rig));
+
+extern HAMLIB_EXPORT(const struct rig_caps *) rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
+extern HAMLIB_EXPORT(const freq_range_t *) rig_get_range HAMLIB_PARAMS((const freq_range_t range_list[], freq_t freq, rmode_t mode));
+
+extern HAMLIB_EXPORT(pbwidth_t) rig_passband_normal HAMLIB_PARAMS((RIG *rig, rmode_t mode));
+extern HAMLIB_EXPORT(pbwidth_t) rig_passband_narrow HAMLIB_PARAMS((RIG *rig, rmode_t mode));
+extern HAMLIB_EXPORT(pbwidth_t) rig_passband_wide HAMLIB_PARAMS((RIG *rig, rmode_t mode));
+
+extern HAMLIB_EXPORT(const char *) rigerror HAMLIB_PARAMS((int errnum));
+
+extern HAMLIB_EXPORT(int) rig_setting2idx HAMLIB_PARAMS((setting_t s));
+#define rig_idx2setting(i) (1UL<<(i))
+
+/*
+ * Even if these functions are prefixed with "rig_", they are not rig specific
+ * Maybe "hamlib_" would have been better. Let me know. --SF
+ */
+extern HAMLIB_EXPORT(void) rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
+#define rig_set_debug_level(level) rig_set_debug(level)
+extern HAMLIB_EXPORT(int) rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
+extern HAMLIB_EXPORT(void) rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, const char *fmt, ...));
+extern HAMLIB_EXPORT(vprintf_cb_t) rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, rig_ptr_t arg));
+extern HAMLIB_EXPORT(FILE*) rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
+
+extern HAMLIB_EXPORT(int) rig_register HAMLIB_PARAMS((const struct rig_caps *caps));
+extern HAMLIB_EXPORT(int) rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
+extern HAMLIB_EXPORT(int) rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps*, rig_ptr_t), rig_ptr_t data));
+extern HAMLIB_EXPORT(int) rig_load_backend HAMLIB_PARAMS((const char *be_name));
+extern HAMLIB_EXPORT(int) rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
+extern HAMLIB_EXPORT(int) rig_load_all_backends HAMLIB_PARAMS((void));
+
+typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
+extern HAMLIB_EXPORT(int) rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p, rig_probe_func_t, rig_ptr_t));
+extern HAMLIB_EXPORT(rig_model_t) rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
+
+
+/* Misc calls */
+extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
+extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
+extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
+extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
+extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
+extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
+extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
+extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
+extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
+extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
+
+extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
+extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
+extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
+extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
+extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
+extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
+extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
+extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
+extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
+
+
+__END_DECLS
+
+#endif /* _RIG_H */
+
+/*! @} */
diff --git a/fdmdv2/extern/include/rig_dll.h b/fdmdv2/extern/include/rig_dll.h
index 22e89813..72593ab9 100644
--- a/fdmdv2/extern/include/rig_dll.h
+++ b/fdmdv2/extern/include/rig_dll.h
@@ -1,92 +1,92 @@
-/*
- * 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 BACKEND_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 BACKEND_IMPEXP HAMLIB_DLL_EXPORT
-# define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT
-# else
-# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
-# define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT
-# endif
-# else
- /* static build, only export the backend entry points for lt_dlsym */
-# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
-# endif
-#endif
-
-
-/* Take care of non-cygwin platforms */
-#if !defined(HAMLIB_IMPEXP)
-# define HAMLIB_IMPEXP
-#endif
-#if !defined(BACKEND_IMPEXP)
-# define BACKEND_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) BACKEND_IMPEXP type HAMLIB_API
-#endif
-#if !defined(BACKEND_EXPORT_VAR)
-# define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
-#endif
-
-
+/*
+ * 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 BACKEND_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 BACKEND_IMPEXP HAMLIB_DLL_EXPORT
+# define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT
+# else
+# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
+# define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT
+# endif
+# else
+ /* static build, only export the backend entry points for lt_dlsym */
+# define BACKEND_IMPEXP HAMLIB_DLL_EXPORT
+# endif
+#endif
+
+
+/* Take care of non-cygwin platforms */
+#if !defined(HAMLIB_IMPEXP)
+# define HAMLIB_IMPEXP
+#endif
+#if !defined(BACKEND_IMPEXP)
+# define BACKEND_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) BACKEND_IMPEXP type HAMLIB_API
+#endif
+#if !defined(BACKEND_EXPORT_VAR)
+# define BACKEND_EXPORT_VAR(type) BACKEND_IMPEXP type
+#endif
+
+
diff --git a/fdmdv2/extern/include/riglist.h b/fdmdv2/extern/include/riglist.h
index 345122da..74185046 100644
--- a/fdmdv2/extern/include/riglist.h
+++ b/fdmdv2/extern/include/riglist.h
@@ -1,570 +1,570 @@
-/*
- * Hamlib Interface - list of known rigs
- * Copyright (c) 2000-2003 by Frank Singleton
- * Copyright (c) 2000-2012 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
-
-#define RIG_MAKE_MODEL(a,b) ((a)*100+(b))
-#define RIG_BACKEND_NUM(a) ((a)/100)
-
-/*! \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 usefull for testing
- * client applications.
- */
-#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)
-
- /*
- * 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)
-
- /*
- * 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_TS950 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)
-
- /*
- * 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)
-#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)
-#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)
-#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)
-#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)
-/* next one is 70 */
-
- /*
- * 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
- * Actualy, 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
- */
-#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)
-
- /*
- * 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 */
-
- /*
- * 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
- */
-#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)
-
- /*
- * 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)
-
- /*
- * 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 int rig_model_t;
-
-
-/*! \def RIG_BACKEND_LIST
- * \brief Static list of rig models.
- *
- * This is a NULL terminated list of available rig backends. Each entry
- * in the list consists of two fields: The branch number, which is an integer,
- * and the branch name, which is a character string.
- */
-#define RIG_BACKEND_LIST { \
- { RIG_DUMMY, RIG_BACKEND_DUMMY }, \
- { RIG_YAESU, RIG_BACKEND_YAESU }, \
- { RIG_KENWOOD, RIG_BACKEND_KENWOOD }, \
- { RIG_ICOM, RIG_BACKEND_ICOM }, \
- { RIG_PCR, RIG_BACKEND_PCR }, \
- { RIG_AOR, RIG_BACKEND_AOR }, \
- { RIG_JRC, RIG_BACKEND_JRC }, \
- { RIG_UNIDEN, RIG_BACKEND_UNIDEN }, \
- { RIG_DRAKE, RIG_BACKEND_DRAKE }, \
- { RIG_LOWE, RIG_BACKEND_LOWE }, \
- { RIG_RACAL, RIG_BACKEND_RACAL }, \
- { RIG_WJ, RIG_BACKEND_WJ }, \
- { RIG_SKANTI, RIG_BACKEND_SKANTI }, \
- { RIG_WINRADIO, RIG_BACKEND_WINRADIO }, \
- { RIG_TENTEC, RIG_BACKEND_TENTEC }, \
- { RIG_ALINCO, RIG_BACKEND_ALINCO }, \
- { RIG_KACHINA, RIG_BACKEND_KACHINA }, \
- /* { RIG_RPC, RIG_BACKEND_RPC }, */ \
- { RIG_TAPR, RIG_BACKEND_TAPR }, \
- { RIG_FLEXRADIO, RIG_BACKEND_FLEXRADIO }, \
- { RIG_RFT, RIG_BACKEND_RFT }, \
- { RIG_KIT, RIG_BACKEND_KIT }, \
- { RIG_TUNER, RIG_BACKEND_TUNER }, \
- { RIG_RS, RIG_BACKEND_RS }, \
- { RIG_PRM80, RIG_BACKEND_PRM80 }, \
- { RIG_ADAT, RIG_BACKEND_ADAT }, \
- { 0, NULL }, /* end */ \
-}
-
-/*
- * 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 */
+/*
+ * Hamlib Interface - list of known rigs
+ * Copyright (c) 2000-2003 by Frank Singleton
+ * Copyright (c) 2000-2012 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
+
+#define RIG_MAKE_MODEL(a,b) ((a)*100+(b))
+#define RIG_BACKEND_NUM(a) ((a)/100)
+
+/*! \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 usefull for testing
+ * client applications.
+ */
+#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)
+
+ /*
+ * 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)
+
+ /*
+ * 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_TS950 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)
+
+ /*
+ * 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)
+#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)
+#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)
+#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)
+#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)
+/* next one is 70 */
+
+ /*
+ * 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
+ * Actualy, 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
+ */
+#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)
+
+ /*
+ * 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 */
+
+ /*
+ * 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
+ */
+#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)
+
+ /*
+ * 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)
+
+ /*
+ * 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 int rig_model_t;
+
+
+/*! \def RIG_BACKEND_LIST
+ * \brief Static list of rig models.
+ *
+ * This is a NULL terminated list of available rig backends. Each entry
+ * in the list consists of two fields: The branch number, which is an integer,
+ * and the branch name, which is a character string.
+ */
+#define RIG_BACKEND_LIST { \
+ { RIG_DUMMY, RIG_BACKEND_DUMMY }, \
+ { RIG_YAESU, RIG_BACKEND_YAESU }, \
+ { RIG_KENWOOD, RIG_BACKEND_KENWOOD }, \
+ { RIG_ICOM, RIG_BACKEND_ICOM }, \
+ { RIG_PCR, RIG_BACKEND_PCR }, \
+ { RIG_AOR, RIG_BACKEND_AOR }, \
+ { RIG_JRC, RIG_BACKEND_JRC }, \
+ { RIG_UNIDEN, RIG_BACKEND_UNIDEN }, \
+ { RIG_DRAKE, RIG_BACKEND_DRAKE }, \
+ { RIG_LOWE, RIG_BACKEND_LOWE }, \
+ { RIG_RACAL, RIG_BACKEND_RACAL }, \
+ { RIG_WJ, RIG_BACKEND_WJ }, \
+ { RIG_SKANTI, RIG_BACKEND_SKANTI }, \
+ { RIG_WINRADIO, RIG_BACKEND_WINRADIO }, \
+ { RIG_TENTEC, RIG_BACKEND_TENTEC }, \
+ { RIG_ALINCO, RIG_BACKEND_ALINCO }, \
+ { RIG_KACHINA, RIG_BACKEND_KACHINA }, \
+ /* { RIG_RPC, RIG_BACKEND_RPC }, */ \
+ { RIG_TAPR, RIG_BACKEND_TAPR }, \
+ { RIG_FLEXRADIO, RIG_BACKEND_FLEXRADIO }, \
+ { RIG_RFT, RIG_BACKEND_RFT }, \
+ { RIG_KIT, RIG_BACKEND_KIT }, \
+ { RIG_TUNER, RIG_BACKEND_TUNER }, \
+ { RIG_RS, RIG_BACKEND_RS }, \
+ { RIG_PRM80, RIG_BACKEND_PRM80 }, \
+ { RIG_ADAT, RIG_BACKEND_ADAT }, \
+ { 0, NULL }, /* end */ \
+}
+
+/*
+ * 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 */
diff --git a/fdmdv2/src/dlg_about.cpp b/fdmdv2/src/dlg_about.cpp
index b3b5266b..98f7a436 100644
--- a/fdmdv2/src/dlg_about.cpp
+++ b/fdmdv2/src/dlg_about.cpp
@@ -1,63 +1,63 @@
-//==========================================================================
+//==========================================================================
// Name: dlg_about.h
//
// Purpose: Creates simple wxWidgets dialog GUI for the
// help/about page.
//
-// Date: May 05 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#include "dlg_about.h"
-
-AboutDlg::AboutDlg( wxWindow* parent ) : DlgAbout( parent )
-{
-}
-
-void AboutDlg::OnInitDialog( wxInitDialogEvent& event )
-{
-// TODO: Implement OnInitDialog
-}
-
-//-------------------------------------------------------------------------
-// ExchangeData()
-//-------------------------------------------------------------------------
-void AboutDlg::ExchangeData(int inout)
-{
-// wxConfigBase *pConfig = wxConfigBase::Get();
- if(inout == EXCHANGE_DATA_IN)
- {
-// m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort);
-// m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud);
-// m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits);
-// m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits);
-// m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity);
- }
- if(inout == EXCHANGE_DATA_OUT)
- {
-// wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue();
-// wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue();
-// wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue();
-// wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue();
-// wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue();
-
-// pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort);
-// pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud);
-// pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits);
-// pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits);
-// pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity);
-
-// pConfig->Flush();
- }
-// delete wxConfigBase::Set((wxConfigBase *) NULL);
-}
-
-//-------------------------------------------------------------------------
-// OnOK()
-//-------------------------------------------------------------------------
-void AboutDlg::OnOK( wxCommandEvent& event )
-{
- this->EndModal(wxID_OK);
-}
-
+// Date: May 05 2012
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+#include "dlg_about.h"
+
+AboutDlg::AboutDlg( wxWindow* parent ) : DlgAbout( parent )
+{
+}
+
+void AboutDlg::OnInitDialog( wxInitDialogEvent& event )
+{
+// TODO: Implement OnInitDialog
+}
+
+//-------------------------------------------------------------------------
+// ExchangeData()
+//-------------------------------------------------------------------------
+void AboutDlg::ExchangeData(int inout)
+{
+// wxConfigBase *pConfig = wxConfigBase::Get();
+ if(inout == EXCHANGE_DATA_IN)
+ {
+// m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort);
+// m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud);
+// m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits);
+// m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits);
+// m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity);
+ }
+ if(inout == EXCHANGE_DATA_OUT)
+ {
+// wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue();
+// wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue();
+// wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue();
+// wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue();
+// wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue();
+
+// pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort);
+// pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud);
+// pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits);
+// pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits);
+// pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity);
+
+// pConfig->Flush();
+ }
+// delete wxConfigBase::Set((wxConfigBase *) NULL);
+}
+
+//-------------------------------------------------------------------------
+// OnOK()
+//-------------------------------------------------------------------------
+void AboutDlg::OnOK( wxCommandEvent& event )
+{
+ this->EndModal(wxID_OK);
+}
+
diff --git a/fdmdv2/src/dlg_about.h b/fdmdv2/src/dlg_about.h
index 563428a6..3a74320c 100644
--- a/fdmdv2/src/dlg_about.h
+++ b/fdmdv2/src/dlg_about.h
@@ -1,31 +1,31 @@
-//==========================================================================
-// Name: dlg_about.h
-//
-// Purpose: Subclasses dialog GUI for Help/About.
-// (DlgAbout from topFrame.h)
-//
-// Date: May 05 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#ifndef __ABOUT_DIALOG__
-#define __ABOUT_DIALOG__
-
-#include "fdmdv2_main.h"
-
-class AboutDlg : public DlgAbout
-{
- protected:
- // Handlers for DlgAbout events.
- void OnInitDialog( wxInitDialogEvent& event );
-
- public:
- /** Constructor */
- AboutDlg( wxWindow* parent );
- void ExchangeData(int inout);
- void OnOK( wxCommandEvent& event );
-
-};
-
-#endif // __ABOUT_DIALOG__
+//==========================================================================
+// Name: dlg_about.h
+//
+// Purpose: Subclasses dialog GUI for Help/About.
+// (DlgAbout from topFrame.h)
+//
+// Date: May 05 2012
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+#ifndef __ABOUT_DIALOG__
+#define __ABOUT_DIALOG__
+
+#include "fdmdv2_main.h"
+
+class AboutDlg : public DlgAbout
+{
+ protected:
+ // Handlers for DlgAbout events.
+ void OnInitDialog( wxInitDialogEvent& event );
+
+ public:
+ /** Constructor */
+ AboutDlg( wxWindow* parent );
+ void ExchangeData(int inout);
+ void OnOK( wxCommandEvent& event );
+
+};
+
+#endif // __ABOUT_DIALOG__
diff --git a/fdmdv2/src/dlg_audio.cpp b/fdmdv2/src/dlg_audio.cpp
index 8b732b70..66af826c 100644
--- a/fdmdv2/src/dlg_audio.cpp
+++ b/fdmdv2/src/dlg_audio.cpp
@@ -1,149 +1,149 @@
-//==========================================================================
+//==========================================================================
// Name: dlg_audio.cpp
//
// Purpose: Creates simple wxWidgets dialog GUI for audio
// devices/options.
//
-// Date: May 05 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#include "dlg_audio.h"
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class AudioDlg( wxWindow* parent ) : DlgAudio( parent )
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-AudioDlg::AudioDlg( wxWindow* parent ) : DlgAudio( parent )
-{
-}
-
-//-------------------------------------------------------------------------
-// OnCancel()
-//-------------------------------------------------------------------------
-void AudioDlg::OnCancel( wxCommandEvent& event )
-{
- this->EndModal(wxID_CANCEL);
-}
-
-//-------------------------------------------------------------------------
-// OnOK()
-//-------------------------------------------------------------------------
-void AudioDlg::OnOK( wxCommandEvent& event )
-{
- this->EndModal(wxID_OK);
-}
-
-//-------------------------------------------------------------------------
-// OnApply()
-//-------------------------------------------------------------------------
-void AudioDlg::OnApply( wxCommandEvent& event )
-{
- ExchangeData(EXCHANGE_DATA_OUT);
-}
-
-//-------------------------------------------------------------------------
-// OnClose()
-//-------------------------------------------------------------------------
-void AudioDlg::OnClose( wxCloseEvent& event )
-{
- this->EndModal(wxID_OK);
-}
-
-//-------------------------------------------------------------------------
-// OnInitDialog()
-//-------------------------------------------------------------------------
-void AudioDlg::OnInitDialog( wxInitDialogEvent& event )
-{
- ExchangeData(EXCHANGE_DATA_IN);
- populateAudioInfo();
-}
-
-//-------------------------------------------------------------------------
-// ExchangeData()
-//-------------------------------------------------------------------------
-void AudioDlg::ExchangeData(int inout)
-{
- wxConfigBase *pConfig = wxConfigBase::Get();
- if(inout == EXCHANGE_DATA_IN)
- {
- m_textRxInput->SetValue(wxGetApp().m_strRxInAudio);
- m_textTxOutput->SetValue(wxGetApp().m_strRxOutAudio);
- m_textVoiceInput->SetValue(wxGetApp().m_textVoiceInput);
- m_textVoiceOutput->SetValue(wxGetApp().m_textVoiceOutput);
- }
- if(inout == EXCHANGE_DATA_OUT)
- {
- wxGetApp().m_strRxInAudio = m_textRxInput->GetValue();
- wxGetApp().m_strRxOutAudio = m_textTxOutput->GetValue();
- wxGetApp().m_textVoiceInput = m_textVoiceInput->GetValue();
- wxGetApp().m_textVoiceOutput = m_textVoiceOutput->GetValue();
-
- pConfig->Write(wxT("/Audio/RxIn"), wxGetApp().m_strRxInAudio);
- pConfig->Write(wxT("/Audio/RxOut"), wxGetApp().m_strRxOutAudio);
- pConfig->Write(wxT("/Audio/TxIn"), wxGetApp().m_textVoiceInput);
- pConfig->Write(wxT("/Audio/TxOut"), wxGetApp().m_textVoiceOutput);
- pConfig->Write(wxT("/Audio/SampleRate"), wxGetApp().m_strSampleRate);
- pConfig->Flush();
- }
- delete wxConfigBase::Set((wxConfigBase *) NULL);
-}
-
-//-------------------------------------------------------------------------
-// OnRxInputSelect()
-//-------------------------------------------------------------------------
-void AudioDlg::OnRxInputSelect( wxCommandEvent& event )
-{
- wxMessageBox(wxT("got OnRxInputSelect()"), wxT("Select"), wxOK);
-}
-
-//-------------------------------------------------------------------------
-// OnTxOutputSelect()
-//-------------------------------------------------------------------------
-void AudioDlg::OnTxOutputSelect( wxCommandEvent& event )
-{
- wxMessageBox(wxT("got OnTxOutputSelect()"), wxT("Select"), wxOK);
-}
-
-//-------------------------------------------------------------------------
-// OnVoiceInputSelect()
-//-------------------------------------------------------------------------
-void AudioDlg::OnVoiceInputSelect( wxCommandEvent& event )
-{
- wxMessageBox(wxT("got OnVoiceInputSelect()"), wxT("Select"), wxOK);
-}
-
-//-------------------------------------------------------------------------
-// OnVoiceOutputSelect()
-//-------------------------------------------------------------------------
-void AudioDlg::OnVoiceOutputSelect( wxCommandEvent& event )
-{
- wxMessageBox(wxT("got OnVoiceOutputSelect()"), wxT("Select"), wxOK);
-}
-
-//-------------------------------------------------------------------------
-// populateStandardSampleRates()
-//-------------------------------------------------------------------------
-void AudioDlg::populateStandardSampleRates(
+// Date: May 05 2012
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+#include "dlg_audio.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class AudioDlg( wxWindow* parent ) : DlgAudio( parent )
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+AudioDlg::AudioDlg( wxWindow* parent ) : DlgAudio( parent )
+{
+}
+
+//-------------------------------------------------------------------------
+// OnCancel()
+//-------------------------------------------------------------------------
+void AudioDlg::OnCancel( wxCommandEvent& event )
+{
+ this->EndModal(wxID_CANCEL);
+}
+
+//-------------------------------------------------------------------------
+// OnOK()
+//-------------------------------------------------------------------------
+void AudioDlg::OnOK( wxCommandEvent& event )
+{
+ this->EndModal(wxID_OK);
+}
+
+//-------------------------------------------------------------------------
+// OnApply()
+//-------------------------------------------------------------------------
+void AudioDlg::OnApply( wxCommandEvent& event )
+{
+ ExchangeData(EXCHANGE_DATA_OUT);
+}
+
+//-------------------------------------------------------------------------
+// OnClose()
+//-------------------------------------------------------------------------
+void AudioDlg::OnClose( wxCloseEvent& event )
+{
+ this->EndModal(wxID_OK);
+}
+
+//-------------------------------------------------------------------------
+// OnInitDialog()
+//-------------------------------------------------------------------------
+void AudioDlg::OnInitDialog( wxInitDialogEvent& event )
+{
+ ExchangeData(EXCHANGE_DATA_IN);
+ populateAudioInfo();
+}
+
+//-------------------------------------------------------------------------
+// ExchangeData()
+//-------------------------------------------------------------------------
+void AudioDlg::ExchangeData(int inout)
+{
+ wxConfigBase *pConfig = wxConfigBase::Get();
+ if(inout == EXCHANGE_DATA_IN)
+ {
+ m_textRxInput->SetValue(wxGetApp().m_strRxInAudio);
+ m_textTxOutput->SetValue(wxGetApp().m_strRxOutAudio);
+ m_textVoiceInput->SetValue(wxGetApp().m_textVoiceInput);
+ m_textVoiceOutput->SetValue(wxGetApp().m_textVoiceOutput);
+ }
+ if(inout == EXCHANGE_DATA_OUT)
+ {
+ wxGetApp().m_strRxInAudio = m_textRxInput->GetValue();
+ wxGetApp().m_strRxOutAudio = m_textTxOutput->GetValue();
+ wxGetApp().m_textVoiceInput = m_textVoiceInput->GetValue();
+ wxGetApp().m_textVoiceOutput = m_textVoiceOutput->GetValue();
+
+ pConfig->Write(wxT("/Audio/RxIn"), wxGetApp().m_strRxInAudio);
+ pConfig->Write(wxT("/Audio/RxOut"), wxGetApp().m_strRxOutAudio);
+ pConfig->Write(wxT("/Audio/TxIn"), wxGetApp().m_textVoiceInput);
+ pConfig->Write(wxT("/Audio/TxOut"), wxGetApp().m_textVoiceOutput);
+ pConfig->Write(wxT("/Audio/SampleRate"), wxGetApp().m_strSampleRate);
+ pConfig->Flush();
+ }
+ delete wxConfigBase::Set((wxConfigBase *) NULL);
+}
+
+//-------------------------------------------------------------------------
+// OnRxInputSelect()
+//-------------------------------------------------------------------------
+void AudioDlg::OnRxInputSelect( wxCommandEvent& event )
+{
+ wxMessageBox(wxT("got OnRxInputSelect()"), wxT("Select"), wxOK);
+}
+
+//-------------------------------------------------------------------------
+// OnTxOutputSelect()
+//-------------------------------------------------------------------------
+void AudioDlg::OnTxOutputSelect( wxCommandEvent& event )
+{
+ wxMessageBox(wxT("got OnTxOutputSelect()"), wxT("Select"), wxOK);
+}
+
+//-------------------------------------------------------------------------
+// OnVoiceInputSelect()
+//-------------------------------------------------------------------------
+void AudioDlg::OnVoiceInputSelect( wxCommandEvent& event )
+{
+ wxMessageBox(wxT("got OnVoiceInputSelect()"), wxT("Select"), wxOK);
+}
+
+//-------------------------------------------------------------------------
+// OnVoiceOutputSelect()
+//-------------------------------------------------------------------------
+void AudioDlg::OnVoiceOutputSelect( wxCommandEvent& event )
+{
+ wxMessageBox(wxT("got OnVoiceOutputSelect()"), wxT("Select"), wxOK);
+}
+
+//-------------------------------------------------------------------------
+// populateStandardSampleRates()
+//-------------------------------------------------------------------------
+void AudioDlg::populateStandardSampleRates(
wxComboBox* target,
const portaudio::DirectionSpecificStreamParameters &inputParameters,
const portaudio::DirectionSpecificStreamParameters &outputParameters)
{
- static double STANDARD_SAMPLE_RATES[] = {
- 8000.0, 9600.0, 11025.0, 12000.0,
- 16000.0, 22050.0, 24000.0, 32000.0,
- 44100.0, 48000.0, 88200.0, 96000.0,
- -1 // negative terminated list
- };
+ static double STANDARD_SAMPLE_RATES[] = {
+ 8000.0, 9600.0, 11025.0, 12000.0,
+ 16000.0, 22050.0, 24000.0, 32000.0,
+ 44100.0, 48000.0, 88200.0, 96000.0,
+ -1 // negative terminated list
+ };
int printCount = 0;
- wxString tStr;
+ wxString tStr;
for (int i = 0; STANDARD_SAMPLE_RATES[i] > 0; ++i)
{
portaudio::StreamParameters tmp = portaudio::StreamParameters(inputParameters, outputParameters, STANDARD_SAMPLE_RATES[i], 0, paNoFlag);
if (tmp.isSupported())
{
- tStr.Printf("%i %8.2f", printCount, STANDARD_SAMPLE_RATES[i]);
+ tStr.Printf("%i %8.2f", printCount, STANDARD_SAMPLE_RATES[i]);
target->Append(tStr);
++printCount;
}
@@ -155,32 +155,32 @@ void AudioDlg::populateStandardSampleRates(
}
}
-//-------------------------------------------------------------------------
-// OnActivate()
-//-------------------------------------------------------------------------
+//-------------------------------------------------------------------------
+// OnActivate()
+//-------------------------------------------------------------------------
int AudioDlg::populateAudioInfo()
{
- wxString tStr;
- wxString ttStr;
+ wxString tStr;
+ wxString ttStr;
try
{
portaudio::AutoSystem autoSys;
- portaudio::System &sys = portaudio::System::instance();
+ portaudio::System &sys = portaudio::System::instance();
/*
tStr.Printf("PortAudio version number: %i\n", sys.version());
- m_textTopRight->AppendText(tStr);
+ m_textTopRight->AppendText(tStr);
tStr.Printf("PortAudio version number: %s\n", sys.versionText());
m_textTopRight->AppendText(tStr);
-
+
int numDevices = sys.deviceCount();
tStr.Printf("Number of devices: %i\n\n", numDevices);
- m_textTopRight->AppendText(tStr);
+ m_textTopRight->AppendText(tStr);
*/
for (portaudio::System::DeviceIterator i = sys.devicesBegin(); i != sys.devicesEnd(); ++i)
{
-/*
+/*
tStr.Printf("---------- device #: %i ----------\n", (*i).index());
m_textTopRight->AppendText(tStr);
bool defaultDisplayed = false;
@@ -211,7 +211,7 @@ int AudioDlg::populateAudioInfo()
tStr.Printf(" HostApi Default %s Output", (*i).hostApi().name());
m_textTopRight->AppendText(tStr);
defaultDisplayed = true;
- }
+ }
if (defaultDisplayed)
{
tStr = " ]\n";
@@ -221,17 +221,17 @@ int AudioDlg::populateAudioInfo()
tStr += ttStr;
ttStr.Printf("Host API : %s\n", (*i).hostApi().name());
tStr += ttStr;
- ttStr.Printf("Max inputs : %i\n", (*i).maxInputChannels());
+ ttStr.Printf("Max inputs : %i\n", (*i).maxInputChannels());
tStr += ttStr;
- ttStr.Printf("Max outputs : %i\n\n", (*i).maxOutputChannels());
+ ttStr.Printf("Max outputs : %i\n\n", (*i).maxOutputChannels());
tStr += ttStr;
- ttStr.Printf("Default low input latency : %8.3f\n", (*i).defaultLowInputLatency());
+ ttStr.Printf("Default low input latency : %8.3f\n", (*i).defaultLowInputLatency());
tStr += ttStr;
- ttStr.Printf("Default low output latency : %8.3f\n", (*i).defaultLowOutputLatency());
+ ttStr.Printf("Default low output latency : %8.3f\n", (*i).defaultLowOutputLatency());
tStr += ttStr;
- ttStr.Printf("Default high input latency : %8.3f\n", (*i).defaultHighInputLatency());
+ ttStr.Printf("Default high input latency : %8.3f\n", (*i).defaultHighInputLatency());
tStr += ttStr;
- ttStr.Printf("Default high output latency : %8.3f\n\n", (*i).defaultHighOutputLatency());
+ ttStr.Printf("Default high output latency : %8.3f\n\n", (*i).defaultHighOutputLatency());
tStr += ttStr;
m_textTopRight->AppendText(tStr);
@@ -256,17 +256,17 @@ int AudioDlg::populateAudioInfo()
tStr.Printf("Default sample rate : %8.2f\n", (*i).defaultSampleRate());
m_textTopRight->AppendText(tStr);
- wxComboBox* m_comboAudioCodec;
- wxComboBox* m_comboCodecTx;
- wxComboBox* m_comboRadioRx;
- wxComboBox* m_comboCodecSpkr;
+ wxComboBox* m_comboAudioCodec;
+ wxComboBox* m_comboCodecTx;
+ wxComboBox* m_comboRadioRx;
+ wxComboBox* m_comboCodecSpkr;
*/
// Poll for standard sample rates:
portaudio::DirectionSpecificStreamParameters inputParameters((*i), (*i).maxInputChannels(), portaudio::INT16, true, 0.0, NULL);
portaudio::DirectionSpecificStreamParameters outputParameters((*i), (*i).maxOutputChannels(), portaudio::INT16, true, 0.0, NULL);
if (inputParameters.numChannels() > 0)
{
-// tStr = "Supported standard Input sample rates\n";
+// tStr = "Supported standard Input sample rates\n";
// m_comboAudioCodec->Append(tStr);
// tStr.Printf(" for half-duplex 16 bit %i channel input = ", inputParameters.numChannels());
// m_comboAudioCodec->InsertItems(1, &tStr, 0);
@@ -275,7 +275,7 @@ int AudioDlg::populateAudioInfo()
}
if (outputParameters.numChannels() > 0)
{
-// tStr = "Supported standard Output sample rates\n";
+// tStr = "Supported standard Output sample rates\n";
// m_comboRadioRx->Append(tStr);
// tStr.Printf(" for half-duplex 16 bit %i channel output = ", outputParameters.numChannels());
// m_comboRadioRx->Append(tStr);
@@ -283,7 +283,7 @@ int AudioDlg::populateAudioInfo()
}
if (inputParameters.numChannels() > 0 && inputParameters.numChannels() > 0)
{
-// tStr = "Supported full-duplex sample rates\n";
+// tStr = "Supported full-duplex sample rates\n";
// m_comboCodecTx->Append(tStr);
// tStr.Printf(" for full-duplex 16 bit %i channel input, %i", inputParameters.numChannels(), outputParameters.numChannels());
// m_comboCodecTx->InsertItems(1, &tStr, 0);
@@ -292,7 +292,7 @@ int AudioDlg::populateAudioInfo()
}
if (outputParameters.numChannels() > 0 && outputParameters.numChannels() > 0)
{
-// tStr = "Supported full-duplex sample rates\n";
+// tStr = "Supported full-duplex sample rates\n";
// m_comboCodecSpkr->Append(tStr);
// tStr.Printf(" for full-duplex 16 bit %i channel input, %i", inputParameters.numChannels(), outputParameters.numChannels());
// m_comboCodecTx->InsertItems(1, &tStr, 0);
@@ -302,7 +302,7 @@ int AudioDlg::populateAudioInfo()
}
catch (const portaudio::PaException &e)
{
- tStr.Printf("A PortAudio error occured: %s\n", e.paErrorText());
+ tStr.Printf("A PortAudio error occured: %s\n", e.paErrorText());
wxMessageBox(tStr, wxT("Portaudio exception"), wxOK);
}
catch (const portaudio::PaCppException &e)
@@ -323,4 +323,4 @@ int AudioDlg::populateAudioInfo()
return 0;
}
-
+
diff --git a/fdmdv2/src/dlg_audio.h b/fdmdv2/src/dlg_audio.h
index d62593e0..8f471295 100644
--- a/fdmdv2/src/dlg_audio.h
+++ b/fdmdv2/src/dlg_audio.h
@@ -1,47 +1,47 @@
-//==========================================================================
+//==========================================================================
// Name: dlg_audio.h
//
// Purpose: Subclasses dialog GUI for audio devices/options.
// (DlgAudio from topFrame.h)
//
-// Date: May 05 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#ifndef __AUDIO_DIALOG__
-#define __AUDIO_DIALOG__
-
-#include "fdmdv2_main.h"
-
+// Date: May 05 2012
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+#ifndef __AUDIO_DIALOG__
+#define __AUDIO_DIALOG__
+
+#include "fdmdv2_main.h"
+
#include "portaudio.h"
#include "portaudiocpp/PortAudioCpp.hxx"
#ifdef WIN32
#include "portaudiocpp/AsioDeviceAdapter.hxx"
#endif
-
-class AudioDlg : public DlgAudio
-{
- protected:
- // Handlers for DlgAudio events.
- void OnCancel( wxCommandEvent& event );
- void OnOK( wxCommandEvent& event );
- void OnClose( wxCloseEvent& event );
- void OnInitDialog( wxInitDialogEvent& event );
- void OnApply( wxCommandEvent& event );
+
+class AudioDlg : public DlgAudio
+{
+ protected:
+ // Handlers for DlgAudio events.
+ void OnCancel( wxCommandEvent& event );
+ void OnOK( wxCommandEvent& event );
+ void OnClose( wxCloseEvent& event );
+ void OnInitDialog( wxInitDialogEvent& event );
+ void OnApply( wxCommandEvent& event );
void populateStandardSampleRates(
wxComboBox* target,
const portaudio::DirectionSpecificStreamParameters &inputParameters,
const portaudio::DirectionSpecificStreamParameters &outputParameters);
int populateAudioInfo();
- public:
- /** Constructor */
- AudioDlg( wxWindow* parent );
- void OnRxInputSelect( wxCommandEvent& event );
- void OnTxOutputSelect( wxCommandEvent& event );
- void OnVoiceInputSelect( wxCommandEvent& event );
- void OnVoiceOutputSelect( wxCommandEvent& event );
- void ExchangeData(int inout);
-};
-
-#endif // __AUDIO_DIALOG__
+ public:
+ /** Constructor */
+ AudioDlg( wxWindow* parent );
+ void OnRxInputSelect( wxCommandEvent& event );
+ void OnTxOutputSelect( wxCommandEvent& event );
+ void OnVoiceInputSelect( wxCommandEvent& event );
+ void OnVoiceOutputSelect( wxCommandEvent& event );
+ void ExchangeData(int inout);
+};
+
+#endif // __AUDIO_DIALOG__
diff --git a/fdmdv2/src/dlg_comports.cpp b/fdmdv2/src/dlg_comports.cpp
index 33b2fda4..2c147d2f 100644
--- a/fdmdv2/src/dlg_comports.cpp
+++ b/fdmdv2/src/dlg_comports.cpp
@@ -1,303 +1,303 @@
-//==========================================================================
+//==========================================================================
// Name: dlg_comports.cpp
// Purpose: Creates simple wxWidgets dialog GUI to select
// real/virtual Comm ports.
-// Date: May 11 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#include "dlg_comports.h"
-#include "fdmdv2_hdw_ports.h"
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class ComPortsDlg
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-ComPortsDlg::ComPortsDlg(wxWindow* parent) : DlgComPorts(parent)
-{
-// m_serialports = HdwPortList();
-// m_serialports.setType(PORT_TYPE_SERIAL);
-}
-
-//-------------------------------------------------------------------------
-// OnListItemSelected()
-//-------------------------------------------------------------------------
-void ComPortsDlg::OnListItemSelected(wxListEvent& event)
-{
- // TODO: Implement OnListItemSelected
-}
-
-//-------------------------------------------------------------------------
-// ExchangeData()
-//-------------------------------------------------------------------------
-void ComPortsDlg::ExchangeData(int inout)
-{
- wxConfigBase *pConfig = wxConfigBase::Get();
- if(inout == EXCHANGE_DATA_IN)
- {
- m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort);
- m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud);
- m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits);
- m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits);
- m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity);
- }
- if(inout == EXCHANGE_DATA_OUT)
- {
- wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue();
- wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue();
- wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue();
- wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue();
- wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue();
-
- pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort);
- pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud);
- pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits);
- pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits);
- pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity);
- //m_textRigCtrlFlowControl
-
- pConfig->Flush();
- }
- delete wxConfigBase::Set((wxConfigBase *) NULL);
-}
-
-//-------------------------------------------------------------------------
-// OnCancel()
-//-------------------------------------------------------------------------
-void ComPortsDlg::OnCancel(wxCommandEvent& event)
-{
- this->EndModal(wxID_CANCEL);
-}
-
-//-------------------------------------------------------------------------
-// OnOK()
-//-------------------------------------------------------------------------
-void ComPortsDlg::OnOK(wxCommandEvent& event)
-{
- this->EndModal(wxID_OK);
-}
-
-//-------------------------------------------------------------------------
-// OnApply()
-//-------------------------------------------------------------------------
-void ComPortsDlg::OnApply(wxCommandEvent& event)
-{
- ExchangeData(EXCHANGE_DATA_OUT);
-}
-
-//-------------------------------------------------------------------------
-// OnClose()
-//-------------------------------------------------------------------------
-void ComPortsDlg::OnClose(wxCloseEvent& event)
-{
- this->EndModal(wxID_OK);
-}
-
-//-------------------------------------------------------------------------
-// OnInitDialog()
-//-------------------------------------------------------------------------
-void ComPortsDlg::OnInitDialog(wxInitDialogEvent& event)
-{
- ExchangeData(EXCHANGE_DATA_IN);
-// populateAudioInfo();
-}
-
-/*
-//-------------------------------------------------------------------------
-// serial_parity_handler()
-//-------------------------------------------------------------------------
-static void serial_parity_handler(union control *ctrl, void *dlg, void *data, int event)
-{
- static const struct
- {
- const char *name;
- int val;
- }
- parities[] =
- {
- {"None", SER_PAR_NONE},
- {"Odd", SER_PAR_ODD},
- {"Even", SER_PAR_EVEN},
- {"Mark", SER_PAR_MARK},
- {"Space", SER_PAR_SPACE},
- };
- int mask = ctrl->listbox.context.i;
- int i, j;
- Config *cfg = (Config *)data;
-
- if (event == EVENT_REFRESH)
- {
- int oldparity = cfg->serparity; // preserve past reentrant calls
- dlg_update_start(ctrl, dlg);
- dlg_listbox_clear(ctrl, dlg);
- for (i = 0; i < lenof(parities); i++)
- {
- if (mask & (1 << i))
- dlg_listbox_addwithid(ctrl, dlg, parities[i].name, parities[i].val);
- }
- for (i = j = 0; i < lenof(parities); i++)
- {
- if (mask & (1 << i))
- {
- if (oldparity == parities[i].val)
- {
- dlg_listbox_select(ctrl, dlg, j);
- break;
- }
- j++;
- }
- }
- if (i == lenof(parities))
- {
- // an unsupported setting was chosen
- dlg_listbox_select(ctrl, dlg, 0);
- oldparity = SER_PAR_NONE;
- }
- dlg_update_done(ctrl, dlg);
- cfg->serparity = oldparity;
- // restore
- }
- else if (event == EVENT_SELCHANGE)
- {
- int i = dlg_listbox_index(ctrl, dlg);
- if (i < 0)
- {
- i = SER_PAR_NONE;
- }
- else
- {
- i = dlg_listbox_getid(ctrl, dlg, i);
- }
- cfg->serparity = i;
- }
-}
-
-//-------------------------------------------------------------------------
-// serial_flow_handler()
-//-------------------------------------------------------------------------
-static void serial_flow_handler(union control *ctrl, void *dlg, void *data, int event)
-{
- static const struct
- {
- const char *name;
- int val;
- } flows[] =
- {
- {"None", SER_FLOW_NONE},
- {"XON/XOFF", SER_FLOW_XONXOFF},
- {"RTS/CTS", SER_FLOW_RTSCTS},
- {"DSR/DTR", SER_FLOW_DSRDTR},
- };
- int mask = ctrl->listbox.context.i;
- int i, j;
- Config *cfg = (Config *)data;
-
- if (event == EVENT_REFRESH)
- {
- int oldflow = cfg->serflow; // preserve past reentrant calls
- dlg_update_start(ctrl, dlg);
- dlg_listbox_clear(ctrl, dlg);
- for (i = 0; i < lenof(flows); i++)
- {
- if (mask & (1 << i))
- dlg_listbox_addwithid(ctrl, dlg, flows[i].name, flows[i].val);
- }
- for (i = j = 0; i < lenof(flows); i++)
- {
- if (mask & (1 << i))
- {
- if (oldflow == flows[i].val)
- {
- dlg_listbox_select(ctrl, dlg, j);
- break;
- }
- j++;
- }
- }
- if (i == lenof(flows))
- {
- // an unsupported setting was chosen
- dlg_listbox_select(ctrl, dlg, 0);
- oldflow = SER_FLOW_NONE;
- }
- dlg_update_done(ctrl, dlg);
- cfg->serflow = oldflow; // restore
- }
- else if (event == EVENT_SELCHANGE)
- {
- int i = dlg_listbox_index(ctrl, dlg);
- if (i < 0)
- {
- i = SER_FLOW_NONE;
- }
- else
- {
- i = dlg_listbox_getid(ctrl, dlg, i);
- }
- cfg->serflow = i;
- }
-}
-
-//-------------------------------------------------------------------------
-// ser_setup_config_box()
-//-------------------------------------------------------------------------
-void ser_setup_config_box(struct controlbox *b, int midsession, int parity_mask, int flow_mask)
-{
- struct controlset *s;
- union control *c;
-
- if (!midsession)
- {
- int i;
- extern void config_protocolbuttons_handler(union control *, void *, void *, int);
- //
- // Add the serial back end to the protocols list at the
- // top of the config box.
- //
- s = ctrl_getset(b, "Session", "hostport", "Specify the destination you want to connect to");
- for (i = 0; i < s->ncontrols; i++)
- {
- c = s->ctrls[i];
- if (c->generic.type == CTRL_RADIO && c->generic.handler == config_protocolbuttons_handler)
- {
- c->radio.nbuttons++;
- c->radio.ncolumns++;
- c->radio.buttons = sresize(c->radio.buttons, c->radio.nbuttons, char *);
- c->radio.buttons[c->radio.nbuttons-1] = dupstr("Serial");
- c->radio.buttondata = sresize(c->radio.buttondata, c->radio.nbuttons, intorptr);
- c->radio.buttondata[c->radio.nbuttons-1] = I(PROT_SERIAL);
- if (c->radio.shortcuts)
- {
- c->radio.shortcuts = sresize(c->radio.shortcuts, c->radio.nbuttons, char);
- c->radio.shortcuts[c->radio.nbuttons-1] = 'r';
- }
- }
- }
- }
- //
- // Entirely new Connection/Serial panel for serial port
- // configuration.
- //
- ctrl_settitle(b, "Connection/Serial", "Options controlling local serial lines");
- if (!midsession)
- {
- //
- // We don't permit switching to a different serial port in
- // midflight, although we do allow all other
- // reconfiguration.
- //
- s = ctrl_getset(b, "Connection/Serial", "serline", "Select a serial line");
- ctrl_editbox(s, "Serial line to connect to", 'l', 40, HELPCTX(serial_line), dlg_stdeditbox_handler, I(offsetof(Config,serline)), I(sizeof(((Config *)0)->serline)));
- }
-
- s = ctrl_getset(b, "Connection/Serial", "sercfg", "Configure the serial line");
- ctrl_editbox(s, "Speed (baud)", 's', 40, HELPCTX(serial_speed), dlg_stdeditbox_handler, I(offsetof(Config,serspeed)), I(-1));
- ctrl_editbox(s, "Data bits", 'b', 40, HELPCTX(serial_databits), dlg_stdeditbox_handler,I(offsetof(Config,serdatabits)),I(-1));
- //
- // Stop bits come in units of one half.
- //
- ctrl_editbox(s, "Stop bits", 't', 40, HELPCTX(serial_stopbits), dlg_stdeditbox_handler,I(offsetof(Config,serstopbits)),I(-2));
- ctrl_droplist(s, "Parity", 'p', 40, HELPCTX(serial_parity), serial_parity_handler, I(parity_mask));
- ctrl_droplist(s, "Flow control", 'f', 40, HELPCTX(serial_flow), serial_flow_handler, I(flow_mask));
-}
-*/
+// Date: May 11 2012
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+#include "dlg_comports.h"
+#include "fdmdv2_hdw_ports.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class ComPortsDlg
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+ComPortsDlg::ComPortsDlg(wxWindow* parent) : DlgComPorts(parent)
+{
+// m_serialports = HdwPortList();
+// m_serialports.setType(PORT_TYPE_SERIAL);
+}
+
+//-------------------------------------------------------------------------
+// OnListItemSelected()
+//-------------------------------------------------------------------------
+void ComPortsDlg::OnListItemSelected(wxListEvent& event)
+{
+ // TODO: Implement OnListItemSelected
+}
+
+//-------------------------------------------------------------------------
+// ExchangeData()
+//-------------------------------------------------------------------------
+void ComPortsDlg::ExchangeData(int inout)
+{
+ wxConfigBase *pConfig = wxConfigBase::Get();
+ if(inout == EXCHANGE_DATA_IN)
+ {
+ m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort);
+ m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud);
+ m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits);
+ m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits);
+ m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity);
+ }
+ if(inout == EXCHANGE_DATA_OUT)
+ {
+ wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue();
+ wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue();
+ wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue();
+ wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue();
+ wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue();
+
+ pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort);
+ pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud);
+ pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits);
+ pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits);
+ pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity);
+ //m_textRigCtrlFlowControl
+
+ pConfig->Flush();
+ }
+ delete wxConfigBase::Set((wxConfigBase *) NULL);
+}
+
+//-------------------------------------------------------------------------
+// OnCancel()
+//-------------------------------------------------------------------------
+void ComPortsDlg::OnCancel(wxCommandEvent& event)
+{
+ this->EndModal(wxID_CANCEL);
+}
+
+//-------------------------------------------------------------------------
+// OnOK()
+//-------------------------------------------------------------------------
+void ComPortsDlg::OnOK(wxCommandEvent& event)
+{
+ this->EndModal(wxID_OK);
+}
+
+//-------------------------------------------------------------------------
+// OnApply()
+//-------------------------------------------------------------------------
+void ComPortsDlg::OnApply(wxCommandEvent& event)
+{
+ ExchangeData(EXCHANGE_DATA_OUT);
+}
+
+//-------------------------------------------------------------------------
+// OnClose()
+//-------------------------------------------------------------------------
+void ComPortsDlg::OnClose(wxCloseEvent& event)
+{
+ this->EndModal(wxID_OK);
+}
+
+//-------------------------------------------------------------------------
+// OnInitDialog()
+//-------------------------------------------------------------------------
+void ComPortsDlg::OnInitDialog(wxInitDialogEvent& event)
+{
+ ExchangeData(EXCHANGE_DATA_IN);
+// populateAudioInfo();
+}
+
+/*
+//-------------------------------------------------------------------------
+// serial_parity_handler()
+//-------------------------------------------------------------------------
+static void serial_parity_handler(union control *ctrl, void *dlg, void *data, int event)
+{
+ static const struct
+ {
+ const char *name;
+ int val;
+ }
+ parities[] =
+ {
+ {"None", SER_PAR_NONE},
+ {"Odd", SER_PAR_ODD},
+ {"Even", SER_PAR_EVEN},
+ {"Mark", SER_PAR_MARK},
+ {"Space", SER_PAR_SPACE},
+ };
+ int mask = ctrl->listbox.context.i;
+ int i, j;
+ Config *cfg = (Config *)data;
+
+ if (event == EVENT_REFRESH)
+ {
+ int oldparity = cfg->serparity; // preserve past reentrant calls
+ dlg_update_start(ctrl, dlg);
+ dlg_listbox_clear(ctrl, dlg);
+ for (i = 0; i < lenof(parities); i++)
+ {
+ if (mask & (1 << i))
+ dlg_listbox_addwithid(ctrl, dlg, parities[i].name, parities[i].val);
+ }
+ for (i = j = 0; i < lenof(parities); i++)
+ {
+ if (mask & (1 << i))
+ {
+ if (oldparity == parities[i].val)
+ {
+ dlg_listbox_select(ctrl, dlg, j);
+ break;
+ }
+ j++;
+ }
+ }
+ if (i == lenof(parities))
+ {
+ // an unsupported setting was chosen
+ dlg_listbox_select(ctrl, dlg, 0);
+ oldparity = SER_PAR_NONE;
+ }
+ dlg_update_done(ctrl, dlg);
+ cfg->serparity = oldparity;
+ // restore
+ }
+ else if (event == EVENT_SELCHANGE)
+ {
+ int i = dlg_listbox_index(ctrl, dlg);
+ if (i < 0)
+ {
+ i = SER_PAR_NONE;
+ }
+ else
+ {
+ i = dlg_listbox_getid(ctrl, dlg, i);
+ }
+ cfg->serparity = i;
+ }
+}
+
+//-------------------------------------------------------------------------
+// serial_flow_handler()
+//-------------------------------------------------------------------------
+static void serial_flow_handler(union control *ctrl, void *dlg, void *data, int event)
+{
+ static const struct
+ {
+ const char *name;
+ int val;
+ } flows[] =
+ {
+ {"None", SER_FLOW_NONE},
+ {"XON/XOFF", SER_FLOW_XONXOFF},
+ {"RTS/CTS", SER_FLOW_RTSCTS},
+ {"DSR/DTR", SER_FLOW_DSRDTR},
+ };
+ int mask = ctrl->listbox.context.i;
+ int i, j;
+ Config *cfg = (Config *)data;
+
+ if (event == EVENT_REFRESH)
+ {
+ int oldflow = cfg->serflow; // preserve past reentrant calls
+ dlg_update_start(ctrl, dlg);
+ dlg_listbox_clear(ctrl, dlg);
+ for (i = 0; i < lenof(flows); i++)
+ {
+ if (mask & (1 << i))
+ dlg_listbox_addwithid(ctrl, dlg, flows[i].name, flows[i].val);
+ }
+ for (i = j = 0; i < lenof(flows); i++)
+ {
+ if (mask & (1 << i))
+ {
+ if (oldflow == flows[i].val)
+ {
+ dlg_listbox_select(ctrl, dlg, j);
+ break;
+ }
+ j++;
+ }
+ }
+ if (i == lenof(flows))
+ {
+ // an unsupported setting was chosen
+ dlg_listbox_select(ctrl, dlg, 0);
+ oldflow = SER_FLOW_NONE;
+ }
+ dlg_update_done(ctrl, dlg);
+ cfg->serflow = oldflow; // restore
+ }
+ else if (event == EVENT_SELCHANGE)
+ {
+ int i = dlg_listbox_index(ctrl, dlg);
+ if (i < 0)
+ {
+ i = SER_FLOW_NONE;
+ }
+ else
+ {
+ i = dlg_listbox_getid(ctrl, dlg, i);
+ }
+ cfg->serflow = i;
+ }
+}
+
+//-------------------------------------------------------------------------
+// ser_setup_config_box()
+//-------------------------------------------------------------------------
+void ser_setup_config_box(struct controlbox *b, int midsession, int parity_mask, int flow_mask)
+{
+ struct controlset *s;
+ union control *c;
+
+ if (!midsession)
+ {
+ int i;
+ extern void config_protocolbuttons_handler(union control *, void *, void *, int);
+ //
+ // Add the serial back end to the protocols list at the
+ // top of the config box.
+ //
+ s = ctrl_getset(b, "Session", "hostport", "Specify the destination you want to connect to");
+ for (i = 0; i < s->ncontrols; i++)
+ {
+ c = s->ctrls[i];
+ if (c->generic.type == CTRL_RADIO && c->generic.handler == config_protocolbuttons_handler)
+ {
+ c->radio.nbuttons++;
+ c->radio.ncolumns++;
+ c->radio.buttons = sresize(c->radio.buttons, c->radio.nbuttons, char *);
+ c->radio.buttons[c->radio.nbuttons-1] = dupstr("Serial");
+ c->radio.buttondata = sresize(c->radio.buttondata, c->radio.nbuttons, intorptr);
+ c->radio.buttondata[c->radio.nbuttons-1] = I(PROT_SERIAL);
+ if (c->radio.shortcuts)
+ {
+ c->radio.shortcuts = sresize(c->radio.shortcuts, c->radio.nbuttons, char);
+ c->radio.shortcuts[c->radio.nbuttons-1] = 'r';
+ }
+ }
+ }
+ }
+ //
+ // Entirely new Connection/Serial panel for serial port
+ // configuration.
+ //
+ ctrl_settitle(b, "Connection/Serial", "Options controlling local serial lines");
+ if (!midsession)
+ {
+ //
+ // We don't permit switching to a different serial port in
+ // midflight, although we do allow all other
+ // reconfiguration.
+ //
+ s = ctrl_getset(b, "Connection/Serial", "serline", "Select a serial line");
+ ctrl_editbox(s, "Serial line to connect to", 'l', 40, HELPCTX(serial_line), dlg_stdeditbox_handler, I(offsetof(Config,serline)), I(sizeof(((Config *)0)->serline)));
+ }
+
+ s = ctrl_getset(b, "Connection/Serial", "sercfg", "Configure the serial line");
+ ctrl_editbox(s, "Speed (baud)", 's', 40, HELPCTX(serial_speed), dlg_stdeditbox_handler, I(offsetof(Config,serspeed)), I(-1));
+ ctrl_editbox(s, "Data bits", 'b', 40, HELPCTX(serial_databits), dlg_stdeditbox_handler,I(offsetof(Config,serdatabits)),I(-1));
+ //
+ // Stop bits come in units of one half.
+ //
+ ctrl_editbox(s, "Stop bits", 't', 40, HELPCTX(serial_stopbits), dlg_stdeditbox_handler,I(offsetof(Config,serstopbits)),I(-2));
+ ctrl_droplist(s, "Parity", 'p', 40, HELPCTX(serial_parity), serial_parity_handler, I(parity_mask));
+ ctrl_droplist(s, "Flow control", 'f', 40, HELPCTX(serial_flow), serial_flow_handler, I(flow_mask));
+}
+*/
diff --git a/fdmdv2/src/dlg_comports.h b/fdmdv2/src/dlg_comports.h
index 1c47aefd..9abfc32b 100644
--- a/fdmdv2/src/dlg_comports.h
+++ b/fdmdv2/src/dlg_comports.h
@@ -1,38 +1,38 @@
-//==========================================================================
+//==========================================================================
// Name: dlg_options.h
// Purpose: Subclasses dialog GUI for general program options.
// (DlgOptions from topFrame.h)
// Created: May. 11, 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#ifndef __COMPORTS_DIALOG__
-#define __COMPORTS_DIALOG__
-
-#include "fdmdv2_main.h"
-#include "fdmdv2_hdw_ports.h"
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class ComPortsDlg
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-class ComPortsDlg : public DlgComPorts
-{
- public:
- /** Constructor */
- ComPortsDlg(wxWindow* parent);
- void ExchangeData(int inout);
- //ArrayOfPorts m_serialports;
-
- protected:
- // Handlers for events.
- void OnListItemSelected(wxListEvent& event);
- void OnCancel(wxCommandEvent& event);
- void OnOK(wxCommandEvent& event);
- void OnClose(wxCloseEvent& event);
- void OnInitDialog(wxInitDialogEvent& event);
- void OnApply(wxCommandEvent& event);
-
-};
-
-#endif // __COMPORTS_DIALOG__
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+#ifndef __COMPORTS_DIALOG__
+#define __COMPORTS_DIALOG__
+
+#include "fdmdv2_main.h"
+#include "fdmdv2_hdw_ports.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class ComPortsDlg
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+class ComPortsDlg : public DlgComPorts
+{
+ public:
+ /** Constructor */
+ ComPortsDlg(wxWindow* parent);
+ void ExchangeData(int inout);
+ //ArrayOfPorts m_serialports;
+
+ protected:
+ // Handlers for events.
+ void OnListItemSelected(wxListEvent& event);
+ void OnCancel(wxCommandEvent& event);
+ void OnOK(wxCommandEvent& event);
+ void OnClose(wxCloseEvent& event);
+ void OnInitDialog(wxInitDialogEvent& event);
+ void OnApply(wxCommandEvent& event);
+
+};
+
+#endif // __COMPORTS_DIALOG__
diff --git a/fdmdv2/src/dlg_options.cpp b/fdmdv2/src/dlg_options.cpp
index ecfcdfc6..0bb838aa 100644
--- a/fdmdv2/src/dlg_options.cpp
+++ b/fdmdv2/src/dlg_options.cpp
@@ -1,91 +1,91 @@
-//==========================================================================
+//==========================================================================
// Name: dlg_options.cpp
//
// Purpose: Creates simple wxWidgets dialog GUI general program
// devices/options.
//
-// Date: May 06 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#include "dlg_options.h"
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class OptionsDlg
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-OptionsDlg::OptionsDlg( wxWindow* parent ) : DlgOptions( parent )
-{
-}
-
-//-------------------------------------------------------------------------
-// OnClose()
-//-------------------------------------------------------------------------
-void OptionsDlg::OnClose( wxCloseEvent& event )
-{
-}
-
-//-------------------------------------------------------------------------
-// OnInitDialog()
-//-------------------------------------------------------------------------
-void OptionsDlg::OnInitDialog( wxInitDialogEvent& event )
-{
- ExchangeData(EXCHANGE_DATA_IN);
-}
-
-//-------------------------------------------------------------------------
-// ExchangeData()
-//-------------------------------------------------------------------------
-void OptionsDlg::ExchangeData(int inout)
-{
-// wxConfigBase *pConfig = wxConfigBase::Get();
- if(inout == EXCHANGE_DATA_IN)
- {
-// m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort);
-// m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud);
-// m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits);
-// m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits);
-// m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity);
- }
- if(inout == EXCHANGE_DATA_OUT)
- {
-// wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue();
-// wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue();
-// wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue();
-// wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue();
-// wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue();
-
-// pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort);
-// pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud);
-// pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits);
-// pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits);
-// pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity);
-
-// pConfig->Flush();
- }
-// delete wxConfigBase::Set((wxConfigBase *) NULL);
-}
-
-//-------------------------------------------------------------------------
-// OnCancel()
-//-------------------------------------------------------------------------
-void OptionsDlg::OnCancel( wxCommandEvent& event )
-{
- this->EndModal(wxID_CANCEL);
-}
-
-//-------------------------------------------------------------------------
-// OnOK()
-//-------------------------------------------------------------------------
-void OptionsDlg::OnOK( wxCommandEvent& event )
-{
- this->EndModal(wxID_OK);
-}
-
-//-------------------------------------------------------------------------
-// OnApply()
-//-------------------------------------------------------------------------
-void OptionsDlg::OnApply( wxCommandEvent& event )
-{
- ExchangeData(EXCHANGE_DATA_OUT);
-}
+// Date: May 06 2012
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+#include "dlg_options.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class OptionsDlg
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+OptionsDlg::OptionsDlg( wxWindow* parent ) : DlgOptions( parent )
+{
+}
+
+//-------------------------------------------------------------------------
+// OnClose()
+//-------------------------------------------------------------------------
+void OptionsDlg::OnClose( wxCloseEvent& event )
+{
+}
+
+//-------------------------------------------------------------------------
+// OnInitDialog()
+//-------------------------------------------------------------------------
+void OptionsDlg::OnInitDialog( wxInitDialogEvent& event )
+{
+ ExchangeData(EXCHANGE_DATA_IN);
+}
+
+//-------------------------------------------------------------------------
+// ExchangeData()
+//-------------------------------------------------------------------------
+void OptionsDlg::ExchangeData(int inout)
+{
+// wxConfigBase *pConfig = wxConfigBase::Get();
+ if(inout == EXCHANGE_DATA_IN)
+ {
+// m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort);
+// m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud);
+// m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits);
+// m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits);
+// m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity);
+ }
+ if(inout == EXCHANGE_DATA_OUT)
+ {
+// wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue();
+// wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue();
+// wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue();
+// wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue();
+// wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue();
+
+// pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort);
+// pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud);
+// pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits);
+// pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits);
+// pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity);
+
+// pConfig->Flush();
+ }
+// delete wxConfigBase::Set((wxConfigBase *) NULL);
+}
+
+//-------------------------------------------------------------------------
+// OnCancel()
+//-------------------------------------------------------------------------
+void OptionsDlg::OnCancel( wxCommandEvent& event )
+{
+ this->EndModal(wxID_CANCEL);
+}
+
+//-------------------------------------------------------------------------
+// OnOK()
+//-------------------------------------------------------------------------
+void OptionsDlg::OnOK( wxCommandEvent& event )
+{
+ this->EndModal(wxID_OK);
+}
+
+//-------------------------------------------------------------------------
+// OnApply()
+//-------------------------------------------------------------------------
+void OptionsDlg::OnApply( wxCommandEvent& event )
+{
+ ExchangeData(EXCHANGE_DATA_OUT);
+}
diff --git a/fdmdv2/src/dlg_options.h b/fdmdv2/src/dlg_options.h
index 0d30f3bc..2e01fee7 100644
--- a/fdmdv2/src/dlg_options.h
+++ b/fdmdv2/src/dlg_options.h
@@ -1,35 +1,35 @@
-//==========================================================================
+//==========================================================================
// Name: dlg_options.h
//
// Purpose: Subclasses dialog GUI for general program options.
// (DlgOptions from topFrame.h)
//
-// Date: May 05 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#ifndef __OPTIONS_DIALOG__
-#define __OPTIONS_DIALOG__
-
-#include "fdmdv2_main.h"
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class OptionsDlg
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-class OptionsDlg : public DlgOptions
-{
- protected:
- // Handlers for DlgOptions events.
- void OnClose( wxCloseEvent& event );
- void OnInitDialog( wxInitDialogEvent& event );
- public:
- /** Constructor */
- OptionsDlg( wxWindow* parent );
- void ExchangeData(int inout);
- void OnCancel( wxCommandEvent& event );
- void OnOK( wxCommandEvent& event );
- void OnApply( wxCommandEvent& event );
-};
-
-#endif // __OPTIONS_DIALOG__
+// Date: May 05 2012
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+#ifndef __OPTIONS_DIALOG__
+#define __OPTIONS_DIALOG__
+
+#include "fdmdv2_main.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class OptionsDlg
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+class OptionsDlg : public DlgOptions
+{
+ protected:
+ // Handlers for DlgOptions events.
+ void OnClose( wxCloseEvent& event );
+ void OnInitDialog( wxInitDialogEvent& event );
+ public:
+ /** Constructor */
+ OptionsDlg( wxWindow* parent );
+ void ExchangeData(int inout);
+ void OnCancel( wxCommandEvent& event );
+ void OnOK( wxCommandEvent& event );
+ void OnApply( wxCommandEvent& event );
+};
+
+#endif // __OPTIONS_DIALOG__
diff --git a/fdmdv2/src/fdmdv2_defines.h b/fdmdv2/src/fdmdv2_defines.h
index d336686c..e2004f5c 100644
--- a/fdmdv2/src/fdmdv2_defines.h
+++ b/fdmdv2/src/fdmdv2_defines.h
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_defines.h
-// Purpose: Definitions used by plots derived from fdmdv2_plot class.
+//==========================================================================
+// Name: fdmdv2_defines.h
+// Purpose: Definitions used by plots derived from fdmdv2_plot class.
// Created: August 27, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License:
-//
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,13 +21,13 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
+//==========================================================================
#ifndef __FDMDV2_DEFINES__
#define __FDMDV2_DEFINES__
#include "wx/wx.h"
/* FFT points */
#define FDMDV_NSPEC 512
-
+
#define MIN_DB -40.0
#define MAX_DB 0.0
#define BETA 0.1 // constant for time averageing spectrum data
@@ -84,6 +84,6 @@ enum
ID_ROTATE_RIGHT,
ID_RESIZE,
ID_PAINT_BG
-};
+};
#endif //__FDMDV2_DEFINES__
diff --git a/fdmdv2/src/fdmdv2_hdw_ports.cpp b/fdmdv2/src/fdmdv2_hdw_ports.cpp
index 6f0d0d63..9c755591 100644
--- a/fdmdv2/src/fdmdv2_hdw_ports.cpp
+++ b/fdmdv2/src/fdmdv2_hdw_ports.cpp
@@ -1,10 +1,10 @@
-//==========================================================================
-// Name: fdmdv2_enum_ports.cpp
-// Purpose: Tools to enumerate hardware ports (other than audio).
+//==========================================================================
+// Name: fdmdv2_enum_ports.cpp
+// Purpose: Tools to enumerate hardware ports (other than audio).
// Created: Oct 2, 2012
-// Initial author: David Witten
-// License:
-//
+// Initial author: David Witten
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -20,91 +20,91 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
-#include "fdmdv2_hdw_ports.h"
-
-HdwPort::HdwPort()
-{
- m_device_type = -1;
-}
-
-//#include // This is a magic incantation which must be done!
-//WX_DEFINE_OBJARRAY(ArrayOfPorts);
-
-HdwPort::~HdwPort()
-{
-}
-
-void HdwPort::setType(int portType)
-{
- m_device_type = portType;
-}
-
-int HdwPort::getList()
-{
- int rv = 0;
-
- if(m_device_type != -1)
- {
- switch(m_device_type)
- {
- case PORT_TYPE_SERIAL:
- rv = getSerialPorts();
- break;
-
- case PORT_TYPE_USB:
- rv = getUSBPorts();
- break;
-
- case PORT_TYPE_VIRTUAL:
- rv = getVirtualPorts();
- break;
-
- case PORT_TYPE_PARALLEL:
- rv = getParallelPorts();
- break;
-
- case PORT_TYPE_IEEE1394:
- rv = getIEEE1394Ports();
- break;
-
- case PORT_TYPE_UNKNOWN:
- default:
- rv = 0;
- break;
- }
- }
- return rv;
-}
-
-int HdwPort::getSerialPorts()
-{
- int rv = 0;
- return rv;
-}
-
-int HdwPort::getUSBPorts()
-{
- int rv = 0;
- return rv;
-}
-
-int HdwPort::getVirtualPorts()
-{
- int rv = 0;
- return rv;
-}
-
-int HdwPort::getParallelPorts()
-{
- int rv = 0;
- return rv;
-}
-
-int HdwPort::getIEEE1394Ports()
-{
- int rv = 0;
- return rv;
-}
-
-
+//==========================================================================
+#include "fdmdv2_hdw_ports.h"
+
+HdwPort::HdwPort()
+{
+ m_device_type = -1;
+}
+
+//#include // This is a magic incantation which must be done!
+//WX_DEFINE_OBJARRAY(ArrayOfPorts);
+
+HdwPort::~HdwPort()
+{
+}
+
+void HdwPort::setType(int portType)
+{
+ m_device_type = portType;
+}
+
+int HdwPort::getList()
+{
+ int rv = 0;
+
+ if(m_device_type != -1)
+ {
+ switch(m_device_type)
+ {
+ case PORT_TYPE_SERIAL:
+ rv = getSerialPorts();
+ break;
+
+ case PORT_TYPE_USB:
+ rv = getUSBPorts();
+ break;
+
+ case PORT_TYPE_VIRTUAL:
+ rv = getVirtualPorts();
+ break;
+
+ case PORT_TYPE_PARALLEL:
+ rv = getParallelPorts();
+ break;
+
+ case PORT_TYPE_IEEE1394:
+ rv = getIEEE1394Ports();
+ break;
+
+ case PORT_TYPE_UNKNOWN:
+ default:
+ rv = 0;
+ break;
+ }
+ }
+ return rv;
+}
+
+int HdwPort::getSerialPorts()
+{
+ int rv = 0;
+ return rv;
+}
+
+int HdwPort::getUSBPorts()
+{
+ int rv = 0;
+ return rv;
+}
+
+int HdwPort::getVirtualPorts()
+{
+ int rv = 0;
+ return rv;
+}
+
+int HdwPort::getParallelPorts()
+{
+ int rv = 0;
+ return rv;
+}
+
+int HdwPort::getIEEE1394Ports()
+{
+ int rv = 0;
+ return rv;
+}
+
+
diff --git a/fdmdv2/src/fdmdv2_hdw_ports.h b/fdmdv2/src/fdmdv2_hdw_ports.h
index 7b79cdc8..b8255d20 100644
--- a/fdmdv2/src/fdmdv2_hdw_ports.h
+++ b/fdmdv2/src/fdmdv2_hdw_ports.h
@@ -1,10 +1,10 @@
-//==========================================================================
-// Name: fdmdv2_enum_ports.h
-// Purpose: Tools to enumerate hardware ports (other than audio).
+//==========================================================================
+// Name: fdmdv2_enum_ports.h
+// Purpose: Tools to enumerate hardware ports (other than audio).
// Created: Oct 2, 2012
-// Initial author: David Witten
-// License:
-//
+// Initial author: David Witten
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -20,82 +20,82 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
-#ifndef __FDMDV2_HDW_PORTS__
-#define __FDMDV2_HDW_PORTS__
-
-#include
-#include "wx/wx.h"
-#include
-#include "fdmdv2_main.h"
-
-enum
-{
- SER_PAR_NONE,
- SER_PAR_ODD,
- SER_PAR_EVEN,
- SER_PAR_MARK,
- SER_PAR_SPACE
-};
-
-enum
-{
- SER_FLOW_NONE,
- SER_FLOW_XONXOFF,
- SER_FLOW_RTSCTS,
- SER_FLOW_DSRDTR
-};
-
-enum
-{
- PORT_TYPE_SERIAL,
- PORT_TYPE_USB,
- PORT_TYPE_VIRTUAL,
- PORT_TYPE_PARALLEL,
- PORT_TYPE_IEEE1394,
- PORT_TYPE_UNKNOWN
-};
-
-enum
-{
- DEVICE_TYPE_SERIAL,
- DEVICE_TYPE_USB,
- DEVICE_TYPE_VIRTUAL,
- DEVICE_TYPE_PARALLEL,
- DEVICE_TYPE_BLUETOOTH,
- DEVICE_TYPE_NETWORK,
- DEVICE_TYPE_IEEE1394,
- DEVICE_TYPE_UNKNOWN
-};
-
-class HdwPort;
-
-WX_DECLARE_OBJARRAY(HdwPort, ArrayOfPorts);
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class PortList
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-class HdwPort
-{
- public:
- HdwPort();
- ~HdwPort();
-
- protected:
- wxString m_name;
-
- private:
- int m_device_type;
- int m_device_emulation;
-
- void setType(int portType);
- int getList();
- int getSerialPorts();
- int getUSBPorts();
- int getVirtualPorts();
- int getParallelPorts();
- int getIEEE1394Ports();
-};
-
+//==========================================================================
+#ifndef __FDMDV2_HDW_PORTS__
+#define __FDMDV2_HDW_PORTS__
+
+#include
+#include "wx/wx.h"
+#include
+#include "fdmdv2_main.h"
+
+enum
+{
+ SER_PAR_NONE,
+ SER_PAR_ODD,
+ SER_PAR_EVEN,
+ SER_PAR_MARK,
+ SER_PAR_SPACE
+};
+
+enum
+{
+ SER_FLOW_NONE,
+ SER_FLOW_XONXOFF,
+ SER_FLOW_RTSCTS,
+ SER_FLOW_DSRDTR
+};
+
+enum
+{
+ PORT_TYPE_SERIAL,
+ PORT_TYPE_USB,
+ PORT_TYPE_VIRTUAL,
+ PORT_TYPE_PARALLEL,
+ PORT_TYPE_IEEE1394,
+ PORT_TYPE_UNKNOWN
+};
+
+enum
+{
+ DEVICE_TYPE_SERIAL,
+ DEVICE_TYPE_USB,
+ DEVICE_TYPE_VIRTUAL,
+ DEVICE_TYPE_PARALLEL,
+ DEVICE_TYPE_BLUETOOTH,
+ DEVICE_TYPE_NETWORK,
+ DEVICE_TYPE_IEEE1394,
+ DEVICE_TYPE_UNKNOWN
+};
+
+class HdwPort;
+
+WX_DECLARE_OBJARRAY(HdwPort, ArrayOfPorts);
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class PortList
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+class HdwPort
+{
+ public:
+ HdwPort();
+ ~HdwPort();
+
+ protected:
+ wxString m_name;
+
+ private:
+ int m_device_type;
+ int m_device_emulation;
+
+ void setType(int portType);
+ int getList();
+ int getSerialPorts();
+ int getUSBPorts();
+ int getVirtualPorts();
+ int getParallelPorts();
+ int getIEEE1394Ports();
+};
+
-#endif // __FDMDV2_HDW_PORTS__
+#endif // __FDMDV2_HDW_PORTS__
diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp
index 98d7dcdc..69523019 100644
--- a/fdmdv2/src/fdmdv2_main.cpp
+++ b/fdmdv2/src/fdmdv2_main.cpp
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_main.cpp
-//
-// Purpose: Implements simple wxWidgets application with GUI.
+//==========================================================================
+// Name: fdmdv2_main.cpp
+//
+// Purpose: Implements simple wxWidgets application with GUI.
// Created: Apr. 9, 2012
-// Initial author: David Witten
-// License:
-//
+// Initial author: David Witten
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,977 +21,977 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
-#include "fdmdv2_main.h"
-
-#define wxUSE_FILEDLG 1
-#define wxUSE_LIBPNG 1
-#define wxUSE_LIBJPEG 1
-#define wxUSE_GIF 1
-#define wxUSE_PCX 1
-#define wxUSE_LIBTIFF 1
-
-// initialize the application
-IMPLEMENT_APP(MainApp);
-
-//-------------------------------------------------------------------------
-// OnInit()
-//-------------------------------------------------------------------------
-bool MainApp::OnInit()
-{
- if(!wxApp::OnInit())
- {
- return false;
- }
- SetVendorName(wxT("CODEC2-Project"));
- SetAppName(wxT("FDMDV2")); // not needed, it's the default value
-
- wxConfigBase *pConfig = wxConfigBase::Get();
- pConfig->SetRecordDefaults();
-
- m_rTopWindow = wxRect(0, 0, 0, 0);
+//==========================================================================
+#include "fdmdv2_main.h"
+
+#define wxUSE_FILEDLG 1
+#define wxUSE_LIBPNG 1
+#define wxUSE_LIBJPEG 1
+#define wxUSE_GIF 1
+#define wxUSE_PCX 1
+#define wxUSE_LIBTIFF 1
+
+// initialize the application
+IMPLEMENT_APP(MainApp);
+
+//-------------------------------------------------------------------------
+// OnInit()
+//-------------------------------------------------------------------------
+bool MainApp::OnInit()
+{
+ if(!wxApp::OnInit())
+ {
+ return false;
+ }
+ SetVendorName(wxT("CODEC2-Project"));
+ SetAppName(wxT("FDMDV2")); // not needed, it's the default value
+
+ wxConfigBase *pConfig = wxConfigBase::Get();
+ pConfig->SetRecordDefaults();
+
+ m_rTopWindow = wxRect(0, 0, 0, 0);
m_strRxInAudio.Empty();
m_strRxOutAudio.Empty();
m_textVoiceInput.Empty();
- m_textVoiceOutput.Empty();
- m_strSampleRate.Empty();
- m_strBitrate.Empty();
- // Create the main application window
- MainFrame *frame = new MainFrame(NULL);
- SetTopWindow(frame);
- // Should guarantee that the first plot tab defined is the one
- // displayed. But it doesn't when built from command line. Why?
- frame->m_auiNbookCtrl->ChangeSelection(0);
- frame->Layout();
- frame->Show();
- return true;
-}
-
-//-------------------------------------------------------------------------
-// OnExit()
-//-------------------------------------------------------------------------
-int MainApp::OnExit()
-{
- return 0;
-}
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class MainFrame(wxFrame* pa->ent) : TopFrame(parent)
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent)
-{
- /*
- // @class $(Name)
- // @author $(User)
- // @date $(Date)
- // @file $(CurrentFileName).$(CurrentFileExt)
- // @brief
- */
-// m_radioRunning = false;
- m_sound = NULL;
- m_zoom = 1.;
- m_SquelchActive = false;
- if(Pa_Initialize())
- {
- wxMessageBox(wxT("Port Audio failed to initialize"), wxT("Pa_Initialize"), wxOK);
- }
-
- tools->AppendSeparator();
- wxMenuItem* m_menuItemToolsConfigDelete;
- m_menuItemToolsConfigDelete = new wxMenuItem(tools, wxID_ANY, wxString(_("&Delete stored config")) , wxT("Delete config file/keys"), wxITEM_NORMAL);
- this->Connect(m_menuItemToolsConfigDelete->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnDeleteConfig));
-
- tools->Append(m_menuItemToolsConfigDelete);
-
- // Add Waterfall Plot window
- m_panelWaterfall = new PlotWaterfall((wxFrame*) m_auiNbookCtrl);
- m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Waterfall"), true, wxNullBitmap);
-
- // Add Spectrum Plot window
- m_panelSpectrum = new PlotSpectrum((wxFrame*) m_auiNbookCtrl);
- m_auiNbookCtrl->AddPage(m_panelSpectrum, _("Spectrum"), true, wxNullBitmap);
-
-// m_panelScatter = new PlotScatter((wxFrame*) m_auiNbookCtrl);
-// m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Scatter"), true, wxNullBitmap);
-
-// m_panelScalar = new PlotScalar((wxFrame*) m_auiNbookCtrl, 500, 500);
-// m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Scalar"), true, wxNullBitmap);
-
- // Add generic plot window
-// m_panelDefaultA = new PlotPanel((wxFrame*) m_auiNbookCtrl);
-// m_auiNbookCtrl->AddPage(m_panelDefaultA, _("Test A"), true, wxNullBitmap);
-
- wxConfigBase *pConfig = wxConfigBase::Get();
-
- // restore frame position and size
- int x = pConfig->Read(wxT("/MainFrame/top"), 50);
- int y = pConfig->Read(wxT("/MainFrame/left"), 50);
- int w = pConfig->Read(wxT("/MainFrame/width"), 650);
- int h = pConfig->Read(wxT("/MainFrame/height"), 400);
- Move(x, y);
- SetClientSize(w, h);
-
- wxGetApp().m_strRxInAudio = pConfig->Read(wxT("/Audio/RxIn"), wxT(""));
- wxGetApp().m_strRxOutAudio = pConfig->Read(wxT("/Audio/RxOut"), wxT(""));
- wxGetApp().m_textVoiceInput = pConfig->Read(wxT("/Audio/TxIn"), wxT(""));
- wxGetApp().m_textVoiceOutput = pConfig->Read(wxT("/Audio/TxOut"), wxT(""));
- wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000"));
-// wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000"));
-// wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000"));
-
- wxGetApp().m_strRigCtrlPort = pConfig->Read("/Rig/Port", wxT("\\\\.\\com1"));
- wxGetApp().m_strRigCtrlBaud = pConfig->Read("/Rig/Baud", wxT("9600"));
- wxGetApp().m_strRigCtrlDatabits = pConfig->Read("/Rig/DataBits", wxT("8"));
- wxGetApp().m_strRigCtrlStopbits = pConfig->Read("/Rig/StopBits", wxT("1"));
- wxGetApp().m_strRigCtrlParity = pConfig->Read("/Rig/Parity", wxT("n"));
-
- pConfig->SetPath(wxT("/"));
-
-// this->Connect(m_menuItemHelpUpdates->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnHelpCheckUpdatesUI));
- m_togRxID->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnRxIDUI), NULL, this);
- m_togTxID->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTxIDUI), NULL, this);
- m_togBtnOnOff->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnOnOffUI), NULL, this);
- m_togBtnSplit->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnSplitClickUI), NULL, this);
- m_togBtnAnalog->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnAnalogClickUI), NULL, this);
- m_togBtnALC->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnALCClickUI), NULL, this);
- m_btnTogTX->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTXClickUI), NULL, this);
-
- m_togBtnSplit->Disable();
- m_togRxID->Disable();
- m_togTxID->Disable();
- m_togBtnAnalog->Disable();
- m_togBtnALC->Disable();
- m_btnTogTX->Disable();
-
-#ifdef _USE_TIMER
- Bind(wxEVT_TIMER, &MainFrame::OnTimer, this); // ID_MY_WINDOW);
+ m_textVoiceOutput.Empty();
+ m_strSampleRate.Empty();
+ m_strBitrate.Empty();
+ // Create the main application window
+ MainFrame *frame = new MainFrame(NULL);
+ SetTopWindow(frame);
+ // Should guarantee that the first plot tab defined is the one
+ // displayed. But it doesn't when built from command line. Why?
+ frame->m_auiNbookCtrl->ChangeSelection(0);
+ frame->Layout();
+ frame->Show();
+ return true;
+}
+
+//-------------------------------------------------------------------------
+// OnExit()
+//-------------------------------------------------------------------------
+int MainApp::OnExit()
+{
+ return 0;
+}
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class MainFrame(wxFrame* pa->ent) : TopFrame(parent)
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent)
+{
+ /*
+ // @class $(Name)
+ // @author $(User)
+ // @date $(Date)
+ // @file $(CurrentFileName).$(CurrentFileExt)
+ // @brief
+ */
+// m_radioRunning = false;
+ m_sound = NULL;
+ m_zoom = 1.;
+ m_SquelchActive = false;
+ if(Pa_Initialize())
+ {
+ wxMessageBox(wxT("Port Audio failed to initialize"), wxT("Pa_Initialize"), wxOK);
+ }
+
+ tools->AppendSeparator();
+ wxMenuItem* m_menuItemToolsConfigDelete;
+ m_menuItemToolsConfigDelete = new wxMenuItem(tools, wxID_ANY, wxString(_("&Delete stored config")) , wxT("Delete config file/keys"), wxITEM_NORMAL);
+ this->Connect(m_menuItemToolsConfigDelete->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnDeleteConfig));
+
+ tools->Append(m_menuItemToolsConfigDelete);
+
+ // Add Waterfall Plot window
+ m_panelWaterfall = new PlotWaterfall((wxFrame*) m_auiNbookCtrl);
+ m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Waterfall"), true, wxNullBitmap);
+
+ // Add Spectrum Plot window
+ m_panelSpectrum = new PlotSpectrum((wxFrame*) m_auiNbookCtrl);
+ m_auiNbookCtrl->AddPage(m_panelSpectrum, _("Spectrum"), true, wxNullBitmap);
+
+// m_panelScatter = new PlotScatter((wxFrame*) m_auiNbookCtrl);
+// m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Scatter"), true, wxNullBitmap);
+
+// m_panelScalar = new PlotScalar((wxFrame*) m_auiNbookCtrl, 500, 500);
+// m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Scalar"), true, wxNullBitmap);
+
+ // Add generic plot window
+// m_panelDefaultA = new PlotPanel((wxFrame*) m_auiNbookCtrl);
+// m_auiNbookCtrl->AddPage(m_panelDefaultA, _("Test A"), true, wxNullBitmap);
+
+ wxConfigBase *pConfig = wxConfigBase::Get();
+
+ // restore frame position and size
+ int x = pConfig->Read(wxT("/MainFrame/top"), 50);
+ int y = pConfig->Read(wxT("/MainFrame/left"), 50);
+ int w = pConfig->Read(wxT("/MainFrame/width"), 650);
+ int h = pConfig->Read(wxT("/MainFrame/height"), 400);
+ Move(x, y);
+ SetClientSize(w, h);
+
+ wxGetApp().m_strRxInAudio = pConfig->Read(wxT("/Audio/RxIn"), wxT(""));
+ wxGetApp().m_strRxOutAudio = pConfig->Read(wxT("/Audio/RxOut"), wxT(""));
+ wxGetApp().m_textVoiceInput = pConfig->Read(wxT("/Audio/TxIn"), wxT(""));
+ wxGetApp().m_textVoiceOutput = pConfig->Read(wxT("/Audio/TxOut"), wxT(""));
+ wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000"));
+// wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000"));
+// wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000"));
+
+ wxGetApp().m_strRigCtrlPort = pConfig->Read("/Rig/Port", wxT("\\\\.\\com1"));
+ wxGetApp().m_strRigCtrlBaud = pConfig->Read("/Rig/Baud", wxT("9600"));
+ wxGetApp().m_strRigCtrlDatabits = pConfig->Read("/Rig/DataBits", wxT("8"));
+ wxGetApp().m_strRigCtrlStopbits = pConfig->Read("/Rig/StopBits", wxT("1"));
+ wxGetApp().m_strRigCtrlParity = pConfig->Read("/Rig/Parity", wxT("n"));
+
+ pConfig->SetPath(wxT("/"));
+
+// this->Connect(m_menuItemHelpUpdates->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnHelpCheckUpdatesUI));
+ m_togRxID->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnRxIDUI), NULL, this);
+ m_togTxID->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTxIDUI), NULL, this);
+ m_togBtnOnOff->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnOnOffUI), NULL, this);
+ m_togBtnSplit->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnSplitClickUI), NULL, this);
+ m_togBtnAnalog->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnAnalogClickUI), NULL, this);
+ m_togBtnALC->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnALCClickUI), NULL, this);
+ m_btnTogTX->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTXClickUI), NULL, this);
+
+ m_togBtnSplit->Disable();
+ m_togRxID->Disable();
+ m_togTxID->Disable();
+ m_togBtnAnalog->Disable();
+ m_togBtnALC->Disable();
+ m_btnTogTX->Disable();
+
+#ifdef _USE_TIMER
+ Bind(wxEVT_TIMER, &MainFrame::OnTimer, this); // ID_MY_WINDOW);
m_plotTimer.SetOwner(this, ID_TIMER_WATERFALL);
-// m_rxPa = new PortAudioWrap();
-// m_plotTimer.Start(500, wxTIMER_CONTINUOUS);
-// m_panelWaterfall->m_newdata = true;
- m_panelWaterfall->Refresh();
-#else
- Connect(wxEVT_IDLE, wxIdleEventHandler(MainFrame::OnIdle), NULL, this);
-#endif //_USE_TIMER
-}
-
-//-------------------------------------------------------------------------
-// ~MainFrame()
-//-------------------------------------------------------------------------
-MainFrame::~MainFrame()
-{
- int x;
- int y;
- int w;
- int h;
-
- wxConfigBase *pConfig = wxConfigBase::Get();
- if(pConfig)
- {
- GetClientSize(&w, &h);
- GetPosition(&x, &y);
- pConfig->Write(wxT("/MainFrame/top"), (long) x);
- pConfig->Write(wxT("/MainFrame/left"), (long) y);
- pConfig->Write(wxT("/MainFrame/width"), (long) w);
- pConfig->Write(wxT("/MainFrame/height"), (long) h);
-
- pConfig->Write(wxT("/Audio/RxIn"), wxGetApp().m_strRxInAudio);
- pConfig->Write(wxT("/Audio/RxOut"), wxGetApp().m_strRxOutAudio);
- pConfig->Write(wxT("/Audio/TxIn"), wxGetApp().m_textVoiceInput);
- pConfig->Write(wxT("/Audio/TxOut"), wxGetApp().m_textVoiceOutput);
- pConfig->Write(wxT("/Audio/SampleRate"), wxGetApp().m_strSampleRate);
-
- pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort);
- pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud);
- pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits);
- pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits);
- pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity);
- }
- m_togRxID->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnRxIDUI), NULL, this);
- m_togTxID->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTxIDUI), NULL, this);
- m_togBtnOnOff->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnOnOffUI), NULL, this);
- m_togBtnSplit->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnSplitClickUI), NULL, this);
- m_togBtnAnalog->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnAnalogClickUI), NULL, this);
- m_togBtnALC->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnALCClickUI), NULL, this);
- m_btnTogTX->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTXClickUI), NULL, this);
-
-#ifdef _USE_TIMER
- if(m_plotTimer.IsRunning())
- {
- m_plotTimer.Stop();
- Unbind(wxEVT_TIMER, &MainFrame::OnTimer, this);
+// m_rxPa = new PortAudioWrap();
+// m_plotTimer.Start(500, wxTIMER_CONTINUOUS);
+// m_panelWaterfall->m_newdata = true;
+ m_panelWaterfall->Refresh();
+#else
+ Connect(wxEVT_IDLE, wxIdleEventHandler(MainFrame::OnIdle), NULL, this);
+#endif //_USE_TIMER
+}
+
+//-------------------------------------------------------------------------
+// ~MainFrame()
+//-------------------------------------------------------------------------
+MainFrame::~MainFrame()
+{
+ int x;
+ int y;
+ int w;
+ int h;
+
+ wxConfigBase *pConfig = wxConfigBase::Get();
+ if(pConfig)
+ {
+ GetClientSize(&w, &h);
+ GetPosition(&x, &y);
+ pConfig->Write(wxT("/MainFrame/top"), (long) x);
+ pConfig->Write(wxT("/MainFrame/left"), (long) y);
+ pConfig->Write(wxT("/MainFrame/width"), (long) w);
+ pConfig->Write(wxT("/MainFrame/height"), (long) h);
+
+ pConfig->Write(wxT("/Audio/RxIn"), wxGetApp().m_strRxInAudio);
+ pConfig->Write(wxT("/Audio/RxOut"), wxGetApp().m_strRxOutAudio);
+ pConfig->Write(wxT("/Audio/TxIn"), wxGetApp().m_textVoiceInput);
+ pConfig->Write(wxT("/Audio/TxOut"), wxGetApp().m_textVoiceOutput);
+ pConfig->Write(wxT("/Audio/SampleRate"), wxGetApp().m_strSampleRate);
+
+ pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort);
+ pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud);
+ pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits);
+ pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits);
+ pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity);
+ }
+ m_togRxID->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnRxIDUI), NULL, this);
+ m_togTxID->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTxIDUI), NULL, this);
+ m_togBtnOnOff->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnOnOffUI), NULL, this);
+ m_togBtnSplit->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnSplitClickUI), NULL, this);
+ m_togBtnAnalog->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnAnalogClickUI), NULL, this);
+ m_togBtnALC->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnALCClickUI), NULL, this);
+ m_btnTogTX->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTXClickUI), NULL, this);
+
+#ifdef _USE_TIMER
+ if(m_plotTimer.IsRunning())
+ {
+ m_plotTimer.Stop();
+ Unbind(wxEVT_TIMER, &MainFrame::OnTimer, this);
+ }
+#else
+ Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainFrame::OnIdle), NULL, this);
+#endif //_USE_TIMER
+
+ delete wxConfigBase::Set((wxConfigBase *) NULL);
+}
+
+#ifdef _USE_TIMER
+
+//----------------------------------------------------------------
+// OnTimer()
+//----------------------------------------------------------------
+void MainFrame::OnTimer(wxTimerEvent &evt)
+{
+ m_panelWaterfall->m_newdata = true;
+ m_panelWaterfall->Refresh();
+ m_panelSpectrum->m_newdata = true;
+ m_panelSpectrum->Refresh();
+// m_panelDefaultA->m_newdata = true;
+// m_panelDefaultA->Refresh();
+}
+
+#else
+
+//----------------------------------------------------------------
+// OnIdle()
+//----------------------------------------------------------------
+void MainFrame::OnIdle(wxIdleEvent& event)
+{
+ if(m_panelWaterfall->m_newdata)
+ {
+ m_panelWaterfall->Refresh();
+ }
+ if(m_panelSpectrum->m_newdata)
+ {
+ m_panelSpectrum->Refresh();
+ }
+}
+
+#endif // _USE_TIMER
+
+//-------------------------------------------------------------------------
+// OnCloseFrame()
+//-------------------------------------------------------------------------
+void MainFrame::OnCloseFrame(wxCloseEvent& event)
+{
+ Pa_Terminate();
+ Destroy();
+}
+
+//-------------------------------------------------------------------------
+// OnExitClick()
+//-------------------------------------------------------------------------
+void MainFrame::OnExitClick(wxCommandEvent& event)
+{
+ Pa_Terminate();
+ Destroy();
+}
+
+//-------------------------------------------------------------------------
+// OnDeleteConfig()
+//-------------------------------------------------------------------------
+void MainFrame::OnDeleteConfig(wxCommandEvent&)
+{
+ wxConfigBase *pConfig = wxConfigBase::Get();
+ if(pConfig->DeleteAll())
+ {
+ wxLogMessage(wxT("Config file/registry key successfully deleted."));
+
+ delete wxConfigBase::Set(NULL);
+ wxConfigBase::DontCreateOnDemand();
+ }
+ else
+ {
+ wxLogError(wxT("Deleting config file/registry key failed."));
+ }
+}
+
+//-------------------------------------------------------------------------
+// Paint()
+//-------------------------------------------------------------------------
+void MainFrame::OnPaint(wxPaintEvent& WXUNUSED(event))
+{
+ wxPaintDC dc(this);
+
+ if(GetMenuBar()->IsChecked(ID_PAINT_BG))
+ {
+ dc.Clear();
}
-#else
- Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainFrame::OnIdle), NULL, this);
-#endif //_USE_TIMER
-
- delete wxConfigBase::Set((wxConfigBase *) NULL);
-}
-
-#ifdef _USE_TIMER
-
-//----------------------------------------------------------------
-// OnTimer()
-//----------------------------------------------------------------
-void MainFrame::OnTimer(wxTimerEvent &evt)
-{
- m_panelWaterfall->m_newdata = true;
- m_panelWaterfall->Refresh();
- m_panelSpectrum->m_newdata = true;
- m_panelSpectrum->Refresh();
-// m_panelDefaultA->m_newdata = true;
-// m_panelDefaultA->Refresh();
-}
-
-#else
-
-//----------------------------------------------------------------
-// OnIdle()
-//----------------------------------------------------------------
-void MainFrame::OnIdle(wxIdleEvent& event)
-{
- if(m_panelWaterfall->m_newdata)
- {
- m_panelWaterfall->Refresh();
- }
- if(m_panelSpectrum->m_newdata)
- {
- m_panelSpectrum->Refresh();
- }
-}
-
-#endif // _USE_TIMER
-
-//-------------------------------------------------------------------------
-// OnCloseFrame()
-//-------------------------------------------------------------------------
-void MainFrame::OnCloseFrame(wxCloseEvent& event)
-{
- Pa_Terminate();
- Destroy();
-}
-
-//-------------------------------------------------------------------------
-// OnExitClick()
-//-------------------------------------------------------------------------
-void MainFrame::OnExitClick(wxCommandEvent& event)
-{
- Pa_Terminate();
- Destroy();
-}
-
-//-------------------------------------------------------------------------
-// OnDeleteConfig()
-//-------------------------------------------------------------------------
-void MainFrame::OnDeleteConfig(wxCommandEvent&)
-{
- wxConfigBase *pConfig = wxConfigBase::Get();
- if(pConfig->DeleteAll())
- {
- wxLogMessage(wxT("Config file/registry key successfully deleted."));
-
- delete wxConfigBase::Set(NULL);
- wxConfigBase::DontCreateOnDemand();
- }
- else
- {
- wxLogError(wxT("Deleting config file/registry key failed."));
- }
-}
-
-//-------------------------------------------------------------------------
-// Paint()
-//-------------------------------------------------------------------------
-void MainFrame::OnPaint(wxPaintEvent& WXUNUSED(event))
-{
- wxPaintDC dc(this);
-
- if(GetMenuBar()->IsChecked(ID_PAINT_BG))
- {
- dc.Clear();
- }
- dc.SetUserScale(m_zoom, m_zoom);
-}
-
-//-------------------------------------------------------------------------
-// OnCmdSliderScroll()
-//-------------------------------------------------------------------------
-void MainFrame::OnCmdSliderScroll(wxScrollEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnCmdSliderScrollChanged()
-//-------------------------------------------------------------------------
-void MainFrame::OnCmdSliderScrollChanged(wxScrollEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnSliderScrollTop()
-//-------------------------------------------------------------------------
-void MainFrame::OnSliderScrollTop(wxScrollEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnSliderScrollBottom()
-//-------------------------------------------------------------------------
-void MainFrame::OnSliderScrollBottom(wxScrollEvent& event)
-{
-// wxMessageBox(wxT("Got Click!"), wxT("OnSliderScrollBottom"), wxOK);
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnCheckSQClick()
-//-------------------------------------------------------------------------
-void MainFrame::OnCheckSQClick(wxCommandEvent& event)
-{
- if(!m_SquelchActive)
- {
- m_SquelchActive = true;
- }
- else
- {
- m_SquelchActive = false;
- }
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnTXClick()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnTXClick(wxCommandEvent& event)
-{
- m_soundFile = wxT("./hts1a.wav");
- m_sound = new wxSound(m_soundFile, false);
- m_sound->Play();
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnRxID()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnRxID(wxCommandEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnTxID()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnTxID(wxCommandEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnSplitClick()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnSplitClick(wxCommandEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnAnalogClick()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnAnalogClick (wxCommandEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnALCClick()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnALCClick(wxCommandEvent& event)
-{
-// wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnALCClick"), wxOK);
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnSplitClickUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnSplitClickUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-// event.Enable(false);
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnAnalogClickUI()
-//-------------------------------------------------------------------------
+ dc.SetUserScale(m_zoom, m_zoom);
+}
+
+//-------------------------------------------------------------------------
+// OnCmdSliderScroll()
+//-------------------------------------------------------------------------
+void MainFrame::OnCmdSliderScroll(wxScrollEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnCmdSliderScrollChanged()
+//-------------------------------------------------------------------------
+void MainFrame::OnCmdSliderScrollChanged(wxScrollEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnSliderScrollTop()
+//-------------------------------------------------------------------------
+void MainFrame::OnSliderScrollTop(wxScrollEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnSliderScrollBottom()
+//-------------------------------------------------------------------------
+void MainFrame::OnSliderScrollBottom(wxScrollEvent& event)
+{
+// wxMessageBox(wxT("Got Click!"), wxT("OnSliderScrollBottom"), wxOK);
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnCheckSQClick()
+//-------------------------------------------------------------------------
+void MainFrame::OnCheckSQClick(wxCommandEvent& event)
+{
+ if(!m_SquelchActive)
+ {
+ m_SquelchActive = true;
+ }
+ else
+ {
+ m_SquelchActive = false;
+ }
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnTXClick()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnTXClick(wxCommandEvent& event)
+{
+ m_soundFile = wxT("./hts1a.wav");
+ m_sound = new wxSound(m_soundFile, false);
+ m_sound->Play();
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnRxID()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnRxID(wxCommandEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnTxID()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnTxID(wxCommandEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnSplitClick()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnSplitClick(wxCommandEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnAnalogClick()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnAnalogClick (wxCommandEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnALCClick()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnALCClick(wxCommandEvent& event)
+{
+// wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnALCClick"), wxOK);
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnSplitClickUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnSplitClickUI(wxUpdateUIEvent& event)
+{
+ wxUnusedVar(event);
+// event.Enable(false);
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnAnalogClickUI()
+//-------------------------------------------------------------------------
void MainFrame::OnTogBtnAnalogClickUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnALCClickUI()
-//-------------------------------------------------------------------------
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnALCClickUI()
+//-------------------------------------------------------------------------
void MainFrame::OnTogBtnALCClickUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnRxIDUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnRxIDUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnTxIDUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnTxIDUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnTXClickUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnTXClickUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnOpenUpdateUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnOpenUpdateUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnSaveUpdateUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnSaveUpdateUI(wxUpdateUIEvent& event)
-{
-// wxUnusedVar(event);
- event.Enable(false);
-}
-
-//-------------------------------------------------------------------------
-// OnClose()
-//-------------------------------------------------------------------------
-void MainFrame::OnClose(wxCommandEvent& event)
-{
- wxUnusedVar(event);
-
- if(m_RxRunning)
- {
- stopRxStream();
- }
- if(m_TxRunning)
- {
- stopTxStream();
- }
-
- if(m_sound != NULL)
- {
- if(m_sound->IsOk())
- {
- m_sound->Stop();
- m_sound = NULL;
- }
- }
- Close();
-}
-
-//-------------------------------------------------------------------------
-// OnCloseUpdateUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnCloseUpdateUI(wxUpdateUIEvent& event)
-{
- event.Enable(false);
-}
-
-//-------------------------------------------------------------------------
-// OnExit()
-//-------------------------------------------------------------------------
-void MainFrame::OnExit(wxCommandEvent& event)
-{
- OnClose(event);
-}
-
-//-------------------------------------------------------------------------
-// OnCopy()
-//-------------------------------------------------------------------------
-void MainFrame::OnCopy(wxCommandEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnCopyUpdateUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnCopyUpdateUI(wxUpdateUIEvent& event)
-{
- event.Enable(false);
-}
-
-//-------------------------------------------------------------------------
-// OnCut()
-//-------------------------------------------------------------------------
-void MainFrame::OnCut(wxCommandEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnCutUpdateUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnCutUpdateUI(wxUpdateUIEvent& event)
-{
-// wxUnusedVar(event);
- event.Enable(false);
-}
-
-//-------------------------------------------------------------------------
-// OnPaste()
-//-------------------------------------------------------------------------
-void MainFrame::OnPaste(wxCommandEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnPasteUpdateUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnPasteUpdateUI(wxUpdateUIEvent& event)
-{
- event.Enable(false);
-}
-
-//-------------------------------------------------------------------------
-// OnCaptureRxStream()
-//-------------------------------------------------------------------------
-void MainFrame::OnCaptureRxStream(wxCommandEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnCaptureTxStream()
-//-------------------------------------------------------------------------
-void MainFrame::OnCaptureTxStream(wxCommandEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnPlayAudioFile()
-//-------------------------------------------------------------------------
-void MainFrame::OnPlayAudioFile(wxCommandEvent& event)
-{
- wxUnusedVar(event);
- if(m_sound != NULL)
- {
- if (wxMessageBox(wxT("Current content has not been saved! Proceed?"),wxT("Please confirm"), wxICON_QUESTION | wxYES_NO, this) == wxNO)
- {
- return;
- }
- }
- wxFileDialog openFileDialog(this,
- wxT("Open Sound file"),
- wxEmptyString,
- wxEmptyString,
- wxT("WAV files (*.wav)|*.wav|")
- wxT("RAW files (*.raw)|*.raw|")
- wxT("SPEEX files (*.spx)|*.spx|")
- wxT("FLAC files (*.flc)|*.flc|")
- wxT("All files (*.*)|*.*|"),
- wxFD_OPEN | wxFD_FILE_MUST_EXIST);
- if (openFileDialog.ShowModal() == wxID_CANCEL)
- {
- return; // the user changed their mind...
- }
- // proceed loading the file chosen by the user;
- m_sound->Play(openFileDialog.GetPath());
-}
-
-//-------------------------------------------------------------------------
-// OnToolsAudio()
-//-------------------------------------------------------------------------
-void MainFrame::OnToolsAudio(wxCommandEvent& event)
-{
- wxUnusedVar(event);
- int rv = 0;
- AudioDlg *dlg = new AudioDlg(NULL);
- rv = dlg->ShowModal();
- if(rv == wxID_OK)
- {
- dlg->ExchangeData(EXCHANGE_DATA_OUT);
- }
- delete dlg;
-}
-
-//-------------------------------------------------------------------------
-// OnToolsAudioUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnToolsAudioUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnToolsComCfg()
-//-------------------------------------------------------------------------
-void MainFrame::OnToolsComCfg(wxCommandEvent& event)
-{
- wxUnusedVar(event);
- int rv = 0;
- ComPortsDlg *dlg = new ComPortsDlg(NULL);
- rv = dlg->ShowModal();
- if(rv == wxID_OK)
- {
- dlg->ExchangeData(EXCHANGE_DATA_OUT);
- }
- delete dlg;
-}
-
-//-------------------------------------------------------------------------
-// OnToolsComCfgUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnToolsComCfgUI(wxUpdateUIEvent& event)
-{
- event.Enable((!m_TxRunning) && (!m_RxRunning));
-}
-
-//-------------------------------------------------------------------------
-// OnToolsOptions()
-//-------------------------------------------------------------------------
-void MainFrame::OnToolsOptions(wxCommandEvent& event)
-{
- wxUnusedVar(event);
- int rv = 0;
- OptionsDlg *dlg = new OptionsDlg(NULL);
- rv = dlg->ShowModal();
- if(rv == wxID_OK)
- {
- dlg->ExchangeData(EXCHANGE_DATA_OUT);
- }
- delete dlg;
-}
-
-//-------------------------------------------------------------------------
-// OnToolsOptionsUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnToolsOptionsUI(wxUpdateUIEvent& event)
-{
-// wxUnusedVar(event);
- event.Enable(false);
-}
-
-//-------------------------------------------------------------------------
-// OnHelpCheckUpdates()
-//-------------------------------------------------------------------------
-void MainFrame::OnHelpCheckUpdates(wxCommandEvent& event)
-{
- wxMessageBox("Got Click!", "OnHelpCheckUpdates", wxOK);
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnHelpCheckUpdatesUI()
-//-------------------------------------------------------------------------
-void MainFrame::OnHelpCheckUpdatesUI(wxUpdateUIEvent& event)
-{
- event.Enable(false);
-}
-
-//-------------------------------------------------------------------------
-//OnHelpAbout()
-//-------------------------------------------------------------------------
-void MainFrame::OnHelpAbout(wxCommandEvent& event)
-{
- wxUnusedVar(event);
-// int rv = 0;
-// AboutDlg *dlg = new AboutDlg(NULL);
-// rv = dlg->ShowModal();
-// if(rv == wxID_OK)
-// {
-// dlg->ExchangeData(EXCHANGE_DATA_OUT);
-// }
-// delete dlg;
-}
-
-//-------------------------------------------------------------------------
-// LoadUserImage()
-//-------------------------------------------------------------------------
-wxString MainFrame::LoadUserImage(wxImage& image)
-{
- wxString filename;
-
- filename = wxLoadFileSelector(wxT("image"), wxEmptyString);
- if(!filename.empty())
- {
- if(!image.LoadFile(filename))
- {
- wxLogError(wxT("Couldn't load image from '%s'."), filename.c_str());
- return wxEmptyString;
- }
- }
- return filename;
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnOnOffUI()
-//-------------------------------------------------------------------------
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnRxIDUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnRxIDUI(wxUpdateUIEvent& event)
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnTxIDUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnTxIDUI(wxUpdateUIEvent& event)
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnTXClickUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnTXClickUI(wxUpdateUIEvent& event)
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnOpenUpdateUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnOpenUpdateUI(wxUpdateUIEvent& event)
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnSaveUpdateUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnSaveUpdateUI(wxUpdateUIEvent& event)
+{
+// wxUnusedVar(event);
+ event.Enable(false);
+}
+
+//-------------------------------------------------------------------------
+// OnClose()
+//-------------------------------------------------------------------------
+void MainFrame::OnClose(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+
+ if(m_RxRunning)
+ {
+ stopRxStream();
+ }
+ if(m_TxRunning)
+ {
+ stopTxStream();
+ }
+
+ if(m_sound != NULL)
+ {
+ if(m_sound->IsOk())
+ {
+ m_sound->Stop();
+ m_sound = NULL;
+ }
+ }
+ Close();
+}
+
+//-------------------------------------------------------------------------
+// OnCloseUpdateUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnCloseUpdateUI(wxUpdateUIEvent& event)
+{
+ event.Enable(false);
+}
+
+//-------------------------------------------------------------------------
+// OnExit()
+//-------------------------------------------------------------------------
+void MainFrame::OnExit(wxCommandEvent& event)
+{
+ OnClose(event);
+}
+
+//-------------------------------------------------------------------------
+// OnCopy()
+//-------------------------------------------------------------------------
+void MainFrame::OnCopy(wxCommandEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnCopyUpdateUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnCopyUpdateUI(wxUpdateUIEvent& event)
+{
+ event.Enable(false);
+}
+
+//-------------------------------------------------------------------------
+// OnCut()
+//-------------------------------------------------------------------------
+void MainFrame::OnCut(wxCommandEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnCutUpdateUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnCutUpdateUI(wxUpdateUIEvent& event)
+{
+// wxUnusedVar(event);
+ event.Enable(false);
+}
+
+//-------------------------------------------------------------------------
+// OnPaste()
+//-------------------------------------------------------------------------
+void MainFrame::OnPaste(wxCommandEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnPasteUpdateUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnPasteUpdateUI(wxUpdateUIEvent& event)
+{
+ event.Enable(false);
+}
+
+//-------------------------------------------------------------------------
+// OnCaptureRxStream()
+//-------------------------------------------------------------------------
+void MainFrame::OnCaptureRxStream(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnCaptureTxStream()
+//-------------------------------------------------------------------------
+void MainFrame::OnCaptureTxStream(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnPlayAudioFile()
+//-------------------------------------------------------------------------
+void MainFrame::OnPlayAudioFile(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+ if(m_sound != NULL)
+ {
+ if (wxMessageBox(wxT("Current content has not been saved! Proceed?"),wxT("Please confirm"), wxICON_QUESTION | wxYES_NO, this) == wxNO)
+ {
+ return;
+ }
+ }
+ wxFileDialog openFileDialog(this,
+ wxT("Open Sound file"),
+ wxEmptyString,
+ wxEmptyString,
+ wxT("WAV files (*.wav)|*.wav|")
+ wxT("RAW files (*.raw)|*.raw|")
+ wxT("SPEEX files (*.spx)|*.spx|")
+ wxT("FLAC files (*.flc)|*.flc|")
+ wxT("All files (*.*)|*.*|"),
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST);
+ if (openFileDialog.ShowModal() == wxID_CANCEL)
+ {
+ return; // the user changed their mind...
+ }
+ // proceed loading the file chosen by the user;
+ m_sound->Play(openFileDialog.GetPath());
+}
+
+//-------------------------------------------------------------------------
+// OnToolsAudio()
+//-------------------------------------------------------------------------
+void MainFrame::OnToolsAudio(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+ int rv = 0;
+ AudioDlg *dlg = new AudioDlg(NULL);
+ rv = dlg->ShowModal();
+ if(rv == wxID_OK)
+ {
+ dlg->ExchangeData(EXCHANGE_DATA_OUT);
+ }
+ delete dlg;
+}
+
+//-------------------------------------------------------------------------
+// OnToolsAudioUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnToolsAudioUI(wxUpdateUIEvent& event)
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnToolsComCfg()
+//-------------------------------------------------------------------------
+void MainFrame::OnToolsComCfg(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+ int rv = 0;
+ ComPortsDlg *dlg = new ComPortsDlg(NULL);
+ rv = dlg->ShowModal();
+ if(rv == wxID_OK)
+ {
+ dlg->ExchangeData(EXCHANGE_DATA_OUT);
+ }
+ delete dlg;
+}
+
+//-------------------------------------------------------------------------
+// OnToolsComCfgUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnToolsComCfgUI(wxUpdateUIEvent& event)
+{
+ event.Enable((!m_TxRunning) && (!m_RxRunning));
+}
+
+//-------------------------------------------------------------------------
+// OnToolsOptions()
+//-------------------------------------------------------------------------
+void MainFrame::OnToolsOptions(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+ int rv = 0;
+ OptionsDlg *dlg = new OptionsDlg(NULL);
+ rv = dlg->ShowModal();
+ if(rv == wxID_OK)
+ {
+ dlg->ExchangeData(EXCHANGE_DATA_OUT);
+ }
+ delete dlg;
+}
+
+//-------------------------------------------------------------------------
+// OnToolsOptionsUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnToolsOptionsUI(wxUpdateUIEvent& event)
+{
+// wxUnusedVar(event);
+ event.Enable(false);
+}
+
+//-------------------------------------------------------------------------
+// OnHelpCheckUpdates()
+//-------------------------------------------------------------------------
+void MainFrame::OnHelpCheckUpdates(wxCommandEvent& event)
+{
+ wxMessageBox("Got Click!", "OnHelpCheckUpdates", wxOK);
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnHelpCheckUpdatesUI()
+//-------------------------------------------------------------------------
+void MainFrame::OnHelpCheckUpdatesUI(wxUpdateUIEvent& event)
+{
+ event.Enable(false);
+}
+
+//-------------------------------------------------------------------------
+//OnHelpAbout()
+//-------------------------------------------------------------------------
+void MainFrame::OnHelpAbout(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+// int rv = 0;
+// AboutDlg *dlg = new AboutDlg(NULL);
+// rv = dlg->ShowModal();
+// if(rv == wxID_OK)
+// {
+// dlg->ExchangeData(EXCHANGE_DATA_OUT);
+// }
+// delete dlg;
+}
+
+//-------------------------------------------------------------------------
+// LoadUserImage()
+//-------------------------------------------------------------------------
+wxString MainFrame::LoadUserImage(wxImage& image)
+{
+ wxString filename;
+
+ filename = wxLoadFileSelector(wxT("image"), wxEmptyString);
+ if(!filename.empty())
+ {
+ if(!image.LoadFile(filename))
+ {
+ wxLogError(wxT("Couldn't load image from '%s'."), filename.c_str());
+ return wxEmptyString;
+ }
+ }
+ return filename;
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnOnOffUI()
+//-------------------------------------------------------------------------
void MainFrame::OnTogBtnOnOffUI(wxUpdateUIEvent& event)
-{
- wxUnusedVar(event);
-}
-
-//-------------------------------------------------------------------------
-// OnTogBtnOnOff()
-//-------------------------------------------------------------------------
-void MainFrame::OnTogBtnOnOff(wxCommandEvent& event)
-{
- if((!m_TxRunning) || (!m_RxRunning))
- {
- m_togBtnSplit->Enable();
- m_togRxID->Enable();
- m_togTxID->Enable();
- m_togBtnAnalog->Enable();
- m_togBtnALC->Enable();
- m_btnTogTX->Enable();
-
-#ifdef _USE_TIMER
- m_plotTimer.Start(500, wxTIMER_CONTINUOUS);
-#endif // _USE_TIMER
- startRxStream();
-// startTxStream();
- m_togBtnOnOff->SetLabel(wxT("Stop"));
- }
- else
- {
- m_togBtnSplit->Disable();
- m_togRxID->Disable();
- m_togTxID->Disable();
- m_togBtnAnalog->Disable();
- m_togBtnALC->Disable();
- m_btnTogTX->Disable();
-#ifdef _USE_TIMER
- m_plotTimer.Stop();
-#endif // _USE_TIMER
- stopRxStream();
-// stopTxStream();
- m_togBtnOnOff->SetLabel(wxT("Start"));
- }
-}
-
-//----------------------------------------------------------
-// Audio stream processing loop states (globals).
-//----------------------------------------------------------
-/*
-float Ts = 0.0;
-short input_buf[2*FDMDV_NOM_SAMPLES_PER_FRAME];
-short *output_buf;
-int n_input_buf = 0;
-int nin = FDMDV_NOM_SAMPLES_PER_FRAME;
-int n_output_buf = 0;
-int codec_bits[2*FDMDV_BITS_PER_FRAME];
-int state = 0;
-*/
-
-int g_nRxIn = FDMDV_NOM_SAMPLES_PER_FRAME;
-float g_Ts = 0.0;
-
-short g_RxInBuf[2 * FDMDV_NOM_SAMPLES_PER_FRAME];
-short *g_pRxOutBuf;
-int g_nInputBuf = 0;
-
-short g_TxInBuf[2 * FDMDV_NOM_SAMPLES_PER_FRAME];
-short *g_pTxOutBuf;
-int g_nOutputBuf = 0;
-
-
-int g_CodecBits[2 * FDMDV_BITS_PER_FRAME];
-int g_State = 0;
-
+{
+ wxUnusedVar(event);
+}
+
+//-------------------------------------------------------------------------
+// OnTogBtnOnOff()
+//-------------------------------------------------------------------------
+void MainFrame::OnTogBtnOnOff(wxCommandEvent& event)
+{
+ if((!m_TxRunning) || (!m_RxRunning))
+ {
+ m_togBtnSplit->Enable();
+ m_togRxID->Enable();
+ m_togTxID->Enable();
+ m_togBtnAnalog->Enable();
+ m_togBtnALC->Enable();
+ m_btnTogTX->Enable();
+
+#ifdef _USE_TIMER
+ m_plotTimer.Start(500, wxTIMER_CONTINUOUS);
+#endif // _USE_TIMER
+ startRxStream();
+// startTxStream();
+ m_togBtnOnOff->SetLabel(wxT("Stop"));
+ }
+ else
+ {
+ m_togBtnSplit->Disable();
+ m_togRxID->Disable();
+ m_togTxID->Disable();
+ m_togBtnAnalog->Disable();
+ m_togBtnALC->Disable();
+ m_btnTogTX->Disable();
+#ifdef _USE_TIMER
+ m_plotTimer.Stop();
+#endif // _USE_TIMER
+ stopRxStream();
+// stopTxStream();
+ m_togBtnOnOff->SetLabel(wxT("Start"));
+ }
+}
+
+//----------------------------------------------------------
+// Audio stream processing loop states (globals).
+//----------------------------------------------------------
+/*
+float Ts = 0.0;
+short input_buf[2*FDMDV_NOM_SAMPLES_PER_FRAME];
+short *output_buf;
+int n_input_buf = 0;
+int nin = FDMDV_NOM_SAMPLES_PER_FRAME;
+int n_output_buf = 0;
+int codec_bits[2*FDMDV_BITS_PER_FRAME];
+int state = 0;
+*/
+
+int g_nRxIn = FDMDV_NOM_SAMPLES_PER_FRAME;
+float g_Ts = 0.0;
+
+short g_RxInBuf[2 * FDMDV_NOM_SAMPLES_PER_FRAME];
+short *g_pRxOutBuf;
+int g_nInputBuf = 0;
+
+short g_TxInBuf[2 * FDMDV_NOM_SAMPLES_PER_FRAME];
+short *g_pTxOutBuf;
+int g_nOutputBuf = 0;
+
+
+int g_CodecBits[2 * FDMDV_BITS_PER_FRAME];
+int g_State = 0;
+
float g_avmag[FDMDV_NSPEC];
-
-//----------------------------------------------------------
-// Global Codec2 thingys.
-//----------------------------------------------------------
-struct CODEC2 *g_pRxCodec2;
-struct CODEC2 *g_pTxCodec2;
-struct FDMDV *g_pRxFDMDV;
-struct FDMDV *g_pTxFDMDV;
-
-//-------------------------------------------------------------------------
-// startRxStream()
-//-------------------------------------------------------------------------
-void MainFrame::startRxStream()
-{
- if(!m_RxRunning)
- {
- m_RxRunning = true;
+
+//----------------------------------------------------------
+// Global Codec2 thingys.
+//----------------------------------------------------------
+struct CODEC2 *g_pRxCodec2;
+struct CODEC2 *g_pTxCodec2;
+struct FDMDV *g_pRxFDMDV;
+struct FDMDV *g_pTxFDMDV;
+
+//-------------------------------------------------------------------------
+// startRxStream()
+//-------------------------------------------------------------------------
+void MainFrame::startRxStream()
+{
+ if(!m_RxRunning)
+ {
+ m_RxRunning = true;
m_rxPa = new PortAudioWrap();
-
+
#ifdef _DUMMY_DATA
- for(int i = 0; i < FDMDV_NSPEC; i++)
- {
-// m_rxPa->m_av_mag[i] = sin(((double)i / M_PI)) * 100.0;
- g_avmag[i] = sin(((double)i / M_PI)) * 100.0;
- }
-#else
- for(int i = 0; i < FDMDV_NSPEC; i++)
- {
-// m_rxPa->m_av_mag[i] = -40.0;
- g_avmag[i] = -40.0;
- }
-#endif // _DUMMY_DATA
-
- g_pRxFDMDV = fdmdv_create();
- g_pRxCodec2 = codec2_create(CODEC2_MODE_1400);
- g_pRxOutBuf = (short*)malloc(2 * sizeof(short) * codec2_samples_per_frame(g_pRxCodec2));
-
+ for(int i = 0; i < FDMDV_NSPEC; i++)
+ {
+// m_rxPa->m_av_mag[i] = sin(((double)i / M_PI)) * 100.0;
+ g_avmag[i] = sin(((double)i / M_PI)) * 100.0;
+ }
+#else
+ for(int i = 0; i < FDMDV_NSPEC; i++)
+ {
+// m_rxPa->m_av_mag[i] = -40.0;
+ g_avmag[i] = -40.0;
+ }
+#endif // _DUMMY_DATA
+
+ g_pRxFDMDV = fdmdv_create();
+ g_pRxCodec2 = codec2_create(CODEC2_MODE_1400);
+ g_pRxOutBuf = (short*)malloc(2 * sizeof(short) * codec2_samples_per_frame(g_pRxCodec2));
+
m_rxDevIn = m_rxPa->getDefaultInputDevice(); // default input device
if(m_rxDevIn == paNoDevice)
{
- wxMessageBox(wxT("Rx Error: No default input device."), wxT("Error"), wxOK);
- return;
+ wxMessageBox(wxT("Rx Error: No default input device."), wxT("Error"), wxOK);
+ return;
}
m_rxErr = m_rxPa->setInputDevice(m_rxDevIn);
m_rxErr = m_rxPa->setInputChannelCount(2); // stereo input
m_rxErr = m_rxPa->setInputSampleFormat(PA_SAMPLE_TYPE);
- m_rxErr = m_rxPa->setInputLatency(m_rxPa->getInputDefaultLowLatency());
+ m_rxErr = m_rxPa->setInputLatency(m_rxPa->getInputDefaultLowLatency());
m_rxPa->setInputHostApiStreamInfo(NULL);
m_rxDevOut = m_rxPa->getDefaultOutputDevice(); // default output device
if (m_rxDevOut == paNoDevice)
{
- wxMessageBox(wxT("Rx Error: No default output device."), wxT("Error"), wxOK);
- return;
+ wxMessageBox(wxT("Rx Error: No default output device."), wxT("Error"), wxOK);
+ return;
}
m_rxErr = m_rxPa->setOutputDevice(m_rxDevOut);
m_rxErr = m_rxPa->setOutputChannelCount(2); // stereo input
- m_rxErr = m_rxPa->setOutputSampleFormat(PA_SAMPLE_TYPE);
+ m_rxErr = m_rxPa->setOutputSampleFormat(PA_SAMPLE_TYPE);
m_rxErr = m_rxPa->setOutputLatency(m_rxPa->getOutputDefaultLowLatency());
m_rxPa->setOutputHostApiStreamInfo(NULL);
m_rxErr = m_rxPa->setFramesPerBuffer(FRAMES_PER_BUFFER);
m_rxErr = m_rxPa->setSampleRate(SAMPLE_RATE);
- m_rxErr = m_rxPa->setStreamFlags(0);
-
- m_rxUserdata = new paCallBackData;
- m_rxUserdata->pWFPanel = m_panelWaterfall;
- m_rxUserdata->pSPPanel = m_panelSpectrum;
-
- for(int i = 0; i < MEM8; i++)
- {
- m_rxUserdata->in8k[i] = 0.0;
- }
- for(int i = 0; i < FDMDV_OS_TAPS; i++)
- {
- m_rxUserdata->in48k[i] = 0.0;
- }
-
- m_rxPa->setUserData(m_rxUserdata);
+ m_rxErr = m_rxPa->setStreamFlags(0);
+
+ m_rxUserdata = new paCallBackData;
+ m_rxUserdata->pWFPanel = m_panelWaterfall;
+ m_rxUserdata->pSPPanel = m_panelSpectrum;
+
+ for(int i = 0; i < MEM8; i++)
+ {
+ m_rxUserdata->in8k[i] = 0.0;
+ }
+ for(int i = 0; i < FDMDV_OS_TAPS; i++)
+ {
+ m_rxUserdata->in48k[i] = 0.0;
+ }
+
+ m_rxPa->setUserData(m_rxUserdata);
m_rxErr = m_rxPa->setCallback(rxCallback);
m_rxErr = m_rxPa->streamOpen();
if(m_rxErr != paNoError)
{
- wxMessageBox(wxT("Rx Stream Open/Setup error."), wxT("Error"), wxOK);
- return;
+ wxMessageBox(wxT("Rx Stream Open/Setup error."), wxT("Error"), wxOK);
+ return;
}
m_rxErr = m_rxPa->streamStart();
if(m_rxErr != paNoError)
{
- wxMessageBox(wxT("Rx Stream Start Error."), wxT("Error"), wxOK);
- return;
+ wxMessageBox(wxT("Rx Stream Start Error."), wxT("Error"), wxOK);
+ return;
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+// stopRxStream()
+//-------------------------------------------------------------------------
+void MainFrame::stopRxStream()
+{
+ if(m_RxRunning)
+ {
+ m_RxRunning = false;
+ m_rxPa->stop();
+ m_rxPa->streamClose();
+ fdmdv_destroy(g_pTxFDMDV);
+ codec2_destroy(g_pTxCodec2);
+// delete g_RxInBuf;
+ delete m_rxUserdata;
+ }
+/*
+ if(m_rxPa->isActive())
+ {
+ m_rxPa->stop();
+ m_rxPa->streamClose();
}
- }
-}
-
-//-------------------------------------------------------------------------
-// stopRxStream()
-//-------------------------------------------------------------------------
-void MainFrame::stopRxStream()
-{
- if(m_RxRunning)
- {
- m_RxRunning = false;
- m_rxPa->stop();
- m_rxPa->streamClose();
- fdmdv_destroy(g_pTxFDMDV);
- codec2_destroy(g_pTxCodec2);
-// delete g_RxInBuf;
- delete m_rxUserdata;
- }
-/*
- if(m_rxPa->isActive())
- {
- m_rxPa->stop();
- m_rxPa->streamClose();
- }
- if(m_rxPa->isOpen())
- {
- m_rxPa->streamClose();
- }
- m_TxRunning = false;
-*/
-}
-
-//-------------------------------------------------------------------------
-// abortRxStream()
-//-------------------------------------------------------------------------
-void MainFrame::abortRxStream()
-{
- if(m_RxRunning)
- {
- m_RxRunning = false;
- m_rxPa->abort();
- }
-}
-
-//-------------------------------------------------------------------------
-// startTxStream()
-//-------------------------------------------------------------------------
-void MainFrame::startTxStream()
-{
- if(!m_TxRunning)
- {
- m_TxRunning = true;
+ if(m_rxPa->isOpen())
+ {
+ m_rxPa->streamClose();
+ }
+ m_TxRunning = false;
+*/
+}
+
+//-------------------------------------------------------------------------
+// abortRxStream()
+//-------------------------------------------------------------------------
+void MainFrame::abortRxStream()
+{
+ if(m_RxRunning)
+ {
+ m_RxRunning = false;
+ m_rxPa->abort();
+ }
+}
+
+//-------------------------------------------------------------------------
+// startTxStream()
+//-------------------------------------------------------------------------
+void MainFrame::startTxStream()
+{
+ if(!m_TxRunning)
+ {
+ m_TxRunning = true;
m_txPa = new PortAudioWrap();
m_txDevIn = m_txPa->getDefaultInputDevice(); // default input device
if(m_txDevIn == paNoDevice)
{
- wxMessageBox(wxT("Tx Error: No default input device."), wxT("Error"), wxOK);
- return;
+ wxMessageBox(wxT("Tx Error: No default input device."), wxT("Error"), wxOK);
+ return;
}
-
- g_pTxFDMDV = fdmdv_create();
- g_pTxCodec2 = codec2_create(CODEC2_MODE_1400);
- g_pTxOutBuf = (short*)malloc(2*sizeof(short)*codec2_samples_per_frame(g_pTxCodec2));
-
+
+ g_pTxFDMDV = fdmdv_create();
+ g_pTxCodec2 = codec2_create(CODEC2_MODE_1400);
+ g_pTxOutBuf = (short*)malloc(2*sizeof(short)*codec2_samples_per_frame(g_pTxCodec2));
+
m_txErr = m_txPa->setInputDevice(m_txDevIn);
m_txErr = m_txPa->setInputChannelCount(2); // stereo input
m_txErr = m_txPa->setInputSampleFormat(PA_SAMPLE_TYPE);
- m_txErr = m_txPa->setInputLatency(m_txPa->getInputDefaultLowLatency());
+ m_txErr = m_txPa->setInputLatency(m_txPa->getInputDefaultLowLatency());
m_txPa->setInputHostApiStreamInfo(NULL);
m_txDevOut = m_txPa->getDefaultOutputDevice(); // default output device
if (m_txDevOut == paNoDevice)
{
- wxMessageBox(wxT("Tx Error: No default output device."), wxT("Error"), wxOK);
- return;
+ wxMessageBox(wxT("Tx Error: No default output device."), wxT("Error"), wxOK);
+ return;
}
m_txErr = m_txPa->setOutputDevice(m_txDevOut);
m_txErr = m_txPa->setOutputChannelCount(2); // stereo input
- m_txErr = m_txPa->setOutputSampleFormat(PA_SAMPLE_TYPE);
+ m_txErr = m_txPa->setOutputSampleFormat(PA_SAMPLE_TYPE);
m_txErr = m_txPa->setOutputLatency(m_txPa->getOutputDefaultLowLatency());
m_txPa->setOutputHostApiStreamInfo(NULL);
@@ -1004,62 +1004,62 @@ void MainFrame::startTxStream()
if(m_txErr != paNoError)
{
- wxMessageBox(wxT("Tx Stream Open/Setup error."), wxT("Error"), wxOK);
- return;
+ wxMessageBox(wxT("Tx Stream Open/Setup error."), wxT("Error"), wxOK);
+ return;
}
m_txErr = m_txPa->streamStart();
if(m_txErr != paNoError)
{
- wxMessageBox(wxT("Tx Stream Start Error."), wxT("Error"), wxOK);
- return;
+ wxMessageBox(wxT("Tx Stream Start Error."), wxT("Error"), wxOK);
+ return;
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+// stopTxStream()
+//-------------------------------------------------------------------------
+void MainFrame::stopTxStream()
+{
+ if(m_TxRunning)
+ {
+ m_TxRunning = false;
+ m_txPa->stop();
+ m_txPa->streamClose();
+ }
+/*
+ if(m_txPa->isActive())
+ {
+ m_txPa->stop();
+ }
+ if(m_txPa->isOpen())
+ {
+ m_txPa->streamClose();
}
- }
-}
-
-//-------------------------------------------------------------------------
-// stopTxStream()
-//-------------------------------------------------------------------------
-void MainFrame::stopTxStream()
-{
- if(m_TxRunning)
- {
- m_TxRunning = false;
- m_txPa->stop();
- m_txPa->streamClose();
- }
-/*
- if(m_txPa->isActive())
- {
- m_txPa->stop();
- }
- if(m_txPa->isOpen())
- {
- m_txPa->streamClose();
- }
- m_TxRunning = false;
-*/
-}
-
-//-------------------------------------------------------------------------
-// abortTxStream()
-//-------------------------------------------------------------------------
-void MainFrame::abortTxStream()
-{
- if(m_TxRunning)
- {
- m_TxRunning = false;
- m_txPa->abort();
- }
-}
-
-//-------------------------------------------------------------------------
-// OnOpen()
-//-------------------------------------------------------------------------
-void MainFrame::OnOpen(wxCommandEvent& event)
-{
- wxUnusedVar(event);
-}
-
+ m_TxRunning = false;
+*/
+}
+
+//-------------------------------------------------------------------------
+// abortTxStream()
+//-------------------------------------------------------------------------
+void MainFrame::abortTxStream()
+{
+ if(m_TxRunning)
+ {
+ m_TxRunning = false;
+ m_txPa->abort();
+ }
+}
+
+//-------------------------------------------------------------------------
+// OnOpen()
+//-------------------------------------------------------------------------
+void MainFrame::OnOpen(wxCommandEvent& event)
+{
+ wxUnusedVar(event);
+}
+
//----------------------------------------------------------------
// update average of each spectrum point
//----------------------------------------------------------------
@@ -1072,104 +1072,104 @@ void MainFrame::averageData(float mag_dB[])
// m_rxPa->m_av_mag[i] = (1.0 - BETA) * m_rxPa->m_av_mag[i] + BETA * mag_dB[i];
g_avmag[i] = (1.0 - BETA) * g_avmag[i] + BETA * mag_dB[i];
}
-}
-
-//-------------------------------------------------------------------------
-// rxCallback()
-//-------------------------------------------------------------------------
-int MainFrame::rxCallback(
- const void *inputBuffer,
- void *outputBuffer,
- unsigned long framesPerBuffer,
- const PaStreamCallbackTimeInfo* timeInfo,
- PaStreamCallbackFlags statusFlags,
- void *userData
- )
-{
- paCallBackData *cbData = (paCallBackData*)userData;
- unsigned int i;
- short *rptr = (short*)inputBuffer;
- short *wptr = (short*)outputBuffer;
- float *in8k = cbData->in8k;
- float *in48k = cbData->in48k;
- float out8k[N8];
- float out48k[N48];
- short out48k_short[N48];
-
- (void) timeInfo;
- (void) statusFlags;
-
- assert(inputBuffer != NULL);
-
- // Convert input model samples from 48 to 8 kHz
- // just use left channel
- for(i = 0; i < framesPerBuffer; i++, rptr += 2)
- {
- in48k[i + FDMDV_OS_TAPS] = *rptr;
- }
- // downsample and update filter memory
- fdmdv_48_to_8(out8k, &in48k[FDMDV_OS_TAPS], N8);
- for(i = 0; i < FDMDV_OS_TAPS; i++)
- {
- in48k[i] = in48k[i + framesPerBuffer];
- }
- // run demod, decoder and update GUI info
- unsigned int j = N8;
- //for(i = 0; i < N8; i++)
- for(i = 0; i < j; i++)
- {
- g_RxInBuf[g_nInputBuf + i] = (short)out8k[i];
- }
- g_nInputBuf += FDMDV_NOM_SAMPLES_PER_FRAME;
- per_frame_rx_processing(g_pRxOutBuf, &g_nInputBuf, g_CodecBits, g_RxInBuf, &g_nOutputBuf, &g_nRxIn, &g_State, g_pRxCodec2);
- cbData->pWFPanel->m_newdata = true;
- cbData->pSPPanel->m_newdata = true;
- // if demod out of sync copy input audio from A/D to aid in tuning
- if (g_nOutputBuf >= N8)
- {
- if(g_State == 0)
- {
- for(i = 0; i < N8; i++)
- {
- in8k[MEM8 + i] = out8k[i]; // A/D signal
- }
- }
- else
- {
- for(i = 0; i < N8; i++)
- {
- in8k[MEM8+i] = g_pRxOutBuf[i]; // decoded spech
- }
- }
- g_nOutputBuf -= N8;
- }
- assert(g_nOutputBuf >= 0);
- // shift speech samples in output buffer
- for(i = 0; i < (unsigned int)g_nOutputBuf; i++)
- {
- g_pRxOutBuf[i] = g_pRxOutBuf[i + N8];
- }
- // Convert output speech to 48 kHz sample rate
- // upsample and update filter memory
- fdmdv_8_to_48(out48k, &in8k[MEM8], N8);
- for(i = 0; i < MEM8; i++)
- {
- in8k[i] = in8k[i + N8];
- }
- assert(outputBuffer != NULL);
- // write signal to both channels
- for(i = 0; i < N48; i++)
- {
- out48k_short[i] = (short)out48k[i];
- }
- for(i = 0; i < framesPerBuffer; i++, wptr += 2)
- {
- wptr[0] = out48k_short[i];
- wptr[1] = out48k_short[i];
- }
- return paContinue;
-}
-
+}
+
+//-------------------------------------------------------------------------
+// rxCallback()
+//-------------------------------------------------------------------------
+int MainFrame::rxCallback(
+ const void *inputBuffer,
+ void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData
+ )
+{
+ paCallBackData *cbData = (paCallBackData*)userData;
+ unsigned int i;
+ short *rptr = (short*)inputBuffer;
+ short *wptr = (short*)outputBuffer;
+ float *in8k = cbData->in8k;
+ float *in48k = cbData->in48k;
+ float out8k[N8];
+ float out48k[N48];
+ short out48k_short[N48];
+
+ (void) timeInfo;
+ (void) statusFlags;
+
+ assert(inputBuffer != NULL);
+
+ // Convert input model samples from 48 to 8 kHz
+ // just use left channel
+ for(i = 0; i < framesPerBuffer; i++, rptr += 2)
+ {
+ in48k[i + FDMDV_OS_TAPS] = *rptr;
+ }
+ // downsample and update filter memory
+ fdmdv_48_to_8(out8k, &in48k[FDMDV_OS_TAPS], N8);
+ for(i = 0; i < FDMDV_OS_TAPS; i++)
+ {
+ in48k[i] = in48k[i + framesPerBuffer];
+ }
+ // run demod, decoder and update GUI info
+ unsigned int j = N8;
+ //for(i = 0; i < N8; i++)
+ for(i = 0; i < j; i++)
+ {
+ g_RxInBuf[g_nInputBuf + i] = (short)out8k[i];
+ }
+ g_nInputBuf += FDMDV_NOM_SAMPLES_PER_FRAME;
+ per_frame_rx_processing(g_pRxOutBuf, &g_nInputBuf, g_CodecBits, g_RxInBuf, &g_nOutputBuf, &g_nRxIn, &g_State, g_pRxCodec2);
+ cbData->pWFPanel->m_newdata = true;
+ cbData->pSPPanel->m_newdata = true;
+ // if demod out of sync copy input audio from A/D to aid in tuning
+ if (g_nOutputBuf >= N8)
+ {
+ if(g_State == 0)
+ {
+ for(i = 0; i < N8; i++)
+ {
+ in8k[MEM8 + i] = out8k[i]; // A/D signal
+ }
+ }
+ else
+ {
+ for(i = 0; i < N8; i++)
+ {
+ in8k[MEM8+i] = g_pRxOutBuf[i]; // decoded spech
+ }
+ }
+ g_nOutputBuf -= N8;
+ }
+ assert(g_nOutputBuf >= 0);
+ // shift speech samples in output buffer
+ for(i = 0; i < (unsigned int)g_nOutputBuf; i++)
+ {
+ g_pRxOutBuf[i] = g_pRxOutBuf[i + N8];
+ }
+ // Convert output speech to 48 kHz sample rate
+ // upsample and update filter memory
+ fdmdv_8_to_48(out48k, &in8k[MEM8], N8);
+ for(i = 0; i < MEM8; i++)
+ {
+ in8k[i] = in8k[i + N8];
+ }
+ assert(outputBuffer != NULL);
+ // write signal to both channels
+ for(i = 0; i < N48; i++)
+ {
+ out48k_short[i] = (short)out48k[i];
+ }
+ for(i = 0; i < framesPerBuffer; i++, wptr += 2)
+ {
+ wptr[0] = out48k_short[i];
+ wptr[1] = out48k_short[i];
+ }
+ return paContinue;
+}
+
//----------------------------------------------------------------
// per_frame_rx_processing()
//----------------------------------------------------------------
@@ -1190,9 +1190,9 @@ int MainFrame::rxCallback(
int rx_bits[FDMDV_BITS_PER_FRAME];
unsigned char packed_bits[BYTES_PER_CODEC_FRAME];
float rx_spec[FDMDV_NSPEC];
- int i;
- int nin_prev;
- int bit;
+ int i;
+ int nin_prev;
+ int bit;
int byte;
int next_state;
@@ -1231,12 +1231,12 @@ int MainFrame::rxCallback(
{
input_buf[i] = input_buf[i + nin_prev];
}
-
+
// compute rx spectrum & get demod stats, and update GUI plot data
fdmdv_get_rx_spectrum(g_pRxFDMDV, rx_spec, rx_fdm, nin_prev);
fdmdv_get_demod_stats(g_pRxFDMDV, &stats);
- // Average Data
- // averageData(rx_spec);
+ // Average Data
+ // averageData(rx_spec);
for(i = 0; i < FDMDV_NSPEC; i++)
{
// m_rxPa->m_av_mag[i] = (1.0 - BETA) * m_rxPa->m_av_mag[i] + BETA * rx_spec[i];
@@ -1260,7 +1260,7 @@ int MainFrame::rxCallback(
// mute output audio when out of sync
if(*n_output_buf < 2 * codec2_samples_per_frame(c2) - N8)
{
- for(i = 0; i < N8; i++)
+ for(i = 0; i < N8; i++)
{
output_buf[*n_output_buf + i] = 0;
}
@@ -1327,109 +1327,109 @@ int MainFrame::rxCallback(
}
*state = next_state;
}
-}
-
-//-------------------------------------------------------------------------
-// txCallback()
-//-------------------------------------------------------------------------
-int MainFrame::txCallback(
- const void *inBuffer,
- void *outBuffer,
- unsigned long framesPerBuffer,
- const PaStreamCallbackTimeInfo *outTime,
- PaStreamCallbackFlags statusFlags,
- void *userData
- )
-{
- float *out = (float *) outBuffer;
- float *in = (float *) inBuffer;
- float leftIn;
- float rightIn;
- unsigned int i;
-
- if(inBuffer == NULL)
- {
- return 0;
- }
- // Read input buffer, process data, and fill output buffer.
- for(i = 0; i < framesPerBuffer; i++)
- {
- leftIn = *in++; // Get interleaved samples from input buffer.
- rightIn = *in++;
- *out++ = leftIn * rightIn; // ring modulation
- *out++ = 0.5f * (leftIn + rightIn); // mixing
- }
- return paContinue; // 0;
-}
-
-//-------------------------------------------------------------------------
-// OnSave()
-//-------------------------------------------------------------------------
-void MainFrame::OnSave(wxCommandEvent& WXUNUSED(event))
-{
-/*
- wxString savefilename = wxFileSelector(wxT("Save Sound File"),
- wxEmptyString,
- wxEmptyString,
- (const wxChar *)NULL,
- wxT("WAV files (*.wav)|*.wav|")
- wxT("RAW files (*.raw)|*.raw|")
- wxT("SPEEX files (*.spx)|*.spx|")
- wxT("FLAC files (*.flc)|*.flc|"),
- wxFD_SAVE,
- this);
- if(savefilename.empty())
- {
- return;
- }
- wxString extension;
- wxFileName::SplitPath(savefilename, NULL, NULL, &extension);
- bool saved = false;
- if(!saved)
- {
- // This one guesses image format from filename extension
- // (it may fail if the extension is not recognized):
- //image.SaveFile(savefilename);
- }
-*/
-}
-
-/*
-//-------------------------------------------------------------------------
-// rxCallback()
-//-------------------------------------------------------------------------
-int MainFrame::rxCallback(
- const void *inBuffer,
- void *outBuffer,
- unsigned long framesPerBuffer,
- const PaStreamCallbackTimeInfo *outTime,
- PaStreamCallbackFlags statusFlags,
- void *userData
- )
-{
-#ifdef _AUDIO_PASSTHROUGH
- float *out = (float *) outBuffer;
- float *in = (float *) inBuffer;
- float leftIn;
- float rightIn;
- unsigned int i;
-
- if(inBuffer == NULL)
- {
- return 0;
- }
- // Read input buffer, process data, and fill output buffer.
- for(i = 0; i < framesPerBuffer; i++)
- {
- leftIn = *in++; // Get interleaved samples from input buffer.
- rightIn = *in++;
- *out++ = leftIn * rightIn; // ring modulation
- *out++ = 0.5f * (leftIn + rightIn); // mixing
- }
-#else // _AUDIO_PASSTHROUGH
+}
+
+//-------------------------------------------------------------------------
+// txCallback()
+//-------------------------------------------------------------------------
+int MainFrame::txCallback(
+ const void *inBuffer,
+ void *outBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo *outTime,
+ PaStreamCallbackFlags statusFlags,
+ void *userData
+ )
+{
+ float *out = (float *) outBuffer;
+ float *in = (float *) inBuffer;
+ float leftIn;
+ float rightIn;
+ unsigned int i;
+
+ if(inBuffer == NULL)
+ {
+ return 0;
+ }
+ // Read input buffer, process data, and fill output buffer.
+ for(i = 0; i < framesPerBuffer; i++)
+ {
+ leftIn = *in++; // Get interleaved samples from input buffer.
+ rightIn = *in++;
+ *out++ = leftIn * rightIn; // ring modulation
+ *out++ = 0.5f * (leftIn + rightIn); // mixing
+ }
+ return paContinue; // 0;
+}
+
+//-------------------------------------------------------------------------
+// OnSave()
+//-------------------------------------------------------------------------
+void MainFrame::OnSave(wxCommandEvent& WXUNUSED(event))
+{
+/*
+ wxString savefilename = wxFileSelector(wxT("Save Sound File"),
+ wxEmptyString,
+ wxEmptyString,
+ (const wxChar *)NULL,
+ wxT("WAV files (*.wav)|*.wav|")
+ wxT("RAW files (*.raw)|*.raw|")
+ wxT("SPEEX files (*.spx)|*.spx|")
+ wxT("FLAC files (*.flc)|*.flc|"),
+ wxFD_SAVE,
+ this);
+ if(savefilename.empty())
+ {
+ return;
+ }
+ wxString extension;
+ wxFileName::SplitPath(savefilename, NULL, NULL, &extension);
+ bool saved = false;
+ if(!saved)
+ {
+ // This one guesses image format from filename extension
+ // (it may fail if the extension is not recognized):
+ //image.SaveFile(savefilename);
+ }
+*/
+}
+
+/*
+//-------------------------------------------------------------------------
+// rxCallback()
+//-------------------------------------------------------------------------
+int MainFrame::rxCallback(
+ const void *inBuffer,
+ void *outBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo *outTime,
+ PaStreamCallbackFlags statusFlags,
+ void *userData
+ )
+{
+#ifdef _AUDIO_PASSTHROUGH
+ float *out = (float *) outBuffer;
+ float *in = (float *) inBuffer;
+ float leftIn;
+ float rightIn;
+ unsigned int i;
+
+ if(inBuffer == NULL)
+ {
+ return 0;
+ }
+ // Read input buffer, process data, and fill output buffer.
+ for(i = 0; i < framesPerBuffer; i++)
+ {
+ leftIn = *in++; // Get interleaved samples from input buffer.
+ rightIn = *in++;
+ *out++ = leftIn * rightIn; // ring modulation
+ *out++ = 0.5f * (leftIn + rightIn); // mixing
+ }
+#else // _AUDIO_PASSTHROUGH
// per_frame_rx_processing((short *) outBuffer, &framesPerBuffer, int codec_bits[], (short *) inBuffer, &framesPerBuffer, int *nin, int *state, m_rxPa);//
// per_frame_rx_processing(outBuffer, &framesPerBuffer, int codec_bits[], inBuffer, &framesPerBuffer, int *nin, int *state, m_rxPa);
-#endif // _AUDIO_PASSTHROUGH
- return paContinue; // 0;
+#endif // _AUDIO_PASSTHROUGH
+ return paContinue; // 0;
}
-*/
+*/
diff --git a/fdmdv2/src/fdmdv2_main.h b/fdmdv2/src/fdmdv2_main.h
index a6ab6d4b..e0476564 100644
--- a/fdmdv2/src/fdmdv2_main.h
+++ b/fdmdv2/src/fdmdv2_main.h
@@ -1,24 +1,24 @@
-//==========================================================================
+//==========================================================================
// Name: fdmdv2_main.h
-//
+//
// Purpose: Declares simple wxWidgets application with GUI.
// Created: Apr. 9, 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
+// Initial author: David Witten
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
#ifndef __FDMDV2_MAIN__
#define __FDMDV2_MAIN__
-#include
+#include
-#include
-#include
-#include "wx/rawbmp.h"
+#include
+#include
+#include "wx/rawbmp.h"
#include "wx/file.h"
#include "wx/filename.h"
-#include "wx/config.h"
-#include
+#include "wx/config.h"
+#include
#include "wx/graphics.h"
#include "wx/mstream.h"
#include "wx/wfstream.h"
@@ -27,126 +27,126 @@
#include "wx/stopwatch.h"
#include "wx/versioninfo.h"
#include
-
+
#include "codec2.h"
-#include "fdmdv.h"
-
+#include "fdmdv.h"
+
#include "topFrame.h"
-#include "dlg_about.h"
-#include "dlg_audio.h"
-#include "dlg_options.h"
-#include "dlg_comports.h"
+#include "dlg_about.h"
+#include "dlg_audio.h"
+#include "dlg_options.h"
+#include "dlg_comports.h"
#include "fdmdv2_plot.h"
#include "fdmdv2_plot_scalar.h"
#include "fdmdv2_plot_scatter.h"
#include "fdmdv2_plot_waterfall.h"
#include "fdmdv2_plot_spectrum.h"
#include "fdmdv2_pa_wrapper.h"
-#include "sndfile.h"
+#include "sndfile.h"
#include "portaudio.h"
-
-#define _USE_TIMER 1
-#define _DUMMY_DATA 1
-//#define _AUDIO_PASSTHROUGH 1
-
-enum {
- ID_START = wxID_HIGHEST,
- ID_TIMER_WATERFALL,
- ID_TIMER_SPECTRUM,
- ID_TIMER_SCATTER,
- ID_TIMER_SCALAR
- };
-
-#define EXCHANGE_DATA_IN 0
-#define EXCHANGE_DATA_OUT 1
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class MainApp
-//
-// @class $(Name)
-// @author $(User)
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+
+#define _USE_TIMER 1
+#define _DUMMY_DATA 1
+//#define _AUDIO_PASSTHROUGH 1
+
+enum {
+ ID_START = wxID_HIGHEST,
+ ID_TIMER_WATERFALL,
+ ID_TIMER_SPECTRUM,
+ ID_TIMER_SCATTER,
+ ID_TIMER_SCALAR
+ };
+
+#define EXCHANGE_DATA_IN 0
+#define EXCHANGE_DATA_OUT 1
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class MainApp
+//
+// @class $(Name)
+// @author $(User)
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
class MainApp : public wxApp
{
public:
virtual bool OnInit();
virtual int OnExit();
-
- wxString m_strVendName;
- wxString m_StrAppName;
-
- wxRadioButton m_radioBtnPortAudio;
- wxRadioButton m_radioBtnFileOnly;
-
- wxString m_textNumChOut;
- wxString m_textNumChIn;
-
+
+ wxString m_strVendName;
+ wxString m_StrAppName;
+
+// wxRadioButton m_radioBtnPortAudio;
+// wxRadioButton m_radioBtnFileOnly;
+
+ wxString m_textNumChOut;
+ wxString m_textNumChIn;
+
wxString m_strRxInAudio;
wxString m_strRxOutAudio;
wxString m_textVoiceInput;
- wxString m_textVoiceOutput;
- wxString m_strSampleRate;
- wxString m_strBitrate;
-
- wxString m_strRigCtrlPort;
- wxString m_strRigCtrlBaud;
- wxString m_strRigCtrlDatabits;
- wxString m_strRigCtrlStopbits;
- wxString m_strRigCtrlParity;
-
- wxRect m_rTopWindow;
-
- bool loadConfig();
- bool saveConfig();
-
- protected:
+ wxString m_textVoiceOutput;
+ wxString m_strSampleRate;
+ wxString m_strBitrate;
+
+ wxString m_strRigCtrlPort;
+ wxString m_strRigCtrlBaud;
+ wxString m_strRigCtrlDatabits;
+ wxString m_strRigCtrlStopbits;
+ wxString m_strRigCtrlParity;
+
+ wxRect m_rTopWindow;
+
+ bool loadConfig();
+ bool saveConfig();
+
+ protected:
};
// declare global static function wxGetApp()
DECLARE_APP(MainApp)
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// paCallBackData
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// paCallBackData
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
typedef struct
-{
- PlotSpectrum *pSPPanel;
- PlotWaterfall *pWFPanel;
+{
+ PlotSpectrum *pSPPanel;
+ PlotWaterfall *pWFPanel;
// float *mag_dB;
float in48k[FDMDV_OS_TAPS + N48];
- float in8k[MEM8 + N8];
+ float in8k[MEM8 + N8];
} paCallBackData;
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class MainFrame
-//
-// @class $(Name)
-// @author $(User)
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class MainFrame
+//
+// @class $(Name)
+// @author $(User)
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
class MainFrame : public TopFrame
{
public:
MainFrame(wxWindow *parent);
- virtual ~MainFrame();
-
-// PlotPanel* m_panelDefaultA;
- PlotSpectrum* m_panelSpectrum;
- PlotWaterfall* m_panelWaterfall;
- PlotScatter* m_panelScatter;
- PlotScalar* m_panelScalar;
- bool m_SquelchActive;
- bool m_RxRunning;
- bool m_TxRunning;
+ virtual ~MainFrame();
+
+// PlotPanel* m_panelDefaultA;
+ PlotSpectrum* m_panelSpectrum;
+ PlotWaterfall* m_panelWaterfall;
+ PlotScatter* m_panelScatter;
+ PlotScalar* m_panelScalar;
+ bool m_SquelchActive;
+ bool m_RxRunning;
+ bool m_TxRunning;
PortAudioWrap *m_rxPa;
- PortAudioWrap *m_txPa;
+ PortAudioWrap *m_txPa;
paCallBackData *m_rxUserdata;
paCallBackData *m_txUserdata;
PaDeviceIndex m_rxDevIn;
@@ -156,112 +156,112 @@ class MainFrame : public TopFrame
PaError m_rxErr;
PaError m_txErr;
wxSound *m_sound;
-#ifdef _USE_TIMER
- wxTimer m_plotTimer;
-#endif
-
- static int rxCallback(
- const void *inBuffer,
- void *outBuffer,
- unsigned long framesPerBuffer,
- const PaStreamCallbackTimeInfo *outTime,
- PaStreamCallbackFlags statusFlags,
- void *userData
- );
-
- static int txCallback(
- const void *inBuffer,
- void *outBuffer,
- unsigned long framesPerBuffer,
- const PaStreamCallbackTimeInfo *outTime,
- PaStreamCallbackFlags statusFlags,
- void *userData
- );
-
- static void per_frame_rx_processing(
- short output_buf[], // output buf of decoded speech samples
- int *n_output_buf, // how many samples currently in output_buf[]
- int codec_bits[], // current frame of bits for decoder
- short input_buf[], // input buf of modem samples input to demod
- int *n_input_buf, // how many samples currently in input_buf[]
- int *nin, // amount of samples demod needs for next call
- int *state, // used to collect codec_bits[] halves
- struct CODEC2 *c2 // Codec 2 states
- );
-
- protected:
+#ifdef _USE_TIMER
+ wxTimer m_plotTimer;
+#endif
+
+ static int rxCallback(
+ const void *inBuffer,
+ void *outBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo *outTime,
+ PaStreamCallbackFlags statusFlags,
+ void *userData
+ );
+
+ static int txCallback(
+ const void *inBuffer,
+ void *outBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo *outTime,
+ PaStreamCallbackFlags statusFlags,
+ void *userData
+ );
+
+ static void per_frame_rx_processing(
+ short output_buf[], // output buf of decoded speech samples
+ int *n_output_buf, // how many samples currently in output_buf[]
+ int codec_bits[], // current frame of bits for decoder
+ short input_buf[], // input buf of modem samples input to demod
+ int *n_input_buf, // how many samples currently in input_buf[]
+ int *nin, // amount of samples demod needs for next call
+ int *state, // used to collect codec_bits[] halves
+ struct CODEC2 *c2 // Codec 2 states
+ );
+
+ protected:
// protected event handlers
virtual void OnCloseFrame(wxCloseEvent& event);
virtual void OnExitClick(wxCommandEvent& event);
- //void OnQuit(wxCommandEvent& event);
-
- void averageData(float mag_dB[]);
- void startTxStream();
- void startRxStream();
- void stopTxStream();
- void stopRxStream();
- void abortTxStream();
- void abortRxStream();
-
- void OnOpen( wxCommandEvent& event );
- void OnOpenUpdateUI( wxUpdateUIEvent& event );
- void OnSave( wxCommandEvent& event );
- void OnSaveUpdateUI( wxUpdateUIEvent& event );
- void OnClose( wxCommandEvent& event );
- void OnCloseUpdateUI( wxUpdateUIEvent& event );
- void OnExit( wxCommandEvent& event );
- void OnCopy( wxCommandEvent& event );
- void OnCopyUpdateUI( wxUpdateUIEvent& event );
- void OnCut( wxCommandEvent& event );
- void OnCutUpdateUI( wxUpdateUIEvent& event );
- void OnPaste( wxCommandEvent& event );
- void OnPasteUpdateUI( wxUpdateUIEvent& event );
- void OnToolsAudio( wxCommandEvent& event );
- void OnToolsAudioUI( wxUpdateUIEvent& event );
- void OnToolsComCfg( wxCommandEvent& event );
- void OnToolsComCfgUI( wxUpdateUIEvent& event );
- void OnToolsOptions( wxCommandEvent& event );
- void OnToolsOptionsUI( wxUpdateUIEvent& event );
- void OnCaptureRxStream( wxCommandEvent& event );
- void OnCaptureTxStream( wxCommandEvent& event );
- void OnPlayAudioFile( wxCommandEvent& event );
- void OnHelpCheckUpdates( wxCommandEvent& event );
- void OnHelpCheckUpdatesUI( wxUpdateUIEvent& event );
- void OnHelpAbout( wxCommandEvent& event );
- void OnCmdSliderScroll( wxScrollEvent& event );
- void OnSliderScrollBottom( wxScrollEvent& event );
- void OnCmdSliderScrollChanged( wxScrollEvent& event );
- void OnSliderScrollTop( wxScrollEvent& event );
+ //void OnQuit(wxCommandEvent& event);
+
+ void averageData(float mag_dB[]);
+ void startTxStream();
+ void startRxStream();
+ void stopTxStream();
+ void stopRxStream();
+ void abortTxStream();
+ void abortRxStream();
+
+ void OnOpen( wxCommandEvent& event );
+ void OnOpenUpdateUI( wxUpdateUIEvent& event );
+ void OnSave( wxCommandEvent& event );
+ void OnSaveUpdateUI( wxUpdateUIEvent& event );
+ void OnClose( wxCommandEvent& event );
+ void OnCloseUpdateUI( wxUpdateUIEvent& event );
+ void OnExit( wxCommandEvent& event );
+ void OnCopy( wxCommandEvent& event );
+ void OnCopyUpdateUI( wxUpdateUIEvent& event );
+ void OnCut( wxCommandEvent& event );
+ void OnCutUpdateUI( wxUpdateUIEvent& event );
+ void OnPaste( wxCommandEvent& event );
+ void OnPasteUpdateUI( wxUpdateUIEvent& event );
+ void OnToolsAudio( wxCommandEvent& event );
+ void OnToolsAudioUI( wxUpdateUIEvent& event );
+ void OnToolsComCfg( wxCommandEvent& event );
+ void OnToolsComCfgUI( wxUpdateUIEvent& event );
+ void OnToolsOptions( wxCommandEvent& event );
+ void OnToolsOptionsUI( wxUpdateUIEvent& event );
+ void OnCaptureRxStream( wxCommandEvent& event );
+ void OnCaptureTxStream( wxCommandEvent& event );
+ void OnPlayAudioFile( wxCommandEvent& event );
+ void OnHelpCheckUpdates( wxCommandEvent& event );
+ void OnHelpCheckUpdatesUI( wxUpdateUIEvent& event );
+ void OnHelpAbout( wxCommandEvent& event );
+ void OnCmdSliderScroll( wxScrollEvent& event );
+ void OnSliderScrollBottom( wxScrollEvent& event );
+ void OnCmdSliderScrollChanged( wxScrollEvent& event );
+ void OnSliderScrollTop( wxScrollEvent& event );
void OnCheckSQClick( wxCommandEvent& event );
-
- // Toggle Buttons
+
+ // Toggle Buttons
void OnTogBtnSplitClick(wxCommandEvent& event);
void OnTogBtnAnalogClick(wxCommandEvent& event);
void OnTogBtnALCClick(wxCommandEvent& event);
- void OnTogBtnRxID( wxCommandEvent& event );
- void OnTogBtnTxID( wxCommandEvent& event );
- void OnTogBtnTXClick( wxCommandEvent& event );
+ void OnTogBtnRxID( wxCommandEvent& event );
+ void OnTogBtnTxID( wxCommandEvent& event );
+ void OnTogBtnTXClick( wxCommandEvent& event );
void OnTogBtnOnOff( wxCommandEvent& event );
-
+
void OnTogBtnSplitClickUI(wxUpdateUIEvent& event);
void OnTogBtnAnalogClickUI(wxUpdateUIEvent& event);
void OnTogBtnALCClickUI(wxUpdateUIEvent& event);
- void OnTogBtnRxIDUI(wxUpdateUIEvent& event );
- void OnTogBtnTxIDUI(wxUpdateUIEvent& event );
- void OnTogBtnTXClickUI(wxUpdateUIEvent& event );
+ void OnTogBtnRxIDUI(wxUpdateUIEvent& event );
+ void OnTogBtnTxIDUI(wxUpdateUIEvent& event );
+ void OnTogBtnTXClickUI(wxUpdateUIEvent& event );
void OnTogBtnOnOffUI(wxUpdateUIEvent& event );
-
- //System Events
+
+ //System Events
void OnPaint(wxPaintEvent& event);
void OnClose( wxCloseEvent& event );
void OnSize( wxSizeEvent& event );
void OnUpdateUI( wxUpdateUIEvent& event );
- void OnDeleteConfig(wxCommandEvent&);
-#ifdef _USE_TIMER
- void OnTimer(wxTimerEvent &evt);
-#else
- void OnIdle(wxIdleEvent &evt);
-#endif
+ void OnDeleteConfig(wxCommandEvent&);
+#ifdef _USE_TIMER
+ void OnTimer(wxTimerEvent &evt);
+#else
+ void OnIdle(wxIdleEvent &evt);
+#endif
wxString LoadUserImage(wxImage& image);
@@ -275,5 +275,5 @@ class MainFrame : public TopFrame
wxTextCtrl* m_tc;
int m_zoom;
};
-
+
#endif //__FDMDV2_MAIN__
diff --git a/fdmdv2/src/fdmdv2_pa_wrapper.cpp b/fdmdv2/src/fdmdv2_pa_wrapper.cpp
index f4627f9d..cad3db89 100644
--- a/fdmdv2/src/fdmdv2_pa_wrapper.cpp
+++ b/fdmdv2/src/fdmdv2_pa_wrapper.cpp
@@ -1,10 +1,10 @@
-//==========================================================================
-// Name: fdmdv2_pa_wrapper.cpp
-// Purpose: Implements a wrapper class around the PortAudio library.
+//==========================================================================
+// Name: fdmdv2_pa_wrapper.cpp
+// Purpose: Implements a wrapper class around the PortAudio library.
// Created: August 12, 2012
-// Initial author: David Witten
-// License:
-//
+// Initial author: David Witten
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -20,30 +20,30 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
+//==========================================================================
#include "fdmdv2_pa_wrapper.h"
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// PortAudioWrap()
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// PortAudioWrap()
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
PortAudioWrap::PortAudioWrap()
{
- m_pStream = NULL;
- m_pUserData = NULL;
- m_samplerate = 0;
+ m_pStream = NULL;
+ m_pUserData = NULL;
+ m_samplerate = 0;
m_framesPerBuffer = 0;
- m_statusFlags = 0;
- m_pStreamCallback = NULL;
- m_pStreamFinishedCallback = NULL;
- m_pTimeInfo = 0;
- m_newdata = false;
-
-// loadData();
+ m_statusFlags = 0;
+ m_pStreamCallback = NULL;
+ m_pStreamFinishedCallback = NULL;
+ m_pTimeInfo = 0;
+ m_newdata = false;
+
+// loadData();
}
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
// ~PortAudioWrap()
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
PortAudioWrap::~PortAudioWrap()
{
}
@@ -51,7 +51,7 @@ PortAudioWrap::~PortAudioWrap()
//----------------------------------------------------------------
// streamOpen()
//----------------------------------------------------------------
-PaError PortAudioWrap::streamOpen()
+PaError PortAudioWrap::streamOpen()
{
return Pa_OpenStream(
&m_pStream,
@@ -68,7 +68,7 @@ PaError PortAudioWrap::streamOpen()
//----------------------------------------------------------------
// streamStart()
//----------------------------------------------------------------
-PaError PortAudioWrap::streamStart()
+PaError PortAudioWrap::streamStart()
{
return Pa_StartStream(m_pStream);
}
@@ -76,7 +76,7 @@ PaError PortAudioWrap::streamStart()
//----------------------------------------------------------------
// streamClose()
//----------------------------------------------------------------
-PaError PortAudioWrap::streamClose()
+PaError PortAudioWrap::streamClose()
{
if(isOpen())
{
@@ -88,11 +88,11 @@ PaError PortAudioWrap::streamClose()
return paNoError;
}
}
-
+
//----------------------------------------------------------------
// terminate()
//----------------------------------------------------------------
-void PortAudioWrap::terminate()
+void PortAudioWrap::terminate()
{
if(Pa_IsStreamStopped(m_pStream) != paNoError)
{
@@ -100,7 +100,7 @@ void PortAudioWrap::terminate()
}
Pa_Terminate();
}
-
+
//----------------------------------------------------------------
// stop()
//----------------------------------------------------------------
@@ -138,10 +138,10 @@ bool PortAudioWrap::isActive() const
//----------------------------------------------------------------
// isOpen()
//----------------------------------------------------------------
-bool PortAudioWrap::isOpen() const
-{
- return (m_pStream != NULL);
-}
+bool PortAudioWrap::isOpen() const
+{
+ return (m_pStream != NULL);
+}
//----------------------------------------------------------------
// getDefaultInputDevice()
@@ -193,7 +193,7 @@ PaError PortAudioWrap::setInputLatency(PaTime latency)
m_inputBuffer.suggestedLatency = latency;
return paNoError;
}
-
+
//----------------------------------------------------------------
// setInputHostApiStreamInfo()
//----------------------------------------------------------------
@@ -201,7 +201,7 @@ void PortAudioWrap::setInputHostApiStreamInfo(void *info)
{
m_inputBuffer.hostApiSpecificStreamInfo = info;
}
-
+
//----------------------------------------------------------------
// getInputDefaultLowLatency()
//----------------------------------------------------------------
@@ -283,7 +283,7 @@ PaError PortAudioWrap::setFramesPerBuffer(unsigned long size)
//----------------------------------------------------------------
// setSampleRate()
//----------------------------------------------------------------
-PaError PortAudioWrap::setSampleRate(unsigned long rate)
+PaError PortAudioWrap::setSampleRate(unsigned long rate)
{
m_samplerate = rate;
return paNoError;
@@ -292,7 +292,7 @@ PaError PortAudioWrap::setSampleRate(unsigned long rate)
//----------------------------------------------------------------
// setStreamFlags()
//----------------------------------------------------------------
-PaError PortAudioWrap::setStreamFlags(PaStreamFlags flags)
+PaError PortAudioWrap::setStreamFlags(PaStreamFlags flags)
{
m_statusFlags = flags;
return paNoError;
@@ -301,7 +301,7 @@ PaError PortAudioWrap::setStreamFlags(PaStreamFlags flags)
//----------------------------------------------------------------
// setInputDevice()
//----------------------------------------------------------------
-PaError PortAudioWrap::setInputDevice(PaDeviceIndex index)
+PaError PortAudioWrap::setInputDevice(PaDeviceIndex index)
{
m_inputBuffer.device = index;
return paNoError;
@@ -310,7 +310,7 @@ PaError PortAudioWrap::setInputDevice(PaDeviceIndex index)
//----------------------------------------------------------------
// setOutputDevice()
//----------------------------------------------------------------
-PaError PortAudioWrap::setOutputDevice(PaDeviceIndex index)
+PaError PortAudioWrap::setOutputDevice(PaDeviceIndex index)
{
m_outputBuffer.device = index;
return paNoError;
@@ -319,22 +319,22 @@ PaError PortAudioWrap::setOutputDevice(PaDeviceIndex index)
//----------------------------------------------------------------
// setCallback()
//----------------------------------------------------------------
-PaError PortAudioWrap::setCallback(PaStreamCallback *callback)
+PaError PortAudioWrap::setCallback(PaStreamCallback *callback)
{
m_pStreamCallback = callback;
return paNoError;
}
-
-/*
+
+/*
//----------------------------------------------------------------
// loadData() : create Dummy Data
//----------------------------------------------------------------
-void PortAudioWrap::loadData()
-{
- int i;
- for(i = 0; i < FDMDV_NSPEC; i++)
- {
- m_av_mag[i] = i;
- }
+void PortAudioWrap::loadData()
+{
+ int i;
+ for(i = 0; i < FDMDV_NSPEC; i++)
+ {
+ m_av_mag[i] = i;
+ }
}
-*/
+*/
diff --git a/fdmdv2/src/fdmdv2_pa_wrapper.h b/fdmdv2/src/fdmdv2_pa_wrapper.h
index f3b393b4..25e6047f 100644
--- a/fdmdv2/src/fdmdv2_pa_wrapper.h
+++ b/fdmdv2/src/fdmdv2_pa_wrapper.h
@@ -1,14 +1,14 @@
-//==========================================================================
-// Name: fdmdv2_pa_wrapper.h
-// Purpose: Defines a wrapper class around PortAudio
-// Created: August 12, 2012
-// Initial author: David Witten
-// License:
-//
-// Copyright (C) 2012 David Witten
-//
-// All rights reserved.
-//
+//==========================================================================
+// Name: fdmdv2_pa_wrapper.h
+// Purpose: Defines a wrapper class around PortAudio
+// Created: August 12, 2012
+// Initial author: David Witten
+// License:
+//
+// Copyright (C) 2012 David Witten
+//
+// All rights reserved.
+//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License version 2.1,
// as published by the Free Software Foundation. This program is
@@ -37,81 +37,81 @@ class PortAudioWrap
{
public:
PortAudioWrap();
- ~PortAudioWrap();
+ ~PortAudioWrap();
// float m_av_mag[FDMDV_NSPEC];
-
+
private:
PaStream *m_pStream;
void *m_pUserData;
PaStreamCallback *m_pStreamCallback;
PaStreamFinishedCallback *m_pStreamFinishedCallback;
const PaStreamCallbackTimeInfo *m_pTimeInfo;
- struct FDMDV *m_pFDMDV_state;
+ struct FDMDV *m_pFDMDV_state;
PaStreamParameters m_inputBuffer;
PaStreamParameters m_outputBuffer;
int m_samplerate;
unsigned long m_framesPerBuffer;
PaStreamCallbackFlags m_statusFlags;
- bool m_newdata;
-
- public:
-
- void averageData(float mag_dB[]);
-
- PaDeviceIndex getDefaultInputDevice();
- PaDeviceIndex getDefaultOutputDevice();
- PaStreamParameters *getDeviceInfo(PaDeviceIndex idx);
-
- PaError setFramesPerBuffer(unsigned long size);
- PaError setSampleRate(unsigned long size);
-
- PaError setStreamFlags(PaStreamFlags flags);
- PaError setCallback(PaStreamCallback *m_pStreamCallback);
- PaError setStreamCallback(PaStream *stream, PaStreamCallback* callback) { m_pStreamCallback = callback; return 0;}
- PaError setStreamFinishedCallback(PaStream *stream, PaStreamFinishedCallback* m_pStreamFinishedCallback);
-
+ bool m_newdata;
+
+ public:
+
+ void averageData(float mag_dB[]);
+
+ PaDeviceIndex getDefaultInputDevice();
+ PaDeviceIndex getDefaultOutputDevice();
+ PaStreamParameters *getDeviceInfo(PaDeviceIndex idx);
+
+ PaError setFramesPerBuffer(unsigned long size);
+ PaError setSampleRate(unsigned long size);
+
+ PaError setStreamFlags(PaStreamFlags flags);
+ PaError setCallback(PaStreamCallback *m_pStreamCallback);
+ PaError setStreamCallback(PaStream *stream, PaStreamCallback* callback) { m_pStreamCallback = callback; return 0;}
+ PaError setStreamFinishedCallback(PaStream *stream, PaStreamFinishedCallback* m_pStreamFinishedCallback);
+
void setInputBuffer(const PaStreamParameters& inputBuffer) {this->m_inputBuffer = inputBuffer;}
- PaError setInputDevice(PaDeviceIndex dev);
- PaError setInputChannelCount(int count);
- int getInputChannelCount();
- PaError setInputSampleFormat(PaSampleFormat format);
- PaError setInputSampleRate(PaSampleFormat format);
- PaError setInputLatency(PaTime latency);
- void setInputHostApiStreamInfo(void *info = NULL);
- PaTime getInputDefaultLowLatency();
- const char *getDeviceName(PaDeviceIndex dev);
-
- PaError setOutputDevice(PaDeviceIndex dev);
- PaError setOutputChannelCount(int count);
- const int getOutputChannelCount();
- PaError setOutputSampleFormat(PaSampleFormat format);
- PaError setOutputLatency(PaTime latency);
- void setOutputHostApiStreamInfo(void *info = NULL);
- PaTime getOutputDefaultLowLatency();
-
+ PaError setInputDevice(PaDeviceIndex dev);
+ PaError setInputChannelCount(int count);
+ int getInputChannelCount();
+ PaError setInputSampleFormat(PaSampleFormat format);
+ PaError setInputSampleRate(PaSampleFormat format);
+ PaError setInputLatency(PaTime latency);
+ void setInputHostApiStreamInfo(void *info = NULL);
+ PaTime getInputDefaultLowLatency();
+ const char *getDeviceName(PaDeviceIndex dev);
+
+ PaError setOutputDevice(PaDeviceIndex dev);
+ PaError setOutputChannelCount(int count);
+ const int getOutputChannelCount();
+ PaError setOutputSampleFormat(PaSampleFormat format);
+ PaError setOutputLatency(PaTime latency);
+ void setOutputHostApiStreamInfo(void *info = NULL);
+ PaTime getOutputDefaultLowLatency();
+
void setFdmdvState(FDMDV* fdmdv_state) {this->m_pFDMDV_state = fdmdv_state;}
void setOutputBuffer(const PaStreamParameters& outputBuffer) {this->m_outputBuffer = outputBuffer;}
- void setTimeInfo(PaStreamCallbackTimeInfo* timeInfo) {this->m_pTimeInfo = timeInfo;}
- void setUserData(void* userData) {this->m_pUserData = userData;}
- unsigned long getFramesPerBuffer() const {return m_framesPerBuffer;}
- const PaStreamParameters& getInputBuffer() const {return m_inputBuffer;}
- const PaStreamParameters& getOutputBuffer() const {return m_outputBuffer;}
- const PaStreamCallbackFlags& getStatusFlags() const {return m_statusFlags;}
-
- FDMDV* getFdmdvState() {return m_pFDMDV_state;}
- int getSamplerate() const {return m_samplerate;}
- PaStream* getStream() {return m_pStream;}
- void *getUserData() {return m_pUserData;}
- bool getDataAvail() {return m_newdata;}
- PaError streamStart();
- PaError streamClose();
- PaError streamOpen();
- void terminate();
- void stop();
- void abort();
- bool isOpen() const;
- bool isStopped() const;
- bool isActive() const;
-// void loadData();
-};
+ void setTimeInfo(PaStreamCallbackTimeInfo* timeInfo) {this->m_pTimeInfo = timeInfo;}
+ void setUserData(void* userData) {this->m_pUserData = userData;}
+ unsigned long getFramesPerBuffer() const {return m_framesPerBuffer;}
+ const PaStreamParameters& getInputBuffer() const {return m_inputBuffer;}
+ const PaStreamParameters& getOutputBuffer() const {return m_outputBuffer;}
+ const PaStreamCallbackFlags& getStatusFlags() const {return m_statusFlags;}
+
+ FDMDV* getFdmdvState() {return m_pFDMDV_state;}
+ int getSamplerate() const {return m_samplerate;}
+ PaStream* getStream() {return m_pStream;}
+ void *getUserData() {return m_pUserData;}
+ bool getDataAvail() {return m_newdata;}
+ PaError streamStart();
+ PaError streamClose();
+ PaError streamOpen();
+ void terminate();
+ void stop();
+ void abort();
+ bool isOpen() const;
+ bool isStopped() const;
+ bool isActive() const;
+// void loadData();
+};
diff --git a/fdmdv2/src/fdmdv2_plot.cpp b/fdmdv2/src/fdmdv2_plot.cpp
index 4bcce60c..8413c6c0 100644
--- a/fdmdv2/src/fdmdv2_plot.cpp
+++ b/fdmdv2/src/fdmdv2_plot.cpp
@@ -1,270 +1,270 @@
-//==========================================================================
-// Name: fdmdv2_plot.cpp
-// Purpose: Implements simple wxWidgets application with GUI.
+//==========================================================================
+// Name: fdmdv2_plot.cpp
+// Purpose: Implements simple wxWidgets application with GUI.
// Created: Apr. 9, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//
-// @class $(Name)
-// @author $(User)
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-//==========================================================================
-#include
-#include "fdmdv2_plot.h"
-
-BEGIN_EVENT_TABLE(PlotPanel, wxPanel)
- EVT_PAINT (PlotPanel::OnPaint)
- EVT_MOTION (PlotPanel::OnMouseMove)
- EVT_LEFT_DOWN (PlotPanel::OnMouseDown)
- EVT_LEFT_UP (PlotPanel::OnMouseUp)
- EVT_MOUSEWHEEL (PlotPanel::OnMouseWheelMoved)
- EVT_SIZE (PlotPanel::OnSize)
- EVT_SHOW (PlotPanel::OnShow)
-END_EVENT_TABLE()
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class PlotPanel(wxFrame* parent) : wxPanel(parent)
-//
-// @class $(Name)
-// @author $(User)
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-PlotPanel::PlotPanel(wxFrame* parent) : wxPanel(parent)
-{
- m_pNoteBook = (wxAuiNotebook *) parent;
- m_pTopFrame = (MainFrame *)m_pNoteBook->GetParent();
- m_zoomFactor = 1.0;
- m_pBmp = NULL;
- m_pPix = NULL;
- m_firstPass = true;
- m_line_color = 0;
- m_newdata = false;
- m_clip = false;
- m_use_bitmap = true;
- m_rubberBand = false;
- m_mouseDown = false;
- m_penShortDash = wxPen(wxColor(0xA0, 0xA0, 0xA0), 1, wxPENSTYLE_SHORT_DASH);
- m_penDotDash = wxPen(wxColor(0xD0, 0xD0, 0xD0), 1, wxPENSTYLE_DOT_DASH);
- m_penSolid = wxPen(wxColor(0x00, 0x00, 0x00), 1, wxPENSTYLE_SOLID);
- SetBackgroundStyle(wxBG_STYLE_PAINT);
- SetLabelSize(10.0);
-}
-
-//-------------------------------------------------------------------------
-// ~PlotPanel()
-//-------------------------------------------------------------------------
-PlotPanel::~PlotPanel()
-{
- if(!m_pBmp->IsNull())
- {
- delete m_pBmp;
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//
+// @class $(Name)
+// @author $(User)
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+//==========================================================================
+#include
+#include "fdmdv2_plot.h"
+
+BEGIN_EVENT_TABLE(PlotPanel, wxPanel)
+ EVT_PAINT (PlotPanel::OnPaint)
+ EVT_MOTION (PlotPanel::OnMouseMove)
+ EVT_LEFT_DOWN (PlotPanel::OnMouseDown)
+ EVT_LEFT_UP (PlotPanel::OnMouseUp)
+ EVT_MOUSEWHEEL (PlotPanel::OnMouseWheelMoved)
+ EVT_SIZE (PlotPanel::OnSize)
+ EVT_SHOW (PlotPanel::OnShow)
+END_EVENT_TABLE()
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class PlotPanel(wxFrame* parent) : wxPanel(parent)
+//
+// @class $(Name)
+// @author $(User)
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+PlotPanel::PlotPanel(wxFrame* parent) : wxPanel(parent)
+{
+ m_pNoteBook = (wxAuiNotebook *) parent;
+ m_pTopFrame = (MainFrame *)m_pNoteBook->GetParent();
+ m_zoomFactor = 1.0;
+ m_pBmp = NULL;
+ m_pPix = NULL;
+ m_firstPass = true;
+ m_line_color = 0;
+ m_newdata = false;
+ m_clip = false;
+ m_use_bitmap = true;
+ m_rubberBand = false;
+ m_mouseDown = false;
+ m_penShortDash = wxPen(wxColor(0xA0, 0xA0, 0xA0), 1, wxPENSTYLE_SHORT_DASH);
+ m_penDotDash = wxPen(wxColor(0xD0, 0xD0, 0xD0), 1, wxPENSTYLE_DOT_DASH);
+ m_penSolid = wxPen(wxColor(0x00, 0x00, 0x00), 1, wxPENSTYLE_SOLID);
+ SetBackgroundStyle(wxBG_STYLE_PAINT);
+ SetLabelSize(10.0);
+}
+
+//-------------------------------------------------------------------------
+// ~PlotPanel()
+//-------------------------------------------------------------------------
+PlotPanel::~PlotPanel()
+{
+ if(!m_pBmp->IsNull())
+ {
+ delete m_pBmp;
}
-}
-
-//-------------------------------------------------------------------------
-// GetLabelSize()
-//-------------------------------------------------------------------------
-double PlotPanel::GetLabelSize()
-{
- return m_label_size;
-}
-
-//-------------------------------------------------------------------------
-// SetLabelSize()
-//-------------------------------------------------------------------------
-void PlotPanel::SetLabelSize(double size)
-{
- m_label_size = size;
-}
-
-//-------------------------------------------------------------------------
-// OnShow()
-//-------------------------------------------------------------------------
-void PlotPanel::OnShow(wxShowEvent& event)
-{
- this->Refresh();
-}
-
-//-------------------------------------------------------------------------
-// OnErase()
-//-------------------------------------------------------------------------
-void PlotPanel::OnErase(wxEraseEvent& event)
-{
- event.Skip();
-}
-
-//-------------------------------------------------------------------------
-// OnSize()
-//-------------------------------------------------------------------------
-void PlotPanel::OnSize(wxSizeEvent& event)
-{
- m_rCtrlPrev = m_rCtrl;
- m_rCtrl = GetClientRect();
- if(m_use_bitmap)
- {
- if(!m_oImage.IsOk())
- {
- m_oImage.Create(m_rCtrl.GetWidth(), m_rCtrl.GetHeight(), true);
- }
- else
- {
- m_oImage.Rescale(m_rCtrl.GetWidth(), m_rCtrl.GetHeight());
- }
+}
+
+//-------------------------------------------------------------------------
+// GetLabelSize()
+//-------------------------------------------------------------------------
+double PlotPanel::GetLabelSize()
+{
+ return m_label_size;
+}
+
+//-------------------------------------------------------------------------
+// SetLabelSize()
+//-------------------------------------------------------------------------
+void PlotPanel::SetLabelSize(double size)
+{
+ m_label_size = size;
+}
+
+//-------------------------------------------------------------------------
+// OnShow()
+//-------------------------------------------------------------------------
+void PlotPanel::OnShow(wxShowEvent& event)
+{
+ this->Refresh();
+}
+
+//-------------------------------------------------------------------------
+// OnErase()
+//-------------------------------------------------------------------------
+void PlotPanel::OnErase(wxEraseEvent& event)
+{
+ event.Skip();
+}
+
+//-------------------------------------------------------------------------
+// OnSize()
+//-------------------------------------------------------------------------
+void PlotPanel::OnSize(wxSizeEvent& event)
+{
+ m_rCtrlPrev = m_rCtrl;
+ m_rCtrl = GetClientRect();
+ if(m_use_bitmap)
+ {
+ if(!m_oImage.IsOk())
+ {
+ m_oImage.Create(m_rCtrl.GetWidth(), m_rCtrl.GetHeight(), true);
+ }
+ else
+ {
+ m_oImage.Rescale(m_rCtrl.GetWidth(), m_rCtrl.GetHeight());
+ }
m_pBmp = new wxBitmap(m_oImage, wxBITMAP_SCREEN_DEPTH);
- m_firstPass = true;
- }
-}
-
-//-------------------------------------------------------------------------
-// OnMouseMove()
-//-------------------------------------------------------------------------
-void PlotPanel::OnMouseMove(wxMouseEvent& event)
-{
-// if(m_mouseDown)
-// {
-// paintNow();
-// }
-}
-
-//-------------------------------------------------------------------------
-// OnMouseDown()
-//-------------------------------------------------------------------------
-void PlotPanel::OnMouseDown(wxMouseEvent& event)
-{
- m_mouseDown = true;
-}
-
-//-------------------------------------------------------------------------
-// OnMouseWheelMoved()
-//-------------------------------------------------------------------------
-void PlotPanel::OnMouseWheelMoved(wxMouseEvent& event)
-{
-}
-
-//-------------------------------------------------------------------------
-// OnMouseUp()
-//-------------------------------------------------------------------------
-void PlotPanel::OnMouseUp(wxMouseEvent& event)
-{
- m_mouseDown = false;
-}
-
-//-------------------------------------------------------------------------
-// SetZoomFactor()
-//-------------------------------------------------------------------------
-double PlotPanel::SetZoomFactor(double zf)
-{
- if((zf > 0) && (zf < 5.0))
- {
- m_zoomFactor = zf;
- }
- return zf;
-}
-
-//-------------------------------------------------------------------------
-// GetZoomFactor()
-//-------------------------------------------------------------------------
-double PlotPanel::GetZoomFactor(double zf)
-{
- return m_zoomFactor;
-}
-
-//-------------------------------------------------------------------------
-// draw()
-//-------------------------------------------------------------------------
-void PlotPanel::draw(wxAutoBufferedPaintDC& pDC)
-{
- wxMemoryDC m_mDC;
- m_mDC.SelectObject(*m_pBmp);
- m_rCtrl = GetClientRect();
- m_rGrid = m_rCtrl;
-
- m_rGrid = m_rGrid.Deflate(PLOT_BORDER + (XLEFT_OFFSET/2), (PLOT_BORDER + (YBOTTOM_OFFSET/2)));
- m_rGrid.Offset(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER);
-
- pDC.Clear();
- m_rPlot = wxRect(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER, m_rGrid.GetWidth(), m_rGrid.GetHeight());
- if(m_firstPass)
- {
- m_firstPass = false;
- m_mDC.FloodFill(0, 0, VERY_LTGREY_COLOR);
-
- // Draw a filled rectangle with aborder
- wxBrush ltGraphBkgBrush = wxBrush(DARK_BLUE_COLOR);
- m_mDC.SetBrush(ltGraphBkgBrush);
- m_mDC.SetPen(wxPen(BLACK_COLOR, 0));
- m_mDC.DrawRectangle(m_rPlot);
- }
- if(m_newdata)
- {
- m_newdata = false;
- int t = m_rPlot.GetTop();
- int l = m_rPlot.GetLeft();
- int r = m_rPlot.GetRight();
- int h = m_rPlot.GetHeight();
- int w = m_rPlot.GetWidth();
- pDC.Blit(l, t, w, h, &m_mDC, l, t);
- }
- drawGraticule(pDC);
- m_mDC.SetBrush(wxNullBrush);
- m_mDC.SelectObject(wxNullBitmap);
-}
-
-//-------------------------------------------------------------------------
-// drawGraticule()
-//-------------------------------------------------------------------------
-void PlotPanel::drawGraticule(wxAutoBufferedPaintDC& pDC)
-{
- int p;
- char buf[15];
- wxString s;
-
- // Vertical gridlines
- pDC.SetPen(m_penShortDash);
- for(p = (PLOT_BORDER + XLEFT_OFFSET + GRID_INCREMENT); p < ((m_rGrid.GetWidth() - XLEFT_OFFSET) + GRID_INCREMENT); p += GRID_INCREMENT)
- {
- pDC.DrawLine(p, (m_rGrid.GetHeight() + PLOT_BORDER), p, PLOT_BORDER);
- }
- // Horizontal gridlines
- pDC.SetPen(m_penDotDash);
- for(p = (m_rGrid.GetHeight() - GRID_INCREMENT); p > PLOT_BORDER; p -= GRID_INCREMENT)
- {
- pDC.DrawLine(PLOT_BORDER + XLEFT_OFFSET, (p + PLOT_BORDER), (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), (p + PLOT_BORDER));
- }
- // Label the X-Axis
- pDC.SetPen(wxPen(GREY_COLOR, 1));
- for(p = GRID_INCREMENT; p < (m_rGrid.GetWidth() - YBOTTOM_OFFSET); p += GRID_INCREMENT)
- {
- sprintf(buf, "%1.1f Hz",(double)(p / 10));
- pDC.DrawText(buf, p - PLOT_BORDER + XLEFT_OFFSET, m_rGrid.GetHeight() + YBOTTOM_OFFSET/2);
- }
- // Label the Y-Axis
- //for(p = GRID_INCREMENT; p < (h - YBOTTOM_OFFSET); p += GRID_INCREMENT)
- for(p = (m_rGrid.GetHeight() - GRID_INCREMENT); p > PLOT_BORDER; p -= GRID_INCREMENT)
- {
- sprintf(buf, "%1.0f", (double)((m_rGrid.GetHeight() - p) * -10));
- pDC.DrawText(buf, XLEFT_TEXT_OFFSET, p);
- }
-}
-
-//-------------------------------------------------------------------------
-// paintEvent()
-//
-// Called by the system of by wxWidgets when the panel needs
-// to be redrawn. You can also trigger this call by calling
-// Refresh()/Update().
-//-------------------------------------------------------------------------
-void PlotPanel::OnPaint(wxPaintEvent & evt)
-{
- wxAutoBufferedPaintDC pdc(this);
- draw(pdc);
-}
-
+ m_firstPass = true;
+ }
+}
+
+//-------------------------------------------------------------------------
+// OnMouseMove()
+//-------------------------------------------------------------------------
+void PlotPanel::OnMouseMove(wxMouseEvent& event)
+{
+// if(m_mouseDown)
+// {
+// paintNow();
+// }
+}
+
+//-------------------------------------------------------------------------
+// OnMouseDown()
+//-------------------------------------------------------------------------
+void PlotPanel::OnMouseDown(wxMouseEvent& event)
+{
+ m_mouseDown = true;
+}
+
+//-------------------------------------------------------------------------
+// OnMouseWheelMoved()
+//-------------------------------------------------------------------------
+void PlotPanel::OnMouseWheelMoved(wxMouseEvent& event)
+{
+}
+
+//-------------------------------------------------------------------------
+// OnMouseUp()
+//-------------------------------------------------------------------------
+void PlotPanel::OnMouseUp(wxMouseEvent& event)
+{
+ m_mouseDown = false;
+}
+
+//-------------------------------------------------------------------------
+// SetZoomFactor()
+//-------------------------------------------------------------------------
+double PlotPanel::SetZoomFactor(double zf)
+{
+ if((zf > 0) && (zf < 5.0))
+ {
+ m_zoomFactor = zf;
+ }
+ return zf;
+}
+
+//-------------------------------------------------------------------------
+// GetZoomFactor()
+//-------------------------------------------------------------------------
+double PlotPanel::GetZoomFactor(double zf)
+{
+ return m_zoomFactor;
+}
+
+//-------------------------------------------------------------------------
+// draw()
+//-------------------------------------------------------------------------
+void PlotPanel::draw(wxAutoBufferedPaintDC& pDC)
+{
+ wxMemoryDC m_mDC;
+ m_mDC.SelectObject(*m_pBmp);
+ m_rCtrl = GetClientRect();
+ m_rGrid = m_rCtrl;
+
+ m_rGrid = m_rGrid.Deflate(PLOT_BORDER + (XLEFT_OFFSET/2), (PLOT_BORDER + (YBOTTOM_OFFSET/2)));
+ m_rGrid.Offset(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER);
+
+ pDC.Clear();
+ m_rPlot = wxRect(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER, m_rGrid.GetWidth(), m_rGrid.GetHeight());
+ if(m_firstPass)
+ {
+ m_firstPass = false;
+ m_mDC.FloodFill(0, 0, VERY_LTGREY_COLOR);
+
+ // Draw a filled rectangle with aborder
+ wxBrush ltGraphBkgBrush = wxBrush(DARK_BLUE_COLOR);
+ m_mDC.SetBrush(ltGraphBkgBrush);
+ m_mDC.SetPen(wxPen(BLACK_COLOR, 0));
+ m_mDC.DrawRectangle(m_rPlot);
+ }
+ if(m_newdata)
+ {
+ m_newdata = false;
+ int t = m_rPlot.GetTop();
+ int l = m_rPlot.GetLeft();
+ int r = m_rPlot.GetRight();
+ int h = m_rPlot.GetHeight();
+ int w = m_rPlot.GetWidth();
+ pDC.Blit(l, t, w, h, &m_mDC, l, t);
+ }
+ drawGraticule(pDC);
+ m_mDC.SetBrush(wxNullBrush);
+ m_mDC.SelectObject(wxNullBitmap);
+}
+
+//-------------------------------------------------------------------------
+// drawGraticule()
+//-------------------------------------------------------------------------
+void PlotPanel::drawGraticule(wxAutoBufferedPaintDC& pDC)
+{
+ int p;
+ char buf[15];
+ wxString s;
+
+ // Vertical gridlines
+ pDC.SetPen(m_penShortDash);
+ for(p = (PLOT_BORDER + XLEFT_OFFSET + GRID_INCREMENT); p < ((m_rGrid.GetWidth() - XLEFT_OFFSET) + GRID_INCREMENT); p += GRID_INCREMENT)
+ {
+ pDC.DrawLine(p, (m_rGrid.GetHeight() + PLOT_BORDER), p, PLOT_BORDER);
+ }
+ // Horizontal gridlines
+ pDC.SetPen(m_penDotDash);
+ for(p = (m_rGrid.GetHeight() - GRID_INCREMENT); p > PLOT_BORDER; p -= GRID_INCREMENT)
+ {
+ pDC.DrawLine(PLOT_BORDER + XLEFT_OFFSET, (p + PLOT_BORDER), (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), (p + PLOT_BORDER));
+ }
+ // Label the X-Axis
+ pDC.SetPen(wxPen(GREY_COLOR, 1));
+ for(p = GRID_INCREMENT; p < (m_rGrid.GetWidth() - YBOTTOM_OFFSET); p += GRID_INCREMENT)
+ {
+ sprintf(buf, "%1.1f Hz",(double)(p / 10));
+ pDC.DrawText(buf, p - PLOT_BORDER + XLEFT_OFFSET, m_rGrid.GetHeight() + YBOTTOM_OFFSET/2);
+ }
+ // Label the Y-Axis
+ //for(p = GRID_INCREMENT; p < (h - YBOTTOM_OFFSET); p += GRID_INCREMENT)
+ for(p = (m_rGrid.GetHeight() - GRID_INCREMENT); p > PLOT_BORDER; p -= GRID_INCREMENT)
+ {
+ sprintf(buf, "%1.0f", (double)((m_rGrid.GetHeight() - p) * -10));
+ pDC.DrawText(buf, XLEFT_TEXT_OFFSET, p);
+ }
+}
+
+//-------------------------------------------------------------------------
+// paintEvent()
+//
+// Called by the system of by wxWidgets when the panel needs
+// to be redrawn. You can also trigger this call by calling
+// Refresh()/Update().
+//-------------------------------------------------------------------------
+void PlotPanel::OnPaint(wxPaintEvent & evt)
+{
+ wxAutoBufferedPaintDC pdc(this);
+ draw(pdc);
+}
+
diff --git a/fdmdv2/src/fdmdv2_plot.h b/fdmdv2/src/fdmdv2_plot.h
index 2cb9f155..5c7f8e81 100644
--- a/fdmdv2/src/fdmdv2_plot.h
+++ b/fdmdv2/src/fdmdv2_plot.h
@@ -1,137 +1,137 @@
-//==========================================================================
+//==========================================================================
// Name: fdmdv2_plot.h
// Purpose: Declares simple wxWidgets application with GUI
// Created: Apr. 10, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-//#include "fdmdv2_main.h"
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License: BSD License (other licenses may apply to other
+// components of this project)
+//==========================================================================
+//#include "fdmdv2_main.h"
#ifndef __FDMDV2_PLOT__
#define __FDMDV2_PLOT__
-#include
-#include
-#include
-#include
-#include
-
-#define MAX_ZOOM 7
-#define MAX_BMP_X (400 * MAX_ZOOM)
-#define MAX_BMP_Y (400 * MAX_ZOOM)
-#define DATA_LINE_HEIGHT 10
-#define TEXT_BASELINE_OFFSET_Y -5
+#include
+#include
+#include
+#include
+#include
-
-#define wxUSE_FILEDLG 1
-#define wxUSE_LIBPNG 1
-#define wxUSE_LIBJPEG 1
-#define wxUSE_GIF 1
-#define wxUSE_PCX 1
-#define wxUSE_LIBTIFF 1
-
-#define PLOT_BORDER 3
-#define XLEFT_OFFSET 30
-#define XLEFT_TEXT_OFFSET 8
-#define YBOTTOM_OFFSET 25
-#define GRID_INCREMENT 50
-
-#define BLACK_COLOR wxColor(0x00, 0x00, 0x00)
-#define GREY_COLOR wxColor(0x80, 0x80, 0x80)
-#define DARK_GREY_COLOR wxColor(0x40, 0x40, 0x40)
-#define MEDIUM_GREY_COLOR wxColor(0xC0, 0xC0, 0xC0)
-#define LIGHT_GREY_COLOR wxColor(0xE0, 0xE0, 0xE0)
-#define VERY_LTGREY_COLOR wxColor(0xF8, 0xF8, 0xF8)
-#define WHITE_COLOR wxColor(0xFF, 0xFF, 0xFF)
-
-#define DARK_BLUE_COLOR wxColor(0x00, 0x00, 0x60)
-#define BLUE_COLOR wxColor(0x00, 0x00, 0xFF)
-#define LIGHT_BLUE_COLOR wxColor(0x80, 0x80, 0xFF)
-
-#define RED_COLOR wxColor(0xFF, 0x5E, 0x5E)
-#define LIGHT_RED_COLOR wxColor(0xFF, 0xE0, 0xE0)
-#define DARK_RED_COLOR wxColor(0xFF, 0x00, 0x00)
-#define PINK_COLOR wxColor(0xFF, 0x80, 0xFF)
-
-#define LIGHT_GREEN_COLOR wxColor(0xE3, 0xFF, 0xE0)
-#define GREEN_COLOR wxColor(0x95, 0xFF, 0x8A)
-#define DARK_GREEN_COLOR wxColor(0x20, 0xFF, 0x08)
-#define VERY_GREEN_COLOR wxColor(0x00, 0xFF, 0x00)
-
-#define YELLOW_COLOR wxColor(0xFF, 0xFF, 0x5E)
-#define LIGHT_YELLOW_COLOR wxColor(0xFF, 0xFF, 0xB5)
-#define DARK_YELLOW_COLOR wxColor(0xFF, 0xFF, 0x08)
-
-class MainFrame;
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class PlotPanel
-//
-// @class $(Name)
-// @author $(User)
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-class PlotPanel : public wxPanel
-{
- public:
- PlotPanel(wxFrame* parent);
- ~PlotPanel();
- wxPen m_penShortDash;
- wxPen m_penDotDash;
- wxPen m_penSolid;
- wxRect m_rCtrlPrev;
- wxRect m_rCtrl;
- wxRect m_rGrid;
- wxRect m_rPlot;
- MainFrame *m_pTopFrame;
- wxAuiNotebook *m_pNoteBook;
- double m_label_size;
- wxSize m_Bufsz;
- bool m_newdata;
- wxImage m_oImage;
- wxBitmap *m_pBmp;
- wxNativePixelData *m_pPix;
-
- // some useful events
- void OnMouseMove(wxMouseEvent& event);
- void OnMouseDown(wxMouseEvent& event);
- void OnMouseUp(wxMouseEvent& event);
- void OnMouseWheelMoved(wxMouseEvent& event);
+#define MAX_ZOOM 7
+#define MAX_BMP_X (400 * MAX_ZOOM)
+#define MAX_BMP_Y (400 * MAX_ZOOM)
+#define DATA_LINE_HEIGHT 10
+#define TEXT_BASELINE_OFFSET_Y -5
+
+
+#define wxUSE_FILEDLG 1
+#define wxUSE_LIBPNG 1
+#define wxUSE_LIBJPEG 1
+#define wxUSE_GIF 1
+#define wxUSE_PCX 1
+#define wxUSE_LIBTIFF 1
+
+#define PLOT_BORDER 3
+#define XLEFT_OFFSET 30
+#define XLEFT_TEXT_OFFSET 8
+#define YBOTTOM_OFFSET 25
+#define GRID_INCREMENT 50
+
+#define BLACK_COLOR wxColor(0x00, 0x00, 0x00)
+#define GREY_COLOR wxColor(0x80, 0x80, 0x80)
+#define DARK_GREY_COLOR wxColor(0x40, 0x40, 0x40)
+#define MEDIUM_GREY_COLOR wxColor(0xC0, 0xC0, 0xC0)
+#define LIGHT_GREY_COLOR wxColor(0xE0, 0xE0, 0xE0)
+#define VERY_LTGREY_COLOR wxColor(0xF8, 0xF8, 0xF8)
+#define WHITE_COLOR wxColor(0xFF, 0xFF, 0xFF)
+
+#define DARK_BLUE_COLOR wxColor(0x00, 0x00, 0x60)
+#define BLUE_COLOR wxColor(0x00, 0x00, 0xFF)
+#define LIGHT_BLUE_COLOR wxColor(0x80, 0x80, 0xFF)
+
+#define RED_COLOR wxColor(0xFF, 0x5E, 0x5E)
+#define LIGHT_RED_COLOR wxColor(0xFF, 0xE0, 0xE0)
+#define DARK_RED_COLOR wxColor(0xFF, 0x00, 0x00)
+#define PINK_COLOR wxColor(0xFF, 0x80, 0xFF)
+
+#define LIGHT_GREEN_COLOR wxColor(0xE3, 0xFF, 0xE0)
+#define GREEN_COLOR wxColor(0x95, 0xFF, 0x8A)
+#define DARK_GREEN_COLOR wxColor(0x20, 0xFF, 0x08)
+#define VERY_GREEN_COLOR wxColor(0x00, 0xFF, 0x00)
+
+#define YELLOW_COLOR wxColor(0xFF, 0xFF, 0x5E)
+#define LIGHT_YELLOW_COLOR wxColor(0xFF, 0xFF, 0xB5)
+#define DARK_YELLOW_COLOR wxColor(0xFF, 0xFF, 0x08)
+
+class MainFrame;
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class PlotPanel
+//
+// @class $(Name)
+// @author $(User)
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+class PlotPanel : public wxPanel
+{
+ public:
+ PlotPanel(wxFrame* parent);
+ ~PlotPanel();
+ wxPen m_penShortDash;
+ wxPen m_penDotDash;
+ wxPen m_penSolid;
+ wxRect m_rCtrlPrev;
+ wxRect m_rCtrl;
+ wxRect m_rGrid;
+ wxRect m_rPlot;
+ MainFrame *m_pTopFrame;
+ wxAuiNotebook *m_pNoteBook;
+ double m_label_size;
+ wxSize m_Bufsz;
+ bool m_newdata;
+ wxImage m_oImage;
+ wxBitmap *m_pBmp;
+ wxNativePixelData *m_pPix;
+
+ // some useful events
+ void OnMouseMove(wxMouseEvent& event);
+ void OnMouseDown(wxMouseEvent& event);
+ void OnMouseUp(wxMouseEvent& event);
+ void OnMouseWheelMoved(wxMouseEvent& event);
void OnClose(wxCloseEvent& event ){ event.Skip(); }
- void OnSize( wxSizeEvent& event );
- void OnErase(wxEraseEvent& event);
- void OnPaint(wxPaintEvent& event);
- //void OnUpdateUI( wxUpdateUIEvent& event ){ event.Skip(); }
+ void OnSize( wxSizeEvent& event );
+ void OnErase(wxEraseEvent& event);
+ void OnPaint(wxPaintEvent& event);
+ //void OnUpdateUI( wxUpdateUIEvent& event ){ event.Skip(); }
- void paintEvent(wxPaintEvent & evt);
- virtual void draw(wxAutoBufferedPaintDC& pdc);
- virtual void drawGraticule(wxAutoBufferedPaintDC& pdc);
- virtual double SetZoomFactor(double zf);
- virtual double GetZoomFactor(double zf);
- virtual void OnShow(wxShowEvent& event);
- virtual double GetLabelSize();
- virtual void SetLabelSize(double size);
+ void paintEvent(wxPaintEvent & evt);
+ virtual void draw(wxAutoBufferedPaintDC& pdc);
+ virtual void drawGraticule(wxAutoBufferedPaintDC& pdc);
+ virtual double SetZoomFactor(double zf);
+ virtual double GetZoomFactor(double zf);
+ virtual void OnShow(wxShowEvent& event);
+ virtual double GetLabelSize();
+ virtual void SetLabelSize(double size);
- protected:
+ protected:
int m_x;
int m_y;
- int m_left;
+ int m_left;
int m_top;
int m_prev_w;
int m_prev_h;
int m_prev_x;
int m_prev_y;
- bool m_use_bitmap;
- bool m_clip;
- bool m_rubberBand;
- bool m_mouseDown;
- bool m_firstPass;
- double m_zoomFactor;
+ bool m_use_bitmap;
+ bool m_clip;
+ bool m_rubberBand;
+ bool m_mouseDown;
+ bool m_firstPass;
+ double m_zoomFactor;
int m_greyscale;
- int m_line_color;
- DECLARE_EVENT_TABLE()
-};
-#endif //__FDMDV2_PLOT__
+ int m_line_color;
+ DECLARE_EVENT_TABLE()
+};
+#endif //__FDMDV2_PLOT__
diff --git a/fdmdv2/src/fdmdv2_plot_scalar.cpp b/fdmdv2/src/fdmdv2_plot_scalar.cpp
index c026a787..edb32212 100644
--- a/fdmdv2/src/fdmdv2_plot_scalar.cpp
+++ b/fdmdv2/src/fdmdv2_plot_scalar.cpp
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_plot_scalar.cpp
-// Purpose: Implements a waterfall plot derivative of fdmdv2_plot.
+//==========================================================================
+// Name: fdmdv2_plot_scalar.cpp
+// Purpose: Implements a waterfall plot derivative of fdmdv2_plot.
// Created: June 22, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License:
-//
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,194 +21,194 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
-#include
-#include "wx/wx.h"
-#include "fdmdv2_main.h"
-#include "fdmdv2_plot_scalar.h"
-
-BEGIN_EVENT_TABLE(PlotScalar, PlotPanel)
- EVT_PAINT (PlotScalar::OnPaint)
- EVT_MOTION (PlotScalar::OnMouseMove)
- EVT_LEFT_DOWN (PlotScalar::OnMouseDown)
- EVT_LEFT_UP (PlotScalar::OnMouseUp)
- EVT_MOUSEWHEEL (PlotScalar::OnMouseWheelMoved)
- EVT_SIZE (PlotScalar::OnSize)
- EVT_SHOW (PlotScalar::OnShow)
-// EVT_ERASE_BACKGROUND(PlotScalar::OnErase)
-END_EVENT_TABLE()
-
-//----------------------------------------------------------------
-// PlotScalar()
-//----------------------------------------------------------------
-PlotScalar::PlotScalar(wxFrame* parent, int x_max_, int y_max_): PlotPanel(parent)
+//==========================================================================
+#include
+#include "wx/wx.h"
+#include "fdmdv2_main.h"
+#include "fdmdv2_plot_scalar.h"
+
+BEGIN_EVENT_TABLE(PlotScalar, PlotPanel)
+ EVT_PAINT (PlotScalar::OnPaint)
+ EVT_MOTION (PlotScalar::OnMouseMove)
+ EVT_LEFT_DOWN (PlotScalar::OnMouseDown)
+ EVT_LEFT_UP (PlotScalar::OnMouseUp)
+ EVT_MOUSEWHEEL (PlotScalar::OnMouseWheelMoved)
+ EVT_SIZE (PlotScalar::OnSize)
+ EVT_SHOW (PlotScalar::OnShow)
+// EVT_ERASE_BACKGROUND(PlotScalar::OnErase)
+END_EVENT_TABLE()
+
+//----------------------------------------------------------------
+// PlotScalar()
+//----------------------------------------------------------------
+PlotScalar::PlotScalar(wxFrame* parent, int x_max_, int y_max_): PlotPanel(parent)
+{
+ int i;
+
+ //align(FL_ALIGN_TOP);
+ //labelsize(10);
+
+ m_x_max = x_max_;
+ m_y_max = y_max_;
+ m_mem = new float[m_x_max];
+
+ for(i = 0; i < m_x_max; i++)
+ {
+ m_mem[i] = 0.0;
+ }
+ m_prev_w = 0;
+ m_prev_h = 0;
+ m_prev_x = 0;
+ m_prev_y = 0;
+ m_index = 0;
+}
+
+//----------------------------------------------------------------
+// ~PlotScalar()
+//----------------------------------------------------------------
+PlotScalar::~PlotScalar()
+{
+ delete m_mem;
+}
+
+//----------------------------------------------------------------
+// add_new_sample()
+//----------------------------------------------------------------
+void PlotScalar::add_new_sample(float sample)
+{
+ m_new_sample = sample;
+}
+
+//----------------------------------------------------------------
+// clip()
+//----------------------------------------------------------------
+int PlotScalar::clip(int y1)
{
- int i;
-
- //align(FL_ALIGN_TOP);
- //labelsize(10);
-
- m_x_max = x_max_;
- m_y_max = y_max_;
- m_mem = new float[m_x_max];
-
- for(i = 0; i < m_x_max; i++)
- {
- m_mem[i] = 0.0;
- }
- m_prev_w = 0;
- m_prev_h = 0;
- m_prev_x = 0;
- m_prev_y = 0;
- m_index = 0;
-}
-
-//----------------------------------------------------------------
-// ~PlotScalar()
-//----------------------------------------------------------------
-PlotScalar::~PlotScalar()
-{
- delete m_mem;
-}
-
-//----------------------------------------------------------------
-// add_new_sample()
-//----------------------------------------------------------------
-void PlotScalar::add_new_sample(float sample)
-{
- m_new_sample = sample;
-}
-
-//----------------------------------------------------------------
-// clip()
-//----------------------------------------------------------------
-int PlotScalar::clip(int y1)
-{
if(y1 > (m_rCtrl.GetHeight()/2 - 10))
- {
- y1 = m_rCtrl.GetHeight()/2 - 10;
- }
- if(y1 < -(m_rCtrl.GetHeight()/2 - 10))
+ {
+ y1 = m_rCtrl.GetHeight()/2 - 10;
+ }
+ if(y1 < -(m_rCtrl.GetHeight()/2 - 10))
{
y1 = -(m_rCtrl.GetHeight()/2 - 10);
- }
- return y1;
-}
-
-//----------------------------------------------------------------
-// draw()
-//----------------------------------------------------------------
-void PlotScalar::draw(wxAutoBufferedPaintDC& dc)
-{
- float x_scale;
- float y_scale;
+ }
+ return y1;
+}
+
+//----------------------------------------------------------------
+// draw()
+//----------------------------------------------------------------
+void PlotScalar::draw(wxAutoBufferedPaintDC& dc)
+{
+ float x_scale;
+ float y_scale;
int i;
int x1;
int y1;
int x2;
- int y2;
- char label[100];
- wxPen pen;
-
- /* detect resizing of window */
- if((m_rCtrl.GetHeight() != m_prev_h) || (m_rCtrl.GetWidth() != m_prev_w) || (m_x != m_prev_x) || (m_y != m_prev_y))
- {
- dc.SetPen(BLACK_COLOR);
- dc.DrawRectangle(m_x, m_y, m_rCtrl.GetWidth(), m_rCtrl.GetHeight());
- m_prev_h = m_rCtrl.GetHeight();
- m_prev_w = m_rCtrl.GetWidth();
- m_prev_x = m_x;
- m_prev_y = m_y;
- }
-
- //fl_push_clip(m_x, m_y, m_w, m_h);
- x_scale = (float)m_x_max;
- y_scale = (float)m_rCtrl.GetHeight() /(2.0 * m_y_max);
-
- // erase last sample
- dc.SetPen(BLACK_COLOR);
- x1 = x_scale * m_index + m_x;
- y1 = y_scale * m_mem[m_index];
- y1 = clip(y1);
- y1 = m_y + m_rCtrl.GetHeight()/2 - y1;
+ int y2;
+ char label[100];
+ wxPen pen;
+
+ /* detect resizing of window */
+ if((m_rCtrl.GetHeight() != m_prev_h) || (m_rCtrl.GetWidth() != m_prev_w) || (m_x != m_prev_x) || (m_y != m_prev_y))
+ {
+ dc.SetPen(BLACK_COLOR);
+ dc.DrawRectangle(m_x, m_y, m_rCtrl.GetWidth(), m_rCtrl.GetHeight());
+ m_prev_h = m_rCtrl.GetHeight();
+ m_prev_w = m_rCtrl.GetWidth();
+ m_prev_x = m_x;
+ m_prev_y = m_y;
+ }
+
+ //fl_push_clip(m_x, m_y, m_w, m_h);
+ x_scale = (float)m_x_max;
+ y_scale = (float)m_rCtrl.GetHeight() /(2.0 * m_y_max);
+
+ // erase last sample
+ dc.SetPen(BLACK_COLOR);
+ x1 = x_scale * m_index + m_x;
+ y1 = y_scale * m_mem[m_index];
+ y1 = clip(y1);
+ y1 = m_y + m_rCtrl.GetHeight()/2 - y1;
dc.DrawPoint(x1, y1);
-
- // draw new sample
- dc.SetPen(GREEN_COLOR);
- x1 = x_scale * m_index + m_x;
- y1 = y_scale * m_new_sample;
- y1 = clip(y1);
- y1 = m_y + m_rCtrl.GetHeight()/2 - y1;
+
+ // draw new sample
+ dc.SetPen(GREEN_COLOR);
+ x1 = x_scale * m_index + m_x;
+ y1 = y_scale * m_new_sample;
+ y1 = clip(y1);
+ y1 = m_y + m_rCtrl.GetHeight()/2 - y1;
dc.DrawPoint(x1, y1);
- m_mem[m_index] = m_new_sample;
- m_index++;
- if(m_index >= m_x_max)
- {
- m_index = 0;
- }
-
- // y axis graticule
- m_step = 10;
- while((2.0 * m_y_max/m_step) > 10)
- {
- m_step *= 2.0;
- }
- while((2.0 * m_y_max/m_step) < 4)
- {
- m_step /= 2.0;
- }
- pen = dc.GetPen();
- pen.SetColour(DARK_GREEN_COLOR);
- pen.SetStyle(wxPENSTYLE_DOT);
- dc.SetPen(pen);
- for(i =- m_y_max; i < m_y_max; i += m_step)
- {
- x1 = m_x;
- y1 = m_y + m_rCtrl.GetHeight()/2 - i * y_scale;
- x2 = m_x + m_rCtrl.GetWidth();
- y2 = y1;
+ m_mem[m_index] = m_new_sample;
+ m_index++;
+ if(m_index >= m_x_max)
+ {
+ m_index = 0;
+ }
+
+ // y axis graticule
+ m_step = 10;
+ while((2.0 * m_y_max/m_step) > 10)
+ {
+ m_step *= 2.0;
+ }
+ while((2.0 * m_y_max/m_step) < 4)
+ {
+ m_step /= 2.0;
+ }
+ pen = dc.GetPen();
+ pen.SetColour(DARK_GREEN_COLOR);
+ pen.SetStyle(wxPENSTYLE_DOT);
+ dc.SetPen(pen);
+ for(i =- m_y_max; i < m_y_max; i += m_step)
+ {
+ x1 = m_x;
+ y1 = m_y + m_rCtrl.GetHeight()/2 - i * y_scale;
+ x2 = m_x + m_rCtrl.GetWidth();
+ y2 = y1;
dc.DrawLine(x1, y1, x2, y2);
- }
-
- // y axis graticule labels
- pen = dc.GetPen();
- pen.SetColour(GREEN_COLOR);
- pen.SetStyle(wxPENSTYLE_DOT);
- dc.SetPen(pen);
- for(i =- m_y_max; i < m_y_max; i += m_step)
- {
- x1 = m_x;
- y1 = m_y + m_rCtrl.GetHeight()/2 - i * y_scale;
- sprintf(label, "%d", i);
- wxSize sz = dc.GetTextExtent(label);
- dc.DrawLabel(label, wxRect(x1, y1, sz.GetWidth(), sz.GetHeight()), wxALIGN_LEFT);
- }
- //fl_pop_clip();
+ }
+
+ // y axis graticule labels
+ pen = dc.GetPen();
+ pen.SetColour(GREEN_COLOR);
+ pen.SetStyle(wxPENSTYLE_DOT);
+ dc.SetPen(pen);
+ for(i =- m_y_max; i < m_y_max; i += m_step)
+ {
+ x1 = m_x;
+ y1 = m_y + m_rCtrl.GetHeight()/2 - i * y_scale;
+ sprintf(label, "%d", i);
+ wxSize sz = dc.GetTextExtent(label);
+ dc.DrawLabel(label, wxRect(x1, y1, sz.GetWidth(), sz.GetHeight()), wxALIGN_LEFT);
+ }
+ //fl_pop_clip();
+}
+
+//----------------------------------------------------------------
+// OnPaint()
+//----------------------------------------------------------------
+void PlotScalar::OnPaint(wxPaintEvent& event)
+{
+ wxAutoBufferedPaintDC dc(this);
+ draw(dc);
+}
+
+//----------------------------------------------------------------
+// OnSize()
+//----------------------------------------------------------------
+void PlotScalar::OnSize(wxSizeEvent& event)
+{
+// wxAutoBufferedPaintDC dc(this);
+// draw(dc);
+}
+
+//----------------------------------------------------------------
+// OnShow()
+//----------------------------------------------------------------
+void PlotScalar::OnShow(wxShowEvent& event)
+{
+// wxAutoBufferedPaintDC dc(this);
+ // draw(dc);
}
-
-//----------------------------------------------------------------
-// OnPaint()
-//----------------------------------------------------------------
-void PlotScalar::OnPaint(wxPaintEvent& event)
-{
- wxAutoBufferedPaintDC dc(this);
- draw(dc);
-}
-
-//----------------------------------------------------------------
-// OnSize()
-//----------------------------------------------------------------
-void PlotScalar::OnSize(wxSizeEvent& event)
-{
-// wxAutoBufferedPaintDC dc(this);
-// draw(dc);
-}
-
-//----------------------------------------------------------------
-// OnShow()
-//----------------------------------------------------------------
-void PlotScalar::OnShow(wxShowEvent& event)
-{
-// wxAutoBufferedPaintDC dc(this);
- // draw(dc);
-}
diff --git a/fdmdv2/src/fdmdv2_plot_scalar.h b/fdmdv2/src/fdmdv2_plot_scalar.h
index fe630c34..493248b4 100644
--- a/fdmdv2/src/fdmdv2_plot_scalar.h
+++ b/fdmdv2/src/fdmdv2_plot_scalar.h
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_plot_scalar.h
-// Purpose: Defines a scalar plot derivative of fdmdv2_plot.
+//==========================================================================
+// Name: fdmdv2_plot_scalar.h
+// Purpose: Defines a scalar plot derivative of fdmdv2_plot.
// Created: June 22, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License:
-//
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,42 +21,42 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
+//==========================================================================
#ifndef __FDMDV2_PLOT_SCALAR__
#define __FDMDV2_PLOT_SCALAR__
-
-#include "fdmdv2_plot.h"
-#include "fdmdv2_defines.h"
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class PlotScalar
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-class PlotScalar: public PlotPanel
-{
- public:
-
- //PlotScalar(wxFrame* parent, int x, int y, int w, int h, int x_max_, int y_max_, const char name[]);
- PlotScalar(wxFrame* parent, int x_max_, int y_max_);
- ~PlotScalar();
- void add_new_sample(float sample);
-
- protected:
-
- int m_x_max;
- int m_y_max;
- float *m_mem; /* array of x_max samples */
- float m_new_sample;
- int m_index;
- int m_step;
-
- int clip(int y1);
- void draw(wxAutoBufferedPaintDC& dc);
- void OnPaint(wxPaintEvent& event);
- void OnSize(wxSizeEvent& event);
- void OnShow(wxShowEvent& event);
-
- DECLARE_EVENT_TABLE()
-};
-
+
+#include "fdmdv2_plot.h"
+#include "fdmdv2_defines.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class PlotScalar
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+class PlotScalar: public PlotPanel
+{
+ public:
+
+ //PlotScalar(wxFrame* parent, int x, int y, int w, int h, int x_max_, int y_max_, const char name[]);
+ PlotScalar(wxFrame* parent, int x_max_, int y_max_);
+ ~PlotScalar();
+ void add_new_sample(float sample);
+
+ protected:
+
+ int m_x_max;
+ int m_y_max;
+ float *m_mem; /* array of x_max samples */
+ float m_new_sample;
+ int m_index;
+ int m_step;
+
+ int clip(int y1);
+ void draw(wxAutoBufferedPaintDC& dc);
+ void OnPaint(wxPaintEvent& event);
+ void OnSize(wxSizeEvent& event);
+ void OnShow(wxShowEvent& event);
+
+ DECLARE_EVENT_TABLE()
+};
+
#endif // __FDMDV2_PLOT_SCALAR__
-
+
diff --git a/fdmdv2/src/fdmdv2_plot_scatter.cpp b/fdmdv2/src/fdmdv2_plot_scatter.cpp
index 8d487e4b..71b4a6c2 100644
--- a/fdmdv2/src/fdmdv2_plot_scatter.cpp
+++ b/fdmdv2/src/fdmdv2_plot_scatter.cpp
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_plot_scatter.cpp
-// Purpose: Implements a scatter plot derivative of fdmdv2_plot.
-// Created: June 24, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License:
-//
+//==========================================================================
+// Name: fdmdv2_plot_scatter.cpp
+// Purpose: Implements a scatter plot derivative of fdmdv2_plot.
+// Created: June 24, 2012
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,28 +21,28 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
-#include
-#include "wx/wx.h"
-#include "fdmdv2_plot_scatter.h"
-
-BEGIN_EVENT_TABLE(PlotScatter, PlotPanel)
- EVT_PAINT (PlotScatter::OnPaint)
- EVT_MOTION (PlotScatter::OnMouseMove)
- EVT_LEFT_DOWN (PlotScatter::OnMouseDown)
- EVT_LEFT_UP (PlotScatter::OnMouseUp)
- EVT_MOUSEWHEEL (PlotScatter::OnMouseWheelMoved)
- EVT_SIZE (PlotScatter::OnSize)
- EVT_SHOW (PlotScatter::OnShow)
-// EVT_ERASE_BACKGROUND(PlotScatter::OnErase)
-END_EVENT_TABLE()
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// PlotScatter
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-PlotScatter::PlotScatter(wxFrame* parent) : PlotPanel(parent)
-{
- int i;
+//==========================================================================
+#include
+#include "wx/wx.h"
+#include "fdmdv2_plot_scatter.h"
+
+BEGIN_EVENT_TABLE(PlotScatter, PlotPanel)
+ EVT_PAINT (PlotScatter::OnPaint)
+ EVT_MOTION (PlotScatter::OnMouseMove)
+ EVT_LEFT_DOWN (PlotScatter::OnMouseDown)
+ EVT_LEFT_UP (PlotScatter::OnMouseUp)
+ EVT_MOUSEWHEEL (PlotScatter::OnMouseWheelMoved)
+ EVT_SIZE (PlotScatter::OnSize)
+ EVT_SHOW (PlotScatter::OnShow)
+// EVT_ERASE_BACKGROUND(PlotScatter::OnErase)
+END_EVENT_TABLE()
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// PlotScatter
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+PlotScatter::PlotScatter(wxFrame* parent) : PlotPanel(parent)
+{
+ int i;
//align(FL_ALIGN_TOP);
//labelsize(10);
@@ -58,9 +58,9 @@ PlotScatter::PlotScatter(wxFrame* parent) : PlotPanel(parent)
m_prev_y = 0;
}
-//----------------------------------------------------------------
-// draw()
-//----------------------------------------------------------------
+//----------------------------------------------------------------
+// draw()
+//----------------------------------------------------------------
void PlotScatter::draw(wxAutoBufferedPaintDC& dc)
{
float x_scale;
@@ -94,7 +94,7 @@ void PlotScatter::draw(wxAutoBufferedPaintDC& dc)
for(i=0; i.
//
-//==========================================================================
+//==========================================================================
#ifndef __FDMDV2_PLOT_SCATTER__
#define __FDMDV2_PLOT_SCATTER__
-
-#include "comp.h"
-#include "fdmdv2_plot.h"
-#include "fdmdv2_defines.h"
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class PlotScatter
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+#include "comp.h"
+#include "fdmdv2_plot.h"
+#include "fdmdv2_defines.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class PlotScatter
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
class PlotScatter : public PlotPanel
{
public:
- PlotScatter(wxFrame* parent);
+ PlotScatter(wxFrame* parent);
~PlotScatter(){};
protected:
@@ -43,12 +43,12 @@ class PlotScatter : public PlotPanel
COMP m_new_samples[FDMDV_NSYM];
void draw(wxAutoBufferedPaintDC& dc);
- void add_new_samples(COMP samples[]);
- void OnPaint(wxPaintEvent& event);
- void OnSize(wxSizeEvent& event);
- void OnShow(wxShowEvent& event);
+ void add_new_samples(COMP samples[]);
+ void OnPaint(wxPaintEvent& event);
+ void OnSize(wxSizeEvent& event);
+ void OnShow(wxShowEvent& event);
- DECLARE_EVENT_TABLE()
-};
+ DECLARE_EVENT_TABLE()
+};
#endif //__FDMDV2_PLOT_SCATTER__
diff --git a/fdmdv2/src/fdmdv2_plot_spectrum.cpp b/fdmdv2/src/fdmdv2_plot_spectrum.cpp
index 177391c7..c04e6d0d 100644
--- a/fdmdv2/src/fdmdv2_plot_spectrum.cpp
+++ b/fdmdv2/src/fdmdv2_plot_spectrum.cpp
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_plot_waterfall.cpp
-// Purpose: Implements a waterfall plot derivative of fdmdv2_plot.
-// Created: June 23, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License:
-//
+//==========================================================================
+// Name: fdmdv2_plot_waterfall.cpp
+// Purpose: Implements a waterfall plot derivative of fdmdv2_plot.
+// Created: June 23, 2012
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,172 +21,172 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
-#include
-#include "wx/wx.h"
-
-#include "fdmdv2_main.h"
-#include "fdmdv2_plot_spectrum.h"
-
-extern float *g_avmag;
-
-BEGIN_EVENT_TABLE(PlotSpectrum, PlotPanel)
- EVT_MOTION (PlotSpectrum::OnMouseMove)
- EVT_LEFT_DOWN (PlotSpectrum::OnMouseDown)
- EVT_LEFT_UP (PlotSpectrum::OnMouseUp)
- EVT_MOUSEWHEEL (PlotSpectrum::OnMouseWheelMoved)
- EVT_PAINT (PlotSpectrum::OnPaint)
- EVT_SHOW (PlotSpectrum::OnShow)
-END_EVENT_TABLE()
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class PlotSpectrum
-//
-// @class $(Name)
-// @author $(User)
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-PlotSpectrum::PlotSpectrum(wxFrame* parent): PlotPanel(parent)
-{
- m_greyscale = 0;
- m_Bufsz = GetMaxClientSize();
- m_newdata = false;
- m_firstPass = true;
- m_line_color = 0;
- SetLabelSize(10.0);
-}
-
-//----------------------------------------------------------------
-// ~PlotSpectrum()
-//----------------------------------------------------------------
+//==========================================================================
+#include
+#include "wx/wx.h"
+
+#include "fdmdv2_main.h"
+#include "fdmdv2_plot_spectrum.h"
+
+extern float g_avmag[];
+
+BEGIN_EVENT_TABLE(PlotSpectrum, PlotPanel)
+ EVT_MOTION (PlotSpectrum::OnMouseMove)
+ EVT_LEFT_DOWN (PlotSpectrum::OnMouseDown)
+ EVT_LEFT_UP (PlotSpectrum::OnMouseUp)
+ EVT_MOUSEWHEEL (PlotSpectrum::OnMouseWheelMoved)
+ EVT_PAINT (PlotSpectrum::OnPaint)
+ EVT_SHOW (PlotSpectrum::OnShow)
+END_EVENT_TABLE()
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class PlotSpectrum
+//
+// @class $(Name)
+// @author $(User)
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+PlotSpectrum::PlotSpectrum(wxFrame* parent): PlotPanel(parent)
+{
+ m_greyscale = 0;
+ m_Bufsz = GetMaxClientSize();
+ m_newdata = false;
+ m_firstPass = true;
+ m_line_color = 0;
+ SetLabelSize(10.0);
+}
+
+//----------------------------------------------------------------
+// ~PlotSpectrum()
+//----------------------------------------------------------------
PlotSpectrum::~PlotSpectrum()
-{
-}
-
-//----------------------------------------------------------------
-// draw()
-//----------------------------------------------------------------
+{
+}
+
+//----------------------------------------------------------------
+// draw()
+//----------------------------------------------------------------
void PlotSpectrum::draw(wxAutoBufferedPaintDC& pDC)
-{
- wxMemoryDC m_mDC;
- m_mDC.SelectObject(*m_pBmp);
- m_rCtrl = GetClientRect();
- m_rGrid = m_rCtrl;
-
- m_rGrid = m_rGrid.Deflate(PLOT_BORDER + (XLEFT_OFFSET/2), (PLOT_BORDER + (YBOTTOM_OFFSET/2)));
- m_rGrid.Offset(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER);
-
- pDC.Clear();
- m_rPlot = wxRect(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER, m_rGrid.GetWidth(), m_rGrid.GetHeight());
- if(m_firstPass)
- {
- m_firstPass = false;
- m_mDC.Clear();
- m_mDC.FloodFill(0, 0, VERY_LTGREY_COLOR);
-
- // Draw a filled rectangle with aborder
-// wxBrush ltGraphBkgBrush = wxBrush(LIGHT_YELLOW_COLOR);
- wxBrush ltGraphBkgBrush = wxBrush(DARK_GREY_COLOR);
- m_mDC.SetBrush(ltGraphBkgBrush);
- m_mDC.SetPen(wxPen(BLACK_COLOR, 0));
- m_mDC.DrawRectangle(m_rPlot);
- }
- if(m_newdata)
- {
- m_newdata = false;
-// plotPixelData(dc);
-#ifdef _USE_TIMER
- int t = m_rPlot.GetTop();
- int l = m_rPlot.GetLeft();
- int h = m_rPlot.GetHeight();
- int w = m_rPlot.GetWidth();
- //double stride = w / FDMDV_NSPEC;
-
- wxPen pen;
- pen.SetColour(DARK_GREEN_COLOR);
- pen.SetWidth(1);
- m_mDC.SetPen(pen);
-
-// float *pData = m_pTopFrame->m_rxPa->m_av_mag;
- float *pData = g_avmag;
- for(int x = 1; x < w; x++)
- {
-// m_mDC.DrawPoint(x, (int)pData[x]);
- m_mDC.DrawLine((x - 1), (int)pData[(x - 1)] + (h / 2), x, (int)pData[x] + (h / 2));
- }
- pDC.Blit(l, t, w, h, &m_mDC, l, t);
-#endif
- drawGraticule(pDC);
- }
- m_mDC.SetBrush(wxNullBrush);
- m_mDC.SelectObject(wxNullBitmap);
+{
+ wxMemoryDC m_mDC;
+ m_mDC.SelectObject(*m_pBmp);
+ m_rCtrl = GetClientRect();
+ m_rGrid = m_rCtrl;
+
+ m_rGrid = m_rGrid.Deflate(PLOT_BORDER + (XLEFT_OFFSET/2), (PLOT_BORDER + (YBOTTOM_OFFSET/2)));
+ m_rGrid.Offset(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER);
+
+ pDC.Clear();
+ m_rPlot = wxRect(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER, m_rGrid.GetWidth(), m_rGrid.GetHeight());
+ if(m_firstPass)
+ {
+ m_firstPass = false;
+ m_mDC.Clear();
+ m_mDC.FloodFill(0, 0, VERY_LTGREY_COLOR);
+
+ // Draw a filled rectangle with aborder
+// wxBrush ltGraphBkgBrush = wxBrush(LIGHT_YELLOW_COLOR);
+ wxBrush ltGraphBkgBrush = wxBrush(DARK_GREY_COLOR);
+ m_mDC.SetBrush(ltGraphBkgBrush);
+ m_mDC.SetPen(wxPen(BLACK_COLOR, 0));
+ m_mDC.DrawRectangle(m_rPlot);
+ }
+ if(m_newdata)
+ {
+ m_newdata = false;
+// plotPixelData(dc);
+#ifdef _USE_TIMER
+ int t = m_rPlot.GetTop();
+ int l = m_rPlot.GetLeft();
+ int h = m_rPlot.GetHeight();
+ int w = m_rPlot.GetWidth();
+ //double stride = w / FDMDV_NSPEC;
+
+ wxPen pen;
+ pen.SetColour(DARK_GREEN_COLOR);
+ pen.SetWidth(1);
+ m_mDC.SetPen(pen);
+
+// float *pData = m_pTopFrame->m_rxPa->m_av_mag;
+ float *pData = g_avmag;
+ for(int x = 1; x < w; x++)
+ {
+// m_mDC.DrawPoint(x, (int)pData[x]);
+ m_mDC.DrawLine((x - 1), (int)pData[(x - 1)] + (h / 2), x, (int)pData[x] + (h / 2));
+ }
+ pDC.Blit(l, t, w, h, &m_mDC, l, t);
+#endif
+ drawGraticule(pDC);
+ }
+ m_mDC.SetBrush(wxNullBrush);
+ m_mDC.SelectObject(wxNullBitmap);
+}
+
+//-------------------------------------------------------------------------
+// drawGraticule()
+//-------------------------------------------------------------------------
+void PlotSpectrum::drawGraticule(wxAutoBufferedPaintDC& dc)
+{
+ int p;
+ char buf[15];
+ wxString s;
+ //int h_mod_inc = 0;
+
+ // Vertical gridlines
+ dc.SetPen(m_penShortDash);
+ for(p = (PLOT_BORDER + XLEFT_OFFSET + GRID_INCREMENT); p < ((m_rGrid.GetWidth() - XLEFT_OFFSET) + GRID_INCREMENT); p += GRID_INCREMENT)
+ {
+ dc.DrawLine(p, (m_rGrid.GetHeight() + PLOT_BORDER), p, PLOT_BORDER);
+ }
+
+ int y_zero = (m_rGrid.GetHeight() - m_top) / 2 ;
+ dc.SetPen(m_penSolid);
+ dc.DrawLine(PLOT_BORDER + XLEFT_OFFSET, y_zero, (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), y_zero);
+ sprintf(buf, "%6.0f", 0.0);
+ dc.DrawText(buf, XLEFT_TEXT_OFFSET, y_zero + TEXT_BASELINE_OFFSET_Y);
+
+ // Horizontal gridlines
+ dc.SetPen(m_penDotDash);
+ for(p = 0; (y_zero + p) < m_rGrid.GetHeight() ; p += GRID_INCREMENT)
+ {
+ if(p > 0)
+ {
+ dc.DrawLine(PLOT_BORDER + XLEFT_OFFSET, (y_zero + p), (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), (y_zero + p));
+ sprintf(buf, "%6.0f", (double)(p) * -10);
+ dc.DrawText(buf, XLEFT_TEXT_OFFSET, (y_zero + p + TEXT_BASELINE_OFFSET_Y));
+
+ dc.DrawLine(PLOT_BORDER + XLEFT_OFFSET, (y_zero - p), (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), (y_zero - p));
+ sprintf(buf, "%6.0f", (double)(p) * 10);
+ dc.DrawText(buf, XLEFT_TEXT_OFFSET, (y_zero - p + TEXT_BASELINE_OFFSET_Y));
+ }
+ }
+
+ // Label the X-Axis
+ dc.SetPen(wxPen(GREY_COLOR, 1));
+ for(p = GRID_INCREMENT; p < (m_rCtrl.GetWidth() - YBOTTOM_OFFSET); p += GRID_INCREMENT)
+ {
+ sprintf(buf, "%1.1f Hz",(double)(p / 10));
+ dc.DrawText(buf, p - PLOT_BORDER + XLEFT_OFFSET, m_rCtrl.GetHeight() + YBOTTOM_OFFSET/2);
+ }
+}
+
+//----------------------------------------------------------------
+// OnPaint()
+//----------------------------------------------------------------
+void PlotSpectrum::OnPaint(wxPaintEvent& event)
+{
+ wxAutoBufferedPaintDC dc(this);
+ draw(dc);
+}
+
+//----------------------------------------------------------------
+// OnShow()
+//----------------------------------------------------------------
+void PlotSpectrum::OnShow(wxShowEvent& event)
+{
+// wxAutoBufferedPaintDC dc(this);
+// draw(dc);
}
-
-//-------------------------------------------------------------------------
-// drawGraticule()
-//-------------------------------------------------------------------------
-void PlotSpectrum::drawGraticule(wxAutoBufferedPaintDC& dc)
-{
- int p;
- char buf[15];
- wxString s;
- //int h_mod_inc = 0;
-
- // Vertical gridlines
- dc.SetPen(m_penShortDash);
- for(p = (PLOT_BORDER + XLEFT_OFFSET + GRID_INCREMENT); p < ((m_rGrid.GetWidth() - XLEFT_OFFSET) + GRID_INCREMENT); p += GRID_INCREMENT)
- {
- dc.DrawLine(p, (m_rGrid.GetHeight() + PLOT_BORDER), p, PLOT_BORDER);
- }
-
- int y_zero = (m_rGrid.GetHeight() - m_top) / 2 ;
- dc.SetPen(m_penSolid);
- dc.DrawLine(PLOT_BORDER + XLEFT_OFFSET, y_zero, (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), y_zero);
- sprintf(buf, "%6.0f", 0.0);
- dc.DrawText(buf, XLEFT_TEXT_OFFSET, y_zero + TEXT_BASELINE_OFFSET_Y);
-
- // Horizontal gridlines
- dc.SetPen(m_penDotDash);
- for(p = 0; (y_zero + p) < m_rGrid.GetHeight() ; p += GRID_INCREMENT)
- {
- if(p > 0)
- {
- dc.DrawLine(PLOT_BORDER + XLEFT_OFFSET, (y_zero + p), (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), (y_zero + p));
- sprintf(buf, "%6.0f", (double)(p) * -10);
- dc.DrawText(buf, XLEFT_TEXT_OFFSET, (y_zero + p + TEXT_BASELINE_OFFSET_Y));
-
- dc.DrawLine(PLOT_BORDER + XLEFT_OFFSET, (y_zero - p), (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), (y_zero - p));
- sprintf(buf, "%6.0f", (double)(p) * 10);
- dc.DrawText(buf, XLEFT_TEXT_OFFSET, (y_zero - p + TEXT_BASELINE_OFFSET_Y));
- }
- }
-
- // Label the X-Axis
- dc.SetPen(wxPen(GREY_COLOR, 1));
- for(p = GRID_INCREMENT; p < (m_rCtrl.GetWidth() - YBOTTOM_OFFSET); p += GRID_INCREMENT)
- {
- sprintf(buf, "%1.1f Hz",(double)(p / 10));
- dc.DrawText(buf, p - PLOT_BORDER + XLEFT_OFFSET, m_rCtrl.GetHeight() + YBOTTOM_OFFSET/2);
- }
-}
-
-//----------------------------------------------------------------
-// OnPaint()
-//----------------------------------------------------------------
-void PlotSpectrum::OnPaint(wxPaintEvent& event)
-{
- wxAutoBufferedPaintDC dc(this);
- draw(dc);
-}
-
-//----------------------------------------------------------------
-// OnShow()
-//----------------------------------------------------------------
-void PlotSpectrum::OnShow(wxShowEvent& event)
-{
-// wxAutoBufferedPaintDC dc(this);
-// draw(dc);
-}
diff --git a/fdmdv2/src/fdmdv2_plot_spectrum.h b/fdmdv2/src/fdmdv2_plot_spectrum.h
index dc524e65..03e51b2c 100644
--- a/fdmdv2/src/fdmdv2_plot_spectrum.h
+++ b/fdmdv2/src/fdmdv2_plot_spectrum.h
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_plot_spectrum.h
-// Purpose: Defines a spectrum plot derived from fdmdv2_plot class.
+//==========================================================================
+// Name: fdmdv2_plot_spectrum.h
+// Purpose: Defines a spectrum plot derived from fdmdv2_plot class.
// Created: June 22, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License:
-//
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,31 +21,31 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
+//==========================================================================
#ifndef __FDMDV2_PLOT_SPECTRUM__
#define __FDMDV2_PLOT_SPECTRUM__
-
-#include "fdmdv2_plot.h"
-#include "fdmdv2_defines.h"
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class Waterfall
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-class PlotSpectrum : public PlotPanel
+#include "fdmdv2_plot.h"
+#include "fdmdv2_defines.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class Waterfall
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+class PlotSpectrum : public PlotPanel
{
public:
PlotSpectrum(wxFrame* parent);
~PlotSpectrum();
-
+
protected:
- void OnPaint(wxPaintEvent& event);
- void OnSize(wxSizeEvent& event);
- void OnShow(wxShowEvent& event);
- void drawGraticule(wxAutoBufferedPaintDC& dc);
- void draw(wxAutoBufferedPaintDC& dc);
+ void OnPaint(wxPaintEvent& event);
+ void OnSize(wxSizeEvent& event);
+ void OnShow(wxShowEvent& event);
+ void drawGraticule(wxAutoBufferedPaintDC& dc);
+ void draw(wxAutoBufferedPaintDC& dc);
- DECLARE_EVENT_TABLE()
+ DECLARE_EVENT_TABLE()
};
-
+
#endif //__FDMDV2_PLOT_SPECTRUM__
diff --git a/fdmdv2/src/fdmdv2_plot_waterfall.cpp b/fdmdv2/src/fdmdv2_plot_waterfall.cpp
index 939a8123..6466ae5e 100644
--- a/fdmdv2/src/fdmdv2_plot_waterfall.cpp
+++ b/fdmdv2/src/fdmdv2_plot_waterfall.cpp
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_plot_waterfall.cpp
-// Purpose: Implements a waterfall plot derivative of fdmdv2_plot.
+//==========================================================================
+// Name: fdmdv2_plot_waterfall.cpp
+// Purpose: Implements a waterfall plot derivative of fdmdv2_plot.
// Created: June 22, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License:
-//
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,99 +21,99 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
-#include
-#include "wx/wx.h"
-#include "fdmdv2_main.h"
+//==========================================================================
+#include
+#include "wx/wx.h"
+#include "fdmdv2_main.h"
#include "fdmdv2_plot_waterfall.h"
-
-/*
-
- Notes:
-
- The height h() pixels represents WATERFALL_SECS_Y of data. Every DT
- seconds we get a vector of FDMDV_NSPEC spectrum samples which we use
- to update the last row. The height of each row is dy pixels, which
- maps to DT seconds. We call each dy high rectangle of pixels a
- block.
-
-*/
-
-extern float g_avmag[];
-
-BEGIN_EVENT_TABLE(PlotWaterfall, PlotPanel)
- EVT_PAINT (PlotWaterfall::OnPaint)
- EVT_MOTION (PlotWaterfall::OnMouseMove)
- EVT_LEFT_DOWN (PlotWaterfall::OnMouseDown)
- EVT_LEFT_UP (PlotWaterfall::OnMouseUp)
- EVT_MOUSEWHEEL (PlotWaterfall::OnMouseWheelMoved)
- EVT_SIZE (PlotWaterfall::OnSize)
- EVT_SHOW (PlotWaterfall::OnShow)
-// EVT_ERASE_BACKGROUND(PlotWaterfall::OnErase)
-END_EVENT_TABLE()
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class WaterfallPlot
-//
-// @class WaterfallPlot
-// @author David Witten
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+
+/*
+
+ Notes:
+
+ The height h() pixels represents WATERFALL_SECS_Y of data. Every DT
+ seconds we get a vector of FDMDV_NSPEC spectrum samples which we use
+ to update the last row. The height of each row is dy pixels, which
+ maps to DT seconds. We call each dy high rectangle of pixels a
+ block.
+
+*/
+
+extern float g_avmag[];
+
+BEGIN_EVENT_TABLE(PlotWaterfall, PlotPanel)
+ EVT_PAINT (PlotWaterfall::OnPaint)
+ EVT_MOTION (PlotWaterfall::OnMouseMove)
+ EVT_LEFT_DOWN (PlotWaterfall::OnMouseDown)
+ EVT_LEFT_UP (PlotWaterfall::OnMouseUp)
+ EVT_MOUSEWHEEL (PlotWaterfall::OnMouseWheelMoved)
+ EVT_SIZE (PlotWaterfall::OnSize)
+ EVT_SHOW (PlotWaterfall::OnShow)
+// EVT_ERASE_BACKGROUND(PlotWaterfall::OnErase)
+END_EVENT_TABLE()
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class WaterfallPlot
+//
+// @class WaterfallPlot
+// @author David Witten
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
PlotWaterfall::PlotWaterfall(wxFrame* parent): PlotPanel(parent)
-{
+{
for(int i = 0; i < 255; i++)
{
m_heatmap_lut[i] = heatmap((float)i, 0.0, 255.0);
}
- m_greyscale = 0;
- m_Bufsz = GetMaxClientSize();
- m_newdata = false;
- m_firstPass = true;
- m_line_color = 0;
- SetLabelSize(10.0);
+ m_greyscale = 0;
+ m_Bufsz = GetMaxClientSize();
+ m_newdata = false;
+ m_firstPass = true;
+ m_line_color = 0;
+ SetLabelSize(10.0);
}
-//----------------------------------------------------------------
-// paintEvent()
-//
-// @class $(Name)
-// @author $(User)
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-// Called by the system of by wxWidgets when the panel needs
-// to be redrawn. You can also trigger this call by calling
-// Refresh()/Update().
-//----------------------------------------------------------------
-void PlotWaterfall::OnPaint(wxPaintEvent & evt)
-{
- wxAutoBufferedPaintDC pdc(this);
- draw(pdc);
-}
-
-//----------------------------------------------------------------
-// OnShow()
-//----------------------------------------------------------------
-void PlotWaterfall::OnShow(wxShowEvent& event)
-{
-}
-
-//----------------------------------------------------------------
-// ~PlotWaterfall()
-//----------------------------------------------------------------
+//----------------------------------------------------------------
+// paintEvent()
+//
+// @class $(Name)
+// @author $(User)
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+// Called by the system of by wxWidgets when the panel needs
+// to be redrawn. You can also trigger this call by calling
+// Refresh()/Update().
+//----------------------------------------------------------------
+void PlotWaterfall::OnPaint(wxPaintEvent & evt)
+{
+ wxAutoBufferedPaintDC pdc(this);
+ draw(pdc);
+}
+
+//----------------------------------------------------------------
+// OnShow()
+//----------------------------------------------------------------
+void PlotWaterfall::OnShow(wxShowEvent& event)
+{
+}
+
+//----------------------------------------------------------------
+// ~PlotWaterfall()
+//----------------------------------------------------------------
PlotWaterfall::~PlotWaterfall()
-{
-}
-
-//----------------------------------------------------------------
-// heatmap()
+{
+}
+
+//----------------------------------------------------------------
+// heatmap()
// map val to a rgb colour
// from http://eddiema.ca/2011/01/21/c-sharp-heatmaps/
-//----------------------------------------------------------------
+//----------------------------------------------------------------
unsigned PlotWaterfall::heatmap(float val, float min, float max)
{
unsigned r = 0;
@@ -144,166 +144,166 @@ unsigned PlotWaterfall::heatmap(float val, float min, float max)
//printf("%f %x %x %x\n", val, r, g, b);
return (b << 16) + (g << 8) + r;
}
-
-#define PLOT_BOTTOM 0
-#define PLOT_TOP 1
-
-//static long paint_count;
-
-//----------------------------------------------------------------
-// draw()
-//----------------------------------------------------------------
+
+#define PLOT_BOTTOM 0
+#define PLOT_TOP 1
+
+//static long paint_count;
+
+//----------------------------------------------------------------
+// draw()
+//----------------------------------------------------------------
void PlotWaterfall::draw(wxAutoBufferedPaintDC& pDC)
-{
- wxMemoryDC m_mDC;
- m_mDC.SelectObject(*m_pBmp);
- m_rCtrl = GetClientRect();
- m_rGrid = m_rCtrl;
-
- m_rGrid = m_rGrid.Deflate(PLOT_BORDER + (XLEFT_OFFSET/2), (PLOT_BORDER + (YBOTTOM_OFFSET/2)));
- m_rGrid.Offset(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER);
-
- pDC.Clear();
-// m_mDC.Clear();
- m_rPlot = wxRect(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER, m_rGrid.GetWidth(), m_rGrid.GetHeight());
-// if(m_firstPass)
-// {
-// m_firstPass = false;
-// m_mDC.FloodFill(0, 0, VERY_LTGREY_COLOR);
-
- // Draw a filled rectangle with aborder
-// wxBrush ltGraphBkgBrush = wxBrush(DARK_BLUE_COLOR);
-// m_mDC.SetBrush(ltGraphBkgBrush);
-// m_mDC.SetPen(wxPen(BLACK_COLOR, 0));
-// m_mDC.DrawRectangle(m_rPlot);
-
-// }
- wxBrush ltGraphBkgBrush = wxBrush(DARK_BLUE_COLOR);
- pDC.SetBrush(ltGraphBkgBrush);
- pDC.SetPen(wxPen(BLACK_COLOR, 0));
- pDC.DrawRectangle(m_rPlot);
- drawGraticule(pDC);
- if(m_newdata)
- {
- m_newdata = false;
-// plotPixelData(dc);
-//#ifdef _USE_TIMER
- int t = m_rPlot.GetTop();
- int l = m_rPlot.GetLeft();
- int h = m_rPlot.GetHeight();
- int w = m_rPlot.GetWidth();
- int t2 = t + 1;
- int w2 = w - 1;
- int ht = (h - DATA_LINE_HEIGHT);
-
- drawData(); // m_mDC, PLOT_BOTTOM);
- m_mDC.StretchBlit(l, t2, w2, ht, &m_mDC, l, t2 + DATA_LINE_HEIGHT, w2, ht - 2);
-// pDC.Blit(l, t, w, h, &m_mDC, l, t); // Scroll Up from Bottom
- pDC.StretchBlit(l, (h - t) + 4, w, (-h) + 4, &m_mDC, l, t, w, h); // Scroll Down from top
-//#endif
- drawGraticule(pDC);
- }
- m_mDC.SetBrush(wxNullBrush);
- m_mDC.SelectObject(wxNullBitmap);
-}
-
-//-------------------------------------------------------------------------
-// drawData()
-//-------------------------------------------------------------------------
-void PlotWaterfall::drawData() //wxMemoryDC& pDC)
-{
- wxNativePixelData dPix = wxNativePixelData(*m_pBmp, m_rCtrl);
- m_pPix = &dPix;
- if(m_pPix == NULL)
- {
- return;
- }
- wxNativePixelData::Iterator p(*m_pPix);
-
- int w = m_rPlot.GetWidth();
- int h = m_rPlot.GetHeight();
- p.Offset(*m_pPix, XLEFT_OFFSET + 3, h - (DATA_LINE_HEIGHT - 2));
- for(int y = 0; y < DATA_LINE_HEIGHT; ++y)
- {
- wxNativePixelData::Iterator rowStart = p;
- for(int x = 0; x < (w - 1); ++x, ++p)
- {
-// p.Red() = m_pTopFrame->m_rxPa->m_av_mag[x];
-// p.Green() = m_pTopFrame->m_rxPa->m_av_mag[x];
-// p.Blue() = m_pTopFrame->m_rxPa->m_av_mag[x];
-
- p.Red() = g_avmag[x];
- p.Green() = g_avmag[x];
- p.Blue() = g_avmag[x];
- }
- p = rowStart;
- p.OffsetY(*m_pPix, 1);
- }
-}
-
-//-------------------------------------------------------------------------
-// drawGraticule()
-//-------------------------------------------------------------------------
-void PlotWaterfall::drawGraticule(wxAutoBufferedPaintDC& pDC)
-{
- int p;
- char buf[15];
-
- wxString s;
-
- wxBrush ltGraphBkgBrush;
- ltGraphBkgBrush.SetStyle(wxBRUSHSTYLE_TRANSPARENT);
- ltGraphBkgBrush.SetColour(*wxBLACK);
- pDC.SetBrush(ltGraphBkgBrush);
- pDC.SetPen(wxPen(BLACK_COLOR, 1));
-
- // Vertical gridlines
- pDC.SetPen(m_penShortDash);
- for(p = (PLOT_BORDER + XLEFT_OFFSET + GRID_INCREMENT); p < ((m_rGrid.GetWidth() - XLEFT_OFFSET) + GRID_INCREMENT); p += GRID_INCREMENT)
- {
- pDC.DrawLine(p, (m_rGrid.GetHeight() + PLOT_BORDER), p, PLOT_BORDER);
- }
- // Horizontal gridlines
- pDC.SetPen(m_penDotDash);
- for(p = (m_rGrid.GetHeight() - GRID_INCREMENT); p > PLOT_BORDER; p -= GRID_INCREMENT)
- {
- pDC.DrawLine(PLOT_BORDER + XLEFT_OFFSET, (p + PLOT_BORDER), (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), (p + PLOT_BORDER));
- }
- // Label the X-Axis
- pDC.SetPen(wxPen(GREY_COLOR, 1));
- for(p = GRID_INCREMENT; p < (m_rGrid.GetWidth() - YBOTTOM_OFFSET); p += GRID_INCREMENT)
- {
- sprintf(buf, "%1.1f Hz",(double)(p / 10));
- pDC.DrawText(buf, p - PLOT_BORDER + XLEFT_OFFSET, m_rGrid.GetHeight() + YBOTTOM_OFFSET/3);
- }
- // Label the Y-Axis
- for(p = (m_rGrid.GetHeight() - GRID_INCREMENT); p > PLOT_BORDER; p -= GRID_INCREMENT)
- {
- sprintf(buf, "%1.0f", (double)((m_rGrid.GetHeight() - p) * -10));
- pDC.DrawText(buf, XLEFT_TEXT_OFFSET, p);
- }
-}
-
-//-------------------------------------------------------------------------
-// plotPixelData()
-//-------------------------------------------------------------------------
-void PlotWaterfall::plotPixelData(wxAutoBufferedPaintDC& dc)
-{
- float spec_index_per_px;
+{
+ wxMemoryDC m_mDC;
+ m_mDC.SelectObject(*m_pBmp);
+ m_rCtrl = GetClientRect();
+ m_rGrid = m_rCtrl;
+
+ m_rGrid = m_rGrid.Deflate(PLOT_BORDER + (XLEFT_OFFSET/2), (PLOT_BORDER + (YBOTTOM_OFFSET/2)));
+ m_rGrid.Offset(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER);
+
+ pDC.Clear();
+// m_mDC.Clear();
+ m_rPlot = wxRect(PLOT_BORDER + XLEFT_OFFSET, PLOT_BORDER, m_rGrid.GetWidth(), m_rGrid.GetHeight());
+// if(m_firstPass)
+// {
+// m_firstPass = false;
+// m_mDC.FloodFill(0, 0, VERY_LTGREY_COLOR);
+
+ // Draw a filled rectangle with aborder
+// wxBrush ltGraphBkgBrush = wxBrush(DARK_BLUE_COLOR);
+// m_mDC.SetBrush(ltGraphBkgBrush);
+// m_mDC.SetPen(wxPen(BLACK_COLOR, 0));
+// m_mDC.DrawRectangle(m_rPlot);
+
+// }
+ wxBrush ltGraphBkgBrush = wxBrush(DARK_BLUE_COLOR);
+ pDC.SetBrush(ltGraphBkgBrush);
+ pDC.SetPen(wxPen(BLACK_COLOR, 0));
+ pDC.DrawRectangle(m_rPlot);
+ drawGraticule(pDC);
+ if(m_newdata)
+ {
+ m_newdata = false;
+// plotPixelData(dc);
+//#ifdef _USE_TIMER
+ int t = m_rPlot.GetTop();
+ int l = m_rPlot.GetLeft();
+ int h = m_rPlot.GetHeight();
+ int w = m_rPlot.GetWidth();
+ int t2 = t + 1;
+ int w2 = w - 1;
+ int ht = (h - DATA_LINE_HEIGHT);
+
+ drawData(); // m_mDC, PLOT_BOTTOM);
+ m_mDC.StretchBlit(l, t2, w2, ht, &m_mDC, l, t2 + DATA_LINE_HEIGHT, w2, ht - 2);
+// pDC.Blit(l, t, w, h, &m_mDC, l, t); // Scroll Up from Bottom
+ pDC.StretchBlit(l, (h - t) + 4, w, (-h) + 4, &m_mDC, l, t, w, h); // Scroll Down from top
+//#endif
+ drawGraticule(pDC);
+ }
+ m_mDC.SetBrush(wxNullBrush);
+ m_mDC.SelectObject(wxNullBitmap);
+}
+
+//-------------------------------------------------------------------------
+// drawData()
+//-------------------------------------------------------------------------
+void PlotWaterfall::drawData() //wxMemoryDC& pDC)
+{
+ wxNativePixelData dPix = wxNativePixelData(*m_pBmp, m_rCtrl);
+ m_pPix = &dPix;
+ if(m_pPix == NULL)
+ {
+ return;
+ }
+ wxNativePixelData::Iterator p(*m_pPix);
+
+ int w = m_rPlot.GetWidth();
+ int h = m_rPlot.GetHeight();
+ p.Offset(*m_pPix, XLEFT_OFFSET + 3, h - (DATA_LINE_HEIGHT - 2));
+ for(int y = 0; y < DATA_LINE_HEIGHT; ++y)
+ {
+ wxNativePixelData::Iterator rowStart = p;
+ for(int x = 0; x < (w - 1); ++x, ++p)
+ {
+// p.Red() = m_pTopFrame->m_rxPa->m_av_mag[x];
+// p.Green() = m_pTopFrame->m_rxPa->m_av_mag[x];
+// p.Blue() = m_pTopFrame->m_rxPa->m_av_mag[x];
+
+ p.Red() = g_avmag[x];
+ p.Green() = g_avmag[x];
+ p.Blue() = g_avmag[x];
+ }
+ p = rowStart;
+ p.OffsetY(*m_pPix, 1);
+ }
+}
+
+//-------------------------------------------------------------------------
+// drawGraticule()
+//-------------------------------------------------------------------------
+void PlotWaterfall::drawGraticule(wxAutoBufferedPaintDC& pDC)
+{
+ int p;
+ char buf[15];
+
+ wxString s;
+
+ wxBrush ltGraphBkgBrush;
+ ltGraphBkgBrush.SetStyle(wxBRUSHSTYLE_TRANSPARENT);
+ ltGraphBkgBrush.SetColour(*wxBLACK);
+ pDC.SetBrush(ltGraphBkgBrush);
+ pDC.SetPen(wxPen(BLACK_COLOR, 1));
+
+ // Vertical gridlines
+ pDC.SetPen(m_penShortDash);
+ for(p = (PLOT_BORDER + XLEFT_OFFSET + GRID_INCREMENT); p < ((m_rGrid.GetWidth() - XLEFT_OFFSET) + GRID_INCREMENT); p += GRID_INCREMENT)
+ {
+ pDC.DrawLine(p, (m_rGrid.GetHeight() + PLOT_BORDER), p, PLOT_BORDER);
+ }
+ // Horizontal gridlines
+ pDC.SetPen(m_penDotDash);
+ for(p = (m_rGrid.GetHeight() - GRID_INCREMENT); p > PLOT_BORDER; p -= GRID_INCREMENT)
+ {
+ pDC.DrawLine(PLOT_BORDER + XLEFT_OFFSET, (p + PLOT_BORDER), (m_rGrid.GetWidth() + PLOT_BORDER + XLEFT_OFFSET), (p + PLOT_BORDER));
+ }
+ // Label the X-Axis
+ pDC.SetPen(wxPen(GREY_COLOR, 1));
+ for(p = GRID_INCREMENT; p < (m_rGrid.GetWidth() - YBOTTOM_OFFSET); p += GRID_INCREMENT)
+ {
+ sprintf(buf, "%1.1f Hz",(double)(p / 10));
+ pDC.DrawText(buf, p - PLOT_BORDER + XLEFT_OFFSET, m_rGrid.GetHeight() + YBOTTOM_OFFSET/3);
+ }
+ // Label the Y-Axis
+ for(p = (m_rGrid.GetHeight() - GRID_INCREMENT); p > PLOT_BORDER; p -= GRID_INCREMENT)
+ {
+ sprintf(buf, "%1.0f", (double)((m_rGrid.GetHeight() - p) * -10));
+ pDC.DrawText(buf, XLEFT_TEXT_OFFSET, p);
+ }
+}
+
+//-------------------------------------------------------------------------
+// plotPixelData()
+//-------------------------------------------------------------------------
+void PlotWaterfall::plotPixelData(wxAutoBufferedPaintDC& dc)
+{
+ float spec_index_per_px;
float intensity_per_dB;
int px_per_sec;
- int index;
- int dy;
- int dy_blocks;
- int bytes_in_row_of_blocks;
+ int index;
+ int dy;
+ int dy_blocks;
+ int bytes_in_row_of_blocks;
int b;
- int px;
- int py;
+ int px;
+ int py;
int intensity;
- unsigned *last_row;
- unsigned *pdest;
- unsigned *psrc;
-
+ unsigned *last_row;
+ unsigned *pdest;
+ unsigned *psrc;
+
// determine dy, the height of one "block"
px_per_sec = (float)m_rCtrl.GetHeight() / WATERFALL_SECS_Y;
dy = DT * px_per_sec;
@@ -321,21 +321,21 @@ void PlotWaterfall::plotPixelData(wxAutoBufferedPaintDC& dc)
spec_index_per_px = (float)FDMDV_NSPEC / (float) m_rCtrl.GetWidth();
intensity_per_dB = (float)256 /(MAX_DB - MIN_DB);
last_row = (unsigned int *)m_pBmp + dy *(dy_blocks - 1)* m_rCtrl.GetWidth();
-
- wxNativePixelData data(*m_pBmp);
- if(!data)
- {
- wxMessageBox(wxT("Unable to access Bitmap Data"), wxT("Error"));
- return;
- }
- if(data.GetWidth() < 20 || data.GetHeight() < 20)
- {
- wxMessageBox(wxT("Bitmap is too small to use"), wxT("Warning"));
- return;
- }
- wxNativePixelData::Iterator p(data);
- // we draw a (10, 10)-(20, 20) rect manually using the given r, g, b
- p.Offset(data, 10, 10);
+
+ wxNativePixelData data(*m_pBmp);
+ if(!data)
+ {
+ wxMessageBox(wxT("Unable to access Bitmap Data"), wxT("Error"));
+ return;
+ }
+ if(data.GetWidth() < 20 || data.GetHeight() < 20)
+ {
+ wxMessageBox(wxT("Bitmap is too small to use"), wxT("Warning"));
+ return;
+ }
+ wxNativePixelData::Iterator p(data);
+ // we draw a (10, 10)-(20, 20) rect manually using the given r, g, b
+ p.Offset(data, 10, 10);
for(px = 0; px < m_rCtrl.GetWidth(); px++)
{
index = px * spec_index_per_px;
@@ -369,5 +369,5 @@ void PlotWaterfall::plotPixelData(wxAutoBufferedPaintDC& dc)
last_row[px + py * m_rCtrl.GetWidth()] = m_heatmap_lut[intensity];
}
}
- }
-}
+ }
+}
diff --git a/fdmdv2/src/fdmdv2_plot_waterfall.h b/fdmdv2/src/fdmdv2_plot_waterfall.h
index d3eaa67f..bf4e99ea 100644
--- a/fdmdv2/src/fdmdv2_plot_waterfall.h
+++ b/fdmdv2/src/fdmdv2_plot_waterfall.h
@@ -1,11 +1,11 @@
-//==========================================================================
-// Name: fdmdv2_plot_waterfall.h
-// Purpose: Defines a waterfall plot derivative of fdmdv2_plot.
+//==========================================================================
+// Name: fdmdv2_plot_waterfall.h
+// Purpose: Defines a waterfall plot derivative of fdmdv2_plot.
// Created: June 22, 2012
-// Initial author: David Witten
-// Derived from: code written by David Rowe
-// License:
-//
+// Initial author: David Witten
+// Derived from: code written by David Rowe
+// License:
+//
// Copyright (C) 2012 David Witten
//
// All rights reserved.
@@ -21,47 +21,47 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see .
//
-//==========================================================================
+//==========================================================================
#ifndef __FDMDV2_PLOT_WATERFALL__
#define __FDMDV2_PLOT_WATERFALL__
-
-#include "fdmdv2_plot.h"
-#include "fdmdv2_defines.h"
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class PlotWaterfall
-//
-// @class $(Name)
-// @author $(User)
-// @date $(Date)
-// @file $(CurrentFileName).$(CurrentFileExt)
-// @brief
-//
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-class PlotWaterfall : public PlotPanel
-{
+
+#include "fdmdv2_plot.h"
+#include "fdmdv2_defines.h"
+
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+// Class PlotWaterfall
+//
+// @class $(Name)
+// @author $(User)
+// @date $(Date)
+// @file $(CurrentFileName).$(CurrentFileExt)
+// @brief
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
+class PlotWaterfall : public PlotPanel
+{
public:
- PlotWaterfall(wxFrame* parent);
- ~PlotWaterfall();
-// bool m_newdata;
+ PlotWaterfall(wxFrame* parent);
+ ~PlotWaterfall();
+// bool m_newdata;
protected:
// unsigned *m_pixel_buf;
unsigned m_heatmap_lut[256];
- wxMemoryDC m_mDC;
-
+ wxMemoryDC m_mDC;
+
unsigned heatmap(float val, float min, float max);
-
- void OnPaint(wxPaintEvent & evt);
- //void OnSize(wxSizeEvent& event);
- void OnShow(wxShowEvent& event);
- void drawGraticule(wxAutoBufferedPaintDC& dc);
- void draw(wxAutoBufferedPaintDC& pdc);
- void plotPixelData(wxAutoBufferedPaintDC& dc);
- void drawData(); // wxMemoryDC& pDC);
- void drawData2(wxMemoryDC& pDC, int barpos, int l, int t, int w, int h);
-
- DECLARE_EVENT_TABLE()
-};
-
+
+ void OnPaint(wxPaintEvent & evt);
+ //void OnSize(wxSizeEvent& event);
+ void OnShow(wxShowEvent& event);
+ void drawGraticule(wxAutoBufferedPaintDC& dc);
+ void draw(wxAutoBufferedPaintDC& pdc);
+ void plotPixelData(wxAutoBufferedPaintDC& dc);
+ void drawData(); // wxMemoryDC& pDC);
+ void drawData2(wxMemoryDC& pDC, int barpos, int l, int t, int w, int h);
+
+ DECLARE_EVENT_TABLE()
+};
+
#endif //__FDMDV2_PLOT_WATERFALL__
diff --git a/fdmdv2/src/topFrame.cpp b/fdmdv2/src/topFrame.cpp
index 1da9dad3..6c9bb5eb 100644
--- a/fdmdv2/src/topFrame.cpp
+++ b/fdmdv2/src/topFrame.cpp
@@ -1,954 +1,954 @@
-///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 10 2012)
-// http://www.wxformbuilder.org/
-//
-// PLEASE DO "NOT" EDIT THIS FILE!
-///////////////////////////////////////////////////////////////////////////
-
-#include "topFrame.h"
-
-///////////////////////////////////////////////////////////////////////////
-
-TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxFrame(parent, id, title, pos, size, style)
-{
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
- this->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
- this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT));
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
- this->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
- this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT));
-
- m_menubarMain = new wxMenuBar(wxMB_DOCKABLE);
- file = new wxMenu();
- wxMenuItem* m_menuItemOpen;
- m_menuItemOpen = new wxMenuItem(file, ID_OPEN, wxString(_("&Open")) , _("Open File"), wxITEM_NORMAL);
- file->Append(m_menuItemOpen);
-
- wxMenuItem* m_menuItemSave;
- m_menuItemSave = new wxMenuItem(file, ID_SAVE, wxString(_("&Save")) , _("Save current file"), wxITEM_NORMAL);
- file->Append(m_menuItemSave);
-
- wxMenuItem* m_menuItemClose;
- m_menuItemClose = new wxMenuItem(file, ID_CLOSE, wxString(_("&Close")) , _("Close current file"), wxITEM_NORMAL);
- file->Append(m_menuItemClose);
-
- file->AppendSeparator();
-
- wxMenuItem* m_menuItemExit;
- m_menuItemExit = new wxMenuItem(file, ID_EXIT, wxString(_("E&xit")) , _("Exit Program"), wxITEM_NORMAL);
- file->Append(m_menuItemExit);
-
- m_menubarMain->Append(file, _("&File"));
-
- edit = new wxMenu();
- wxMenuItem* m_menuItemCopy;
- m_menuItemCopy = new wxMenuItem(edit, ID_COPY, wxString(_("&Copy")) , _("Copy selection"), wxITEM_NORMAL);
- edit->Append(m_menuItemCopy);
- m_menuItemCopy->Enable(false);
-
- wxMenuItem* m_menuItemCut;
- m_menuItemCut = new wxMenuItem(edit, ID_CUT, wxString(_("Cut")) , _("Cut Selection"), wxITEM_NORMAL);
- edit->Append(m_menuItemCut);
- m_menuItemCut->Enable(false);
-
- wxMenuItem* m_menuItemPaste;
- m_menuItemPaste = new wxMenuItem(edit, ID_PASTE, wxString(_("&Paste")) , _("Paste selection"), wxITEM_NORMAL);
- edit->Append(m_menuItemPaste);
- m_menuItemPaste->Enable(false);
-
- m_menubarMain->Append(edit, _("&Edit"));
-
- tools = new wxMenu();
- wxMenuItem* m_menuItemAudio;
- m_menuItemAudio = new wxMenuItem(tools, wxID_ANY, wxString(_("&Audio Config")) , wxEmptyString, wxITEM_NORMAL);
- tools->Append(m_menuItemAudio);
-
- wxMenuItem* m_menuItemRigCtrlCfg;
- m_menuItemRigCtrlCfg = new wxMenuItem(tools, wxID_ANY, wxString(_("Rig Control Config")) , wxEmptyString, wxITEM_NORMAL);
- tools->Append(m_menuItemRigCtrlCfg);
-
- wxMenuItem* m_menuItemOptions;
- m_menuItemOptions = new wxMenuItem(tools, ID_OPTIONS, wxString(_("Other Program &Options")) , _("Set preferences"), wxITEM_NORMAL);
- tools->Append(m_menuItemOptions);
-
- tools->AppendSeparator();
-
- wxMenuItem* m_menuItemCaptRxStream;
- m_menuItemCaptRxStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Rx Stream")) + wxT('\t') + wxT("Capture receive stream to file."), wxEmptyString, wxITEM_NORMAL);
- #ifdef __WXMSW__
- m_menuItemCaptRxStream->SetBitmaps(wxNullBitmap);
- #elif defined(__WXGTK__)
- m_menuItemCaptRxStream->SetBitmap(wxNullBitmap);
- #endif
- tools->Append(m_menuItemCaptRxStream);
-
- wxMenuItem* m_menuItemCaptTxStream;
- m_menuItemCaptTxStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Tx Stream")) + wxT('\t') + wxT("Capture transmit stream to file."), wxEmptyString, wxITEM_NORMAL);
- #ifdef __WXMSW__
- m_menuItemCaptTxStream->SetBitmaps(wxNullBitmap);
- #elif defined(__WXGTK__)
- m_menuItemCaptTxStream->SetBitmap(wxNullBitmap);
- #endif
- tools->Append(m_menuItemCaptTxStream);
-
- tools->AppendSeparator();
-
- wxMenuItem* m_menuItemPlayAudioFile;
- m_menuItemPlayAudioFile = new wxMenuItem(tools, wxID_ANY, wxString(_("Play File")) , wxEmptyString, wxITEM_NORMAL);
- tools->Append(m_menuItemPlayAudioFile);
-
- m_menubarMain->Append(tools, _("&Tools"));
-
- help = new wxMenu();
- wxMenuItem* m_menuItemHelpUpdates;
- m_menuItemHelpUpdates = new wxMenuItem(help, wxID_ANY, wxString(_("Check for Updates")) , wxEmptyString, wxITEM_NORMAL);
- help->Append(m_menuItemHelpUpdates);
- m_menuItemHelpUpdates->Enable(false);
-
- wxMenuItem* m_menuItemAbout;
- m_menuItemAbout = new wxMenuItem(help, ID_ABOUT, wxString(_("&About")) , _("About this program"), wxITEM_NORMAL);
- help->Append(m_menuItemAbout);
-
- m_menubarMain->Append(help, _("&Help"));
-
- this->SetMenuBar(m_menubarMain);
-
- wxBoxSizer* bSizer1;
- bSizer1 = new wxBoxSizer(wxHORIZONTAL);
-
- wxBoxSizer* leftSizer;
- leftSizer = new wxBoxSizer(wxVERTICAL);
-
- wxStaticBoxSizer* snrSizer;
- snrSizer = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("SNR")), wxVERTICAL);
-
- m_gaugeSNR = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxSize(15,135), wxGA_SMOOTH|wxGA_VERTICAL);
- m_gaugeSNR->SetToolTip(_("Display signal to noise ratio."));
-
- snrSizer->Add(m_gaugeSNR, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);
-
- wxBoxSizer* bSizer29;
- bSizer29 = new wxBoxSizer(wxVERTICAL);
-
- m_textSNR = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxPoint(-1,-1), wxSize(35,25), wxTE_READONLY);
- m_textSNR->SetToolTip(_("Show S/N ratio numerically."));
- m_textSNR->SetMinSize(wxSize(35,25));
-
- bSizer29->Add(m_textSNR, 0, wxALIGN_CENTER|wxALL, 1);
-
-
- snrSizer->Add(bSizer29, 0, wxEXPAND, 1);
-
-
- leftSizer->Add(snrSizer, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 1);
-
- wxStaticBoxSizer* levelSizer;
- levelSizer = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Level")), wxVERTICAL);
-
- m_gaugeLevel = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxSize(15,135), wxGA_SMOOTH|wxGA_VERTICAL);
- m_gaugeLevel->SetToolTip(_("Display signal level."));
-
- levelSizer->Add(m_gaugeLevel, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);
-
-
- leftSizer->Add(levelSizer, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 1);
-
-
- bSizer1->Add(leftSizer, 0, wxALL|wxEXPAND, 5);
-
- wxBoxSizer* centerSizer;
- centerSizer = new wxBoxSizer(wxVERTICAL);
-
- wxBoxSizer* upperSizer;
- upperSizer = new wxBoxSizer(wxVERTICAL);
-
- m_auiNbookCtrl = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_BOTTOM|wxAUI_NB_DEFAULT_STYLE);
- m_auiNbookCtrl->SetFont(wxFont(6, 70, 90, 90, false, wxEmptyString));
-
-
- upperSizer->Add(m_auiNbookCtrl, 1, wxALIGN_TOP|wxEXPAND, 1);
-
-
- centerSizer->Add(upperSizer, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxEXPAND, 0);
-
- wxBoxSizer* lowerSizer;
- lowerSizer = new wxBoxSizer(wxHORIZONTAL);
-
- wxBoxSizer* bSizer15;
- bSizer15 = new wxBoxSizer(wxVERTICAL);
-
- m_txtCtrl = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer15->Add(m_txtCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5);
-
-
- lowerSizer->Add(bSizer15, 1, wxEXPAND, 5);
-
- wxBoxSizer* bSizer141;
- bSizer141 = new wxBoxSizer(wxHORIZONTAL);
-
- m_togRxID = new wxToggleButton(this, wxID_ANY, _("RxID"), wxDefaultPosition, wxDefaultSize, 0);
- bSizer141->Add(m_togRxID, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL|wxFIXED_MINSIZE, 5);
-
- m_togTxID = new wxToggleButton(this, wxID_ANY, _("TxID"), wxDefaultPosition, wxDefaultSize, 0);
- bSizer141->Add(m_togTxID, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
-
- lowerSizer->Add(bSizer141, 0, wxALIGN_RIGHT, 5);
-
-
- centerSizer->Add(lowerSizer, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 2);
-
-
- bSizer1->Add(centerSizer, 4, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 1);
-
- wxBoxSizer* rightSizer;
- rightSizer = new wxBoxSizer(wxVERTICAL);
-
- wxStaticBoxSizer* sbSizer3;
- sbSizer3 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("SQ")), wxVERTICAL);
-
- m_sliderSQ = new wxSlider(this, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxSize(-1,100), wxSL_AUTOTICKS|wxSL_INVERSE|wxSL_VERTICAL);
- m_sliderSQ->SetToolTip(_("Set Squelch level."));
-
- sbSizer3->Add(m_sliderSQ, 2, wxALIGN_CENTER|wxALL, 1);
-
- wxBoxSizer* bSizer131;
- bSizer131 = new wxBoxSizer(wxVERTICAL);
-
- m_ckboxSQ = new wxCheckBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
- m_ckboxSQ->SetToolTip(_("Activate/Deactivate Squelch"));
-
- bSizer131->Add(m_ckboxSQ, 0, wxALIGN_CENTER|wxALL, 5);
-
-
- sbSizer3->Add(bSizer131, 0, wxALIGN_CENTER, 5);
-
-
- rightSizer->Add(sbSizer3, 2, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3);
-
- wxStaticBoxSizer* sbSizer5;
- sbSizer5 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Control")), wxVERTICAL);
-
- wxBoxSizer* bSizer1511;
- bSizer1511 = new wxBoxSizer(wxVERTICAL);
-
- m_togBtnOnOff = new wxToggleButton(this, wxID_ANY, _("Start"), wxDefaultPosition, wxDefaultSize, 0);
- m_togBtnOnOff->SetToolTip(_("Begin receiving data."));
-
- bSizer1511->Add(m_togBtnOnOff, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
-
-
- sbSizer5->Add(bSizer1511, 0, wxEXPAND, 1);
-
- wxBoxSizer* bSizer151;
- bSizer151 = new wxBoxSizer(wxVERTICAL);
-
- m_togBtnSplit = new wxToggleButton(this, wxID_ANY, _("Split"), wxDefaultPosition, wxDefaultSize, 0);
- m_togBtnSplit->SetToolTip(_("Toggle split frequency mode."));
-
- bSizer151->Add(m_togBtnSplit, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
-
-
- sbSizer5->Add(bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 1);
-
- wxBoxSizer* bSizer13;
- bSizer13 = new wxBoxSizer(wxVERTICAL);
-
- m_togBtnAnalog = new wxToggleButton(this, wxID_ANY, _("Analog"), wxDefaultPosition, wxDefaultSize, 0);
- m_togBtnAnalog->SetToolTip(_("Toggle analog/digital operation."));
-
- bSizer13->Add(m_togBtnAnalog, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
-
-
- sbSizer5->Add(bSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
-
- wxBoxSizer* bSizer14;
- bSizer14 = new wxBoxSizer(wxVERTICAL);
-
- m_togBtnALC = new wxToggleButton(this, wxID_ANY, _("ALC"), wxDefaultPosition, wxDefaultSize, 0);
- m_togBtnALC->SetToolTip(_("Toggle automatic level control mode."));
-
- bSizer14->Add(m_togBtnALC, 0, wxALL, 1);
-
-
- sbSizer5->Add(bSizer14, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALL, 1);
-
- wxBoxSizer* bSizer11;
- bSizer11 = new wxBoxSizer(wxVERTICAL);
-
- m_btnTogTX = new wxToggleButton(this, wxID_ANY, _("TX"), wxDefaultPosition, wxDefaultSize, 0);
- m_btnTogTX->SetToolTip(_("Switch between Receive and Transmit"));
-
- bSizer11->Add(m_btnTogTX, 1, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
-
-
- sbSizer5->Add(bSizer11, 2, wxEXPAND, 1);
-
-
- rightSizer->Add(sbSizer5, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 3);
-
-
- bSizer1->Add(rightSizer, 0, wxALL|wxEXPAND, 3);
-
-
- this->SetSizer(bSizer1);
- this->Layout();
- m_statusBar1 = this->CreateStatusBar(3, wxST_SIZEGRIP, wxID_ANY);
-
- // Connect Events
- this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(TopFrame::topFrame_OnClose));
- this->Connect(wxEVT_PAINT, wxPaintEventHandler(TopFrame::topFrame_OnPaint));
- this->Connect(wxEVT_SIZE, wxSizeEventHandler(TopFrame::topFrame_OnSize));
- this->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::topFrame_OnUpdateUI));
- this->Connect(m_menuItemOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnOpen));
- this->Connect(m_menuItemOpen->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnOpenUpdateUI));
- this->Connect(m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnSave));
- this->Connect(m_menuItemSave->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnSaveUpdateUI));
- this->Connect(m_menuItemClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnClose));
- this->Connect(m_menuItemClose->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCloseUpdateUI));
- this->Connect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnExit));
- this->Connect(m_menuItemCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCopy));
- this->Connect(m_menuItemCopy->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCopyUpdateUI));
- this->Connect(m_menuItemCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCut));
- this->Connect(m_menuItemCut->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCutUpdateUI));
- this->Connect(m_menuItemPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPaste));
- this->Connect(m_menuItemPaste->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnPasteUpdateUI));
- this->Connect(m_menuItemAudio->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsAudio));
- this->Connect(m_menuItemAudio->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsAudioUI));
- this->Connect(m_menuItemRigCtrlCfg->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsComCfg));
- this->Connect(m_menuItemRigCtrlCfg->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsComCfgUI));
- this->Connect(m_menuItemOptions->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsOptions));
- this->Connect(m_menuItemOptions->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsOptionsUI));
- this->Connect(m_menuItemCaptRxStream->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCaptureRxStream));
- this->Connect(m_menuItemCaptTxStream->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCaptureTxStream));
- this->Connect(m_menuItemPlayAudioFile->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPlayAudioFile));
- this->Connect(m_menuItemHelpUpdates->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnHelpCheckUpdates));
- this->Connect(m_menuItemHelpUpdates->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnHelpCheckUpdatesUI));
- this->Connect(m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnHelpAbout));
- m_togRxID->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnRxID), NULL, this);
- m_togTxID->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnTxID), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnSliderScrollBottom), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(TopFrame::OnCmdSliderScrollChanged), NULL, this);
- m_sliderSQ->Connect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnSliderScrollTop), NULL, this);
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Apr 10 2012)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "topFrame.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxFrame(parent, id, title, pos, size, style)
+{
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+ this->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+ this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT));
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+ this->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+ this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT));
+
+ m_menubarMain = new wxMenuBar(wxMB_DOCKABLE);
+ file = new wxMenu();
+ wxMenuItem* m_menuItemOpen;
+ m_menuItemOpen = new wxMenuItem(file, ID_OPEN, wxString(_("&Open")) , _("Open File"), wxITEM_NORMAL);
+ file->Append(m_menuItemOpen);
+
+ wxMenuItem* m_menuItemSave;
+ m_menuItemSave = new wxMenuItem(file, ID_SAVE, wxString(_("&Save")) , _("Save current file"), wxITEM_NORMAL);
+ file->Append(m_menuItemSave);
+
+ wxMenuItem* m_menuItemClose;
+ m_menuItemClose = new wxMenuItem(file, ID_CLOSE, wxString(_("&Close")) , _("Close current file"), wxITEM_NORMAL);
+ file->Append(m_menuItemClose);
+
+ file->AppendSeparator();
+
+ wxMenuItem* m_menuItemExit;
+ m_menuItemExit = new wxMenuItem(file, ID_EXIT, wxString(_("E&xit")) , _("Exit Program"), wxITEM_NORMAL);
+ file->Append(m_menuItemExit);
+
+ m_menubarMain->Append(file, _("&File"));
+
+ edit = new wxMenu();
+ wxMenuItem* m_menuItemCopy;
+ m_menuItemCopy = new wxMenuItem(edit, ID_COPY, wxString(_("&Copy")) , _("Copy selection"), wxITEM_NORMAL);
+ edit->Append(m_menuItemCopy);
+ m_menuItemCopy->Enable(false);
+
+ wxMenuItem* m_menuItemCut;
+ m_menuItemCut = new wxMenuItem(edit, ID_CUT, wxString(_("Cut")) , _("Cut Selection"), wxITEM_NORMAL);
+ edit->Append(m_menuItemCut);
+ m_menuItemCut->Enable(false);
+
+ wxMenuItem* m_menuItemPaste;
+ m_menuItemPaste = new wxMenuItem(edit, ID_PASTE, wxString(_("&Paste")) , _("Paste selection"), wxITEM_NORMAL);
+ edit->Append(m_menuItemPaste);
+ m_menuItemPaste->Enable(false);
+
+ m_menubarMain->Append(edit, _("&Edit"));
+
+ tools = new wxMenu();
+ wxMenuItem* m_menuItemAudio;
+ m_menuItemAudio = new wxMenuItem(tools, wxID_ANY, wxString(_("&Audio Config")) , wxEmptyString, wxITEM_NORMAL);
+ tools->Append(m_menuItemAudio);
+
+ wxMenuItem* m_menuItemRigCtrlCfg;
+ m_menuItemRigCtrlCfg = new wxMenuItem(tools, wxID_ANY, wxString(_("Rig Control Config")) , wxEmptyString, wxITEM_NORMAL);
+ tools->Append(m_menuItemRigCtrlCfg);
+
+ wxMenuItem* m_menuItemOptions;
+ m_menuItemOptions = new wxMenuItem(tools, ID_OPTIONS, wxString(_("Other Program &Options")) , _("Set preferences"), wxITEM_NORMAL);
+ tools->Append(m_menuItemOptions);
+
+ tools->AppendSeparator();
+
+ wxMenuItem* m_menuItemCaptRxStream;
+ m_menuItemCaptRxStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Rx Stream")) + wxT('\t') + wxT("Capture receive stream to file."), wxEmptyString, wxITEM_NORMAL);
+ #ifdef __WXMSW__
+ m_menuItemCaptRxStream->SetBitmaps(wxNullBitmap);
+ #elif defined(__WXGTK__)
+ m_menuItemCaptRxStream->SetBitmap(wxNullBitmap);
+ #endif
+ tools->Append(m_menuItemCaptRxStream);
+
+ wxMenuItem* m_menuItemCaptTxStream;
+ m_menuItemCaptTxStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Tx Stream")) + wxT('\t') + wxT("Capture transmit stream to file."), wxEmptyString, wxITEM_NORMAL);
+ #ifdef __WXMSW__
+ m_menuItemCaptTxStream->SetBitmaps(wxNullBitmap);
+ #elif defined(__WXGTK__)
+ m_menuItemCaptTxStream->SetBitmap(wxNullBitmap);
+ #endif
+ tools->Append(m_menuItemCaptTxStream);
+
+ tools->AppendSeparator();
+
+ wxMenuItem* m_menuItemPlayAudioFile;
+ m_menuItemPlayAudioFile = new wxMenuItem(tools, wxID_ANY, wxString(_("Play File")) , wxEmptyString, wxITEM_NORMAL);
+ tools->Append(m_menuItemPlayAudioFile);
+
+ m_menubarMain->Append(tools, _("&Tools"));
+
+ help = new wxMenu();
+ wxMenuItem* m_menuItemHelpUpdates;
+ m_menuItemHelpUpdates = new wxMenuItem(help, wxID_ANY, wxString(_("Check for Updates")) , wxEmptyString, wxITEM_NORMAL);
+ help->Append(m_menuItemHelpUpdates);
+ m_menuItemHelpUpdates->Enable(false);
+
+ wxMenuItem* m_menuItemAbout;
+ m_menuItemAbout = new wxMenuItem(help, ID_ABOUT, wxString(_("&About")) , _("About this program"), wxITEM_NORMAL);
+ help->Append(m_menuItemAbout);
+
+ m_menubarMain->Append(help, _("&Help"));
+
+ this->SetMenuBar(m_menubarMain);
+
+ wxBoxSizer* bSizer1;
+ bSizer1 = new wxBoxSizer(wxHORIZONTAL);
+
+ wxBoxSizer* leftSizer;
+ leftSizer = new wxBoxSizer(wxVERTICAL);
+
+ wxStaticBoxSizer* snrSizer;
+ snrSizer = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("SNR")), wxVERTICAL);
+
+ m_gaugeSNR = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxSize(15,135), wxGA_SMOOTH|wxGA_VERTICAL);
+ m_gaugeSNR->SetToolTip(_("Display signal to noise ratio."));
+
+ snrSizer->Add(m_gaugeSNR, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);
+
+ wxBoxSizer* bSizer29;
+ bSizer29 = new wxBoxSizer(wxVERTICAL);
+
+ m_textSNR = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxPoint(-1,-1), wxSize(35,25), wxTE_READONLY);
+ m_textSNR->SetToolTip(_("Show S/N ratio numerically."));
+ m_textSNR->SetMinSize(wxSize(35,25));
+
+ bSizer29->Add(m_textSNR, 0, wxALIGN_CENTER|wxALL, 1);
+
+
+ snrSizer->Add(bSizer29, 0, wxEXPAND, 1);
+
+
+ leftSizer->Add(snrSizer, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 1);
+
+ wxStaticBoxSizer* levelSizer;
+ levelSizer = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Level")), wxVERTICAL);
+
+ m_gaugeLevel = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxSize(15,135), wxGA_SMOOTH|wxGA_VERTICAL);
+ m_gaugeLevel->SetToolTip(_("Display signal level."));
+
+ levelSizer->Add(m_gaugeLevel, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);
+
+
+ leftSizer->Add(levelSizer, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 1);
+
+
+ bSizer1->Add(leftSizer, 0, wxALL|wxEXPAND, 5);
+
+ wxBoxSizer* centerSizer;
+ centerSizer = new wxBoxSizer(wxVERTICAL);
+
+ wxBoxSizer* upperSizer;
+ upperSizer = new wxBoxSizer(wxVERTICAL);
+
+ m_auiNbookCtrl = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_BOTTOM|wxAUI_NB_DEFAULT_STYLE);
+ m_auiNbookCtrl->SetFont(wxFont(6, 70, 90, 90, false, wxEmptyString));
+
+
+ upperSizer->Add(m_auiNbookCtrl, 1, wxALIGN_TOP|wxEXPAND, 1);
+
+
+ centerSizer->Add(upperSizer, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxEXPAND, 0);
+
+ wxBoxSizer* lowerSizer;
+ lowerSizer = new wxBoxSizer(wxHORIZONTAL);
+
+ wxBoxSizer* bSizer15;
+ bSizer15 = new wxBoxSizer(wxVERTICAL);
+
+ m_txtCtrl = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ bSizer15->Add(m_txtCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5);
+
+
+ lowerSizer->Add(bSizer15, 1, wxEXPAND, 5);
+
+ wxBoxSizer* bSizer141;
+ bSizer141 = new wxBoxSizer(wxHORIZONTAL);
+
+ m_togRxID = new wxToggleButton(this, wxID_ANY, _("RxID"), wxDefaultPosition, wxDefaultSize, 0);
+ bSizer141->Add(m_togRxID, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL|wxFIXED_MINSIZE, 5);
+
+ m_togTxID = new wxToggleButton(this, wxID_ANY, _("TxID"), wxDefaultPosition, wxDefaultSize, 0);
+ bSizer141->Add(m_togTxID, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+
+ lowerSizer->Add(bSizer141, 0, wxALIGN_RIGHT, 5);
+
+
+ centerSizer->Add(lowerSizer, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 2);
+
+
+ bSizer1->Add(centerSizer, 4, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 1);
+
+ wxBoxSizer* rightSizer;
+ rightSizer = new wxBoxSizer(wxVERTICAL);
+
+ wxStaticBoxSizer* sbSizer3;
+ sbSizer3 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("SQ")), wxVERTICAL);
+
+ m_sliderSQ = new wxSlider(this, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxSize(-1,100), wxSL_AUTOTICKS|wxSL_INVERSE|wxSL_VERTICAL);
+ m_sliderSQ->SetToolTip(_("Set Squelch level."));
+
+ sbSizer3->Add(m_sliderSQ, 2, wxALIGN_CENTER|wxALL, 1);
+
+ wxBoxSizer* bSizer131;
+ bSizer131 = new wxBoxSizer(wxVERTICAL);
+
+ m_ckboxSQ = new wxCheckBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
+ m_ckboxSQ->SetToolTip(_("Activate/Deactivate Squelch"));
+
+ bSizer131->Add(m_ckboxSQ, 0, wxALIGN_CENTER|wxALL, 5);
+
+
+ sbSizer3->Add(bSizer131, 0, wxALIGN_CENTER, 5);
+
+
+ rightSizer->Add(sbSizer3, 2, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3);
+
+ wxStaticBoxSizer* sbSizer5;
+ sbSizer5 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Control")), wxVERTICAL);
+
+ wxBoxSizer* bSizer1511;
+ bSizer1511 = new wxBoxSizer(wxVERTICAL);
+
+ m_togBtnOnOff = new wxToggleButton(this, wxID_ANY, _("Start"), wxDefaultPosition, wxDefaultSize, 0);
+ m_togBtnOnOff->SetToolTip(_("Begin receiving data."));
+
+ bSizer1511->Add(m_togBtnOnOff, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
+
+
+ sbSizer5->Add(bSizer1511, 0, wxEXPAND, 1);
+
+ wxBoxSizer* bSizer151;
+ bSizer151 = new wxBoxSizer(wxVERTICAL);
+
+ m_togBtnSplit = new wxToggleButton(this, wxID_ANY, _("Split"), wxDefaultPosition, wxDefaultSize, 0);
+ m_togBtnSplit->SetToolTip(_("Toggle split frequency mode."));
+
+ bSizer151->Add(m_togBtnSplit, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
+
+
+ sbSizer5->Add(bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 1);
+
+ wxBoxSizer* bSizer13;
+ bSizer13 = new wxBoxSizer(wxVERTICAL);
+
+ m_togBtnAnalog = new wxToggleButton(this, wxID_ANY, _("Analog"), wxDefaultPosition, wxDefaultSize, 0);
+ m_togBtnAnalog->SetToolTip(_("Toggle analog/digital operation."));
+
+ bSizer13->Add(m_togBtnAnalog, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
+
+
+ sbSizer5->Add(bSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
+
+ wxBoxSizer* bSizer14;
+ bSizer14 = new wxBoxSizer(wxVERTICAL);
+
+ m_togBtnALC = new wxToggleButton(this, wxID_ANY, _("ALC"), wxDefaultPosition, wxDefaultSize, 0);
+ m_togBtnALC->SetToolTip(_("Toggle automatic level control mode."));
+
+ bSizer14->Add(m_togBtnALC, 0, wxALL, 1);
+
+
+ sbSizer5->Add(bSizer14, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALL, 1);
+
+ wxBoxSizer* bSizer11;
+ bSizer11 = new wxBoxSizer(wxVERTICAL);
+
+ m_btnTogTX = new wxToggleButton(this, wxID_ANY, _("TX"), wxDefaultPosition, wxDefaultSize, 0);
+ m_btnTogTX->SetToolTip(_("Switch between Receive and Transmit"));
+
+ bSizer11->Add(m_btnTogTX, 1, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
+
+
+ sbSizer5->Add(bSizer11, 2, wxEXPAND, 1);
+
+
+ rightSizer->Add(sbSizer5, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 3);
+
+
+ bSizer1->Add(rightSizer, 0, wxALL|wxEXPAND, 3);
+
+
+ this->SetSizer(bSizer1);
+ this->Layout();
+ m_statusBar1 = this->CreateStatusBar(3, wxST_SIZEGRIP, wxID_ANY);
+
+ // Connect Events
+ this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(TopFrame::topFrame_OnClose));
+ this->Connect(wxEVT_PAINT, wxPaintEventHandler(TopFrame::topFrame_OnPaint));
+ this->Connect(wxEVT_SIZE, wxSizeEventHandler(TopFrame::topFrame_OnSize));
+ this->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::topFrame_OnUpdateUI));
+ this->Connect(m_menuItemOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnOpen));
+ this->Connect(m_menuItemOpen->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnOpenUpdateUI));
+ this->Connect(m_menuItemSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnSave));
+ this->Connect(m_menuItemSave->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnSaveUpdateUI));
+ this->Connect(m_menuItemClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnClose));
+ this->Connect(m_menuItemClose->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCloseUpdateUI));
+ this->Connect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnExit));
+ this->Connect(m_menuItemCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCopy));
+ this->Connect(m_menuItemCopy->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCopyUpdateUI));
+ this->Connect(m_menuItemCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCut));
+ this->Connect(m_menuItemCut->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCutUpdateUI));
+ this->Connect(m_menuItemPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPaste));
+ this->Connect(m_menuItemPaste->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnPasteUpdateUI));
+ this->Connect(m_menuItemAudio->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsAudio));
+ this->Connect(m_menuItemAudio->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsAudioUI));
+ this->Connect(m_menuItemRigCtrlCfg->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsComCfg));
+ this->Connect(m_menuItemRigCtrlCfg->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsComCfgUI));
+ this->Connect(m_menuItemOptions->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsOptions));
+ this->Connect(m_menuItemOptions->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsOptionsUI));
+ this->Connect(m_menuItemCaptRxStream->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCaptureRxStream));
+ this->Connect(m_menuItemCaptTxStream->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCaptureTxStream));
+ this->Connect(m_menuItemPlayAudioFile->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPlayAudioFile));
+ this->Connect(m_menuItemHelpUpdates->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnHelpCheckUpdates));
+ this->Connect(m_menuItemHelpUpdates->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnHelpCheckUpdatesUI));
+ this->Connect(m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnHelpAbout));
+ m_togRxID->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnRxID), NULL, this);
+ m_togTxID->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnTxID), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnSliderScrollBottom), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(TopFrame::OnCmdSliderScrollChanged), NULL, this);
+ m_sliderSQ->Connect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnSliderScrollTop), NULL, this);
m_ckboxSQ->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(TopFrame::OnCheckSQClick), NULL, this);
-
- m_togBtnOnOff->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnOnOff), NULL, this);
- m_togBtnSplit->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnSplitClick), NULL, this);
- m_togBtnAnalog->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnAnalogClick), NULL, this);
- m_togBtnALC->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnALCClick), NULL, this);
- m_btnTogTX->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnTXClick), NULL, this);
-}
-
-TopFrame::~TopFrame()
-{
- // Disconnect Events
- this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(TopFrame::topFrame_OnClose));
- this->Disconnect(wxEVT_PAINT, wxPaintEventHandler(TopFrame::topFrame_OnPaint));
- this->Disconnect(wxEVT_SIZE, wxSizeEventHandler(TopFrame::topFrame_OnSize));
- this->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::topFrame_OnUpdateUI));
- this->Disconnect(ID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnOpen));
- this->Disconnect(ID_OPEN, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnOpenUpdateUI));
- this->Disconnect(ID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnSave));
- this->Disconnect(ID_SAVE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnSaveUpdateUI));
- this->Disconnect(ID_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnClose));
- this->Disconnect(ID_CLOSE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCloseUpdateUI));
- this->Disconnect(ID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnExit));
- this->Disconnect(ID_COPY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCopy));
- this->Disconnect(ID_COPY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCopyUpdateUI));
- this->Disconnect(ID_CUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCut));
- this->Disconnect(ID_CUT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCutUpdateUI));
- this->Disconnect(ID_PASTE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPaste));
- this->Disconnect(ID_PASTE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnPasteUpdateUI));
- this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsAudio));
- this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsAudioUI));
- this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsComCfg));
- this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsComCfgUI));
- this->Disconnect(ID_OPTIONS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsOptions));
- this->Disconnect(ID_OPTIONS, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsOptionsUI));
- this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCaptureRxStream));
- this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCaptureTxStream));
- this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPlayAudioFile));
- this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnHelpCheckUpdates));
- this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnHelpCheckUpdatesUI));
- this->Disconnect(ID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnHelpAbout));
- m_togRxID->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnRxID), NULL, this);
- m_togTxID->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnTxID), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnSliderScrollBottom), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(TopFrame::OnCmdSliderScrollChanged), NULL, this);
- m_sliderSQ->Disconnect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnSliderScrollTop), NULL, this);
+
+ m_togBtnOnOff->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnOnOff), NULL, this);
+ m_togBtnSplit->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnSplitClick), NULL, this);
+ m_togBtnAnalog->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnAnalogClick), NULL, this);
+ m_togBtnALC->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnALCClick), NULL, this);
+ m_btnTogTX->Connect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnTXClick), NULL, this);
+}
+
+TopFrame::~TopFrame()
+{
+ // Disconnect Events
+ this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(TopFrame::topFrame_OnClose));
+ this->Disconnect(wxEVT_PAINT, wxPaintEventHandler(TopFrame::topFrame_OnPaint));
+ this->Disconnect(wxEVT_SIZE, wxSizeEventHandler(TopFrame::topFrame_OnSize));
+ this->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::topFrame_OnUpdateUI));
+ this->Disconnect(ID_OPEN, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnOpen));
+ this->Disconnect(ID_OPEN, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnOpenUpdateUI));
+ this->Disconnect(ID_SAVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnSave));
+ this->Disconnect(ID_SAVE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnSaveUpdateUI));
+ this->Disconnect(ID_CLOSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnClose));
+ this->Disconnect(ID_CLOSE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCloseUpdateUI));
+ this->Disconnect(ID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnExit));
+ this->Disconnect(ID_COPY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCopy));
+ this->Disconnect(ID_COPY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCopyUpdateUI));
+ this->Disconnect(ID_CUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCut));
+ this->Disconnect(ID_CUT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnCutUpdateUI));
+ this->Disconnect(ID_PASTE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPaste));
+ this->Disconnect(ID_PASTE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnPasteUpdateUI));
+ this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsAudio));
+ this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsAudioUI));
+ this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsComCfg));
+ this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsComCfgUI));
+ this->Disconnect(ID_OPTIONS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsOptions));
+ this->Disconnect(ID_OPTIONS, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsOptionsUI));
+ this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCaptureRxStream));
+ this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnCaptureTxStream));
+ this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPlayAudioFile));
+ this->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnHelpCheckUpdates));
+ this->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnHelpCheckUpdatesUI));
+ this->Disconnect(ID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnHelpAbout));
+ m_togRxID->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnRxID), NULL, this);
+ m_togTxID->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnTxID), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(TopFrame::OnCmdSliderScroll), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(TopFrame::OnSliderScrollBottom), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(TopFrame::OnCmdSliderScrollChanged), NULL, this);
+ m_sliderSQ->Disconnect(wxEVT_SCROLL_TOP, wxScrollEventHandler(TopFrame::OnSliderScrollTop), NULL, this);
m_ckboxSQ->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(TopFrame::OnCheckSQClick), NULL, this);
-
- m_togBtnOnOff->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnOnOff), NULL, this);
- m_togBtnSplit->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnSplitClick), NULL, this);
- m_togBtnAnalog->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnAnalogClick), NULL, this);
- m_togBtnALC->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnALCClick), NULL, this);
- m_btnTogTX->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnTXClick), NULL, this);
-
-}
-
-DlgAbout::DlgAbout(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
-{
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
-
- wxBoxSizer* bSizer20;
- bSizer20 = new wxBoxSizer(wxVERTICAL);
-
- wxBoxSizer* bSizer21;
- bSizer21 = new wxBoxSizer(wxVERTICAL);
-
- wxBoxSizer* bSizer23;
- bSizer23 = new wxBoxSizer(wxVERTICAL);
-
- wxBoxSizer* bSizer25;
- bSizer25 = new wxBoxSizer(wxVERTICAL);
-
- m_bitmapAbout = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0);
- bSizer25->Add(m_bitmapAbout, 1, wxALL|wxEXPAND, 5);
-
-
- bSizer23->Add(bSizer25, 1, wxEXPAND, 5);
-
- wxBoxSizer* bSizer26;
- bSizer26 = new wxBoxSizer(wxVERTICAL);
-
- m_staticText1 = new wxStaticText(this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0);
- m_staticText1->Wrap(-1);
- bSizer26->Add(m_staticText1, 1, wxALL, 5);
-
-
- bSizer23->Add(bSizer26, 0, 0, 5);
-
-
- bSizer21->Add(bSizer23, 1, wxEXPAND, 5);
-
- wxBoxSizer* bSizer24;
- bSizer24 = new wxBoxSizer(wxVERTICAL);
-
- m_textCtrl2 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer24->Add(m_textCtrl2, 1, wxALL|wxEXPAND, 5);
-
-
- bSizer21->Add(bSizer24, 1, wxEXPAND, 5);
-
-
- bSizer20->Add(bSizer21, 1, wxEXPAND, 5);
-
- wxBoxSizer* bSizer22;
- bSizer22 = new wxBoxSizer(wxVERTICAL);
-
- m_button9 = new wxButton(this, wxID_ANY, _("MyButton"), wxDefaultPosition, wxDefaultSize, 0);
- bSizer22->Add(m_button9, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxALL, 5);
-
-
- bSizer20->Add(bSizer22, 0, wxALIGN_RIGHT, 5);
-
-
- this->SetSizer(bSizer20);
- this->Layout();
-
- this->Centre(wxBOTH);
- this->Centre(wxBOTH);
-
- // Connect Events
- this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAbout::OnClose));
- this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAbout::OnInitDialog));
-}
-
-DlgAbout::~DlgAbout()
-{
- // Disconnect Events
- this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAbout::OnClose));
- this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAbout::OnInitDialog));
-
-}
-
-DlgAudio::DlgAudio(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
-{
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
-
- wxBoxSizer* bSizer32;
- bSizer32 = new wxBoxSizer(wxVERTICAL);
-
- m_nbAudioOptions = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
- m_panelDevices = new wxPanel(m_nbAudioOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
- wxBoxSizer* bSizer34;
- bSizer34 = new wxBoxSizer(wxVERTICAL);
-
- wxStaticBoxSizer* sbSizer10;
- sbSizer10 = new wxStaticBoxSizer(new wxStaticBox(m_panelDevices, wxID_ANY, _("PortAudio")), wxHORIZONTAL);
-
- wxBoxSizer* bSizer41;
- bSizer41 = new wxBoxSizer(wxHORIZONTAL);
-
- wxGridSizer* gSizer6;
- gSizer6 = new wxGridSizer(3, 1, 0, 0);
-
- gSizer6->SetMinSize(wxSize(115,-1));
- m_radioBtnPortAudio = new wxRadioButton(m_panelDevices, wxID_ANY, _("PortAudio"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
- m_radioBtnPortAudio->SetValue(true);
- gSizer6->Add(m_radioBtnPortAudio, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxGridSizer* gSizer51;
- gSizer51 = new wxGridSizer(2, 2, 0, 0);
-
- gSizer51->SetMinSize(wxSize(110,-1));
- m_staticText151 = new wxStaticText(m_panelDevices, wxID_ANY, _("# Ch Out:"), wxDefaultPosition, wxSize(80,-1), wxALIGN_RIGHT);
- m_staticText151->Wrap(-1);
- m_staticText151->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
- m_staticText151->SetMinSize(wxSize(80,-1));
- m_staticText151->SetMaxSize(wxSize(80,-1));
-
- gSizer51->Add(m_staticText151, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxEXPAND, 5);
-
- m_textNumChOut = new wxTextCtrl(m_panelDevices, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), wxTE_READONLY);
- m_textNumChOut->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
- m_textNumChOut->SetMinSize(wxSize(30,-1));
- m_textNumChOut->SetMaxSize(wxSize(30,-1));
-
- gSizer51->Add(m_textNumChOut, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL, 5);
-
- m_staticText141 = new wxStaticText(m_panelDevices, wxID_ANY, _("# Ch In:"), wxDefaultPosition, wxSize(80,-1), wxALIGN_RIGHT);
- m_staticText141->Wrap(-1);
- m_staticText141->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
- m_staticText141->SetMinSize(wxSize(80,-1));
- m_staticText141->SetMaxSize(wxSize(90,-1));
-
- gSizer51->Add(m_staticText141, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxEXPAND, 5);
-
- m_textNumChIn = new wxTextCtrl(m_panelDevices, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), wxTE_READONLY);
- m_textNumChIn->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
- m_textNumChIn->SetMinSize(wxSize(30,-1));
- m_textNumChIn->SetMaxSize(wxSize(30,-1));
-
- gSizer51->Add(m_textNumChIn, 0, wxALL, 4);
-
-
- gSizer6->Add(gSizer51, 0, wxEXPAND, 5);
-
-
- bSizer41->Add(gSizer6, 0, wxALL, 5);
-
- wxGridSizer* gSizer7;
- gSizer7 = new wxGridSizer(4, 2, 0, 0);
-
- m_staticText14 = new wxStaticText(m_panelDevices, wxID_ANY, _("Audio in (mic) -> codec:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
- m_staticText14->Wrap(-1);
- gSizer7->Add(m_staticText14, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
-
- m_comboAudioCodec = new wxComboBox(m_panelDevices, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
- gSizer7->Add(m_comboAudioCodec, 1, wxALL, 5);
-
- m_staticText15 = new wxStaticText(m_panelDevices, wxID_ANY, _("codec -> Radio Tx:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
- m_staticText15->Wrap(-1);
- gSizer7->Add(m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
-
- m_comboCodecTx = new wxComboBox(m_panelDevices, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
- gSizer7->Add(m_comboCodecTx, 1, wxALL, 5);
-
- m_staticText16 = new wxStaticText(m_panelDevices, wxID_ANY, _("Radio Rx -> codec:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
- m_staticText16->Wrap(-1);
- gSizer7->Add(m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
-
- m_comboRadioRx = new wxComboBox(m_panelDevices, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
- gSizer7->Add(m_comboRadioRx, 1, wxALL, 5);
-
- m_staticText17 = new wxStaticText(m_panelDevices, wxID_ANY, _("codec -> Audio out (spkr):"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
- m_staticText17->Wrap(-1);
- gSizer7->Add(m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
-
- m_comboCodecSpkr = new wxComboBox(m_panelDevices, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
- gSizer7->Add(m_comboCodecSpkr, 0, wxALL, 5);
-
-
- bSizer41->Add(gSizer7, 0, wxALL|wxEXPAND, 5);
-
-
- sbSizer10->Add(bSizer41, 1, wxEXPAND, 5);
-
-
- bSizer34->Add(sbSizer10, 1, wxEXPAND, 5);
-
- wxStaticBoxSizer* sbSizer11;
- sbSizer11 = new wxStaticBoxSizer(new wxStaticBox(m_panelDevices, wxID_ANY, _("File I/O")), wxHORIZONTAL);
-
- wxBoxSizer* bSizer38;
- bSizer38 = new wxBoxSizer(wxVERTICAL);
-
- m_radioBtnFileOnly = new wxRadioButton(m_panelDevices, wxID_ANY, _("File Only"), wxDefaultPosition, wxDefaultSize, 0);
- bSizer38->Add(m_radioBtnFileOnly, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
-
- sbSizer11->Add(bSizer38, 0, wxEXPAND, 5);
-
- wxBoxSizer* bSizer45;
- bSizer45 = new wxBoxSizer(wxVERTICAL);
-
-
- sbSizer11->Add(bSizer45, 1, wxEXPAND, 5);
-
- wxBoxSizer* bSizer46;
- bSizer46 = new wxBoxSizer(wxVERTICAL);
-
-
- sbSizer11->Add(bSizer46, 1, wxEXPAND, 5);
-
-
- bSizer34->Add(sbSizer11, 1, wxEXPAND, 5);
-
-
- m_panelDevices->SetSizer(bSizer34);
- m_panelDevices->Layout();
- bSizer34->Fit(m_panelDevices);
- m_nbAudioOptions->AddPage(m_panelDevices, _("Devices"), true);
- m_panelSettings = new wxPanel(m_nbAudioOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
- wxBoxSizer* bSizer27;
- bSizer27 = new wxBoxSizer(wxVERTICAL);
-
- wxBoxSizer* bSizer271;
- bSizer271 = new wxBoxSizer(wxHORIZONTAL);
-
- wxStaticBoxSizer* sbSizer6;
- sbSizer6 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Rx Input")), wxVERTICAL);
-
- wxBoxSizer* bSizer31;
- bSizer31 = new wxBoxSizer(wxVERTICAL);
-
- m_lbRxInput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
- bSizer31->Add(m_lbRxInput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
-
- m_textRxInput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer31->Add(m_textRxInput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
-
-
- sbSizer6->Add(bSizer31, 1, wxEXPAND, 6);
-
-
- bSizer271->Add(sbSizer6, 1, wxEXPAND, 5);
-
- wxStaticBoxSizer* sbSizer7;
- sbSizer7 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Tx Output")), wxVERTICAL);
-
- wxBoxSizer* bSizer281;
- bSizer281 = new wxBoxSizer(wxVERTICAL);
-
- m_lbTxOutput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
- bSizer281->Add(m_lbTxOutput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
-
- m_textTxOutput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer281->Add(m_textTxOutput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
-
-
- sbSizer7->Add(bSizer281, 1, wxEXPAND, 5);
-
-
- bSizer271->Add(sbSizer7, 1, wxEXPAND, 6);
-
-
- bSizer27->Add(bSizer271, 1, wxEXPAND, 5);
-
- wxBoxSizer* bSizer26;
- bSizer26 = new wxBoxSizer(wxHORIZONTAL);
-
- wxStaticBoxSizer* sbSizer8;
- sbSizer8 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Voice Input")), wxVERTICAL);
-
- wxBoxSizer* bSizer29;
- bSizer29 = new wxBoxSizer(wxVERTICAL);
-
- m_lbVoiceInput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
- bSizer29->Add(m_lbVoiceInput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
-
- m_textVoiceInput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer29->Add(m_textVoiceInput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
-
-
- sbSizer8->Add(bSizer29, 1, wxEXPAND, 5);
-
-
- bSizer26->Add(sbSizer8, 1, wxEXPAND, 6);
-
- wxStaticBoxSizer* sbSizer9;
- sbSizer9 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Voice Output")), wxVERTICAL);
-
- wxBoxSizer* bSizer30;
- bSizer30 = new wxBoxSizer(wxVERTICAL);
-
- m_lbVoiceOutput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
- bSizer30->Add(m_lbVoiceOutput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
-
- m_textVoiceOutput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer30->Add(m_textVoiceOutput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
-
-
- sbSizer9->Add(bSizer30, 1, wxEXPAND, 1);
-
-
- bSizer26->Add(sbSizer9, 1, wxEXPAND, 6);
-
-
- bSizer27->Add(bSizer26, 1, wxEXPAND, 1);
-
-
- m_panelSettings->SetSizer(bSizer27);
- m_panelSettings->Layout();
- bSizer27->Fit(m_panelSettings);
- m_nbAudioOptions->AddPage(m_panelSettings, _("Settings"), false);
-
- bSizer32->Add(m_nbAudioOptions, 1, wxEXPAND | wxALL, 1);
-
- wxBoxSizer* bSizer28;
- bSizer28 = new wxBoxSizer(wxVERTICAL);
-
- m_sdbSizer3 = new wxStdDialogButtonSizer();
- m_sdbSizer3OK = new wxButton(this, wxID_OK);
- m_sdbSizer3->AddButton(m_sdbSizer3OK);
- m_sdbSizer3Apply = new wxButton(this, wxID_APPLY);
- m_sdbSizer3->AddButton(m_sdbSizer3Apply);
- m_sdbSizer3Cancel = new wxButton(this, wxID_CANCEL);
- m_sdbSizer3->AddButton(m_sdbSizer3Cancel);
- m_sdbSizer3->Realize();
-
- bSizer28->Add(m_sdbSizer3, 1, wxEXPAND, 5);
-
-
- bSizer32->Add(bSizer28, 0, wxEXPAND, 5);
-
-
- bSizer32->Add(0, 15, 0, wxEXPAND, 5);
-
-
- this->SetSizer(bSizer32);
- this->Layout();
-
- this->Centre(wxBOTH);
- this->Centre(wxBOTH);
-
- // Connect Events
- this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAudio::OnClose));
- this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAudio::OnInitDialog));
- m_lbRxInput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnRxInputSelect), NULL, this);
- m_lbTxOutput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnTxOutputSelect), NULL, this);
- m_lbVoiceInput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceInputSelect), NULL, this);
- m_lbVoiceOutput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceOutputSelect), NULL, this);
- m_sdbSizer3Apply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnApply), NULL, this);
- m_sdbSizer3Cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnCancel), NULL, this);
- m_sdbSizer3OK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnOK), NULL, this);
-}
-
-DlgAudio::~DlgAudio()
-{
- // Disconnect Events
- this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAudio::OnClose));
- this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAudio::OnInitDialog));
- m_lbRxInput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnRxInputSelect), NULL, this);
- m_lbTxOutput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnTxOutputSelect), NULL, this);
- m_lbVoiceInput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceInputSelect), NULL, this);
- m_lbVoiceOutput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceOutputSelect), NULL, this);
- m_sdbSizer3Apply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnApply), NULL, this);
- m_sdbSizer3Cancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnCancel), NULL, this);
- m_sdbSizer3OK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnOK), NULL, this);
-
-}
-
-DlgOptions::DlgOptions(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
-{
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
-
- wxBoxSizer* bSizer30;
- bSizer30 = new wxBoxSizer(wxVERTICAL);
-
- wxStaticBoxSizer* sbSizer5;
- sbSizer5 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Config Options")), wxHORIZONTAL);
-
- wxGridSizer* gSizer2;
- gSizer2 = new wxGridSizer(6, 2, 0, 0);
-
- m_staticText2 = new wxStaticText(this, wxID_ANY, _("Option #1:"), wxDefaultPosition, wxDefaultSize, 0);
- m_staticText2->Wrap(-1);
- gSizer2->Add(m_staticText2, 1, wxALIGN_RIGHT|wxALL, 5);
-
- m_textCtrl3 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer2->Add(m_textCtrl3, 1, wxALL, 5);
-
- m_staticText3 = new wxStaticText(this, wxID_ANY, _("Option #2:"), wxDefaultPosition, wxDefaultSize, 0);
- m_staticText3->Wrap(-1);
- gSizer2->Add(m_staticText3, 1, wxALIGN_RIGHT|wxALL, 5);
-
- m_textCtrl4 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer2->Add(m_textCtrl4, 1, wxALL, 5);
-
- m_staticText4 = new wxStaticText(this, wxID_ANY, _("Option #3:"), wxDefaultPosition, wxDefaultSize, 0);
- m_staticText4->Wrap(-1);
- gSizer2->Add(m_staticText4, 1, wxALIGN_RIGHT|wxALL, 5);
-
- m_textCtrl5 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer2->Add(m_textCtrl5, 1, wxALL, 5);
-
- m_staticText5 = new wxStaticText(this, wxID_ANY, _("Option #4:"), wxDefaultPosition, wxDefaultSize, 0);
- m_staticText5->Wrap(-1);
- gSizer2->Add(m_staticText5, 1, wxALIGN_RIGHT|wxALL, 5);
-
- m_textCtrl6 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer2->Add(m_textCtrl6, 1, wxALL, 5);
-
- m_staticText6 = new wxStaticText(this, wxID_ANY, _("Option #5:"), wxDefaultPosition, wxDefaultSize, 0);
- m_staticText6->Wrap(-1);
- gSizer2->Add(m_staticText6, 1, wxALIGN_RIGHT|wxALL, 5);
-
- m_textCtrl7 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer2->Add(m_textCtrl7, 1, wxALL, 5);
-
- m_staticText7 = new wxStaticText(this, wxID_ANY, _("Option #6:"), wxDefaultPosition, wxDefaultSize, 0);
- m_staticText7->Wrap(-1);
- gSizer2->Add(m_staticText7, 1, wxALIGN_RIGHT|wxALL, 5);
-
- m_textCtrl8 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer2->Add(m_textCtrl8, 1, wxALL, 5);
-
-
- sbSizer5->Add(gSizer2, 1, wxEXPAND, 5);
-
-
- bSizer30->Add(sbSizer5, 1, wxEXPAND, 5);
-
- m_sdbSizer4 = new wxStdDialogButtonSizer();
- m_sdbSizer4OK = new wxButton(this, wxID_OK);
- m_sdbSizer4->AddButton(m_sdbSizer4OK);
- m_sdbSizer4Cancel = new wxButton(this, wxID_CANCEL);
- m_sdbSizer4->AddButton(m_sdbSizer4Cancel);
- m_sdbSizer4->Realize();
-
- bSizer30->Add(m_sdbSizer4, 0, wxALIGN_RIGHT, 5);
-
-
- this->SetSizer(bSizer30);
- this->Layout();
-
- this->Centre(wxBOTH);
- this->Centre(wxBOTH);
-
- // Connect Events
- this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgOptions::OnClose));
- this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgOptions::OnInitDialog));
-}
-
-DlgOptions::~DlgOptions()
-{
- // Disconnect Events
- this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgOptions::OnClose));
- this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgOptions::OnInitDialog));
-
-}
-
+
+ m_togBtnOnOff->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnOnOff), NULL, this);
+ m_togBtnSplit->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnSplitClick), NULL, this);
+ m_togBtnAnalog->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnAnalogClick), NULL, this);
+ m_togBtnALC->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnALCClick), NULL, this);
+ m_btnTogTX->Disconnect(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler(TopFrame::OnTogBtnTXClick), NULL, this);
+
+}
+
+DlgAbout::DlgAbout(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
+{
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+
+ wxBoxSizer* bSizer20;
+ bSizer20 = new wxBoxSizer(wxVERTICAL);
+
+ wxBoxSizer* bSizer21;
+ bSizer21 = new wxBoxSizer(wxVERTICAL);
+
+ wxBoxSizer* bSizer23;
+ bSizer23 = new wxBoxSizer(wxVERTICAL);
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer(wxVERTICAL);
+
+ m_bitmapAbout = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0);
+ bSizer25->Add(m_bitmapAbout, 1, wxALL|wxEXPAND, 5);
+
+
+ bSizer23->Add(bSizer25, 1, wxEXPAND, 5);
+
+ wxBoxSizer* bSizer26;
+ bSizer26 = new wxBoxSizer(wxVERTICAL);
+
+ m_staticText1 = new wxStaticText(this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0);
+ m_staticText1->Wrap(-1);
+ bSizer26->Add(m_staticText1, 1, wxALL, 5);
+
+
+ bSizer23->Add(bSizer26, 0, 0, 5);
+
+
+ bSizer21->Add(bSizer23, 1, wxEXPAND, 5);
+
+ wxBoxSizer* bSizer24;
+ bSizer24 = new wxBoxSizer(wxVERTICAL);
+
+ m_textCtrl2 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ bSizer24->Add(m_textCtrl2, 1, wxALL|wxEXPAND, 5);
+
+
+ bSizer21->Add(bSizer24, 1, wxEXPAND, 5);
+
+
+ bSizer20->Add(bSizer21, 1, wxEXPAND, 5);
+
+ wxBoxSizer* bSizer22;
+ bSizer22 = new wxBoxSizer(wxVERTICAL);
+
+ m_button9 = new wxButton(this, wxID_ANY, _("MyButton"), wxDefaultPosition, wxDefaultSize, 0);
+ bSizer22->Add(m_button9, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxALL, 5);
+
+
+ bSizer20->Add(bSizer22, 0, wxALIGN_RIGHT, 5);
+
+
+ this->SetSizer(bSizer20);
+ this->Layout();
+
+ this->Centre(wxBOTH);
+ this->Centre(wxBOTH);
+
+ // Connect Events
+ this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAbout::OnClose));
+ this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAbout::OnInitDialog));
+}
+
+DlgAbout::~DlgAbout()
+{
+ // Disconnect Events
+ this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAbout::OnClose));
+ this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAbout::OnInitDialog));
+
+}
+
+DlgAudio::DlgAudio(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
+{
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+
+ wxBoxSizer* bSizer32;
+ bSizer32 = new wxBoxSizer(wxVERTICAL);
+
+ m_nbAudioOptions = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
+ m_panelDevices = new wxPanel(m_nbAudioOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
+ wxBoxSizer* bSizer34;
+ bSizer34 = new wxBoxSizer(wxVERTICAL);
+
+ wxStaticBoxSizer* sbSizer10;
+ sbSizer10 = new wxStaticBoxSizer(new wxStaticBox(m_panelDevices, wxID_ANY, _("PortAudio")), wxHORIZONTAL);
+
+ wxBoxSizer* bSizer41;
+ bSizer41 = new wxBoxSizer(wxHORIZONTAL);
+
+ wxGridSizer* gSizer6;
+ gSizer6 = new wxGridSizer(3, 1, 0, 0);
+
+ gSizer6->SetMinSize(wxSize(115,-1));
+ m_radioBtnPortAudio = new wxRadioButton(m_panelDevices, wxID_ANY, _("PortAudio"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
+ m_radioBtnPortAudio->SetValue(true);
+ gSizer6->Add(m_radioBtnPortAudio, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+ wxGridSizer* gSizer51;
+ gSizer51 = new wxGridSizer(2, 2, 0, 0);
+
+ gSizer51->SetMinSize(wxSize(110,-1));
+ m_staticText151 = new wxStaticText(m_panelDevices, wxID_ANY, _("# Ch Out:"), wxDefaultPosition, wxSize(80,-1), wxALIGN_RIGHT);
+ m_staticText151->Wrap(-1);
+ m_staticText151->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
+ m_staticText151->SetMinSize(wxSize(80,-1));
+ m_staticText151->SetMaxSize(wxSize(80,-1));
+
+ gSizer51->Add(m_staticText151, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxEXPAND, 5);
+
+ m_textNumChOut = new wxTextCtrl(m_panelDevices, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), wxTE_READONLY);
+ m_textNumChOut->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
+ m_textNumChOut->SetMinSize(wxSize(30,-1));
+ m_textNumChOut->SetMaxSize(wxSize(30,-1));
+
+ gSizer51->Add(m_textNumChOut, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL, 5);
+
+ m_staticText141 = new wxStaticText(m_panelDevices, wxID_ANY, _("# Ch In:"), wxDefaultPosition, wxSize(80,-1), wxALIGN_RIGHT);
+ m_staticText141->Wrap(-1);
+ m_staticText141->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
+ m_staticText141->SetMinSize(wxSize(80,-1));
+ m_staticText141->SetMaxSize(wxSize(90,-1));
+
+ gSizer51->Add(m_staticText141, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxEXPAND, 5);
+
+ m_textNumChIn = new wxTextCtrl(m_panelDevices, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), wxTE_READONLY);
+ m_textNumChIn->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
+ m_textNumChIn->SetMinSize(wxSize(30,-1));
+ m_textNumChIn->SetMaxSize(wxSize(30,-1));
+
+ gSizer51->Add(m_textNumChIn, 0, wxALL, 4);
+
+
+ gSizer6->Add(gSizer51, 0, wxEXPAND, 5);
+
+
+ bSizer41->Add(gSizer6, 0, wxALL, 5);
+
+ wxGridSizer* gSizer7;
+ gSizer7 = new wxGridSizer(4, 2, 0, 0);
+
+ m_staticText14 = new wxStaticText(m_panelDevices, wxID_ANY, _("Audio in (mic) -> codec:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
+ m_staticText14->Wrap(-1);
+ gSizer7->Add(m_staticText14, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
+
+ m_comboAudioCodec = new wxComboBox(m_panelDevices, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
+ gSizer7->Add(m_comboAudioCodec, 1, wxALL, 5);
+
+ m_staticText15 = new wxStaticText(m_panelDevices, wxID_ANY, _("codec -> Radio Tx:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
+ m_staticText15->Wrap(-1);
+ gSizer7->Add(m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
+
+ m_comboCodecTx = new wxComboBox(m_panelDevices, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
+ gSizer7->Add(m_comboCodecTx, 1, wxALL, 5);
+
+ m_staticText16 = new wxStaticText(m_panelDevices, wxID_ANY, _("Radio Rx -> codec:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
+ m_staticText16->Wrap(-1);
+ gSizer7->Add(m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
+
+ m_comboRadioRx = new wxComboBox(m_panelDevices, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
+ gSizer7->Add(m_comboRadioRx, 1, wxALL, 5);
+
+ m_staticText17 = new wxStaticText(m_panelDevices, wxID_ANY, _("codec -> Audio out (spkr):"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
+ m_staticText17->Wrap(-1);
+ gSizer7->Add(m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
+
+ m_comboCodecSpkr = new wxComboBox(m_panelDevices, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
+ gSizer7->Add(m_comboCodecSpkr, 0, wxALL, 5);
+
+
+ bSizer41->Add(gSizer7, 0, wxALL|wxEXPAND, 5);
+
+
+ sbSizer10->Add(bSizer41, 1, wxEXPAND, 5);
+
+
+ bSizer34->Add(sbSizer10, 1, wxEXPAND, 5);
+
+ wxStaticBoxSizer* sbSizer11;
+ sbSizer11 = new wxStaticBoxSizer(new wxStaticBox(m_panelDevices, wxID_ANY, _("File I/O")), wxHORIZONTAL);
+
+ wxBoxSizer* bSizer38;
+ bSizer38 = new wxBoxSizer(wxVERTICAL);
+
+ m_radioBtnFileOnly = new wxRadioButton(m_panelDevices, wxID_ANY, _("File Only"), wxDefaultPosition, wxDefaultSize, 0);
+ bSizer38->Add(m_radioBtnFileOnly, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+
+ sbSizer11->Add(bSizer38, 0, wxEXPAND, 5);
+
+ wxBoxSizer* bSizer45;
+ bSizer45 = new wxBoxSizer(wxVERTICAL);
+
+
+ sbSizer11->Add(bSizer45, 1, wxEXPAND, 5);
+
+ wxBoxSizer* bSizer46;
+ bSizer46 = new wxBoxSizer(wxVERTICAL);
+
+
+ sbSizer11->Add(bSizer46, 1, wxEXPAND, 5);
+
+
+ bSizer34->Add(sbSizer11, 1, wxEXPAND, 5);
+
+
+ m_panelDevices->SetSizer(bSizer34);
+ m_panelDevices->Layout();
+ bSizer34->Fit(m_panelDevices);
+ m_nbAudioOptions->AddPage(m_panelDevices, _("Devices"), true);
+ m_panelSettings = new wxPanel(m_nbAudioOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
+ wxBoxSizer* bSizer27;
+ bSizer27 = new wxBoxSizer(wxVERTICAL);
+
+ wxBoxSizer* bSizer271;
+ bSizer271 = new wxBoxSizer(wxHORIZONTAL);
+
+ wxStaticBoxSizer* sbSizer6;
+ sbSizer6 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Rx Input")), wxVERTICAL);
+
+ wxBoxSizer* bSizer31;
+ bSizer31 = new wxBoxSizer(wxVERTICAL);
+
+ m_lbRxInput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
+ bSizer31->Add(m_lbRxInput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
+
+ m_textRxInput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ bSizer31->Add(m_textRxInput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
+
+
+ sbSizer6->Add(bSizer31, 1, wxEXPAND, 6);
+
+
+ bSizer271->Add(sbSizer6, 1, wxEXPAND, 5);
+
+ wxStaticBoxSizer* sbSizer7;
+ sbSizer7 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Tx Output")), wxVERTICAL);
+
+ wxBoxSizer* bSizer281;
+ bSizer281 = new wxBoxSizer(wxVERTICAL);
+
+ m_lbTxOutput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
+ bSizer281->Add(m_lbTxOutput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
+
+ m_textTxOutput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ bSizer281->Add(m_textTxOutput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
+
+
+ sbSizer7->Add(bSizer281, 1, wxEXPAND, 5);
+
+
+ bSizer271->Add(sbSizer7, 1, wxEXPAND, 6);
+
+
+ bSizer27->Add(bSizer271, 1, wxEXPAND, 5);
+
+ wxBoxSizer* bSizer26;
+ bSizer26 = new wxBoxSizer(wxHORIZONTAL);
+
+ wxStaticBoxSizer* sbSizer8;
+ sbSizer8 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Voice Input")), wxVERTICAL);
+
+ wxBoxSizer* bSizer29;
+ bSizer29 = new wxBoxSizer(wxVERTICAL);
+
+ m_lbVoiceInput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
+ bSizer29->Add(m_lbVoiceInput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
+
+ m_textVoiceInput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ bSizer29->Add(m_textVoiceInput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
+
+
+ sbSizer8->Add(bSizer29, 1, wxEXPAND, 5);
+
+
+ bSizer26->Add(sbSizer8, 1, wxEXPAND, 6);
+
+ wxStaticBoxSizer* sbSizer9;
+ sbSizer9 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Voice Output")), wxVERTICAL);
+
+ wxBoxSizer* bSizer30;
+ bSizer30 = new wxBoxSizer(wxVERTICAL);
+
+ m_lbVoiceOutput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
+ bSizer30->Add(m_lbVoiceOutput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
+
+ m_textVoiceOutput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ bSizer30->Add(m_textVoiceOutput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
+
+
+ sbSizer9->Add(bSizer30, 1, wxEXPAND, 1);
+
+
+ bSizer26->Add(sbSizer9, 1, wxEXPAND, 6);
+
+
+ bSizer27->Add(bSizer26, 1, wxEXPAND, 1);
+
+
+ m_panelSettings->SetSizer(bSizer27);
+ m_panelSettings->Layout();
+ bSizer27->Fit(m_panelSettings);
+ m_nbAudioOptions->AddPage(m_panelSettings, _("Settings"), false);
+
+ bSizer32->Add(m_nbAudioOptions, 1, wxEXPAND | wxALL, 1);
+
+ wxBoxSizer* bSizer28;
+ bSizer28 = new wxBoxSizer(wxVERTICAL);
+
+ m_sdbSizer3 = new wxStdDialogButtonSizer();
+ m_sdbSizer3OK = new wxButton(this, wxID_OK);
+ m_sdbSizer3->AddButton(m_sdbSizer3OK);
+ m_sdbSizer3Apply = new wxButton(this, wxID_APPLY);
+ m_sdbSizer3->AddButton(m_sdbSizer3Apply);
+ m_sdbSizer3Cancel = new wxButton(this, wxID_CANCEL);
+ m_sdbSizer3->AddButton(m_sdbSizer3Cancel);
+ m_sdbSizer3->Realize();
+
+ bSizer28->Add(m_sdbSizer3, 1, wxEXPAND, 5);
+
+
+ bSizer32->Add(bSizer28, 0, wxEXPAND, 5);
+
+
+ bSizer32->Add(0, 15, 0, wxEXPAND, 5);
+
+
+ this->SetSizer(bSizer32);
+ this->Layout();
+
+ this->Centre(wxBOTH);
+ this->Centre(wxBOTH);
+
+ // Connect Events
+ this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAudio::OnClose));
+ this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAudio::OnInitDialog));
+ m_lbRxInput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnRxInputSelect), NULL, this);
+ m_lbTxOutput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnTxOutputSelect), NULL, this);
+ m_lbVoiceInput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceInputSelect), NULL, this);
+ m_lbVoiceOutput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceOutputSelect), NULL, this);
+ m_sdbSizer3Apply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnApply), NULL, this);
+ m_sdbSizer3Cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnCancel), NULL, this);
+ m_sdbSizer3OK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnOK), NULL, this);
+}
+
+DlgAudio::~DlgAudio()
+{
+ // Disconnect Events
+ this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAudio::OnClose));
+ this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAudio::OnInitDialog));
+ m_lbRxInput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnRxInputSelect), NULL, this);
+ m_lbTxOutput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnTxOutputSelect), NULL, this);
+ m_lbVoiceInput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceInputSelect), NULL, this);
+ m_lbVoiceOutput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceOutputSelect), NULL, this);
+ m_sdbSizer3Apply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnApply), NULL, this);
+ m_sdbSizer3Cancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnCancel), NULL, this);
+ m_sdbSizer3OK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnOK), NULL, this);
+
+}
+
+DlgOptions::DlgOptions(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
+{
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+
+ wxBoxSizer* bSizer30;
+ bSizer30 = new wxBoxSizer(wxVERTICAL);
+
+ wxStaticBoxSizer* sbSizer5;
+ sbSizer5 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Config Options")), wxHORIZONTAL);
+
+ wxGridSizer* gSizer2;
+ gSizer2 = new wxGridSizer(6, 2, 0, 0);
+
+ m_staticText2 = new wxStaticText(this, wxID_ANY, _("Option #1:"), wxDefaultPosition, wxDefaultSize, 0);
+ m_staticText2->Wrap(-1);
+ gSizer2->Add(m_staticText2, 1, wxALIGN_RIGHT|wxALL, 5);
+
+ m_textCtrl3 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer2->Add(m_textCtrl3, 1, wxALL, 5);
+
+ m_staticText3 = new wxStaticText(this, wxID_ANY, _("Option #2:"), wxDefaultPosition, wxDefaultSize, 0);
+ m_staticText3->Wrap(-1);
+ gSizer2->Add(m_staticText3, 1, wxALIGN_RIGHT|wxALL, 5);
+
+ m_textCtrl4 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer2->Add(m_textCtrl4, 1, wxALL, 5);
+
+ m_staticText4 = new wxStaticText(this, wxID_ANY, _("Option #3:"), wxDefaultPosition, wxDefaultSize, 0);
+ m_staticText4->Wrap(-1);
+ gSizer2->Add(m_staticText4, 1, wxALIGN_RIGHT|wxALL, 5);
+
+ m_textCtrl5 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer2->Add(m_textCtrl5, 1, wxALL, 5);
+
+ m_staticText5 = new wxStaticText(this, wxID_ANY, _("Option #4:"), wxDefaultPosition, wxDefaultSize, 0);
+ m_staticText5->Wrap(-1);
+ gSizer2->Add(m_staticText5, 1, wxALIGN_RIGHT|wxALL, 5);
+
+ m_textCtrl6 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer2->Add(m_textCtrl6, 1, wxALL, 5);
+
+ m_staticText6 = new wxStaticText(this, wxID_ANY, _("Option #5:"), wxDefaultPosition, wxDefaultSize, 0);
+ m_staticText6->Wrap(-1);
+ gSizer2->Add(m_staticText6, 1, wxALIGN_RIGHT|wxALL, 5);
+
+ m_textCtrl7 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer2->Add(m_textCtrl7, 1, wxALL, 5);
+
+ m_staticText7 = new wxStaticText(this, wxID_ANY, _("Option #6:"), wxDefaultPosition, wxDefaultSize, 0);
+ m_staticText7->Wrap(-1);
+ gSizer2->Add(m_staticText7, 1, wxALIGN_RIGHT|wxALL, 5);
+
+ m_textCtrl8 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer2->Add(m_textCtrl8, 1, wxALL, 5);
+
+
+ sbSizer5->Add(gSizer2, 1, wxEXPAND, 5);
+
+
+ bSizer30->Add(sbSizer5, 1, wxEXPAND, 5);
+
+ m_sdbSizer4 = new wxStdDialogButtonSizer();
+ m_sdbSizer4OK = new wxButton(this, wxID_OK);
+ m_sdbSizer4->AddButton(m_sdbSizer4OK);
+ m_sdbSizer4Cancel = new wxButton(this, wxID_CANCEL);
+ m_sdbSizer4->AddButton(m_sdbSizer4Cancel);
+ m_sdbSizer4->Realize();
+
+ bSizer30->Add(m_sdbSizer4, 0, wxALIGN_RIGHT, 5);
+
+
+ this->SetSizer(bSizer30);
+ this->Layout();
+
+ this->Centre(wxBOTH);
+ this->Centre(wxBOTH);
+
+ // Connect Events
+ this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgOptions::OnClose));
+ this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgOptions::OnInitDialog));
+}
+
+DlgOptions::~DlgOptions()
+{
+ // Disconnect Events
+ this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgOptions::OnClose));
+ this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgOptions::OnInitDialog));
+
+}
+
DlgComPorts::DlgComPorts(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
-{
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
-
- wxBoxSizer* bSizer30;
- bSizer30 = new wxBoxSizer(wxVERTICAL);
-
- wxGridSizer* gSizer3;
- gSizer3 = new wxGridSizer(6, 2, 0, 0);
-
- m_staticText8 = new wxStaticText(this, wxID_ANY, _("Available Ports:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText8->Wrap(-1);
- gSizer3->Add(m_staticText8, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_listCtrlPortSelect = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ICON|wxLC_SINGLE_SEL);
- gSizer3->Add(m_listCtrlPortSelect, 2, wxALL|wxEXPAND, 2);
-
- m_staticText9 = new wxStaticText(this, wxID_ANY, _("Use Port:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText9->Wrap(-1);
- gSizer3->Add(m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlPort = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlPort, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
- m_staticText91 = new wxStaticText(this, wxID_ANY, _("Buad Rate:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText91->Wrap(-1);
- gSizer3->Add(m_staticText91, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlBaud = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlBaud, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
- m_staticText911 = new wxStaticText(this, wxID_ANY, _("Data Bits:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText911->Wrap(-1);
- gSizer3->Add(m_staticText911, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlDatabits = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlDatabits, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
- m_staticText912 = new wxStaticText(this, wxID_ANY, _("Stop Bits:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText912->Wrap(-1);
- gSizer3->Add(m_staticText912, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlStopbits = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlStopbits, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
- m_staticText913 = new wxStaticText(this, wxID_ANY, _("Parity:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText913->Wrap(-1);
- gSizer3->Add(m_staticText913, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlParity = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlParity, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
-
- bSizer30->Add(gSizer3, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5);
-
- m_sdbSizer5 = new wxStdDialogButtonSizer();
- m_sdbSizer5OK = new wxButton(this, wxID_OK);
- m_sdbSizer5->AddButton(m_sdbSizer5OK);
- m_sdbSizer5Apply = new wxButton(this, wxID_APPLY);
- m_sdbSizer5->AddButton(m_sdbSizer5Apply);
- m_sdbSizer5Cancel = new wxButton(this, wxID_CANCEL);
- m_sdbSizer5->AddButton(m_sdbSizer5Cancel);
- m_sdbSizer5->Realize();
-
- bSizer30->Add(m_sdbSizer5, 0, wxEXPAND, 5);
-
-
- this->SetSizer(bSizer30);
- this->Layout();
-
- this->Centre(wxBOTH);
- this->Centre(wxBOTH);
-
- // Connect Events
- this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgComPorts::OnInitDialog));
- m_sdbSizer5Apply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnApply), NULL, this);
- m_sdbSizer5Cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnCancel), NULL, this);
- m_sdbSizer5OK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnOK), NULL, this);
- m_listCtrlPortSelect->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(DlgComPorts::OnListItemSelected), NULL, this);
-}
-
-DlgComPorts::~DlgComPorts()
-{
- // Disconnect Events
+{
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+ this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+
+ wxBoxSizer* bSizer30;
+ bSizer30 = new wxBoxSizer(wxVERTICAL);
+
+ wxGridSizer* gSizer3;
+ gSizer3 = new wxGridSizer(6, 2, 0, 0);
+
+ m_staticText8 = new wxStaticText(this, wxID_ANY, _("Available Ports:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
+ m_staticText8->Wrap(-1);
+ gSizer3->Add(m_staticText8, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
+
+ m_listCtrlPortSelect = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ICON|wxLC_SINGLE_SEL);
+ gSizer3->Add(m_listCtrlPortSelect, 2, wxALL|wxEXPAND, 2);
+
+ m_staticText9 = new wxStaticText(this, wxID_ANY, _("Use Port:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
+ m_staticText9->Wrap(-1);
+ gSizer3->Add(m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
+
+ m_textRigCtrlPort = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer3->Add(m_textRigCtrlPort, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
+
+ m_staticText91 = new wxStaticText(this, wxID_ANY, _("Buad Rate:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
+ m_staticText91->Wrap(-1);
+ gSizer3->Add(m_staticText91, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
+
+ m_textRigCtrlBaud = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer3->Add(m_textRigCtrlBaud, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
+
+ m_staticText911 = new wxStaticText(this, wxID_ANY, _("Data Bits:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
+ m_staticText911->Wrap(-1);
+ gSizer3->Add(m_staticText911, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
+
+ m_textRigCtrlDatabits = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer3->Add(m_textRigCtrlDatabits, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
+
+ m_staticText912 = new wxStaticText(this, wxID_ANY, _("Stop Bits:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
+ m_staticText912->Wrap(-1);
+ gSizer3->Add(m_staticText912, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
+
+ m_textRigCtrlStopbits = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer3->Add(m_textRigCtrlStopbits, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
+
+ m_staticText913 = new wxStaticText(this, wxID_ANY, _("Parity:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
+ m_staticText913->Wrap(-1);
+ gSizer3->Add(m_staticText913, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
+
+ m_textRigCtrlParity = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+ gSizer3->Add(m_textRigCtrlParity, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
+
+
+ bSizer30->Add(gSizer3, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5);
+
+ m_sdbSizer5 = new wxStdDialogButtonSizer();
+ m_sdbSizer5OK = new wxButton(this, wxID_OK);
+ m_sdbSizer5->AddButton(m_sdbSizer5OK);
+ m_sdbSizer5Apply = new wxButton(this, wxID_APPLY);
+ m_sdbSizer5->AddButton(m_sdbSizer5Apply);
+ m_sdbSizer5Cancel = new wxButton(this, wxID_CANCEL);
+ m_sdbSizer5->AddButton(m_sdbSizer5Cancel);
+ m_sdbSizer5->Realize();
+
+ bSizer30->Add(m_sdbSizer5, 0, wxEXPAND, 5);
+
+
+ this->SetSizer(bSizer30);
+ this->Layout();
+
+ this->Centre(wxBOTH);
+ this->Centre(wxBOTH);
+
+ // Connect Events
+ this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgComPorts::OnInitDialog));
+ m_sdbSizer5Apply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnApply), NULL, this);
+ m_sdbSizer5Cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnCancel), NULL, this);
+ m_sdbSizer5OK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnOK), NULL, this);
+ m_listCtrlPortSelect->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(DlgComPorts::OnListItemSelected), NULL, this);
+}
+
+DlgComPorts::~DlgComPorts()
+{
+ // Disconnect Events
this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgComPorts::OnInitDialog));
- m_listCtrlPortSelect->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(DlgComPorts::OnListItemSelected), NULL, this);
- m_sdbSizer5Apply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnApply), NULL, this);
- m_sdbSizer5Cancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnCancel), NULL, this);
- m_sdbSizer5OK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnOK), NULL, this);
-}
+ m_listCtrlPortSelect->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(DlgComPorts::OnListItemSelected), NULL, this);
+ m_sdbSizer5Apply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnApply), NULL, this);
+ m_sdbSizer5Cancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnCancel), NULL, this);
+ m_sdbSizer5OK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnOK), NULL, this);
+}
diff --git a/fdmdv2/src/topFrame.h b/fdmdv2/src/topFrame.h
index 1595283e..e224706f 100644
--- a/fdmdv2/src/topFrame.h
+++ b/fdmdv2/src/topFrame.h
@@ -1,304 +1,304 @@
-///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Apr 10 2012)
-// http://www.wxformbuilder.org/
-//
-// PLEASE DO "NOT" EDIT THIS FILE!
-///////////////////////////////////////////////////////////////////////////
-
-#ifndef __TOPFRAME_H__
-#define __TOPFRAME_H__
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-///////////////////////////////////////////////////////////////////////////
-
-#define ID_OPEN 1000
-#define ID_SAVE 1001
-#define ID_CLOSE 1002
-#define ID_EXIT 1003
-#define ID_COPY 1004
-#define ID_CUT 1005
-#define ID_PASTE 1006
-#define ID_OPTIONS 1007
-#define ID_ABOUT 1008
-
-///////////////////////////////////////////////////////////////////////////////
-/// Class TopFrame
-///////////////////////////////////////////////////////////////////////////////
-class TopFrame : public wxFrame
-{
- private:
-
- protected:
- wxMenuBar* m_menubarMain;
- wxMenu* file;
- wxMenu* edit;
- wxMenu* tools;
- wxMenu* help;
- wxGauge* m_gaugeSNR;
- wxTextCtrl* m_textSNR;
- wxGauge* m_gaugeLevel;
- wxTextCtrl* m_txtCtrl;
- wxSlider* m_sliderSQ;
- wxCheckBox* m_ckboxSQ;
- wxStatusBar* m_statusBar1;
-
- // Virtual event handlers, overide them in your derived class
- virtual void topFrame_OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void topFrame_OnPaint( wxPaintEvent& event ) { event.Skip(); }
- virtual void topFrame_OnSize( wxSizeEvent& event ) { event.Skip(); }
- virtual void topFrame_OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnOpen( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOpenUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnSave( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnSaveUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCloseUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnExit( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCopy( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCopyUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnCut( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCutUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnPaste( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnPasteUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnToolsAudio( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToolsAudioUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnToolsComCfg( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToolsComCfgUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnToolsOptions( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnToolsOptionsUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnCaptureRxStream( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCaptureTxStream( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnPlayAudioFile( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpCheckUpdates( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnHelpCheckUpdatesUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnHelpAbout( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTogBtnRxID( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTogBtnTxID( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCmdSliderScroll( wxScrollEvent& event ) { event.Skip(); }
- virtual void OnSliderScrollBottom( wxScrollEvent& event ) { event.Skip(); }
- virtual void OnCmdSliderScrollChanged( wxScrollEvent& event ) { event.Skip(); }
- virtual void OnSliderScrollTop( wxScrollEvent& event ) { event.Skip(); }
- virtual void OnCheckSQClick( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTogBtnOnOff( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTogBtnSplitClick( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTogBtnAnalogClick( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTogBtnALCClick( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTogBtnTXClick( wxCommandEvent& event ) { event.Skip(); }
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Apr 10 2012)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __TOPFRAME_H__
+#define __TOPFRAME_H__
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+///////////////////////////////////////////////////////////////////////////
+
+#define ID_OPEN 1000
+#define ID_SAVE 1001
+#define ID_CLOSE 1002
+#define ID_EXIT 1003
+#define ID_COPY 1004
+#define ID_CUT 1005
+#define ID_PASTE 1006
+#define ID_OPTIONS 1007
+#define ID_ABOUT 1008
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class TopFrame
+///////////////////////////////////////////////////////////////////////////////
+class TopFrame : public wxFrame
+{
+ private:
+
+ protected:
+ wxMenuBar* m_menubarMain;
+ wxMenu* file;
+ wxMenu* edit;
+ wxMenu* tools;
+ wxMenu* help;
+ wxGauge* m_gaugeSNR;
+ wxTextCtrl* m_textSNR;
+ wxGauge* m_gaugeLevel;
+ wxTextCtrl* m_txtCtrl;
+ wxSlider* m_sliderSQ;
+ wxCheckBox* m_ckboxSQ;
+ wxStatusBar* m_statusBar1;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void topFrame_OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void topFrame_OnPaint( wxPaintEvent& event ) { event.Skip(); }
+ virtual void topFrame_OnSize( wxSizeEvent& event ) { event.Skip(); }
+ virtual void topFrame_OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnOpen( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOpenUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnSave( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSaveUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCloseUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnExit( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCopy( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCopyUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnCut( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCutUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnPaste( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPasteUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnToolsAudio( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToolsAudioUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnToolsComCfg( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToolsComCfgUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnToolsOptions( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnToolsOptionsUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnCaptureRxStream( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCaptureTxStream( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPlayAudioFile( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpCheckUpdates( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHelpCheckUpdatesUI( wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnHelpAbout( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnRxID( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnTxID( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCmdSliderScroll( wxScrollEvent& event ) { event.Skip(); }
+ virtual void OnSliderScrollBottom( wxScrollEvent& event ) { event.Skip(); }
+ virtual void OnCmdSliderScrollChanged( wxScrollEvent& event ) { event.Skip(); }
+ virtual void OnSliderScrollTop( wxScrollEvent& event ) { event.Skip(); }
+ virtual void OnCheckSQClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnOnOff( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnSplitClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnAnalogClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnALCClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnTXClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTogBtnSplitClickUI(wxUpdateUIEvent& event) { event.Skip(); }
virtual void OnTogBtnAnalogClickUI(wxUpdateUIEvent& event) { event.Skip(); }
virtual void OnTogBtnALCClickUI(wxUpdateUIEvent& event) { event.Skip(); }
- virtual void OnTogBtnRxIDUI(wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnTogBtnTxIDUI(wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnTogBtnTXClickUI(wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnRxIDUI(wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnTxIDUI(wxUpdateUIEvent& event ) { event.Skip(); }
+ virtual void OnTogBtnTXClickUI(wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnTogBtnOnOffUI(wxUpdateUIEvent& event ) { event.Skip(); }
-
- public:
- wxToggleButton* m_togRxID;
- wxToggleButton* m_togTxID;
- wxToggleButton* m_togBtnOnOff;
- wxToggleButton* m_togBtnSplit;
- wxToggleButton* m_togBtnAnalog;
- wxToggleButton* m_togBtnALC;
- wxToggleButton* m_btnTogTX;
-
- wxAuiNotebook* m_auiNbookCtrl;
-
- TopFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FDMDV2"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 761,500 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
-
- ~TopFrame();
-
-};
-
-///////////////////////////////////////////////////////////////////////////////
-/// Class DlgAbout
-///////////////////////////////////////////////////////////////////////////////
-class DlgAbout : public wxDialog
-{
- private:
-
- protected:
- wxStaticBitmap* m_bitmapAbout;
- wxStaticText* m_staticText1;
- wxTextCtrl* m_textCtrl2;
- wxButton* m_button9;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
-
-
- public:
-
- DlgAbout( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About FDMDV2"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 352,343 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~DlgAbout();
-
-};
-
-///////////////////////////////////////////////////////////////////////////////
-/// Class DlgAudio
-///////////////////////////////////////////////////////////////////////////////
-class DlgAudio : public wxDialog
-{
- private:
-
- protected:
- wxNotebook* m_nbAudioOptions;
- wxPanel* m_panelDevices;
- wxRadioButton* m_radioBtnPortAudio;
- wxStaticText* m_staticText151;
- wxTextCtrl* m_textNumChOut;
- wxStaticText* m_staticText141;
- wxTextCtrl* m_textNumChIn;
- wxStaticText* m_staticText14;
- wxComboBox* m_comboAudioCodec;
- wxStaticText* m_staticText15;
- wxComboBox* m_comboCodecTx;
- wxStaticText* m_staticText16;
- wxComboBox* m_comboRadioRx;
- wxStaticText* m_staticText17;
- wxComboBox* m_comboCodecSpkr;
- wxRadioButton* m_radioBtnFileOnly;
- wxPanel* m_panelSettings;
- wxListBox* m_lbRxInput;
- wxTextCtrl* m_textRxInput;
- wxListBox* m_lbTxOutput;
- wxTextCtrl* m_textTxOutput;
- wxListBox* m_lbVoiceInput;
- wxTextCtrl* m_textVoiceInput;
- wxListBox* m_lbVoiceOutput;
- wxTextCtrl* m_textVoiceOutput;
- wxStdDialogButtonSizer* m_sdbSizer3;
- wxButton* m_sdbSizer3OK;
- wxButton* m_sdbSizer3Apply;
- wxButton* m_sdbSizer3Cancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
- virtual void OnRxInputSelect( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnTxOutputSelect( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnVoiceInputSelect( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnVoiceOutputSelect( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- DlgAudio( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Audio Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 555,419 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~DlgAudio();
-
-};
-
-///////////////////////////////////////////////////////////////////////////////
-/// Class DlgOptions
-///////////////////////////////////////////////////////////////////////////////
-class DlgOptions : public wxDialog
-{
- private:
-
- protected:
- wxStaticText* m_staticText2;
- wxTextCtrl* m_textCtrl3;
- wxStaticText* m_staticText3;
- wxTextCtrl* m_textCtrl4;
- wxStaticText* m_staticText4;
- wxTextCtrl* m_textCtrl5;
- wxStaticText* m_staticText5;
- wxTextCtrl* m_textCtrl6;
- wxStaticText* m_staticText6;
- wxTextCtrl* m_textCtrl7;
- wxStaticText* m_staticText7;
- wxTextCtrl* m_textCtrl8;
- wxStdDialogButtonSizer* m_sdbSizer4;
- wxButton* m_sdbSizer4OK;
- wxButton* m_sdbSizer4Cancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
-
-
- public:
-
- DlgOptions( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Program Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 332,364 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~DlgOptions();
-
-};
-
-///////////////////////////////////////////////////////////////////////////////
-/// Class DlgComPorts
-///////////////////////////////////////////////////////////////////////////////
-class DlgComPorts : public wxDialog
-{
- private:
-
- protected:
- wxStaticText* m_staticText8;
- wxListCtrl* m_listCtrlPortSelect;
- wxStaticText* m_staticText9;
- wxTextCtrl* m_textRigCtrlPort;
- wxStaticText* m_staticText91;
- wxTextCtrl* m_textRigCtrlBaud;
- wxStaticText* m_staticText911;
- wxTextCtrl* m_textRigCtrlDatabits;
- wxStaticText* m_staticText912;
- wxTextCtrl* m_textRigCtrlStopbits;
- wxStaticText* m_staticText913;
- wxTextCtrl* m_textRigCtrlParity;
- wxStdDialogButtonSizer* m_sdbSizer5;
- wxButton* m_sdbSizer5OK;
- wxButton* m_sdbSizer5Apply;
- wxButton* m_sdbSizer5Cancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); }
- virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
- virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
- virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- DlgComPorts( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Com Port"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 399,354 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
- ~DlgComPorts();
-
-};
-
-#endif //__TOPFRAME_H__
+
+ public:
+ wxToggleButton* m_togRxID;
+ wxToggleButton* m_togTxID;
+ wxToggleButton* m_togBtnOnOff;
+ wxToggleButton* m_togBtnSplit;
+ wxToggleButton* m_togBtnAnalog;
+ wxToggleButton* m_togBtnALC;
+ wxToggleButton* m_btnTogTX;
+
+ wxAuiNotebook* m_auiNbookCtrl;
+
+ TopFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FDMDV2"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 761,500 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
+
+ ~TopFrame();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DlgAbout
+///////////////////////////////////////////////////////////////////////////////
+class DlgAbout : public wxDialog
+{
+ private:
+
+ protected:
+ wxStaticBitmap* m_bitmapAbout;
+ wxStaticText* m_staticText1;
+ wxTextCtrl* m_textCtrl2;
+ wxButton* m_button9;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DlgAbout( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About FDMDV2"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 352,343 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~DlgAbout();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DlgAudio
+///////////////////////////////////////////////////////////////////////////////
+class DlgAudio : public wxDialog
+{
+ private:
+
+ protected:
+ wxNotebook* m_nbAudioOptions;
+ wxPanel* m_panelDevices;
+ wxRadioButton* m_radioBtnPortAudio;
+ wxStaticText* m_staticText151;
+ wxTextCtrl* m_textNumChOut;
+ wxStaticText* m_staticText141;
+ wxTextCtrl* m_textNumChIn;
+ wxStaticText* m_staticText14;
+ wxComboBox* m_comboAudioCodec;
+ wxStaticText* m_staticText15;
+ wxComboBox* m_comboCodecTx;
+ wxStaticText* m_staticText16;
+ wxComboBox* m_comboRadioRx;
+ wxStaticText* m_staticText17;
+ wxComboBox* m_comboCodecSpkr;
+ wxRadioButton* m_radioBtnFileOnly;
+ wxPanel* m_panelSettings;
+ wxListBox* m_lbRxInput;
+ wxTextCtrl* m_textRxInput;
+ wxListBox* m_lbTxOutput;
+ wxTextCtrl* m_textTxOutput;
+ wxListBox* m_lbVoiceInput;
+ wxTextCtrl* m_textVoiceInput;
+ wxListBox* m_lbVoiceOutput;
+ wxTextCtrl* m_textVoiceOutput;
+ wxStdDialogButtonSizer* m_sdbSizer3;
+ wxButton* m_sdbSizer3OK;
+ wxButton* m_sdbSizer3Apply;
+ wxButton* m_sdbSizer3Cancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
+ virtual void OnRxInputSelect( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnTxOutputSelect( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnVoiceInputSelect( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnVoiceOutputSelect( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DlgAudio( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Audio Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 555,419 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~DlgAudio();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DlgOptions
+///////////////////////////////////////////////////////////////////////////////
+class DlgOptions : public wxDialog
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticText2;
+ wxTextCtrl* m_textCtrl3;
+ wxStaticText* m_staticText3;
+ wxTextCtrl* m_textCtrl4;
+ wxStaticText* m_staticText4;
+ wxTextCtrl* m_textCtrl5;
+ wxStaticText* m_staticText5;
+ wxTextCtrl* m_textCtrl6;
+ wxStaticText* m_staticText6;
+ wxTextCtrl* m_textCtrl7;
+ wxStaticText* m_staticText7;
+ wxTextCtrl* m_textCtrl8;
+ wxStdDialogButtonSizer* m_sdbSizer4;
+ wxButton* m_sdbSizer4OK;
+ wxButton* m_sdbSizer4Cancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DlgOptions( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Program Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 332,364 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~DlgOptions();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DlgComPorts
+///////////////////////////////////////////////////////////////////////////////
+class DlgComPorts : public wxDialog
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticText8;
+ wxListCtrl* m_listCtrlPortSelect;
+ wxStaticText* m_staticText9;
+ wxTextCtrl* m_textRigCtrlPort;
+ wxStaticText* m_staticText91;
+ wxTextCtrl* m_textRigCtrlBaud;
+ wxStaticText* m_staticText911;
+ wxTextCtrl* m_textRigCtrlDatabits;
+ wxStaticText* m_staticText912;
+ wxTextCtrl* m_textRigCtrlStopbits;
+ wxStaticText* m_staticText913;
+ wxTextCtrl* m_textRigCtrlParity;
+ wxStdDialogButtonSizer* m_sdbSizer5;
+ wxButton* m_sdbSizer5OK;
+ wxButton* m_sdbSizer5Apply;
+ wxButton* m_sdbSizer5Cancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); }
+ virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOK( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
+ virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DlgComPorts( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Com Port"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 399,354 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~DlgComPorts();
+
+};
+
+#endif //__TOPFRAME_H__