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>
This commit is contained in:
Administrator
2025-12-31 18:10:54 +01:00
commit 14893e62a5
4189 changed files with 1395076 additions and 0 deletions

View File

@@ -0,0 +1,407 @@
================================================================================
GeViScope_SDK.pdf - Pages 31 to 40
================================================================================
────────────────────────────────────────────────────────────────────────────────
Page 31
────────────────────────────────────────────────────────────────────────────────
ThesewrapperassembliesaredevelopedinC++/CLIandpublishedwiththeSDK.The
assembliescanbefoundintheGeViScopeSDKbinaryfolder“GeViScopeSDK\BIN”.
TheSDKprovideswrapperassembliesforthe.NET-Frameworksversions2.0and4.0
whicharenamedasfollows:
.NET-Framework2.0
•GscExceptionsNET_2_0.dll
•GscActionsNET_2_0.dll
•GscMediaPlayerNET_2_0.dll
•GscDBINET_2_0.dll
.NET-Framework4.0
•GscExceptionsNET_4_0.dll
•GscActionsNET_4_0.dll
•GscMediaPlayerNET_4_0.dll
•GscDBINET_4_0.dll
ThesewrapperassembliescanbeusedtogetherwithournativeSDKDLLs(GscAc-
tions.DLL,GscDBI.DLL,GscHelper.DLL,GscMediaPlayer.DLL,MscDBI.DLL)tocreate
customapplicationsunderany.NETlanguageonawindowsplatform.Theassemblies
needtobereferencedbythe.NETprojectandallthefiles(assembliesandnativeDLLs)
havetoresideintheapplicationfolder.
────────────────────────────────────────────────────────────────────────────────
Page 32
────────────────────────────────────────────────────────────────────────────────
Deployingacustomsolutionbasedonthe.NETwrapper
Tosuccessfullydeployacustomapplicationthatusesthe.NETwrappercontainedinthe
SDK,thefollowingprerequisiteshavetobefulfilled:
a)MicrosoftVisualC++RedistributablePackagehastobe
installed
ThewrapperassembliesaredevelopedinC++/CLI.Soforexecutingthemonanonedevel-
opmentmachine,theMicrosoftVisualC++RedistributablePackageisneeded.Thispack-
ageexistsinadebugorinareleaseversion.Onproductivemachinesthereleaseversion
needstobeinstalled.
Forapplicationsusingthe.NET-Framework2.0theVisualC++2008RedistributablePack-
ageisneeded.Incasethattheapplicationisdevelopedusingthe.NET-Framework4.0you
needtoinstalltheVisualC++2010RedistributablePackage.
b).NETFrameworkVersion2.0SP1ornewerhastobe
installed
Ifupdatingthe.NETFrameworkonaGEUTEBRÜCKdevice(GeViScopeorre_porter)
fails,aspecialMicrosofttoolWindowsInstallerCleanUpUtility(MSICUU2.exe)can
improvethesituation.Afterexecutingthistool,updatingtheFrameworkshouldbepossible.
c)WrapperassembliesANDnativeSDKDLLsareneeded
BesidethecustomapplicationalsothewrapperassembliesandthenativeSDKDLLs(lis-
tedabove)areneededinthesamefolderasinwhichthecustomapplicationresides.
Iftheapplicationusesthe.NET-Framework4.0youneedtoreferencetheGeViScopewrap-
perDLLswiththeextension_4_0otherwisepleaseusethewrapperassemblieswiththe
extension_2_0(seeabove).
GeViScopeREGISTRY
UsingtheGscRegistrywith.NET
Introduction
ByusingtheGeViScoperegistry(GSCREGISTRY)itispossibletomodifyGeViScope/Re_
portersettingsprogrammatically.TheGscRegistryisaproprietaryregistryformat
developedbyGEUTEBRÜCK.ThisregistryformatissimilartotheMicrosoftWindows
registry.
────────────────────────────────────────────────────────────────────────────────
Page 33
────────────────────────────────────────────────────────────────────────────────
AllneededGeViScopeserversettingsarestoredintheGscRegistrydatabase.Thecreation
ofownregistrydatabasesbasedonfilesisalsopossible.
TheGEUTEBRÜCKGEVISCOPESDKprovidesseveralclassesandmethodstoallowa
comfortableaccesstotheGscRegistry.
Requirements
Thefollowingrequirementsareneededtocreatea.NETapplicationthatusestheGscRe-
gistryfunctionality:
•.NET-Framework2.0SP1ornewer
-.NET-Framework2.0SP1Wrapper-Assemblies:
GscExceptionsNET_2_0.dll
GscDBINET_2_0.dll
-.NET-Framework4.0Wrapper-Assemblies:
GscExceptionsNET_4_0.dll
GscDBINET_4_0.dll
•NativeWin32-DLLs,usedbythe.NET-Wrapper:
-GscActions.dll
-GscDBI.dll
-GscMediaPlayer.dll
-GscHelper.dll
-MscDBI.dll
•MicrosoftVisualC++RedistributablePackage
Usingtheregistry
Inthefollowing,theusageoftheGscRegistrywith.NETisexplainedindetail.Itdiscusses
thefollowingsteps:
l Opentheregistry
l Readvaluesoutofnodes
l Createanode
l Addvaluestoanode
l Savetheregistry
AllnecessaryclassesandmethodsforusingtheGscRegistryareavailableintheGscDBI
namespace.Toincludethisnamespacethefollowingusing-statementisneeded:
usingGEUTEBRUECK.GeViScope.Wrapper.DBI;
Opentheregistry
ToreadormodifyGeViScope/Re_portersettingsitisnecessarytoestablishaconnection
tothepreferredGeViScope/Re_porterserverbefore.Afterthisisdoneyouneedtocreatea
newobjectoftheclassGscRegistryandinitializeitbyusingtheCreateRegistry()method
whichiscontainedintheGscServerobject.
C#-Code:Opentheregistry
if(_GscServer!=null)
{
//createanobjectinstanceoftheserverregistry
GscRegistryGscRegistry=_GscServer.CreateRegistry();
if(GscRegistry!=null)
{
//defineanarrayforthesetupreadrequest(registrynodepaths
toread)
────────────────────────────────────────────────────────────────────────────────
Page 34
────────────────────────────────────────────────────────────────────────────────
GscRegistryReadRequest[]ReadRequests=newGscRegistryReadRequest
[1];
ReadRequests[0]=newGscRegistryReadRequest("/",0);
//readthenodes(setupdata)outoftheserverregistry
GscRegistry.ReadNodes(ReadRequests);
}
}
ThemethodReadNodes()oftheGscRegistryobjectexpectsanarrayofthetypeGscRe-
gistryReadRequestwhichcontainsallnodepathstobereadoutoftheregistry.Inthe
sourcecodesnippetabove,thearraysimplycontainsoneelementwhichrepresentsthe
rootnode(“/”).Byreadingtherootnodetheentireregistrywillbereadout.
Readvaluesofnodes
Thefollowingsourcecodesnippetshowshowtoreadvaluesoutofnodes:
C#-Code:Readvaluesoutofnodes
if(GscRegistry!=null)
{
GscRegNodeRegNode=GscRegistry.FindNode("/System/MediaChannels/");
for(inti=0;i<RegNode.SubNodeCount;++i)
{
//findtheGeViScoperegistrynodeoftheparentnodebymeansof
theindex
GscRegNodeSubRegNode=RegNode.SubNodeByIndex(i);
GscRegVariantRegVariant=newGscRegVariant();
//Getthevalue"Name"outofthesubregistrytypeandstorethe
valueand
//valuetypeintheGscRegVariantclass
SubRegNode.GetValueInfoByName("Name",refRegVariant);
if(RegVariant!=null&&RegVariant.ValueType==
GscNodeType.ntWideString)
Console.WriteLine(RegVariant.Value.WideStringValue);
}
}
ToreadaspecificnodeoutoftheregistrytheGscRegistryclassprovidesthemethod
FindNode().
Forthatthepathtothepreferrednodehastobecommittedtothemethodandityouwillget
backanobjectofthetypeofGscRegNode.Thisobjectcontainsallsubnodesandvaluesof
thefoundnode.
ToaccessasubnodeoftheparentnodethemethodSubNodeByIndex()providedbythe
classGscRegNodecanbeusedorusetheSubNodeByName()methodifthenameofthe
subnodeisalreadyknown.
ThemethodGetValueInfoByName()canbeusedtoaccessaspecificvalueofanode.This
methodexpectsthenameofthespecificvalueaswellasareferencetoanobjectoftypeof
GscRegVariant.TheGscRegVariantobjectwillbefilledwiththetypeofthevalue
(ValueType)aswellasthevalueitself(Value).
Createanode
────────────────────────────────────────────────────────────────────────────────
Page 35
────────────────────────────────────────────────────────────────────────────────
TocreateanewnodeinaparentnodethemethodCreateSubNode()whichisprovidedby
theclassGscRegNodeneedstobecalled.Themethodexpectsthenameofthenewnode.
C#-Code:Createanode
if(_GscRegistry!=null)
{
GscRegNodeRegNode=_GscRegistry.FindNode("/System/MediaChannels/0000");
//createanewsubnodeinNodePath
if(RegNode!=null)
RegNode.CreateSubNode("NewNode");
}
Addvaluestoanode
ThereareseveralmethodsintheclassGscRegNodetoaddvaluestoanode.Dependingon
thetypeofthevalueitisneededtocalltherightmethodforwritingthistypeintotheregistry.
ForexampleifyouwouldliketowriteanInt32valueintotheregistryyouneedtousethe
methodWriteInt32().
C#-Code:Addvaluestonode
publicvoidAddValue(stringNodePath,stringValueName,GscNodeTypeValueType,
objectValue)
{
GscRegNodeRegNode=_GscRegistry.FindNode(NodePath);
if(RegNode!=null)
{
switch(ValueType)
{
caseGscNodeType.ntWideString:
{
RegNode.WriteWideString(ValueName,Value.ToString());
break;
}
caseGscNodeType.ntInt32:
{
RegNode.WriteInt32(ValueName,Convert.ToInt32(Value));
break;
}
}
}
}
Savetheregistry
AftertheGscRegistryobjectwasmodified(e.g.newnodes/newvalues),theserveralso
needstoknowaboutthechangesmade.ForthistheGscRegistryclassprovidesthe
methodWriteNodes().
C#-Code:Addvaluestonode
//defineanarrayforthesetupwriterequest
────────────────────────────────────────────────────────────────────────────────
Page 36
────────────────────────────────────────────────────────────────────────────────
GscRegistryWriteRequest[]WriteRequests=newGscRegistryWriteRequest[1];
WriteRequests[0]=newGscRegistryWriteRequest("/",0);
GscRegistry.WriteNodes(WriteRequests,true);
TheWriteNodes()methodexpectsanarraycontainingobjectsofthetypeofGscRe-
gistryWriteRequest.EachGscRegistryWriteRequestcontainsapathtoanodethathasto
besaved.
 NOTICE
Itisrecommendedtoonlyaddoneelementtothisarraywhichcontainstherootpath(“/”).
Thisresultsinsavingtheentireregistrystructure.
StructureofGSCRegistry
TheGEVISCOPESDKofferstwopossibilitiestobrowsethestructureoftheGscRegistry.
BymeansoftheapplicationGscRegEditthatisdeliveredwiththeSDK,itispossibleto
browseormodifytheregistrysimilartoMicrosoftsWindowsregistry.
InadditiontoGscRegEdityoucanalsousetheregistryeditorwhichisintegratedin
GSCSetup.ToactivatethisfeaturethekeycombinationSTRG+ALT+Uneedstobeactu-
ated.TheentryRegistryeditorinthesectionUtilitiesinthenavigationbarontheleftwill
nowbeshown.
Examples
TogetabetterideaofhowtousetheGscRegistry,theGEVISCOPESDKprovidesfurther
.NETexampleapplications.
Theexamplescanbefoundinthefolder„Examples“ folderintheGeViScopeSDKmain
folder:
l C:\ProgramFiles(x86)\GeViScopeSDK\Examples\VS2008NET\VS2008NET_
GscRegEdit
Simpleregistryeditor,GUIapplication(VisualStudio2008)
l C:\ProgramFiles(x86)\GeViScopeSDK\Examples\VS2008NET\VS2010NET_
GscRegEdit
Simpleregistryeditor,GUIapplication(VisualStudio2010)
l C:\ProgramFiles(x86)\GeViScopeSDK\Examples\VS2008NET\VS2008NET_
GscRegistryBasics
Consoleapplication(VisualStudio2008)
l C:\ProgramFiles(x86)\GeViScopeSDK\Examples\VS2010NET\VS2010NET_
GscRegistryBasics
Consoleapplication(VisualStudio2010)
GSCViewdatafilterplugins
Introduction
GSCViewoffersthepossibilitytointegratecustomizeddatafilterdialogs.Datafilterdialogs
areusedtosearchandfiltervideofootagebyadditionaleventdata.Theycanbecustomized
tothedifferentbusinessenvironmentsinwhichGeViScopeisused.
────────────────────────────────────────────────────────────────────────────────
Page 37
────────────────────────────────────────────────────────────────────────────────
Thefollowingsectionssupportyouwithsomesuggestionsandhintsaboutcreatingcus-
tomizeddatafilterplugins.
Generalhints
Customdatafiltersarehostedinflatwindows32Bitdynamiclinklibraries.Differingfromnor-
malDLLsthedatafilterDLLshavetheextension“.GPI”.AlldatafilterDLLsexistinginthe
samefolderasGSCViewareintegratedinGSCViewautomatically.
ThecustomizeddatafilterDLLinterface
EachDLLhastoexportthefunctionGSCPluginRegisterSearchFilter()thatiscalledby
GSCViewtousethecustomizeddialogs.Theexactdefinitionofthisfunctionandsome
additionaltypedefinitionscanbefoundintheunit“GSCGPIFilter.pas/.h”.
InsidethefunctionGSCPluginRegisterSearchFilter()oneorevenmoredatafilterdialogs
havetoberegisteredbycallingthefunctionCallbacks.RegisterFilter().
Thefollowingexample(inpseudocode)showshowthisisdone:
if(Callbacks.RegisterFilter==NULL)
────────────────────────────────────────────────────────────────────────────────
Page 38
────────────────────────────────────────────────────────────────────────────────
returnFALSE;
TPluginFilterDefinitiondef;
def=SimpleFilter.GetFilterDefinition();
Callbacks.RegisterFilter(Callbacks.HostHandle,def);
ThestructureTPluginFilterDefinitiondefinessomeinformationaldataandallthecallback
functionsneededforasingledialog.GSCViewusesthedefinitiontocallthedifferentcall-
backfunctionsduringitsexecution.
Nameofcallback
function Function
InitFilter() Canbeusedtoinitializethedatafilterdialog.Tointegratethedialogin
GSCView,thefunctionhastoreturntrue.
ShowFilter() Insidethisfunctionthedialogshouldbedisplayedasastand-alone
(modal)dialog.GSCViewcallsthefunctionaftertheuseractivatesthe
 button.
DeinitFilter() Canbeusedtodeinitializethedatafilterdialog.Thefunctionhastoreturn
true,evenifitisnotused.
GetFilterGuid() Thefunctionshouldprovideaglobaluniqueidentifier(GUID)thatisused
insideGSCViewtoidentifythedialog.TheGUIDcanbedefinedasastatic
constantvalue.
Asanalternativetothemodaldisplayofthedatafilterdialog,thedialogcanbedisplayed
nestedintheGSCViewmainwindoworGSCVieweventlist.Butatthemomentthisfeature
isonlysupportedbycustomfilterdialogscreatedwithBorlandDelphi©.
Toachievethenesteddisplay,theadditionalcallbackfunctionsofthestructureTPlu-
ginFilterDefinitionhavetobeimplemented.TheBorlandDelphi©example
“GSCViewDataFilter”demonstratesthedetails.
Creatingthefiltercriteria
Ifthecustomdatafilterisapplied,GSCViewdoesaqueryagainstthetables“events”and
“eventdata”oftheinternalGeViScopedatabase.Forthisqueryafiltercriteriaisneeded.The
────────────────────────────────────────────────────────────────────────────────
Page 39
────────────────────────────────────────────────────────────────────────────────
customdatafilterdeliversthecriteriaandgivesitbacktoGSCViewintheShowFilter()call-
backfunction.
TobuildupmeaningfulfiltercriteriasomebackgroundknowledgeoftheGeViScopedata-
baseisneeded.
Thetable“events”containsalltheeventsrecordedinthedatabase(onlyeventinformation,
notthesamples;thesamplesarelinkedtotheevents).
Thetable“eventdata”containsadditionaldatabelongingtotheevents.Insidethetablethe
differentparametersofactionsaresaved.IfforexampleaneventisstartedbytheCus-
tomAction(4711,“Helloworld”),thevalue4711issavedintherow“Int64_A”andthevalue
“Helloworld”issavedintherow“String_A”.BecausetheeventisstartedbyaCus-
tomAction,thevalue8issavedintherow“EventDataKind”.Eachactionhasanindividual
mappingofactionparameterstorowsinthetable“eventdata”.
FordifferentbusinessenvironmentsspecialactionscanbecreatedbyGEUTEBRÜCK.
Therealreadyexistsomespecialactionslike:
Actionname Businessenvironment
ATMTransaction() Automatedtellermachines
ACSAccessGranted() Accesscontrolsystems
SafebagOpen() Cashmanagementsystems
POSData() Pointofsalesystems
Theactioninternallydefinesthemappingofactionparameterstorowsinthetable“event-
data”.Thecodeofanaction(foraCustomActionthecodeis8)isstoredintherow
“EventDataKind”.Thecodesofactionsarelistedintheactionreferencedocumentation
“GSCActionsReference_EN.pdf”.
Toevaluatethemappingofactionparameterstodatabaserows,GSCSetupcanbeused.
BypressingSTRG+ALT+UinGSCSetupthespecialutility“DBItest”getsavailable.
With“DBItest”thestructureandcontentoftheGeViScopedatabasecanbeanalyzed.The
followingSQLqueriescanbehelpful:
SQLquery Function
select*fromevents Fetchesrecordsfromthetable“events”
select*fromeventdata Fetchesrecordsfromthetable“eventdata”
select*fromsamples Fetchesrecordsfromthetable“samples”
Thefollowingtableshoulddemonstratehowtobuildupfiltercriteriadependingonpara-
metersgiveninthecustomdatafilterdialog(heretheCustomAction()isusedtostartthe
events):
────────────────────────────────────────────────────────────────────────────────
Page 40
────────────────────────────────────────────────────────────────────────────────
Action
para-
meter
INT
Action
para-
meter
STRING
Fil-
terCriteria.SQLstatementSQLquery
Nothing Nothing EventData.EventDataKind=8select*fromEventDataleftjoinEventson
EventData.EventID=Events.EventIDwith
EventData.EventDataKind=8
Nothing Hello
world
EventData.EventString_A=
"Helloworld"and
EventData.EventDataKind=8
select*fromEventDataleftjoinEventson
EventData.EventID=Events.EventIDwith
EventData.EventString_A="Helloworld"
andEventData.EventDataKind=8
4711 Nothing EventData.EventInt64_A=
4711and
EventData.EventDataKind=8
select*fromEventDataleftjoinEventson
EventData.EventID=Events.EventIDwith
EventData.EventInt64_A=4711and
EventData.EventDataKind=8
4711 Hello
world
EventData.EventInt64_A=
4711and
EventData.EventString_A=
"Helloworld"and
EventData.EventDataKind=8
select*fromEventDataleftjoinEventson
EventData.EventID=Events.EventIDwith
EventData.EventInt64_A=4711and
EventData.EventString_A="Helloworld"
andEventData.EventDataKind=8
Nothing Hello* EventData.EventString_A=
"Hello*"and
EventData.EventDataKind=8
select*fromEventDataleftjoinEventson
EventData.EventID=Events.EventIDwith
EventData.EventDataKind=8where
EventData.EventString_ALIKE"Hello*"
DuringtestingthecustomdatafilterdialogintheGSCVieweventlistadoubleclickonthe
statusbaroftheeventlistdeliverstheSQLquerythatisexecutedintheGeViScopeserver.
Examplesoverview
Theexamplesoverviewisorganizedintwodifferentviewsonallexamplesincludingthe
GeViScopeSDK:
Examplesgroupedbyprogrammingtasks
Examplesgroupedbydevelopmentplatforms