Complete Phase 0 and Phase 1 design documentation
- Add comprehensive research.md with SDK integration decisions - Add complete data-model.md with 7 entities and relationships - Add OpenAPI 3.0 specification (contracts/openapi.yaml) - Add developer quickstart.md guide - Add comprehensive tasks.md with 215 tasks organized by user story - Update plan.md with complete technical context - Add SDK_INTEGRATION_LESSONS.md capturing critical knowledge - Add .gitignore for Python and C# projects - Include GeViScopeConfigReader and GeViSoftConfigReader tools Phase 1 Design Complete: ✅ Architecture: Python FastAPI + C# gRPC Bridge + GeViScope SDK ✅ 10 user stories mapped to tasks (MVP = US1-4) ✅ Complete API contract with 17 endpoints ✅ Data model with User, Camera, Stream, Event, Recording, Analytics ✅ TDD approach enforced with 80+ test tasks Ready for Phase 2: Implementation 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
12
GeViSoftConfigReader/App.config
Normal file
12
GeViSoftConfigReader/App.config
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<probing privatePath="." />
|
||||
</assemblyBinding>
|
||||
<loadFromRemoteSources enabled="true"/>
|
||||
</runtime>
|
||||
</configuration>
|
||||
65
GeViSoftConfigReader/GeViSoftConfigReader.csproj
Normal file
65
GeViSoftConfigReader/GeViSoftConfigReader.csproj
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{C9B6E0D3-9D5F-4E2B-8F7C-6A4D9B2E1F5A}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>GeViSoftConfigReader</RootNamespace>
|
||||
<AssemblyName>GeViSoftConfigReader</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>C:\GEVISOFT\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="GeViProcAPINET_4_0, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\GEVISOFT\GeViProcAPINET_4_0.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
|
||||
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup> <ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
193
GeViSoftConfigReader/MainForm.cs
Normal file
193
GeViSoftConfigReader/MainForm.cs
Normal file
@@ -0,0 +1,193 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using GEUTEBRUECK.GeViSoftSDKNET.ActionsWrapper;
|
||||
using GEUTEBRUECK.GeViSoftSDKNET.ActionsWrapper.ActionDispatcher;
|
||||
using GEUTEBRUECK.GeViSoftSDKNET.ActionsWrapper.SystemActions;
|
||||
using GEUTEBRUECK.GeViSoftSDKNET.ActionsWrapper.DataBaseQueries;
|
||||
using GEUTEBRUECK.GeViSoftSDKNET.ActionsWrapper.DataBaseAnswers;
|
||||
|
||||
namespace GeViSoftConfigReader
|
||||
{
|
||||
public class MainForm : Form
|
||||
{
|
||||
private GeViDatabase database;
|
||||
private string[] args;
|
||||
|
||||
public MainForm(string[] arguments)
|
||||
{
|
||||
this.args = arguments;
|
||||
this.Shown += MainForm_Shown;
|
||||
this.WindowState = FormWindowState.Minimized;
|
||||
this.ShowInTaskbar = false;
|
||||
this.Size = new System.Drawing.Size(1, 1);
|
||||
}
|
||||
|
||||
private void MainForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
|
||||
// Global exception handler - catch EVERYTHING
|
||||
try
|
||||
{
|
||||
File.WriteAllText(@"C:\GEVISOFT\SHOWN_EVENT_FIRED.txt", "Event fired at " + DateTime.Now);
|
||||
RunExport();
|
||||
File.WriteAllText(@"C:\GEVISOFT\RUNEXPORT_COMPLETED.txt", "RunExport completed at " + DateTime.Now);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.WriteAllText(@"C:\GEVISOFT\GLOBAL_EXCEPTION.txt",
|
||||
"GLOBAL EXCEPTION at " + DateTime.Now + Environment.NewLine +
|
||||
"Message: " + ex.Message + Environment.NewLine +
|
||||
"Type: " + ex.GetType().FullName + Environment.NewLine +
|
||||
"Stack: " + ex.StackTrace + Environment.NewLine +
|
||||
"ToString: " + ex.ToString());
|
||||
}
|
||||
catch { /* Ultimate fallback - can't even write error */ }
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Give file operations time to complete before exiting
|
||||
System.Threading.Thread.Sleep(2000);
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
private void RunExport()
|
||||
{
|
||||
string logFile = @"C:\GEVISOFT\GeViSoftConfigReader.log";
|
||||
void Log(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
string logLine = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ": " + message + Environment.NewLine;
|
||||
File.AppendAllText(logFile, logLine);
|
||||
// Also force flush by reopening
|
||||
System.Threading.Thread.Sleep(10);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.WriteAllText(@"C:\GEVISOFT\log_error.txt",
|
||||
"Log Error at " + DateTime.Now + Environment.NewLine + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Write immediate confirmation that we entered this method
|
||||
File.WriteAllText(@"C:\GEVISOFT\runexport_started.txt",
|
||||
"RunExport started at " + DateTime.Now + Environment.NewLine +
|
||||
"Args count: " + (args != null ? args.Length.ToString() : "null"));
|
||||
System.Threading.Thread.Sleep(50); // Ensure file write completes
|
||||
|
||||
// Delete old log if exists
|
||||
if (File.Exists(logFile))
|
||||
{
|
||||
try { File.Delete(logFile); } catch { }
|
||||
}
|
||||
|
||||
Log("=== GeViSoft Configuration Reader Started ===");
|
||||
Log("Working Directory: " + Directory.GetCurrentDirectory());
|
||||
Log("Application Path: " + Application.ExecutablePath);
|
||||
|
||||
// Parse arguments with defaults
|
||||
string hostname = "localhost";
|
||||
string username = "sysadmin";
|
||||
string password = "masterkey";
|
||||
string outputFile = @"C:\GEVISOFT\geviSoft_config.json"; // Explicit full path
|
||||
|
||||
if (args != null && args.Length >= 1) hostname = args[0];
|
||||
if (args != null && args.Length >= 2) username = args[1];
|
||||
if (args != null && args.Length >= 3) password = args[2];
|
||||
if (args != null && args.Length >= 4) outputFile = args[3];
|
||||
|
||||
// Ensure output file has full path
|
||||
if (!Path.IsPathRooted(outputFile))
|
||||
{
|
||||
outputFile = Path.Combine(@"C:\GEVISOFT", outputFile);
|
||||
}
|
||||
|
||||
Log($"Server: {hostname}, User: {username}, Output: {outputFile}");
|
||||
Log("Creating database connection...");
|
||||
|
||||
File.WriteAllText(@"C:\GEVISOFT\before_gevidatabase.txt",
|
||||
"About to create GeViDatabase at " + DateTime.Now);
|
||||
|
||||
database = new GeViDatabase();
|
||||
|
||||
File.WriteAllText(@"C:\GEVISOFT\after_gevidatabase.txt",
|
||||
"GeViDatabase created at " + DateTime.Now);
|
||||
|
||||
Log("GeViDatabase object created successfully");
|
||||
Log($"Calling Create({hostname}, {username}, ***)");
|
||||
|
||||
database.Create(hostname, username, password);
|
||||
Log("Create() completed, calling RegisterCallback()");
|
||||
|
||||
database.RegisterCallback();
|
||||
Log("RegisterCallback() completed, calling Connect()");
|
||||
|
||||
GeViConnectResult result = database.Connect();
|
||||
Log($"Connect() returned: {result}");
|
||||
|
||||
if (result != GeViConnectResult.connectOk)
|
||||
{
|
||||
Log($"ERROR: Connection failed: {result}");
|
||||
File.WriteAllText(@"C:\GEVISOFT\connection_failed.txt",
|
||||
"Connection failed: " + result.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
Log("Connected successfully!");
|
||||
|
||||
JObject config = new JObject();
|
||||
config["ServerInfo"] = new JObject
|
||||
{
|
||||
["Hostname"] = hostname,
|
||||
["Connected"] = true,
|
||||
["ConnectionResult"] = result.ToString(),
|
||||
["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
};
|
||||
|
||||
Log("Saving configuration to: " + outputFile);
|
||||
string jsonContent = config.ToString(Formatting.Indented);
|
||||
File.WriteAllText(outputFile, jsonContent);
|
||||
Log($"File written successfully. Size: {new FileInfo(outputFile).Length} bytes");
|
||||
|
||||
Log($"SUCCESS! Config saved to: {outputFile}");
|
||||
|
||||
database.Disconnect();
|
||||
database.Dispose();
|
||||
Log("Database disconnected and disposed");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string errorLog = @"C:\GEVISOFT\RUNEXPORT_ERROR.txt";
|
||||
try
|
||||
{
|
||||
string errorInfo = "=== RUNEXPORT EXCEPTION ===" + Environment.NewLine +
|
||||
"Time: " + DateTime.Now + Environment.NewLine +
|
||||
"Message: " + ex.Message + Environment.NewLine +
|
||||
"Type: " + ex.GetType().FullName + Environment.NewLine +
|
||||
"Stack Trace:" + Environment.NewLine + ex.StackTrace + Environment.NewLine +
|
||||
Environment.NewLine + "Full ToString:" + Environment.NewLine + ex.ToString();
|
||||
|
||||
File.WriteAllText(errorLog, errorInfo);
|
||||
|
||||
// Try to log it too
|
||||
try { Log("EXCEPTION: " + ex.Message); } catch { }
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Last resort - write minimal error
|
||||
try { File.WriteAllText(@"C:\GEVISOFT\ERROR_WRITING_ERROR.txt", "Failed to write error log"); } catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
GeViSoftConfigReader/Program.cs
Normal file
16
GeViSoftConfigReader/Program.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GeViSoftConfigReader
|
||||
{
|
||||
class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm(args));
|
||||
}
|
||||
}
|
||||
}
|
||||
18
GeViSoftConfigReader/Properties/AssemblyInfo.cs
Normal file
18
GeViSoftConfigReader/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("GeViSoftConfigReader")]
|
||||
[assembly: AssemblyDescription("GeViSoft Configuration Reader and JSON Exporter")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GeViSoftConfigReader")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: Guid("c9b6e0d3-9d5f-4e2b-8f7c-6a4d9b2e1f5a")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
4
GeViSoftConfigReader/packages.config
Normal file
4
GeViSoftConfigReader/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user