pms.docx
《pms.docx》由会员分享,可在线阅读,更多相关《pms.docx(90页珍藏版)》请在冰豆网上搜索。
pms
1Introduction4
1.1WhichInterfacetoUse4
2ConnectingUsingaTCP/IPInterface5
2.1Overview5
2.2SystemConsiderations5
2.2.1RegardingVingCardsoftware5
2.2.2HardwareLayout6
2.3VingCardScreenDisplayWhenUsingTCP/IPInterface7
2.4AvailableAPIFunctions7
2.5AccessandUseoftheVingCardAPI7
2.5.1Overview7
2.5.2CodingnotesforTCP/IPinterface7
2.5.3Messagestructures10
2.6MultipleInstancesandMulti-Threading15
2.7IssueswithTCP/IPsockets15
2.8TestProgramsforTCP/IPInterface16
2.8.1VTCLink–BatchClient16
2.8.2ExternalTestprograms19
2.9CodeExamplesforTCP/IPInterface20
3DirectIntegrationwithVingCardDLL21
3.1Overview21
3.2SystemConsiderations21
3.2.1RegardingVingCardsoftware21
3.2.2HardwareLayout22
3.3VingCardScreenDisplayWhenUsingDLLIntegration23
3.4AvailableAPIFunctions23
3.5AccessandUseoftheVingCardAPI23
3.5.1Overview23
3.5.2DirectvsIndirectDLLloading23
3.5.3CodingnotesforDLLIntegration23
3.6MultipleInstancesandMulti-Threading26
3.7TestprogramsforDLLIntegration27
3.7.1PMSif.dllTestprogram27
3.8CodeExamplesforDLLIntegration29
4DirectIntegrationwithVingCardexecutable30
4.1General30
4.2CodeSamplesforExecutableIntegration30
5ConnectingusinganRS232SerialLink32
5.1Overview32
5.2SystemConsiderations32
5.2.1SpecifictoVision,VisionSmartCard&DaVinci32
5.2.2SpecifictoVC2100&VC2100PLUS32
5.3PhysicalConnection33
5.4MessageProtocol33
5.4.1CommunicationParameters33
5.4.2LinkEnquirymessages34
5.4.3CommandMessages&AnswerMessages35
5.4.4ResponsetoCommandMessages35
5.4.5ResponsetoAnswerMessages36
5.4.6Summaryofallmessagesandresponses36
5.5MessageFormat38
5.6MessageControlCharacters39
5.7CheckCharacterCalculation40
5.8Examples42
5.8.1SpecifictoVisionandDaVinci42
5.8.2SpecifictoVC2100&VC2100PLUS44
5.9TestprogramsforRS23246
5.9.1PMSSingleFrameTest46
5.10CodeExamplesforRS23247
6CommandCodes49
6.1CommandA–CheckInGuest50
6.2CommandB–CheckOutGuest52
6.3CommandC–ChangeGuestStatus54
6.4CommandD–ReplaceGuestCard56
6.5CommandE–VerifyGuestCard58
6.6CommandF–ReplaceGuestUserID60
6.7CommandG–Pre-CheckInGuest62
6.8CommandH–AddGuest64
6.9CommandI–CheckOutOld,CheckInNew65
6.10CommandW–WritetoCard67
6.11Command!
–CheckOutAll67
7AnswerCodes68
8DataFields69
8.1RoomName69
8.2RoomList69
8.3UserType69
8.4UserGroup70
8.5FirstName70
8.6FamilyName71
8.7CheckIntime71
8.8CheckOutTime71
8.9AccessPoints/ExtendedAccess72
8.9.1ForVision,VisionSmartCard,DaVinci72
8.9.2ForVC2100&VC2100PLUS72
8.10CardCopy73
8.11Track1data73
8.12Track2data74
8.13PMSID74
8.14PrintInformation75
8.15GenericField76
8.16DeviceMessage76
9TheVingCardAPI77
9.1PMSifRegister78
9.2PMSifUnregister78
9.3PMSifShutdownVision/PMSifShutdownSystem79
9.4PMSifGetUserGroups79
9.5PMSifGetDefUserGroup80
9.6PMSifGetKeycardTypes80
9.7PMSifGetDefKeycardType81
9.8PMSifGetAddress81
9.9PMSifEncodeKcdLcl82
9.10PMSifEncodeKcdRmt84
9.11PMSifReturnKcdLcl86
9.12PMSIfVerifyKcdLcl88
9.13NoteonC++Declarations89
10RecommendedCommandCodeSequences90
10.1Vision,VisionSmartCardandDaVinci90
10.1.1CheckInasingleguestwithimmediateeffect90
10.1.2CheckInmultipleguestswithimmediateeffect90
10.1.3PreCheckInaguestforafuturetimewindow90
10.1.4PreCheckInmultipleguestsforafuturetimewindow90
10.2VC2100&VC2100PLUS90
10.2.1CheckInoneguestwithimmediateeffect90
10.2.2CheckInmultipleguestswithimmediateeffect90
10.2.3PreCheckInguestsforafuturetimewindow90
11UniqueUserId91
12Displaymodes92
1Introduction
TherangeofVingCardlocksystemsprovidethreestandardisedinterfacemethodsbywhichaPMScancontroltheissueandmaintenanceofguestkeycards.
VC2100&
VC2100PLUS
VISION
VISION
SMARTCARD
DAVINCI
TCP/IPconnection
RS232connection
DirectIntegrationviaDLLcalls
Foreachinterfacemethod,thisdocumentprovidesdetailedusageandprotocoldescriptions,alongwithworkingcodesampleswritteninVisualC++,BorlandDelphiandVisualBasic.
TheaimistoprovidesufficientinformationtoallowefficientanderrorfreeprogrammingofthePMSsideoftheinterface.
1.1WhichInterfacetoUse
WheninterfacingtoVision,theTCP/IPinterfaceisrecommendedforallnewinstallationsasitcouplesthemaximuminterfacefunctionalitywiththegreatestflexibility.AnynetworkedPCatanylocationcanhavefullaccesstotheVingCardinterface.TheDirectIntegrationandRS232interfacesaresupportedinorderthatexistinginstallationscanbemaintainedandenhanced.TheywillofcourseworkeffectivelyonnewinstallationsorwherespecialcircumstancesapplyandpreventtheuseofTCP/IP–butwerecommendthatyoucheckwithVingCardbeforeusinganinterfaceotherthanTCP/IP.
WheninterfacingtoDaVinciandVisionSmartCard,theTCP/IPinterfaceisnotavailable.UsingDirectIntegrationgivesenhancedfunctionalityandflexibilitywhencomparedtotheRS232interface,inparticularitisabletoreturnbinarykeycodestothecallingPMSsystem.Therefore,werecommenditsusewhereverpossible.
WheninterfacingtoVC2100andVC2100PLUStheRS232interfacemustbeused.
2ConnectingUsingaTCP/IPInterface
2.1Overview
Thisisthemostpowerfulandflexibleintegrationmethodavailable,allowingaccesstoguestkeycardfunctionalityfromanyPMSworkstationthathasTCP/IPcapability–regardlessofphysicallocation.Itworksasfollows:
oVingCardmakesavailableaWindows32bitDLLcalledtcppmsif.dllwhichexportsfunctionsrelatedtotheissueandmaintenanceofguestkeycards.ThesefunctionsarereferredtocollectivelyastheVingCardAPI
oOneworkstationontheVingCardnetworkrunsaprogramcalledVTCLink.exe.ThisisaTCP/IPserverapplication.PMSclientsconnecttoVTCLinkatport3015attheIPaddressoftheworkstationrunningit.Upto100clientscanbeconnectedatonetime.
oWhenVTCLinkisstarteditloadstcppmsif.dll.Thereafter,VTCLinkactsasanagentforthePMSsoftware.APMSworkstationsendsitTCP/IPmessagesindefinedformats.OneformatrelatestoeachAPIfunction.VTCLinkreceivesthesemessagesanduseseachasthebasisofafunctioncalltotheDLL.WhentheDLLfunctionreturns,VTCLinkpackagestheresultintheoriginalTCP/IPmessageformatandsendsitbacktothecallingPMSworkstation.
oThefirstAPIfunctionthePMSmustinvoke(usingthemethodoutlinedabove)istheRegisterfunction,whichrequiresthePMStoprovideapropertyspecificlicensecode.
oThePMSisthenfreetousethelibraryofDLLfunctions.
2.2SystemConsiderations
2.2.1RegardingVingCardsoftware
InorderfortheAPIlibraryfunctionstooperate,oneVingCardworkstation(usually,butnotalwaystheVingCardserver)needstorunVTCLink.exe.ThiscanbestartedfromwithinthemainVingCardapplication–automaticallyuponstartupifrequired(Setup,SystemParameters,PMS–TCP/IP,Enabled).
Additionally,theVingCardmainapplication(forexampleVisionorDaVinci)mustbefullyinstalledandrunningonthelocalworkstation(localtoVTCLink.exe)andalsoonanyotherworkstationthatthePMSwishestoremotelyaccess.
Ifrequired,theVingCardsoftwarecanbestartedwiththe/MINparameter(forexampleVision/MIN)sothatitoperatesinminimizedmode–thusallowingthePMSprogramfullcontrolofwhatisdisplayed.
WhenyouusethelocalcardencodingandreadingAPIfunctions(PmsifEncodeKcdLclorPmsifReturnKcdLcl),thelocalcopyoftheVingCardapplicationmustbeattheloginscreen–otherwiseanAnswerCode‘5’(Busy)willbereturned.ForallotherAPIfunctions,itdoesnotmatterifanyoneisloggedintothelocalVingCardapplication.
WhenyouusetheremotecardencodingandreadingAPIfunction(PmsifEncodeKcdRmt),thelocalcopyoftheVingCardapplicationneednotbeattheloginscreenbuttheVingCardapplicationontheremote(addressed)workstationmustbe.
WhenyouusePmsifEncodeKcdRmttoencodeorreadfromstandalonenetworkencoders-thatis,encodersthatareattachedtotheVingCardnetworkbutnotdirectlymappedtoanyoneworkstation-thelocal(toVTCLink)copyoftheVingCardapplicationneednotbeattheloginscreen.
2.2.2HardwareLayout
BoththeVingCardsystemandthePMSsystemmayconsistofasinglePCoranetwork.AtleastonePCneedstorunPMSsoftwareandatleastone(whichcanbethesameone)mustruntheVingCardmainapplicationplusVTCLink.
Example1:
PC1toPC3useTCPIPtocommunicatewithVTCLink(PC4).Theyusethefunction‘PMSifEncodeKcdRmt’torequestthatkeycardsaremadeattheappropriateencoder.Inthisexampleamixtureofencodertypesisused,bothserial(encoder2-connecteddirectlytoaworkstation)andnetworkencoders(1and3).
LAN/WAN
PC2
VingCard
+
PMS
PC3
VingCard
+
PMS
PC4
VingCard
+
VTCLink
PC1
VingCard
+
PMS
Encoder3
Encoder2
Encoder1
Example2:
PC1toPC3useTCPIPtocommunicatewithVTCLink(PC4).Theyusethefunction‘PMSifReturnKcdLcl’torequestkeycodes.ThekeycodesarereturnedfromPC4andthePMSsoftwareattheworkstationsdrivestheencoders.Inthisexample,oneofthePMSstations(PC1)islocatedremotely–forexampleatanairport.
2.3VingCardScreenDisplayWhenUsingTCP/IPInterface
RefertoDisplayModesfordetailsofwhattheVingCardsoftwarewilldisplayonscreenwhenusingt