diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ad693c --- /dev/null +++ b/.gitignore @@ -0,0 +1,292 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs +**/wwwroot/lib/ +bookmarks.json +Hzd_Inst.rar +Hzd_Src.rar diff --git a/Signal/Bmps/Close2.bmp b/Signal/Bmps/Close2.bmp new file mode 100644 index 0000000..2eeb1a0 Binary files /dev/null and b/Signal/Bmps/Close2.bmp differ diff --git a/Signal/Bmps/MaximizeRestore2.bmp b/Signal/Bmps/MaximizeRestore2.bmp new file mode 100644 index 0000000..04b176c Binary files /dev/null and b/Signal/Bmps/MaximizeRestore2.bmp differ diff --git a/Signal/Bmps/close2_.bmp b/Signal/Bmps/close2_.bmp new file mode 100644 index 0000000..3d8f331 Binary files /dev/null and b/Signal/Bmps/close2_.bmp differ diff --git a/Signal/Bmps/minimize2.bmp b/Signal/Bmps/minimize2.bmp new file mode 100644 index 0000000..6330e42 Binary files /dev/null and b/Signal/Bmps/minimize2.bmp differ diff --git a/Signal/Bmps/sysmenu2.bmp b/Signal/Bmps/sysmenu2.bmp new file mode 100644 index 0000000..6cad827 Binary files /dev/null and b/Signal/Bmps/sysmenu2.bmp differ diff --git a/Signal/CConvolution.cls b/Signal/CConvolution.cls new file mode 100644 index 0000000..2c264f0 --- /dev/null +++ b/Signal/CConvolution.cls @@ -0,0 +1,184 @@ +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 1 'Persistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "CConvolution" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit + +Implements IDescrFunc2 + +Private collGraph As Collection + +Private hntHints As CGItem.DrawHints + +Public A As Double +Public b As Double +Public N As Long + +Public SgU As Double +Public SgH As Double + +Public ShowIn As Boolean +Public ShowImp As Boolean + +Private Sub Class_InitProperties() + With hntHints + .bMode = True + .bNullX = False + .bNullY = False + + .iPrecX = 2 + .iPrecY = 1 + .dStepX = 0.5 + .dStepY = 1 + + .dX1 = 0.5 + .dX2 = 9 + .dY1 = -9 + .dY2 = 8 + + .dSampleX1 = -5 + .dSampleX2 = 5 + .dSampleStep = 0.1 + End With + + A = -4 + b = 4 + N = 128 + + SgU = 5 + SgH = 0.5 + + ShowIn = True + ShowImp = True + + Set collGraph = New Collection + Dim grIt As New GraphItem + grIt.Color = RGB(0, 255, 0) + grIt.Name = "Свёртка" + collGraph.Add grIt, "Res" + +End Sub + +Public Property Get IDescrFunc2_Hints() As CGItem.DrawHints + IDescrFunc2_Hints = hntHints +End Property + +Public Property Let IDescrFunc2_Hints(dhHint As CGItem.DrawHints) + hntHints = dhHint +' PropertyChanged "Hints" +End Property + +Public Sub IDescrFunc2_SetParameters(ByVal colControls As Collection) + ReadValueFromControl colControls.item("Text_X1_4"), A + ReadValueFromControl colControls.item("Text_X2_4"), b + + ReadValueFromControl colControls.item("Text_N_4"), N + ReadValueFromControl colControls.item("Text_Sg1_4"), SgU + + ReadValueFromControl colControls.item("Text_Sg2_4"), SgH + + ShowIn = IIf(colControls.item("Check_ShowIn_4").Value = 0, False, True) + ShowImp = IIf(colControls.item("Check_ShowImp_4").Value = 0, False, True) + +End Sub + +Public Sub IDescrFunc2_GetParameters(ByVal colControls As Collection) + LoadValueToControl colControls.item("Text_X1_4"), A + LoadValueToControl colControls.item("Text_X2_4"), b + + LoadValueToControl colControls.item("Text_N_4"), N + LoadValueToControl colControls.item("Text_Sg1_4"), SgU + + LoadValueToControl colControls.item("Text_Sg2_4"), SgH + + colControls.item("Check_ShowIn_4").Value = IIf(ShowIn, 1, 0) + colControls.item("Check_ShowImp_4").Value = IIf(ShowImp, 1, 0) +End Sub + +Public Property Get IDescrFunc2_NameOfSuject() As String + IDescrFunc2_NameOfSuject = "Выходной сигнал" +End Property + +Public Property Get IDescrFunc2_Graphics() As Collection + Set IDescrFunc2_Graphics = collGraph +End Property + +Public Sub IDescrFunc2_Build() + Dim grIt As GraphItem + Set grIt = collGraph.item("Res") + + Dim ig As New IX4Lib.IXL4 + ig.ReInit A, b, N + ig.OnSignalC SgU, SgH + + ig.OnDirect + + Dim arrFetch() As Double + ig.FetchResults arrFetch + grIt.arrPoints = LoadResult2(arrFetch) + grIt.CalcLimits + + On Error Resume Next + collGraph.Remove "In" + collGraph.Remove "Imp" + On Error GoTo 0 + + If ShowIn Or ShowImp Then + Dim cg As New CGaussGen + With cg + .Ampl = 1 + .T0 = 0 + Dim hnt As CGItem.DrawHints + hnt = cg.IDescrFunc2_Hints + hnt.dSampleX1 = A + hnt.dSampleX2 = b + hnt.dSampleStep = (b - A + 1) / N + cg.IDescrFunc2_Hints = hnt + End With + + If ShowIn Then + Set grIt = New GraphItem + grIt.Color = RGB(255, 0, 0) + grIt.Name = "Вх. сигнал" + + cg.Sigma = SgU + cg.IDescrFunc2_Build + grIt.arrPoints = cg.IDescrFunc2_Graphics(1).arrPoints + grIt.CalcLimits + + collGraph.Add grIt, "In" + End If + + If ShowImp Then + Set grIt = New GraphItem + grIt.Color = RGB(0, 0, 255) + grIt.Name = "Отклик" + + cg.Sigma = SgH + cg.IDescrFunc2_Build + grIt.arrPoints = cg.IDescrFunc2_Graphics(1).arrPoints + grIt.CalcLimits + + collGraph.Add grIt, "Imp" + End If + End If + +End Sub + + +Public Function IDescrFunc2_XtoY(ByVal dX As Double, ByVal lIndexFunc As Long) As Double + +End Function + + + + diff --git a/Signal/CGItem.vbp b/Signal/CGItem.vbp new file mode 100644 index 0000000..ffb8e49 --- /dev/null +++ b/Signal/CGItem.vbp @@ -0,0 +1,59 @@ +Type=OleDll +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#F:\WINNT\System32\STDOLE2.TLB#OLE Automation +Reference=*\G{78F81961-A265-11D3-8E26-00504E02C39D}#1.0#0#SigHelper\Debug\SigHelper.dll#SigHelper 1.0 Type Library +Reference=*\G{1611B861-A458-11D3-8E2C-00504E02C39D}#1.0#0#IX3\Debug\IX3.dll#IX3 1.0 Type Library +Reference=*\G{4CE1B776-A4D0-11D3-8E2E-00504E02C39D}#1.0#0#IX4\Debug\IX4.dll#IX4 1.0 Type Library +Reference=*\G{DBAE6101-A64E-11D3-8E30-00504E02C39D}#1.0#0#IX6\Debug\IX6.dll#IX6 1.0 Type Library +Reference=*\G{8E5CF664-A702-11D3-8E33-00504E02C39D}#1.0#0#IX7\Debug\IX7.dll#IX7 1.0 Type Library +Reference=*\G{192B3AC1-A76D-11D3-8E34-00504E02C39D}#1.0#0#IX8\Debug\IX8.dll#IX8 1.0 Type Library +Class=GraphItem; GraphItem.cls +Class=IDescrFunc2; IDescrFunc2.cls +Class=CStepGen; CStepGen.cls +Class=CStep2Gen; CStep2Gen.cls +Class=CGaussGen; CGaussGen.cls +Class=CGUtils; CGUtils.cls +Module=UtilInternal; UtilInternal.bas +Module=GlobalUtils; GlobalUtils.bas +Class=CRestoreGen; CRestoreGen.cls +Class=CFurie; F:\MVS\VB98\CFurie.cls +Class=CConvolution; CConvolution.cls +Class=CFlt_BatWorth; F:\MVS\VB98\CFlt_BatWorth.cls +Class=CAdaptFlt; F:\MVS\VB98\CAdaptFlt.cls +Class=CFindH; F:\MVS\VB98\CFindH.cls +Class=CSmooth; F:\MVS\VB98\CSmooth.cls +Startup="(None)" +HelpFile="" +Title="CGItem" +ExeName32="CGItem.dll" +Path32="Bmps" +Command32="" +Name="CGItem" +HelpContextID="0" +CompatibleMode="2" +CompatibleEXE32="Bmps\CGItem.dll" +VersionCompatible32="1" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=1 +VersionCompanyName="AlexCorp" +CompilationType=0 +OptimizationType=0 +FavorPentiumPro(tm)=0 +CodeViewDebugInfo=0 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=1 +Unattended=-1 +Retained=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 +DebugStartupOption=0 + +[RVB] +DeleteClass1=CGUtils diff --git a/Signal/CGUtils.cls b/Signal/CGUtils.cls new file mode 100644 index 0000000..3ec7136 --- /dev/null +++ b/Signal/CGUtils.cls @@ -0,0 +1,55 @@ +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 0 'NotPersistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "CGUtils" +Attribute VB_GlobalNameSpace = True +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit + +Public Sub CheckNumericInt(ByVal ctl As Object, ByVal sName As String, Optional ByVal bSetFocus As Boolean = True) + On Error Resume Next + Dim str As String + str = ctl.Text + If Err.Number <> 0 Then Exit Sub + + If IsNumeric(str) Then + Dim dbl As Double + dbl = CDbl(str) + If dbl = Int(dbl) Then Exit Sub + End If + + If bSetFocus Then ctl.SetFocus + 'MsgBox "Параметр '" & sName & "' должен быть целым числом", vbExclamation Or vbOKOnly, "Ошибочный формат параметра" + On Error GoTo 0 + Err.Raise vbObjectError, "Ошибочный формат параметра", "Параметр '" & sName & "' должен быть целым числом" +End Sub + +Public Sub CheckNumeric(ByVal ctl As Object, ByVal sName As String, Optional ByVal bSetFocus As Boolean = True) + On Error Resume Next + Dim str As String + str = ctl.Text + If Err.Number <> 0 Then Exit Sub + + If IsNumeric(str) Then Exit Sub + + If bSetFocus Then ctl.SetFocus + 'MsgBox "Параметр '" & sName & "' должен быть числом", vbExclamation Or vbOKOnly, "Ошибочный формат параметра" + On Error GoTo 0 + Err.Raise vbObjectError, "Ошибочный формат параметра", "Параметр '" & sName & "' должен быть числом" +End Sub + +Public Sub ReportError(ByVal ctl As Object, ByVal sName As String, Optional ByVal bSetFocus As Boolean = True) + On Error Resume Next + If bSetFocus Then ctl.SetFocus + 'MsgBox "Требуется: " & sName, vbExclamation Or vbOKOnly, "Ошибочное значение параметра" + On Error GoTo 0 + Err.Raise vbObjectError, "Ошибочное значение параметра", "Требуется: " & sName +End Sub + diff --git a/Signal/CGaussGen.cls b/Signal/CGaussGen.cls new file mode 100644 index 0000000..d890def --- /dev/null +++ b/Signal/CGaussGen.cls @@ -0,0 +1,148 @@ +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 1 'Persistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "CGaussGen" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit + + + +Implements IDescrFunc2 + +Private collGraph As Collection + +Private hntHints As CGItem.DrawHints +Private dAmpl As Double +Private dT0 As Double +Private dSigma As Double + +Public Property Let Sigma(ByVal dA As Double) + dSigma = dA +' PropertyChanged "Sigma" +End Property + +Public Property Get Sigma() As Double + Sigma = dSigma +End Property + + +Public Property Let Ampl(ByVal dA As Double) + dAmpl = dA +' PropertyChanged "Apmplitude" +End Property + +Public Property Get Ampl() As Double + Ampl = dAmpl +End Property + +Public Property Let T0(ByVal dA As Double) + dT0 = dA +' PropertyChanged "T0" +End Property + +Public Property Get T0() As Double + T0 = dT0 +End Property + + +Private Sub Class_InitProperties() + With hntHints + .bMode = True + .bNullX = False + .bNullY = False + + .iPrecX = 2 + .iPrecY = 1 + .dStepX = 0.5 + .dStepY = 1 + + .dX1 = 0.5 + .dX2 = 9 + .dY1 = -9 + .dY2 = 8 + + .dSampleX1 = 1 + .dSampleX2 = 9 + .dSampleStep = 0.2 + End With + + dAmpl = 7 + dT0 = 5 + dSigma = 2 + + Set collGraph = New Collection + Dim grIt As New GraphItem + grIt.Color = RGB(0, 255, 0) + grIt.Name = "Сигнал" + collGraph.Add grIt +End Sub + +Private Sub Class_ReadProperties(PropBag As PropertyBag) + hntHints = PropBag.ReadProperty("Hints") + dAmpl = PropBag.ReadProperty("Apmplitude") + dT0 = PropBag.ReadProperty("T0") + dSigma = PropBag.ReadProperty("Sigma") +End Sub + +Private Sub Class_WriteProperties(PropBag As PropertyBag) + PropBag.WriteProperty "Hints", hntHints + PropBag.WriteProperty "Apmplitude", dAmpl + PropBag.WriteProperty "T0", dT0 + PropBag.WriteProperty "Sigma", dSigma +End Sub + +Public Property Get IDescrFunc2_Hints() As CGItem.DrawHints + IDescrFunc2_Hints = hntHints +End Property + +Public Property Let IDescrFunc2_Hints(dhHint As CGItem.DrawHints) + hntHints = dhHint +' PropertyChanged "Hints" +End Property + +Public Sub IDescrFunc2_SetParameters(ByVal colControls As Collection) + ReadValueFromControl colControls.item("Text_Ampl_Gauss"), dAmpl + ReadValueFromControl colControls.item("Text_T0_Gauss"), dT0 + ReadValueFromControl colControls.item("Text_Sigma_Gauss"), dSigma +End Sub + +Public Sub IDescrFunc2_GetParameters(ByVal colControls As Collection) + LoadValueToControl colControls.item("Text_Ampl_Gauss"), dAmpl + LoadValueToControl colControls.item("Text_T0_Gauss"), dT0 + LoadValueToControl colControls.item("Text_Sigma_Gauss"), dSigma +End Sub + +Public Property Get IDescrFunc2_NameOfSuject() As String + IDescrFunc2_NameOfSuject = "Сигнал Гаусса" +End Property + +Public Property Get IDescrFunc2_Graphics() As Collection + Set IDescrFunc2_Graphics = collGraph +End Property + +Public Sub IDescrFunc2_Build() + Dim grIt As GraphItem + Set grIt = collGraph.item(1) + + GenericBuild Me, 0, grIt + grIt.CalcLimits + +End Sub + +Public Function IDescrFunc2_XtoY(ByVal dX As Double, ByVal lIndexFunc As Long) As Double + Dim dTs As Double + dTs = dX - dT0 + IDescrFunc2_XtoY = dAmpl * Exp(-(dTs * dTs / dSigma)) +End Function + + + + diff --git a/Signal/CRestoreGen.cls b/Signal/CRestoreGen.cls new file mode 100644 index 0000000..478f7eb --- /dev/null +++ b/Signal/CRestoreGen.cls @@ -0,0 +1,228 @@ +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 1 'Persistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "CRestoreGen" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit + +Implements IDescrFunc2 + +Private collGraph As Collection + +Private hntHints As CGItem.DrawHints +Private dAmpl As Double +Private dT0 As Double +Private dSigma As Double +Private dF As Double +Private lN As Long + +Public Property Let F(ByVal dF_ As Double) + dF = dF_ +' PropertyChanged "Sigma" +End Property + +Public Property Get F() As Double + F = dF +End Property +Public Property Let N(ByVal lN_ As Long) + lN = lN_ +' PropertyChanged "Sigma" +End Property + +Public Property Get N() As Long + N = lN +End Property + + +Public Property Let Sigma(ByVal dA As Double) + dSigma = dA +' PropertyChanged "Sigma" +End Property + +Public Property Get Sigma() As Double + Sigma = dSigma +End Property + + +Public Property Let Ampl(ByVal dA As Double) + dAmpl = dA +' PropertyChanged "Apmplitude" +End Property + +Public Property Get Ampl() As Double + Ampl = dAmpl +End Property + +Public Property Let T0(ByVal dA As Double) + dT0 = dA +' PropertyChanged "T0" +End Property + +Public Property Get T0() As Double + T0 = dT0 +End Property + + +Private Sub Class_InitProperties() + With hntHints + .bMode = True + .bNullX = False + .bNullY = False + + .iPrecX = 2 + .iPrecY = 1 + .dStepX = 0.5 + .dStepY = 1 + + .dX1 = 0.5 + .dX2 = 9 + .dY1 = -9 + .dY2 = 8 + + .dSampleX1 = -5 + .dSampleX2 = 5 + .dSampleStep = 0.1 + End With + + dAmpl = 5 + dT0 = 0 + dSigma = 5 + + dF = 7 + lN = 100 + + Set collGraph = New Collection + Dim grIt As New GraphItem + grIt.Color = RGB(0, 255, 0) + grIt.Name = "Исходный сигнал" + collGraph.Add grIt + + Set grIt = New GraphItem + grIt.Color = RGB(255, 0, 0) + grIt.Name = "Восстановленный" + collGraph.Add grIt +End Sub + +Private Sub Class_ReadProperties(PropBag As PropertyBag) + hntHints = PropBag.ReadProperty("Hints") + dAmpl = PropBag.ReadProperty("Apmplitude") + dT0 = PropBag.ReadProperty("T0") + dSigma = PropBag.ReadProperty("Sigma") + + dF = PropBag.ReadProperty("F") + lN = PropBag.ReadProperty("N") +End Sub + +Private Sub Class_WriteProperties(PropBag As PropertyBag) + PropBag.WriteProperty "Hints", hntHints + PropBag.WriteProperty "Apmplitude", dAmpl + PropBag.WriteProperty "T0", dT0 + PropBag.WriteProperty "Sigma", dSigma + + PropBag.WriteProperty "F", dF + PropBag.WriteProperty "N", lN +End Sub + +Public Property Get IDescrFunc2_Hints() As CGItem.DrawHints + IDescrFunc2_Hints = hntHints +End Property + +Public Property Let IDescrFunc2_Hints(dhHint As CGItem.DrawHints) + hntHints = dhHint +' PropertyChanged "Hints" +End Property + +Public Sub IDescrFunc2_SetParameters(ByVal colControls As Collection) + ReadValueFromControl colControls.item("Text_Ampl_G2"), dAmpl + ReadValueFromControl colControls.item("Text_T0_G2"), dT0 + ReadValueFromControl colControls.item("Text_Sigma_G2"), dSigma + + ReadValueFromControl colControls.item("Text_F_G2"), dF + ReadValueFromControl colControls.item("Text_Cnt_G2"), lN +End Sub + +Public Sub IDescrFunc2_GetParameters(ByVal colControls As Collection) + LoadValueToControl colControls.item("Text_Ampl_G2"), dAmpl + LoadValueToControl colControls.item("Text_T0_G2"), dT0 + LoadValueToControl colControls.item("Text_Sigma_G2"), dSigma + + LoadValueToControl colControls.item("Text_F_G2"), dF + LoadValueToControl colControls.item("Text_Cnt_G2"), lN +End Sub + +Public Property Get IDescrFunc2_NameOfSuject() As String + IDescrFunc2_NameOfSuject = "Восстановление сигнала" +End Property + +Public Property Get IDescrFunc2_Graphics() As Collection + Set IDescrFunc2_Graphics = collGraph +End Property + +Public Sub IDescrFunc2_Build() + Dim grIt As GraphItem + Set grIt = collGraph.item(1) + + GenericBuild Me, 0, grIt + grIt.CalcLimits + + Set grIt = collGraph.item(2) + 'GenericBuild Me, 1, grIt + + Dim lX1 As Long, lX2 As Long + lX1 = -lN / 2: lX2 = lN / 2 + If (lN Mod 2) <> 0 Then lX2 = lX2 + 1 + + Dim lCnt As Long + lCnt = 0 + Dim dX1 As Double, dX2 As Double + Dim dhX1 As Double, dhX2 As Double, dhStep As Double + dhX1 = hntHints.dSampleX1: dhX2 = hntHints.dSampleX2 + dhStep = hntHints.dSampleStep + For dX1 = dhX1 To dhX2 Step dhStep + lCnt = lCnt + 1 + Next dX1 + + ReDim arr(0 To (lCnt - 1)) As XYPoint + lCnt = 0 + For dX1 = dhX1 To dhX2 Step dhStep + With arr(lCnt) + .x = dX1 + .y = 0 + Dim l As Long, dT As Double + For l = lX1 To lX2 - 1 + dT = 2# * PI * dF * (dX1 - l / (2 * dF)) + .y = .y + IDescrFunc2_XtoY(l * dhStep, 0) * Sinc(dT) + Next l + .b = True + End With + lCnt = lCnt + 1 + Next dX1 + + + grIt.arrPoints = arr + + grIt.CalcLimits + +End Sub + + +Public Function IDescrFunc2_XtoY(ByVal dX As Double, ByVal lIndexFunc As Long) As Double + If lIndexFunc = 0 Then + Dim dTs As Double + dTs = dX - dT0 + IDescrFunc2_XtoY = dAmpl * Exp(-(dTs * dTs / dSigma)) + Else + End If +End Function + + + + diff --git a/Signal/CStep2Gen.cls b/Signal/CStep2Gen.cls new file mode 100644 index 0000000..b6d3303 --- /dev/null +++ b/Signal/CStep2Gen.cls @@ -0,0 +1,199 @@ +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 1 'Persistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "CStep2Gen" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit + +Implements IDescrFunc2 + +Private collGraph As Collection + +Private hntHints As CGItem.DrawHints +Private dAmpl As Double +Private dT0 As Double + +Public Property Let Ampl(ByVal dA As Double) + dAmpl = dA +' PropertyChanged "Apmplitude" +End Property + +Public Property Get Ampl() As Double + Ampl = dAmpl +End Property + +Public Property Let T0(ByVal dA As Double) + dT0 = dA +' PropertyChanged "T0" +End Property + +Public Property Get T0() As Double + T0 = dT0 +End Property + + +Private Sub Class_InitProperties() + With hntHints + .bMode = False + .bNullX = False + .bNullY = False + + .iPrecX = 1 + .iPrecY = 1 + .dStepX = 1 + .dStepY = 1 + + .dX1 = -5 + .dX2 = 7 + .dY1 = -7 + .dY2 = 7 + + .dSampleX1 = -10 + .dSampleX2 = 10 + .dSampleStep = 1 + End With + + dAmpl = 5 + dT0 = 3 + + Set collGraph = New Collection + Dim grIt As New GraphItem + grIt.Color = RGB(0, 255, 0) + grIt.Name = "Сигнал" + collGraph.Add grIt +End Sub + +Private Sub Class_ReadProperties(PropBag As PropertyBag) + hntHints = PropBag.ReadProperty("Hints") + dAmpl = PropBag.ReadProperty("Apmplitude") + dT0 = PropBag.ReadProperty("T0") +End Sub + +Private Sub Class_WriteProperties(PropBag As PropertyBag) + PropBag.WriteProperty "Hints", hntHints + PropBag.WriteProperty "Apmplitude", dAmpl + PropBag.WriteProperty "T0", dT0 +End Sub + +Public Property Get IDescrFunc2_Hints() As CGItem.DrawHints + IDescrFunc2_Hints = hntHints +End Property + +Public Property Let IDescrFunc2_Hints(dhHint As CGItem.DrawHints) + hntHints = dhHint +' PropertyChanged "Hints" +End Property + +Public Sub IDescrFunc2_SetParameters(ByVal colControls As Collection) + ReadValueFromControl colControls.item("Text_Ampl_SS"), dAmpl + ReadValueFromControl colControls.item("Text_T_SS"), dT0 +End Sub + +Public Sub IDescrFunc2_GetParameters(ByVal colControls As Collection) + LoadValueToControl colControls.item("Text_Ampl_SS"), dAmpl + LoadValueToControl colControls.item("Text_T_SS"), dT0 +End Sub + +Public Property Get IDescrFunc2_NameOfSuject() As String + IDescrFunc2_NameOfSuject = "Ступенчатый сигнал" +End Property + +Public Property Get IDescrFunc2_Graphics() As Collection + Set IDescrFunc2_Graphics = collGraph +End Property + +Public Sub IDescrFunc2_Build() + Dim grIt As GraphItem + Set grIt = collGraph.item(1) + + Dim dX1 As Double, dX2 As Double, dStep As Double + dX2 = hntHints.dSampleX2 + dStep = hntHints.dSampleStep + + Dim lCnt As Long + lCnt = 0 + For dX1 = hntHints.dSampleX1 To dX2 Step dStep + lCnt = lCnt + 1 + Next dX1 + + lCnt = lCnt + 2 + Dim lCntUse As Long + lCntUse = 0 + + ReDim arr(0 To (lCnt - 1)) As XYPoint + 'ReDim grIt.arrPoints(0 To (lCnt - 1)) As XYPoint + lCnt = 0 + + Dim iSgn As Integer + iSgn = Sgn(dAmpl) + + Dim dYPriv As Double + For dX1 = hntHints.dSampleX1 To dX2 Step dStep + With arr(lCnt) + .x = dX1 + .y = IDescrFunc2_XtoY(.x, 0) + dYPriv = .y + .b = True + End With + + Dim dYNext As Double + dYNext = IDescrFunc2_XtoY(dX1 + dStep, 0) + If arr(lCnt).y <> dYNext Then + lCnt = lCnt + 1 + If iSgn = 1 Then + If dYNext > dYPriv Then + arr(lCnt).x = dX1 + dStep + arr(lCnt).y = dYPriv + arr(lCnt).b = True + Else + arr(lCnt).x = dX1 + arr(lCnt).y = dYNext + arr(lCnt).b = True + End If + Else + If dYNext > dYPriv Then + arr(lCnt).x = dX1 + arr(lCnt).y = dYNext + arr(lCnt).b = True + Else + arr(lCnt).x = dX1 + dStep + arr(lCnt).y = dYPriv + arr(lCnt).b = True + End If + End If + + lCntUse = lCntUse + 1 + + End If + + lCnt = lCnt + 1 + + Next dX1 + + If lCntUse < 2 Then + lCnt = UBound(arr) + ReDim Preserve arr(0 To lCnt - 2 + lCntUse) As XYPoint + End If + + grIt.arrPoints = arr + + grIt.CalcLimits + + DumpXY grIt.arrPoints + +End Sub + +Public Function IDescrFunc2_XtoY(ByVal dX As Double, ByVal lIndexFunc As Long) As Double + If dX >= dT0 And dX <= 2 * dT0 Then IDescrFunc2_XtoY = dAmpl _ + Else IDescrFunc2_XtoY = 0 +End Function + + diff --git a/Signal/CStepGen.cls b/Signal/CStepGen.cls new file mode 100644 index 0000000..a2500d4 --- /dev/null +++ b/Signal/CStepGen.cls @@ -0,0 +1,267 @@ +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 1 'Persistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "CStepGen" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit + +Implements IDescrFunc2 + +Private collGraph As Collection + +Private hntHints As CGItem.DrawHints +Private dAmpl As Double +Private dT0 As Double + +Public Property Let Ampl(ByVal dA As Double) + dAmpl = dA + PropertyChanged "Apmplitude" +End Property + +Public Property Get Ampl() As Double + Ampl = dAmpl +End Property + +Public Property Let T0(ByVal dA As Double) + dT0 = dA + PropertyChanged "T0" +End Property + +Public Property Get T0() As Double + T0 = dT0 +End Property + + +Private Sub Class_InitProperties() + With hntHints + .bMode = False + .bNullX = False + .bNullY = False + + .iPrecX = 1 + .iPrecY = 1 + .dStepX = 0.5 + .dStepY = 0.5 + + .dX1 = -1 + .dX2 = 9 + .dY1 = -1 + .dY2 = 6 + + .dSampleX1 = -10 + .dSampleX2 = 10 + .dSampleStep = 1 + End With + + dAmpl = 2 + dT0 = 7 + + Set collGraph = New Collection + Dim grIt As New GraphItem + grIt.Color = RGB(0, 255, 0) + grIt.Name = "Импульс" + collGraph.Add grIt +End Sub + +Private Sub Class_ReadProperties(PropBag As PropertyBag) + hntHints = PropBag.ReadProperty("Hints") + dAmpl = PropBag.ReadProperty("Apmplitude") + dT0 = PropBag.ReadProperty("T0") +End Sub + +Private Sub Class_WriteProperties(PropBag As PropertyBag) + PropBag.WriteProperty "Hints", hntHints + PropBag.WriteProperty "Apmplitude", dAmpl + PropBag.WriteProperty "T0", dT0 +End Sub + +Public Property Get IDescrFunc2_Hints() As CGItem.DrawHints + IDescrFunc2_Hints = hntHints +End Property + +Public Property Let IDescrFunc2_Hints(dhHint As CGItem.DrawHints) + hntHints = dhHint + PropertyChanged "Hints" +End Property + +Public Sub IDescrFunc2_SetParameters(ByVal colControls As Collection) + ReadValueFromControl colControls.item("Text_Ampl_SI"), dAmpl + ReadValueFromControl colControls.item("Text_To_SI"), dT0 +End Sub + +Public Sub IDescrFunc2_GetParameters(ByVal colControls As Collection) +'Dim vv +'For Each vv In colControls +' Debug.Print vv.Name +'Next + LoadValueToControl colControls.item("Text_Ampl_SI"), dAmpl + LoadValueToControl colControls.item("Text_To_SI"), dT0 +End Sub + +Public Property Get IDescrFunc2_NameOfSuject() As String + IDescrFunc2_NameOfSuject = "Одиночный импульс" +End Property + +Public Property Get IDescrFunc2_Graphics() As Collection + Set IDescrFunc2_Graphics = collGraph +End Property + +Public Sub IDescrFunc2_Build() + Dim grIt As GraphItem + Set grIt = collGraph.item(1) + + Dim dX1 As Double, dX2 As Double, dStep As Double + dX2 = hntHints.dSampleX2 + dStep = hntHints.dSampleStep + + Dim lCnt As Long + lCnt = 0 + For dX1 = hntHints.dSampleX1 To dX2 Step dStep + lCnt = lCnt + 1 + Next dX1 + + lCnt = lCnt + 3 + Dim bUse As Boolean + bUse = True + + ReDim arr(0 To (lCnt - 1)) As XYPoint + 'ReDim grIt.arrPoints(0 To (lCnt - 1)) As XYPoint + lCnt = 0 + + Dim bIns As Boolean + bIns = False + For dX1 = hntHints.dSampleX1 To dX2 Step dStep + If Not bIns Then + If Abs(dX1 - dT0) <= dStep And dX1 >= dT0 Then + 'If Abs(dX1 - dT0) > Abs(dX1 + dStep - dT0) Then GoTo L_SKIP + bIns = True + + arr(lCnt).x = dT0 + arr(lCnt).y = 0 + arr(lCnt).b = True + + lCnt = lCnt + 1 + + arr(lCnt).x = dT0 + arr(lCnt).y = dAmpl + arr(lCnt).b = True + + lCnt = lCnt + 1 + + arr(lCnt).x = dT0 + arr(lCnt).y = 0 + arr(lCnt).b = True + + lCnt = lCnt + 1 + + If dX1 = dT0 Then + bUse = False + GoTo L_NEXTX + End If + End If + End If + +L_SKIP: + With arr(lCnt) + .x = dX1 + .y = IDescrFunc2_XtoY(.x, 0) + .b = True + End With + lCnt = lCnt + 1 +L_NEXTX: + Next dX1 + + lCnt = UBound(arr) + If bIns Then + If Not bUse Then + ReDim Preserve arr(0 To lCnt - 1) As XYPoint + End If + Else + ReDim Preserve arr(0 To lCnt - 3) As XYPoint + End If + + grIt.arrPoints = arr + + grIt.CalcLimits + + 'DumpXY grIt.arrPoints +End Sub + + +'Public Sub IDescrFunc2_Build() +' Dim grIt As GraphItem +' Set grIt = collGraph.item(1) +' +' Dim arr(2) As XYPoint +' With grIt +' arr(0).x = dT0 +' arr(0).y = 0 +' arr(0).b = True +' +' arr(1).x = dT0 +' arr(1).y = dAmpl +' arr(1).b = True +' +' arr(2).x = dT0 +' arr(2).y = 0 +' arr(2).b = True +' End With +' +' GenericBuild Me, 0, grIt +' +' Dim vvt As Variant +' vvt = arr +' Dim vv2() As XYPoint2 +' DumpXY grIt.arrPoints +' SIGHELPERLib.InsertPoints grIt.arrPoints, vvt, vv2 +' DumpXY grIt.arrPoints +' +' grIt.arrPoints = ConvertData(vv2) +' DumpXY grIt.arrPoints +' +' grIt.CalcLimits +' +'End Sub + + +Friend Function ConvertData(xy2() As XYPoint2) As XYPoint() + On Error Resume Next + If UBound(xy2) - LBound(xy2) + 1 < 1 Or Err.Number <> 0 Then + Dim tmp() As XYPoint + ConvertData = tmp + Exit Function + End If + + On Error GoTo 0 + + Dim l1 As Long, l2 As Long + l1 = LBound(xy2): l2 = UBound(xy2) + + ReDim xy(l2) As XYPoint + + Dim i As Long + For i = l1 To l2 + xy(i).x = xy2(i).x + xy(i).y = xy2(i).y + xy(i).b = xy2(i).b + Next i + + ConvertData = xy + + Exit Function +ERR_H: +End Function + + +Public Function IDescrFunc2_XtoY(ByVal dX As Double, ByVal lIndexFunc As Long) As Double + If dX = dT0 Then IDescrFunc2_XtoY = dAmpl _ + Else IDescrFunc2_XtoY = 0 +End Function diff --git a/Signal/FFX.FRX b/Signal/FFX.FRX new file mode 100644 index 0000000..222de19 Binary files /dev/null and b/Signal/FFX.FRX differ diff --git a/Signal/Form_Present.frm b/Signal/Form_Present.frm new file mode 100644 index 0000000..d1a266d --- /dev/null +++ b/Signal/Form_Present.frm @@ -0,0 +1,597 @@ +VERSION 5.00 +Object = "{0A732C25-3120-11D2-8929-00A0241E587F}#6.0#0"; "GRAPHL~1.OCX" +Object = "{2037E3AD-18D6-101C-8158-221E4B551F8E}#5.0#0"; "Vsocx32.ocx" +Object = "{D2FFAA40-074A-11D1-BAA2-444553540000}#3.0#0"; "VsVIEW3.ocx" +Begin VB.Form Form_Present + Appearance = 0 'Flat + BackColor = &H80000005& + Caption = "Form1" + ClientHeight = 6945 + ClientLeft = 165 + ClientTop = 420 + ClientWidth = 7575 + ControlBox = 0 'False + LinkTopic = "Form1" + ScaleHeight = 6945 + ScaleWidth = 7575 + StartUpPosition = 3 'Windows Default + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic2 + Height = 2130 + Left = 0 + TabIndex = 18 + TabStop = 0 'False + Top = 4815 + Width = 7575 + _Version = 327680 + _ExtentX = 13361 + _ExtentY = 3757 + _StockProps = 70 + ConvInfo = 1418783674 + BackColor = 8567004 + Align = 2 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VB.TextBox Txt_Sample_Step + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 5842 + TabIndex = 15 + Text = "1" + Top = 1350 + Width = 855 + End + Begin VB.TextBox Txt_Sample_X2 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 4237 + TabIndex = 14 + Text = "10" + Top = 1350 + Width = 855 + End + Begin VB.TextBox Txt_Sample_X1 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 3172 + TabIndex = 13 + Text = "-10" + Top = 1350 + Width = 855 + End + Begin VsOcxLib.VideoSoftElastic Els_Refresh + Height = 360 + Left = 0 + TabIndex = 16 + Top = 1770 + Width = 7575 + _Version = 327680 + _ExtentX = 13361 + _ExtentY = 635 + _StockProps = 70 + Caption = "Обновить графики" + BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} + Name = "MS Sans Serif" + Size = 8.25 + Charset = 204 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ConvInfo = 1418783674 + Align = 2 + CaptionPos = 4 + Style = 3 + CornerColor = -2147483633 + ShowOutline = -1 'True + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic3 + Height = 1065 + Left = 2175 + TabIndex = 27 + TabStop = 0 'False + Top = 60 + Width = 45 + _Version = 327680 + _ExtentX = 79 + _ExtentY = 1879 + _StockProps = 70 + ConvInfo = 1418783674 + BorderWidth = 1 + ChildSpacing = 0 + BevelOuter = 5 + BevelInnerWidth = 0 + BevelOuterWidth = 1 + End + Begin VB.TextBox Txt_Step_Y + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 3615 + TabIndex = 8 + Text = "1" + Top = 765 + Width = 855 + End + Begin VB.TextBox Txt_Prec_X + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 2385 + TabIndex = 5 + Text = "0" + Top = 390 + Width = 855 + End + Begin VB.TextBox Txt_Prec_Y + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Enabled = 0 'False + Height = 330 + Left = 2385 + TabIndex = 6 + Text = "0" + Top = 765 + Width = 855 + End + Begin VB.CheckBox Check_Need_0Y + BackColor = &H0082B8DC& + Caption = "Показать 0 по Y" + Height = 285 + Left = 150 + TabIndex = 4 + Top = 720 + Width = 1785 + End + Begin VB.CheckBox Check_Need_0X + BackColor = &H0082B8DC& + Caption = "Показать 0 по X" + Height = 285 + Left = 150 + TabIndex = 3 + Top = 390 + Width = 1785 + End + Begin VB.TextBox Txt_Y2 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 6615 + TabIndex = 12 + Text = "10" + Top = 765 + Width = 855 + End + Begin VB.TextBox Txt_Y1 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 5145 + TabIndex = 11 + Text = "-10" + Top = 765 + Width = 855 + End + Begin VB.TextBox Txt_X2 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 6615 + TabIndex = 10 + Text = "10" + Top = 390 + Width = 855 + End + Begin VB.TextBox Txt_X1 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 5145 + TabIndex = 9 + Text = "-10" + Top = 390 + Width = 855 + End + Begin VB.TextBox Txt_Step_X + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 3615 + TabIndex = 7 + Text = "1" + Top = 390 + Width = 855 + End + Begin VB.OptionButton Option_Manual + Alignment = 1 'Right Justify + BackColor = &H0082B8DC& + Caption = "Ручные оси" + ForeColor = &H00FF0000& + Height = 300 + Left = 6210 + TabIndex = 2 + Top = 15 + Width = 1290 + End + Begin VB.OptionButton Option_Auto + BackColor = &H0082B8DC& + Caption = "Автоматические оси" + ForeColor = &H00FF0000& + Height = 300 + Left = 60 + TabIndex = 1 + Top = 15 + Value = -1 'True + Width = 2070 + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic5 + Height = 45 + Left = 67 + TabIndex = 29 + TabStop = 0 'False + Top = 1200 + Width = 7440 + _Version = 327680 + _ExtentX = 13123 + _ExtentY = 79 + _StockProps = 70 + ConvInfo = 1418783674 + BorderWidth = 1 + ChildSpacing = 0 + BevelOuter = 5 + BevelInnerWidth = 0 + BevelOuterWidth = 1 + End + Begin VB.Label Label10 + BackStyle = 0 'Transparent + Caption = "Шаг" + Height = 285 + Left = 5392 + TabIndex = 30 + Top = 1373 + Width = 450 + End + Begin VB.Label Label9 + BackStyle = 0 'Transparent + Caption = "Исходная выборка: X1 - X2:" + Height = 285 + Left = 877 + TabIndex = 28 + Top = 1380 + Width = 2115 + End + Begin VB.Label Label8 + Alignment = 2 'Center + BackStyle = 0 'Transparent + Caption = "Y" + Height = 285 + Left = 3315 + TabIndex = 26 + Top = 788 + Width = 240 + End + Begin VB.Label Label7 + Alignment = 2 'Center + BackStyle = 0 'Transparent + Caption = "X" + Height = 285 + Left = 3315 + TabIndex = 25 + Top = 413 + Width = 240 + End + Begin VB.Label Label2 + BackStyle = 0 'Transparent + Caption = "Точность" + Height = 285 + Left = 2385 + TabIndex = 24 + Top = 60 + Width = 885 + End + Begin VB.Label Label6 + BackStyle = 0 'Transparent + Caption = "Y2" + Height = 285 + Left = 6285 + TabIndex = 23 + Top = 788 + Width = 285 + End + Begin VB.Label Label4 + BackStyle = 0 'Transparent + Caption = "X2" + Height = 285 + Left = 6300 + TabIndex = 22 + Top = 413 + Width = 285 + End + Begin VB.Label Label5 + BackStyle = 0 'Transparent + Caption = "Y1" + Height = 285 + Left = 4800 + TabIndex = 21 + Top = 788 + Width = 285 + End + Begin VB.Label Label3 + BackStyle = 0 'Transparent + Caption = "X1" + Height = 285 + Left = 4800 + TabIndex = 20 + Top = 413 + Width = 285 + End + Begin VB.Label Label1 + BackStyle = 0 'Transparent + Caption = "Шаг сетки" + Height = 285 + Left = 3630 + TabIndex = 19 + Top = 60 + Width = 885 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic1 + Height = 4815 + Left = 0 + TabIndex = 17 + TabStop = 0 'False + Top = 0 + Width = 7575 + _Version = 327680 + _ExtentX = 13361 + _ExtentY = 8493 + _StockProps = 70 + ConvInfo = 1418783674 + BackColor = 8567004 + Align = 5 + AutoSizeChildren= 1 + BorderWidth = 4 + ChildSpacing = 0 + BevelInner = 8 + BevelOuter = 0 + BevelOuterWidth = 0 + Begin ActiveLineGraph.LineGraph LineGraph1 + Height = 4695 + Left = 60 + Top = 60 + Width = 7455 + _ExtentX = 13150 + _ExtentY = 8281 + BackColor = 0 + TextColor = 49152 + GridColor = 36864 + GridMode = 2 + ShowMarkers = 0 'False + XAxisName = "Ось X" + YAxisName = "Ось Y" + BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} + Name = "MS Sans Serif" + Size = 8.25 + Charset = 204 + Weight = 400 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + GraphTitle = "" + End + End + Begin vsViewLib.vsInForm vsInForm1 + Height = 480 + Left = 0 + TabIndex = 0 + Top = 0 + Visible = 0 'False + Width = 480 + _Version = 196608 + _ExtentX = 847 + _ExtentY = 847 + _StockProps = 6 + Caption = "Результаты" + BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} + Name = "MS Sans Serif" + Size = 8.25 + Charset = 204 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + CustomFrame = -1 'True + FrameStyle = 4 + BarStyle = 5 + BarColor = 8567004 + CapStyle = 3 + CapColor = 8421376 + CapColorInactive= 4210752 + ButtonsRight = 2 + PictLeft0 = "Form_Present.frx":0000 + PictRight0 = "Form_Present.frx":010A + PictRight1 = "Form_Present.frx":0214 + End +End +Attribute VB_Name = "Form_Present" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Option Explicit + +Public Function ValidateAll() As Boolean + On Error GoTo ERR_H + + CheckNumericInt Txt_Prec_X, "Точность X" + CheckNumericInt Txt_Prec_Y, "Точность Y" + CheckNumeric Txt_Step_X, "Шаг сетки X" + CheckNumeric Txt_Step_Y, "Шаг сетки Y" + CheckNumeric Txt_X1, "X1" + CheckNumeric Txt_X2, "X2" + CheckNumeric Txt_Y1, "Y1" + CheckNumeric Txt_Y2, "Y2" + CheckNumeric Txt_Sample_X1, "X1 выборки" + CheckNumeric Txt_Sample_X2, "X2 выборки" + CheckNumeric Txt_Sample_Step, "Шаг выборки" + + If CDbl(Txt_Prec_X.Text) < 0 Then ReportError Txt_Prec_X, "Точность X >= 0" + + If CDbl(Txt_Prec_Y.Text) < 0 Then ReportError Txt_Prec_Y, "Точность Y >= 0" + + If CDbl(Txt_Step_X.Text) <= 0 Then ReportError Txt_Step_X, "Шаг сетки X > 0" + + If CDbl(Txt_Step_Y.Text) <= 0 Then ReportError Txt_Step_Y, "Шаг сетки Y > 0" + + If CDbl(Txt_X1.Text) >= CDbl(Txt_X2.Text) Then ReportError Txt_X1, "X1 < X2" + + If CDbl(Txt_Y1.Text) >= CDbl(Txt_Y2.Text) Then ReportError Txt_Y1, "Y1 < Y2" + + If CDbl(Txt_Sample_X1.Text) >= CDbl(Txt_Sample_X2.Text) Then ReportError Txt_Sample_X1, "X1 выборки < X2 выборки" + + If CDbl(Txt_Sample_Step.Text) <= 0 Then ReportError Txt_Sample_Step, "Шаг выборки > 0" + + ValidateAll = True + Exit Function + +ERR_H: + ValidateAll = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + +Private Sub Els_Refresh_Click() + If Not ValidateAll Then Exit Sub + If Not MainForm.ValidateAll_x(True) Then Exit Sub + On Error GoTo L_ERRH + MainForm.MkLoadFromForm + MainForm.MakeGrapics + Exit Sub +L_ERRH: + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, "Ошибка" +End Sub + +Private Sub vsInForm1_ClickLButton(Button As Integer) + Select Case Button + Case 0 + 'Dim lMnu As Long + 'lMnu = GetSystemMenu(Form1.hwnd, 0) + 'TrackPopupMenu lMnu, TPM_LEFTALIGN, Me.Left, Me.Top, 0, Me.hwnd, 0 + Form_Opt.Check_Grid.Value = IIf(LineGraph1.GridMode = grdLines, 1, 0) + Form_Opt.Check_Labels.Value = IIf(LineGraph1.ShowMarkers, 1, 0) + +' Form_Opt.VideoSoftElastic1.ButtonState = 0 +' Form_Opt.VideoSoftElastic2.ButtonState = 0 +' Form_Opt.VideoSoftElastic4.ButtonState = 0 + + Form_Opt.Show vbModal, Me + + DoEvents + + If Form_Opt.Result Then + LineGraph1.GridMode = IIf(Form_Opt.Check_Grid.Value = 1, grdLines, grdDot) + LineGraph1.ShowMarkers = IIf(Form_Opt.Check_Labels.Value = 1, True, False) + End If + End Select +End Sub + +Private Sub vsInForm1_ClickRButton(Button As Integer) + Select Case Button + Case 0 + vsInForm1_DblClickCaption + Case 1 + WindowState = vbMinimized + Caption = vsInForm1.Caption + End Select +End Sub + +Private Sub vsInForm1_DblClickCaption() + If WindowState = vbNormal Then + WindowState = vbMaximized + Else + WindowState = vbNormal + End If +End Sub + diff --git a/Signal/Form_Present.frx b/Signal/Form_Present.frx new file mode 100644 index 0000000..05e28d5 Binary files /dev/null and b/Signal/Form_Present.frx differ diff --git a/Signal/GlobalUtils.bas b/Signal/GlobalUtils.bas new file mode 100644 index 0000000..052dfe9 --- /dev/null +++ b/Signal/GlobalUtils.bas @@ -0,0 +1,30 @@ +Attribute VB_Name = "GlobalUtils" +Option Explicit + +Public Const PI As Double = 3.14159265358979 + +Public Sub LoadValueToControl(ByVal ctl As Control, ByVal dbl As Variant) + ctl.Text = CStr(dbl) +End Sub + +Public Sub ReadValueFromControl(ByVal ctl As Control, ByRef dbl As Variant) + Select Case VarType(dbl) + Case vbDouble + dbl = CDbl(ctl.Text) + Case vbInteger + dbl = CInt(ctl.Text) + Case vbLong + dbl = CLng(ctl.Text) + Case vbString + dbl = ctl.Text + Case vbBoolean + dbl = CBool(ctl.Text) + Case vbDecimal + dbl = CDec(ctl.Text) + Case Else + Err.Raise vbObjectError, "ReadValueFromControl", "Преобразование для такого типа не определено" + End Select +End Sub + + + diff --git a/Signal/GraphItem.cls b/Signal/GraphItem.cls new file mode 100644 index 0000000..0822c08 --- /dev/null +++ b/Signal/GraphItem.cls @@ -0,0 +1,102 @@ +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 0 'NotPersistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "GraphItem" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit + +Public Type XYPoint + x As Double + y As Double + b As Boolean +End Type + +Public Type DrawHints + bMode As Boolean 'True - auto, False - manual + bNullX As Boolean + bNullY As Boolean + + iPrecX As Integer + iPrecY As Integer + dStepX As Double + dStepY As Double + + dX1 As Double + dY1 As Double + dX2 As Double + dY2 As Double + + dSampleX1 As Double + dSampleX2 As Double + + dSampleStep As Double +End Type + +Public Name As String +Public Color As Long +Public MinX As Double +Public MinY As Double +Public MaxX As Double +Public MaxY As Double + +Public arrPoints As Variant 'array of XYPoint() +'Public arrPoints() As XYPoint + + + +Public Sub Reset() + arrPoints = Array() +End Sub + +Public Sub CalcLimits() + If Not IsArray(arrPoints) Then _ + Err.Raise vbObjectError, "CalcLimits", "arrPoints - не массив" + + On Error Resume Next + If UBound(arrPoints) - LBound(arrPoints) + 1 < 1 Or Err.Number <> 0 Then + MinX = 0: MaxX = 0: MinY = 0: MaxY = 0 + Exit Sub + End If + + On Error GoTo 0 + + Dim l1 As Long, l2 As Long + l1 = LBound(arrPoints): l2 = UBound(arrPoints) + +' MinX = arrPoints(l1).x: MaxX = MinX +' MinY = arrPoints(l1).y: MaxY = MinY + + MinX = 1.79769313486231E+308 + MinY = 1.79769313486231E+308 + MaxX = -1.79769313486231E+308 + MaxY = -1.79769313486231E+308 + + Dim i As Long, bFnd As Boolean + bFnd = False + For i = l1 To l2 + With arrPoints(i) + If .b Then + If .x < MinX Then MinX = .x + If .x > MaxX Then MaxX = .x + + If .y < MinY Then MinY = .y + If .y > MaxY Then MaxY = .y + bFnd = True + End If + End With + Next i + + If Not bFnd Then + MinX = 0: MinY = 0: MaxX = 0: MaxY = 0 + End If + +End Sub + diff --git a/Signal/IDescrFunc2.cls b/Signal/IDescrFunc2.cls new file mode 100644 index 0000000..455536d --- /dev/null +++ b/Signal/IDescrFunc2.cls @@ -0,0 +1,38 @@ +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 0 'NotPersistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "IDescrFunc2" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit + +Public Property Get Hints() As CGItem.DrawHints +End Property + +Public Property Let Hints(dhHint As CGItem.DrawHints) +End Property + +Public Sub SetParameters(ByVal colControls As Collection) +End Sub + +Public Sub GetParameters(ByVal colControls As Collection) +End Sub + +Public Property Get NameOfSuject() As String +End Property + +Public Property Get Graphics() As Collection +End Property + +Public Sub Build() +End Sub + +Public Function XtoY(ByVal dX As Double, ByVal lIndexFunc As Long) As Double +End Function diff --git a/Signal/IX3/IX3.cpp b/Signal/IX3/IX3.cpp new file mode 100644 index 0000000..3e273ff --- /dev/null +++ b/Signal/IX3/IX3.cpp @@ -0,0 +1,72 @@ +// IX3.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f IX3ps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "IX3.h" + +#include "IX3_i.c" +#include "IXL3.h" + + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) +OBJECT_ENTRY(CLSID_IXL3, CIXL3) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_IX3Lib); + DisableThreadLibraryCalls(hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + _Module.Term(); + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + return _Module.UnregisterServer(TRUE); +} + + diff --git a/Signal/IX3/IX3.def b/Signal/IX3/IX3.def new file mode 100644 index 0000000..107e168 --- /dev/null +++ b/Signal/IX3/IX3.def @@ -0,0 +1,9 @@ +; IX3.def : Declares the module parameters. + +LIBRARY "IX3.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/Signal/IX3/IX3.dsp b/Signal/IX3/IX3.dsp new file mode 100644 index 0000000..df626ff --- /dev/null +++ b/Signal/IX3/IX3.dsp @@ -0,0 +1,371 @@ +# Microsoft Developer Studio Project File - Name="IX3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=IX3 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "IX3.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "IX3.mak" CFG="IX3 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "IX3 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX3 - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX3 - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX3 - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX3 - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX3 - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "IX3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=.\Debug\IX3.dll +InputPath=.\Debug\IX3.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX3 - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=.\DebugU\IX3.dll +InputPath=.\DebugU\IX3.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX3 - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=.\ReleaseMinSize\IX3.dll +InputPath=.\ReleaseMinSize\IX3.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX3 - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=.\ReleaseMinDependency\IX3.dll +InputPath=.\ReleaseMinDependency\IX3.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX3 - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=.\ReleaseUMinSize\IX3.dll +InputPath=.\ReleaseUMinSize\IX3.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX3 - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\IX3.dll +InputPath=.\ReleaseUMinDependency\IX3.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "IX3 - Win32 Debug" +# Name "IX3 - Win32 Unicode Debug" +# Name "IX3 - Win32 Release MinSize" +# Name "IX3 - Win32 Release MinDependency" +# Name "IX3 - Win32 Unicode Release MinSize" +# Name "IX3 - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\IX3.cpp +# End Source File +# Begin Source File + +SOURCE=.\IX3.def +# End Source File +# Begin Source File + +SOURCE=.\IX3.idl +# ADD MTL /tlb ".\IX3.tlb" /h "IX3.h" /iid "IX3_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\IX3.rc +# End Source File +# Begin Source File + +SOURCE=.\IXL3.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_04.cpp +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.CPP +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\IXL3.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_04.h +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.H +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\IXL3.rgs +# End Source File +# End Group +# End Target +# End Project diff --git a/Signal/IX3/IX3.dsw b/Signal/IX3/IX3.dsw new file mode 100644 index 0000000..4b4a3aa --- /dev/null +++ b/Signal/IX3/IX3.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "IX3"=.\IX3.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Signal/IX3/IX3.h b/Signal/IX3/IX3.h new file mode 100644 index 0000000..5b07ebf --- /dev/null +++ b/Signal/IX3/IX3.h @@ -0,0 +1,329 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Dec 01 20:30:09 1999 + */ +/* Compiler settings for G:\WORK\Signal\IX3\IX3.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __IX3_h__ +#define __IX3_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __IIXL3_FWD_DEFINED__ +#define __IIXL3_FWD_DEFINED__ +typedef interface IIXL3 IIXL3; +#endif /* __IIXL3_FWD_DEFINED__ */ + + +#ifndef __IXL3_FWD_DEFINED__ +#define __IXL3_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class IXL3 IXL3; +#else +typedef struct IXL3 IXL3; +#endif /* __cplusplus */ + +#endif /* __IXL3_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +#ifndef __IIXL3_INTERFACE_DEFINED__ +#define __IIXL3_INTERFACE_DEFINED__ + +/* interface IIXL3 */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IIXL3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1611B86D-A458-11D3-8E2C-00504E02C39D") + IIXL3 : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNet( + /* [in] */ double T, + /* [in] */ long N) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnSignalB( + /* [in] */ double As, + /* [in] */ double Ts) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnSignalC( + /* [in] */ double Ag, + /* [in] */ double To, + /* [in] */ double Sg) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Build( + /* [in] */ VARIANT_BOOL vDirect) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FetchResult( + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes) = 0; + + }; + +#else /* C style interface */ + + typedef struct IIXL3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IIXL3 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IIXL3 __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IIXL3 __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + IIXL3 __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + IIXL3 __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + IIXL3 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + IIXL3 __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnNet )( + IIXL3 __RPC_FAR * This, + /* [in] */ double T, + /* [in] */ long N); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnSignalB )( + IIXL3 __RPC_FAR * This, + /* [in] */ double As, + /* [in] */ double Ts); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnSignalC )( + IIXL3 __RPC_FAR * This, + /* [in] */ double Ag, + /* [in] */ double To, + /* [in] */ double Sg); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Build )( + IIXL3 __RPC_FAR * This, + /* [in] */ VARIANT_BOOL vDirect); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *FetchResult )( + IIXL3 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + END_INTERFACE + } IIXL3Vtbl; + + interface IIXL3 + { + CONST_VTBL struct IIXL3Vtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IIXL3_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IIXL3_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IIXL3_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IIXL3_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IIXL3_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IIXL3_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IIXL3_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IIXL3_OnNet(This,T,N) \ + (This)->lpVtbl -> OnNet(This,T,N) + +#define IIXL3_OnSignalB(This,As,Ts) \ + (This)->lpVtbl -> OnSignalB(This,As,Ts) + +#define IIXL3_OnSignalC(This,Ag,To,Sg) \ + (This)->lpVtbl -> OnSignalC(This,Ag,To,Sg) + +#define IIXL3_Build(This,vDirect) \ + (This)->lpVtbl -> Build(This,vDirect) + +#define IIXL3_FetchResult(This,arrRes) \ + (This)->lpVtbl -> FetchResult(This,arrRes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL3_OnNet_Proxy( + IIXL3 __RPC_FAR * This, + /* [in] */ double T, + /* [in] */ long N); + + +void __RPC_STUB IIXL3_OnNet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL3_OnSignalB_Proxy( + IIXL3 __RPC_FAR * This, + /* [in] */ double As, + /* [in] */ double Ts); + + +void __RPC_STUB IIXL3_OnSignalB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL3_OnSignalC_Proxy( + IIXL3 __RPC_FAR * This, + /* [in] */ double Ag, + /* [in] */ double To, + /* [in] */ double Sg); + + +void __RPC_STUB IIXL3_OnSignalC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL3_Build_Proxy( + IIXL3 __RPC_FAR * This, + /* [in] */ VARIANT_BOOL vDirect); + + +void __RPC_STUB IIXL3_Build_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL3_FetchResult_Proxy( + IIXL3 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + +void __RPC_STUB IIXL3_FetchResult_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IIXL3_INTERFACE_DEFINED__ */ + + + +#ifndef __IX3Lib_LIBRARY_DEFINED__ +#define __IX3Lib_LIBRARY_DEFINED__ + +/* library IX3Lib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_IX3Lib; + +EXTERN_C const CLSID CLSID_IXL3; + +#ifdef __cplusplus + +class DECLSPEC_UUID("1611B86E-A458-11D3-8E2C-00504E02C39D") +IXL3; +#endif +#endif /* __IX3Lib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long __RPC_FAR *, unsigned long , LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +void __RPC_USER LPSAFEARRAY_UserFree( unsigned long __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Signal/IX3/IX3.idl b/Signal/IX3/IX3.idl new file mode 100644 index 0000000..0f32221 --- /dev/null +++ b/Signal/IX3/IX3.idl @@ -0,0 +1,43 @@ +// IX3.idl : IDL source for IX3.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (IX3.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + [ + object, + uuid(1611B86D-A458-11D3-8E2C-00504E02C39D), + dual, + helpstring("IIXL3 Interface"), + pointer_default(unique) + ] + interface IIXL3 : IDispatch + { + [id(1), helpstring("method OnNet")] HRESULT OnNet([in] double T, [in] long N); + [id(2), helpstring("method OnSignalB")] HRESULT OnSignalB([in] double As, [in] double Ts); + [id(3), helpstring("method OnSignalC")] HRESULT OnSignalC([in] double Ag, [in] double To, [in] double Sg); + [id(4), helpstring("method Build")] HRESULT Build([in] VARIANT_BOOL vDirect); + [id(5), helpstring("method FetchResult")] HRESULT FetchResult( [out]SAFEARRAY(double)* arrRes ); + }; + +[ + uuid(1611B861-A458-11D3-8E2C-00504E02C39D), + version(1.0), + helpstring("IX3 1.0 Type Library") +] +library IX3Lib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(1611B86E-A458-11D3-8E2C-00504E02C39D), + helpstring("IXL3 Class") + ] + coclass IXL3 + { + [default] interface IIXL3; + }; +}; diff --git a/Signal/IX3/IX3.rc b/Signal/IX3/IX3.rc new file mode 100644 index 0000000..4c28a45 --- /dev/null +++ b/Signal/IX3/IX3.rc @@ -0,0 +1,136 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#ifdef _WIN32 +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_IXL3 REGISTRY DISCARDABLE "IXL3.rgs" +#endif // Russian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""IX3.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "IX3 Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "IX3\0" + VALUE "LegalCopyright", "Copyright 1999\0" + VALUE "OriginalFilename", "IX3.DLL\0" + VALUE "ProductName", "IX3 Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "OLESelfRegister", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "IX3" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "IX3.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Signal/IX3/IX3ps.def b/Signal/IX3/IX3ps.def new file mode 100644 index 0000000..768e991 --- /dev/null +++ b/Signal/IX3/IX3ps.def @@ -0,0 +1,11 @@ + +LIBRARY "IX3PS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/Signal/IX3/IX3ps.mk b/Signal/IX3/IX3ps.mk new file mode 100644 index 0000000..10adb2f --- /dev/null +++ b/Signal/IX3/IX3ps.mk @@ -0,0 +1,16 @@ + +IX3ps.dll: dlldata.obj IX3_p.obj IX3_i.obj + link /dll /out:IX3ps.dll /def:IX3ps.def /entry:DllMain dlldata.obj IX3_p.obj IX3_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del IX3ps.dll + @del IX3ps.lib + @del IX3ps.exp + @del dlldata.obj + @del IX3_p.obj + @del IX3_i.obj diff --git a/Signal/IX3/IXL3.cpp b/Signal/IX3/IXL3.cpp new file mode 100644 index 0000000..62ba2e1 --- /dev/null +++ b/Signal/IX3/IXL3.cpp @@ -0,0 +1,79 @@ +// IXL3.cpp : Implementation of CIXL3 +#include "stdafx.h" +#include "IX3.h" +#include "IXL3.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL3 + +STDMETHODIMP CIXL3::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_IIXL3 + }; + for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) + { + if (InlineIsEqualGUID(*arr[i],riid)) + return S_OK; + } + return S_FALSE; +} + +STDMETHODIMP CIXL3::OnNet(double T, long N) +{ + return m_doc.ReInit( T, N ) ? S_OK:E_FAIL; +} + +STDMETHODIMP CIXL3::OnSignalB(double As, double Ts) +{ + m_doc.As = As, m_doc.Ts = Ts; + m_doc.SignalB(); + return S_OK; +} + +STDMETHODIMP CIXL3::OnSignalC(double Ag, double To, double Sg) +{ + m_doc.Ag = Ag, m_doc.Tog = To, m_doc.Sg = Sg; + m_doc.SignalC(); + return S_OK; +} + +STDMETHODIMP CIXL3::Build(VARIANT_BOOL vDirect) +{ + if( vDirect == VARIANT_TRUE ) m_doc.Direct(); + else m_doc.Reverse(); + + return S_OK; +} + +STDMETHODIMP CIXL3::FetchResult( SAFEARRAY** arrRes ) + { + if( m_doc.SView < 1 ) return E_FAIL; + if( !arrRes ) return E_POINTER; + + + + SAFEARRAYBOUND bnd = { 3 * m_doc.SView, 0 }; + *arrRes = SafeArrayCreate( VT_R8, 1, &bnd ); + + if( !arrRes ) + { + Error( L"Cann't array allocate", 0, NULL, IID_IIXL3, E_FAIL ); + return E_FAIL; + } + + + double* pDta; + HRESULT hr = SafeArrayAccessData( *arrRes, (void**)&pDta ); + + double *x = m_doc.XView, *y = m_doc.YexView, + *y2 = m_doc.YapView; + for( int i = 0; i < m_doc.SView; ++i, ++x, ++y, ++y2 ) + *pDta++ = *x, *pDta++ = *y, *pDta++ = *y2; + + SafeArrayUnaccessData( *arrRes ); + + + return S_OK; + } diff --git a/Signal/IX3/IXL3.h b/Signal/IX3/IXL3.h new file mode 100644 index 0000000..81a2803 --- /dev/null +++ b/Signal/IX3/IXL3.h @@ -0,0 +1,48 @@ +// IXL3.h : Declaration of the CIXL3 + +#ifndef __IXL3_H_ +#define __IXL3_H_ + +#include "resource.h" // main symbols +#include "NewDoc.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL3 +class ATL_NO_VTABLE CIXL3 : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl +{ +public: + CIXL3() + { + } + +DECLARE_REGISTRY_RESOURCEID(IDR_IXL3) +DECLARE_NOT_AGGREGATABLE(CIXL3) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CIXL3) + COM_INTERFACE_ENTRY(IIXL3) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// IIXL3 +public: + STDMETHOD(FetchResult)( SAFEARRAY** arrRes ); + STDMETHOD(Build)(/*[in]*/ VARIANT_BOOL vDirect); + STDMETHOD(OnSignalC)(/*[in]*/ double Ag, /*[in]*/ double To, /*[in]*/ double Sg); + STDMETHOD(OnSignalB)(/*[in]*/ double As, /*[in]*/ double Ts); + STDMETHOD(OnNet)(/*[in]*/ double T, /*[in]*/ long N); + +private: + CNewDoc m_doc; +}; + +#endif //__IXL3_H_ diff --git a/Signal/IX3/IXL3.rgs b/Signal/IX3/IXL3.rgs new file mode 100644 index 0000000..fa47ed8 --- /dev/null +++ b/Signal/IX3/IXL3.rgs @@ -0,0 +1,26 @@ +HKCR +{ + IX3.IXL3.1 = s 'IXL3 Class' + { + CLSID = s '{1611B86E-A458-11D3-8E2C-00504E02C39D}' + } + IX3.IXL3 = s 'IXL3 Class' + { + CLSID = s '{1611B86E-A458-11D3-8E2C-00504E02C39D}' + CurVer = s 'IX3.IXL3.1' + } + NoRemove CLSID + { + ForceRemove {1611B86E-A458-11D3-8E2C-00504E02C39D} = s 'IXL3 Class' + { + ProgID = s 'IX3.IXL3.1' + VersionIndependentProgID = s 'IX3.IXL3' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{1611B861-A458-11D3-8E2C-00504E02C39D}' + } + } +} diff --git a/Signal/IX3/MODEL/math_00.cpp b/Signal/IX3/MODEL/math_00.cpp new file mode 100644 index 0000000..ad798da --- /dev/null +++ b/Signal/IX3/MODEL/math_00.cpp @@ -0,0 +1,57 @@ +#include "StdAfx.h" +#include "Math_00.h" + +int CNet::ReLoad( int size ) +{ + if( Size ) + delete[] Data; + + if( ( Data = new double [ Size = size ] ) == NULL ) + return 0; + + return 1; +} + +int CNet::ReCalc( double a, double b, double step ) +{ + int Size = ( int ) ( ( b - a ) / step ) + 1; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( double w, double step ) +{ + int Size = ( int ) ( w / step ) + 1; + double a = -w / 2.0; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( int n, double step ) +{ + if( ReLoad( n ) ) + { + for( int i = 0 ; i < n ; i++ ) + Data[i] = i * step; + + return 1; + } + + return 0; +} \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_00.h b/Signal/IX3/MODEL/math_00.h new file mode 100644 index 0000000..53cc4b9 --- /dev/null +++ b/Signal/IX3/MODEL/math_00.h @@ -0,0 +1,26 @@ +#ifndef _CNet_H_ + + #define _CNet_H_ + + class CNet + { + public: + CNet() : Data( NULL ), Size( 0 ) + { + } + ~CNet() + { + if( Size ) + delete[] Data; + } + + double *Data; + int Size; + + int ReLoad( int size ); + int ReCalc( double a, double b, double step ); + int ReCalc( double w, double step ); + int ReCalc( int n, double step ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_01.cpp b/Signal/IX3/MODEL/math_01.cpp new file mode 100644 index 0000000..2833808 --- /dev/null +++ b/Signal/IX3/MODEL/math_01.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_01.h" + +int CImpulse::Delta( double t ) +{ + if( To == t ) + return 1; + + return 0; +} + +double CImpulse::Value( double t ) +{ + return A * Delta( t ); +} \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_01.h b/Signal/IX3/MODEL/math_01.h new file mode 100644 index 0000000..04d9512 --- /dev/null +++ b/Signal/IX3/MODEL/math_01.h @@ -0,0 +1,20 @@ +#ifndef _CImpulse_H_ + + #define _CInpulse_H_ + + class CImpulse + { + double A; + double To; + + int Delta( double t ); + + public: + CImpulse( double a, double to ) : A( a ), To( to ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_02.cpp b/Signal/IX3/MODEL/math_02.cpp new file mode 100644 index 0000000..d72e505 --- /dev/null +++ b/Signal/IX3/MODEL/math_02.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_02.h" + +int CStep:: Rect( double t ) +{ + if( 0.0 <= t && t <= 1.0 ) + return 1; + + return 0; +} + +double CStep::Value( double t ) +{ + return A * Rect( ( t - T ) / T ); +} \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_02.h b/Signal/IX3/MODEL/math_02.h new file mode 100644 index 0000000..a77ade6 --- /dev/null +++ b/Signal/IX3/MODEL/math_02.h @@ -0,0 +1,20 @@ +#ifndef _CStep_H_ + + #define _CStep_H_ + + class CStep + { + double A; + double T; + + int Rect( double t ); + + public: + CStep( double a, double t ) : A( a ), T( t ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_03.cpp b/Signal/IX3/MODEL/math_03.cpp new file mode 100644 index 0000000..c7f105c --- /dev/null +++ b/Signal/IX3/MODEL/math_03.cpp @@ -0,0 +1,7 @@ +#include "StdAfx.h" +#include "Math_03.h" + +double CGauss::Value( double t ) +{ + return A * exp( -( t - To ) * ( t - To ) / S ); +} \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_03.h b/Signal/IX3/MODEL/math_03.h new file mode 100644 index 0000000..8c66d2f --- /dev/null +++ b/Signal/IX3/MODEL/math_03.h @@ -0,0 +1,21 @@ +#ifndef _CGauss_H_ + + #define _CGauss_H_ + + #include + + class CGauss + { + double A; + double To; + double S; + + public: + CGauss( double a, double to, double s ) : A( a ), To( to ), S( s ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_04.cpp b/Signal/IX3/MODEL/math_04.cpp new file mode 100644 index 0000000..19e9818 --- /dev/null +++ b/Signal/IX3/MODEL/math_04.cpp @@ -0,0 +1,150 @@ +#include "StdAfx.h" +#include "Math_04.h" + +void CFure::Direct ( DComplex *U, DComplex *Uf ) +{ + double Pow = 2.0 * PI / N; + + for( int k = 0 ; k < N ; k++ ) + { + Uf[k] = 0.0; + + for( int l = 0 ; l < N ; l++ ) + { + Uf[k] += U[l] * exp( -DComplex( 0.0, Pow * k * l ) ); + } + + Uf[k] *= ( T / N ); + } +} + +void CFure::Reverse( DComplex *Uf, DComplex *U ) +{ + double Pow = 2.0 * PI / N; + + for( int l = 0 ; l < N ; l++ ) + { + U[l] = 0.0; + + for( int k = 0 ; k < N ; k++ ) + { + U[l] += Uf[k] * exp( DComplex( 0.0, Pow * l * k ) ); + } + + // на N уже делили ! ( см. Direct ) + U[l] /= T; + } +} + +// от Филиппова... + +int CFure::st( int n, int np ) +{ + int m = 1, i; + + for( i = 1 ; i <= np ; i++ ) + m = m * n; + + return m; +} + +void CFure::Fft( DComplex *x, int sign, int np, double t ) +{ + int msk[19]; + double cs[2]; + DComplex cxcs, xa, hold; + int nmax, i, j, nn, mm, lr, nw, nw1, ii, ij, loc, ll; + double zz, pi, delta, w; + + pi = PI; + nmax = st( 2, np ); + zz = 2.0 * pi * sign / nmax; + delta = t / nmax; + + if( sign < 0.0 ) + delta = 1.0 / t; + + msk[0] = nmax / 2; + + for( i = 1 ; i < np ; i++ ) + msk[i] = msk[i-1] / 2; + + nn = nmax; + mm = 2; + + for( lr = 1 ; lr <= np ; lr++ ) + { + nn = nn / 2; + nw = 0; + + for( i = 1 ; i <= mm ; i +=2 ) + { + ii = nn * i; + w = nw * zz; + cs[0] = cos( w ); + cs[1] = sin( w ); + + cxcs = DComplex( cs[0], cs[1] ); + + for( j = 1 ; j <= nn ; j++ ) + { + ii = ii + 1; + ij = ii - nn; + + xa = cxcs * x[ii-1]; + x[ii-1] = x[ij-1] - xa; + x[ij-1] = x[ij-1] + xa; + } + + for( loc = 2 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw = ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } + + mm = 2 * mm; + } + + nw = 0; + + for( i = 1 ; i <= nmax ; i++ ) + { + nw1 = nw + 1; + hold = x[nw1 - 1]; + + if( nw1 - i > 0 ) + { + x[nw1-1] = DComplex( real( x[i-1] ) * delta, imag( x[i-1] ) * delta ); + } + + if( nw1 - i >= 0 ) + { + x[i-1] = DComplex( real( hold ) * delta, imag( hold ) * delta ); + } + + for( loc = 1 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw=ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } +} \ No newline at end of file diff --git a/Signal/IX3/MODEL/math_04.h b/Signal/IX3/MODEL/math_04.h new file mode 100644 index 0000000..8efa1e9 --- /dev/null +++ b/Signal/IX3/MODEL/math_04.h @@ -0,0 +1,40 @@ +#ifndef _CFure_H_ + + #define _CFure_H_ + + #include + using namespace std; + + #define PI 3.14159265358979323846 + + typedef complex DComplex; + + class CFure + { + // ... + double T; + int N; + + int st( int n, int np ); + + public: + CFure() + { + memset( this, 0, sizeof( CFure ) ); + } + CFure( double t, int n ) : T( t ), N( n ) + { + } + + void ReInit( double T, int N ) + { + this -> T = T; + this -> N = N; + } + + void Direct( DComplex *U, DComplex *Uf ); + void Reverse( DComplex *Uf, DComplex *U ); + void Fft( DComplex *X, int Sign, int Np, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX3/NEWDOC.CPP b/Signal/IX3/NEWDOC.CPP new file mode 100644 index 0000000..272033c --- /dev/null +++ b/Signal/IX3/NEWDOC.CPP @@ -0,0 +1,243 @@ +#include "StdAfx.h" +#include "NewDoc.h" + + + +CNewDoc:: CNewDoc() +{ + T = 0.0; + N = 0; + + Ai = 5.0; + Toi = 5.0; + + As = 1.0; + Ts = 2.0; + + Ag = 5.0; + Tog = 5.0; + Sg = 5.0; + + U = NULL; + F = NULL; + V = NULL; + Uq = NULL; + Vq = NULL; + + YexView = NULL; + YapView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + ReInit( 6.0, 128 ); +} + +CNewDoc::~CNewDoc() +{ + if( U ) + delete[] U; + if( F ) + delete[] F; + if( V ) + delete[] V; + if( Uq ) + delete[] Uq; + if( Vq ) + delete[] Vq; +} + + + +int CNewDoc::Allocate( DComplex **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new DComplex [Size] ) == NULL ) + return 0; + + return 1; +} + +int CNewDoc::Allocate( double **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new double [Size] ) == NULL ) + return 0; + + return 1; +} + +void CNewDoc::Convert( DComplex *Src, double *Des, int What ) +{ + int i, HalfSize = N / 2, Delta = HalfSize; + + for( i = 0 ; i < N ; i++ ) + Des[i] = abs( Src[i] ); + + // перестановка нужна, т.к. спектр получаем шиворот-навыворот + if( What ) + { + if( N % 2 ) + Delta++; + + for( i = 0 ; i < HalfSize ; i++ ) + { + double Tmp = Des[i+Delta]; + + Des[i+Delta] = Des[i]; + Des[i] = Tmp; + } + } +} + +// возвращает степень, в которую нужно вознести 2 чтобы получить N +int CNewDoc::GetPower( int N ) +{ + int n = 2, i = 1; + + while( n < N ) + { + n *= 2; + i += 1; + } + + return i; +} + +int CNewDoc::ReInit( double t, int n ) +{ + YexView = NULL; + YapView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + if( t < 0.0 || n < 0 ) + return 0; + + if( T != t || N != n ) + { + T = t; + N = n; + + Fure.ReInit( T, N ); + + if( !Xu.ReCalc( N, T / N ) ) + return 0; + if( !Xf.ReCalc( N, 1.0 / T ) ) + return 0; + + if( !Allocate( &U, N ) ) + return 0; + if( !Allocate( &F, N ) ) + return 0; + if( !Allocate( &V, N ) ) + return 0; + if( !Allocate( &Uq, N ) ) + return 0; + if( !Allocate( &Vq, N ) ) + return 0; + } + + return 1; +} + +void CNewDoc::SignalA( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + /* + CImpulse Impulse( Ai, Toi ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + { + U[i] = Uq[i] = DComplex( Impulse.Value( Xu.Data[i] ), 0.0 ); + } + */ +} + +void CNewDoc::SignalB( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + CStep Step( As, Ts ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + U[i] = Uq[i] = DComplex( Step.Value( Xu.Data[i] ), 0.0 ); +} + +void CNewDoc::SignalC( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + CGauss Gauss( Ag, Tog, Sg ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + U[i] = Uq[i] = DComplex( Gauss.Value( Xu.Data[i] ), 0.0 ); +} + +void CNewDoc::Direct( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + int Tmp = GetPower( N ); + + Fure.Direct( U, F ); + Fure.Fft ( Uq, 1, Tmp, T ); + + Convert( F, V, 1 ); + Convert( Uq, Vq, 1 ); + + strcpy( NCalc, "Спектр." ); + + XView = Xf.Data; + YexView = V; + YapView = Vq; + SView = Xf.Size; + NView = NCalc; +} + +void CNewDoc::Reverse( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + int Tmp = GetPower( N ); + + Fure.Reverse( F, U ); + Fure.Fft ( Uq, -1, Tmp, T ); + + Convert( U, V, 0 ); + Convert( Uq, Vq, 0 ); + + strcpy( NCalc, "Сигнал." ); + + XView = Xu.Data; + YexView = V; + YapView = Vq; + SView = Xu.Size; + NView = NCalc; +} \ No newline at end of file diff --git a/Signal/IX3/NEWDOC.H b/Signal/IX3/NEWDOC.H new file mode 100644 index 0000000..e82d637 --- /dev/null +++ b/Signal/IX3/NEWDOC.H @@ -0,0 +1,71 @@ +#ifndef _CNewDoc_H_ + + #define _CNewDoc_H_ + + #include "Model\math_00.h" + #include "Model\math_01.h" + #include "Model\math_02.h" + #include "Model\math_03.h" + #include "Model\math_04.h" + + #define L 100 + + class CNewDoc + { + // ... + CFure Fure; + // ... + CNet Xu; + DComplex *U; + CNet Xf; + DComplex *F; + // ... + DComplex *Uq; + // ... + double *V; + double *Vq; + // ... + char NCalc[L]; + + int Allocate( DComplex **Des, int Size ); + int Allocate( double **Des, int Size ); + void Convert( DComplex *Src, double *Des, int What ); + int GetPower( int N ); + + public: + CNewDoc(); + ~CNewDoc(); + + // ... + double T; + int N; + // ... + double Ai; + double Toi; + // ... + double As; + double Ts; + // ... + double Ag; + double Tog; + double Sg; + + // ... + double *XView; + double *YexView; + double *YapView; + int SView; + // ... + char *NView; + + int ReInit( double t, int n ); + + void SignalA( void ); + void SignalB( void ); + void SignalC( void ); + void Direct ( void ); + void Reverse( void ); + + }; + +#endif \ No newline at end of file diff --git a/Signal/IX3/StdAfx.cpp b/Signal/IX3/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/Signal/IX3/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/Signal/IX3/StdAfx.h b/Signal/IX3/StdAfx.h new file mode 100644 index 0000000..69e21e8 --- /dev/null +++ b/Signal/IX3/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#if !defined(AFX_STDAFX_H__1611B864_A458_11D3_8E2C_00504E02C39D__INCLUDED_) +#define AFX_STDAFX_H__1611B864_A458_11D3_8E2C_00504E02C39D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0400 +#endif +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__1611B864_A458_11D3_8E2C_00504E02C39D__INCLUDED) diff --git a/Signal/IX3/resource.h b/Signal/IX3/resource.h new file mode 100644 index 0000000..ddededa --- /dev/null +++ b/Signal/IX3/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by IX3.rc +// +#define IDS_PROJNAME 100 +#define IDR_IXL3 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/Signal/IX4/IX4.cpp b/Signal/IX4/IX4.cpp new file mode 100644 index 0000000..a65dbe7 --- /dev/null +++ b/Signal/IX4/IX4.cpp @@ -0,0 +1,72 @@ +// IX4.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f IX4ps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "IX4.h" + +#include "IX4_i.c" +#include "IXL4.h" + + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) +OBJECT_ENTRY(CLSID_IXL4, CIXL4) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_IX4Lib); + DisableThreadLibraryCalls(hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + _Module.Term(); + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + return _Module.UnregisterServer(TRUE); +} + + diff --git a/Signal/IX4/IX4.def b/Signal/IX4/IX4.def new file mode 100644 index 0000000..96ef4af --- /dev/null +++ b/Signal/IX4/IX4.def @@ -0,0 +1,9 @@ +; IX4.def : Declares the module parameters. + +LIBRARY "IX4.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/Signal/IX4/IX4.dsp b/Signal/IX4/IX4.dsp new file mode 100644 index 0000000..d940192 --- /dev/null +++ b/Signal/IX4/IX4.dsp @@ -0,0 +1,379 @@ +# Microsoft Developer Studio Project File - Name="IX4" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=IX4 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "IX4.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "IX4.mak" CFG="IX4 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "IX4 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX4 - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX4 - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX4 - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX4 - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX4 - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "IX4 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=.\Debug\IX4.dll +InputPath=.\Debug\IX4.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX4 - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=.\DebugU\IX4.dll +InputPath=.\DebugU\IX4.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX4 - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=.\ReleaseMinSize\IX4.dll +InputPath=.\ReleaseMinSize\IX4.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX4 - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=.\ReleaseMinDependency\IX4.dll +InputPath=.\ReleaseMinDependency\IX4.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX4 - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=.\ReleaseUMinSize\IX4.dll +InputPath=.\ReleaseUMinSize\IX4.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX4 - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\IX4.dll +InputPath=.\ReleaseUMinDependency\IX4.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "IX4 - Win32 Debug" +# Name "IX4 - Win32 Unicode Debug" +# Name "IX4 - Win32 Release MinSize" +# Name "IX4 - Win32 Release MinDependency" +# Name "IX4 - Win32 Unicode Release MinSize" +# Name "IX4 - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\IX4.cpp +# End Source File +# Begin Source File + +SOURCE=.\IX4.def +# End Source File +# Begin Source File + +SOURCE=.\IX4.idl +# ADD MTL /tlb ".\IX4.tlb" /h "IX4.h" /iid "IX4_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\IX4.rc +# End Source File +# Begin Source File + +SOURCE=.\IXL4.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_04.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_05.cpp +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.CPP +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\IXL4.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_04.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_05.h +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.H +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\IXL4.rgs +# End Source File +# End Group +# End Target +# End Project diff --git a/Signal/IX4/IX4.dsw b/Signal/IX4/IX4.dsw new file mode 100644 index 0000000..1d84aac --- /dev/null +++ b/Signal/IX4/IX4.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "IX4"=.\IX4.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Signal/IX4/IX4.h b/Signal/IX4/IX4.h new file mode 100644 index 0000000..aa9d518 --- /dev/null +++ b/Signal/IX4/IX4.h @@ -0,0 +1,301 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Dec 01 20:31:24 1999 + */ +/* Compiler settings for G:\WORK\Signal\IX4\IX4.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __IX4_h__ +#define __IX4_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __IIXL4_FWD_DEFINED__ +#define __IIXL4_FWD_DEFINED__ +typedef interface IIXL4 IIXL4; +#endif /* __IIXL4_FWD_DEFINED__ */ + + +#ifndef __IXL4_FWD_DEFINED__ +#define __IXL4_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class IXL4 IXL4; +#else +typedef struct IXL4 IXL4; +#endif /* __cplusplus */ + +#endif /* __IXL4_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +#ifndef __IIXL4_INTERFACE_DEFINED__ +#define __IIXL4_INTERFACE_DEFINED__ + +/* interface IIXL4 */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IIXL4; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4CE1B782-A4D0-11D3-8E2E-00504E02C39D") + IIXL4 : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ReInit( + /* [in] */ double A, + /* [in] */ double B, + /* [in] */ long N) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnSignalC( + /* [in] */ double SgU, + /* [in] */ double SgH) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDirect( void) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FetchResults( + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes) = 0; + + }; + +#else /* C style interface */ + + typedef struct IIXL4Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IIXL4 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IIXL4 __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IIXL4 __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + IIXL4 __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + IIXL4 __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + IIXL4 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + IIXL4 __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *ReInit )( + IIXL4 __RPC_FAR * This, + /* [in] */ double A, + /* [in] */ double B, + /* [in] */ long N); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnSignalC )( + IIXL4 __RPC_FAR * This, + /* [in] */ double SgU, + /* [in] */ double SgH); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnDirect )( + IIXL4 __RPC_FAR * This); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *FetchResults )( + IIXL4 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + END_INTERFACE + } IIXL4Vtbl; + + interface IIXL4 + { + CONST_VTBL struct IIXL4Vtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IIXL4_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IIXL4_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IIXL4_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IIXL4_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IIXL4_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IIXL4_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IIXL4_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IIXL4_ReInit(This,A,B,N) \ + (This)->lpVtbl -> ReInit(This,A,B,N) + +#define IIXL4_OnSignalC(This,SgU,SgH) \ + (This)->lpVtbl -> OnSignalC(This,SgU,SgH) + +#define IIXL4_OnDirect(This) \ + (This)->lpVtbl -> OnDirect(This) + +#define IIXL4_FetchResults(This,arrRes) \ + (This)->lpVtbl -> FetchResults(This,arrRes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL4_ReInit_Proxy( + IIXL4 __RPC_FAR * This, + /* [in] */ double A, + /* [in] */ double B, + /* [in] */ long N); + + +void __RPC_STUB IIXL4_ReInit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL4_OnSignalC_Proxy( + IIXL4 __RPC_FAR * This, + /* [in] */ double SgU, + /* [in] */ double SgH); + + +void __RPC_STUB IIXL4_OnSignalC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL4_OnDirect_Proxy( + IIXL4 __RPC_FAR * This); + + +void __RPC_STUB IIXL4_OnDirect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL4_FetchResults_Proxy( + IIXL4 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + +void __RPC_STUB IIXL4_FetchResults_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IIXL4_INTERFACE_DEFINED__ */ + + + +#ifndef __IX4Lib_LIBRARY_DEFINED__ +#define __IX4Lib_LIBRARY_DEFINED__ + +/* library IX4Lib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_IX4Lib; + +EXTERN_C const CLSID CLSID_IXL4; + +#ifdef __cplusplus + +class DECLSPEC_UUID("4CE1B783-A4D0-11D3-8E2E-00504E02C39D") +IXL4; +#endif +#endif /* __IX4Lib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long __RPC_FAR *, unsigned long , LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +void __RPC_USER LPSAFEARRAY_UserFree( unsigned long __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Signal/IX4/IX4.idl b/Signal/IX4/IX4.idl new file mode 100644 index 0000000..01e5dcc --- /dev/null +++ b/Signal/IX4/IX4.idl @@ -0,0 +1,42 @@ +// IX4.idl : IDL source for IX4.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (IX4.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + [ + object, + uuid(4CE1B782-A4D0-11D3-8E2E-00504E02C39D), + dual, + helpstring("IIXL4 Interface"), + pointer_default(unique) + ] + interface IIXL4 : IDispatch + { + [id(1), helpstring("method ReInit")] HRESULT ReInit([in] double A, [in] double B, [in] long N); + [id(2), helpstring("method OnSignalC")] HRESULT OnSignalC([in] double SgU, [in] double SgH); + [id(3), helpstring("method OnDirect")] HRESULT OnDirect(); + [id(4), helpstring("method FetchResults")] HRESULT FetchResults( [out] SAFEARRAY(double)* arrRes ); + }; + +[ + uuid(4CE1B776-A4D0-11D3-8E2E-00504E02C39D), + version(1.0), + helpstring("IX4 1.0 Type Library") +] +library IX4Lib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(4CE1B783-A4D0-11D3-8E2E-00504E02C39D), + helpstring("IXL4 Class") + ] + coclass IXL4 + { + [default] interface IIXL4; + }; +}; diff --git a/Signal/IX4/IX4.rc b/Signal/IX4/IX4.rc new file mode 100644 index 0000000..b58095b --- /dev/null +++ b/Signal/IX4/IX4.rc @@ -0,0 +1,136 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#ifdef _WIN32 +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_IXL4 REGISTRY DISCARDABLE "IXL4.rgs" +#endif // Russian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""IX4.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "IX4 Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "IX4\0" + VALUE "LegalCopyright", "Copyright 1999\0" + VALUE "OriginalFilename", "IX4.DLL\0" + VALUE "ProductName", "IX4 Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "OLESelfRegister", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "IX4" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "IX4.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Signal/IX4/IX4ps.def b/Signal/IX4/IX4ps.def new file mode 100644 index 0000000..32523d3 --- /dev/null +++ b/Signal/IX4/IX4ps.def @@ -0,0 +1,11 @@ + +LIBRARY "IX4PS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/Signal/IX4/IX4ps.mk b/Signal/IX4/IX4ps.mk new file mode 100644 index 0000000..db1eb0f --- /dev/null +++ b/Signal/IX4/IX4ps.mk @@ -0,0 +1,16 @@ + +IX4ps.dll: dlldata.obj IX4_p.obj IX4_i.obj + link /dll /out:IX4ps.dll /def:IX4ps.def /entry:DllMain dlldata.obj IX4_p.obj IX4_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del IX4ps.dll + @del IX4ps.lib + @del IX4ps.exp + @del dlldata.obj + @del IX4_p.obj + @del IX4_i.obj diff --git a/Signal/IX4/IXL4.cpp b/Signal/IX4/IXL4.cpp new file mode 100644 index 0000000..acf2707 --- /dev/null +++ b/Signal/IX4/IXL4.cpp @@ -0,0 +1,74 @@ +// IXL4.cpp : Implementation of CIXL4 +#include "stdafx.h" +#include "IX4.h" +#include "IXL4.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL4 + +STDMETHODIMP CIXL4::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_IIXL4 + }; + for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) + { + if (InlineIsEqualGUID(*arr[i],riid)) + return S_OK; + } + return S_FALSE; +} + +STDMETHODIMP CIXL4::ReInit( double A, double B, long N ) + { + if( !m_doc.ReInit(A, B, N) ) + { + Error( L"Cann't ReInit", 0, NULL, IID_IIXL4, E_FAIL ); + return E_FAIL; + } + return S_OK; + } + +STDMETHODIMP CIXL4::OnSignalC( double SgU, double SgH ) + { + m_doc.SgU = SgU, m_doc.SgH = SgH; + m_doc.Signal(); + return S_OK; + } + +STDMETHODIMP CIXL4::OnDirect() + { + m_doc.Procces(); + + return S_OK; + } + +STDMETHODIMP CIXL4::FetchResults( SAFEARRAY** arrRes ) + { + if( !arrRes ) return E_POINTER; + SAFEARRAYBOUND bnd = { 2 * m_doc.SView, 0 }; + *arrRes = SafeArrayCreate( VT_R8, 1, &bnd ); + if( !*arrRes ) + { + Error( L"Cann't array allocate", 0, NULL, IID_IIXL4, E_FAIL ); + return E_FAIL; + } + + double* pDta; + HRESULT hr = SafeArrayAccessData( *arrRes, (void**)&pDta ); + if( FAILED(hr) ) + { + Error( L"Cann't access array", 0, NULL, IID_IIXL4, hr ); + return hr; + } + + double *x = m_doc.XView, *y = m_doc.YView; + for( int i = 0; i < m_doc.SView; ++i, ++x, ++y ) + *pDta++ = *x, *pDta++ = *y; + + SafeArrayUnaccessData( *arrRes ); + + + return S_OK; + } diff --git a/Signal/IX4/IXL4.h b/Signal/IX4/IXL4.h new file mode 100644 index 0000000..39b9d8f --- /dev/null +++ b/Signal/IX4/IXL4.h @@ -0,0 +1,47 @@ +// IXL4.h : Declaration of the CIXL4 + +#ifndef __IXL4_H_ +#define __IXL4_H_ + +#include "resource.h" // main symbols +#include "NEWDOC.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL4 +class ATL_NO_VTABLE CIXL4 : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl +{ +public: + CIXL4() + { + } + +DECLARE_REGISTRY_RESOURCEID(IDR_IXL4) +DECLARE_NOT_AGGREGATABLE(CIXL4) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CIXL4) + COM_INTERFACE_ENTRY(IIXL4) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// IIXL4 +public: + STDMETHOD(FetchResults)( SAFEARRAY** arrRes ); + STDMETHOD(OnDirect)(); + STDMETHOD(OnSignalC)(/*[in]*/ double SgU, /*[in]*/ double SgH); + STDMETHOD(ReInit)(/*[in]*/ double A, /*[in]*/ double B, /*[in]*/ long N); + +private: + CNewDoc m_doc; +}; + +#endif //__IXL4_H_ diff --git a/Signal/IX4/IXL4.rgs b/Signal/IX4/IXL4.rgs new file mode 100644 index 0000000..7ea7690 --- /dev/null +++ b/Signal/IX4/IXL4.rgs @@ -0,0 +1,26 @@ +HKCR +{ + IX4.IXL4.1 = s 'IXL4 Class' + { + CLSID = s '{4CE1B783-A4D0-11D3-8E2E-00504E02C39D}' + } + IX4.IXL4 = s 'IXL4 Class' + { + CLSID = s '{4CE1B783-A4D0-11D3-8E2E-00504E02C39D}' + CurVer = s 'IX4.IXL4.1' + } + NoRemove CLSID + { + ForceRemove {4CE1B783-A4D0-11D3-8E2E-00504E02C39D} = s 'IXL4 Class' + { + ProgID = s 'IX4.IXL4.1' + VersionIndependentProgID = s 'IX4.IXL4' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{4CE1B776-A4D0-11D3-8E2E-00504E02C39D}' + } + } +} diff --git a/Signal/IX4/MODEL/math_00.cpp b/Signal/IX4/MODEL/math_00.cpp new file mode 100644 index 0000000..ffdde8f --- /dev/null +++ b/Signal/IX4/MODEL/math_00.cpp @@ -0,0 +1,72 @@ +#include "StdAfx.h" +#include "Math_00.h" + +int CNet::ReLoad( int size ) +{ + if( Size ) + delete[] Data; + + if( ( Data = new double [ Size = size ] ) == NULL ) + return 0; + + return 1; +} + +int CNet::ReCalc( double a, double b, double step ) +{ + int Size = ( int ) ( ( b - a ) / step ) + 1; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( double a, double b, int size ) +{ + double step = ( b - a ) / size; + + if( ReLoad( size ) ) + { + for( int i = 0 ; i < size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( double w, double step ) +{ + int Size = ( int ) ( w / step ) + 1; + double a = -w / 2.0; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( int n, double step ) +{ + if( ReLoad( n ) ) + { + for( int i = 0 ; i < n ; i++ ) + Data[i] = i * step; + + return 1; + } + + return 0; +} \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_00.h b/Signal/IX4/MODEL/math_00.h new file mode 100644 index 0000000..3c4e090 --- /dev/null +++ b/Signal/IX4/MODEL/math_00.h @@ -0,0 +1,27 @@ +#ifndef _CNet_H_ + + #define _CNet_H_ + + class CNet + { + public: + CNet() : Data( NULL ), Size( 0 ) + { + } + ~CNet() + { + if( Size ) + delete[] Data; + } + + double *Data; + int Size; + + int ReLoad( int size ); + int ReCalc( double a, double b, double step ); + int ReCalc( double a, double b, int size ); + int ReCalc( double w, double step ); + int ReCalc( int n, double step ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_01.cpp b/Signal/IX4/MODEL/math_01.cpp new file mode 100644 index 0000000..2833808 --- /dev/null +++ b/Signal/IX4/MODEL/math_01.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_01.h" + +int CImpulse::Delta( double t ) +{ + if( To == t ) + return 1; + + return 0; +} + +double CImpulse::Value( double t ) +{ + return A * Delta( t ); +} \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_01.h b/Signal/IX4/MODEL/math_01.h new file mode 100644 index 0000000..04d9512 --- /dev/null +++ b/Signal/IX4/MODEL/math_01.h @@ -0,0 +1,20 @@ +#ifndef _CImpulse_H_ + + #define _CInpulse_H_ + + class CImpulse + { + double A; + double To; + + int Delta( double t ); + + public: + CImpulse( double a, double to ) : A( a ), To( to ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_02.cpp b/Signal/IX4/MODEL/math_02.cpp new file mode 100644 index 0000000..d72e505 --- /dev/null +++ b/Signal/IX4/MODEL/math_02.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_02.h" + +int CStep:: Rect( double t ) +{ + if( 0.0 <= t && t <= 1.0 ) + return 1; + + return 0; +} + +double CStep::Value( double t ) +{ + return A * Rect( ( t - T ) / T ); +} \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_02.h b/Signal/IX4/MODEL/math_02.h new file mode 100644 index 0000000..a77ade6 --- /dev/null +++ b/Signal/IX4/MODEL/math_02.h @@ -0,0 +1,20 @@ +#ifndef _CStep_H_ + + #define _CStep_H_ + + class CStep + { + double A; + double T; + + int Rect( double t ); + + public: + CStep( double a, double t ) : A( a ), T( t ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_03.cpp b/Signal/IX4/MODEL/math_03.cpp new file mode 100644 index 0000000..5cd0e22 --- /dev/null +++ b/Signal/IX4/MODEL/math_03.cpp @@ -0,0 +1,7 @@ +#include "StdAfx.h" +#include "Math_03.h" + +double CGauss::Value( double t ) +{ + return A * exp( -( t - To ) * ( t - To ) / S ); +} diff --git a/Signal/IX4/MODEL/math_03.h b/Signal/IX4/MODEL/math_03.h new file mode 100644 index 0000000..8c66d2f --- /dev/null +++ b/Signal/IX4/MODEL/math_03.h @@ -0,0 +1,21 @@ +#ifndef _CGauss_H_ + + #define _CGauss_H_ + + #include + + class CGauss + { + double A; + double To; + double S; + + public: + CGauss( double a, double to, double s ) : A( a ), To( to ), S( s ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_04.cpp b/Signal/IX4/MODEL/math_04.cpp new file mode 100644 index 0000000..19e9818 --- /dev/null +++ b/Signal/IX4/MODEL/math_04.cpp @@ -0,0 +1,150 @@ +#include "StdAfx.h" +#include "Math_04.h" + +void CFure::Direct ( DComplex *U, DComplex *Uf ) +{ + double Pow = 2.0 * PI / N; + + for( int k = 0 ; k < N ; k++ ) + { + Uf[k] = 0.0; + + for( int l = 0 ; l < N ; l++ ) + { + Uf[k] += U[l] * exp( -DComplex( 0.0, Pow * k * l ) ); + } + + Uf[k] *= ( T / N ); + } +} + +void CFure::Reverse( DComplex *Uf, DComplex *U ) +{ + double Pow = 2.0 * PI / N; + + for( int l = 0 ; l < N ; l++ ) + { + U[l] = 0.0; + + for( int k = 0 ; k < N ; k++ ) + { + U[l] += Uf[k] * exp( DComplex( 0.0, Pow * l * k ) ); + } + + // на N уже делили ! ( см. Direct ) + U[l] /= T; + } +} + +// от Филиппова... + +int CFure::st( int n, int np ) +{ + int m = 1, i; + + for( i = 1 ; i <= np ; i++ ) + m = m * n; + + return m; +} + +void CFure::Fft( DComplex *x, int sign, int np, double t ) +{ + int msk[19]; + double cs[2]; + DComplex cxcs, xa, hold; + int nmax, i, j, nn, mm, lr, nw, nw1, ii, ij, loc, ll; + double zz, pi, delta, w; + + pi = PI; + nmax = st( 2, np ); + zz = 2.0 * pi * sign / nmax; + delta = t / nmax; + + if( sign < 0.0 ) + delta = 1.0 / t; + + msk[0] = nmax / 2; + + for( i = 1 ; i < np ; i++ ) + msk[i] = msk[i-1] / 2; + + nn = nmax; + mm = 2; + + for( lr = 1 ; lr <= np ; lr++ ) + { + nn = nn / 2; + nw = 0; + + for( i = 1 ; i <= mm ; i +=2 ) + { + ii = nn * i; + w = nw * zz; + cs[0] = cos( w ); + cs[1] = sin( w ); + + cxcs = DComplex( cs[0], cs[1] ); + + for( j = 1 ; j <= nn ; j++ ) + { + ii = ii + 1; + ij = ii - nn; + + xa = cxcs * x[ii-1]; + x[ii-1] = x[ij-1] - xa; + x[ij-1] = x[ij-1] + xa; + } + + for( loc = 2 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw = ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } + + mm = 2 * mm; + } + + nw = 0; + + for( i = 1 ; i <= nmax ; i++ ) + { + nw1 = nw + 1; + hold = x[nw1 - 1]; + + if( nw1 - i > 0 ) + { + x[nw1-1] = DComplex( real( x[i-1] ) * delta, imag( x[i-1] ) * delta ); + } + + if( nw1 - i >= 0 ) + { + x[i-1] = DComplex( real( hold ) * delta, imag( hold ) * delta ); + } + + for( loc = 1 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw=ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } +} \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_04.h b/Signal/IX4/MODEL/math_04.h new file mode 100644 index 0000000..f5e1a45 --- /dev/null +++ b/Signal/IX4/MODEL/math_04.h @@ -0,0 +1,40 @@ +#ifndef _CFure_H_ + + #define _CFure_H_ + + #include +using namespace std; + + #define PI 3.14159265358979323846 + + typedef complex DComplex; + + class CFure + { + // ... + double T; + int N; + + int st( int n, int np ); + + public: + CFure() + { + memset( this, 0, sizeof( CFure ) ); + } + CFure( double t, int n ) : T( t ), N( n ) + { + } + + void ReInit( double T, int N ) + { + this -> T = T; + this -> N = N; + } + + void Direct( DComplex *U, DComplex *Uf ); + void Reverse( DComplex *Uf, DComplex *U ); + void Fft( DComplex *X, int Sign, int Np, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_05.cpp b/Signal/IX4/MODEL/math_05.cpp new file mode 100644 index 0000000..c2f10ce --- /dev/null +++ b/Signal/IX4/MODEL/math_05.cpp @@ -0,0 +1,57 @@ +#include "StdAfx.h" +#include "Math_05.h" + +int CCurtail::Allocate( DComplex **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new DComplex [Size] ) == NULL ) + return 0; + + return 1; +} + +int CCurtail::GetPower( int N ) +{ + int n = 2, i = 1; + + while( n < N ) + { + n *= 2; + i += 1; + } + + return i; +} + +void CCurtail::Widen( DComplex *Src, int Size, DComplex **Des ) +{ + Allocate( Des, 2 * Size ); + + for( int i = 0 ; i < 2 * Size ; i++ ) + { + if( i < Size ) + ( *Des )[i] = Src[i]; + else + ( *Des )[i] = 0.0; + } +} + +// размер R должен быть равен 2 * N ! +// +void CCurtail::Calculate( DComplex *U, DComplex *H, double T, int N, DComplex *R ) +{ + int i, n = GetPower( N ) + 1; + + Widen( U, N, &Uw ); + Widen( H, N, &Hw ); + + Fure.Fft( Uw, 1.0, n, 2.0 * T ); + Fure.Fft( Hw, 1.0, n, 2.0 * T ); + + for( i = 0 ; i < 2 * N ; i++ ) + R[i] = Uw[i] * Hw[i]; + + Fure.Fft( R, -1.0, n, 2.0 * T ); +} \ No newline at end of file diff --git a/Signal/IX4/MODEL/math_05.h b/Signal/IX4/MODEL/math_05.h new file mode 100644 index 0000000..bf50a4a --- /dev/null +++ b/Signal/IX4/MODEL/math_05.h @@ -0,0 +1,36 @@ +#ifndef _CCurtail_H_ + + #define _CCurtail_H_ + + #include "Math_04.h" + + class CCurtail + { + // ... + CFure Fure; + + // ... + DComplex *Uw; + DComplex *Hw; + + int Allocate( DComplex **Des, int Size ); + int GetPower( int N ); + void Widen( DComplex *Src, int Size, DComplex **Des ); + + public: + CCurtail() + { + memset( this, 0, sizeof( CCurtail ) ); + } + ~CCurtail() + { + if( Uw ) + delete[] Uw; + if( Hw ) + delete[] Hw; + } + + void Calculate( DComplex *U, DComplex *H, double T, int N, DComplex *R ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX4/NEWDOC.CPP b/Signal/IX4/NEWDOC.CPP new file mode 100644 index 0000000..c75a191 --- /dev/null +++ b/Signal/IX4/NEWDOC.CPP @@ -0,0 +1,138 @@ +#include "StdAfx.h" +#include "NewDoc.h" + + +CNewDoc:: CNewDoc() +{ + A = 0.0; + B = 0.0; + N = 0; + + SgU = 1.0; + SgH = 0.5; + + U = NULL; + H = NULL; + R = NULL; + V = NULL; + + YView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + ReInit( -3.0, 3.0, 128 ); +} + +CNewDoc::~CNewDoc() +{ + if( U ) + delete[] U; + if( H ) + delete[] H; + if( R ) + delete[] R; + if( V ) + delete[] V; +} + + +int CNewDoc::Allocate( DComplex **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new DComplex [Size] ) == NULL ) + return 0; + + return 1; +} + +int CNewDoc::Allocate( double **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new double [Size] ) == NULL ) + return 0; + + return 1; +} + +void CNewDoc::Convert( DComplex *Src, double *Des ) +{ + for( int i = 0 ; i < 2 * N ; i++ ) + Des[i] = abs( Src[i] ); +} + +int CNewDoc::ReInit( double a, double b, int n ) +{ + YView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + if( b < a || n < 0 ) + return 0; + + if( A != a || B != b || N != n ) + { + A = a; + B = b; + N = n; + + // ! + if( !X.ReCalc( A, A + 2.0 * ( B - A ), 2 * N ) ) + return 0; + + if( !Allocate( &U, N ) ) + return 0; + if( !Allocate( &H, N ) ) + return 0; + if( !Allocate( &R, 2 * N ) ) + return 0; + if( !Allocate( &V, 2 * N ) ) + return 0; + } + + return 1; +} + +void CNewDoc::Signal( void ) +{ + XView = NULL; + YView = NULL; + SView = 0; + NView = NULL; + + CGauss GaussU( 1.0, 0.0, SgU * SgU ); + CGauss GaussH( 1.0, 0.0, SgH * SgH ); + + // ! + for( int i = 0 ; i < N ; i++ ) + { + U[i] = DComplex( GaussU.Value( X.Data[i] ), 0.0 ); + H[i] = DComplex( GaussH.Value( X.Data[i] ), 0.0 ); + } +} + +void CNewDoc::Procces( void ) +{ + XView = NULL; + YView = NULL; + SView = 0; + NView = NULL; + + CCurtail Curtail; + + Curtail.Calculate( U, H, B - A, N, R ); + + Convert( R, V ); + + strcpy( NCalc, "Свертка." ); + + XView = X.Data; + YView = V; + SView = X.Size; + NView = NCalc; +} \ No newline at end of file diff --git a/Signal/IX4/NEWDOC.H b/Signal/IX4/NEWDOC.H new file mode 100644 index 0000000..9a8600a --- /dev/null +++ b/Signal/IX4/NEWDOC.H @@ -0,0 +1,54 @@ +#ifndef _CNewDoc_H_ + + #define _CNewDoc_H_ + + #include "Model\math_00.h" + #include "Model\math_03.h" + #include "Model\math_05.h" + + #define L 100 + + class CNewDoc + { + // ... + CNet X; + DComplex *U; + DComplex *H; + DComplex *R; + // ... + double *V; + // ... + char NCalc[L]; + + int Allocate( DComplex **Des, int Size ); + int Allocate( double **Des, int Size ); + void Convert( DComplex *Src, double *Des ); + + public: + CNewDoc(); + ~CNewDoc(); + + // ... + double A; + double B; + int N; + // ... + double SgU; + double SgH; + + // ... + double *XView; + double *YView; + int SView; + // ... + char *NView; + + int ReInit( double a, double b, int n ); + + void Signal( void ); + void Procces( void ); + + + }; + +#endif \ No newline at end of file diff --git a/Signal/IX4/StdAfx.cpp b/Signal/IX4/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/Signal/IX4/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/Signal/IX4/StdAfx.h b/Signal/IX4/StdAfx.h new file mode 100644 index 0000000..391eeb5 --- /dev/null +++ b/Signal/IX4/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#if !defined(AFX_STDAFX_H__4CE1B779_A4D0_11D3_8E2E_00504E02C39D__INCLUDED_) +#define AFX_STDAFX_H__4CE1B779_A4D0_11D3_8E2E_00504E02C39D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0400 +#endif +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__4CE1B779_A4D0_11D3_8E2E_00504E02C39D__INCLUDED) diff --git a/Signal/IX4/resource.h b/Signal/IX4/resource.h new file mode 100644 index 0000000..ae5f918 --- /dev/null +++ b/Signal/IX4/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by IX4.rc +// +#define IDS_PROJNAME 100 +#define IDR_IXL4 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/Signal/IX6/IX6.cpp b/Signal/IX6/IX6.cpp new file mode 100644 index 0000000..92041b0 --- /dev/null +++ b/Signal/IX6/IX6.cpp @@ -0,0 +1,72 @@ +// IX6.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f IX6ps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "IX6.h" + +#include "IX6_i.c" +#include "IXL6.h" + + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) +OBJECT_ENTRY(CLSID_IXL6, CIXL6) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_IX6Lib); + DisableThreadLibraryCalls(hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + _Module.Term(); + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + return _Module.UnregisterServer(TRUE); +} + + diff --git a/Signal/IX6/IX6.def b/Signal/IX6/IX6.def new file mode 100644 index 0000000..4d8666e --- /dev/null +++ b/Signal/IX6/IX6.def @@ -0,0 +1,9 @@ +; IX6.def : Declares the module parameters. + +LIBRARY "IX6.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/Signal/IX6/IX6.dsp b/Signal/IX6/IX6.dsp new file mode 100644 index 0000000..961f236 --- /dev/null +++ b/Signal/IX6/IX6.dsp @@ -0,0 +1,387 @@ +# Microsoft Developer Studio Project File - Name="IX6" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=IX6 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "IX6.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "IX6.mak" CFG="IX6 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "IX6 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX6 - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX6 - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX6 - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX6 - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX6 - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "IX6 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=.\Debug\IX6.dll +InputPath=.\Debug\IX6.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX6 - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=.\DebugU\IX6.dll +InputPath=.\DebugU\IX6.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX6 - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=.\ReleaseMinSize\IX6.dll +InputPath=.\ReleaseMinSize\IX6.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX6 - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=.\ReleaseMinDependency\IX6.dll +InputPath=.\ReleaseMinDependency\IX6.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX6 - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=.\ReleaseUMinSize\IX6.dll +InputPath=.\ReleaseUMinSize\IX6.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX6 - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\IX6.dll +InputPath=.\ReleaseUMinDependency\IX6.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "IX6 - Win32 Debug" +# Name "IX6 - Win32 Unicode Debug" +# Name "IX6 - Win32 Release MinSize" +# Name "IX6 - Win32 Release MinDependency" +# Name "IX6 - Win32 Unicode Release MinSize" +# Name "IX6 - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\IX6.cpp +# End Source File +# Begin Source File + +SOURCE=.\IX6.def +# End Source File +# Begin Source File + +SOURCE=.\IX6.idl +# ADD MTL /tlb ".\IX6.tlb" /h "IX6.h" /iid "IX6_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\IX6.rc +# End Source File +# Begin Source File + +SOURCE=.\IXL6.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_04.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_06.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_07.cpp +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.CPP +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\IXL6.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_04.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_06.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_07.h +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.H +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\IXL6.rgs +# End Source File +# End Group +# End Target +# End Project diff --git a/Signal/IX6/IX6.dsw b/Signal/IX6/IX6.dsw new file mode 100644 index 0000000..9828629 --- /dev/null +++ b/Signal/IX6/IX6.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "IX6"=.\IX6.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Signal/IX6/IX6.h b/Signal/IX6/IX6.h new file mode 100644 index 0000000..8b71f96 --- /dev/null +++ b/Signal/IX6/IX6.h @@ -0,0 +1,329 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Dec 01 20:32:20 1999 + */ +/* Compiler settings for G:\WORK\Signal\IX6\IX6.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __IX6_h__ +#define __IX6_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __IIXL6_FWD_DEFINED__ +#define __IIXL6_FWD_DEFINED__ +typedef interface IIXL6 IIXL6; +#endif /* __IIXL6_FWD_DEFINED__ */ + + +#ifndef __IXL6_FWD_DEFINED__ +#define __IXL6_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class IXL6 IXL6; +#else +typedef struct IXL6 IXL6; +#endif /* __cplusplus */ + +#endif /* __IXL6_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +#ifndef __IIXL6_INTERFACE_DEFINED__ +#define __IIXL6_INTERFACE_DEFINED__ + +/* interface IIXL6 */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IIXL6; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("DBAE610D-A64E-11D3-8E30-00504E02C39D") + IIXL6 : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNet( + /* [in] */ double T, + /* [in] */ long N) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnSignalC( + /* [in] */ double Ag, + /* [in] */ double Tog, + /* [in] */ double Sg) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDirect( + /* [in] */ double AgP, + /* [in] */ double ToP, + /* [in] */ double SgP) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnBack( void) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FetchResults( + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes) = 0; + + }; + +#else /* C style interface */ + + typedef struct IIXL6Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IIXL6 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IIXL6 __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IIXL6 __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + IIXL6 __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + IIXL6 __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + IIXL6 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + IIXL6 __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnNet )( + IIXL6 __RPC_FAR * This, + /* [in] */ double T, + /* [in] */ long N); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnSignalC )( + IIXL6 __RPC_FAR * This, + /* [in] */ double Ag, + /* [in] */ double Tog, + /* [in] */ double Sg); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnDirect )( + IIXL6 __RPC_FAR * This, + /* [in] */ double AgP, + /* [in] */ double ToP, + /* [in] */ double SgP); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnBack )( + IIXL6 __RPC_FAR * This); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *FetchResults )( + IIXL6 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + END_INTERFACE + } IIXL6Vtbl; + + interface IIXL6 + { + CONST_VTBL struct IIXL6Vtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IIXL6_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IIXL6_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IIXL6_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IIXL6_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IIXL6_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IIXL6_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IIXL6_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IIXL6_OnNet(This,T,N) \ + (This)->lpVtbl -> OnNet(This,T,N) + +#define IIXL6_OnSignalC(This,Ag,Tog,Sg) \ + (This)->lpVtbl -> OnSignalC(This,Ag,Tog,Sg) + +#define IIXL6_OnDirect(This,AgP,ToP,SgP) \ + (This)->lpVtbl -> OnDirect(This,AgP,ToP,SgP) + +#define IIXL6_OnBack(This) \ + (This)->lpVtbl -> OnBack(This) + +#define IIXL6_FetchResults(This,arrRes) \ + (This)->lpVtbl -> FetchResults(This,arrRes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL6_OnNet_Proxy( + IIXL6 __RPC_FAR * This, + /* [in] */ double T, + /* [in] */ long N); + + +void __RPC_STUB IIXL6_OnNet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL6_OnSignalC_Proxy( + IIXL6 __RPC_FAR * This, + /* [in] */ double Ag, + /* [in] */ double Tog, + /* [in] */ double Sg); + + +void __RPC_STUB IIXL6_OnSignalC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL6_OnDirect_Proxy( + IIXL6 __RPC_FAR * This, + /* [in] */ double AgP, + /* [in] */ double ToP, + /* [in] */ double SgP); + + +void __RPC_STUB IIXL6_OnDirect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL6_OnBack_Proxy( + IIXL6 __RPC_FAR * This); + + +void __RPC_STUB IIXL6_OnBack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL6_FetchResults_Proxy( + IIXL6 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + +void __RPC_STUB IIXL6_FetchResults_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IIXL6_INTERFACE_DEFINED__ */ + + + +#ifndef __IX6Lib_LIBRARY_DEFINED__ +#define __IX6Lib_LIBRARY_DEFINED__ + +/* library IX6Lib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_IX6Lib; + +EXTERN_C const CLSID CLSID_IXL6; + +#ifdef __cplusplus + +class DECLSPEC_UUID("DBAE610E-A64E-11D3-8E30-00504E02C39D") +IXL6; +#endif +#endif /* __IX6Lib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long __RPC_FAR *, unsigned long , LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +void __RPC_USER LPSAFEARRAY_UserFree( unsigned long __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Signal/IX6/IX6.idl b/Signal/IX6/IX6.idl new file mode 100644 index 0000000..d4782e3 --- /dev/null +++ b/Signal/IX6/IX6.idl @@ -0,0 +1,43 @@ +// IX6.idl : IDL source for IX6.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (IX6.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + [ + object, + uuid(DBAE610D-A64E-11D3-8E30-00504E02C39D), + dual, + helpstring("IIXL6 Interface"), + pointer_default(unique) + ] + interface IIXL6 : IDispatch + { + [id(1), helpstring("method OnNet")] HRESULT OnNet([in]double T, [in]long N); + [id(2), helpstring("method OnSignalC")] HRESULT OnSignalC([in]double Ag, [in]double Tog, [in]double Sg); + [id(3), helpstring("method OnDirect")] HRESULT OnDirect([in] double AgP, [in] double ToP, [in] double SgP); + [id(4), helpstring("method OnBack")] HRESULT OnBack(); + [id(5), helpstring("method FetchResults")] HRESULT FetchResults( [out]SAFEARRAY(double)* arrRes ); + }; + +[ + uuid(DBAE6101-A64E-11D3-8E30-00504E02C39D), + version(1.0), + helpstring("IX6 1.0 Type Library") +] +library IX6Lib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(DBAE610E-A64E-11D3-8E30-00504E02C39D), + helpstring("IXL6 Class") + ] + coclass IXL6 + { + [default] interface IIXL6; + }; +}; diff --git a/Signal/IX6/IX6.rc b/Signal/IX6/IX6.rc new file mode 100644 index 0000000..167ed9d --- /dev/null +++ b/Signal/IX6/IX6.rc @@ -0,0 +1,136 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#ifdef _WIN32 +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_IXL6 REGISTRY DISCARDABLE "IXL6.rgs" +#endif // Russian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""IX6.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "IX6 Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "IX6\0" + VALUE "LegalCopyright", "Copyright 1999\0" + VALUE "OriginalFilename", "IX6.DLL\0" + VALUE "ProductName", "IX6 Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "OLESelfRegister", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "IX6" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "IX6.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Signal/IX6/IX6ps.def b/Signal/IX6/IX6ps.def new file mode 100644 index 0000000..010fea2 --- /dev/null +++ b/Signal/IX6/IX6ps.def @@ -0,0 +1,11 @@ + +LIBRARY "IX6PS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/Signal/IX6/IX6ps.mk b/Signal/IX6/IX6ps.mk new file mode 100644 index 0000000..04d38b3 --- /dev/null +++ b/Signal/IX6/IX6ps.mk @@ -0,0 +1,16 @@ + +IX6ps.dll: dlldata.obj IX6_p.obj IX6_i.obj + link /dll /out:IX6ps.dll /def:IX6ps.def /entry:DllMain dlldata.obj IX6_p.obj IX6_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del IX6ps.dll + @del IX6ps.lib + @del IX6ps.exp + @del dlldata.obj + @del IX6_p.obj + @del IX6_i.obj diff --git a/Signal/IX6/IXL6.cpp b/Signal/IX6/IXL6.cpp new file mode 100644 index 0000000..b492a1c --- /dev/null +++ b/Signal/IX6/IXL6.cpp @@ -0,0 +1,92 @@ +// IXL6.cpp : Implementation of CIXL6 +#include "stdafx.h" +#include "IX6.h" +#include "IXL6.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL6 + +STDMETHODIMP CIXL6::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_IIXL6 + }; + for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) + { + if (InlineIsEqualGUID(*arr[i],riid)) + return S_OK; + } + return S_FALSE; +} + +STDMETHODIMP CIXL6::OnNet(double T, long N) +{ + if( !m_doc.ReInit(T, N) ) + { + Error( L"Cann't ReInit", 0, NULL, IID_IIXL6, E_FAIL ); + return E_FAIL; + } + + return S_OK; +} + +STDMETHODIMP CIXL6::OnSignalC(double Ag, double Tog, double Sg) +{ + m_doc.Ag = Ag; + m_doc.Tog = Tog; + m_doc.Sg = Sg; + + m_doc.SignalC(); + + return S_OK; +} + +STDMETHODIMP CIXL6::OnDirect(double AgP, double ToP, double SgP) +{ + m_doc.Direct( AgP, ToP, SgP ); + + return S_OK; +} + +STDMETHODIMP CIXL6::OnBack() +{ + m_doc.Reverse(); + + return S_OK; +} +// +STDMETHODIMP CIXL6::FetchResults( SAFEARRAY** arrRes ) + { + if( m_doc.SView < 1 ) return E_FAIL; + if( !arrRes ) return E_POINTER; + + + SAFEARRAYBOUND bnd = { 3 * m_doc.SView, 0 }; + *arrRes = SafeArrayCreate( VT_R8, 1, &bnd ); + + if( !arrRes ) + { + Error( L"Cann't array allocate", 0, NULL, IID_IIXL6, E_FAIL ); + return E_FAIL; + } + + double* pDta; + HRESULT hr = SafeArrayAccessData( *arrRes, (void**)&pDta ); + if( FAILED(hr) ) + { + SafeArrayDestroy( *arrRes ); + *arrRes = NULL; + Error( L"Cann't array allocate", 0, NULL, IID_IIXL6, hr ); + return E_FAIL; + } + + double *x = m_doc.XView, *y = m_doc.YexView, + *y2 = m_doc.YapView; + for( int i = 0; i < m_doc.SView; ++i, ++x, ++y, ++y2 ) + *pDta++ = *x, *pDta++ = *y, *pDta++ = *y2; + + SafeArrayUnaccessData( *arrRes ); + + return S_OK; + } diff --git a/Signal/IX6/IXL6.h b/Signal/IX6/IXL6.h new file mode 100644 index 0000000..c0cee08 --- /dev/null +++ b/Signal/IX6/IXL6.h @@ -0,0 +1,48 @@ +// IXL6.h : Declaration of the CIXL6 + +#ifndef __IXL6_H_ +#define __IXL6_H_ + +#include "resource.h" // main symbols +#include "NewDoc.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL6 +class ATL_NO_VTABLE CIXL6 : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl +{ +public: + CIXL6() + { + } + +DECLARE_REGISTRY_RESOURCEID(IDR_IXL6) +DECLARE_NOT_AGGREGATABLE(CIXL6) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CIXL6) + COM_INTERFACE_ENTRY(IIXL6) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// IIXL6 +public: + STDMETHOD(FetchResults)( SAFEARRAY** arrRes ); + STDMETHOD(OnBack)(); + STDMETHOD(OnDirect)(/*[in]*/ double AgP, /*[in]*/ double ToP, /*[in]*/ double SgP); + STDMETHOD(OnSignalC)(/*[in]*/double Ag, /*[in]*/double Tog, /*[in]*/double Sg); + STDMETHOD(OnNet)(/*[in]*/double T, /*[in]*/long N); + +private: + CNewDoc m_doc; +}; + +#endif //__IXL6_H_ diff --git a/Signal/IX6/IXL6.rgs b/Signal/IX6/IXL6.rgs new file mode 100644 index 0000000..e0bf7a8 --- /dev/null +++ b/Signal/IX6/IXL6.rgs @@ -0,0 +1,26 @@ +HKCR +{ + IX6.IXL6.1 = s 'IXL6 Class' + { + CLSID = s '{DBAE610E-A64E-11D3-8E30-00504E02C39D}' + } + IX6.IXL6 = s 'IXL6 Class' + { + CLSID = s '{DBAE610E-A64E-11D3-8E30-00504E02C39D}' + CurVer = s 'IX6.IXL6.1' + } + NoRemove CLSID + { + ForceRemove {DBAE610E-A64E-11D3-8E30-00504E02C39D} = s 'IXL6 Class' + { + ProgID = s 'IX6.IXL6.1' + VersionIndependentProgID = s 'IX6.IXL6' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{DBAE6101-A64E-11D3-8E30-00504E02C39D}' + } + } +} diff --git a/Signal/IX6/MODEL/math_00.cpp b/Signal/IX6/MODEL/math_00.cpp new file mode 100644 index 0000000..ad798da --- /dev/null +++ b/Signal/IX6/MODEL/math_00.cpp @@ -0,0 +1,57 @@ +#include "StdAfx.h" +#include "Math_00.h" + +int CNet::ReLoad( int size ) +{ + if( Size ) + delete[] Data; + + if( ( Data = new double [ Size = size ] ) == NULL ) + return 0; + + return 1; +} + +int CNet::ReCalc( double a, double b, double step ) +{ + int Size = ( int ) ( ( b - a ) / step ) + 1; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( double w, double step ) +{ + int Size = ( int ) ( w / step ) + 1; + double a = -w / 2.0; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( int n, double step ) +{ + if( ReLoad( n ) ) + { + for( int i = 0 ; i < n ; i++ ) + Data[i] = i * step; + + return 1; + } + + return 0; +} \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_00.h b/Signal/IX6/MODEL/math_00.h new file mode 100644 index 0000000..53cc4b9 --- /dev/null +++ b/Signal/IX6/MODEL/math_00.h @@ -0,0 +1,26 @@ +#ifndef _CNet_H_ + + #define _CNet_H_ + + class CNet + { + public: + CNet() : Data( NULL ), Size( 0 ) + { + } + ~CNet() + { + if( Size ) + delete[] Data; + } + + double *Data; + int Size; + + int ReLoad( int size ); + int ReCalc( double a, double b, double step ); + int ReCalc( double w, double step ); + int ReCalc( int n, double step ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_01.cpp b/Signal/IX6/MODEL/math_01.cpp new file mode 100644 index 0000000..2833808 --- /dev/null +++ b/Signal/IX6/MODEL/math_01.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_01.h" + +int CImpulse::Delta( double t ) +{ + if( To == t ) + return 1; + + return 0; +} + +double CImpulse::Value( double t ) +{ + return A * Delta( t ); +} \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_01.h b/Signal/IX6/MODEL/math_01.h new file mode 100644 index 0000000..04d9512 --- /dev/null +++ b/Signal/IX6/MODEL/math_01.h @@ -0,0 +1,20 @@ +#ifndef _CImpulse_H_ + + #define _CInpulse_H_ + + class CImpulse + { + double A; + double To; + + int Delta( double t ); + + public: + CImpulse( double a, double to ) : A( a ), To( to ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_02.cpp b/Signal/IX6/MODEL/math_02.cpp new file mode 100644 index 0000000..d72e505 --- /dev/null +++ b/Signal/IX6/MODEL/math_02.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_02.h" + +int CStep:: Rect( double t ) +{ + if( 0.0 <= t && t <= 1.0 ) + return 1; + + return 0; +} + +double CStep::Value( double t ) +{ + return A * Rect( ( t - T ) / T ); +} \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_02.h b/Signal/IX6/MODEL/math_02.h new file mode 100644 index 0000000..a77ade6 --- /dev/null +++ b/Signal/IX6/MODEL/math_02.h @@ -0,0 +1,20 @@ +#ifndef _CStep_H_ + + #define _CStep_H_ + + class CStep + { + double A; + double T; + + int Rect( double t ); + + public: + CStep( double a, double t ) : A( a ), T( t ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_03.cpp b/Signal/IX6/MODEL/math_03.cpp new file mode 100644 index 0000000..c7f105c --- /dev/null +++ b/Signal/IX6/MODEL/math_03.cpp @@ -0,0 +1,7 @@ +#include "StdAfx.h" +#include "Math_03.h" + +double CGauss::Value( double t ) +{ + return A * exp( -( t - To ) * ( t - To ) / S ); +} \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_03.h b/Signal/IX6/MODEL/math_03.h new file mode 100644 index 0000000..8c66d2f --- /dev/null +++ b/Signal/IX6/MODEL/math_03.h @@ -0,0 +1,21 @@ +#ifndef _CGauss_H_ + + #define _CGauss_H_ + + #include + + class CGauss + { + double A; + double To; + double S; + + public: + CGauss( double a, double to, double s ) : A( a ), To( to ), S( s ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_04.cpp b/Signal/IX6/MODEL/math_04.cpp new file mode 100644 index 0000000..19e9818 --- /dev/null +++ b/Signal/IX6/MODEL/math_04.cpp @@ -0,0 +1,150 @@ +#include "StdAfx.h" +#include "Math_04.h" + +void CFure::Direct ( DComplex *U, DComplex *Uf ) +{ + double Pow = 2.0 * PI / N; + + for( int k = 0 ; k < N ; k++ ) + { + Uf[k] = 0.0; + + for( int l = 0 ; l < N ; l++ ) + { + Uf[k] += U[l] * exp( -DComplex( 0.0, Pow * k * l ) ); + } + + Uf[k] *= ( T / N ); + } +} + +void CFure::Reverse( DComplex *Uf, DComplex *U ) +{ + double Pow = 2.0 * PI / N; + + for( int l = 0 ; l < N ; l++ ) + { + U[l] = 0.0; + + for( int k = 0 ; k < N ; k++ ) + { + U[l] += Uf[k] * exp( DComplex( 0.0, Pow * l * k ) ); + } + + // на N уже делили ! ( см. Direct ) + U[l] /= T; + } +} + +// от Филиппова... + +int CFure::st( int n, int np ) +{ + int m = 1, i; + + for( i = 1 ; i <= np ; i++ ) + m = m * n; + + return m; +} + +void CFure::Fft( DComplex *x, int sign, int np, double t ) +{ + int msk[19]; + double cs[2]; + DComplex cxcs, xa, hold; + int nmax, i, j, nn, mm, lr, nw, nw1, ii, ij, loc, ll; + double zz, pi, delta, w; + + pi = PI; + nmax = st( 2, np ); + zz = 2.0 * pi * sign / nmax; + delta = t / nmax; + + if( sign < 0.0 ) + delta = 1.0 / t; + + msk[0] = nmax / 2; + + for( i = 1 ; i < np ; i++ ) + msk[i] = msk[i-1] / 2; + + nn = nmax; + mm = 2; + + for( lr = 1 ; lr <= np ; lr++ ) + { + nn = nn / 2; + nw = 0; + + for( i = 1 ; i <= mm ; i +=2 ) + { + ii = nn * i; + w = nw * zz; + cs[0] = cos( w ); + cs[1] = sin( w ); + + cxcs = DComplex( cs[0], cs[1] ); + + for( j = 1 ; j <= nn ; j++ ) + { + ii = ii + 1; + ij = ii - nn; + + xa = cxcs * x[ii-1]; + x[ii-1] = x[ij-1] - xa; + x[ij-1] = x[ij-1] + xa; + } + + for( loc = 2 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw = ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } + + mm = 2 * mm; + } + + nw = 0; + + for( i = 1 ; i <= nmax ; i++ ) + { + nw1 = nw + 1; + hold = x[nw1 - 1]; + + if( nw1 - i > 0 ) + { + x[nw1-1] = DComplex( real( x[i-1] ) * delta, imag( x[i-1] ) * delta ); + } + + if( nw1 - i >= 0 ) + { + x[i-1] = DComplex( real( hold ) * delta, imag( hold ) * delta ); + } + + for( loc = 1 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw=ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } +} \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_04.h b/Signal/IX6/MODEL/math_04.h new file mode 100644 index 0000000..f1ecb27 --- /dev/null +++ b/Signal/IX6/MODEL/math_04.h @@ -0,0 +1,39 @@ +#ifndef _CFure_H_ + + #define _CFure_H_ + + #include +using namespace std; + #define PI 3.14159265358979323846 + + typedef complex DComplex; + + class CFure + { + // ... + double T; + int N; + + int st( int n, int np ); + + public: + CFure() + { + memset( this, 0, sizeof( CFure ) ); + } + CFure( double t, int n ) : T( t ), N( n ) + { + } + + void ReInit( double T, int N ) + { + this -> T = T; + this -> N = N; + } + + void Direct( DComplex *U, DComplex *Uf ); + void Reverse( DComplex *Uf, DComplex *U ); + void Fft( DComplex *X, int Sign, int Np, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_06.cpp b/Signal/IX6/MODEL/math_06.cpp new file mode 100644 index 0000000..2c8c70c --- /dev/null +++ b/Signal/IX6/MODEL/math_06.cpp @@ -0,0 +1,64 @@ +#include "StdAfx.h" +#include "Math_06.h" + +// возвращает амплитуду сигнала +double CMix:: FindA( DComplex *U, int Size ) +{ + double A = abs( U[0] ); + + for( int i = 1 ; i < Size ; i++ ) + { + if( A < abs( U[i] ) ) + A = abs( U[i] ); + } + + return A; +} + +// расчитывает массив случайных величин Ksi +void CMix:: CalcKsi( DComplex *Ksi, int Size, double A ) +{ + for( int i = 0 ; i < Size ; i++ ) + { + Ksi[i] = DComplex( A * Rand(), A * Rand() ); + } +} + +// расчитывает массив величин Eta ( энерге- +// тический спектр "прошит" ) +void CMix:: CalcEta( DComplex *Eta, int Size, DComplex *Ksi, double T ) +{ + double Sqrt = 1.0 / sqrt( ( double ) Size ), stepF = 1.0 / T, Arg = 2.0 * PI / Size; + CGauss Gauss( Ag, To, Sg ); + + for( int l = 0 ; l < Size ; l++ ) + { + Eta[l] = 0.0; + + for( int k = 0 ; k < Size ; k++ ) + { + Eta[l] += Ksi[k] * exp( DComplex( 0.0, Arg * k * l ) ) * Gauss.Value( k * stepF ); + } + + Eta[l] *= Sqrt; + } +} + +// расчитывает помеху Eta и вносит ее в сигнал U +void CMix:: Mix( DComplex *U, int N, DComplex *Eta, double T ) +{ + DComplex *Ksi = new DComplex [N]; + + if( Ksi && Eta ) + { + CalcKsi( Ksi, N, FindA( U, N ) ); + CalcEta( Eta, N, Ksi, T ); + + for( int i = 0 ; i < N ; i++ ) + U[i] += ( Eta[i] = real( Eta[i] ) ); + } + + delete[] Ksi; +} + + diff --git a/Signal/IX6/MODEL/math_06.h b/Signal/IX6/MODEL/math_06.h new file mode 100644 index 0000000..1bbc673 --- /dev/null +++ b/Signal/IX6/MODEL/math_06.h @@ -0,0 +1,43 @@ +#ifndef _CMix_H_ + + #define _CMix_H_ + + #include + #include + #include "Math_03.h" + #include "Math_04.h" + + class CMix + { + // ... + CFure Fure; + // ... + double Ag; + double To; + double Sg; + + // случайное число в диапазоне [ 0.0; 1.0 ) + double Rand() + { + return ( double ) rand() / RAND_MAX; + } + + // возвращает амплитуду сигнала + double FindA( DComplex *U, int Size ); + + // расчитывает массив случайных величин Ksi + void CalcKsi( DComplex *Ksi, int Size, double A ); + // расчитывает массив величин Eta ( энерге- + // тический спектр "прошит" ) + void CalcEta( DComplex *Eta, int Size, DComplex *Ksi, double T ); + + public: + CMix( double a, double t, double s ) : Ag( a ), To( t ), Sg( s ) + { + } + + // вносит в сигнал U помехи + void Mix( DComplex *U, int N, DComplex *Eta, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_07.cpp b/Signal/IX6/MODEL/math_07.cpp new file mode 100644 index 0000000..b61b11a --- /dev/null +++ b/Signal/IX6/MODEL/math_07.cpp @@ -0,0 +1,31 @@ +#include "StdAfx.h" +#include "Math_07.h" + +// возвращает степень, в которую нужно вознести 2 чтобы получить N +int CFilter::GetPower( int N ) +{ + int n = 2, i = 1; + + while( n < N ) + { + n *= 2; + i += 1; + } + + return i; +} + +void CFilter:: Filter( DComplex *U, int N, DComplex *FEta, double T ) +{ + Fure.Fft( U, 1, GetPower( N ), T ); + + for( int i = 0 ; i < N ; i++ ) + { + DComplex Betta2 = abs( U[i] ) * abs( U[i] ); + DComplex Cappa2 = abs( FEta[i] ) * abs( FEta[i] ); + + U[i] = ( Betta2 - Cappa2 ) / Betta2 * U[i]; + } + + Fure.Fft( U, -1, GetPower( N ), T ); +} \ No newline at end of file diff --git a/Signal/IX6/MODEL/math_07.h b/Signal/IX6/MODEL/math_07.h new file mode 100644 index 0000000..43e99c1 --- /dev/null +++ b/Signal/IX6/MODEL/math_07.h @@ -0,0 +1,24 @@ +#ifndef _CFilter_H_ + + #define _CFilter_H_ + + #include + #include "Math_03.h" + #include "Math_04.h" + + class CFilter + { + // ... + CFure Fure; + + int GetPower( int N ); + + public: + CFilter() + { + } + + void Filter( DComplex *U, int N, DComplex *FEta, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX6/NEWDOC.CPP b/Signal/IX6/NEWDOC.CPP new file mode 100644 index 0000000..8e3ee1e --- /dev/null +++ b/Signal/IX6/NEWDOC.CPP @@ -0,0 +1,250 @@ +#include "StdAfx.h" +#include "NewDoc.h" + + +CNewDoc:: CNewDoc() +{ + T = 0.0; + N = 0; + + Ai = 5.0; + Toi = 5.0; + + As = 1.0; + Ts = 2.0; + + Ag = 5.0; + Tog = 5.0; + Sg = 5.0; + + U = NULL; + Eta = NULL; + V = NULL; + E = NULL; + + YexView = NULL; + YapView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + ReInit( 6.0, 128 ); +} + +CNewDoc::~CNewDoc() +{ + if( U ) + delete[] U; + if( Eta ) + delete[] Eta; + if( V ) + delete[] V; + if( E ) + delete[] E; +} + + +int CNewDoc::Allocate( DComplex **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new DComplex [Size] ) == NULL ) + return 0; + + return 1; +} + +int CNewDoc::Allocate( double **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new double [Size] ) == NULL ) + return 0; + + return 1; +} + +void CNewDoc::Convert( DComplex *Src, double *Des, int What ) +{ + int i, HalfSize = N / 2, Delta = HalfSize; + + for( i = 0 ; i < N ; i++ ) + //Des[i] = abs( Src[i] ) * abs( Src[i] ); + Des[i] = abs( Src[i] ); + + // перестановка нужна, т.к. спектр получаем шиворот-навыворот + if( What ) + { + if( N % 2 ) + Delta++; + + for( i = 0 ; i < HalfSize ; i++ ) + { + double Tmp = Des[i+Delta]; + + Des[i+Delta] = Des[i]; + Des[i] = Tmp; + } + } +} + +// возвращает степень, в которую нужно вознести 2 чтобы получить N +int CNewDoc::GetPower( int N ) +{ + int n = 2, i = 1; + + while( n < N ) + { + n *= 2; + i += 1; + } + + return i; +} + +int CNewDoc::ReInit( double t, int n ) +{ + YexView = NULL; + YapView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + if( t < 0.0 || n < 0 ) + return 0; + + if( T != t || N != n ) + { + T = t; + N = n; + + Fure.ReInit( T, N ); + + if( !Xu.ReCalc( N, T / N ) ) + return 0; + + if( !Allocate( &U, N ) ) + return 0; + if( !Allocate( &Eta, N ) ) + return 0; + if( !Allocate( &V, N ) ) + return 0; + if( !Allocate( &E, N ) ) + return 0; + } + + return 1; +} + +void CNewDoc::SignalA( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + /* + CImpulse Impulse( Ai, Toi ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + { + U[i] = Uq[i] = DComplex( Impulse.Value( Xu.Data[i] ), 0.0 ); + } + */ +} + +void CNewDoc::SignalB( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + /* + CStep Step( As, Ts ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + U[i] = DComplex( Step.Value( Xu.Data[i] ), 0.0 ); + */ +} + +void CNewDoc::SignalC( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + /* + CGauss Gauss( Ag, Tog, Sg ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + U[i] = DComplex( Gauss.Value( Xu.Data[i] ), 0.0 ); + */ +} + +void CNewDoc::Direct( double ag, double to, double sg ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + CGauss Gauss( Ag, Tog, Sg ); + CMix Mix( ag, to, sg ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + U[i] = DComplex( Gauss.Value( Xu.Data[i] ), 0.0 ); + + Mix.Mix( U, N, Eta, T ); + + Convert( U, V, 0 ); + Convert( Eta, E, 0 ); + + strcpy( NCalc, "Сигнал с помехой ( график помехи зеленый )." ); + + XView = Xu.Data; + YexView = V; + YapView = E; + SView = Xu.Size; + NView = NCalc; +} + +void CNewDoc::Reverse( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + // фильтрация + CFilter Filter; + + // получим спектр помехи + Fure .Fft ( Eta, 1, GetPower( N ), T ); + Filter.Filter( U, N, Eta, T ); + + // расчет "настоящего" сигнала + CGauss Gauss( Ag, Tog, Sg ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + Eta[i] = DComplex( Gauss.Value( Xu.Data[i] ), 0.0 ); + + Convert( U, V, 0 ); + Convert( Eta, E, 0 ); + + strcpy( NCalc, "Отфильтрованный сигнал ( точный сигнал зеленый )." ); + + XView = Xu.Data; + YexView = V; + YapView = E; + SView = Xu.Size; + NView = NCalc; +} \ No newline at end of file diff --git a/Signal/IX6/NEWDOC.H b/Signal/IX6/NEWDOC.H new file mode 100644 index 0000000..d9d9edc --- /dev/null +++ b/Signal/IX6/NEWDOC.H @@ -0,0 +1,71 @@ +#ifndef _CNewDoc_H_ + + #define _CNewDoc_H_ + + #include "Model\math_00.h" + #include "Model\math_01.h" + #include "Model\math_02.h" + #include "Model\math_03.h" + #include "Model\math_04.h" + #include "Model\math_06.h" + #include "Model\math_07.h" + + #define L 100 + + class CNewDoc + { + + // ... + CFure Fure; + // ... + CNet Xu; + DComplex *U; + DComplex *Eta; + // ... + double *V; + double *E; + // ... + char NCalc[L]; + + int Allocate( DComplex **Des, int Size ); + int Allocate( double **Des, int Size ); + void Convert( DComplex *Src, double *Des, int What ); + int GetPower( int N ); + + public: + CNewDoc(); + ~CNewDoc(); + + // ... + double T; + int N; + // ... + double Ai; + double Toi; + // ... + double As; + double Ts; + // ... + double Ag; + double Tog; + double Sg; + + // ... + double *XView; + double *YexView; + double *YapView; + int SView; + // ... + char *NView; + + int ReInit( double t, int n ); + + void SignalA( void ); + void SignalB( void ); + void SignalC( void ); + void Direct ( double ag, double to, double sg ); + void Reverse( void ); + + }; + +#endif \ No newline at end of file diff --git a/Signal/IX6/StdAfx.cpp b/Signal/IX6/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/Signal/IX6/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/Signal/IX6/StdAfx.h b/Signal/IX6/StdAfx.h new file mode 100644 index 0000000..f0f2c7f --- /dev/null +++ b/Signal/IX6/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#if !defined(AFX_STDAFX_H__DBAE6104_A64E_11D3_8E30_00504E02C39D__INCLUDED_) +#define AFX_STDAFX_H__DBAE6104_A64E_11D3_8E30_00504E02C39D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0400 +#endif +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__DBAE6104_A64E_11D3_8E30_00504E02C39D__INCLUDED) diff --git a/Signal/IX6/resource.h b/Signal/IX6/resource.h new file mode 100644 index 0000000..5b02f92 --- /dev/null +++ b/Signal/IX6/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by IX6.rc +// +#define IDS_PROJNAME 100 +#define IDR_IXL6 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/Signal/IX7/IX7.cpp b/Signal/IX7/IX7.cpp new file mode 100644 index 0000000..b2bc4e3 --- /dev/null +++ b/Signal/IX7/IX7.cpp @@ -0,0 +1,72 @@ +// IX7.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f IX7ps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "IX7.h" + +#include "IX7_i.c" +#include "IXL7.h" + + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) +OBJECT_ENTRY(CLSID_IXL7, CIXL7) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_IX7Lib); + DisableThreadLibraryCalls(hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + _Module.Term(); + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + return _Module.UnregisterServer(TRUE); +} + + diff --git a/Signal/IX7/IX7.def b/Signal/IX7/IX7.def new file mode 100644 index 0000000..bad963a --- /dev/null +++ b/Signal/IX7/IX7.def @@ -0,0 +1,9 @@ +; IX7.def : Declares the module parameters. + +LIBRARY "IX7.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/Signal/IX7/IX7.dsp b/Signal/IX7/IX7.dsp new file mode 100644 index 0000000..1675691 --- /dev/null +++ b/Signal/IX7/IX7.dsp @@ -0,0 +1,395 @@ +# Microsoft Developer Studio Project File - Name="IX7" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=IX7 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "IX7.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "IX7.mak" CFG="IX7 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "IX7 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX7 - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX7 - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX7 - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX7 - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX7 - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "IX7 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=.\Debug\IX7.dll +InputPath=.\Debug\IX7.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX7 - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=.\DebugU\IX7.dll +InputPath=.\DebugU\IX7.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX7 - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=.\ReleaseMinSize\IX7.dll +InputPath=.\ReleaseMinSize\IX7.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX7 - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=.\ReleaseMinDependency\IX7.dll +InputPath=.\ReleaseMinDependency\IX7.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX7 - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=.\ReleaseUMinSize\IX7.dll +InputPath=.\ReleaseUMinSize\IX7.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX7 - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\IX7.dll +InputPath=.\ReleaseUMinDependency\IX7.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "IX7 - Win32 Debug" +# Name "IX7 - Win32 Unicode Debug" +# Name "IX7 - Win32 Release MinSize" +# Name "IX7 - Win32 Release MinDependency" +# Name "IX7 - Win32 Unicode Release MinSize" +# Name "IX7 - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\IX7.cpp +# End Source File +# Begin Source File + +SOURCE=.\IX7.def +# End Source File +# Begin Source File + +SOURCE=.\IX7.idl +# ADD MTL /tlb ".\IX7.tlb" /h "IX7.h" /iid "IX7_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\IX7.rc +# End Source File +# Begin Source File + +SOURCE=.\IXL7.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_04.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_06.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_07.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_08.cpp +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.CPP +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\IXL7.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_04.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_06.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_07.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_08.h +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.H +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\IXL7.rgs +# End Source File +# End Group +# End Target +# End Project diff --git a/Signal/IX7/IX7.dsw b/Signal/IX7/IX7.dsw new file mode 100644 index 0000000..02a4e97 --- /dev/null +++ b/Signal/IX7/IX7.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "IX7"=.\IX7.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Signal/IX7/IX7.h b/Signal/IX7/IX7.h new file mode 100644 index 0000000..b0c18b6 --- /dev/null +++ b/Signal/IX7/IX7.h @@ -0,0 +1,360 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Dec 01 20:33:15 1999 + */ +/* Compiler settings for G:\WORK\Signal\IX7\IX7.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __IX7_h__ +#define __IX7_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __IIXL7_FWD_DEFINED__ +#define __IIXL7_FWD_DEFINED__ +typedef interface IIXL7 IIXL7; +#endif /* __IIXL7_FWD_DEFINED__ */ + + +#ifndef __IXL7_FWD_DEFINED__ +#define __IXL7_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class IXL7 IXL7; +#else +typedef struct IXL7 IXL7; +#endif /* __cplusplus */ + +#endif /* __IXL7_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +#ifndef __IIXL7_INTERFACE_DEFINED__ +#define __IIXL7_INTERFACE_DEFINED__ + +/* interface IIXL7 */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IIXL7; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8E5CF670-A702-11D3-8E33-00504E02C39D") + IIXL7 : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNet( + /* [in] */ double T, + /* [in] */ long N) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnSignalB( + /* [in] */ double Ag2, + /* [in] */ double Tog2, + /* [in] */ double Sg2) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnSignalC( + /* [in] */ double Ag1, + /* [in] */ double Tog1, + /* [in] */ double Sg1) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDirect( + /* [in] */ double alpha, + /* [in] */ double step) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnBack( + /* [in] */ double alpha, + /* [in] */ double step) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Fetch( + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes) = 0; + + }; + +#else /* C style interface */ + + typedef struct IIXL7Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IIXL7 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IIXL7 __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IIXL7 __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + IIXL7 __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + IIXL7 __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + IIXL7 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + IIXL7 __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnNet )( + IIXL7 __RPC_FAR * This, + /* [in] */ double T, + /* [in] */ long N); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnSignalB )( + IIXL7 __RPC_FAR * This, + /* [in] */ double Ag2, + /* [in] */ double Tog2, + /* [in] */ double Sg2); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnSignalC )( + IIXL7 __RPC_FAR * This, + /* [in] */ double Ag1, + /* [in] */ double Tog1, + /* [in] */ double Sg1); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnDirect )( + IIXL7 __RPC_FAR * This, + /* [in] */ double alpha, + /* [in] */ double step); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnBack )( + IIXL7 __RPC_FAR * This, + /* [in] */ double alpha, + /* [in] */ double step); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Fetch )( + IIXL7 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + END_INTERFACE + } IIXL7Vtbl; + + interface IIXL7 + { + CONST_VTBL struct IIXL7Vtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IIXL7_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IIXL7_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IIXL7_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IIXL7_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IIXL7_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IIXL7_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IIXL7_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IIXL7_OnNet(This,T,N) \ + (This)->lpVtbl -> OnNet(This,T,N) + +#define IIXL7_OnSignalB(This,Ag2,Tog2,Sg2) \ + (This)->lpVtbl -> OnSignalB(This,Ag2,Tog2,Sg2) + +#define IIXL7_OnSignalC(This,Ag1,Tog1,Sg1) \ + (This)->lpVtbl -> OnSignalC(This,Ag1,Tog1,Sg1) + +#define IIXL7_OnDirect(This,alpha,step) \ + (This)->lpVtbl -> OnDirect(This,alpha,step) + +#define IIXL7_OnBack(This,alpha,step) \ + (This)->lpVtbl -> OnBack(This,alpha,step) + +#define IIXL7_Fetch(This,arrRes) \ + (This)->lpVtbl -> Fetch(This,arrRes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL7_OnNet_Proxy( + IIXL7 __RPC_FAR * This, + /* [in] */ double T, + /* [in] */ long N); + + +void __RPC_STUB IIXL7_OnNet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL7_OnSignalB_Proxy( + IIXL7 __RPC_FAR * This, + /* [in] */ double Ag2, + /* [in] */ double Tog2, + /* [in] */ double Sg2); + + +void __RPC_STUB IIXL7_OnSignalB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL7_OnSignalC_Proxy( + IIXL7 __RPC_FAR * This, + /* [in] */ double Ag1, + /* [in] */ double Tog1, + /* [in] */ double Sg1); + + +void __RPC_STUB IIXL7_OnSignalC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL7_OnDirect_Proxy( + IIXL7 __RPC_FAR * This, + /* [in] */ double alpha, + /* [in] */ double step); + + +void __RPC_STUB IIXL7_OnDirect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL7_OnBack_Proxy( + IIXL7 __RPC_FAR * This, + /* [in] */ double alpha, + /* [in] */ double step); + + +void __RPC_STUB IIXL7_OnBack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL7_Fetch_Proxy( + IIXL7 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + +void __RPC_STUB IIXL7_Fetch_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IIXL7_INTERFACE_DEFINED__ */ + + + +#ifndef __IX7Lib_LIBRARY_DEFINED__ +#define __IX7Lib_LIBRARY_DEFINED__ + +/* library IX7Lib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_IX7Lib; + +EXTERN_C const CLSID CLSID_IXL7; + +#ifdef __cplusplus + +class DECLSPEC_UUID("8E5CF671-A702-11D3-8E33-00504E02C39D") +IXL7; +#endif +#endif /* __IX7Lib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long __RPC_FAR *, unsigned long , LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +void __RPC_USER LPSAFEARRAY_UserFree( unsigned long __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Signal/IX7/IX7.idl b/Signal/IX7/IX7.idl new file mode 100644 index 0000000..0ce5ff9 --- /dev/null +++ b/Signal/IX7/IX7.idl @@ -0,0 +1,44 @@ +// IX7.idl : IDL source for IX7.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (IX7.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + [ + object, + uuid(8E5CF670-A702-11D3-8E33-00504E02C39D), + dual, + helpstring("IIXL7 Interface"), + pointer_default(unique) + ] + interface IIXL7 : IDispatch + { + [id(1), helpstring("method OnNet")] HRESULT OnNet([in]double T, [in]long N); + [id(2), helpstring("method OnSignalB")] HRESULT OnSignalB([in]double Ag2, [in]double Tog2, [in]double Sg2); + [id(3), helpstring("method OnSignalC")] HRESULT OnSignalC([in]double Ag1, [in]double Tog1, [in]double Sg1); + [id(4), helpstring("method OnDirect")] HRESULT OnDirect([in]double alpha, [in]double step); + [id(5), helpstring("method OnBack")] HRESULT OnBack([in]double alpha, [in]double step); + [id(6), helpstring("method Fetch")] HRESULT Fetch( [out]SAFEARRAY(double)* arrRes ); + }; + +[ + uuid(8E5CF664-A702-11D3-8E33-00504E02C39D), + version(1.0), + helpstring("IX7 1.0 Type Library") +] +library IX7Lib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(8E5CF671-A702-11D3-8E33-00504E02C39D), + helpstring("IXL7 Class") + ] + coclass IXL7 + { + [default] interface IIXL7; + }; +}; diff --git a/Signal/IX7/IX7.rc b/Signal/IX7/IX7.rc new file mode 100644 index 0000000..95504d2 --- /dev/null +++ b/Signal/IX7/IX7.rc @@ -0,0 +1,136 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#ifdef _WIN32 +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_IXL7 REGISTRY DISCARDABLE "IXL7.rgs" +#endif // Russian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""IX7.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "IX7 Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "IX7\0" + VALUE "LegalCopyright", "Copyright 1999\0" + VALUE "OriginalFilename", "IX7.DLL\0" + VALUE "ProductName", "IX7 Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "OLESelfRegister", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "IX7" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "IX7.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Signal/IX7/IX7ps.def b/Signal/IX7/IX7ps.def new file mode 100644 index 0000000..37380bc --- /dev/null +++ b/Signal/IX7/IX7ps.def @@ -0,0 +1,11 @@ + +LIBRARY "IX7PS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/Signal/IX7/IX7ps.mk b/Signal/IX7/IX7ps.mk new file mode 100644 index 0000000..5c01cdf --- /dev/null +++ b/Signal/IX7/IX7ps.mk @@ -0,0 +1,16 @@ + +IX7ps.dll: dlldata.obj IX7_p.obj IX7_i.obj + link /dll /out:IX7ps.dll /def:IX7ps.def /entry:DllMain dlldata.obj IX7_p.obj IX7_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del IX7ps.dll + @del IX7ps.lib + @del IX7ps.exp + @del dlldata.obj + @del IX7_p.obj + @del IX7_i.obj diff --git a/Signal/IX7/IXL7.cpp b/Signal/IX7/IXL7.cpp new file mode 100644 index 0000000..c408e48 --- /dev/null +++ b/Signal/IX7/IXL7.cpp @@ -0,0 +1,100 @@ +// IXL7.cpp : Implementation of CIXL7 +#include "stdafx.h" +#include "IX7.h" +#include "IXL7.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL7 + +STDMETHODIMP CIXL7::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_IIXL7 + }; + for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) + { + if (InlineIsEqualGUID(*arr[i],riid)) + return S_OK; + } + return S_FALSE; +} + +STDMETHODIMP CIXL7::OnNet(double T, long N) + { + if( !m_doc.ReInit(T, N) ) + { + Error( L"Cann't ReInit", 0, NULL, IID_IIXL7, E_FAIL ); + return E_FAIL; + } + + return S_OK; + } + +STDMETHODIMP CIXL7::OnSignalB(double Ag2, double Tog2, double Sg2) +{ + m_doc.Ag2 = Ag2; + m_doc.Tog2 = Tog2; + m_doc.Sg2 = Sg2; + + return S_OK; +} + +STDMETHODIMP CIXL7::OnSignalC(double Ag1, double Tog1, double Sg1) +{ + m_doc.Ag1 = Ag1; + m_doc.Tog1 = Tog1; + m_doc.Sg1 = Sg1; + + return S_OK; +} + +STDMETHODIMP CIXL7::OnDirect(double alpha, double step) +{ + m_doc.Direct( alpha, step ); + + return S_OK; +} + +STDMETHODIMP CIXL7::OnBack(double alpha, double step) +{ + m_doc.Alpha ( alpha, step ); + + return S_OK; +} + +STDMETHODIMP CIXL7::Fetch( SAFEARRAY** arrRes ) +{ + if( m_doc.SView < 1 ) return E_FAIL; + if( !arrRes ) return E_POINTER; + + + SAFEARRAYBOUND bnd = { 2 * m_doc.SView, 0 }; + *arrRes = SafeArrayCreate( VT_R8, 1, &bnd ); + + if( !arrRes ) + { + Error( L"Cann't array allocate", 0, NULL, IID_IIXL7, E_FAIL ); + return E_FAIL; + } + + double* pDta; + HRESULT hr = SafeArrayAccessData( *arrRes, (void**)&pDta ); + if( FAILED(hr) ) + { + SafeArrayDestroy( *arrRes ); + *arrRes = NULL; + Error( L"Cann't array allocate", 0, NULL, IID_IIXL7, hr ); + return E_FAIL; + } + + double *x = m_doc.XView, *y = m_doc.YexView; + + for( int i = 0; i < m_doc.SView; ++i, ++x, ++y ) + *pDta++ = *x, *pDta++ = *y; + + SafeArrayUnaccessData( *arrRes ); + + return S_OK; + +} diff --git a/Signal/IX7/IXL7.h b/Signal/IX7/IXL7.h new file mode 100644 index 0000000..140365b --- /dev/null +++ b/Signal/IX7/IXL7.h @@ -0,0 +1,49 @@ +// IXL7.h : Declaration of the CIXL7 + +#ifndef __IXL7_H_ +#define __IXL7_H_ + +#include "resource.h" // main symbols +#include "newdoc.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL7 +class ATL_NO_VTABLE CIXL7 : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl +{ +public: + CIXL7() + { + } + +DECLARE_REGISTRY_RESOURCEID(IDR_IXL7) +DECLARE_NOT_AGGREGATABLE(CIXL7) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CIXL7) + COM_INTERFACE_ENTRY(IIXL7) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// IIXL7 +public: + STDMETHOD(Fetch)( SAFEARRAY** arrRes ); + STDMETHOD(OnBack)(/*[in]*/double alpha, /*[in]*/double step); + STDMETHOD(OnDirect)(/*[in]*/double alpha, /*[in]*/double step); + STDMETHOD(OnSignalC)(/*[in]*/double Ag1, /*[in]*/double Tog1, /*[in]*/double Sg1); + STDMETHOD(OnSignalB)(/*[in]*/double Ag2, /*[in]*/double Tog2, /*[in]*/double Sg2); + STDMETHOD(OnNet)(/*[in]*/double T, /*[in]*/long N); + +private: + CNewDoc m_doc; +}; + +#endif //__IXL7_H_ diff --git a/Signal/IX7/IXL7.rgs b/Signal/IX7/IXL7.rgs new file mode 100644 index 0000000..2fd2c0c --- /dev/null +++ b/Signal/IX7/IXL7.rgs @@ -0,0 +1,26 @@ +HKCR +{ + IX7.IXL7.1 = s 'IXL7 Class' + { + CLSID = s '{8E5CF671-A702-11D3-8E33-00504E02C39D}' + } + IX7.IXL7 = s 'IXL7 Class' + { + CLSID = s '{8E5CF671-A702-11D3-8E33-00504E02C39D}' + CurVer = s 'IX7.IXL7.1' + } + NoRemove CLSID + { + ForceRemove {8E5CF671-A702-11D3-8E33-00504E02C39D} = s 'IXL7 Class' + { + ProgID = s 'IX7.IXL7.1' + VersionIndependentProgID = s 'IX7.IXL7' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{8E5CF664-A702-11D3-8E33-00504E02C39D}' + } + } +} diff --git a/Signal/IX7/MODEL/math_00.cpp b/Signal/IX7/MODEL/math_00.cpp new file mode 100644 index 0000000..ad798da --- /dev/null +++ b/Signal/IX7/MODEL/math_00.cpp @@ -0,0 +1,57 @@ +#include "StdAfx.h" +#include "Math_00.h" + +int CNet::ReLoad( int size ) +{ + if( Size ) + delete[] Data; + + if( ( Data = new double [ Size = size ] ) == NULL ) + return 0; + + return 1; +} + +int CNet::ReCalc( double a, double b, double step ) +{ + int Size = ( int ) ( ( b - a ) / step ) + 1; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( double w, double step ) +{ + int Size = ( int ) ( w / step ) + 1; + double a = -w / 2.0; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( int n, double step ) +{ + if( ReLoad( n ) ) + { + for( int i = 0 ; i < n ; i++ ) + Data[i] = i * step; + + return 1; + } + + return 0; +} \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_00.h b/Signal/IX7/MODEL/math_00.h new file mode 100644 index 0000000..53cc4b9 --- /dev/null +++ b/Signal/IX7/MODEL/math_00.h @@ -0,0 +1,26 @@ +#ifndef _CNet_H_ + + #define _CNet_H_ + + class CNet + { + public: + CNet() : Data( NULL ), Size( 0 ) + { + } + ~CNet() + { + if( Size ) + delete[] Data; + } + + double *Data; + int Size; + + int ReLoad( int size ); + int ReCalc( double a, double b, double step ); + int ReCalc( double w, double step ); + int ReCalc( int n, double step ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_01.cpp b/Signal/IX7/MODEL/math_01.cpp new file mode 100644 index 0000000..2833808 --- /dev/null +++ b/Signal/IX7/MODEL/math_01.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_01.h" + +int CImpulse::Delta( double t ) +{ + if( To == t ) + return 1; + + return 0; +} + +double CImpulse::Value( double t ) +{ + return A * Delta( t ); +} \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_01.h b/Signal/IX7/MODEL/math_01.h new file mode 100644 index 0000000..04d9512 --- /dev/null +++ b/Signal/IX7/MODEL/math_01.h @@ -0,0 +1,20 @@ +#ifndef _CImpulse_H_ + + #define _CInpulse_H_ + + class CImpulse + { + double A; + double To; + + int Delta( double t ); + + public: + CImpulse( double a, double to ) : A( a ), To( to ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_02.cpp b/Signal/IX7/MODEL/math_02.cpp new file mode 100644 index 0000000..d72e505 --- /dev/null +++ b/Signal/IX7/MODEL/math_02.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_02.h" + +int CStep:: Rect( double t ) +{ + if( 0.0 <= t && t <= 1.0 ) + return 1; + + return 0; +} + +double CStep::Value( double t ) +{ + return A * Rect( ( t - T ) / T ); +} \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_02.h b/Signal/IX7/MODEL/math_02.h new file mode 100644 index 0000000..a77ade6 --- /dev/null +++ b/Signal/IX7/MODEL/math_02.h @@ -0,0 +1,20 @@ +#ifndef _CStep_H_ + + #define _CStep_H_ + + class CStep + { + double A; + double T; + + int Rect( double t ); + + public: + CStep( double a, double t ) : A( a ), T( t ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_03.cpp b/Signal/IX7/MODEL/math_03.cpp new file mode 100644 index 0000000..c7f105c --- /dev/null +++ b/Signal/IX7/MODEL/math_03.cpp @@ -0,0 +1,7 @@ +#include "StdAfx.h" +#include "Math_03.h" + +double CGauss::Value( double t ) +{ + return A * exp( -( t - To ) * ( t - To ) / S ); +} \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_03.h b/Signal/IX7/MODEL/math_03.h new file mode 100644 index 0000000..8c66d2f --- /dev/null +++ b/Signal/IX7/MODEL/math_03.h @@ -0,0 +1,21 @@ +#ifndef _CGauss_H_ + + #define _CGauss_H_ + + #include + + class CGauss + { + double A; + double To; + double S; + + public: + CGauss( double a, double to, double s ) : A( a ), To( to ), S( s ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_04.cpp b/Signal/IX7/MODEL/math_04.cpp new file mode 100644 index 0000000..19e9818 --- /dev/null +++ b/Signal/IX7/MODEL/math_04.cpp @@ -0,0 +1,150 @@ +#include "StdAfx.h" +#include "Math_04.h" + +void CFure::Direct ( DComplex *U, DComplex *Uf ) +{ + double Pow = 2.0 * PI / N; + + for( int k = 0 ; k < N ; k++ ) + { + Uf[k] = 0.0; + + for( int l = 0 ; l < N ; l++ ) + { + Uf[k] += U[l] * exp( -DComplex( 0.0, Pow * k * l ) ); + } + + Uf[k] *= ( T / N ); + } +} + +void CFure::Reverse( DComplex *Uf, DComplex *U ) +{ + double Pow = 2.0 * PI / N; + + for( int l = 0 ; l < N ; l++ ) + { + U[l] = 0.0; + + for( int k = 0 ; k < N ; k++ ) + { + U[l] += Uf[k] * exp( DComplex( 0.0, Pow * l * k ) ); + } + + // на N уже делили ! ( см. Direct ) + U[l] /= T; + } +} + +// от Филиппова... + +int CFure::st( int n, int np ) +{ + int m = 1, i; + + for( i = 1 ; i <= np ; i++ ) + m = m * n; + + return m; +} + +void CFure::Fft( DComplex *x, int sign, int np, double t ) +{ + int msk[19]; + double cs[2]; + DComplex cxcs, xa, hold; + int nmax, i, j, nn, mm, lr, nw, nw1, ii, ij, loc, ll; + double zz, pi, delta, w; + + pi = PI; + nmax = st( 2, np ); + zz = 2.0 * pi * sign / nmax; + delta = t / nmax; + + if( sign < 0.0 ) + delta = 1.0 / t; + + msk[0] = nmax / 2; + + for( i = 1 ; i < np ; i++ ) + msk[i] = msk[i-1] / 2; + + nn = nmax; + mm = 2; + + for( lr = 1 ; lr <= np ; lr++ ) + { + nn = nn / 2; + nw = 0; + + for( i = 1 ; i <= mm ; i +=2 ) + { + ii = nn * i; + w = nw * zz; + cs[0] = cos( w ); + cs[1] = sin( w ); + + cxcs = DComplex( cs[0], cs[1] ); + + for( j = 1 ; j <= nn ; j++ ) + { + ii = ii + 1; + ij = ii - nn; + + xa = cxcs * x[ii-1]; + x[ii-1] = x[ij-1] - xa; + x[ij-1] = x[ij-1] + xa; + } + + for( loc = 2 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw = ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } + + mm = 2 * mm; + } + + nw = 0; + + for( i = 1 ; i <= nmax ; i++ ) + { + nw1 = nw + 1; + hold = x[nw1 - 1]; + + if( nw1 - i > 0 ) + { + x[nw1-1] = DComplex( real( x[i-1] ) * delta, imag( x[i-1] ) * delta ); + } + + if( nw1 - i >= 0 ) + { + x[i-1] = DComplex( real( hold ) * delta, imag( hold ) * delta ); + } + + for( loc = 1 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw=ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } +} \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_04.h b/Signal/IX7/MODEL/math_04.h new file mode 100644 index 0000000..8efa1e9 --- /dev/null +++ b/Signal/IX7/MODEL/math_04.h @@ -0,0 +1,40 @@ +#ifndef _CFure_H_ + + #define _CFure_H_ + + #include + using namespace std; + + #define PI 3.14159265358979323846 + + typedef complex DComplex; + + class CFure + { + // ... + double T; + int N; + + int st( int n, int np ); + + public: + CFure() + { + memset( this, 0, sizeof( CFure ) ); + } + CFure( double t, int n ) : T( t ), N( n ) + { + } + + void ReInit( double T, int N ) + { + this -> T = T; + this -> N = N; + } + + void Direct( DComplex *U, DComplex *Uf ); + void Reverse( DComplex *Uf, DComplex *U ); + void Fft( DComplex *X, int Sign, int Np, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_06.cpp b/Signal/IX7/MODEL/math_06.cpp new file mode 100644 index 0000000..2c8c70c --- /dev/null +++ b/Signal/IX7/MODEL/math_06.cpp @@ -0,0 +1,64 @@ +#include "StdAfx.h" +#include "Math_06.h" + +// возвращает амплитуду сигнала +double CMix:: FindA( DComplex *U, int Size ) +{ + double A = abs( U[0] ); + + for( int i = 1 ; i < Size ; i++ ) + { + if( A < abs( U[i] ) ) + A = abs( U[i] ); + } + + return A; +} + +// расчитывает массив случайных величин Ksi +void CMix:: CalcKsi( DComplex *Ksi, int Size, double A ) +{ + for( int i = 0 ; i < Size ; i++ ) + { + Ksi[i] = DComplex( A * Rand(), A * Rand() ); + } +} + +// расчитывает массив величин Eta ( энерге- +// тический спектр "прошит" ) +void CMix:: CalcEta( DComplex *Eta, int Size, DComplex *Ksi, double T ) +{ + double Sqrt = 1.0 / sqrt( ( double ) Size ), stepF = 1.0 / T, Arg = 2.0 * PI / Size; + CGauss Gauss( Ag, To, Sg ); + + for( int l = 0 ; l < Size ; l++ ) + { + Eta[l] = 0.0; + + for( int k = 0 ; k < Size ; k++ ) + { + Eta[l] += Ksi[k] * exp( DComplex( 0.0, Arg * k * l ) ) * Gauss.Value( k * stepF ); + } + + Eta[l] *= Sqrt; + } +} + +// расчитывает помеху Eta и вносит ее в сигнал U +void CMix:: Mix( DComplex *U, int N, DComplex *Eta, double T ) +{ + DComplex *Ksi = new DComplex [N]; + + if( Ksi && Eta ) + { + CalcKsi( Ksi, N, FindA( U, N ) ); + CalcEta( Eta, N, Ksi, T ); + + for( int i = 0 ; i < N ; i++ ) + U[i] += ( Eta[i] = real( Eta[i] ) ); + } + + delete[] Ksi; +} + + diff --git a/Signal/IX7/MODEL/math_06.h b/Signal/IX7/MODEL/math_06.h new file mode 100644 index 0000000..1bbc673 --- /dev/null +++ b/Signal/IX7/MODEL/math_06.h @@ -0,0 +1,43 @@ +#ifndef _CMix_H_ + + #define _CMix_H_ + + #include + #include + #include "Math_03.h" + #include "Math_04.h" + + class CMix + { + // ... + CFure Fure; + // ... + double Ag; + double To; + double Sg; + + // случайное число в диапазоне [ 0.0; 1.0 ) + double Rand() + { + return ( double ) rand() / RAND_MAX; + } + + // возвращает амплитуду сигнала + double FindA( DComplex *U, int Size ); + + // расчитывает массив случайных величин Ksi + void CalcKsi( DComplex *Ksi, int Size, double A ); + // расчитывает массив величин Eta ( энерге- + // тический спектр "прошит" ) + void CalcEta( DComplex *Eta, int Size, DComplex *Ksi, double T ); + + public: + CMix( double a, double t, double s ) : Ag( a ), To( t ), Sg( s ) + { + } + + // вносит в сигнал U помехи + void Mix( DComplex *U, int N, DComplex *Eta, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_07.cpp b/Signal/IX7/MODEL/math_07.cpp new file mode 100644 index 0000000..b61b11a --- /dev/null +++ b/Signal/IX7/MODEL/math_07.cpp @@ -0,0 +1,31 @@ +#include "StdAfx.h" +#include "Math_07.h" + +// возвращает степень, в которую нужно вознести 2 чтобы получить N +int CFilter::GetPower( int N ) +{ + int n = 2, i = 1; + + while( n < N ) + { + n *= 2; + i += 1; + } + + return i; +} + +void CFilter:: Filter( DComplex *U, int N, DComplex *FEta, double T ) +{ + Fure.Fft( U, 1, GetPower( N ), T ); + + for( int i = 0 ; i < N ; i++ ) + { + DComplex Betta2 = abs( U[i] ) * abs( U[i] ); + DComplex Cappa2 = abs( FEta[i] ) * abs( FEta[i] ); + + U[i] = ( Betta2 - Cappa2 ) / Betta2 * U[i]; + } + + Fure.Fft( U, -1, GetPower( N ), T ); +} \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_07.h b/Signal/IX7/MODEL/math_07.h new file mode 100644 index 0000000..43e99c1 --- /dev/null +++ b/Signal/IX7/MODEL/math_07.h @@ -0,0 +1,24 @@ +#ifndef _CFilter_H_ + + #define _CFilter_H_ + + #include + #include "Math_03.h" + #include "Math_04.h" + + class CFilter + { + // ... + CFure Fure; + + int GetPower( int N ); + + public: + CFilter() + { + } + + void Filter( DComplex *U, int N, DComplex *FEta, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/MODEL/math_08.cpp b/Signal/IX7/MODEL/math_08.cpp new file mode 100644 index 0000000..bc85439 --- /dev/null +++ b/Signal/IX7/MODEL/math_08.cpp @@ -0,0 +1,209 @@ +#include "StdAfx.h" +#include "Math_08.h" + +int CRegular:: GetPower( int N ) +{ + int n = 2, i = 1; + + while( n < N ) + { + n *= 2; + i += 1; + } + + return i; +} + +double CRegular:: FindA( DComplex *U, int N ) +{ + double A = abs( U[0] ); + + for( int i = 1 ; i < N ; i++ ) + { + if( A < abs( U[i] ) ) + A = abs( U[i] ); + } + + return A; +} + +double CRegular::CalcBetta( DComplex *F1, DComplex *F2, double T, int N, double alpha ) +{ + /* + double stepT = T / N, val = 2.0 * PI / T, res = 0.0, up, dn; + + for( int m = 0 ; m < N ; m++ ) + { + up = alpha * alpha * ( 1.0 + val * m * val * m ) * abs( F1[m] ) * abs( F1[m] ); + dn = abs( F2[m] ) * abs( F2[m] ) * stepT * stepT + alpha * ( 1.0 + val * m * val * m ); + + res = res + up / ( dn * dn ); + } + + return res * stepT / N; + */ + + double stepT = T / N, sqrAlpha = alpha * alpha, val = 2.0 * PI / T, res = 0.0; + + for( int m = 0 ; m < N ; m++ ) + { + // числитель + double up = sqrAlpha * ( 1.0 + SQR( val * m ) ) * SQR( abs( F1[m] ) ); + // знаменатель + double dn = SQR( abs( F2[m] ) ) * SQR( stepT ) + alpha * ( 1.0 + SQR( val * m ) ); + + res += up / ( dn * dn ); + } + + return res * stepT / N; +} + +double CRegular::CalcGamma( DComplex *F1, DComplex *F2, double T, int N, double alpha ) +{ + /* + double stepT = T / N, val = 2.0 * PI / T, val1 = PI / alpha, res = 0.0, up, dn; + + for( int m = 0 ; m < N ; m++ ) + { + up = abs( F2[m] ) * abs( F2[m] ) * stepT * stepT * abs( F1[m] ) * abs( F1[m] ) * ( 1.0 + val1 * m * val1 * m ); + dn = abs( F2[m] ) * abs( F2[m] ) * stepT * stepT + alpha * ( 1.0 + val * m * val * m ); + + res = res + up / ( dn * dn ); + } + + return res * stepT / N; + */ + + double stepT = T / N, val = 2.0 * PI / T, res = 0.0, sqrStepT = stepT * stepT; + + for( int m = 0 ; m < N ; m++ ) + { + // числитель + double up = SQR( abs( F2[m] ) ) * sqrStepT * SQR( abs( F1[m] ) ) * ( 1.0 + SQR( PI * m / alpha ) ); + // знаменатель + double dn = SQR( abs( F2[m] ) ) * sqrStepT + alpha * ( 1.0 + SQR( val * m ) ); + + res += up / ( dn * dn ); + } + + return res * stepT / N; +} + +double CRegular::FindAlpha( DComplex *Fs, DComplex *Fi, double T, int N ) +{ + double Alpha = BegAlpha, Ro, Tmp; + + do{ + + Tmp = sqrt( CalcGamma( Fs, Fi, T, N, Alpha ) ) * Eps + Delta; + Ro = CalcBetta( Fs, Fi, T, N, Alpha ) - Tmp * Tmp; + + // к следующей точке + Alpha -= Step; + + }while( Ro > 0.0 ); + + // см. выше + return Alpha + Step; +} + +void CRegular:: CalcH( DComplex *U1, DComplex *U2, double T, int N, DComplex *H ) +{ + Fure.ReInit( T, N ); + + // согласно рекомендациям + Eps = FindA( U1, N ) * 10.0 / 100.0; + Delta = FindA( U2, N ) * 7.0 / 100.0; + + // спектр + Fure.Fft( U1, 1, GetPower( N ), T ); + Fure.Fft( U2, 1, GetPower( N ), T ); + + // расчет H + double Alpha = FindAlpha( U1, U2, T, N ), stepT = T / N, val1 = 2.0 * PI / N, val2 = 2.0 * PI / T; + + for( int k = 0 ; k < N ; k++ ) + { + H[k] = 0.0; + + for( int m = 0 ; m < N ; m++ ) + { + DComplex conj = DComplex( real( U2[m] ), -imag( U2[m] ) ); + DComplex up = exp( DComplex( 0.0, -val1 * k * m ) ) * U1[m] * conj; + DComplex dn = SQR( abs( U2[m] ) ) * SQR( stepT ) + Alpha * ( 1.0 + SQR( val2 * m ) ); + + H[k] += up / dn; + } + + H[k] *= stepT / N; + } + + // сигнал + Fure.Fft( U1, -1, GetPower( N ), T ); + Fure.Fft( U2, -1, GetPower( N ), T ); + + /* + Fure.ReInit( T, N ); + + // согласно рекомендациям + Eps = FindA( U1, N ) * 10.0 / 100.0; + Delta = FindA( U2, N ) * 7.0 / 100.0; + + // спектр + Fure.Fft( U1, 1, GetPower( N ), T ); + Fure.Fft( U2, 1, GetPower( N ), T ); + + // расчет H + double alpha = FindAlpha( U1, U2, T, N ); + double val = 2.0 * PI / N, val1 = 2.0 * PI / T, stepT = T / N, dn; + DComplex up; + + for( int k = 0 ; k < N ; k++ ) + { + H[k] = 0.0; + + for( int m = 0 ; m < N ; m++ ) + { + up = exp( DComplex( 0.0, -val * k * m ) ) * U1[m] * DComplex( real( U2[m] ), -imag( U2[m] ) ); + dn = abs( U2[m] ) * abs( U2[m] ) * stepT * stepT + alpha * ( 1.0 + val1 * m * val1 * m ); + + H[k] = H[k] + up / dn; + } + + H[k] = H[k] * ( stepT / N ); + } + + // сигнал + Fure.Fft( U1, -1, GetPower( N ), T ); + Fure.Fft( U2, -1, GetPower( N ), T ); + */ +} + +void CRegular:: CalcRo( DComplex *U1, DComplex *U2, double T, int N, double *Ro ) +{ + Fure.ReInit( T, N ); + + // согласно рекомендациям + Eps = FindA( U1, N ) * 10.0 / 100.0; + Delta = FindA( U2, N ) * 7.0 / 100.0; + + // спектр + Fure.Fft( U1, 1, GetPower( N ), T ); + Fure.Fft( U2, 1, GetPower( N ), T ); + + // расчет Ro( alpha ) + double Alpha = BegAlpha, Tmp; + + for( int i = 0 ; i < N ; i++) + { + Tmp = sqrt( CalcGamma( U1, U2, T, N, Alpha ) ) * Eps + Delta; + Ro[i] = CalcBetta( U1, U2, T, N, Alpha ) - Tmp * Tmp; + + // к следующей точке + Alpha -= Step; + } + + // сигнал + Fure.Fft( U1, -1, GetPower( N ), T ); + Fure.Fft( U2, -1, GetPower( N ), T ); +} diff --git a/Signal/IX7/MODEL/math_08.h b/Signal/IX7/MODEL/math_08.h new file mode 100644 index 0000000..0d2046b --- /dev/null +++ b/Signal/IX7/MODEL/math_08.h @@ -0,0 +1,36 @@ +#ifndef _CRegular_H_ + + #define _CRegular_H_ + + #include "Math_04.h" + + #define SQR( X ) ( X ) * ( X ) + + class CRegular + { + // ... + CFure Fure; + // ... + double BegAlpha; + double Step; + // ... + double Eps; + double Delta; + + int GetPower( int N ); + double FindA( DComplex *U, int N ); + + double CalcGamma( DComplex *F1, DComplex *F2, double T, int N, double alpha ); + double CalcBetta( DComplex *F1, DComplex *F2, double T, int N, double alpha ); + double FindAlpha( DComplex *F1, DComplex *F2, double T, int N ); + + public: + CRegular( double begAlpha, double step ) : BegAlpha( begAlpha ), Step( step ) + { + } + + void CalcH( DComplex *U1, DComplex *U2, double T, int N, DComplex *H ); + void CalcRo( DComplex *U1, DComplex *U2, double T, int N, double *Ro ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/NEWDOC.CPP b/Signal/IX7/NEWDOC.CPP new file mode 100644 index 0000000..108668a --- /dev/null +++ b/Signal/IX7/NEWDOC.CPP @@ -0,0 +1,201 @@ +#include "StdAfx.h" +#include "NewDoc.h" + + +CNewDoc:: CNewDoc() +{ + T = 0.0; + N = 0; + + // идеальный сигнал + Ag2 = 1.0; + Tog2 = 1.0; + Sg2 = 1.2; + + // исходный сигнал + Ag1 = 1.0; + Tog1 = 1.0; + Sg1 = 1.0; + + U1 = NULL; + U2 = NULL; + H = NULL; + XRo = NULL; + V = NULL; + + YexView = NULL; + YapView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + ReInit( 6.0, 128 ); +} + +CNewDoc::~CNewDoc() +{ + if( U1 ) + delete[] U1; + if( U2 ) + delete[] U2; + if( H ) + delete[] H; + if( V ) + delete[] V; + if( XRo ) + delete[] XRo; +} + + + + +int CNewDoc::Allocate( DComplex **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new DComplex [Size] ) == NULL ) + return 0; + + return 1; +} + +int CNewDoc::Allocate( double **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new double [Size] ) == NULL ) + return 0; + + return 1; +} + +void CNewDoc::Convert( DComplex *Src, double *Des, int What ) +{ + int i, HalfSize = N / 2, Delta = HalfSize; + + for( i = 0 ; i < N ; i++ ) + Des[i] = abs( Src[i] ) * abs( Src[i] ); + + // перестановка нужна, т.к. спектр получаем шиворот-навыворот + if( What ) + { + if( N % 2 ) + Delta++; + + for( i = 0 ; i < HalfSize ; i++ ) + { + double Tmp = Des[i+Delta]; + + Des[i+Delta] = Des[i]; + Des[i] = Tmp; + } + } +} + +// возвращает степень, в которую нужно вознести 2 чтобы получить N +int CNewDoc::GetPower( int N ) +{ + int n = 2, i = 1; + + while( n < N ) + { + n *= 2; + i += 1; + } + + return i; +} + +int CNewDoc::ReInit( double t, int n ) +{ + YexView = NULL; + YapView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + if( t < 0.0 || n < 0 ) + return 0; + + if( T != t || N != n ) + { + T = t; + N = n; + + if( !Xu.ReCalc( N, T / N ) ) + return 0; + + if( !Allocate( &U1, N ) ) + return 0; + if( !Allocate( &U2, N ) ) + return 0; + if( !Allocate( &H, N ) ) + return 0; + if( !Allocate( &V, N ) ) + return 0; + if( !Allocate(&XRo, N ) ) + return 0; + } + + return 1; +} + +void CNewDoc::Direct( double alpha, double step ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + CGauss Gauss1( Ag1, Tog1, Sg1 ); + CGauss Gauss2( Ag2, Tog2, Sg2 ); + CRegular Reg( alpha, step ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + { + U1[i] = DComplex( Gauss1.Value( Xu.Data[i] ), 0.0 ); + U2[i] = DComplex( Gauss2.Value( Xu.Data[i] ), 0.0 ); + } + + Reg.CalcH( U1, U2, T, N, H ); + + Convert( H, V, 1 ); + strcpy ( NCalc, "Функция импульсного отклика H(t)." ); + + XView = Xu.Data; + YexView = V; + SView = Xu.Size; + NView = NCalc; +} + +void CNewDoc::Alpha( double alpha, double step ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + CGauss Gauss1( Ag1, Tog1, Sg1 ); + CGauss Gauss2( Ag2, Tog2, Sg2 ); + CRegular Reg( alpha, step ); + + for( int i = 0 ; i < Xu.Size ; i++ ) + { + U1 [i] = DComplex( Gauss1.Value( Xu.Data[i] ), 0.0 ); + U2 [i] = DComplex( Gauss2.Value( Xu.Data[i] ), 0.0 ); + XRo[i] = alpha - i * step; + } + + Reg.CalcRo( U1, U2, T, N, V ); + + strcpy ( NCalc, "Функция Ro(alpha)." ); + + XView = XRo; + YexView = V; + SView = N; + NView = NCalc; +} \ No newline at end of file diff --git a/Signal/IX7/NEWDOC.H b/Signal/IX7/NEWDOC.H new file mode 100644 index 0000000..4e4bb2b --- /dev/null +++ b/Signal/IX7/NEWDOC.H @@ -0,0 +1,60 @@ +#ifndef _CNewDoc_H_ + + #define _CNewDoc_H_ + + #include "Model\math_00.h" + #include "Model\math_03.h" + #include "Model\math_08.h" + + #define L 100 + + class CNewDoc + { + // ... + CNet Xu; + DComplex *U1; + DComplex *U2; + DComplex *H; + // + double *XRo; + // ... + double *V; + // ... + char NCalc[L]; + + int Allocate( DComplex **Des, int Size ); + int Allocate( double **Des, int Size ); + void Convert( DComplex *Src, double *Des, int What ); + int GetPower( int N ); + + public: + CNewDoc(); + ~CNewDoc(); + + // ... + double T; + int N; + // ... + double Ag1; + double Tog1; + double Sg1; + // ... + double Ag2; + double Tog2; + double Sg2; + + // ... + double *XView; + double *YexView; + double *YapView; + int SView; + // ... + char *NView; + + int ReInit( double t, int n ); + void Direct( double alpha, double step ); + void Alpha( double alpha, double step ); + + }; + +#endif \ No newline at end of file diff --git a/Signal/IX7/StdAfx.cpp b/Signal/IX7/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/Signal/IX7/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/Signal/IX7/StdAfx.h b/Signal/IX7/StdAfx.h new file mode 100644 index 0000000..8fe3fa4 --- /dev/null +++ b/Signal/IX7/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#if !defined(AFX_STDAFX_H__8E5CF667_A702_11D3_8E33_00504E02C39D__INCLUDED_) +#define AFX_STDAFX_H__8E5CF667_A702_11D3_8E33_00504E02C39D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0400 +#endif +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__8E5CF667_A702_11D3_8E33_00504E02C39D__INCLUDED) diff --git a/Signal/IX7/resource.h b/Signal/IX7/resource.h new file mode 100644 index 0000000..10a75ff --- /dev/null +++ b/Signal/IX7/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by IX7.rc +// +#define IDS_PROJNAME 100 +#define IDR_IXL7 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/Signal/IX8/IX8.cpp b/Signal/IX8/IX8.cpp new file mode 100644 index 0000000..67fc77a --- /dev/null +++ b/Signal/IX8/IX8.cpp @@ -0,0 +1,72 @@ +// IX8.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f IX8ps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "IX8.h" + +#include "IX8_i.c" +#include "IXL8.h" + + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) +OBJECT_ENTRY(CLSID_IXL8, CIXL8) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_IX8Lib); + DisableThreadLibraryCalls(hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + _Module.Term(); + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + return _Module.UnregisterServer(TRUE); +} + + diff --git a/Signal/IX8/IX8.def b/Signal/IX8/IX8.def new file mode 100644 index 0000000..e93d8da --- /dev/null +++ b/Signal/IX8/IX8.def @@ -0,0 +1,9 @@ +; IX8.def : Declares the module parameters. + +LIBRARY "IX8.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/Signal/IX8/IX8.dsp b/Signal/IX8/IX8.dsp new file mode 100644 index 0000000..d07d972 --- /dev/null +++ b/Signal/IX8/IX8.dsp @@ -0,0 +1,387 @@ +# Microsoft Developer Studio Project File - Name="IX8" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=IX8 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "IX8.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "IX8.mak" CFG="IX8 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "IX8 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX8 - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX8 - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX8 - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX8 - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IX8 - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "IX8 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=.\Debug\IX8.dll +InputPath=.\Debug\IX8.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX8 - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=.\DebugU\IX8.dll +InputPath=.\DebugU\IX8.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX8 - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=.\ReleaseMinSize\IX8.dll +InputPath=.\ReleaseMinSize\IX8.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX8 - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=.\ReleaseMinDependency\IX8.dll +InputPath=.\ReleaseMinDependency\IX8.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX8 - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=.\ReleaseUMinSize\IX8.dll +InputPath=.\ReleaseUMinSize\IX8.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "IX8 - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\IX8.dll +InputPath=.\ReleaseUMinDependency\IX8.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "IX8 - Win32 Debug" +# Name "IX8 - Win32 Unicode Debug" +# Name "IX8 - Win32 Release MinSize" +# Name "IX8 - Win32 Release MinDependency" +# Name "IX8 - Win32 Unicode Release MinSize" +# Name "IX8 - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\IX8.cpp +# End Source File +# Begin Source File + +SOURCE=.\IX8.def +# End Source File +# Begin Source File + +SOURCE=.\IX8.idl +# ADD MTL /tlb ".\IX8.tlb" /h "IX8.h" /iid "IX8_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\IX8.rc +# End Source File +# Begin Source File + +SOURCE=.\IXL8.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\MATH_04.CPP +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_09.cpp +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_10.cpp +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.CPP +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\IXL8.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_00.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_01.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_02.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_03.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\MATH_04.H +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_09.h +# End Source File +# Begin Source File + +SOURCE=.\MODEL\math_10.h +# End Source File +# Begin Source File + +SOURCE=.\NEWDOC.H +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\IXL8.rgs +# End Source File +# End Group +# End Target +# End Project diff --git a/Signal/IX8/IX8.dsw b/Signal/IX8/IX8.dsw new file mode 100644 index 0000000..91817fc --- /dev/null +++ b/Signal/IX8/IX8.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "IX8"=.\IX8.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Signal/IX8/IX8.h b/Signal/IX8/IX8.h new file mode 100644 index 0000000..c4e6ba5 --- /dev/null +++ b/Signal/IX8/IX8.h @@ -0,0 +1,332 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Dec 01 20:34:13 1999 + */ +/* Compiler settings for G:\WORK\Signal\IX8\IX8.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __IX8_h__ +#define __IX8_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __IIXL8_FWD_DEFINED__ +#define __IIXL8_FWD_DEFINED__ +typedef interface IIXL8 IIXL8; +#endif /* __IIXL8_FWD_DEFINED__ */ + + +#ifndef __IXL8_FWD_DEFINED__ +#define __IXL8_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class IXL8 IXL8; +#else +typedef struct IXL8 IXL8; +#endif /* __cplusplus */ + +#endif /* __IXL8_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +#ifndef __IIXL8_INTERFACE_DEFINED__ +#define __IIXL8_INTERFACE_DEFINED__ + +/* interface IIXL8 */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IIXL8; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("192B3ACD-A76D-11D3-8E34-00504E02C39D") + IIXL8 : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNet( + /* [in] */ double T, + /* [in] */ long N) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnSignalB( + /* [in] */ double Ag1, + /* [in] */ double Tog1, + /* [in] */ double Sg1) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDirect( + /* [in] */ long Np) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnBack( + /* [in] */ double Nm, + /* [in] */ double Delta) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE FetchResults( + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes, + /* [in] */ VARIANT_BOOL bWhat) = 0; + + }; + +#else /* C style interface */ + + typedef struct IIXL8Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IIXL8 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IIXL8 __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IIXL8 __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + IIXL8 __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + IIXL8 __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + IIXL8 __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + IIXL8 __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnNet )( + IIXL8 __RPC_FAR * This, + /* [in] */ double T, + /* [in] */ long N); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnSignalB )( + IIXL8 __RPC_FAR * This, + /* [in] */ double Ag1, + /* [in] */ double Tog1, + /* [in] */ double Sg1); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnDirect )( + IIXL8 __RPC_FAR * This, + /* [in] */ long Np); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *OnBack )( + IIXL8 __RPC_FAR * This, + /* [in] */ double Nm, + /* [in] */ double Delta); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *FetchResults )( + IIXL8 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes, + /* [in] */ VARIANT_BOOL bWhat); + + END_INTERFACE + } IIXL8Vtbl; + + interface IIXL8 + { + CONST_VTBL struct IIXL8Vtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IIXL8_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IIXL8_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IIXL8_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IIXL8_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IIXL8_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IIXL8_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IIXL8_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IIXL8_OnNet(This,T,N) \ + (This)->lpVtbl -> OnNet(This,T,N) + +#define IIXL8_OnSignalB(This,Ag1,Tog1,Sg1) \ + (This)->lpVtbl -> OnSignalB(This,Ag1,Tog1,Sg1) + +#define IIXL8_OnDirect(This,Np) \ + (This)->lpVtbl -> OnDirect(This,Np) + +#define IIXL8_OnBack(This,Nm,Delta) \ + (This)->lpVtbl -> OnBack(This,Nm,Delta) + +#define IIXL8_FetchResults(This,arrRes,bWhat) \ + (This)->lpVtbl -> FetchResults(This,arrRes,bWhat) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL8_OnNet_Proxy( + IIXL8 __RPC_FAR * This, + /* [in] */ double T, + /* [in] */ long N); + + +void __RPC_STUB IIXL8_OnNet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL8_OnSignalB_Proxy( + IIXL8 __RPC_FAR * This, + /* [in] */ double Ag1, + /* [in] */ double Tog1, + /* [in] */ double Sg1); + + +void __RPC_STUB IIXL8_OnSignalB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL8_OnDirect_Proxy( + IIXL8 __RPC_FAR * This, + /* [in] */ long Np); + + +void __RPC_STUB IIXL8_OnDirect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL8_OnBack_Proxy( + IIXL8 __RPC_FAR * This, + /* [in] */ double Nm, + /* [in] */ double Delta); + + +void __RPC_STUB IIXL8_OnBack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IIXL8_FetchResults_Proxy( + IIXL8 __RPC_FAR * This, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes, + /* [in] */ VARIANT_BOOL bWhat); + + +void __RPC_STUB IIXL8_FetchResults_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IIXL8_INTERFACE_DEFINED__ */ + + + +#ifndef __IX8Lib_LIBRARY_DEFINED__ +#define __IX8Lib_LIBRARY_DEFINED__ + +/* library IX8Lib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_IX8Lib; + +EXTERN_C const CLSID CLSID_IXL8; + +#ifdef __cplusplus + +class DECLSPEC_UUID("192B3ACE-A76D-11D3-8E34-00504E02C39D") +IXL8; +#endif +#endif /* __IX8Lib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long __RPC_FAR *, unsigned long , LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +void __RPC_USER LPSAFEARRAY_UserFree( unsigned long __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Signal/IX8/IX8.idl b/Signal/IX8/IX8.idl new file mode 100644 index 0000000..0996508 --- /dev/null +++ b/Signal/IX8/IX8.idl @@ -0,0 +1,43 @@ +// IX8.idl : IDL source for IX8.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (IX8.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + [ + object, + uuid(192B3ACD-A76D-11D3-8E34-00504E02C39D), + dual, + helpstring("IIXL8 Interface"), + pointer_default(unique) + ] + interface IIXL8 : IDispatch + { + [id(1), helpstring("method OnNet")] HRESULT OnNet([in]double T, [in]long N); + [id(2), helpstring("method OnSignalB")] HRESULT OnSignalB([in]double Ag1, [in]double Tog1, [in]double Sg1); + [id(3), helpstring("method OnDirect")] HRESULT OnDirect([in]long Np); + [id(4), helpstring("method OnBack")] HRESULT OnBack([in]double Nm, [in]double Delta); + [id(5), helpstring("method FetchResults")] HRESULT FetchResults( [out]SAFEARRAY(double)* arrRes, [in]VARIANT_BOOL bWhat ); + }; + +[ + uuid(192B3AC1-A76D-11D3-8E34-00504E02C39D), + version(1.0), + helpstring("IX8 1.0 Type Library") +] +library IX8Lib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(192B3ACE-A76D-11D3-8E34-00504E02C39D), + helpstring("IXL8 Class") + ] + coclass IXL8 + { + [default] interface IIXL8; + }; +}; diff --git a/Signal/IX8/IX8.rc b/Signal/IX8/IX8.rc new file mode 100644 index 0000000..b3dfdef --- /dev/null +++ b/Signal/IX8/IX8.rc @@ -0,0 +1,136 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#ifdef _WIN32 +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_IXL8 REGISTRY DISCARDABLE "IXL8.rgs" +#endif // Russian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""IX8.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "IX8 Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "IX8\0" + VALUE "LegalCopyright", "Copyright 1999\0" + VALUE "OriginalFilename", "IX8.DLL\0" + VALUE "ProductName", "IX8 Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "OLESelfRegister", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "IX8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "IX8.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Signal/IX8/IX8ps.def b/Signal/IX8/IX8ps.def new file mode 100644 index 0000000..d7359a6 --- /dev/null +++ b/Signal/IX8/IX8ps.def @@ -0,0 +1,11 @@ + +LIBRARY "IX8PS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/Signal/IX8/IX8ps.mk b/Signal/IX8/IX8ps.mk new file mode 100644 index 0000000..728bd1d --- /dev/null +++ b/Signal/IX8/IX8ps.mk @@ -0,0 +1,16 @@ + +IX8ps.dll: dlldata.obj IX8_p.obj IX8_i.obj + link /dll /out:IX8ps.dll /def:IX8ps.def /entry:DllMain dlldata.obj IX8_p.obj IX8_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del IX8ps.dll + @del IX8ps.lib + @del IX8ps.exp + @del dlldata.obj + @del IX8_p.obj + @del IX8_i.obj diff --git a/Signal/IX8/IXL8.cpp b/Signal/IX8/IXL8.cpp new file mode 100644 index 0000000..2386a3d --- /dev/null +++ b/Signal/IX8/IXL8.cpp @@ -0,0 +1,106 @@ +// IXL8.cpp : Implementation of CIXL8 +#include "stdafx.h" +#include "IX8.h" +#include "IXL8.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL8 + +STDMETHODIMP CIXL8::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_IIXL8 + }; + for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) + { + if (InlineIsEqualGUID(*arr[i],riid)) + return S_OK; + } + return S_FALSE; +} + +STDMETHODIMP CIXL8::OnNet(double T, long N) +{ + if( !m_doc.ReInit(T, N) ) + { + Error( L"Cann't ReInit", 0, NULL, IID_IIXL8, E_FAIL ); + return E_FAIL; + } + + + return S_OK; +} + +STDMETHODIMP CIXL8::OnSignalB(double Ag1, double Tog1, double Sg1) +{ + m_doc.Ag1 = Ag1; + m_doc.Tog1 = Tog1; + m_doc.Sg1 = Sg1; + + m_doc.SignalC(); + + return S_OK; +} + +STDMETHODIMP CIXL8::OnDirect(long Np) +{ + m_doc.Direct( Np ); + + return S_OK; +} + +STDMETHODIMP CIXL8::OnBack(double Nm, double Delta) +{ + m_doc.Alpha( Nm, Delta ); + + return S_OK; +} + +STDMETHODIMP CIXL8::FetchResults( SAFEARRAY** arrRes, VARIANT_BOOL bWhat ) + { + if( m_doc.SView < 1 ) return E_FAIL; + if( !arrRes ) return E_POINTER; + + DWORD dwSz = (bWhat == VARIANT_TRUE) ? 3:2; + + SAFEARRAYBOUND bnd = { dwSz * m_doc.SView, 0 }; + *arrRes = SafeArrayCreate( VT_R8, 1, &bnd ); + + if( !arrRes ) + { + Error( L"Cann't array allocate", 0, NULL, IID_IIXL8, E_FAIL ); + return E_FAIL; + } + + double* pDta; + HRESULT hr = SafeArrayAccessData( *arrRes, (void**)&pDta ); + if( FAILED(hr) ) + { + SafeArrayDestroy( *arrRes ); + *arrRes = NULL; + Error( L"Cann't array allocate", 0, NULL, IID_IIXL8, hr ); + return E_FAIL; + } + + if( bWhat == VARIANT_FALSE ) + { + double *x = m_doc.XView, *y = m_doc.YexView; + + for( int i = 0; i < m_doc.SView; ++i, ++x, ++y ) + *pDta++ = *x, *pDta++ = *y; + } + else + { + double *x = m_doc.XView, *y = m_doc.YexView, + *y2 = m_doc.YapView; + for( int i = 0; i < m_doc.SView; ++i, ++x, ++y, ++y2 ) + *pDta++ = *x, *pDta++ = *y, *pDta++ = *y2; + + } + + SafeArrayUnaccessData( *arrRes ); + + return S_OK; + } + diff --git a/Signal/IX8/IXL8.h b/Signal/IX8/IXL8.h new file mode 100644 index 0000000..0227ece --- /dev/null +++ b/Signal/IX8/IXL8.h @@ -0,0 +1,47 @@ +// IXL8.h : Declaration of the CIXL8 + +#ifndef __IXL8_H_ +#define __IXL8_H_ + +#include "resource.h" // main symbols +#include "newdoc.h" + +///////////////////////////////////////////////////////////////////////////// +// CIXL8 +class ATL_NO_VTABLE CIXL8 : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl +{ +public: + CIXL8() + { + } + +DECLARE_REGISTRY_RESOURCEID(IDR_IXL8) +DECLARE_NOT_AGGREGATABLE(CIXL8) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CIXL8) + COM_INTERFACE_ENTRY(IIXL8) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// IIXL8 +public: + STDMETHOD(FetchResults)( SAFEARRAY** arrRes, VARIANT_BOOL bWhat ); + STDMETHOD(OnBack)(/*[in]*/double Nm, /*[in]*/double Delta); + STDMETHOD(OnDirect)(/*[in]*/long Np); + STDMETHOD(OnSignalB)(/*[in]*/double Ag1, /*[in]*/double Tog1, /*[in]*/double Sg1); + STDMETHOD(OnNet)(/*[in]*/double T, /*[in]*/long N); +private: + CNewDoc m_doc; +}; + +#endif //__IXL8_H_ diff --git a/Signal/IX8/IXL8.rgs b/Signal/IX8/IXL8.rgs new file mode 100644 index 0000000..0d34bb5 --- /dev/null +++ b/Signal/IX8/IXL8.rgs @@ -0,0 +1,26 @@ +HKCR +{ + IX8.IXL8.1 = s 'IXL8 Class' + { + CLSID = s '{192B3ACE-A76D-11D3-8E34-00504E02C39D}' + } + IX8.IXL8 = s 'IXL8 Class' + { + CLSID = s '{192B3ACE-A76D-11D3-8E34-00504E02C39D}' + CurVer = s 'IX8.IXL8.1' + } + NoRemove CLSID + { + ForceRemove {192B3ACE-A76D-11D3-8E34-00504E02C39D} = s 'IXL8 Class' + { + ProgID = s 'IX8.IXL8.1' + VersionIndependentProgID = s 'IX8.IXL8' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{192B3AC1-A76D-11D3-8E34-00504E02C39D}' + } + } +} diff --git a/Signal/IX8/MODEL/MATH_04.CPP b/Signal/IX8/MODEL/MATH_04.CPP new file mode 100644 index 0000000..19e9818 --- /dev/null +++ b/Signal/IX8/MODEL/MATH_04.CPP @@ -0,0 +1,150 @@ +#include "StdAfx.h" +#include "Math_04.h" + +void CFure::Direct ( DComplex *U, DComplex *Uf ) +{ + double Pow = 2.0 * PI / N; + + for( int k = 0 ; k < N ; k++ ) + { + Uf[k] = 0.0; + + for( int l = 0 ; l < N ; l++ ) + { + Uf[k] += U[l] * exp( -DComplex( 0.0, Pow * k * l ) ); + } + + Uf[k] *= ( T / N ); + } +} + +void CFure::Reverse( DComplex *Uf, DComplex *U ) +{ + double Pow = 2.0 * PI / N; + + for( int l = 0 ; l < N ; l++ ) + { + U[l] = 0.0; + + for( int k = 0 ; k < N ; k++ ) + { + U[l] += Uf[k] * exp( DComplex( 0.0, Pow * l * k ) ); + } + + // на N уже делили ! ( см. Direct ) + U[l] /= T; + } +} + +// от Филиппова... + +int CFure::st( int n, int np ) +{ + int m = 1, i; + + for( i = 1 ; i <= np ; i++ ) + m = m * n; + + return m; +} + +void CFure::Fft( DComplex *x, int sign, int np, double t ) +{ + int msk[19]; + double cs[2]; + DComplex cxcs, xa, hold; + int nmax, i, j, nn, mm, lr, nw, nw1, ii, ij, loc, ll; + double zz, pi, delta, w; + + pi = PI; + nmax = st( 2, np ); + zz = 2.0 * pi * sign / nmax; + delta = t / nmax; + + if( sign < 0.0 ) + delta = 1.0 / t; + + msk[0] = nmax / 2; + + for( i = 1 ; i < np ; i++ ) + msk[i] = msk[i-1] / 2; + + nn = nmax; + mm = 2; + + for( lr = 1 ; lr <= np ; lr++ ) + { + nn = nn / 2; + nw = 0; + + for( i = 1 ; i <= mm ; i +=2 ) + { + ii = nn * i; + w = nw * zz; + cs[0] = cos( w ); + cs[1] = sin( w ); + + cxcs = DComplex( cs[0], cs[1] ); + + for( j = 1 ; j <= nn ; j++ ) + { + ii = ii + 1; + ij = ii - nn; + + xa = cxcs * x[ii-1]; + x[ii-1] = x[ij-1] - xa; + x[ij-1] = x[ij-1] + xa; + } + + for( loc = 2 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw = ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } + + mm = 2 * mm; + } + + nw = 0; + + for( i = 1 ; i <= nmax ; i++ ) + { + nw1 = nw + 1; + hold = x[nw1 - 1]; + + if( nw1 - i > 0 ) + { + x[nw1-1] = DComplex( real( x[i-1] ) * delta, imag( x[i-1] ) * delta ); + } + + if( nw1 - i >= 0 ) + { + x[i-1] = DComplex( real( hold ) * delta, imag( hold ) * delta ); + } + + for( loc = 1 ; loc <= np ; loc++ ) + { + ll = nw - msk[loc-1]; + + if( ll <= 0 ) + break; + else + nw=ll; + } + + if( ll == 0 ) + nw = msk[loc]; + else + nw = nw + msk[loc-1]; + } +} \ No newline at end of file diff --git a/Signal/IX8/MODEL/MATH_04.H b/Signal/IX8/MODEL/MATH_04.H new file mode 100644 index 0000000..8efa1e9 --- /dev/null +++ b/Signal/IX8/MODEL/MATH_04.H @@ -0,0 +1,40 @@ +#ifndef _CFure_H_ + + #define _CFure_H_ + + #include + using namespace std; + + #define PI 3.14159265358979323846 + + typedef complex DComplex; + + class CFure + { + // ... + double T; + int N; + + int st( int n, int np ); + + public: + CFure() + { + memset( this, 0, sizeof( CFure ) ); + } + CFure( double t, int n ) : T( t ), N( n ) + { + } + + void ReInit( double T, int N ) + { + this -> T = T; + this -> N = N; + } + + void Direct( DComplex *U, DComplex *Uf ); + void Reverse( DComplex *Uf, DComplex *U ); + void Fft( DComplex *X, int Sign, int Np, double T ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_00.cpp b/Signal/IX8/MODEL/math_00.cpp new file mode 100644 index 0000000..ad798da --- /dev/null +++ b/Signal/IX8/MODEL/math_00.cpp @@ -0,0 +1,57 @@ +#include "StdAfx.h" +#include "Math_00.h" + +int CNet::ReLoad( int size ) +{ + if( Size ) + delete[] Data; + + if( ( Data = new double [ Size = size ] ) == NULL ) + return 0; + + return 1; +} + +int CNet::ReCalc( double a, double b, double step ) +{ + int Size = ( int ) ( ( b - a ) / step ) + 1; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( double w, double step ) +{ + int Size = ( int ) ( w / step ) + 1; + double a = -w / 2.0; + + if( ReLoad( Size ) ) + { + for( int i = 0 ; i < Size ; i++ ) + Data[i] = a + i * step; + + return 1; + } + + return 0; +} + +int CNet::ReCalc( int n, double step ) +{ + if( ReLoad( n ) ) + { + for( int i = 0 ; i < n ; i++ ) + Data[i] = i * step; + + return 1; + } + + return 0; +} \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_00.h b/Signal/IX8/MODEL/math_00.h new file mode 100644 index 0000000..53cc4b9 --- /dev/null +++ b/Signal/IX8/MODEL/math_00.h @@ -0,0 +1,26 @@ +#ifndef _CNet_H_ + + #define _CNet_H_ + + class CNet + { + public: + CNet() : Data( NULL ), Size( 0 ) + { + } + ~CNet() + { + if( Size ) + delete[] Data; + } + + double *Data; + int Size; + + int ReLoad( int size ); + int ReCalc( double a, double b, double step ); + int ReCalc( double w, double step ); + int ReCalc( int n, double step ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_01.cpp b/Signal/IX8/MODEL/math_01.cpp new file mode 100644 index 0000000..2833808 --- /dev/null +++ b/Signal/IX8/MODEL/math_01.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_01.h" + +int CImpulse::Delta( double t ) +{ + if( To == t ) + return 1; + + return 0; +} + +double CImpulse::Value( double t ) +{ + return A * Delta( t ); +} \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_01.h b/Signal/IX8/MODEL/math_01.h new file mode 100644 index 0000000..04d9512 --- /dev/null +++ b/Signal/IX8/MODEL/math_01.h @@ -0,0 +1,20 @@ +#ifndef _CImpulse_H_ + + #define _CInpulse_H_ + + class CImpulse + { + double A; + double To; + + int Delta( double t ); + + public: + CImpulse( double a, double to ) : A( a ), To( to ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_02.cpp b/Signal/IX8/MODEL/math_02.cpp new file mode 100644 index 0000000..d72e505 --- /dev/null +++ b/Signal/IX8/MODEL/math_02.cpp @@ -0,0 +1,15 @@ +#include "StdAfx.h" +#include "Math_02.h" + +int CStep:: Rect( double t ) +{ + if( 0.0 <= t && t <= 1.0 ) + return 1; + + return 0; +} + +double CStep::Value( double t ) +{ + return A * Rect( ( t - T ) / T ); +} \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_02.h b/Signal/IX8/MODEL/math_02.h new file mode 100644 index 0000000..a77ade6 --- /dev/null +++ b/Signal/IX8/MODEL/math_02.h @@ -0,0 +1,20 @@ +#ifndef _CStep_H_ + + #define _CStep_H_ + + class CStep + { + double A; + double T; + + int Rect( double t ); + + public: + CStep( double a, double t ) : A( a ), T( t ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_03.cpp b/Signal/IX8/MODEL/math_03.cpp new file mode 100644 index 0000000..c7f105c --- /dev/null +++ b/Signal/IX8/MODEL/math_03.cpp @@ -0,0 +1,7 @@ +#include "StdAfx.h" +#include "Math_03.h" + +double CGauss::Value( double t ) +{ + return A * exp( -( t - To ) * ( t - To ) / S ); +} \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_03.h b/Signal/IX8/MODEL/math_03.h new file mode 100644 index 0000000..8c66d2f --- /dev/null +++ b/Signal/IX8/MODEL/math_03.h @@ -0,0 +1,21 @@ +#ifndef _CGauss_H_ + + #define _CGauss_H_ + + #include + + class CGauss + { + double A; + double To; + double S; + + public: + CGauss( double a, double to, double s ) : A( a ), To( to ), S( s ) + { + } + + double Value( double t ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_09.cpp b/Signal/IX8/MODEL/math_09.cpp new file mode 100644 index 0000000..42f9cd1 --- /dev/null +++ b/Signal/IX8/MODEL/math_09.cpp @@ -0,0 +1,33 @@ +#include "StdAfx.h" +#include "Math_09.h" + +// возвращает амплитуду сигнала +double CMix::FindA( DComplex *U, int Size ) +{ + double A = abs( U[0] ); + + for( int i = 1 ; i < Size ; i++ ) + { + if( A < abs( U[i] ) ) + A = abs( U[i] ); + } + + return A; +} + +// вносит в сигнал U Count помех +void CMix:: Mix( DComplex *U, int N, int Count ) +{ + double A = FindA( U, N ); + + for( int i = 0, j ; i < Count ; i++ ) + { + do{ + + j = ( int ) ( N * Rand() + 0.5 ); + + }while( j >= N ); + + U[j] += A * Rand(); + } +} \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_09.h b/Signal/IX8/MODEL/math_09.h new file mode 100644 index 0000000..aac9cbc --- /dev/null +++ b/Signal/IX8/MODEL/math_09.h @@ -0,0 +1,28 @@ +#ifndef _CMix_H_ + + #define _CMix_H_ + + #include + #include "Math_04.h" + + class CMix + { + // случайное число в диапазоне [ 0.0; 1.0 ) + double Rand() + { + return ( double ) rand() / RAND_MAX; + } + // возвращает амплитуду сигнала + double FindA( DComplex *U, int Size ); + + public: + CMix() + { + memset( this, 0, sizeof( CMix ) ); + } + + // вносит в сигнал U Count помех + void Mix( DComplex *U, int N, int Count ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_10.cpp b/Signal/IX8/MODEL/math_10.cpp new file mode 100644 index 0000000..d6df9d2 --- /dev/null +++ b/Signal/IX8/MODEL/math_10.cpp @@ -0,0 +1,70 @@ +#include "StdAfx.h" +#include "Math_10.h" + +void CFilter:: Sort( DComplex *M, int Nm ) +{ + DComplex temp; + + for( int i = 0, k ; i < Nm-1 ; i++ ) + { + k = i; + + for( int j = i + 1 ; j < Nm ; j++ ) + if( abs( M[j] ) < abs( M[k] ) ) k = j; + + temp = M[k]; + M[k] = M[i]; + M[i] = temp; + } +} + +DComplex CFilter:: Med( DComplex *M, int Nm ) +{ + DComplex MED, *Tmp = new DComplex [Nm]; + + for( int i = 0 ; i < Nm ; i++ ) + Tmp[i] = M[i]; + + Sort( Tmp, Nm ); + + MED = Tmp[ Nm / 2 ]; + + delete[] Tmp; + + return MED; + +/* + DComplex Tmp = DComplex( 0.0, 0.0 ); + + for( int i = 0 ; i < Nm ; i++ ) + Tmp += M[i]; + + return Tmp / ( double ) Nm; +*/ +} + +void CFilter::Filter( DComplex *Ui, DComplex *Uv, int N, int Nm, double Delta ) +{ + int i, beg, Half = Nm / 2; + DComplex MED; + + for( i = 0 ; i < N ; i++ ) + { + if( i - Half < 0 ) + beg = 0; + else + { + if( i + Half >= N ) + beg = N - Nm; + else + beg = i - Half; + } + + MED = Med( &Ui[beg], Nm ); + + if( abs( Ui[i] - MED ) < Delta ) + Uv[i] = Ui[i]; + else + Uv[i] = MED; + } +} \ No newline at end of file diff --git a/Signal/IX8/MODEL/math_10.h b/Signal/IX8/MODEL/math_10.h new file mode 100644 index 0000000..b25e7e3 --- /dev/null +++ b/Signal/IX8/MODEL/math_10.h @@ -0,0 +1,21 @@ +#ifndef _CFilter_H_ + + #define _CFilter_H_ + + #include + #include "Math_04.h" + + class CFilter + { + void Sort( DComplex *M, int Nm ); + DComplex Med( DComplex *M, int Nm ); + + public: + CFilter() + { + } + + void Filter( DComplex *Ui, DComplex *Uv, int N, int Nm, double Delta ); + }; + +#endif \ No newline at end of file diff --git a/Signal/IX8/NEWDOC.CPP b/Signal/IX8/NEWDOC.CPP new file mode 100644 index 0000000..c0afe49 --- /dev/null +++ b/Signal/IX8/NEWDOC.CPP @@ -0,0 +1,197 @@ +#include "StdAfx.h" +#include "NewDoc.h" + + +CNewDoc:: CNewDoc() +{ + T = 0.0; + N = 0; + + // исходный сигнал + Ag1 = 1.0; + Tog1 = 1.5; + Sg1 = 2.0; + + U = NULL; + Ui = NULL; + Uv = NULL; + I = NULL; + V = NULL; + + YexView = NULL; + YapView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + ReInit( 3.0, 50 ); +} + +CNewDoc::~CNewDoc() +{ + if( U ) + delete[] U; + if( Ui ) + delete[] Ui; + if( Uv ) + delete[] Uv; + if( V ) + delete[] V; + if( I ) + delete[] I; +} + + +int CNewDoc::Allocate( DComplex **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new DComplex [Size] ) == NULL ) + return 0; + + return 1; +} + +int CNewDoc::Allocate( double **Des, int Size ) +{ + if( *Des ) + delete[] *Des; + + if( ( *Des = new double [Size] ) == NULL ) + return 0; + + return 1; +} + +void CNewDoc::Convert( DComplex *Src, double *Des, int What ) +{ + int i, HalfSize = N / 2, Delta = HalfSize; + + for( i = 0 ; i < N ; i++ ) + Des[i] = abs( Src[i] )/* * abs( Src[i] )*/; + + // перестановка нужна, т.к. спектр получаем шиворот-навыворот + if( What ) + { + if( N % 2 ) + Delta++; + + for( i = 0 ; i < HalfSize ; i++ ) + { + double Tmp = Des[i+Delta]; + + Des[i+Delta] = Des[i]; + Des[i] = Tmp; + } + } +} + +// возвращает степень, в которую нужно вознести 2 чтобы получить N +int CNewDoc::GetPower( int N ) +{ + int n = 2, i = 1; + + while( n < N ) + { + n *= 2; + i += 1; + } + + return i; +} + +int CNewDoc::ReInit( double t, int n ) +{ + YexView = NULL; + YapView = NULL; + XView = NULL; + SView = 0; + NView = NULL; + + if( t < 0.0 || n < 0 ) + return 0; + + if( T != t || N != n ) + { + T = t; + N = n; + + if( !Xu.ReCalc( N, T / N ) ) + return 0; + + if( !Allocate( &U, N ) ) + return 0; + if( !Allocate( &Ui, N ) ) + return 0; + if( !Allocate( &Uv, N ) ) + return 0; + if( !Allocate( &V, N ) ) + return 0; + if( !Allocate( &I, N ) ) + return 0; + } + + return 1; +} + +void CNewDoc::SignalC( void ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; +} + +void CNewDoc::Direct( int Nm ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + CGauss Gauss( Ag1, Tog1, Sg1 ); + CMix Mix; + + for( int i = 0 ; i < Xu.Size ; i++ ) + { + U[i] = Ui[i] = DComplex( Gauss.Value( Xu.Data[i] ), 0.0 ); + } + + Mix.Mix( Ui, N, Nm ); + + Convert( Ui, I, 0 ); + + strcpy ( NCalc, "Искаженный сигнал." ); + + XView = Xu.Data; + YexView = I; + SView = Xu.Size; + NView = NCalc; +} + +void CNewDoc::Alpha( int Nm, double Delta ) +{ + XView = NULL; + YexView = NULL; + YapView = NULL; + SView = 0; + NView = NULL; + + CFilter Filter; + + Filter.Filter( Ui, Uv, N, Nm, Delta ); + + Convert( U, I, 0 ); + Convert( Uv, V, 0 ); + + strcpy ( NCalc, "Восстановленный сигнал ( зеленый )." ); + + XView = Xu.Data; + YexView = I; + YapView = V; + SView = Xu.Size; + NView = NCalc; +} \ No newline at end of file diff --git a/Signal/IX8/NEWDOC.H b/Signal/IX8/NEWDOC.H new file mode 100644 index 0000000..09b7a2c --- /dev/null +++ b/Signal/IX8/NEWDOC.H @@ -0,0 +1,60 @@ +#ifndef _CNewDoc_H_ + + #define _CNewDoc_H_ + + #include "Model\math_00.h" + #include "Model\math_03.h" + #include "Model\math_09.h" + #include "Model\math_10.h" + + #define L 100 + + class CNewDoc + { + + + // ... + CNet Xu; + DComplex *U; + DComplex *Ui; + DComplex *Uv; + // ... + double *I; + double *V; + // ... + char NCalc[L]; + + int Allocate( DComplex **Des, int Size ); + int Allocate( double **Des, int Size ); + void Convert( DComplex *Src, double *Des, int What ); + int GetPower( int N ); + + public: + CNewDoc(); + ~CNewDoc(); + + // ... + double T; + int N; + // ... + double Ag1; + double Tog1; + double Sg1; + + // ... + double *XView; + double *YexView; + double *YapView; + int SView; + // ... + char *NView; + + int ReInit( double t, int n ); + + void SignalC( void ); + void Direct( int N ); + void Alpha( int Nm, double Delta ); + + }; + +#endif \ No newline at end of file diff --git a/Signal/IX8/StdAfx.cpp b/Signal/IX8/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/Signal/IX8/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/Signal/IX8/StdAfx.h b/Signal/IX8/StdAfx.h new file mode 100644 index 0000000..449b474 --- /dev/null +++ b/Signal/IX8/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#if !defined(AFX_STDAFX_H__192B3AC4_A76D_11D3_8E34_00504E02C39D__INCLUDED_) +#define AFX_STDAFX_H__192B3AC4_A76D_11D3_8E34_00504E02C39D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0400 +#endif +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__192B3AC4_A76D_11D3_8E34_00504E02C39D__INCLUDED) diff --git a/Signal/IX8/resource.h b/Signal/IX8/resource.h new file mode 100644 index 0000000..71378da --- /dev/null +++ b/Signal/IX8/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by IX8.rc +// +#define IDS_PROJNAME 100 +#define IDR_IXL8 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/Signal/MainForm.frm b/Signal/MainForm.frm new file mode 100644 index 0000000..0848d18 --- /dev/null +++ b/Signal/MainForm.frm @@ -0,0 +1,3219 @@ +VERSION 5.00 +Object = "{2037E3AD-18D6-101C-8158-221E4B551F8E}#5.0#0"; "Vsocx32.ocx" +Object = "{D2FFAA40-074A-11D1-BAA2-444553540000}#3.0#0"; "VsVIEW3.ocx" +Begin VB.Form MainForm + Appearance = 0 'Flat + BackColor = &H80000005& + ClientHeight = 5340 + ClientLeft = 720 + ClientTop = 80505 + ClientWidth = 7380 + ControlBox = 0 'False + LinkTopic = "Form1" + MaxButton = 0 'False + MinButton = 0 'False + PaletteMode = 1 'UseZOrder + ScaleHeight = 5340 + ScaleWidth = 7380 + StartUpPosition = 1 'CenterOwner + Begin VsOcxLib.VideoSoftElastic VSElastic1 + Height = 5340 + Left = 510 + TabIndex = 0 + Top = 0 + Width = 6870 + _Version = 327680 + _ExtentX = 12118 + _ExtentY = 9419 + _StockProps = 70 + BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} + Name = "MS Sans Serif" + Size = 8.25 + Charset = 204 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ConvInfo = 1418783674 + BackColor = 8421504 + Align = 5 + AutoSizeChildren= 2 + BorderWidth = 0 + ChildSpacing = 0 + BevelOuter = 0 + BevelInnerWidth = 0 + BevelOuterWidth = 0 + BevelChildren = 3 + Begin VsOcxLib.VideoSoftIndexTab TabRight + Height = 5340 + Left = 0 + TabIndex = 1 + Top = 0 + Width = 6870 + _Version = 327680 + _ExtentX = 12118 + _ExtentY = 9419 + _StockProps = 102 + Caption = "1|2|3|4|5|6|7|8" + BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} + Name = "Arial CYR" + Size = 11.25 + Charset = 204 + Weight = 400 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ConvInfo = 1418783674 + BackColor = 8421504 + ForeColor = 16777215 + FrontTabColor = 12632256 + BackTabColor = 12632256 + Style = 3 + Position = 4 + ShowFocusRect = 0 'False + TabsPerPage = 8 + BoldCurrent = -1 'True + FrontTabForeColor= 16777215 + TabHeight = 500 + Begin VsOcxLib.VideoSoftElastic EllCnt + Height = 5250 + Index = 7 + Left = 76845 + TabIndex = 73 + TabStop = 0 'False + Top = 45 + Width = 6285 + _Version = 327680 + _ExtentX = 11086 + _ExtentY = 9260 + _StockProps = 70 + ConvInfo = 1418783674 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VB.OptionButton Option_H_8 + Caption = "Показать сигнал с помехой" + Height = 345 + Left = 1995 + TabIndex = 153 + Top = 3975 + Value = -1 'True + Width = 2685 + End + Begin VB.OptionButton Option_Out_8 + Caption = "Сглаженный сигнал" + Height = 345 + Left = 1995 + MaskColor = &H000000FF& + TabIndex = 152 + Top = 4290 + Width = 2475 + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic22 + Height = 2100 + Left = 180 + TabIndex = 154 + TabStop = 0 'False + Top = 225 + Width = 2925 + _Version = 327680 + _ExtentX = 5159 + _ExtentY = 3704 + _StockProps = 70 + Caption = "Входной сигнал Гаусса" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Np_8 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1800 + TabIndex = 67 + Text = "5" + Top = 1650 + Width = 780 + End + Begin VB.TextBox Text_A_8 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 1800 + TabIndex = 64 + Text = "5" + Top = 420 + Width = 780 + End + Begin VB.TextBox Text_Sigma_8 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 1800 + TabIndex = 66 + Text = "5" + Top = 1245 + Width = 780 + End + Begin VB.TextBox Text_To_8 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1800 + TabIndex = 65 + Text = "5" + Top = 825 + Width = 780 + End + Begin VB.Label Label60 + BackStyle = 0 'Transparent + Caption = "Число помех" + Height = 315 + Left = 210 + TabIndex = 164 + Top = 1635 + Width = 1050 + End + Begin VB.Label Label54 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 195 + Left = 210 + TabIndex = 157 + Top = 450 + Width = 960 + End + Begin VB.Label Label53 + BackStyle = 0 'Transparent + Caption = "Sigma" + Height = 300 + Left = 210 + TabIndex = 156 + Top = 1230 + Width = 1050 + End + Begin VB.Label Label52 + BackStyle = 0 'Transparent + Caption = "To" + Height = 225 + Left = 210 + TabIndex = 155 + Top = 840 + Width = 1170 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic23 + Height = 1365 + Left = 1440 + TabIndex = 158 + TabStop = 0 'False + Top = 2505 + Width = 3555 + _Version = 327680 + _ExtentX = 6271 + _ExtentY = 2408 + _StockProps = 70 + Caption = "Дискретизация" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_T_8 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2400 + TabIndex = 70 + Text = "5" + Top = 420 + Width = 780 + End + Begin VB.TextBox Text_N_8 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2415 + TabIndex = 71 + Text = "4" + Top = 855 + Width = 780 + End + Begin VB.Label Label56 + BackStyle = 0 'Transparent + Caption = "Ширина" + Height = 210 + Left = 405 + TabIndex = 160 + Top = 450 + Width = 1230 + End + Begin VB.Label Label55 + BackStyle = 0 'Transparent + Caption = "Число точек" + Height = 285 + Left = 405 + TabIndex = 159 + Top = 855 + Width = 1680 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic24 + Height = 1305 + Left = 3285 + TabIndex = 161 + TabStop = 0 'False + Top = 225 + Width = 2850 + _Version = 327680 + _ExtentX = 5027 + _ExtentY = 2302 + _StockProps = 70 + Caption = "Параметры голосования" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Delta_8 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1815 + TabIndex = 69 + Text = "5" + Top = 840 + Width = 780 + End + Begin VB.TextBox Text_Nm_8 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 1815 + TabIndex = 68 + Text = "5" + Top = 405 + Width = 780 + End + Begin VB.Label Label59 + BackStyle = 0 'Transparent + Caption = "Порог" + Height = 225 + Left = 210 + TabIndex = 163 + Top = 870 + Width = 1410 + End + Begin VB.Label Label57 + BackStyle = 0 'Transparent + Caption = "Nm" + Height = 210 + Left = 210 + TabIndex = 162 + Top = 435 + Width = 960 + End + End + End + Begin VsOcxLib.VideoSoftElastic EllCnt + Height = 5250 + Index = 6 + Left = 76545 + TabIndex = 61 + TabStop = 0 'False + Top = 45 + Width = 6285 + _Version = 327680 + _ExtentX = 11086 + _ExtentY = 9260 + _StockProps = 70 + ConvInfo = 1418783674 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VB.TextBox Text_SY_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 1740 + TabIndex = 63 + Text = "1" + Top = 4365 + Width = 780 + End + Begin VB.TextBox Text_SX_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 330 + Left = 1740 + TabIndex = 62 + Text = "1" + Top = 3825 + Width = 780 + End + Begin VB.OptionButton Option_H_7 + Height = 315 + Left = 3255 + TabIndex = 132 + Top = 2415 + Value = -1 'True + Width = 300 + End + Begin VB.OptionButton Option_R_7 + Height = 300 + Left = 3255 + MaskColor = &H000000FF& + TabIndex = 131 + Top = 3765 + Width = 510 + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic17 + Height = 1530 + Left = 120 + TabIndex = 133 + TabStop = 0 'False + Top = 315 + Width = 2985 + _Version = 327680 + _ExtentX = 5265 + _ExtentY = 2699 + _StockProps = 70 + Caption = "Исходный сигнал (Гаусса)" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_A2_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1875 + TabIndex = 48 + Text = "5" + Top = 360 + Width = 780 + End + Begin VB.TextBox Text_S2_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1875 + TabIndex = 50 + Text = "5" + Top = 1080 + Width = 780 + End + Begin VB.TextBox Text_T2_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 1875 + TabIndex = 49 + Text = "5" + Top = 720 + Width = 780 + End + Begin VB.Label Label40 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 195 + Left = 210 + TabIndex = 136 + Top = 420 + Width = 1020 + End + Begin VB.Label Label39 + BackStyle = 0 'Transparent + Caption = "Sigma" + Height = 255 + Left = 180 + TabIndex = 135 + Top = 1110 + Width = 750 + End + Begin VB.Label Label38 + BackStyle = 0 'Transparent + Caption = "To" + Height = 180 + Left = 195 + TabIndex = 134 + Top = 780 + Width = 525 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic18 + Height = 1215 + Left = 120 + TabIndex = 137 + TabStop = 0 'False + Top = 1965 + Width = 2820 + _Version = 327680 + _ExtentX = 4974 + _ExtentY = 2143 + _StockProps = 70 + Caption = "Дискретизация" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_N_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 1695 + TabIndex = 55 + Text = "4" + Top = 735 + Width = 780 + End + Begin VB.TextBox Text_T_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1695 + TabIndex = 54 + Text = "5" + Top = 330 + Width = 780 + End + Begin VB.Label Label42 + BackStyle = 0 'Transparent + Caption = "Ширина" + Height = 180 + Left = 225 + TabIndex = 139 + Top = 390 + Width = 1005 + End + Begin VB.Label Label41 + BackStyle = 0 'Transparent + Caption = "Число точек" + Height = 255 + Left = 240 + TabIndex = 138 + Top = 765 + Width = 1050 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic19 + Height = 1530 + Left = 3195 + TabIndex = 140 + TabStop = 0 'False + Top = 315 + Width = 3000 + _Version = 327680 + _ExtentX = 5292 + _ExtentY = 2699 + _StockProps = 70 + Caption = "Идеальный сигнал (Гаусса)" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_T1_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2025 + TabIndex = 52 + Text = "5" + Top = 720 + Width = 780 + End + Begin VB.TextBox Text_S1_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2025 + TabIndex = 53 + Text = "5" + Top = 1080 + Width = 780 + End + Begin VB.TextBox Text_A1_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2025 + TabIndex = 51 + Text = "5" + Top = 360 + Width = 780 + End + Begin VB.Label Label45 + BackStyle = 0 'Transparent + Caption = "To" + Height = 180 + Left = 195 + TabIndex = 143 + Top = 780 + Width = 615 + End + Begin VB.Label Label44 + BackStyle = 0 'Transparent + Caption = "Sigma" + Height = 255 + Left = 195 + TabIndex = 142 + Top = 1110 + Width = 630 + End + Begin VB.Label Label43 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 195 + Left = 195 + TabIndex = 141 + Top = 435 + Width = 1065 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic20 + Height = 1215 + Left = 3780 + TabIndex = 144 + TabStop = 0 'False + Top = 1965 + Width = 2415 + _Version = 327680 + _ExtentX = 4260 + _ExtentY = 2143 + _StockProps = 70 + Caption = "Импульсный отклик" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Step1_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 1395 + TabIndex = 57 + Text = "4" + Top = 735 + Width = 780 + End + Begin VB.TextBox Text_Alpha1_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1395 + TabIndex = 56 + Text = "5" + Top = 330 + Width = 780 + End + Begin VB.Label Label47 + BackStyle = 0 'Transparent + Caption = "Step" + Height = 255 + Left = 315 + TabIndex = 146 + Top = 765 + Width = 810 + End + Begin VB.Label Label46 + BackStyle = 0 'Transparent + Caption = "Alpha" + Height = 180 + Left = 315 + TabIndex = 145 + Top = 390 + Width = 810 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic21 + Height = 1230 + Left = 3780 + TabIndex = 147 + TabStop = 0 'False + Top = 3315 + Width = 2415 + _Version = 327680 + _ExtentX = 4260 + _ExtentY = 2170 + _StockProps = 70 + Caption = "Ro(alpha)" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Alpha2_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 1410 + TabIndex = 58 + Text = "5" + Top = 315 + Width = 780 + End + Begin VB.TextBox Text_Step2_7 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1410 + TabIndex = 59 + Text = "4" + Top = 735 + Width = 780 + End + Begin VB.Label Label49 + BackStyle = 0 'Transparent + Caption = "Alpha" + Height = 180 + Left = 315 + TabIndex = 149 + Top = 375 + Width = 810 + End + Begin VB.Label Label48 + BackStyle = 0 'Transparent + Caption = "Step" + Height = 270 + Left = 315 + TabIndex = 148 + Top = 765 + Width = 795 + End + End + Begin VB.Label Label51 + BackStyle = 0 'Transparent + Caption = "Масштаб Y" + Height = 270 + Left = 630 + TabIndex = 151 + Top = 4395 + Width = 975 + End + Begin VB.Label Label50 + BackStyle = 0 'Transparent + Caption = "Масштаб X" + Height = 195 + Left = 630 + TabIndex = 150 + Top = 3900 + Width = 870 + End + End + Begin VsOcxLib.VideoSoftElastic EllCnt + Height = 5250 + Index = 5 + Left = 76245 + TabIndex = 47 + TabStop = 0 'False + Top = 45 + Width = 6285 + _Version = 327680 + _ExtentX = 11086 + _ExtentY = 9260 + _StockProps = 70 + ConvInfo = 1418783674 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VB.OptionButton Option_Ff_6 + Caption = "Отфильтрованный сигнал" + Height = 270 + Left = 1695 + MaskColor = &H000000FF& + TabIndex = 111 + Top = 4515 + Width = 2850 + End + Begin VB.OptionButton Option_Hc_6 + Caption = "Показать сигнал с помехой" + Height = 270 + Left = 1695 + TabIndex = 110 + Top = 4185 + Value = -1 'True + Width = 3345 + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic14 + Height = 1635 + Left = 1245 + TabIndex = 112 + TabStop = 0 'False + Top = 2325 + Width = 3780 + _Version = 327680 + _ExtentX = 6667 + _ExtentY = 2884 + _StockProps = 70 + Caption = "Входной сигнал Гаусса" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_To_6 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2700 + TabIndex = 115 + Text = "47" + Top = 750 + Width = 780 + End + Begin VB.TextBox Text_Sigma_6 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2700 + TabIndex = 114 + Text = "48" + Top = 1155 + Width = 780 + End + Begin VB.TextBox Text_Ampl_6 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2700 + TabIndex = 113 + Text = "46" + Top = 330 + Width = 780 + End + Begin VB.Label Label32 + BackStyle = 0 'Transparent + Caption = "To" + Height = 195 + Left = 330 + TabIndex = 118 + Top = 810 + Width = 585 + End + Begin VB.Label Label31 + BackStyle = 0 'Transparent + Caption = "Sigma" + Height = 315 + Left = 330 + TabIndex = 117 + Top = 1155 + Width = 1020 + End + Begin VB.Label Label30 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 210 + Left = 330 + TabIndex = 116 + Top = 390 + Width = 1620 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic15 + Height = 1215 + Left = 3645 + TabIndex = 119 + TabStop = 0 'False + Top = 540 + Width = 2460 + _Version = 327680 + _ExtentX = 4339 + _ExtentY = 2143 + _StockProps = 70 + Caption = "Дискретизация" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_N_6 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 1425 + TabIndex = 121 + Text = "44" + Top = 330 + Width = 780 + End + Begin VB.TextBox Text_T_6 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 1425 + TabIndex = 120 + Text = "45" + Top = 780 + Width = 780 + End + Begin VB.Label Label34 + BackStyle = 0 'Transparent + Caption = "Число точек" + Height = 270 + Left = 225 + TabIndex = 123 + Top = 345 + Width = 1140 + End + Begin VB.Label Label33 + BackStyle = 0 'Transparent + Caption = "Ширина" + Height = 210 + Left = 240 + TabIndex = 122 + Top = 810 + Width = 1050 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic16 + Height = 1650 + Left = 180 + TabIndex = 124 + TabStop = 0 'False + Top = 375 + Width = 3285 + _Version = 327680 + _ExtentX = 5794 + _ExtentY = 2910 + _StockProps = 70 + Caption = "Помеха (сигнал Гаусса)" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Ampl2_6 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2010 + TabIndex = 127 + Text = "41" + Top = 375 + Width = 780 + End + Begin VB.TextBox Text_Sigma2_6 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2010 + TabIndex = 126 + Text = "43" + Top = 1155 + Width = 780 + End + Begin VB.TextBox Text_To2_6 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2010 + TabIndex = 125 + Text = "42" + Top = 750 + Width = 780 + End + Begin VB.Label Label37 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 240 + Left = 210 + TabIndex = 130 + Top = 405 + Width = 1185 + End + Begin VB.Label Label36 + BackStyle = 0 'Transparent + Caption = "Sigma" + Height = 240 + Left = 210 + TabIndex = 129 + Top = 1200 + Width = 1020 + End + Begin VB.Label Label35 + BackStyle = 0 'Transparent + Caption = "To" + Height = 255 + Left = 210 + TabIndex = 128 + Top = 780 + Width = 885 + End + End + End + Begin VsOcxLib.VideoSoftElastic EllCnt + Height = 5250 + Index = 4 + Left = 75945 + TabIndex = 18 + TabStop = 0 'False + Top = 45 + Width = 6285 + _Version = 327680 + _ExtentX = 11086 + _ExtentY = 9260 + _StockProps = 70 + ConvInfo = 1418783674 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VB.OptionButton Option_Hc_5 + Caption = "Показать сигнал с помехой" + Height = 270 + Left = 1965 + TabIndex = 39 + Top = 4005 + Value = -1 'True + Width = 2580 + End + Begin VB.OptionButton Option_Flt_5 + Caption = "Отфильтрованный сигнал" + Height = 240 + Left = 1965 + MaskColor = &H000000FF& + TabIndex = 40 + Top = 4350 + Width = 2730 + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic12 + Height = 1710 + Left = 1215 + TabIndex = 165 + TabStop = 0 'False + Top = 555 + Width = 3945 + _Version = 327680 + _ExtentX = 6959 + _ExtentY = 3016 + _StockProps = 70 + Caption = "Входной сигнал Гаусса" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_To_5 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2835 + TabIndex = 35 + Text = "5" + Top = 825 + Width = 780 + End + Begin VB.TextBox Text_Sigma_5 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2835 + TabIndex = 36 + Text = "5" + Top = 1290 + Width = 780 + End + Begin VB.TextBox Text_Ampl_5 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2835 + TabIndex = 34 + Text = "5" + Top = 360 + Width = 780 + End + Begin VB.Label Label25 + BackStyle = 0 'Transparent + Caption = "To" + Height = 210 + Left = 360 + TabIndex = 168 + Top = 855 + Width = 1275 + End + Begin VB.Label Label26 + BackStyle = 0 'Transparent + Caption = "Sigma" + Height = 255 + Left = 360 + TabIndex = 167 + Top = 1305 + Width = 1245 + End + Begin VB.Label Label27 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 270 + Left = 360 + TabIndex = 166 + Top = 375 + Width = 1230 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic13 + Height = 1380 + Left = 1215 + TabIndex = 169 + TabStop = 0 'False + Top = 2430 + Width = 3945 + _Version = 327680 + _ExtentX = 6959 + _ExtentY = 2434 + _StockProps = 70 + Caption = "Параметры" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_B_5 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2835 + TabIndex = 38 + Text = "4" + Top = 900 + Width = 780 + End + Begin VB.TextBox Text_Nhc_5 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2835 + TabIndex = 37 + Text = "5" + Top = 420 + Width = 780 + End + Begin VB.Label Label28 + BackStyle = 0 'Transparent + Caption = "Ширина фильтра (B)" + Height = 240 + Left = 360 + TabIndex = 171 + Top = 915 + Width = 1695 + End + Begin VB.Label Label29 + BackStyle = 0 'Transparent + Caption = "Число помех" + Height = 225 + Left = 360 + TabIndex = 170 + Top = 435 + Width = 1770 + End + End + End + Begin VsOcxLib.VideoSoftElastic EllCnt + Height = 5250 + Index = 3 + Left = 75645 + TabIndex = 17 + TabStop = 0 'False + Top = 45 + Width = 6285 + _Version = 327680 + _ExtentX = 11086 + _ExtentY = 9260 + _StockProps = 70 + ConvInfo = 1418783674 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VB.CheckBox Check_ShowIn_4 + BackColor = &H0082B8DC& + Caption = "Показать входной сигнал" + Height = 285 + Left = 1800 + TabIndex = 32 + Top = 4095 + Value = 1 'Checked + Width = 2565 + End + Begin VB.CheckBox Check_ShowImp_4 + BackColor = &H0082B8DC& + Caption = "Показать импульсный отклик" + Height = 285 + Left = 1800 + TabIndex = 33 + Top = 4425 + Value = 1 'Checked + Width = 2940 + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic11 + Height = 1755 + Left = 735 + TabIndex = 103 + TabStop = 0 'False + Top = 495 + Width = 4830 + _Version = 327680 + _ExtentX = 8520 + _ExtentY = 3096 + _StockProps = 70 + Caption = "Дискретизация" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_X2_4 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 3705 + TabIndex = 28 + Text = "5" + Top = 825 + Width = 780 + End + Begin VB.TextBox Text_N_4 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 3705 + TabIndex = 29 + Text = "5" + Top = 1230 + Width = 780 + End + Begin VB.TextBox Text_X1_4 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 3705 + TabIndex = 27 + Text = "5" + Top = 405 + Width = 780 + End + Begin VB.Label Label24 + BackStyle = 0 'Transparent + Caption = "X2" + Height = 195 + Left = 885 + TabIndex = 106 + Top = 870 + Width = 2130 + End + Begin VB.Label Label23 + BackStyle = 0 'Transparent + Caption = "Число точек" + Height = 300 + Left = 855 + TabIndex = 105 + Top = 1230 + Width = 2265 + End + Begin VB.Label Label22 + BackStyle = 0 'Transparent + Caption = "X1" + Height = 210 + Left = 915 + TabIndex = 104 + Top = 450 + Width = 1635 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic10 + Height = 1425 + Left = 990 + TabIndex = 107 + TabStop = 0 'False + Top = 2475 + Width = 4350 + _Version = 327680 + _ExtentX = 7673 + _ExtentY = 2514 + _StockProps = 70 + Caption = "Сигма сигнала Гаусса (A=1,To=0)" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Sg2_4 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 3240 + TabIndex = 31 + Text = "4" + Top = 855 + Width = 780 + End + Begin VB.TextBox Text_Sg1_4 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 3240 + TabIndex = 30 + Text = "5" + Top = 435 + Width = 780 + End + Begin VB.Label Label20 + BackStyle = 0 'Transparent + Caption = "Отклик" + Height = 315 + Left = 390 + TabIndex = 109 + Top = 825 + Width = 1380 + End + Begin VB.Label Label21 + BackStyle = 0 'Transparent + Caption = "Импульс" + Height = 225 + Left = 390 + TabIndex = 108 + Top = 450 + Width = 1890 + End + End + End + Begin VsOcxLib.VideoSoftElastic EllCnt + Height = 5250 + Index = 2 + Left = 75345 + TabIndex = 16 + TabStop = 0 'False + Top = 45 + Width = 6285 + _Version = 327680 + _ExtentX = 11086 + _ExtentY = 9260 + _StockProps = 70 + ConvInfo = 1418783674 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VB.OptionButton Option_SI_G + Height = 405 + Left = 570 + MaskColor = &H000000FF& + TabIndex = 21 + Top = 3750 + Width = 735 + End + Begin VB.OptionButton Option_SI_F + Height = 315 + Left = 600 + TabIndex = 20 + Top = 2280 + Value = -1 'True + Width = 750 + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic6 + Height = 1395 + Left = 165 + TabIndex = 89 + TabStop = 0 'False + Top = 165 + Width = 3840 + _Version = 327680 + _ExtentX = 6773 + _ExtentY = 2461 + _StockProps = 70 + Caption = "Дискретизация" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Diskr_N + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2595 + TabIndex = 91 + Text = "18" + Top = 945 + Width = 840 + End + Begin VB.TextBox Text_Diskr_T + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2595 + TabIndex = 90 + Text = "17" + Top = 435 + Width = 840 + End + Begin VB.Label Label14 + BackStyle = 0 'Transparent + Caption = "Число точек (N)" + Height = 255 + Left = 360 + TabIndex = 95 + Top = 960 + Width = 2040 + End + Begin VB.Label Label12 + BackStyle = 0 'Transparent + Caption = "Ширина (T)" + Height = 285 + Left = 360 + TabIndex = 94 + Top = 435 + Width = 1395 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic7 + Height = 1305 + Left = 1560 + TabIndex = 96 + TabStop = 0 'False + Top = 1785 + Width = 3915 + _Version = 327680 + _ExtentX = 6906 + _ExtentY = 2302 + _StockProps = 70 + Caption = "Ступенчатый сигнал" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_St_T + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2790 + TabIndex = 23 + Text = "4" + Top = 825 + Width = 840 + End + Begin VB.TextBox Text_St_Ampl + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2790 + TabIndex = 22 + Text = "5" + Top = 375 + Width = 840 + End + Begin VB.Label Label16 + BackStyle = 0 'Transparent + Caption = "Период" + Height = 285 + Left = 285 + TabIndex = 102 + Top = 825 + Width = 1695 + End + Begin VB.Label Label15 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 195 + Left = 285 + TabIndex = 97 + Top = 405 + Width = 1695 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic8 + Height = 1620 + Left = 1560 + TabIndex = 98 + TabStop = 0 'False + Top = 3240 + Width = 3915 + _Version = 327680 + _ExtentX = 6906 + _ExtentY = 2857 + _StockProps = 70 + Caption = "Сигнал Гаусса" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_G_Ampl + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2790 + TabIndex = 24 + Text = "5" + Top = 330 + Width = 840 + End + Begin VB.TextBox Text_G_Sigma + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 2790 + TabIndex = 26 + Text = "5" + Top = 1140 + Width = 840 + End + Begin VB.TextBox Text_G_To + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 2790 + TabIndex = 25 + Text = "5" + Top = 735 + Width = 840 + End + Begin VB.Label Label19 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 225 + Left = 285 + TabIndex = 101 + Top = 375 + Width = 945 + End + Begin VB.Label Label18 + BackStyle = 0 'Transparent + Caption = "Сигма" + Height = 300 + Left = 300 + TabIndex = 100 + Top = 1155 + Width = 885 + End + Begin VB.Label Label17 + BackStyle = 0 'Transparent + Caption = "Среднее значение (to)" + Height = 180 + Left = 270 + TabIndex = 99 + Top = 795 + Width = 990 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic9 + Height = 1110 + Left = 4170 + TabIndex = 19 + TabStop = 0 'False + Top = 270 + Width = 1890 + _Version = 327680 + _ExtentX = 3334 + _ExtentY = 1958 + _StockProps = 70 + Caption = "Преоб. Фурье" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.OptionButton Option_F_Fast + Caption = "Быстрое" + Height = 360 + Left = 180 + MaskColor = &H000000FF& + TabIndex = 93 + Top = 630 + Width = 1365 + End + Begin VB.OptionButton Option_F_Form + Caption = "Формула" + Height = 345 + Left = 180 + TabIndex = 92 + Top = 330 + Value = -1 'True + Width = 1410 + End + End + End + Begin VsOcxLib.VideoSoftElastic EllCnt + Height = 5250 + Index = 1 + Left = 75045 + TabIndex = 15 + TabStop = 0 'False + Top = 45 + Width = 6285 + _Version = 327680 + _ExtentX = 11086 + _ExtentY = 9260 + _StockProps = 70 + ConvInfo = 1418783674 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic4 + Height = 1905 + Left = 855 + TabIndex = 77 + TabStop = 0 'False + Top = 585 + Width = 4575 + _Version = 327680 + _ExtentX = 8070 + _ExtentY = 3360 + _StockProps = 70 + Caption = "Сигнал Гаусса" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Ampl_G2 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 3390 + TabIndex = 78 + Text = "12" + Top = 345 + Width = 840 + End + Begin VB.TextBox Text_Sigma_G2 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 3390 + TabIndex = 82 + Text = "14" + Top = 1395 + Width = 840 + End + Begin VB.TextBox Text_T0_G2 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Enabled = 0 'False + Height = 300 + Left = 3390 + TabIndex = 80 + Text = "13" + Top = 870 + Width = 840 + End + Begin VB.Label Label10 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 300 + Left = 360 + TabIndex = 85 + Top = 330 + Width = 1095 + End + Begin VB.Label Label9 + BackStyle = 0 'Transparent + Caption = "Сигма" + Height = 270 + Left = 360 + TabIndex = 81 + Top = 1395 + Width = 735 + End + Begin VB.Label Label8 + BackStyle = 0 'Transparent + Caption = "Среднее значение (to)" + Enabled = 0 'False + Height = 225 + Left = 375 + TabIndex = 79 + Top = 885 + Width = 1875 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic5 + Height = 1605 + Left = 855 + TabIndex = 86 + TabStop = 0 'False + Top = 2760 + Width = 4575 + _Version = 327680 + _ExtentX = 8070 + _ExtentY = 2831 + _StockProps = 70 + Caption = "Параметры восстановления" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Cnt_G2 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 315 + Left = 3390 + TabIndex = 84 + Text = "16" + Top = 1065 + Width = 840 + End + Begin VB.TextBox Text_F_G2 + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 300 + Left = 3390 + TabIndex = 83 + Text = "15" + Top = 465 + Width = 840 + End + Begin VB.Label Label13 + BackStyle = 0 'Transparent + Caption = "Число отсчётов" + Height = 225 + Left = 360 + TabIndex = 88 + Top = 1065 + Width = 1875 + End + Begin VB.Label Label11 + BackStyle = 0 'Transparent + Caption = "F" + Height = 270 + Left = 360 + TabIndex = 87 + Top = 465 + Width = 1095 + End + End + End + Begin VsOcxLib.VideoSoftElastic EllCnt + Height = 5250 + Index = 0 + Left = 45 + TabIndex = 14 + TabStop = 0 'False + Top = 45 + Width = 6285 + _Version = 327680 + _ExtentX = 11086 + _ExtentY = 9260 + _StockProps = 70 + ConvInfo = 1418783674 + AutoSizeChildren= 7 + BorderWidth = 0 + BevelOuter = 0 + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic1 + Height = 1305 + Left = 1650 + TabIndex = 44 + TabStop = 0 'False + Top = 240 + Width = 3570 + _Version = 327680 + _ExtentX = 6297 + _ExtentY = 2302 + _StockProps = 70 + Caption = "Одиночный импульс" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Ampl_SI + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 285 + Left = 2535 + TabIndex = 5 + Text = "5" + Top = 405 + Width = 765 + End + Begin VB.TextBox Text_To_SI + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 285 + Left = 2535 + TabIndex = 6 + Text = "5" + Top = 855 + Width = 765 + End + Begin VB.Label Label1 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 270 + Left = 270 + TabIndex = 46 + Top = 420 + Width = 885 + End + Begin VB.Label Label2 + BackStyle = 0 'Transparent + Caption = "To" + Height = 210 + Left = 270 + TabIndex = 45 + Top = 930 + Width = 390 + End + End + Begin VB.OptionButton Option_SI + Height = 225 + Left = 900 + TabIndex = 2 + Top = 795 + Value = -1 'True + Width = 450 + End + Begin VB.OptionButton Option_Gauss + Height = 255 + Left = 900 + TabIndex = 4 + Top = 3975 + Width = 570 + End + Begin VB.OptionButton Option_SS + Height = 210 + Left = 900 + MaskColor = &H000000FF& + TabIndex = 3 + Top = 2325 + Width = 375 + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic2 + Height = 1290 + Left = 1665 + TabIndex = 42 + TabStop = 0 'False + Top = 1785 + Width = 3570 + _Version = 327680 + _ExtentX = 6297 + _ExtentY = 2275 + _StockProps = 70 + Caption = "Ступенчатый сигнал" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_Ampl_SS + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 285 + Left = 2535 + TabIndex = 7 + Text = "5" + Top = 390 + Width = 765 + End + Begin VB.TextBox Text_T_SS + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 285 + Left = 2535 + TabIndex = 8 + Text = "4" + Top = 825 + Width = 765 + End + Begin VB.Label Label3 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 255 + Left = 270 + TabIndex = 72 + Top = 405 + Width = 945 + End + Begin VB.Label Label4 + BackStyle = 0 'Transparent + Caption = "Длительность (T)" + Height = 255 + Left = 270 + TabIndex = 60 + Top = 840 + Width = 1455 + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic3 + Height = 1635 + Left = 1680 + TabIndex = 43 + TabStop = 0 'False + Top = 3300 + Width = 3570 + _Version = 327680 + _ExtentX = 6297 + _ExtentY = 2884 + _StockProps = 70 + Caption = "Сигнал Гаусса" + ConvInfo = 1418783674 + ForeColor = 16711680 + AutoSizeChildren= 7 + BevelOuter = 6 + CaptionPos = 3 + TagPosition = 2 + Begin VB.TextBox Text_T0_Gauss + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 285 + Left = 2535 + TabIndex = 10 + Text = "5" + Top = 750 + Width = 780 + End + Begin VB.TextBox Text_Sigma_Gauss + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 285 + Left = 2535 + TabIndex = 11 + Text = "5" + Top = 1185 + Width = 780 + End + Begin VB.TextBox Text_Ampl_Gauss + BeginProperty DataFormat + Type = 1 + Format = "0" + HaveTrueFalseNull= 0 + FirstDayOfWeek = 0 + FirstWeekOfYear = 0 + LCID = 1049 + SubFormatType = 1 + EndProperty + Height = 285 + Left = 2535 + TabIndex = 9 + Text = "5" + Top = 330 + Width = 780 + End + Begin VB.Label Label6 + BackStyle = 0 'Transparent + Caption = "Среднее значение (to)" + Height = 285 + Left = 270 + TabIndex = 76 + Top = 750 + Width = 1740 + End + Begin VB.Label Label7 + BackStyle = 0 'Transparent + Caption = "Сигма" + Height = 255 + Left = 270 + TabIndex = 75 + Top = 1200 + Width = 1005 + End + Begin VB.Label Label5 + BackStyle = 0 'Transparent + Caption = "Амплитуда" + Height = 225 + Left = 270 + TabIndex = 74 + Top = 375 + Width = 1050 + End + End + End + End + End + Begin VsOcxLib.VideoSoftElastic VideoSoftElastic1Fix + Height = 5340 + Left = 0 + TabIndex = 12 + Top = 0 + Width = 510 + _Version = 327680 + _ExtentX = 900 + _ExtentY = 9419 + _StockProps = 70 + BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} + Name = "MS Sans Serif" + Size = 8.25 + Charset = 204 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ConvInfo = 1418783674 + BackColor = 8421504 + Align = 3 + AutoSizeChildren= 4 + BorderWidth = 0 + ChildSpacing = 0 + BevelOuter = 0 + BevelInnerWidth = 0 + BevelOuterWidth = 0 + BevelChildren = 2 + Begin VsOcxLib.VideoSoftIndexTab TabsLeft + Height = 5340 + Left = 0 + TabIndex = 13 + Top = 0 + Width = 510 + _Version = 327680 + _ExtentX = 900 + _ExtentY = 9419 + _StockProps = 102 + Caption = "-|-|-|-|-|-|-|-" + BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} + Name = "Arial CYR" + Size = 11.25 + Charset = 204 + Weight = 400 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + ConvInfo = 1418783674 + BackColor = 8421504 + ForeColor = 16777215 + FrontTabColor = 12632256 + CurrTab = -1 + Style = 3 + Position = 2 + ShowFocusRect = 0 'False + TabsPerPage = 8 + BoldCurrent = -1 'True + FrontTabForeColor= 16777215 + TabHeight = 500 + End + End + Begin vsViewLib.vsInForm vsInForm1 + Height = 480 + Left = 0 + TabIndex = 41 + Top = 0 + Visible = 0 'False + Width = 480 + _Version = 196608 + _ExtentX = 847 + _ExtentY = 847 + _StockProps = 6 + Caption = "Обработка сигналов" + BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} + Name = "MS Sans Serif" + Size = 8.25 + Charset = 204 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + CustomFrame = -1 'True + FrameStyle = 4 + BarStyle = 5 + BarColor = 8567004 + CapStyle = 3 + CapColor = 8421376 + CapColorInactive= 4210752 + ButtonsRight = 3 + PictLeft0 = "MainForm.frx":0000 + PictRight0 = "MainForm.frx":010A + PictRight1 = "MainForm.frx":0214 + PictRight2 = "MainForm.frx":031E + End +End +Attribute VB_Name = "MainForm" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Option Explicit +Dim TABSTEXT(7) As String +Dim TABSTEXT_TTL(7) As String + +Private arrOfItems(7) As Collection + +Private Type RECT + Left As Long + Top As Long + Right As Long + Bottom As Long +End Type + +Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long +Private Declare Function TrackPopupMenu Lib "user32" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal x As Long, ByVal y As Long, ByVal nReserved As Long, ByVal hwnd As Long, lprc As Long) As Long +Private Const TPM_CENTERALIGN = &H4& +Private Const TPM_LEFTALIGN = &H0& +Private Const TPM_LEFTBUTTON = &H0& +Private Const TPM_RIGHTALIGN = &H8& +Private Const TPM_RIGHTBUTTON = &H2& + +Private Declare Sub PostQuitMessage Lib "user32" (ByVal nExitCode As Long) + + +Private Sub CloseChapter(Chapter) + + Dim i As Long + If TabsLeft.CurrTab = -1 Then Exit Sub + + TabRight.CurrTab = Chapter + + For i = Chapter To TabsLeft.NumTabs - 1 + TabsLeft.TabCaption(i) = "-" + TabRight.TabCaption(i) = TABSTEXT(i) + Next i + TabsLeft.CurrTab = -1 + +End Sub + +Private Sub EllCnt_KeyDown(index As Integer, KeyCode As Integer, Shift As Integer) + Debug.Print +End Sub + +Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) + Debug.Print +End Sub + + +Private Sub Form_Load() + + TABSTEXT_TTL(0) = "Типовые сигналы" + TABSTEXT_TTL(1) = "Дискретезация и восстановление сигнала по т.Котельникова" + TABSTEXT_TTL(2) = "Дискретное преобразование Фурье" + TABSTEXT_TTL(3) = "Поиск выходного сигнала фильтра через свёртку" + TABSTEXT_TTL(4) = "Фильтрация помехи низкочастотным фильтром Баттера Уотта" + TABSTEXT_TTL(5) = "Фильтрация линейным адаптивным фильтром" + TABSTEXT_TTL(6) = "Поиск импульсного отклика фильтра" + TABSTEXT_TTL(7) = "Сглаживание импульсных помех" + + + Dim i As Long + + TabsLeft.BackColor = RGB(200, 164, 110) + TabsLeft.BackTabColor = RGB(200, 164, 110) + + TabRight.BackColor = RGB(200, 164, 110) + TabRight.BackTabColor = RGB(200, 164, 110) + + 'TabRight.ForeColor = RGB(126, 156, 35) + TabRight.ForeColor = RGB(0, 100, 0) + 'TabRight.FrontTabForeColor = RGB(74, 186, 44) + TabRight.FrontTabForeColor = RGB(50, 255, 50) + + TabsLeft.ForeColor = RGB(0, 100, 0) + TabsLeft.FrontTabForeColor = RGB(50, 255, 50) + + For i = LBound(TABSTEXT) To UBound(TABSTEXT) + TabsLeft.TabColor(i) = RGB(220, 184, 130) + TabRight.TabColor(i) = RGB(220, 184, 130) + TabRight.TabCaption(i) = i + 1 + TABSTEXT(i) = i + 1 + Next i + + Dim ell As VideoSoftElastic + For Each ell In EllCnt + ell.BackColor = RGB(220, 184, 130) + SetContainedBkGnds ell, RGB(220, 184, 130) + Next ell + + If TabRight.CurrTab = -1 Then vsInForm1.Caption = "Обработка сигналов: " _ + Else _ + vsInForm1.Caption = "Обработка сигналов: " & "'" & TABSTEXT_TTL(TabRight.CurrTab) & "'": _ + TabRight.TabColor(TabRight.CurrTab) = RGB(228, 192, 137): _ + EllCnt(TabRight.CurrTab).BackColor = RGB(228, 192, 137): _ + SetContainedBkGnds EllCnt(TabRight.CurrTab), RGB(228, 192, 137) + + InitItems + + Load Form_Present + Form_Present.Show vbModeless + + MkLoadToForm + +End Sub + +Public Function IsSubContainer_N_For(ByVal objContainer As Object, ByVal objControl As Object) As Boolean + If objControl Is Nothing Then IsSubContainer_N_For = False: Exit Function + + On Error Resume Next + Dim objC As Object + Set objC = objControl.Container + If objC Is Nothing Then IsSubContainer_N_For = False: Exit Function + + If objC Is Nothing Then IsSubContainer_N_For = (objContainer Is Nothing): Exit Function + + If objC Is objContainer Then IsSubContainer_N_For = True: Exit Function + + IsSubContainer_N_For = IsSubContainer_N_For(objContainer, objC) + 'IsSubContainer_N_For = False +End Function + +Public Sub SetContainedBkGnds(ByVal ctlCont As Control, ByVal lColor As Long) + Dim vbeExt As Object + + For Each vbeExt In Controls + If IsSubContainer_N_For(ctlCont, vbeExt) Then + On Error Resume Next + If TypeName(vbeExt) <> "TextBox" Then _ + vbeExt.BackColor = lColor + End If + Next vbeExt +End Sub + +Public Function GetContainedControls(ByVal ctlCont As Control) As Collection + Dim vbeExt As Object + Dim coll As New Collection + + For Each vbeExt In Controls + If IsSubContainer_N_For(ctlCont, vbeExt) Then + On Error Resume Next + Dim sName As String + sName = vbeExt.Name + If Err.Number = 0 Then + 'Dim lInd As Long + 'lInd = vbeExt.index + coll.Add vbeExt, sName + End If + End If + Next vbeExt + + Set GetContainedControls = coll + +End Function + +Private Sub OpenChapter(Chapter As Long) + + Dim i As Long + + For i = Chapter - 1 To 0 Step -1 + TabRight.TabCaption(i) = "-" + TabsLeft.TabCaption(i) = TABSTEXT(i) + Next i + + vsInForm1.Caption = "Обработка сигналов: " & "'" & TABSTEXT_TTL(Chapter) & "'" + vsInForm1.CapAlign = caCenterCenter + + MkLoadToForm + +End Sub + +Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) + Debug.Print "Qry unload" +End Sub + +Private Sub Form_Unload(Cancel As Integer) + Unload Form_Opt + Unload Form_Present + Set Form_Opt = Nothing + Set Form_Present = Nothing +End Sub + +Private Sub Option_Gauss_Click() + LoadItemToForm arrOfItems(0).Item(3), EllCnt(0) +End Sub + +Public Function ValidateAll_x(ByVal bFocus As Boolean) As Boolean + Select Case TabRight.CurrTab + Case 0 + ValidateAll_x = ValidateAll_0(bFocus) + Case 1 + ValidateAll_x = ValidateAll_1(bFocus) + Case 2 + ValidateAll_x = ValidateAll_2(bFocus) + Case 3 + ValidateAll_x = ValidateAll_3(bFocus) + Case 4 + ValidateAll_x = ValidateAll_4(bFocus) + Case 5 + ValidateAll_x = ValidateAll_5(bFocus) + Case 6 + ValidateAll_x = ValidateAll_6(bFocus) + Case 7 + ValidateAll_x = ValidateAll_7(bFocus) + End Select +End Function + + +Public Function ValidateAll_0(ByVal bFocus As Boolean) As Boolean + On Error GoTo ERR_H + + CheckNumeric Text_Ampl_SI, "Амплитуда импульса", bFocus + CheckNumeric Text_To_SI, "To импульса", bFocus + CheckNumeric Text_Ampl_SS, "Амплитуда ступенчатого сигнала", bFocus + CheckNumeric Text_T_SS, "Длительность ступенчатого сигнала", bFocus + CheckNumeric Text_Ampl_Gauss, "Амплитуда сигнала Гаусса", bFocus + CheckNumeric Text_T0_Gauss, "To сигнала Гаусса", bFocus + CheckNumeric Text_Sigma_Gauss, "Сигма сигнала Гаусса", bFocus + + + If CDbl(Text_Sigma_Gauss.Text) <= 0 Then ReportError Text_Sigma_Gauss, "Сигма > 0", bFocus + + ValidateAll_0 = True + Exit Function + +ERR_H: + ValidateAll_0 = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + +Public Function ValidateAll_1(ByVal bFocus As Boolean) As Boolean + On Error GoTo ERR_H + + CheckNumeric Text_Ampl_G2, "Амплитуда", bFocus + CheckNumeric Text_T0_G2, "To", bFocus + CheckNumeric Text_Sigma_G2, "Сигма", bFocus + + CheckNumeric Text_F_G2, "F", bFocus + CheckNumericInt Text_Cnt_G2, "Число отсчётов", bFocus + + + If CDbl(Text_Sigma_G2.Text) <= 0 Then ReportError Text_Sigma_G2, "Сигма > 0", bFocus + If CDbl(Text_F_G2.Text) <= 0 Then ReportError Text_F_G2, "F > 0", bFocus + If CDbl(Text_Cnt_G2.Text) <= 0 Then ReportError Text_Cnt_G2, "Число отсчётов > 0", bFocus + + ValidateAll_1 = True + Exit Function + +ERR_H: + ValidateAll_1 = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + +Public Function ValidateAll_2(ByVal bFocus As Boolean) As Boolean + On Error GoTo ERR_H + + CheckNumericInt Text_Diskr_T, "Ширина", bFocus + CheckNumericInt Text_Diskr_N, "Число точек", bFocus + + CheckNumeric Text_St_Ampl, "Амплитуда", bFocus + CheckNumeric Text_St_T, "Период", bFocus + + CheckNumeric Text_G_Ampl, "Амплитуда", bFocus + CheckNumeric Text_G_To, "To", bFocus + CheckNumeric Text_G_Sigma, "Сигма", bFocus + + + If Int(Text_Diskr_T.Text) <= 0 Then ReportError Text_Diskr_T, "Ширина > 0", bFocus + If Int(Text_Diskr_N.Text) <= 0 Then ReportError Text_Diskr_N, "Число точек > 0", bFocus + + If CDbl(Text_St_T.Text) <= 0 Then ReportError Text_St_T, "T > 0", bFocus + + If CDbl(Text_G_Sigma.Text) <= 0 Then ReportError Text_G_Sigma, "Sigma > 0", bFocus + + ValidateAll_2 = True + Exit Function + +ERR_H: + ValidateAll_2 = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + +Public Function ValidateAll_3(ByVal bFocus As Boolean) As Boolean + On Error GoTo ERR_H + + CheckNumericInt Text_N_4, "Число точек", bFocus + + CheckNumeric Text_X1_4, "X1", bFocus + CheckNumeric Text_X2_4, "X2", bFocus + + CheckNumeric Text_Sg1_4, "Sg1", bFocus + CheckNumeric Text_Sg2_4, "Sg2", bFocus + + If Int(Text_N_4.Text) <= 0 Then ReportError Text_N_4, "Число точек > 0", bFocus + + If CDbl(Text_X1_4.Text) > CDbl(Text_X2_4.Text) Then ReportError Text_X1_4, "X1 < X2", bFocus + + If CDbl(Text_Sg1_4.Text) <= 0 Then ReportError Text_Sg1_4, "Sg1 > 0", bFocus + If CDbl(Text_Sg2_4.Text) <= 0 Then ReportError Text_Sg2_4, "Sg2 > 0", bFocus + + ValidateAll_3 = True + Exit Function + +ERR_H: + ValidateAll_3 = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + +Public Function ValidateAll_4(ByVal bFocus As Boolean) As Boolean + On Error GoTo ERR_H + + CheckNumericInt Text_Nhc_5, "Число помех", bFocus + + CheckNumeric Text_Ampl_5, "Амплитуда", bFocus + CheckNumeric Text_To_5, "To", bFocus + + CheckNumeric Text_Sigma_5, "Sigma", bFocus + CheckNumeric Text_B_5, "B", bFocus + + If Int(Text_Nhc_5.Text) <= 0 Then ReportError Text_Nhc_5, "Число помех > 0", bFocus + If CDbl(Text_Sigma_5.Text) <= 0 Then ReportError Text_Sigma_5, "Sigma > 0", bFocus + If CDbl(Text_B_5.Text) <= 0 Then ReportError Text_B_5, "B > 0", bFocus + + ValidateAll_4 = True + Exit Function + +ERR_H: + ValidateAll_4 = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + + +Public Function ValidateAll_5(ByVal bFocus As Boolean) As Boolean + On Error GoTo ERR_H + + CheckNumericInt Text_N_6, "Число точек", bFocus + CheckNumeric Text_T_6, "Ширина", bFocus + + CheckNumeric Text_Ampl_6, "Амплитуда", bFocus + CheckNumeric Text_To_6, "To", bFocus + CheckNumeric Text_Sigma_6, "Sigma", bFocus + + CheckNumeric Text_Ampl2_6, "Амплитуда", bFocus + CheckNumeric Text_To2_6, "To", bFocus + CheckNumeric Text_Sigma2_6, "Sigma", bFocus + + + If Int(Text_N_6.Text) <= 0 Then ReportError Text_N_6, "Число точек > 0", bFocus + + If CDbl(Text_Sigma_6.Text) <= 0 Then ReportError Text_Sigma_6, "Sigma > 0", bFocus + If CDbl(Text_Sigma2_6.Text) <= 0 Then ReportError Text_Sigma2_6, "Sigma2 > 0", bFocus + + ValidateAll_5 = True + Exit Function + +ERR_H: + ValidateAll_5 = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + + +Public Function ValidateAll_6(ByVal bFocus As Boolean) As Boolean + On Error GoTo ERR_H + + + CheckNumericInt Text_N_7, "Число точек", bFocus + CheckNumeric Text_T_7, "Ширина", bFocus + + CheckNumeric Text_A2_7, "Амплитуда", bFocus + CheckNumeric Text_T2_7, "To", bFocus + CheckNumeric Text_S2_7, "Sigma", bFocus + + CheckNumeric Text_A1_7, "Амплитуда", bFocus + CheckNumeric Text_T1_7, "To", bFocus + CheckNumeric Text_S1_7, "Sigma", bFocus + + CheckNumeric Text_Alpha1_7, "Alpha", bFocus + CheckNumeric Text_Step1_7, "Step", bFocus + + CheckNumeric Text_Alpha2_7, "Alpha", bFocus + CheckNumeric Text_Step2_7, "Step", bFocus + + If Int(Text_N_7.Text) <= 0 Then ReportError Text_N_7, "Число точек > 0", bFocus + + If CDbl(Text_S1_7.Text) <= 0 Then ReportError Text_S1_7, "Sigma > 0", bFocus + If CDbl(Text_S2_7.Text) <= 0 Then ReportError Text_S2_7, "Sigma2 > 0", bFocus + + If CDbl(Text_Step1_7.Text) <= 0 Then ReportError Text_Step1_7, "Step1 > 0", bFocus + If CDbl(Text_Step2_7.Text) <= 0 Then ReportError Text_Step2_7, "Step2 > 0", bFocus + + ValidateAll_6 = True + Exit Function + +ERR_H: + ValidateAll_6 = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + +Public Function ValidateAll_7(ByVal bFocus As Boolean) As Boolean + On Error GoTo ERR_H + + + CheckNumericInt Text_N_8, "Число точек", bFocus + CheckNumericInt Text_Np_8, "Число помех", bFocus + CheckNumeric Text_T_8, "Ширина", bFocus + + CheckNumeric Text_A_8, "Амплитуда", bFocus + CheckNumeric Text_To_8, "To", bFocus + CheckNumeric Text_Sigma_8, "Sigma", bFocus + + CheckNumeric Text_Nm_8, "Медиана", bFocus + CheckNumeric Text_Delta_8, "Порог", bFocus + + + If Int(Text_N_8.Text) <= 0 Then ReportError Text_N_8, "Число точек > 0", bFocus + If Int(Text_Np_8.Text) <= 0 Then ReportError Text_Np_8, "Число помех > 0", bFocus + + If CDbl(Text_Sigma_8.Text) <= 0 Then ReportError Text_Sigma_8, "Sigma > 0", bFocus + + + If CDbl(Text_Delta_8.Text) <= 0 Then ReportError Text_Delta_8, "Порог > 0", bFocus + If CDbl(Text_Nm_8.Text) <= 0 Then ReportError Text_Nm_8, "Медиана > 0", bFocus + + ValidateAll_7 = True + Exit Function + +ERR_H: + ValidateAll_7 = False + MsgBox Err.Description, vbApplicationModal Or vbExclamation Or vbOKOnly, Err.Source +End Function + + +Private Sub Option_Gauss_Validate(Cancel As Boolean) + Debug.Print "Option_Gauss_Validate" + Cancel = Not ValidateAll_0(False) + If Not Cancel Then Cancel = Not Form_Present.ValidateAll() +End Sub + +Private Sub Option_SI_Click() + Debug.Print "Option_SI_Click" + LoadItemToForm arrOfItems(0).Item(1), EllCnt(0) +End Sub + +Private Sub Option_SI_Validate(Cancel As Boolean) + Debug.Print "Option_SI_Validate" + Cancel = Not ValidateAll_0(False) + If Not Cancel Then Cancel = Not Form_Present.ValidateAll() +End Sub + +Private Sub Option_SS_Click() + Debug.Print "Option_SS_Click" + LoadItemToForm arrOfItems(0).Item(2), EllCnt(0) +End Sub + +Private Sub Option_SS_Validate(Cancel As Boolean) + Debug.Print "Option_SS_Validate" + Cancel = Not ValidateAll_0(False) + If Not Cancel Then Cancel = Not Form_Present.ValidateAll() +End Sub + +Private Sub TabRight_Click() + 'vsElastic2.BackColor = TabRight.TabColor(TabRight.CurrTab) + If TabRight.CurrTab = -1 Then Exit Sub + OpenChapter Val(TabRight.CurrTab) +End Sub + + +Private Sub TabRight_KeyDown(KeyCode As Integer, Shift As Integer) + Debug.Print +End Sub + +Private Sub TabRight_Switch(OldTab As Integer, NewTab As Integer, Cancel As Integer) + TabRight.TabColor(OldTab) = RGB(220, 184, 130) + TabRight.TabColor(NewTab) = RGB(228, 192, 137) + EllCnt(OldTab).BackColor = RGB(220, 184, 130) + EllCnt(NewTab).BackColor = RGB(228, 192, 137) + + SetContainedBkGnds EllCnt(OldTab), RGB(220, 184, 130) + SetContainedBkGnds EllCnt(NewTab), RGB(228, 192, 137) + + 'MkLoadToForm +End Sub + +Private Sub TabsLeft_Click() + CloseChapter Val(TabsLeft.CurrTab) +End Sub + + + +Private Sub TabsLeft_KeyDown(KeyCode As Integer, Shift As Integer) + Debug.Print +End Sub + +Private Sub VideoSoftElastic1Fix_KeyDown(KeyCode As Integer, Shift As Integer) + Debug.Print +End Sub + +Private Sub vsInForm1_ClickLButton(Button As Integer) + Select Case Button + Case 0 + 'Dim lMnu As Long + 'lMnu = GetSystemMenu(Form1.hwnd, 0) + 'TrackPopupMenu lMnu, TPM_LEFTALIGN, Me.Left, Me.Top, 0, Me.hwnd, 0 + End Select +End Sub + +Private Sub vsInForm1_ClickRButton(Button As Integer) + Select Case Button + Case 0 + 'PostQuitMessage 0 + Unload Me + Case 1 + vsInForm1_DblClickCaption + Case 2 + WindowState = vbMinimized + Caption = vsInForm1.Caption + End Select +End Sub + +Private Sub vsInForm1_DblClickCaption() + If WindowState = vbNormal Then + WindowState = vbMaximized + Else + WindowState = vbNormal + End If +End Sub + +Private Sub InitItems() + Dim l As Long + For l = LBound(arrOfItems) To UBound(arrOfItems) + Set arrOfItems(l) = New Collection + Next l + + With arrOfItems(0) + .Add New CGItem.CStepGen + .Add New CGItem.CStep2Gen + .Add New CGItem.CGaussGen + End With + + arrOfItems(1).Add New CGItem.CRestoreGen + arrOfItems(2).Add New CGItem.CFurie + arrOfItems(3).Add New CGItem.CConvolution + arrOfItems(4).Add New CGItem.CFlt_BatWorth + arrOfItems(5).Add New CGItem.CAdaptFlt + arrOfItems(6).Add New CGItem.CFindH + arrOfItems(7).Add New CGItem.CSmooth +End Sub + +Public Sub MkLoadToForm() + If arrOfItems(TabRight.CurrTab).Count > 0 Then _ + LoadItemToForm arrOfItems(TabRight.CurrTab).Item(GetCurTabOption), EllCnt(TabRight.CurrTab) +End Sub + + +Private Sub LoadItemToForm(ByVal idfItem As IDescrFunc2, ByVal ctlContainer As Control) + + Dim colControls As Collection + Set colControls = GetContainedControls(ctlContainer) + idfItem.GetParameters colControls + + Dim hints As CGItem.DrawHints + hints = idfItem.hints + + LoadValueToControl Form_Present.Txt_Prec_X, hints.iPrecX + LoadValueToControl Form_Present.Txt_Prec_Y, hints.iPrecY + + LoadValueToControl Form_Present.Txt_Step_X, hints.dStepX + LoadValueToControl Form_Present.Txt_Step_Y, hints.dStepY + + LoadValueToControl Form_Present.Txt_X1, hints.dX1 + LoadValueToControl Form_Present.Txt_Y1, hints.dY1 + LoadValueToControl Form_Present.Txt_X2, hints.dX2 + LoadValueToControl Form_Present.Txt_Y2, hints.dY2 + + LoadValueToControl Form_Present.Txt_Sample_X1, hints.dSampleX1 + LoadValueToControl Form_Present.Txt_Sample_X2, hints.dSampleX2 + + LoadValueToControl Form_Present.Txt_Sample_Step, hints.dSampleStep + + Form_Present.Option_Auto.Value = hints.bMode + Form_Present.Option_Manual.Value = Not hints.bMode + + Form_Present.Check_Need_0X.Value = IIf(hints.bNullX, 1, 0) + Form_Present.Check_Need_0Y.Value = IIf(hints.bNullY, 1, 0) + +End Sub + +Private Sub LoadItemFromForm(ByVal idfItem As IDescrFunc2, ByVal ctlContainer As Control) + + Dim colControls As Collection + Set colControls = GetContainedControls(ctlContainer) + idfItem.SetParameters colControls + + Dim hints As CGItem.DrawHints + + ReadValueFromControl Form_Present.Txt_Prec_X, hints.iPrecX + ReadValueFromControl Form_Present.Txt_Prec_Y, hints.iPrecY + + ReadValueFromControl Form_Present.Txt_Step_X, hints.dStepX + ReadValueFromControl Form_Present.Txt_Step_Y, hints.dStepY + + ReadValueFromControl Form_Present.Txt_X1, hints.dX1 + ReadValueFromControl Form_Present.Txt_Y1, hints.dY1 + ReadValueFromControl Form_Present.Txt_X2, hints.dX2 + ReadValueFromControl Form_Present.Txt_Y2, hints.dY2 + + ReadValueFromControl Form_Present.Txt_Sample_X1, hints.dSampleX1 + ReadValueFromControl Form_Present.Txt_Sample_X2, hints.dSampleX2 + + ReadValueFromControl Form_Present.Txt_Sample_Step, hints.dSampleStep + + hints.bMode = Form_Present.Option_Auto.Value + + hints.bNullX = IIf(Form_Present.Check_Need_0X.Value = 1, True, False) + hints.bNullY = IIf(Form_Present.Check_Need_0Y.Value = 1, True, False) + + idfItem.hints = hints +End Sub + +Public Sub MkLoadFromForm() + If arrOfItems(TabRight.CurrTab).Count > 0 Then _ + LoadItemFromForm arrOfItems(TabRight.CurrTab).Item(GetCurTabOption), EllCnt(TabRight.CurrTab) +End Sub + +Public Function GetCurTabOption() As Long + Select Case TabRight.CurrTab + Case 0 + GetCurTabOption = IIf(Option_SI.Value, 1, IIf(Option_SS.Value, 2, 3)) + Case 1, 2, 3, 4, 5, 6, 7 + GetCurTabOption = 1 + End Select +End Function + +Public Sub MakeGrapics() + Form_Present.LineGraph1.Series.Clear + Form_Present.LineGraph1.Refresh + Form_Present.LineGraph1.GraphTitle = "" + + If arrOfItems(TabRight.CurrTab).Count < 1 Then + MsgBox "Нет графиков", vbInformation Or vbOKOnly, "Предупреждение" + Exit Sub + End If + + Dim idfItem As CGItem.IDescrFunc2 + Set idfItem = arrOfItems(TabRight.CurrTab).Item(GetCurTabOption) + Dim hints As CGItem.DrawHints + hints = idfItem.hints + + Form_Present.LineGraph1.DoUpdate = False + On Error GoTo L_ERRH + + Form_Present.LineGraph1.GraphTitle = idfItem.NameOfSuject + idfItem.Build + + If hints.bMode Then + SetupGraph idfItem, Form_Present.LineGraph1 + Else + With Form_Present.LineGraph1 + .DecimalPlaces = hints.iPrecX + .IncrementHorz = hints.dStepX + .IncrementVert = hints.dStepY + .SetXValues hints.dX1, hints.dX2 + .SetYValues hints.dY1, hints.dY2 + .DefineIncrement = False + End With + End If + + + Dim collGr As Collection + Set collGr = idfItem.Graphics + + Dim grItem As CGItem.GraphItem + For Each grItem In collGr + LoadGraphics grItem, Form_Present.LineGraph1 + Next grItem + + Form_Present.LineGraph1.DoUpdate = True + Exit Sub + +L_ERRH: + Form_Present.LineGraph1.DoUpdate = True + MsgBox Err.Description, vbExclamation Or vbOKOnly, "Ошибка" +End Sub + +Public Sub LoadGraphics(ByVal gi As GraphItem, ByVal alg As ActiveLineGraph.LineGraph) + + With gi + Dim elem As lngrfSeriesEl + Set elem = alg.Series.Add(.Name, .Color) + + If Not IsArray(.arrPoints) Then Exit Sub + On Error Resume Next + If UBound(.arrPoints) - LBound(.arrPoints) + 1 < 1 Or Err.Number <> 0 Then + Exit Sub + End If + + On Error GoTo 0 + + Dim l1 As Long, l2 As Long + l1 = LBound(.arrPoints): l2 = UBound(.arrPoints) + + Dim i As Long + For i = l1 To l2 + If .arrPoints(i).B Then _ + elem.Points.Add .arrPoints(i).x, .arrPoints(i).y + Next i + + End With +End Sub + +Public Sub SetupGraph(ByVal idfItem As CGItem.IDescrFunc2, ByVal alg As ActiveLineGraph.LineGraph) + + Dim collGr As Collection + Set collGr = idfItem.Graphics + Dim MinX As Double + Dim MinY As Double + Dim MaxX As Double + Dim MaxY As Double + + MinX = 1.79769313486231E+308 + MinY = 1.79769313486231E+308 + MaxX = -1.79769313486231E+308 + MaxY = -1.79769313486231E+308 + + Dim grItem As CGItem.GraphItem + + For Each grItem In collGr + With grItem + If .MinX < MinX Then MinX = .MinX + If .MaxX > MaxX Then MaxX = .MaxX + + If .MinY < MinY Then MinY = .MinY + If .MaxY > MaxY Then MaxY = .MaxY + End With + Next grItem + + If idfItem.hints.bNullX Then + If MinX > 0 Then + MinX = 0 + ElseIf MaxX < 0 Then + MaxX = 0 + End If + End If + + If idfItem.hints.bNullY Then + If MinY > 0 Then + MinY = 0 + ElseIf MaxY < 0 Then + MaxY = 0 + End If + End If + + With alg + .IncrementHorz = Abs(MaxX - MinX) / 10 + .IncrementVert = Abs(MaxY - MinY) / 10 + .SetXValues MinX, MaxX + .SetYValues MinY, MaxY + .DecimalPlaces = 2 + .DefineIncrement = False + End With +End Sub diff --git a/Signal/MainForm.frx b/Signal/MainForm.frx new file mode 100644 index 0000000..08ffc51 Binary files /dev/null and b/Signal/MainForm.frx differ diff --git a/Signal/SigHelper/SHlp.cpp b/Signal/SigHelper/SHlp.cpp new file mode 100644 index 0000000..9178d95 --- /dev/null +++ b/Signal/SigHelper/SHlp.cpp @@ -0,0 +1,204 @@ +// SHlp.cpp : Implementation of CSHlp +#include "stdafx.h" +#include "SigHelper.h" +#include "SHlp.h" + + + +///////////////////////////////////////////////////////////////////////////// +// CSHlp + +STDMETHODIMP CSHlp::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISHlp + }; + for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) + { + if (InlineIsEqualGUID(*arr[i],riid)) + return S_OK; + } + return S_FALSE; +} + +STDMETHODIMP CSHlp::InsertPoints(VARIANT arrGenerated, VARIANT arrSpec, SAFEARRAY** arrRes ) + { + //DWORD dw1 = arrGenerated->vt&VT_TYPEMASK; + //DWORD dw2 = arrGenerated->vt&(~VT_TYPEMASK); + + if( arrGenerated.vt != (VT_ARRAY|VT_RECORD) || + arrSpec.vt != (VT_ARRAY|VT_RECORD) + ) + { + Error( L"Нужен массив", 0, NULL, IID_ISHlp, E_INVALIDARG ); + return E_INVALIDARG; + } + + if( (arrGenerated.vt & VT_BYREF) != VT_BYREF ) + { + int y=1; + } + + /*IRecordInfo* p = arrGenerated.pRecInfo; + CComBSTR bs; + p->GetName( &bs );*/ + + + UINT uiDim1 = SafeArrayGetDim( arrGenerated.parray ); + UINT uiDim2 = SafeArrayGetDim( arrSpec.parray ); + + if( uiDim1 != 1 || uiDim2 != 1 ) + { + Error( L"Нужен одномерный массив", 0, NULL, IID_ISHlp, E_INVALIDARG ); + return E_INVALIDARG; + } + + + SAFEARRAY& rArrGen = *arrGenerated.parray; + SAFEARRAY& rArrAdd = *arrSpec.parray; + + long lLo, lHi; + HRESULT hr = SafeArrayGetLBound( &rArrGen, 1, &lLo ); + if( FAILED(hr) ) + { + Error( L"Ошибка получения длины массива", 0, NULL, IID_ISHlp, hr ); + return hr; + } + hr = SafeArrayGetUBound( &rArrGen, 1, &lHi ); + if( FAILED(hr) ) + { + Error( L"Ошибка получения длины массива", 0, NULL, IID_ISHlp, hr ); + return hr; + } + + UINT uiESize = SafeArrayGetElemsize( &rArrGen ); + + multiset setXY; + int iSz = lHi - lLo + 1; + if( iSz > 0 ) + { + char* p; + SafeArrayAccessData( &rArrGen, (void**)&p ); + for( int i = iSz; i > 0; --i ) + { + setXY.insert( (XYPoint*)p ); + //((XYPoint*)p)->x = 199; + p += uiESize; + } + SafeArrayUnaccessData( &rArrGen ); + } + + hr = SafeArrayGetLBound( &rArrAdd, 1, &lLo ); + if( FAILED(hr) ) + { + Error( L"Ошибка получения длины массива2", 0, NULL, IID_ISHlp, hr ); + return hr; + } + hr = SafeArrayGetUBound( &rArrAdd, 1, &lHi ); + if( FAILED(hr) ) + { + Error( L"Ошибка получения длины массива2", 0, NULL, IID_ISHlp, hr ); + return hr; + } + + iSz = lHi - lLo + 1; + if( iSz > 0 ) + { + char* p; + SafeArrayAccessData( &rArrAdd, (void**)&p ); + for( int i = iSz; i > 0; --i ) + { + setXY.insert( (XYPoint*)p ); + p += uiESize; + } + SafeArrayUnaccessData( &rArrAdd ); + } +//return S_OK; + + multiset::iterator it1( setXY.begin() ); + multiset::iterator it2( setXY.end() ); + for( ; it1 != it2; ) + { + multiset::iterator it3 = it1; + multiset::iterator it4 = it1; + ++it4; + while( it4 != it2 && it4->XY->x == it1->XY->x && it4->XY->y == it1->XY->y ) + it3 = it4++; + if( it3 == it1 ) + { + ++it1; + continue; + } + it1 = setXY.erase( it1, --it3 ); + } + + uiESize = sizeof(XYPoint); + + if( setXY.size() > 0 ) + { + SafeArrayGetLBound( &rArrGen, 1, &lLo ); + + //SAFEARRAYBOUND bnd = { setXY.size(), lLo }; + + //VARIANT* arrRes_ = arrRes; + + //VariantClear( arrRes ); + hr = SafeArrayAllocDescriptor( 1, arrRes ); + if( FAILED(hr) ) + { + Error( L"Ошибка создания массива", 0, NULL, IID_ISHlp, hr ); + return hr; + } + (*arrRes)->fFeatures = FADF_RECORD; + //arrRes_->vt = VT_ARRAY|VT_RECORD; + //(*arrRes)->cbElements = uiESize; + (*arrRes)->cbElements = sizeof(XYPoint); + (*arrRes)->rgsabound[0].cElements = setXY.size(); + (*arrRes)->rgsabound[0].lLbound = lLo; + hr = SafeArrayAllocData( *arrRes ); + //hr = arrRes->parray = SafeArrayCreate( VT_RECORD, 1, &bnd ); + + //hr = SafeArrayRedim( &rArrGen, &bnd ); + if( FAILED(hr) ) + { + Error( L"Ошибка изменения массива", 0, NULL, IID_ISHlp, hr ); + SafeArrayDestroyDescriptor( *arrRes ); + *arrRes = NULL; + //arrRes_->vt = VT_EMPTY; + return hr; + } + + it1 = setXY.begin(); + it2 = setXY.end(); + + char* p; + hr = SafeArrayAccessData( *arrRes, (void**)&p ); + if( FAILED(hr) ) + { + Error( L"Ошибка доступа к массиву", 0, NULL, IID_ISHlp, hr ); + SafeArrayDestroyData( *arrRes ); + SafeArrayDestroyDescriptor( *arrRes ); + *arrRes = NULL; + //arrRes_->vt = VT_EMPTY; + return hr; + } + + int ii = 0; + for( ; it1 != it2; ++it1, ++ii ) + { + ((XYPoint2*)p)->x = it1->XY->x; + ((XYPoint2*)p)->y = it1->XY->y; + ((XYPoint2*)p)->b = it1->XY->b; + //((XYPoint2*)p)->x = ii; + //((XYPoint2*)p)->y = ii*ii; + //((XYPoint2*)p)->b = VARIANT_TRUE; + p += sizeof(XYPoint2); + } + SafeArrayUnaccessData( *arrRes ); + } + + + return S_OK; + } + diff --git a/Signal/SigHelper/SHlp.h b/Signal/SigHelper/SHlp.h new file mode 100644 index 0000000..29a5401 --- /dev/null +++ b/Signal/SigHelper/SHlp.h @@ -0,0 +1,59 @@ +// SHlp.h : Declaration of the CSHlp + +#ifndef __SHLP_H_ +#define __SHLP_H_ + +#include "resource.h" // main symbols +#import "..\\BMPS\\cgitem.dll" raw_native_types , named_guids, no_namespace, no_implementation + +///////////////////////////////////////////////////////////////////////////// +// CSHlp +class ATL_NO_VTABLE CSHlp : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl +{ +public: + CSHlp() + { + } + +DECLARE_REGISTRY_RESOURCEID(IDR_SHLP) +DECLARE_NOT_AGGREGATABLE(CSHlp) +DECLARE_CLASSFACTORY_SINGLETON( CSHlp ) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CSHlp) + COM_INTERFACE_ENTRY(ISHlp) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISHlp +public: + STDMETHOD(InsertPoints)(/*[in]*/ VARIANT arrGenerated, /*[in]*/ VARIANT arrSpec, SAFEARRAY** arrRes); +}; + +struct CXYHold + { + CXYHold( XYPoint* xy ) + { + XY = xy; + } + + XYPoint* XY; + }; + + +inline bool operator<( const CXYHold& r1, const CXYHold& r2 ) + { + return r1.XY->x < r2.XY->x; + } + + +#endif //__SHLP_H_ diff --git a/Signal/SigHelper/SHlp.rgs b/Signal/SigHelper/SHlp.rgs new file mode 100644 index 0000000..1455426 --- /dev/null +++ b/Signal/SigHelper/SHlp.rgs @@ -0,0 +1,26 @@ +HKCR +{ + SigHelper.SHlp.1 = s 'SHlp Class' + { + CLSID = s '{78F8196E-A265-11D3-8E26-00504E02C39D}' + } + SigHelper.SHlp = s 'SHlp Class' + { + CLSID = s '{78F8196E-A265-11D3-8E26-00504E02C39D}' + CurVer = s 'SigHelper.SHlp.1' + } + NoRemove CLSID + { + ForceRemove {78F8196E-A265-11D3-8E26-00504E02C39D} = s 'SHlp Class' + { + ProgID = s 'SigHelper.SHlp.1' + VersionIndependentProgID = s 'SigHelper.SHlp' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{78F81961-A265-11D3-8E26-00504E02C39D}' + } + } +} diff --git a/Signal/SigHelper/SigHelper.cpp b/Signal/SigHelper/SigHelper.cpp new file mode 100644 index 0000000..3590341 --- /dev/null +++ b/Signal/SigHelper/SigHelper.cpp @@ -0,0 +1,72 @@ +// SigHelper.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f SigHelperps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "SigHelper.h" + +#include "SigHelper_i.c" +#include "SHlp.h" + + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) +OBJECT_ENTRY(CLSID_SHlp, CSHlp) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_SIGHELPERLib); + DisableThreadLibraryCalls(hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + _Module.Term(); + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + return _Module.UnregisterServer(TRUE); +} + + diff --git a/Signal/SigHelper/SigHelper.def b/Signal/SigHelper/SigHelper.def new file mode 100644 index 0000000..d80f9b8 --- /dev/null +++ b/Signal/SigHelper/SigHelper.def @@ -0,0 +1,9 @@ +; SigHelper.def : Declares the module parameters. + +LIBRARY "SigHelper.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/Signal/SigHelper/SigHelper.dsp b/Signal/SigHelper/SigHelper.dsp new file mode 100644 index 0000000..17b1399 --- /dev/null +++ b/Signal/SigHelper/SigHelper.dsp @@ -0,0 +1,323 @@ +# Microsoft Developer Studio Project File - Name="SigHelper" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=SigHelper - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SigHelper.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SigHelper.mak" CFG="SigHelper - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SigHelper - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "SigHelper - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "SigHelper - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "SigHelper - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "SigHelper - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "SigHelper - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SigHelper - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=.\Debug\SigHelper.dll +InputPath=.\Debug\SigHelper.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "SigHelper - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=.\DebugU\SigHelper.dll +InputPath=.\DebugU\SigHelper.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "SigHelper - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=.\ReleaseMinSize\SigHelper.dll +InputPath=.\ReleaseMinSize\SigHelper.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "SigHelper - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=.\ReleaseMinDependency\SigHelper.dll +InputPath=.\ReleaseMinDependency\SigHelper.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "SigHelper - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=.\ReleaseUMinSize\SigHelper.dll +InputPath=.\ReleaseUMinSize\SigHelper.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "SigHelper - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\SigHelper.dll +InputPath=.\ReleaseUMinDependency\SigHelper.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "SigHelper - Win32 Debug" +# Name "SigHelper - Win32 Unicode Debug" +# Name "SigHelper - Win32 Release MinSize" +# Name "SigHelper - Win32 Release MinDependency" +# Name "SigHelper - Win32 Unicode Release MinSize" +# Name "SigHelper - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\SHlp.cpp +# End Source File +# Begin Source File + +SOURCE=.\SigHelper.cpp +# End Source File +# Begin Source File + +SOURCE=.\SigHelper.def +# End Source File +# Begin Source File + +SOURCE=.\SigHelper.idl +# ADD MTL /tlb ".\SigHelper.tlb" /h "SigHelper.h" /iid "SigHelper_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\SigHelper.rc +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\SHlp.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\SHlp.rgs +# End Source File +# End Group +# End Target +# End Project diff --git a/Signal/SigHelper/SigHelper.dsw b/Signal/SigHelper/SigHelper.dsw new file mode 100644 index 0000000..2e89792 --- /dev/null +++ b/Signal/SigHelper/SigHelper.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SigHelper"=.\SigHelper.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Signal/SigHelper/SigHelper.h b/Signal/SigHelper/SigHelper.h new file mode 100644 index 0000000..88b1b2b --- /dev/null +++ b/Signal/SigHelper/SigHelper.h @@ -0,0 +1,255 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Dec 01 20:45:44 1999 + */ +/* Compiler settings for G:\WORK\Signal\SigHelper\SigHelper.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __SigHelper_h__ +#define __SigHelper_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __ISHlp_FWD_DEFINED__ +#define __ISHlp_FWD_DEFINED__ +typedef interface ISHlp ISHlp; +#endif /* __ISHlp_FWD_DEFINED__ */ + + +#ifndef __SHlp_FWD_DEFINED__ +#define __SHlp_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SHlp SHlp; +#else +typedef struct SHlp SHlp; +#endif /* __cplusplus */ + +#endif /* __SHlp_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +/* interface __MIDL_itf_SigHelper_0000 */ +/* [local] */ + +typedef /* [public][public][uuid][version][public] */ struct __MIDL___MIDL_itf_SigHelper_0000_0001 + { + double x; + double y; + VARIANT_BOOL b; + } XYPoint2; + + + +extern RPC_IF_HANDLE __MIDL_itf_SigHelper_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_SigHelper_0000_v0_0_s_ifspec; + +#ifndef __ISHlp_INTERFACE_DEFINED__ +#define __ISHlp_INTERFACE_DEFINED__ + +/* interface ISHlp */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISHlp; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("78F8196D-A265-11D3-8E26-00504E02C39D") + ISHlp : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE InsertPoints( + /* [in] */ VARIANT arrGenerated, + /* [in] */ VARIANT arrSpec, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISHlpVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISHlp __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISHlp __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISHlp __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISHlp __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISHlp __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISHlp __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISHlp __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *InsertPoints )( + ISHlp __RPC_FAR * This, + /* [in] */ VARIANT arrGenerated, + /* [in] */ VARIANT arrSpec, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + END_INTERFACE + } ISHlpVtbl; + + interface ISHlp + { + CONST_VTBL struct ISHlpVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISHlp_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISHlp_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISHlp_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISHlp_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISHlp_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISHlp_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISHlp_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISHlp_InsertPoints(This,arrGenerated,arrSpec,arrRes) \ + (This)->lpVtbl -> InsertPoints(This,arrGenerated,arrSpec,arrRes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISHlp_InsertPoints_Proxy( + ISHlp __RPC_FAR * This, + /* [in] */ VARIANT arrGenerated, + /* [in] */ VARIANT arrSpec, + /* [out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrRes); + + +void __RPC_STUB ISHlp_InsertPoints_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISHlp_INTERFACE_DEFINED__ */ + + + +#ifndef __SIGHELPERLib_LIBRARY_DEFINED__ +#define __SIGHELPERLib_LIBRARY_DEFINED__ + +/* library SIGHELPERLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_SIGHELPERLib; + +EXTERN_C const CLSID CLSID_SHlp; + +#ifdef __cplusplus + +class DECLSPEC_UUID("78F8196E-A265-11D3-8E26-00504E02C39D") +SHlp; +#endif +#endif /* __SIGHELPERLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long __RPC_FAR *, unsigned long , LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); +void __RPC_USER LPSAFEARRAY_UserFree( unsigned long __RPC_FAR *, LPSAFEARRAY __RPC_FAR * ); + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long __RPC_FAR *, unsigned long , VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +void __RPC_USER VARIANT_UserFree( unsigned long __RPC_FAR *, VARIANT __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Signal/SigHelper/SigHelper.idl b/Signal/SigHelper/SigHelper.idl new file mode 100644 index 0000000..8df9e26 --- /dev/null +++ b/Signal/SigHelper/SigHelper.idl @@ -0,0 +1,60 @@ +// SigHelper.idl : IDL source for SigHelper.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (SigHelper.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + + [ public, + version(1.0), + uuid(0D2874C1-A35C-11d3-8E29-00504E02C39D) + ] typedef struct + { + + double x, y; + VARIANT_BOOL b; + + } XYPoint2; + + + [ + object, + uuid(78F8196D-A265-11D3-8E26-00504E02C39D), + dual, + helpstring("ISHlp Interface"), + pointer_default(unique) + ] + interface ISHlp : IDispatch + { + [id(1), helpstring("method InsertPoints")] HRESULT InsertPoints([in] VARIANT arrGenerated, [in] VARIANT arrSpec, [out] SAFEARRAY(XYPoint2)* arrRes); + }; + +[ + uuid(78F81961-A265-11D3-8E26-00504E02C39D), + version(1.0), + helpstring("SigHelper 1.0 Type Library") +] +library SIGHELPERLib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + + //typedef [uuid(0D74D371-A274-11d3-8E26-00504E02C39D), public] struct Tag_XYPoint + + + [ + uuid(78F8196E-A265-11D3-8E26-00504E02C39D), + helpstring("SHlp Class"), + appobject + ] + coclass SHlp + { + [default] interface ISHlp; + }; +}; + + + diff --git a/Signal/SigHelper/SigHelper.rc b/Signal/SigHelper/SigHelper.rc new file mode 100644 index 0000000..78418c9 --- /dev/null +++ b/Signal/SigHelper/SigHelper.rc @@ -0,0 +1,136 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#ifdef _WIN32 +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_SHLP REGISTRY DISCARDABLE "SHlp.rgs" +#endif // Russian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""SigHelper.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "SigHelper Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "SigHelper\0" + VALUE "LegalCopyright", "Copyright 1999\0" + VALUE "OriginalFilename", "SigHelper.DLL\0" + VALUE "ProductName", "SigHelper Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "OLESelfRegister", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "SigHelper" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "SigHelper.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Signal/SigHelper/SigHelperps.def b/Signal/SigHelper/SigHelperps.def new file mode 100644 index 0000000..6eb9626 --- /dev/null +++ b/Signal/SigHelper/SigHelperps.def @@ -0,0 +1,11 @@ + +LIBRARY "SigHelperPS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/Signal/SigHelper/SigHelperps.mk b/Signal/SigHelper/SigHelperps.mk new file mode 100644 index 0000000..850259a --- /dev/null +++ b/Signal/SigHelper/SigHelperps.mk @@ -0,0 +1,16 @@ + +SigHelperps.dll: dlldata.obj SigHelper_p.obj SigHelper_i.obj + link /dll /out:SigHelperps.dll /def:SigHelperps.def /entry:DllMain dlldata.obj SigHelper_p.obj SigHelper_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del SigHelperps.dll + @del SigHelperps.lib + @del SigHelperps.exp + @del dlldata.obj + @del SigHelper_p.obj + @del SigHelper_i.obj diff --git a/Signal/SigHelper/StdAfx.cpp b/Signal/SigHelper/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/Signal/SigHelper/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/Signal/SigHelper/StdAfx.h b/Signal/SigHelper/StdAfx.h new file mode 100644 index 0000000..d2d47c8 --- /dev/null +++ b/Signal/SigHelper/StdAfx.h @@ -0,0 +1,29 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#if !defined(AFX_STDAFX_H__78F81964_A265_11D3_8E26_00504E02C39D__INCLUDED_) +#define AFX_STDAFX_H__78F81964_A265_11D3_8E26_00504E02C39D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0400 +#endif +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include +#include +using namespace std; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__78F81964_A265_11D3_8E26_00504E02C39D__INCLUDED) diff --git a/Signal/SigHelper/resource.h b/Signal/SigHelper/resource.h new file mode 100644 index 0000000..f0c135e --- /dev/null +++ b/Signal/SigHelper/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by SigHelper.rc +// +#define IDS_PROJNAME 100 +#define IDR_SHLP 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/Signal/Signal.vbg b/Signal/Signal.vbg new file mode 100644 index 0000000..60b2daf --- /dev/null +++ b/Signal/Signal.vbg @@ -0,0 +1,2 @@ +VBGROUP 5.0 +Project=Signals.vbp diff --git a/Signal/Signals.vbp b/Signal/Signals.vbp new file mode 100644 index 0000000..c864cc2 --- /dev/null +++ b/Signal/Signals.vbp @@ -0,0 +1,48 @@ +Type=Exe +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#F:\WINNT\System32\STDOLE2.TLB#OLE Automation +Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#F:\WINNT\System32\MSSTDFMT.DLL#Microsoft Data Formatting Object Library +Reference=*\G{5D0A8E3D-A03A-11D3-8E21-00504E02C39D}#f.0#0#Bmps\CGItem.dll#CGItem +Object={0A732C25-3120-11D2-8929-00A0241E587F}#6.0#0; GRAPHL~1.OCX +Object={2037E3AD-18D6-101C-8158-221E4B551F8E}#5.0#0; Vsocx32.ocx +Object={D2FFAA40-074A-11D1-BAA2-444553540000}#3.0#0; VsVIEW3.ocx +Form=MainForm.frm +Form=Form_Present.frm +Module=GlobalUtils; GlobalUtils.bas +Form=F:\MVS\VB98\Form_Opt.frm +IconForm="MainForm" +Startup="MainForm" +HelpFile="" +ExeName32="Signals.exe" +Command32="" +Name="Signals" +HelpContextID="0" +CompatibleMode="0" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +VersionCompanyName="AlexCorp" +CompilationType=0 +OptimizationType=0 +FavorPentiumPro(tm)=0 +CodeViewDebugInfo=0 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=0 +Unattended=0 +Retained=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 + +[RVB] +DeleteClass1=Form2 +DeleteClass2=Form1 +DeleteClass3=Form1 +DeleteClass4=Module1 +DeleteClass5=CGraphItem +DeleteClass6=IDescrFunc diff --git a/Signal/UtilInternal.bas b/Signal/UtilInternal.bas new file mode 100644 index 0000000..2efae40 --- /dev/null +++ b/Signal/UtilInternal.bas @@ -0,0 +1,127 @@ +Attribute VB_Name = "UtilInternal" +Option Explicit + +Public Function LoadResult(res() As Double, ByVal bWhat As Boolean) As XYPoint() + If Not IsArray(res) Then Exit Function + On Error Resume Next + If UBound(res) - LBound(res) + 1 < 1 Or Err.Number <> 0 Then + Exit Function + End If + + On Error GoTo 0 + + ReDim arr(0 To UBound(res) / 3) As XYPoint + Dim i As Long, j As Long + j = 0 + For i = LBound(res) To UBound(res) Step 3 + If bWhat Then + With arr(j) + .x = res(i): .y = res(i + 1): .b = True + End With + Else + With arr(j) + .x = res(i): .y = res(i + 2): .b = True + End With + End If + j = j + 1 + Next i + + LoadResult = arr +End Function + +Public Function LoadResult2(res() As Double) As XYPoint() + If Not IsArray(res) Then Exit Function + On Error Resume Next + If UBound(res) - LBound(res) + 1 < 1 Or Err.Number <> 0 Then + Exit Function + End If + + On Error GoTo 0 + + ReDim arr(0 To UBound(res) / 2) As XYPoint + Dim i As Long, j As Long + j = 0 + For i = LBound(res) To UBound(res) Step 2 + With arr(j) + .x = res(i): .y = res(i + 1): .b = True + End With + j = j + 1 + Next i + + LoadResult2 = arr +End Function + +Public Function LoadResult2Scale(res() As Double, ByVal dMX As Double, ByVal dMY As Double) As XYPoint() + If Not IsArray(res) Then Exit Function + On Error Resume Next + If UBound(res) - LBound(res) + 1 < 1 Or Err.Number <> 0 Then + Exit Function + End If + + On Error GoTo 0 + + ReDim arr(0 To UBound(res) / 2) As XYPoint + Dim i As Long, j As Long + j = 0 + For i = LBound(res) To UBound(res) Step 2 + With arr(j) + .x = res(i) * dMX: .y = res(i + 1) * dMY: .b = True + End With + j = j + 1 + Next i + + LoadResult2Scale = arr +End Function + + +Public Sub GenericBuild(ByVal func As IDescrFunc2, _ + ByVal lInd As Long, _ + ByVal item As GraphItem) + + Dim dX1 As Double, dX2 As Double, dStep As Double + 'dX1 = func.Hints.dSampleX1 + dX2 = func.Hints.dSampleX2 + dStep = func.Hints.dSampleStep + + Dim lCnt As Long + lCnt = 0 + For dX1 = func.Hints.dSampleX1 To dX2 Step dStep + lCnt = lCnt + 1 + Next dX1 + + + ReDim arr(0 To (lCnt - 1)) As XYPoint + lCnt = 0 + + On Error Resume Next + For dX1 = func.Hints.dSampleX1 To dX2 Step dStep + With arr(lCnt) + .x = dX1 + Err.Clear + .y = func.XtoY(.x, lInd) + If Err.Number <> 0 Then .b = False _ + Else .b = True + End With + lCnt = lCnt + 1 + Next dX1 + item.arrPoints = arr +End Sub + + +Public Sub DumpXY(xy As Variant) + Dim l1 As Long, l2 As Long + l1 = LBound(xy): l2 = UBound(xy) + + Dim i As Long + For i = l1 To l2 + Debug.Print xy(i).x & "; " & xy(i).y & "; " & xy(i).b + Next i +End Sub + +Public Function Sinc(ByVal d As Double) + If d = 0 Then + Sinc = 1 + Else + Sinc = Sin(d) / d + End If +End Function diff --git a/Signal/set/ReadMe.txt b/Signal/set/ReadMe.txt new file mode 100644 index 0000000..b067e22 --- /dev/null +++ b/Signal/set/ReadMe.txt @@ -0,0 +1,34 @@ +======================================================================== + CONSOLE APPLICATION : set +======================================================================== + + +AppWizard has created this set application for you. + +This file contains a summary of what you will find in each of the files that +make up your set application. + +set.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +set.cpp + This is the main application source file. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named set.pch and a precompiled types file named StdAfx.obj. + + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Signal/set/StdAfx.cpp b/Signal/set/StdAfx.cpp new file mode 100644 index 0000000..5e06b1d --- /dev/null +++ b/Signal/set/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// set.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Signal/set/StdAfx.h b/Signal/set/StdAfx.h new file mode 100644 index 0000000..5a6fd4a --- /dev/null +++ b/Signal/set/StdAfx.h @@ -0,0 +1,22 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__673FC2A3_A28C_11D3_8E26_00504E02C39D__INCLUDED_) +#define AFX_STDAFX_H__673FC2A3_A28C_11D3_8E26_00504E02C39D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +#include + +// TODO: reference additional headers your program requires here + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__673FC2A3_A28C_11D3_8E26_00504E02C39D__INCLUDED_) diff --git a/Signal/set/set.cpp b/Signal/set/set.cpp new file mode 100644 index 0000000..94f5234 --- /dev/null +++ b/Signal/set/set.cpp @@ -0,0 +1,103 @@ +// set.cpp : Defines the entry point for the console application. +// + +#include "stdafx.h" +#include "windows.h" + +#include +#include +using namespace std; + +struct CXYHold + { + CXYHold( ) + { + XY = 0; + } + bool operator==( CXYHold& r1 ); + + int XY; + }; + +bool operator==( const CXYHold& r1, const CXYHold& r2 ); +bool operator==( CXYHold& r1, CXYHold& r2 ); +bool operator<( const CXYHold& r1, const CXYHold& r2 ); + +bool operator==( const CXYHold& r1, const CXYHold& r2 ) + { + + return r1.XY == r2.XY ; + } +bool operator<( const CXYHold& r1, const CXYHold& r2 ) + { + return r1.XY < r2.XY; + } + +bool CXYHold::operator==( CXYHold& r2 ) + { + return XY == r2.XY; + } + +bool operator==( CXYHold& r1, CXYHold& r2 ) + { + return r1.XY == r2.XY && r1.XY == r2.XY; + } + +struct TCmp + { + bool operator()(CXYHold& r1) + { + return r1.XY == 7; + } + }; + +int main(int argc, char* argv[]) + { + + list ss; + + CXYHold x1, x2, x3, x4, x5; + + x1.XY = 1; + ss.push_back( x1 ); + x1.XY = 6; + ss.push_back( x1 ); + x1.XY = 7; + ss.push_back( x1 ); + x1.XY = 7; + ss.push_back( x1 ); + x1.XY = 8; + ss.push_back( x1 ); + x1.XY = 2; + ss.push_back( x1 ); + x1.XY = 7; + ss.push_back( x1 ); + x1.XY = 1; + ss.push_back( x1 ); + + list::iterator it1( ss.begin() ); + list::iterator it2( ss.end() ); + for( ; it1 != it2; ++it1 ) + { + char cc[25]; + sprintf( cc, "%d\n", it1->XY ); + OutputDebugString( cc ); + } + + TCmp pr; + //ss.remove_if( pr ); + remove_if( ss.begin(), ss.end(), pr ); + + it1 = ss.begin(); + it2 = ss.end(); + for( ; it1 != it2; ++it1 ) + { + char cc[25]; + sprintf( cc, "%d\n", it1->XY ); + OutputDebugString( cc ); + } + + + return 0; + } + diff --git a/Signal/set/set.dsp b/Signal/set/set.dsp new file mode 100644 index 0000000..2bbc134 --- /dev/null +++ b/Signal/set/set.dsp @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="set" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=set - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "set.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "set.mak" CFG="set - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "set - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "set - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "set - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x419 /d "NDEBUG" +# ADD RSC /l 0x419 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "set - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x419 /d "_DEBUG" +# ADD RSC /l 0x419 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "set - Win32 Release" +# Name "set - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\set.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/Signal/set/set.dsw b/Signal/set/set.dsw new file mode 100644 index 0000000..3e0fca2 --- /dev/null +++ b/Signal/set/set.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "set"=.\set.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### +