This MVP release provides a complete full-stack solution for managing action mappings in Geutebruck's GeViScope and GeViSoft video surveillance systems. ## Features ### Flutter Web Application (Port 8081) - Modern, responsive UI for managing action mappings - Action picker dialog with full parameter configuration - Support for both GSC (GeViScope) and G-Core server actions - Consistent UI for input and output actions with edit/delete capabilities - Real-time action mapping creation, editing, and deletion - Server categorization (GSC: prefix for GeViScope, G-Core: prefix for G-Core servers) ### FastAPI REST Backend (Port 8000) - RESTful API for action mapping CRUD operations - Action template service with comprehensive action catalog (247 actions) - Server management (G-Core and GeViScope servers) - Configuration tree reading and writing - JWT authentication with role-based access control - PostgreSQL database integration ### C# SDK Bridge (gRPC, Port 50051) - Native integration with GeViSoft SDK (GeViProcAPINET_4_0.dll) - Action mapping creation with correct binary format - Support for GSC and G-Core action types - Proper Camera parameter inclusion in action strings (fixes CrossSwitch bug) - Action ID lookup table with server-specific action IDs - Configuration reading/writing via SetupClient ## Bug Fixes - **CrossSwitch Bug**: GSC and G-Core actions now correctly display camera/PTZ head parameters in GeViSet - Action strings now include Camera parameter: `@ PanLeft (Comment: "", Camera: 101028)` - Proper filter flags and VideoInput=0 for action mappings - Correct action ID assignment (4198 for GSC, 9294 for G-Core PanLeft) ## Technical Stack - **Frontend**: Flutter Web, Dart, Dio HTTP client - **Backend**: Python FastAPI, PostgreSQL, Redis - **SDK Bridge**: C# .NET 8.0, gRPC, GeViSoft SDK - **Authentication**: JWT tokens - **Configuration**: GeViSoft .set files (binary format) ## Credentials - GeViSoft/GeViScope: username=sysadmin, password=masterkey - Default admin: username=admin, password=admin123 ## Deployment All services run on localhost: - Flutter Web: http://localhost:8081 - FastAPI: http://localhost:8000 - SDK Bridge gRPC: localhost:50051 - GeViServer: localhost (default port) Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
177 lines
6.4 KiB
PowerShell
177 lines
6.4 KiB
PowerShell
# Build and Test Script for GeViSoft Action Mapping Implementation
|
|
# PowerShell script to build SDK Bridge and verify implementation
|
|
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
Write-Host "GeViSoft Action Mapping Build & Test" -ForegroundColor Cyan
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
$ErrorActionPreference = "Continue"
|
|
$ProjectRoot = "C:\DEV\COPILOT\geutebruck-api"
|
|
|
|
# Step 1: Build SDK Bridge
|
|
Write-Host "Step 1: Building SDK Bridge..." -ForegroundColor Yellow
|
|
Write-Host ""
|
|
|
|
Set-Location "$ProjectRoot\src\sdk-bridge\GeViScopeBridge"
|
|
|
|
Write-Host " - Restoring NuGet packages..." -ForegroundColor Gray
|
|
dotnet restore
|
|
|
|
Write-Host " - Building in Release configuration..." -ForegroundColor Gray
|
|
dotnet build --configuration Release
|
|
|
|
if ($LASTEXITCODE -eq 0) {
|
|
Write-Host " ✓ SDK Bridge build successful" -ForegroundColor Green
|
|
} else {
|
|
Write-Host " ✗ SDK Bridge build failed" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
Write-Host ""
|
|
|
|
# Step 2: Build DiagnoseActionMapping tool
|
|
Write-Host "Step 2: Building Diagnostic Tool..." -ForegroundColor Yellow
|
|
Write-Host ""
|
|
|
|
Set-Location "$ProjectRoot\src\sdk-bridge\DiagnoseActionMapping"
|
|
|
|
Write-Host " - Restoring NuGet packages..." -ForegroundColor Gray
|
|
dotnet restore
|
|
|
|
Write-Host " - Building diagnostic tool..." -ForegroundColor Gray
|
|
dotnet build --configuration Release
|
|
|
|
if ($LASTEXITCODE -eq 0) {
|
|
Write-Host " ✓ Diagnostic tool build successful" -ForegroundColor Green
|
|
} else {
|
|
Write-Host " ✗ Diagnostic tool build failed" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
Write-Host ""
|
|
|
|
# Step 3: Verify Python dependencies
|
|
Write-Host "Step 3: Verifying Python Dependencies..." -ForegroundColor Yellow
|
|
Write-Host ""
|
|
|
|
Set-Location "$ProjectRoot\src\api"
|
|
|
|
Write-Host " - Checking Python version..." -ForegroundColor Gray
|
|
python --version
|
|
|
|
Write-Host " - Checking required packages..." -ForegroundColor Gray
|
|
$packages = @("fastapi", "sqlalchemy", "alembic", "pydantic", "structlog")
|
|
|
|
foreach ($package in $packages) {
|
|
$installed = python -c "import $package; print($package.__version__)" 2>$null
|
|
if ($installed) {
|
|
Write-Host " ✓ $package installed: $installed" -ForegroundColor Green
|
|
} else {
|
|
Write-Host " ✗ $package not found" -ForegroundColor Red
|
|
}
|
|
}
|
|
|
|
Write-Host ""
|
|
|
|
# Step 4: Verify file creation
|
|
Write-Host "Step 4: Verifying Implementation Files..." -ForegroundColor Yellow
|
|
Write-Host ""
|
|
|
|
$filesToCheck = @(
|
|
# SDK Bridge files
|
|
@{Path="$ProjectRoot\src\sdk-bridge\GeViScopeBridge\appsettings.json"; Type="Config"},
|
|
@{Path="$ProjectRoot\src\sdk-bridge\GeViScopeBridge\SDK\ActionMappingHandler.cs"; Type="SDK Handler"},
|
|
@{Path="$ProjectRoot\src\sdk-bridge\GeViScopeBridge\Services\ActionMappingService.cs"; Type="gRPC Service"},
|
|
@{Path="$ProjectRoot\src\sdk-bridge\Protos\actionmapping.proto"; Type="Proto Definition"},
|
|
|
|
# Python API files
|
|
@{Path="$ProjectRoot\src\api\models\action_mapping.py"; Type="Database Model"},
|
|
@{Path="$ProjectRoot\src\api\schemas\action_mapping.py"; Type="Pydantic Schema"},
|
|
@{Path="$ProjectRoot\src\api\services\action_mapping_service.py"; Type="Service Layer"},
|
|
@{Path="$ProjectRoot\src\api\routers\action_mappings.py"; Type="API Router"},
|
|
@{Path="$ProjectRoot\src\api\migrations\versions\20251210_action_mappings.py"; Type="Migration"},
|
|
|
|
# Tools & Docs
|
|
@{Path="$ProjectRoot\tools\test_action_mappings.py"; Type="Test Tool"},
|
|
@{Path="$ProjectRoot\docs\ACTION_MAPPING_IMPLEMENTATION.md"; Type="Documentation"}
|
|
)
|
|
|
|
$allFilesExist = $true
|
|
|
|
foreach ($file in $filesToCheck) {
|
|
if (Test-Path $file.Path) {
|
|
Write-Host " ✓ $($file.Type) exists" -ForegroundColor Green
|
|
} else {
|
|
Write-Host " ✗ $($file.Type) missing: $($file.Path)" -ForegroundColor Red
|
|
$allFilesExist = $false
|
|
}
|
|
}
|
|
|
|
if (-not $allFilesExist) {
|
|
Write-Host ""
|
|
Write-Host "✗ Some files are missing!" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
Write-Host ""
|
|
|
|
# Step 5: Test SDK Bridge Configuration
|
|
Write-Host "Step 5: Validating SDK Bridge Configuration..." -ForegroundColor Yellow
|
|
Write-Host ""
|
|
|
|
Set-Location "$ProjectRoot\src\sdk-bridge\GeViScopeBridge"
|
|
|
|
$config = Get-Content "appsettings.json" | ConvertFrom-Json
|
|
|
|
Write-Host " GeViScope Configuration:" -ForegroundColor Gray
|
|
Write-Host " Host: $($config.GeViScope.Host)" -ForegroundColor Gray
|
|
Write-Host " Username: $($config.GeViScope.Username)" -ForegroundColor Gray
|
|
|
|
Write-Host " GeViSoft Configuration:" -ForegroundColor Gray
|
|
Write-Host " Host: $($config.GeViSoft.Host)" -ForegroundColor Gray
|
|
Write-Host " Username: $($config.GeViSoft.Username)" -ForegroundColor Gray
|
|
|
|
Write-Host " gRPC Server:" -ForegroundColor Gray
|
|
Write-Host " Port: $($config.GrpcServer.Port)" -ForegroundColor Gray
|
|
|
|
Write-Host ""
|
|
|
|
# Step 6: Summary
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
Write-Host "Build & Verification Complete" -ForegroundColor Cyan
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
Write-Host "Next Steps:" -ForegroundColor Yellow
|
|
Write-Host ""
|
|
Write-Host "1. Start GeViServer (GeViSoft)" -ForegroundColor White
|
|
Write-Host " - Ensure GeViServer is running on localhost" -ForegroundColor Gray
|
|
Write-Host ""
|
|
Write-Host "2. Run Database Migration:" -ForegroundColor White
|
|
Write-Host " cd $ProjectRoot\src\api" -ForegroundColor Gray
|
|
Write-Host " alembic upgrade head" -ForegroundColor Gray
|
|
Write-Host ""
|
|
Write-Host "3. Start SDK Bridge:" -ForegroundColor White
|
|
Write-Host " cd $ProjectRoot\src\sdk-bridge\GeViScopeBridge" -ForegroundColor Gray
|
|
Write-Host " dotnet run" -ForegroundColor Gray
|
|
Write-Host ""
|
|
Write-Host "4. Start Python API:" -ForegroundColor White
|
|
Write-Host " cd $ProjectRoot\src\api" -ForegroundColor Gray
|
|
Write-Host " python main.py" -ForegroundColor Gray
|
|
Write-Host ""
|
|
Write-Host "5. Test Implementation:" -ForegroundColor White
|
|
Write-Host " cd $ProjectRoot" -ForegroundColor Gray
|
|
Write-Host " python tools\test_action_mappings.py" -ForegroundColor Gray
|
|
Write-Host ""
|
|
Write-Host "6. Run Diagnostic Tool:" -ForegroundColor White
|
|
Write-Host " cd $ProjectRoot\src\sdk-bridge\DiagnoseActionMapping" -ForegroundColor Gray
|
|
Write-Host " dotnet run -- localhost sysadmin password" -ForegroundColor Gray
|
|
Write-Host ""
|
|
|
|
Write-Host "Documentation:" -ForegroundColor Yellow
|
|
Write-Host " $ProjectRoot\docs\ACTION_MAPPING_IMPLEMENTATION.md" -ForegroundColor Gray
|
|
Write-Host ""
|
|
|
|
Set-Location $ProjectRoot
|