Files
geutebruck/Detailed-Analysis.ps1
Administrator 14893e62a5 feat: Geutebruck GeViScope/GeViSoft Action Mapping System - MVP
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>
2025-12-31 18:10:54 +01:00

101 lines
3.4 KiB
PowerShell

# Detailed analysis of GeViSet structure focusing on sections and properties
$filePath = "C:\Users\Administrator\Desktop\GeViSoft.set"
$data = [System.IO.File]::ReadAllBytes($filePath)
Write-Host "Detailed Structure Analysis" -ForegroundColor Cyan
Write-Host ("=" * 80)
Write-Host ""
# Parse first section manually and document every byte
$pos = 0
Write-Host "=== First Section (GeViSoft Parameters) ===" -ForegroundColor Yellow
Write-Host "Offset 0x00: Type = 0x$($data[$pos].ToString('X2')) (Section marker)"
$pos++
Write-Host "Offset 0x01: Length = $($data[$pos]) bytes"
$nameLength = $data[$pos]
$pos++
$sectionName = [System.Text.Encoding]::UTF8.GetString($data, $pos, $nameLength)
Write-Host "Offset 0x$(($pos).ToString('X2'))-0x$(($pos + $nameLength - 1).ToString('X2')): Name = '$sectionName'"
$pos += $nameLength
Write-Host ""
Write-Host "After section name, next bytes are:"
for ($i = 0; $i < 50; $i++) {
$offset = $pos + $i
$byte = $data[$offset]
$hexByte = "0x$($byte.ToString('X2'))"
# Try to interpret
$interpretation = ""
if ($byte -eq 0x00) { $interpretation = "Section" }
elseif ($byte -eq 0x01) { $interpretation = "Boolean" }
elseif ($byte -eq 0x02) { $interpretation = "Int64" }
elseif ($byte -eq 0x04) { $interpretation = "Int32" }
elseif ($byte -eq 0x07) { $interpretation = "Property Name" }
elseif ($byte -eq 0x08) { $interpretation = "String" }
elseif ($byte -ge 0x20 -and $byte -lt 0x7F) { $interpretation = "ASCII: '$([char]$byte)'" }
Write-Host (" +{0,3}: {1,-6} = {2,-3} {3}" -f $i, $hexByte, $byte, $interpretation)
}
Write-Host ""
Write-Host "=== Attempting to parse structure after section name ===" -ForegroundColor Yellow
# Reset to after section name
$pos = 2 + $nameLength
# Try reading as int32 + byte
$metadata1 = [BitConverter]::ToUInt32($data, $pos)
$pos += 4
Write-Host "Int32 value: $metadata1 (0x$($metadata1.ToString('X8')))"
$metadata2 = $data[$pos]
$pos++
Write-Host "Byte value: $metadata2 (0x$($metadata2.ToString('X2')))"
Write-Host ""
Write-Host "Next element:"
$nextType = $data[$pos]
Write-Host "Type marker: 0x$($nextType.ToString('X2'))"
if ($nextType -eq 0x00) {
Write-Host " -> This is a nested section"
$pos++
$subLen = $data[$pos]
$pos++
$subName = [System.Text.Encoding]::UTF8.GetString($data, $pos, $subLen)
Write-Host " -> Section name: '$subName' (length: $subLen)"
$pos += $subLen
# Check what follows
Write-Host " -> After nested section name:"
for ($i = 0; $i < 10; $i++) {
$byte = $data[$pos + $i]
Write-Host (" +{0}: 0x{1:X2} = {2}" -f $i, $byte, $byte)
}
}
Write-Host ""
Write-Host "=== Looking at a property example (search for 'Enabled') ===" -ForegroundColor Yellow
$text = [System.Text.Encoding]::GetEncoding("ISO-8859-1").GetString($data)
$enabledPos = $text.IndexOf("Enabled")
if ($enabledPos -ge 0) {
Write-Host "Found 'Enabled' at offset: 0x$($enabledPos.ToString('X'))"
Write-Host "Context (20 bytes before and 20 after):"
$start = [Math]::Max(0, $enabledPos - 20)
for ($i = $start; $i -lt ($enabledPos + 30) -and $i -lt $data.Length; $i++) {
$byte = $data[$i]
$char = if ($byte -ge 0x20 -and $byte -lt 0x7F) { [char]$byte } else { '.' }
$mark = if ($i -eq $enabledPos) { " <-- 'Enabled' starts here" } else { "" }
Write-Host (" 0x{0:X4}: 0x{1:X2} = {2,3} '{3}' {4}" -f $i, $byte, $byte, $char, $mark)
}
}