Skip to content

Commit 0269d84

Browse files
Merge pull request #118 from GridProtectionAlliance/OHTansferTool
Added openHistorian point translation and export tool
2 parents e40eaaf + 589d303 commit 0269d84

19 files changed

Lines changed: 2804 additions & 2 deletions

Source/Libraries/GSF.SortedTreeStore/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
[assembly: InternalsVisibleTo("GSF.SortedTreeStore.Test")]
4545
[assembly: InternalsVisibleTo("openHistorian.Adapters")]
4646
[assembly: InternalsVisibleTo("openHistorian.PerformanceTests")]
47-
[assembly: InternalsVisibleTo("ArchiveIntegrityChecker")]
47+
[assembly: InternalsVisibleTo("ArchiveIntegrityChecker")]
48+
[assembly: InternalsVisibleTo("OHTransfer")]

Source/Libraries/GSF.SortedTreeStore/Snap/Services/Reader/SequentialReaderStream'2.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,20 @@ private bool ReadCatchAll(TKey key, TValue value)
202202
m_pointCount = 0;
203203
}
204204

205-
TryAgain:
205+
long retries = 0;
206+
207+
TryAgain:
206208
if (!m_timedOut)
207209
{
210+
retries++;
211+
212+
if (retries >= 10000)
213+
{
214+
m_workerThreadSynchronization.PulseSafeToCallback();
215+
Interlocked.Add(ref Stats.PointsScanned, retries);
216+
retries = 0;
217+
}
218+
208219
if (m_keyMatchIsUniverse)
209220
{
210221
if (m_firstTableScanner is null)

Source/Tools/OHTransfer/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
5+
</startup>
6+
</configuration>

Source/Tools/OHTransfer/OHTransfer.Designer.cs

Lines changed: 417 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Tools/OHTransfer/OHTransfer.cs

Lines changed: 690 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{FE351919-B4A6-4D81-91CC-64BC1D588ECC}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>OHTransfer</RootNamespace>
10+
<AssemblyName>OHTransfer</AssemblyName>
11+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
<LangVersion>latest</LangVersion>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>AnyCPU</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
<Prefer32Bit>false</Prefer32Bit>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<PlatformTarget>AnyCPU</PlatformTarget>
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
<Prefer32Bit>false</Prefer32Bit>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<ApplicationIcon>OHTransfer.ico</ApplicationIcon>
40+
</PropertyGroup>
41+
<ItemGroup>
42+
<Reference Include="GSF.Core">
43+
<HintPath>..\..\Dependencies\GSF\GSF.Core.dll</HintPath>
44+
</Reference>
45+
<Reference Include="GSF.Windows">
46+
<HintPath>..\..\Dependencies\GSF\GSF.Windows.dll</HintPath>
47+
</Reference>
48+
<Reference Include="System" />
49+
<Reference Include="System.Configuration" />
50+
<Reference Include="System.Core" />
51+
<Reference Include="System.Xml.Linq" />
52+
<Reference Include="System.Data.DataSetExtensions" />
53+
<Reference Include="Microsoft.CSharp" />
54+
<Reference Include="System.Data" />
55+
<Reference Include="System.Deployment" />
56+
<Reference Include="System.Drawing" />
57+
<Reference Include="System.Net.Http" />
58+
<Reference Include="System.Windows.Forms" />
59+
<Reference Include="System.Xml" />
60+
</ItemGroup>
61+
<ItemGroup>
62+
<Compile Include="OHTransfer.cs">
63+
<SubType>Form</SubType>
64+
</Compile>
65+
<Compile Include="OHTransfer.Designer.cs">
66+
<DependentUpon>OHTransfer.cs</DependentUpon>
67+
</Compile>
68+
<Compile Include="Program.cs" />
69+
<Compile Include="Properties\AssemblyInfo.cs" />
70+
<Compile Include="TranslatingStreamReader.cs" />
71+
<EmbeddedResource Include="OHTransfer.resx">
72+
<DependentUpon>OHTransfer.cs</DependentUpon>
73+
</EmbeddedResource>
74+
<EmbeddedResource Include="Properties\Resources.resx">
75+
<Generator>ResXFileCodeGenerator</Generator>
76+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
77+
<SubType>Designer</SubType>
78+
</EmbeddedResource>
79+
<Compile Include="Properties\Resources.Designer.cs">
80+
<AutoGen>True</AutoGen>
81+
<DependentUpon>Resources.resx</DependentUpon>
82+
</Compile>
83+
<None Include="Properties\Settings.settings">
84+
<Generator>SettingsSingleFileGenerator</Generator>
85+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
86+
</None>
87+
<Compile Include="Properties\Settings.Designer.cs">
88+
<AutoGen>True</AutoGen>
89+
<DependentUpon>Settings.settings</DependentUpon>
90+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
91+
</Compile>
92+
</ItemGroup>
93+
<ItemGroup>
94+
<None Include="App.config" />
95+
</ItemGroup>
96+
<ItemGroup>
97+
<Content Include="OHTransfer.ico" />
98+
<Content Include="openHistorian.ico" />
99+
</ItemGroup>
100+
<ItemGroup>
101+
<ProjectReference Include="..\..\Libraries\GSF.SortedTreeStore\GSF.SortedTreeStore.csproj">
102+
<Project>{040e2ae7-021b-435a-adbf-06d07ee0a67d}</Project>
103+
<Name>GSF.SortedTreeStore</Name>
104+
</ProjectReference>
105+
<ProjectReference Include="..\..\Libraries\openHistorian.Core\openHistorian.Core.csproj">
106+
<Project>{7b53c942-e891-461c-b09c-49faba82f19d}</Project>
107+
<Name>openHistorian.Core</Name>
108+
</ProjectReference>
109+
</ItemGroup>
110+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
111+
<PropertyGroup>
112+
<PostBuildEvent>
113+
</PostBuildEvent>
114+
</PropertyGroup>
115+
</Project>
60.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)