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>
This commit is contained in:
276
GeViSoft_SDK_Docs/chunk_011_pages_101-110.txt
Normal file
276
GeViSoft_SDK_Docs/chunk_011_pages_101-110.txt
Normal file
@@ -0,0 +1,276 @@
|
||||
|
||||
================================================================================
|
||||
PAGE 101
|
||||
================================================================================
|
||||
|
||||
Example–Receiving andDispatching GeViScope ActionsinsideGeViSoft:
|
||||
PseudoCode:
|
||||
1.CreateaninstanceoftheGscActionDispatcher classthatwilldispatchtheGeV-
|
||||
iScopeactionstoyourhandlers
|
||||
2.CreateaneventhandlerthatreceivestheGeViSoftGscAction. Insidethisevent
|
||||
handler,callthedispatchmethodofyourGscActionDispatcher instanceforevery
|
||||
receivedGscAction.
|
||||
3.RegistertheGeViSoftGscAction eventhandlerwithyourGeViSoftdatabasecon-
|
||||
nectionobject.
|
||||
4.CreateaneventhandlermethodforanyGeViScope actionyouwanttoprocess
|
||||
5.RegisteryourGeViScope actionseventhandleratthedispatcher.
|
||||
C#:
|
||||
//Createaninstance oftheGscActionDispatcher class
|
||||
GscActionDispatcher myGscDispatcher =newGscActionDispatcher ();
|
||||
//GscAction eventhandler thatdispatches theGscAction
|
||||
voidmyDB_ReceivedGscAction (objectsender, GeViAct_ GscActionEventArgs e)
|
||||
{
|
||||
myGscDispatcher.Dispatch (e.m_GscAction);
|
||||
}
|
||||
//Addthehandler forGscAction (thisiscalledforanynewlyreceived GeV-
|
||||
iScopeaction)
|
||||
myDB.ReceivedGscAction +=new
|
||||
GeViAct_ GscActionEventHandler (myDB_ReceivedGscAction);
|
||||
//Don'tforgettoregister thecallbacks!
|
||||
myDB.RegisterCallback ();
|
||||
//Eventhandler methodfortheGeViScope Action
|
||||
|
||||
================================================================================
|
||||
PAGE 102
|
||||
================================================================================
|
||||
|
||||
voidmyGscDispatcher_ OnCustomAction (objectsender, GscAct_Cus-
|
||||
tomActionEventArgs e)
|
||||
{
|
||||
Console.WriteLine "Received GEVISCOPE CustomAction ("+e.aInt+","
|
||||
+e.aString +")");
|
||||
}
|
||||
//Register theGeViScope CustomAction eventhandler withthedispatcher
|
||||
myGscDispatcher.OnCustomAction +=new
|
||||
GscAct_CustomActionEventHandler (myGscDispatcher_ OnCustomAction);
|
||||
NOTICE
|
||||
Youcanfindacomplete example application thatsendsandreceives GeViScope actions inCS_
|
||||
SimpleGscActionClient.
|
||||
StateQueries inC#
|
||||
Thisparagraph describes howyoucansendandreceiveStateQueriesfromwithinC#.Foran
|
||||
introduction toStateQueriesingeneralseechapterSDK-Usage->StateQueries.
|
||||
Creating andSending StateQueries
|
||||
YoucancreateStateQuerieswiththeirrespective constructors andsendthemafterwards by
|
||||
callingtheSendQuery ()methodofyourdatabaseconnection instance.TheSendQuery ()
|
||||
methodreturnstheGeViSoftStateAnswerviaanoutparameter.
|
||||
//myAnswer isfilledbytheSendQuery ()method
|
||||
//withtheStateAnswer.
|
||||
GeViMessage myAnswer;
|
||||
//Thisisyourquery
|
||||
GeViMessage myQuery =newGeViSQ_GetFirstVideoInput (true,true);
|
||||
|
||||
================================================================================
|
||||
PAGE 103
|
||||
================================================================================
|
||||
|
||||
//Sendthequery
|
||||
myDB.SendQuery (myQuery, outmyAnswer);
|
||||
if(myAnswer isGeViSA_VideoInputInfo )
|
||||
{
|
||||
//Dosomething withmyanswerhere...
|
||||
}
|
||||
SettingtheStateQueryTimeout
|
||||
ThemethodSendQuery ()blocksuntilthedatabaseanswerisretrievedfromtheGeViServer.
|
||||
Iftheserverdoesnotanswer,thisleadstoadeadlock. Amaximum timeouttimerforthe
|
||||
SendQuery existstopreventwaitingendlesslyforadatabaseanswer.Bydefault,thetimeout
|
||||
issetto3000ms.YoucanchangethistimeoutgloballybycallingtheSetQueryTimeoutInMs
|
||||
()methodofyourdatabaseconnection instance.
|
||||
Example–SettingtheSendQuery timeouttoonesecond:
|
||||
myDB.SetQueryTimeoutInMs (1000);
|
||||
Enumeration ofallvideoinputs
|
||||
Pseudocode
|
||||
1.Createastatequerytogetthefirstvideoinput(classGeViSQ_GetFirstVideoInput)
|
||||
2.Sendthequerytotheserver
|
||||
3.Iftheanswerisavalidinputchannelthen
|
||||
4.REPEAT
|
||||
a)Gettheactualchannel’sinformation fromtheanswerandprocessitasneeded
|
||||
(e.g.printitout,storeittoalist)
|
||||
b)CreateastatequerytogetthenextvideoInput(classGeViSQ_
|
||||
|
||||
================================================================================
|
||||
PAGE 104
|
||||
================================================================================
|
||||
|
||||
GetNextVideoInput)
|
||||
c)Sendthequery
|
||||
5.UNTILthereisnomorevideoinputleft
|
||||
C#Example:
|
||||
private List<GeViSA_VideoInputInfo >getVideoInputsList ()
|
||||
{
|
||||
List<GeViSA_VideoInputInfo >myVideoInputs =
|
||||
newList<GeViSA_VideoInputInfo >(0);
|
||||
if(myDB!=null)
|
||||
{
|
||||
GeViMessage myAnswer;
|
||||
myDB.SendQuery (newGeViSQ_GetFirstVideoInput (true,true),
|
||||
outmyAnswer);
|
||||
while(myAnswer isGeViSA_VideoInputInfo )
|
||||
{
|
||||
inttempID=(myAnswer asGeViSA_VideoInputInfo ).sG-
|
||||
lobalID;
|
||||
myVideoInputs.Add (myAnswer asGeViSA_VideoInputInfo );
|
||||
myDB.SendQuery (
|
||||
newGeViSQ_GetNextVideoInput (true,true,tem-
|
||||
pID),
|
||||
outmyAnswer);
|
||||
}
|
||||
}
|
||||
returnmyVideoInputs;
|
||||
}
|
||||
NOTICE
|
||||
Youcanfindacomplete example application thatsendsStateQueries andreceives StateActions
|
||||
inCS_SimpleClient. Thisexample showsyouhowtoenumerate videoin-andoutputs aswellas
|
||||
digitalIO.
|
||||
|
||||
================================================================================
|
||||
PAGE 105
|
||||
================================================================================
|
||||
|
||||
Supported Development Platforms
|
||||
TheSDKisdesignedforandtestedtoworkwiththefollowingdevelopment environments:
|
||||
lMicrosoftVisualStudio2008,C++
|
||||
lMicrosoftVisualStudio2010,C++
|
||||
lMicrosoftVisualStudio2008,C#
|
||||
lMicrosoftVisualStudio2010,C#
|
||||
lEmbarcadero RADStudioXE,Delphi
|
||||
|
||||
================================================================================
|
||||
PAGE 106
|
||||
================================================================================
|
||||
|
||||
Examples
|
||||
TheSDKisshippedwithvariousexamples showingyouhowtoimplement commontasks.
|
||||
Theexamples aregroupedbyfunctionality andplatform.
|
||||
ByFunctionality
|
||||
Connecting/disconnecting toGeViServer
|
||||
lCPP_SimpleActionClient (VS2008/VS2010, C++)
|
||||
lCPP_SimpleClient (VS2008/VS2010, C++)
|
||||
lCPP_SimpleDatabaseClient (VS2008/VS2010, C++)
|
||||
lCPP_MonitoredConnectionClient (VS2008/VS2010, C++)
|
||||
lCPP_ConsoleClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleActionClient (VS2008/VS2010, C#)
|
||||
lCS_SimpleClient (VS2008/VS2010, C#)
|
||||
lCS_SimpleDatabaseClient (VS2008/VS2010, C#)
|
||||
lCS_SimpleGscActionClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleActionClient (RADStudioXE)
|
||||
lDelphi_SimpleClient (RADStudioXE)
|
||||
lDelphi_SimpleDatabaseClient (RADStudioXE)
|
||||
lDelphi_ConsoleClient (RADStudioXE)
|
||||
Monitoring aGeViSoft connection
|
||||
lCPP_MonitoredConnectionClient (VS2008/VS2010, C++)
|
||||
Automatically reconnecting aGeViSoft connection onloss
|
||||
lCPP_MonitoredConnectionClient (VS2008/VS2010, C++)
|
||||
Sending/receiving ofGeViSoft actions/messages
|
||||
lCPP_SimpleActionClient (VS2008/VS2010, C++)
|
||||
lCPP_MonitoredConnectionClient (VS2008/VS2010, C++)
|
||||
lCPP_SimpleClient (VS2008/VS2010, C++)
|
||||
|
||||
================================================================================
|
||||
PAGE 107
|
||||
================================================================================
|
||||
|
||||
lCPP_SimpleDatabaseClient (VS2008/VS2010, C++)
|
||||
lCPP_ConsoleClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleActionClient (VS2008/VS2010, C#)
|
||||
lCS_SimpleClient (VS2008/VS2010, C#)
|
||||
lCS_SimpleDatabaseClient (VS2008/VS2010, C#)
|
||||
lCS_ConsoleClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleActionClient (RADStudioXE)
|
||||
lDelphi_SimpleClient (RADStudioXE)
|
||||
lDelphi_SimpleDatabaseClient (RADStudioXE)
|
||||
lDelphi_ConsoleClient (RADStudioXE)
|
||||
Sending/receiving ofGeViScope actions/messages
|
||||
lCS_SimpleGscActionClient (VS2008/VS2010, C#)
|
||||
Receiving anddispatching ofservernotifications
|
||||
lCPP_SimpleActionClient (VS2008/VS2010, C++)
|
||||
lCPP_MonitoredConnectionClient (VS2008/VS2010, C++)
|
||||
lCPP_SimpleDatabaseClient (VS2008/VS2010, C++)
|
||||
lCPP_ConsoleClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleActionClient (VS2008/VS2010, C#)
|
||||
lCS_SimpleClient (VS2008/VS2010, C#)
|
||||
lCS_SimpleDatabaseClient (VS2008/VS2010, C#)
|
||||
lCS_SimpleGscActionClient (VS2008/VS2010, C#)
|
||||
lCS_ConsoleClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleActionClient (RADStudioXE)
|
||||
lDelphi_SimpleClient (RADStudioXE)
|
||||
Converting between ASCIIandbinaryrepresentation ofmessages
|
||||
lCPP_SimpleActionClient (VS2008/VS2010, C++)
|
||||
lCPP_SimpleDatabaseClient (VS2008/VS2010, C++)
|
||||
lCPP_ConsoleClient (VS2008/VS2010, C++)
|
||||
lDelphi_SimpleActionClient (RADStudioXE)
|
||||
lDelphi_SimpleDatabaseClient (RADStudioXE)
|
||||
lDelphi_ConsoleClient (RADStudioXE)
|
||||
|
||||
================================================================================
|
||||
PAGE 108
|
||||
================================================================================
|
||||
|
||||
Sending/receiving statequeries andanswers
|
||||
lCPP_SimpleClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleGscActionClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleClient (RADStudioXE)
|
||||
Enumeration ofvideoinputandoutputchannels
|
||||
lCPP_SimpleClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleClient (RADStudioXE)
|
||||
Enumeration ofdigitalIOcontacts
|
||||
lCPP_SimpleClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleClient (RADStudioXE)
|
||||
Sending database actionqueries
|
||||
lCPP_SimpleDatabaseClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleDatabaseClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleDatabaseClient (RADStudioXE)
|
||||
Sending database alarmqueries
|
||||
lCPP_SimpleDatabaseClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleDatabaseClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleDatabaseClient (RADStudioXE)
|
||||
Navigating through database entries
|
||||
lCPP_SimpleDatabaseClient (VS2008/VS2010, C++)
|
||||
lCS_SimpleDatabaseClient (VS2008/VS2010, C#)
|
||||
lDelphi_SimpleDatabaseClient (RADStudioXE)
|
||||
Converting database answers frombinarytoASCIIrepresentation
|
||||
lCPP_SimpleDatabaseClient (VS2008/VS2010, C++)
|
||||
lDelphi_SimpleDatabaseClient (RADStudioXE)
|
||||
|
||||
================================================================================
|
||||
PAGE 109
|
||||
================================================================================
|
||||
|
||||
Building GeViSoft messages fromuserinput
|
||||
lCPP_ConsoleClient (VS2008/VS2010, C++)
|
||||
lCS_ConsoleClient (VS2008/VS2010, C#)
|
||||
lDelphi_ConsoleClient (RADStudioXE)
|
||||
|
||||
================================================================================
|
||||
PAGE 110
|
||||
================================================================================
|
||||
|
||||
ByPlatform
|
||||
Microsoft VisualStudio2008/2010, C++,MFC
|
||||
CPP_SimpleActionClient
|
||||
lConnecting/disconnecting toGeViServer
|
||||
lSending/receiving ofactions
|
||||
lReceiving anddispatching ofservernotifications
|
||||
lConverting betweenASCIIandbinaryrepresentation ofmessages.
|
||||
CPP_MonitoredConnectionClient
|
||||
lConnecting/disconnecting toGeViServer
|
||||
lSending/receiving ofactions
|
||||
lReceiving anddispatching ofservernotifications
|
||||
lConverting betweenASCIIandbinaryrepresentation ofmessages
|
||||
lMonitoring aGeViSoftconnection
|
||||
lAutomatically reconnecting aGeViSoftconnection onloss
|
||||
CPP_SimpleClient
|
||||
lConnecting/disconnecting toGeViServer
|
||||
lSending/receiving statequeriesandanswers
|
||||
lSending/receiving ofactions
|
||||
lEnumeration ofvideoinputandoutputchannels
|
||||
lEnumeration ofdigitalIOcontacts
|
||||
lReceiving anddispatching ofservernotifications
|
||||
CPP_SimpleDatabaseClient
|
||||
lConnecting/disconnecting toGeViServer
|
||||
lSendingdatabaseactionqueries
|
||||
lSendingdatabasealarmqueries
|
||||
lNavigating throughdatabaseentries
|
||||
lReceiving databaseentries
|
||||
lConverting databaseanswersfrombinarytoASCIIrepresentation
|
||||
Reference in New Issue
Block a user