Files
geutebruck/ACTION_PARAMETERS_ANALYSIS.md
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

241 lines
5.4 KiB
Markdown

# GeViServer Action Parameters Analysis
## Summary
Analyzed 67 action mappings from GeViServer revealing **29 unique action types** with **115 total action instances**.
## Action Categories & Parameters
### 1. PTZ Camera Control
Actions for controlling pan/tilt/zoom cameras.
**Common Parameters:**
- `Caption`: string - Descriptive label
- `PTZ head`: string - Camera ID (e.g., "101027")
- `GCoreServer`: string - Server routing (e.g., "gscope-cdu-3", "G-Core")
- `Speed`: string - Movement speed (e.g., "128", "255")
**Actions:**
- `PanLeft`, `PanRight`, `PanStop`
- `TiltUp`, `TiltDown`, `TiltStop`
- `ZoomIn`, `ZoomOut`, `ZoomStop`
- `FocusFar`, `FocusNear`, `FocusStop`
- `IrisOpen`, `IrisClose`, `IrisStop`
**Example:**
```json
{
"action": "FocusFar",
"parameters": {
"Caption": "Gsc FocusFar 128",
"Speed": "128",
"PTZ head": "101027",
"GCoreServer": "gscope-cdu-3"
}
}
```
### 2. Preset Positions
Actions for saving and recalling camera positions.
**Parameters:**
- `Caption`: string
- `PTZ head`: string (optional)
- `GCoreServer`: string (optional)
**Actions:**
- `PrePosSave`, `PrePosCallUp`, `PrePosClear` - Preset positions
- `DefaultPosSave`, `DefaultPosCallUp`, `DefaultPosClear` - Default positions
**Example:**
```json
{
"action": "DefaultPosSave",
"parameters": {
"Caption": "GNG SaveDafaultPostion_101027",
"PTZ head": "101027",
"GCoreServer": "gscope-cdu-3"
}
}
```
### 3. System Messages
Actions for system errors, warnings, and info messages.
**Parameters:**
- `Caption`: string - Display message
- `Source`: string - Message source code (e.g., "5", "7")
- `Message`: string - Message code (e.g., "0", "20", "23")
- `Description`: string - Full message text
**Actions:**
- `SystemError` - Error messages
- `SystemWarning` - Warning messages
- `SystemInfo` - Information messages
**Example:**
```json
{
"action": "SystemError",
"parameters": {
"Caption": "GSC error: \"GeViIO Client: start of interface failed\"",
"Source": "5",
"Message": "0",
"Description": "GeViIO Client: start of interface failed"
}
}
```
### 4. Digital Outputs
Actions for controlling digital output contacts.
**Parameters:**
- `Caption`: string
- `Contact`: string - Contact number ("1", "2", "3", etc.)
- `State`: string - "1" (close) or "0" (open)
**Actions:**
- `SetDigitalOutput`
**Example:**
```json
{
"action": "SetDigitalOutput",
"parameters": {
"Caption": "Set digital output (1,close)",
"Contact": "1",
"State": "1"
}
}
```
### 5. Video Viewer
Actions for controlling video display.
**Parameters:**
- `Caption`: string
**Actions:**
- `ViewerConnectLive` - Connect to live video
- `ViewerClear` - Clear viewer
**Example:**
```json
{
"action": "ViewerConnectLive",
"parameters": {
"Caption": "VC live"
}
}
```
### 6. Cross-Switching
Actions for video matrix switching.
**Parameters:**
- `Caption`: string
- `SwitchMode`: string (e.g., "3")
- `VideoInput`: string (e.g., "0")
- `VideoOutput`: string (e.g., "0")
**Actions:**
- `CrossSwitch OpCon -> Matrix`
**Example:**
```json
{
"action": "CrossSwitch OpCon -> Matrix",
"parameters": {
"Caption": "CrossSwitch OpCon -> Matrix",
"SwitchMode": "3",
"VideoInput": "0",
"VideoOutput": "0"
}
}
```
### 7. Custom Actions
General-purpose custom actions.
**Parameters:**
- `Caption`: string
- `Int`: string - Integer parameter
- `String`: string - String parameter
**Actions:**
- `CustomAction`
**Example:**
```json
{
"action": "CustomAction",
"parameters": {
"Caption": "GscCustomAction:GscDiagnostics still running.",
"Int": "0",
"String": "GscDiagnostics still running."
}
}
```
## Complete Action Type List
1. CrossSwitch OpCon -> Matrix
2. CustomAction
3. DefaultPosCallUp
4. DefaultPosClear
5. DefaultPosSave
6. FocusFar
7. FocusNear
8. FocusStop
9. IrisClose
10. IrisOpen
11. IrisStop
12. PanLeft
13. PanRight
14. PanStop
15. PrePosCallUp
16. PrePosClear
17. PrePosSave
18. SetDigitalOutput
19. SystemError
20. SystemInfo
21. SystemWarning
22. TiltDown
23. TiltStop
24. TiltUp
25. ViewerClear
26. ViewerConnectLive
27. ZoomIn
28. ZoomOut
29. ZoomStop
## Implementation Notes
### Parameter Types
All parameters are currently stored as strings in the API, but represent different semantic types:
- **Numeric IDs**: PTZ head, Contact, Source, Message
- **Numeric Values**: Speed, SwitchMode, VideoInput, VideoOutput, State
- **Text**: Caption, Description, String, GCoreServer
### Optional vs Required Parameters
- `Caption` appears in almost all actions (recommended but optional)
- PTZ-specific parameters (`PTZ head`, `GCoreServer`, `Speed`) only apply to PTZ actions
- Action-specific parameters are required for their respective action types
### UI Considerations
For editing these parameters, the UI should:
1. Display different fields based on selected action type
2. Provide input validation (numeric ranges, required fields)
3. Offer dropdowns for known values (server names, contact numbers, states)
4. Show helpful tooltips explaining each parameter
## Next Steps
To implement full parameter support in the Flutter app:
1.**Data Models** - Update models to store parameter objects
2. **Local Storage** - Update Hive models for offline storage
3. **UI Components** - Create dynamic parameter input forms
4. **Action Catalog** - Build a registry of action types with their parameter schemas
5. **Validation** - Implement parameter validation per action type
6. **Testing** - Verify parameter sync with GeViServer