Files
geutebruck/GeViScope_SDK_Analysis.md
Administrator a92b909539 feat: GeViScope SDK integration with C# Bridge and Flutter app
- Add GeViScope Bridge (C# .NET 8.0) on port 7720
  - Full SDK wrapper for camera control, PTZ, actions/events
  - 17 REST API endpoints for GeViScope server interaction
  - Support for MCS (Media Channel Simulator) with 16 test channels
  - Real-time action/event streaming via PLC callbacks

- Add GeViServer Bridge (C# .NET 8.0) on port 7710
  - Integration with GeViSoft orchestration layer
  - Input/output control and event management

- Update Python API with new routers
  - /api/geviscope/* - Proxy to GeViScope Bridge
  - /api/geviserver/* - Proxy to GeViServer Bridge
  - /api/excel/* - Excel import functionality

- Add Flutter app GeViScope integration
  - GeViScopeRemoteDataSource with 17 API methods
  - GeViScopeBloc for state management
  - GeViScopeScreen with PTZ controls
  - App drawer navigation to GeViScope

- Add SDK documentation (extracted from PDFs)
  - GeViScope SDK docs (7 parts + action reference)
  - GeViSoft SDK docs (12 chunks)

- Add .mcp.json for Claude Code MCP server config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 08:14:17 +01:00

3.9 KiB

GeViScope SDK Analysis

Overview

GeViScope is Geutebruck's DVR (Digital Video Recorder) system that handles:

  • Video recording and playback
  • Camera management (PTZ control)
  • Event handling
  • Action-based communication

SDK Components

Native Win32 DLLs (32-bit)

DLL Purpose
GscDBI.dll Database interface - connection, registry, data access
GscActions.dll PLC (Process Logic Control) - action/event handling
GscMediaPlayer.dll Video display and playback
GscHelper.dll Helper functions

.NET Wrapper DLLs (.NET 4.0)

DLL Purpose
GscExceptionsNET_4_0.dll Exception handling
GscDBINET_4_0.dll Database interface wrapper
GscActionsNET_4_0.dll Actions/PLC wrapper
GscMediaPlayerNET_4_0.dll Media player wrapper

Key Namespaces

using GEUTEBRUECK.GeViScope.Wrapper.DBI;
using GEUTEBRUECK.GeViScope.Wrapper.Actions;
using GEUTEBRUECK.GeViScope.Wrapper.Actions.SystemActions;
using GEUTEBRUECK.GeViScope.Wrapper.Actions.DigitalContactsActions;
using GEUTEBRUECK.GeViScope.Wrapper.Actions.ActionDispatcher;
using GEUTEBRUECK.GeViScope.Wrapper.MediaPlayer;

Connection Flow

  1. Create GscServer instance
  2. Encode password: DBIHelperFunctions.EncodePassword(password)
  3. Set connection parameters: GscServerConnectParams
  4. Connect: GscServer.Connect()
  5. Create PLC: GscServer.CreatePLC()
  6. Subscribe to actions/events
  7. Register action dispatcher callbacks

Key Classes

GscServer

  • Main connection class
  • Methods: Connect(), Disconnect(), CreatePLC(), CreateRegistry()

GscPLCWrapper

  • Process Logic Control for actions/events
  • Methods: OpenPushCallback(), SendAction(), StartEvent(), StopEvent()
  • Methods: SubscribeActionsAll(), SubscribeEventsAll()

GscActionDispatcher

  • Dispatches received actions to handlers
  • Events: OnCustomAction, OnDigitalInput, OnCrossSwitch, etc.

GscViewer

  • Video viewer for live/recorded media
  • Methods: ConnectDB(), SetPlayMode(), Refresh()

Action Categories

  1. ATM/ACS - Banking/Access control
  2. Audio Control - ABC (Audio Back Channel)
  3. Backup Actions - Auto/event backups
  4. Camera Control - PTZ, focus, iris, presets
  5. Digital Contacts - Digital I/O
  6. Switch Control - CrossSwitch (video routing)
  7. Viewer Actions - Remote control GSCView
  8. System Actions - Login, shutdown, events

Sample Actions

// Custom Action
GscAction action = new GscAct_CustomAction(1, "Hello world!");
plc.SendAction(action);

// CrossSwitch
GscAction crossSwitch = GscAction.Decode("CrossSwitch(1, 2, 0)");
plc.SendAction(crossSwitch);

// PTZ Control
GscAction ptzAction = GscAction.Decode("CameraPanLeft(1, 50)");
plc.SendAction(ptzAction);

TACI - Telnet Action Command Interface

Alternative method for sending/receiving actions via Telnet (ASCII format):

  • Default port: 12007
  • Requires GscTelnetActionCommandInterface.dll plugin
  • Format: Action text commands like CustomAction(1,"HelloWorld")

Default Credentials

  • Username: sysadmin
  • Password: masterkey

Demo Mode

  • Full functionality for 2 hours
  • After timeout, restart GeViScope server for another 2 hours

Integration Approach

Similar to GeViServer, create a C# Bridge service that:

  1. References the .NET wrapper DLLs
  2. Exposes REST API endpoints
  3. Handles connection lifecycle
  4. Forwards actions/events

Proposed Endpoints

POST /geviscope/connect
POST /geviscope/disconnect
GET  /geviscope/status
GET  /geviscope/channels
POST /geviscope/action
POST /geviscope/event/start
POST /geviscope/event/stop
POST /geviscope/camera/ptz

File Locations

  • SDK: C:\Program Files (x86)\GeViScopeSDK\
  • BIN: C:\Program Files (x86)\GeViScopeSDK\BIN\
  • Examples: C:\Program Files (x86)\GeViScopeSDK\Examples\
  • Documentation: C:\Program Files (x86)\GeViScopeSDK\Documentation\