================================================================================ GeViScope_SDK.pdf - Pages 1 to 10 ================================================================================ ──────────────────────────────────────────────────────────────────────────────── Page 1 ──────────────────────────────────────────────────────────────────────────────── GeViScopeSDK Dokumentation|Documentation|Documentation|Documentatión Version04.2013 ──────────────────────────────────────────────────────────────────────────────── Page 2 ──────────────────────────────────────────────────────────────────────────────── GeViScopeSoftwareDevelopmentKit(SDK) Introduction TheGeViScopeSDKconsistsofacollectionoffreesoftwareinterfacesforthe GEUTEBRÜCKDVRsGeViScopeandRePorter.Itcanbeusedtointegratethesedevices incustomapplicationsandalthoughforlinkingnotyetsupportedperipherals. TheinterfacesarebasedonnativeWin32DLLs.Sotheycanbeusedwithvariousdevel- opmentplatformsoftheWindowsOS. Tosupportthe.NETtechnologytheSDKexamplescontainwrapperclassesbasedon C++/CLI.Thesewrapperexamplescanbefreelyused,modifiedandextendedbytheSDK users.TheC#examplesincludedintheSDKdemonstrate,howthewrapperscanbeused bycustomapplications. Contents FilesanddirectorystructureoftheSDK Settingupavirtualtestenvironment RemotecontrolGSCView OverviewoftheinterfacesintheSDK Supporteddevelopmentplatforms Guidelinesandhints GSCViewdatafilterplugins Examplesoverview Actiondocumentation Documentation-HistoryVersion3.9/PME FilesanddirectorystructureoftheSDK DuringtheinstallationoftheSDKtheenvironmentvariable%GSCSDKPATH%which pointstotherootdirectoryoftheSDKisset.Thisreferencepathisusedinallexamples. %GSCSDKPATH%\BinContainsalldynamiclinklibrariesandisthetargetdirectoryforthe compiledexamples %GSCSDKPATH%\includeContainsallDelphiimportunits,C++headerandcppfiles %GSCSDKPATH%\libContainsalllibfilesforBorlandC++BuilderandMicrosoftVisualC++ ThematchinginterfaceunitsbetweenC++andDelphihavethesamenamebutcompiler specificfileextensions. ──────────────────────────────────────────────────────────────────────────────── Page 3 ──────────────────────────────────────────────────────────────────────────────── Settingupavirtualtestenvironment Introduction AllrequiredcomponentsforsettingupavirtualGeViScopedeviceareincludedintheSDK. Soanindependentdevelopmentofcustomsolutionscanbeachievedwithoutanyspecial hardwarerequired. AfterstartinguptheGeViScopeserver(partofthevirtualGeViScopedevice)GeViScope softwarecanbeusedwithfullfunctionfortwohours.Afterthattimethefunctionalityislim- ited.Afterstopandrestartoftheserverfullfunctionalityisofferedfortwohoursagain. Stepbystep AfterthesuccessfulinstallationoftheSDKallnecessaryfilesexistintheinstallationfolder (normally“%HOMEPATH%\MyDocuments\GeViScopeSDK”). Step1:Assignlocalpolicy“Lockpagesinmemory” TorunGeViScopeserveronyourlocalmachine,alocalpolicyneedstobeassignedtothe useraccountunderwhichGeViScopeservershouldwork. Pleaseopenthe“LocalSecurityPolicy”dialoginthecontrolpanel–AdministrativeTools. With“SecuritySettings/LocalPolicies/UserRightsAssignment”theprivilege“Lock pagesinmemory”hastobeassignedtotheuseraccountunderwhichGeViScopeserver shouldrun. TheuserhastobeamemberofthelocalAdministratorsgroup. Theuserhastologoutandloginagaintoletthesettingtakeeffect. ──────────────────────────────────────────────────────────────────────────────── Page 4 ──────────────────────────────────────────────────────────────────────────────── Step2:unpackthetestfiles Unpackthefile“\BIN\GeViScope.Database.zip”totherootdirectoryofyoursystemdrive (normally“C:”). Afterwardsthefile“C:\GeViScope.Database”shouldexist.Pleasenotethat thefileisnotseeninthewindowsexplorerifhiddenfilesandfoldersaremaskedout. Unpackthefile“\BIN\DatabaseBackup.zip”tothesubfolder“\BIN”oftheGeViScopeSDK basedirectory(normally“%HOMEPATH%\MyDocuments\GeViScopeSDK”).Afterthat thefile“\BIN\DatabaseBackup.gpf“,whichcontainsatestbackupfileinGBFformat (“GEUTEBRÜCKBackupFile”)shouldexist. Step3:starttheGeViScopeserver Starttheserverbydoubleclickingonfile“\BIN\GSCServer.exe“.Nowaconsoleapplication shouldstart. Step4:importthetestsetup StarttheGSCSetupsoftware(file“\BIN\GSCSetup.exe“ )andestablishaconnectiontothe localserver.Usethefollowinglogininformation: Username=sysadmin Password=masterkey Sendthesetuponcetotheserverbyusingthemenuentry“Sendsetuptoserver“. Thetestsetup“\BIN\GeViScopeSDKSetup.set“ canbeimportedintotheserverwiththehelp ofthemenuentry“Importsetupfromfile“.Afterwardsitshouldbesendtotheserveronce again. Step5:viewlivevideoandbackupvideoinGSCView Nowthecorrectsetupofthetestenvironmentshouldbetested.Forthatpurposethe GSCViewsoftware(file“\BIN\GSCView.exe”)canbestartedandagainaconnectiontothe localservershouldbeestablished. Afterasuccessfulconnectionmediachannelsareavail- ableandcanbeviewed. SimplydragthemediachannelsontheviewersofGSCView. ──────────────────────────────────────────────────────────────────────────────── Page 5 ──────────────────────────────────────────────────────────────────────────────── Themenuentry“Openbackupfile…”allowsopeningthetestbackupfile“\BIN\Data- baseBackup.gpf“,whichalsocontainsmediachannelsthatcanbedisplayed.Pleasecheck thecorrectfunctionofthebackupbyplaybackthevideomaterial. Step6:Useoftool“\BIN\GSCPLCSimulator.exe” Thesoftware“\BIN\GSCPLCSimulator.exe”servesasamonitoringtoolforallmessages (actions)andeventsthataretransportedinsidethecompletesystem.Furthermoreactions canbetriggeredandeventscanbestartedandstopped. Afterbuildingupaconnectiontothelocalserverallactiontrafficisdisplayedinalist. ThistoolisextremelyhelpfulfortestingofcustomapplicationsbasedontheSDKandfor analyzingmessageflowinthecompletesystem. Backgroundinformation ToprovideatestenvironmentwithfullfunctionalitytheGeViScopemediaplugin“MCS” (MediaChannelSimulator)isused.Itsimulatesrealvideomediachannelsbychanneling testpicturesintotheGeViScopeserver.16mediachannelscanbeusedaslivechannelsor canberecordedintothetestdatabase.Furthermorethechannelscreatemessages (actions)thatallowusingthemasbasefordevelopingvideoanalysissoftware. Themediaplugin“MCS”ispartoftheSDKincludingsourcecode(developmentplatformBor- landC++Builder6)anddocumentation(pleaseseetopic“Examplesoverview”formore information). OverviewoftheinterfacesintheSDK Introduction ThisdocumentgivesashortoverviewofthedifferentinterfacesthatbelongtotheSDK. Pleasenote,thatallinterfacesincludeclassdeclarationstoaccesstheexportedfunctions ofthedynamiclinklibraries.TousetheminC++,thematchingcppfilesandthelibfilescor- respondingtotheDLLshavetobeaddedtothecustomproject. ──────────────────────────────────────────────────────────────────────────────── Page 6 ──────────────────────────────────────────────────────────────────────────────── Buildingblocksoffunctionality DBI l Lowlevelserveranddatabaseinterface l Connectionhandling,GBFaccess,rawdatabaseaccess(novideodisplay!),media exportfunctionality,backupfunctions,accesstorawlivemedia(novideodisplay!), setupdataaccess l Supportsbasicfunctionalityforbuildingblocks“PLC”and“MediaPlayer” l Mainbinaryfile:GSCDBI.DLL l Mainincludefiles(C++):GSCDBI.h,GSCDBI.cpp l Mainincludefiles(Pascal):GSCDBI.pas PLC l Complexnotification,actionandeventprocessing l Listento,dispatch,createandsendactions l Listentoeventsandsystemnotifications l Allowscontrollingandmonitoringthesystem l Mainbinaryfile:GSCActions.DLL l Mainincludefiles(C++):GSCActions.h l Mainincludefiles(Pascal):GSCActions.pas TACI l TelnetActionCommandInterface l SimpleASCII-FormatcommunicationbasedonTelnet l Allowscontrollingandmonitoringthesystem l Receivedactionsneedtobeparsed ──────────────────────────────────────────────────────────────────────────────── Page 7 ──────────────────────────────────────────────────────────────────────────────── l Tousethatinterface,themediaplugin“GSCTelnetActionCommand”needstobe installed MediaPlayer l Highlevelserveranddatabaseinterfaceincludingmediapresentation l Displayvideo,playaudio(liveandbackup) l Integratedexportfunctionality(GBF,MPEG,Video-DVD,Singlepicture) l Searchmediadatabytimeorcorrespondingtoeventdata l Mainbinaryfile:GSCMediaPlayer.DLL l Mainincludefiles(C++):GSCMediaPlayer.h,GSCMediaPlayer.cpp l Mainincludefiles(Pascal):GSCMediaPlayer.pas OffscreenViewer l Partofbuildingblock“MediaPlayer” l SamefunctionalityasMediaPlayer,but:norendering,onlydecompressing l ClassTGSCOffscreenViewercanbeusedanalogoustoTGSCViewer Mediaplugin(GeViScopeserverplugins) l GeViScopeserverpluginsallowintegratingcustomperipheralsinGeViScopesys- tems l Channelingofvideoand/oraudiomediaintotheserver l IncludingfullaccesstoPLC l PluginsrunasIn-Process-DLLsinGeViScopeserversoftware GSCViewdatafilter plugin l GSCViewpluginsallowintegratingcustomdatafilterfrontendsinGSCViewsoft- ware l PluginsrunasIn-Process-DLLsinGSCViewsoftware GSCViewdatapresentationplugin l GSCViewpluginsallowcustomizedpresentationofeventdatainGSCViewsoft- ware,especiallyofeventdatapresentedinviewedpictures l PluginsrunasIn-Process-DLLsinGSCViewsoftware RemotecontrolGSCViewbyactions Introduction ThesimplestapproachtoviewandbrowseliveandrecordedvideoofoneormoreGeViS- copesistoremotecontrolGSCViewoutofcustomsolutions. GSCViewcanbeusedinaspecialmodesothatitcanbecontrolledbyactionsthataresent fromaGeViScopeserver.TheactionscanbechanneledintothesystemusingtheSDK (GSCDBI.DLLandGSCActions.DLL)incustomapplications.Asanalternativetheactions canbesenttotheTACIinterfaceoftheGeViScopeserver.TheTACIinterfaceisamedia pluginoftheGeViScopeserver,whichcanreceiveactionsasASCIItextcommandssimilar toaTELNETcommunication.TheTACIpluginhastobelicensed. ──────────────────────────────────────────────────────────────────────────────── Page 8 ──────────────────────────────────────────────────────────────────────────────── Stepbystep Thefollowingstepbystepinstructionsshowhowtoconfigureasimplesystemtodemon- strateremotecontrollingGSCView.ThevirtualtestenvironmentincludedintheSDKshould besuccessfullyinstalledandsetupbeforefollowingtheseinstructions(seetopicSettingup avirtualtestenvironment). Step1:starttheGeViScopeserver Starttheserverbydoubleclickingonfile“\BIN\GSCServer.exe“.Nowaconsoleapplication shouldstart. ──────────────────────────────────────────────────────────────────────────────── Page 9 ──────────────────────────────────────────────────────────────────────────────── Step2:startGSCView StarttheGSCViewsoftware(file“\BIN\GSCView.exe”). Step3:starttheprofilemanager Themenuentry“Options–Profilemanager…”startstheinternalprofilemanagerof GSCView.TheprofilmanagerallowsconfiguringallGSCViewsettings. ──────────────────────────────────────────────────────────────────────────────── Page 10 ──────────────────────────────────────────────────────────────────────────────── Step4:declarelocalconnectionas“connectautomatically” Byselecting“Connections”inthesection“Resources”thelocalconnectioncanbedeclared asaconnectionthatisautomaticallybuiltupafterstartingGSCView.Additionaltheoption “Reconnectautomatically”shouldbeactivated.