Initial commit: COPILOT D6 Flutter keyboard controller
Flutter web app replacing legacy WPF CCTV surveillance keyboard controller. Includes wall overview, section view with monitor grid, camera input, PTZ control, alarm/lock/sequence BLoCs, and legacy-matching UI styling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
126
Docs/legacy-architecture/index.md
Normal file
126
Docs/legacy-architecture/index.md
Normal file
@@ -0,0 +1,126 @@
|
||||
---
|
||||
title: "COPILOT D6 Legacy WPF Application"
|
||||
description: "Complete reverse-engineered architecture documentation of the original COPILOT D6 CCTV keyboard controller system"
|
||||
---
|
||||
|
||||
# COPILOT D6 Legacy Architecture
|
||||
|
||||
> Reverse-engineered from compiled .NET 7 assemblies (build 1.0.705, December 2023) using ILSpy decompilation. This documentation covers the complete architecture of the original WPF-based CCTV keyboard controller system.
|
||||
|
||||
## System Overview
|
||||
|
||||
The COPILOT D6 system is a **CCTV surveillance keyboard controller** used to manage video feeds from multiple camera servers (Geutebruck GeViScope, G-Core, GeViSoft) across a wall of physical monitors. Operators use a custom hardware keyboard with joystick to:
|
||||
|
||||
- Switch cameras to monitors (CrossSwitch)
|
||||
- Control PTZ cameras (Pan/Tilt/Zoom) via joystick
|
||||
- Manage camera prepositions (saved positions)
|
||||
- Run camera sequences (automated cycling)
|
||||
- View and manage alarms
|
||||
- Playback recorded video
|
||||
|
||||
## Architecture at a Glance
|
||||
|
||||
```
|
||||
COPILOT SYSTEM ARCHITECTURE
|
||||
============================
|
||||
|
||||
┌──────────────────────────────────────────────────────────┐
|
||||
│ COPILOT KEYBOARD (Hardware) │
|
||||
│ ┌─────────────┐ ┌──────────────┐ ┌────────────────┐ │
|
||||
│ │ Numpad + │ │ 3-Axis │ │ Jog/Shuttle │ │
|
||||
│ │ Function │ │ Joystick │ │ Wheel │ │
|
||||
│ │ Keys │ │ (HID USB) │ │ │ │
|
||||
│ │ [Serial] │ │ X/Y/Z Axes │ │ [Serial] │ │
|
||||
│ └──────┬───────┘ └──────┬───────┘ └───────┬────────┘ │
|
||||
│ │ │ │ │
|
||||
│ └─────────────────┼───────────────────┘ │
|
||||
│ Arduino Leonardo │
|
||||
│ (USB Composite Device) │
|
||||
└────────────────────────────┬──────────────────────────────┘
|
||||
│ USB (Serial + HID)
|
||||
┌────────────────────────────┼──────────────────────────────┐
|
||||
│ LattePanda Sigma SBC │
|
||||
│ ┌─────────────────────────┴──────────────────────────┐ │
|
||||
│ │ Copilot.App.exe (WPF .NET 7) │ │
|
||||
│ │ ┌──────────────────────────────────────────────┐ │ │
|
||||
│ │ │ Copilot.Device Layer │ │ │
|
||||
│ │ │ Serial Port ←→ Keyboard Keys/Jog/Shuttle │ │ │
|
||||
│ │ │ HID Device ←→ Joystick X/Y/Z │ │ │
|
||||
│ │ └──────────────────────┬───────────────────────┘ │ │
|
||||
│ │ │ Events │ │
|
||||
│ │ ┌──────────────────────┴───────────────────────┐ │ │
|
||||
│ │ │ MainWindow (WPF) │ │ │
|
||||
│ │ │ Routes input → current ViewModel │ │ │
|
||||
│ │ └──────────────────────┬───────────────────────┘ │ │
|
||||
│ │ │ │ │
|
||||
│ │ ┌──────────────────────┴───────────────────────┐ │ │
|
||||
│ │ │ SegmentViewModel (main screen) │ │ │
|
||||
│ │ │ • PTZ control via joystick │ │ │
|
||||
│ │ │ • Camera number entry │ │ │
|
||||
│ │ │ • CrossSwitch execution │ │ │
|
||||
│ │ │ • Camera lock management │ │ │
|
||||
│ │ │ • Playback control (jog/shuttle) │ │ │
|
||||
│ │ └──┬────────────────────────────────────┬──────┘ │ │
|
||||
│ │ │ Direct SDK calls │ SignalR │ │
|
||||
│ │ ┌──┴──────────────────────┐ ┌─────────┴──────┐ │ │
|
||||
│ │ │ Camera Server │ │ AppServer │ │ │
|
||||
│ │ │ Drivers │ │ Client │ │ │
|
||||
│ │ │ • GeViScope SDK │ │ (SignalR Hub) │ │ │
|
||||
│ │ │ • G-Core SDK │ │ │ │ │
|
||||
│ │ │ • GeViSoft SDK │ │ │ │ │
|
||||
│ │ └──┬──────────────────────┘ └────────┬───────┘ │ │
|
||||
│ └─────┼──────────────────────────────────┼───────────┘ │
|
||||
└────────┼──────────────────────────────────┼───────────────┘
|
||||
│ Native SDK (TCP) │ HTTPS/WSS
|
||||
▼ ▼
|
||||
┌─────────────────────┐ ┌────────────────────────┐
|
||||
│ Camera Servers │ │ Copilot AppServer │
|
||||
│ • GeViScope │ │ (ASP.NET Core) │
|
||||
│ 192.168.102.186 │ │ copilot.test.d6... │
|
||||
│ • G-Core │ │ ┌──────────────────┐ │
|
||||
│ 192.168.102.20 │ │ │ SignalR Hub │ │
|
||||
│ │ │ │ • Camera Locks │ │
|
||||
│ Each server has: │ │ │ • Sequences │ │
|
||||
│ • Cameras │ │ │ • Config Sync │ │
|
||||
│ • Monitors/Viewers │ │ │ • Viewer State │ │
|
||||
│ • PTZ controllers │ │ │ • Alarm History │ │
|
||||
│ • Alarm events │ │ └──────────────────┘ │
|
||||
│ │ │ ┌──────────────────┐ │
|
||||
│ │ │ │ SQLite Database │ │
|
||||
│ │ │ │ • Lock state │ │
|
||||
│ │ │ │ • Alarm history │ │
|
||||
│ │ │ └──────────────────┘ │
|
||||
│ │ │ ┌──────────────────┐ │
|
||||
│ │ │ │ REST API │ │
|
||||
│ │ │ │ • Auto-updates │ │
|
||||
│ │ │ │ • Configuration │ │
|
||||
│ │ │ │ • Blazor Admin UI │ │
|
||||
│ │ │ └──────────────────┘ │
|
||||
└─────────────────────┘ └────────────────────────┘
|
||||
```
|
||||
|
||||
## Assembly Map
|
||||
|
||||
| Assembly | Type | Purpose |
|
||||
|----------|------|---------|
|
||||
| `Copilot.App.dll` | WPF Client | Main application - UI, ViewModels, navigation, input handling |
|
||||
| `Copilot.Device.dll` | Client Library | Hardware abstraction - serial port, HID joystick, key mapping |
|
||||
| `Copilot.Common.dll` | Shared Library | Configuration models, data protection, providers, hub interfaces |
|
||||
| `Copilot.Common.Services.dll` | Shared Library | Driver providers, media channel service, viewer state management |
|
||||
| `Copilot.Drivers.Common.dll` | Shared Library | Driver interfaces (`IMovementController`, `ICameraServerDriver`, etc.) |
|
||||
| `Copilot.Drivers.GeViScope.dll` | Driver | GeViScope SDK wrapper - PLC actions for cameras/PTZ |
|
||||
| `Copilot.Drivers.GCore.dll` | Driver | G-Core SDK wrapper - binary protocol for cameras/PTZ |
|
||||
| `Copilot.Drivers.GeviSoft.dll` | Driver | GeViSoft SDK wrapper |
|
||||
| `Copilot.AppServer.Client.dll` | Client Library | SignalR hub client, availability monitoring |
|
||||
| `Copilot.AppServer.dll` | Server | ASP.NET Core server - API, SignalR hub, Blazor admin |
|
||||
| `Copilot.AppServer.Database.dll` | Server Library | Entity Framework - SQLite models and repositories |
|
||||
| `Copilot.Camea.Client.dll` | Server Library | Camea API integration (external alarm system) |
|
||||
|
||||
## Documentation Pages
|
||||
|
||||
- **[System Architecture](./architecture.md)** - Component diagrams, dependency graph, deployment model
|
||||
- **[Hardware & Input](./hardware-input.md)** - Joystick, keyboard, serial/HID protocols
|
||||
- **[PTZ Control Flow](./ptz-control.md)** - Joystick → Pan/Tilt/Zoom → SDK command pipeline
|
||||
- **[Data Flows](./data-flows.md)** - CrossSwitch, Alarms, Sequences, Playback, Camera Lock
|
||||
- **[Configuration](./configuration.md)** - JSON config files, monitor wall topology, function buttons
|
||||
- **[AppServer](./appserver.md)** - SignalR hub, REST API, database, admin UI
|
||||
Reference in New Issue
Block a user