Skip to content

Commit

Permalink
compile on Microsoft Visual Studio (C++ / MSVC) Express 2013
Browse files Browse the repository at this point in the history
* added project files .sln/.vcproj for Visual Studio
* added replacement functions for procitec specific things
 - replaced include headers
* now requiring source of clsocket and tinythreadpp
 cloned in parallel to this ExtIO
* fixed bug, WRITE_xxx() function-macros accepted const pointers
* put some 'good' defaults into settings: IP addresses, freq range, ..
* added several samplerates

Signed-off-by: hayati ayguen <[email protected]>
  • Loading branch information
hayguen committed May 7, 2018
1 parent 9a99966 commit 844e364
Show file tree
Hide file tree
Showing 16 changed files with 1,293 additions and 127 deletions.
22 changes: 22 additions & 0 deletions ExtIO_NetSDR.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExtIO_NetSDR", "ExtIO_NetSDR\ExtIO_NetSDR.vcxproj", "{F6D8A813-8B8D-46B5-B015-B5BE1BC467BE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F6D8A813-8B8D-46B5-B015-B5BE1BC467BE}.Debug|Win32.ActiveCfg = Debug|Win32
{F6D8A813-8B8D-46B5-B015-B5BE1BC467BE}.Debug|Win32.Build.0 = Debug|Win32
{F6D8A813-8B8D-46B5-B015-B5BE1BC467BE}.Release|Win32.ActiveCfg = Release|Win32
{F6D8A813-8B8D-46B5-B015-B5BE1BC467BE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
124 changes: 124 additions & 0 deletions ExtIO_NetSDR/ExtIO_NetSDR.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F6D8A813-8B8D-46B5-B015-B5BE1BC467BE}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>ExtIO_NetSDR</RootNamespace>
<ProjectName>ExtIO_RFspaceNetSDR</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>../../clsocket/src;../../tinythreadpp/source;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;EXTIO_NETSDR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;EXTIO_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsManaged>false</CompileAsManaged>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<Version>2018.0</Version>
<ModuleDefinitionFile>..\src\ExtIO_RFspaceNetSDR.def</ModuleDefinitionFile>
<StripPrivateSymbols>/PDBSTRIPPED</StripPrivateSymbols>
<AssemblyDebug>false</AssemblyDebug>
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\clsocket\src\PassiveSocket.cpp" />
<ClCompile Include="..\..\clsocket\src\SimpleSocket.cpp" />
<ClCompile Include="..\..\tinythreadpp\source\tinythread.cpp" />
<ClCompile Include="..\src\ExtIO_Logging.cpp" />
<ClCompile Include="..\src\ExtIO_RFspaceNetSDR.cpp" />
<ClCompile Include="..\src\procitec_replacements.cpp" />
<ClCompile Include="..\src\rfspace_netsdr_control.cpp" />
<ClCompile Include="..\src\rfspace_netsdr_receiver.cpp" />
<ClCompile Include="..\src\rfspace_netsdr_udpdata.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\src\ExtIO_RFspaceNetSDR.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\clsocket\src\ActiveSocket.h" />
<ClInclude Include="..\..\clsocket\src\Host.h" />
<ClInclude Include="..\..\clsocket\src\PassiveSocket.h" />
<ClInclude Include="..\..\clsocket\src\SimpleSocket.h" />
<ClInclude Include="..\..\clsocket\src\StatTimer.h" />
<ClInclude Include="..\..\tinythreadpp\source\fast_mutex.h" />
<ClInclude Include="..\..\tinythreadpp\source\tinythread.h" />
<ClInclude Include="..\src\ExtIO_Logging.h" />
<ClInclude Include="..\src\ExtIO_RFspaceNetSDR.h" />
<ClInclude Include="..\src\LC_ExtIO_Types.h" />
<ClInclude Include="..\src\procitec_replacements.h" />
<ClInclude Include="..\src\rfspace_netsdr_control.h" />
<ClInclude Include="..\src\rfspace_netsdr_receiver.h" />
<ClInclude Include="..\src\rfspace_netsdr_udpdata.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
95 changes: 95 additions & 0 deletions ExtIO_NetSDR/ExtIO_NetSDR.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\ExtIO_RFspaceNetSDR.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\rfspace_netsdr_control.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\rfspace_netsdr_receiver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\rfspace_netsdr_udpdata.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\ExtIO_Logging.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\procitec_replacements.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\clsocket\src\PassiveSocket.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\clsocket\src\SimpleSocket.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\tinythreadpp\source\tinythread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\src\ExtIO_RFspaceNetSDR.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\ExtIO_RFspaceNetSDR.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\rfspace_netsdr_control.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\rfspace_netsdr_receiver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\rfspace_netsdr_udpdata.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\ExtIO_Logging.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\LC_ExtIO_Types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\procitec_replacements.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\clsocket\src\ActiveSocket.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\clsocket\src\Host.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\clsocket\src\PassiveSocket.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\clsocket\src\SimpleSocket.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\clsocket\src\StatTimer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\tinythreadpp\source\fast_mutex.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\tinythreadpp\source\tinythread.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ExtIO_RFspaceNetSDR
Winrad/HDSDR plugin ExtIO for the RFspace NetSDR receiver


## Software Defined Radio (SDR) receiver

The hardware receiver was manufactured by RFspace.
Expand All @@ -13,6 +14,7 @@ Network protocol specification for the interface is available at
http://www.moetronix.com/svdownload.htm
labeled 'NetSDR Interface Spec'


## Origin of source code

The ExtIO was developed at PROCITEC GmbH,
Expand All @@ -24,3 +26,35 @@ They kindly gave permission to release the source code under LGPL (Lesser Genera

Authors are Sebastian Balthasar and Hayati Ayguen. On questions, contact Hayati at [email protected]


## Step-by-step installation

* install your favorite SDR software, e.g. HDSDR from http://www.hdsdr.de/ .
Other ExtIO compatible software like Winrad or Studio1 should also work.

* download ExtIO_RFspaceNetSDR.DLL https://github.com/hayguen/ExtIO_RFspaceNetSDR/releases

* copy downloaded file into your SDR software's installation directory (default=C:\Program Files (x86)\HDSDR).
Do NOT try to unzip directly into this directory! Because of Windows' user rights management this will fail. Unzip somewhere else first, then copy it to the installation directory.

* exit and restart SDR software and select ExtIO_RFspaceNetSDR.DLL if demanded


## Compilation notes

Besides cloning this repository, you also need to clone following libraries from same directory:

* https://github.com/hayguen/tinythreadpp for threading

* https://github.com/hayguen/clsocket for tcp/ip socket communication

Microsoft Visual Studio Express 2013 (MSVC) IDE is used for compilation.
Other compiler should work, when adding suitable project files or fixing CMakeLists.txt.


## Status

Compiles. In test.

ExtIO control GUI for configuration is missing! To be implemented ..

12 changes: 12 additions & 0 deletions src/ExtIO_Logging.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

#include "ExtIO_Logging.h"

// error message, with "const char*" in IQdata,
// intended for a log file AND a message box
// for messages extHw_MSG_*

pfnExtIOCallback gpfnExtIOCallbackPtr = nullptr;

char acExtioMsg[1024] = { 0 };
bool SDRsupportsLogging = false;

58 changes: 58 additions & 0 deletions src/ExtIO_Logging.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#pragma once

#include "LC_ExtIO_Types.h"

#ifdef _MSC_VER
#pragma warning(disable : 4996)
#define snprintf _snprintf
#endif

/* ExtIO Callback */
extern pfnExtIOCallback gpfnExtIOCallbackPtr;

// error message, with "const char*" in IQdata,
// intended for a log file AND a message box
// for messages extHw_MSG_*

extern char acExtioMsg[1024];
extern bool SDRsupportsLogging;


#define SDRLOGTXT( A, TEXT ) \
do { \
if ( gpfnExtIOCallbackPtr && SDRsupportsLogging ) \
gpfnExtIOCallbackPtr(-1, A, 0, TEXT ); \
} while (0)

// optional after calling gpfnExtIOCallbackPtr() ..
// if (extHw_MSG_ERRDLG == A) \
// setStatusCB(TEXT, true); \

#define SDRLOG( A, TEXTFMT, ... ) \
do { \
if ( gpfnExtIOCallbackPtr && SDRsupportsLogging ) \
{ \
snprintf(acExtioMsg, 1023, TEXTFMT, ##__VA_ARGS__); \
gpfnExtIOCallbackPtr(-1, A, 0, acExtioMsg ); \
} \
} while (0)


// for compatibility with PROCITEC code ..
// translate log level macros and implement LOG_PRO() macro .. similar to SDRLOG

#define LOG_ERROR extHw_MSG_ERROR
#define LOG_PROTOCOL extHw_MSG_WARNING
#define LOG_NORMAL extHw_MSG_LOG
#define LOG_DEBUG extHw_MSG_DEBUG

#define LOG_PRO( A, TEXTFMT, ... ) \
do { \
if ( gpfnExtIOCallbackPtr && SDRsupportsLogging ) \
{ \
snprintf(acExtioMsg, 1023, TEXTFMT, ##__VA_ARGS__); \
gpfnExtIOCallbackPtr(-1, A, 0, acExtioMsg ); \
} \
} while (0)

Loading

0 comments on commit 844e364

Please sign in to comment.