文稿教程讲稿bei-ch mifare standard1k card data definition v_第1页
文稿教程讲稿bei-ch mifare standard1k card data definition v_第2页
文稿教程讲稿bei-ch mifare standard1k card data definition v_第3页
文稿教程讲稿bei-ch mifare standard1k card data definition v_第4页
文稿教程讲稿bei-ch mifare standard1k card data definition v_第5页
已阅读5页,还剩85页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

BeijingMifareStandard1KCardDataDefinitionMifare标准1K卡数据定义 RevisionERGTransitRevision30JulyEngineeringProjectNeilRichardLiuZhongHistory修订记录修订版修订日Description描作SeeAppendixAPrevious参见附录A13Nov4.2CardArea1–ReducedcardIssuerto4bitsandmovedtestModetoherefromArea2.4.21cardIssuer424.3CardArea2–MovedtestModetoArea1andreplaceitwithmaintenanceMode(1bit).Adjustedpaddingto5bits.4.32移动testMode1CardMemoryOrganisation-Sector1Block3accessconditionrestoredtoIssuerTrailer’.DetailedCardLayout–UpdatedtoreflectaboveNeil14Novv3.8aftertranslation.3.8Coloredtextchangedtoblack.Neil14NovHistory-Movedv3.1to3.7intoAppendix3.1-3.8移到附录CorrectedminortyposthroughouttheChangedallRangevaluestobeChangedproductTypetoproductTypeIdandpurseTypetopurseTypeId.将productTypeproductTypeIdpurseType改purseTypeId1.3Terminology–MovedallTermstotheTermscolumnandalldefinitionstotheDefinitionscolumn.1.3–将所有术语移到术语专栏,将所有定义移到DirectorySectorFile–-removed‘PublicPursePresentbutUnused’.–-去掉PublicPursePresentbutCardArea1–RenamedtestModetotestCard.IndustryCodeisnowdefinedas:75134.21将testModetestCardNeil修订版修订日Description描作4.2.1MACCalculation–removedduplicatedFigure4.2.1MAC计算–删除的图14.3CardArea2–RenamedmaintenanceMode,purseTypetopurseIdandproductTypetoproductId.CardDepositValue–changed‘ERGversion’to‘equivalent’.Added“NOTE”topurseId.4.32maintenanceModepurseTypepurseIdproductType改为productId。CardDepositValue将‘ERG版本改为‘对等’.将“注释”加到purseId。4.5JourneyAreaFile–changedstatustojourneyStatusandadded‘gated’todescriptionof4.5–将“状态”改为“旅程状态”,将“有闸机”加到对transfersTaken的说明。4.8.1PurseFile–correctedchecksumsizeto84.9alisationFiles1&2–Numbervalue0XAcomment–added‘origional’.cardholderNumberType–Value4changedto‘other’andchanged‘officer’to4.9个人化文档1&2–值0XA评论-补充了“原始”。cardholderNumberType价值4改为“其他”,‘officer’‘soldier’。4.10.1TransactionLogFormat–RenamedproductTypetoproductTypeId.Table16–Removed‘Use’,Rebate’and‘Subcharge’4.10.1–将productType更名为7.1CardFormatting–Table17DataBlock–read/decrementcolumn-Added‘transfer’and8CardSerialNumberDefinition–Changedreferencesto‘CardIssuerFile’toCardAreaXFile’andIndustryCodeisnow:75Sector1-Updatedtoreflectabove10DataTransmission–Removedreferencetosplittingfieldsacrossblocks.24Janv3.10aftertranslation.3.10Chen25JanChangestosection1.4Referencesandcross-referenceformats.J.Bluhm-30Janv3.12afterHarry修订版修订日Description描作Versionedforrelease14FebSpecifyMACalgorithmforcalculatingmocCardCertificationCode的MACIncludedBEI-00014_CHProjectGlossaryandBEI-00048_CHSecurityArchitectureinReferences.“Big-endianonlyappliestonumericvalues.Paddingbitsaresettoallzeros,toallowforeasierinMitch19DefineMACkeydiversificationalgorithm,andremovethereferencetoBEI-00048SecurityArchitecture.定义MACBEI-00048《安全架Notedequivalences/differencesbetweenISO/IEC9797-1MACalgorithmandthealgorithmdefinedintheChineseConstructionMinistrystandardApplicationtechnologyforconstructioncauseICcard(NationwideExposureDraft).注意到ISO/IEC9797-1MAC《建设事业应用技术》(全部发布版)定义的算AddedreferencestoBEI-00022_APPC_CHDeviceCardProcessingSpecificationAppendixC.Mitch30JulyChangessincev4.0havebeenrejectedandthecontentofthehasbeenrevertedbacktov4.0content.VersionedforRelease5.0HarryTableof MifareMemoryOrganisationMifare架 MemoryOrganisation架 DataBlocks数据 SectorTrailer扇区尾 MifareCardMemoryLayoutMifare卡结 BlockTranslationTable块转换 MemoryLayout结 SmartCardFiles智能卡文 DirectorySector DirectoryItem 区条目标识 CardArea1File票卡1区文 MACCalculationMAC计 CardArea2File票卡2区文 ValueFiles值文 JourneyAreaFile旅程区文 UseoftheactiveStatusField动态选择字段(activeStatus)的使 LAVAreaFile上次加值(LAV)区文 ProductArea产品 MultirideFile计次文 PeriodFile定期文 PurseArea钱包 PurseFile钱包文 alisationArea个人化 alisationFile1个人化1 alisationFile2个人化2 TransactionLogFiles交易日志文 TransactionLogRecordFormat交易日志记录格 CRC-8Implementation算法CRC-8的实 DataIntegrityScheme数据完整性方 AccessKeys密 UpdatingtheKeys更新密 SectorAccessKeys扇区密 ByCardSector卡扇区密钥分 ByDevice设备密钥分 CardSerialNumberDefinition卡序列号定 CardDefinition卡片定 CardMemoryOrganisation票卡组 DetailedCardLayout票卡详细布 Sector Sector Sector Sector Sector Sector Sector Sector Sector Sector Sector Sectors11to15扇区11到扇区 DataTransmission数据传 Appendix PreviousHistory前期文档记 ListofTables表索Table1:Abbreviations,TermsandDefinitions缩写、术语以及定 Table2:StandardCardEEPROMMemoryLayout标准卡EEPROM设 Table3:ManufacturerBlockFormat厂商使用块格 Table4:MemoryLayout结 Table5:CardArea1FileFormat票卡1区文件格 Table6:CardArea2FileFormat票卡2区文件格 Table7:ValueFileFormat值文件格 Table8:JourneyAreaFileFormat旅程区文件格 Table9:LastAddValueAreaFileFormat上次充值区文件格 Table10:MultirideFile计次文 Table11:PeriodFile定期文 Table12:PurseFile钱包文 TABLE13:ALISATIONAREA1FILEFORMAT个人化1区文件格 Field字 TABLE14:ALISATIONAREA2FILEFORMAT个人化2区文件格 Field字 Table15:TransactionLogRecord交易日志记 Table16:TransactionLogRecordTypes交易日志记录类 Table17:AccessConditions条 Table18:CardSectorAccessKeyTypes卡扇区密钥类 Table19:DeviceAccessKey Table20:CardMemoryDefinition卡定 ListofFigures图索Figure1:mocCardCertificationCode 图1:mocCardCertificationCodeMAC计 Figure2:Checksum Figure3:JourneyAreaSelection Figure4:DataTransmissionSequence数据传输顺 Introduction引ThisisoneofasetofsthatdescribetheBeijingAFCClearingCentre(ACC)interfacespecifications.本文档是描述中心(ACC)接口规范文档Thesetofscomprises:该文档集包括BEI-00017_CHConfigurationDataDefinitionBEI-00019_ifareUltralightCardDataDefinition卡数据定BEI-00020_ifareStandard1KCardDataDefinition卡数据定BEI-00021_CHUsageDataDefinitionBEI-00022_CHDeviceCardProcessingSpecificationBEI-00022_APPC_CHDeviceCardProcessingSpecificationAppendixC设备票卡处理规范附录CBEI-00023_CHDeviceMan-MachineInterfaceSpecification设备人-BEI-00033_CHBaseTypeDataDefinitionBEI-00037_CHSystemInterfacesOverviewBEI-00039_CHACCtoLCInterfaceACCLCBEI-00040_CHSystemInitialValuesBEI-00045_CHOnlineEnquiryFunctionalSpecification查询功能说BEI-00054_CHSAMInterfaceSpecificationSAMPurposeTheMifareStandardcardisamulti-applicationcontactlesssmartcarddbyPhilips.ThepurposeofthisistodefineaTransitApplicationimplementationonthistypeofcard.Mifare标准票卡是由飞利浦公司提供的多功能非接触式智能卡。制作本文件的目的是定义ScopeThescopeofthisislimitedtotheCardDataDefinitionfortheMifareStandardCardICMF1ICS50fortheBeijingproject.本文件的范围只限于项目中Mifare标准票卡ICMF1ICS50的票卡数据定义Chapter2definesthememorylayoutoftheMifareStandardChapter3specifieshowthememoryisusedbytheTransitChapter4definestheTransitApplicationFilesstoredonthe第4章定义了票卡中的交通应用文件。Chapter5describestheChecksumcalculation.5章描述了校验和计算。Chapter6describestheDataIntegrityChapter7definestheuseoftheCardAccess7章定义了票卡存取密钥的使用。Chapter8describestheCardSerialNumber.8章描述了卡序列号。Chapter9definesthephysicalstructureofallFilesontheChapter10describesthedatatransmissiontoandfromtheTable1listsabbreviations,termsanddefinitionsusedinthisTable1AbbreviationsTermsandDefinitionsAbbreviation缩Term术Definition定AutomatedFareTheuserofthecard.CyclicRedundancyCheck循ProgrammableRead-OnlyAprepaidproductwhichprovidesthecardholderwiththerighttotravelforaspecificnumberofjourneys.Aformofproductbetweentheproductissuerandcardholder.Agenerictermforthecollectionofspecificproducttypes,i.e.multiride,periodandpurseproducts.Abbreviation缩Term术Definition定PurseProductAproductthatprovidesthecardholderwithmonetaryunitsthatareusedtopayforgoodsandservices.AformofContractbetweenatransitserviceproviderandcardholder,containingevidenceoffarepaymentandthereforeentitlementtousethetransitserviceforwhichitwasissued.Thisisashort-livedobjectthatkeepstrackofthecardholder’smovementinthetransitsystem,foraparticularjourney.TheJourneyrecordsvalidationdetailstosupportentry-exitdetermination,transferentitlements,pass-backbusinessrules,andtheInspectionprocess.MinistryOfThefollowingmaterialsaretobeusedinconjunctionwithorarereferencedbythis[Ref: ConfigurationData[Ref: MifareUltralightCardDataDefinitionMifareUltralight卡数据定义[Ref: [Ref: UsageData[Ref: DeviceCardProcessing[Ref: DeviceMan-MachineInterface[Ref: BaseTypeData[Ref: SystemInterfaces[Ref: ACCtoLCInterfaceACCLC的接口[Ref: SystemInitial[Ref: OnlineEnquiryFunctional[Ref: SAMInterfaceSpecificationSAM卡接口规范[Ref: Datasheet:MifareStandardCardIC,MF1ICS50,Specification-PhilipsSemiconductorsRevision5.1,May数据表:mifare标准票卡ICMF1ICS50,功能规格200155.1版MifareMemoryOrganisationMifare架ThissectiondescribesthetechnicalspecificationsoftheMifareStandardsmartcard,includingmemoryorganization,manufacturerblocks,datablocks,andsectortrailers.本章节描述了Mifare标准智能卡的技术规范,包括结构,厂商使用块,数据块和扇区TheMifareStandardcardisamulti-applicationcontactlesssmartcarddbyPhilips,specificallydesignedfortransportapplicationsandrelatedloyaltyprograms.ThiscardconformstoISO/IEC14443Astandard.Mifare标准票卡是由飞利浦公司提供的多功能非接触式智能票卡,为交通应用和与信用有关的应用而设计。此票卡符合ISO/IEC14443A标准。Thiscarddatadefinitiondefinesadatamodelforsmartcardtransitapplications.Themodeldefinesbusinessobjectsandattributesasmartcardapplicationneedstosupporttransactionlogicandbusinessprocessesinthetransitenvironment.Theapplicationisdesignedfortransitsystemusers,i.e.passengers.此票卡的数据定义中定义了智能票卡交通应用的数据模型。此模型定义了业务对象以及支持交通环境中的交易逻辑和业务流程所需要的智能票卡应用属性。此应用专为轨道交Transactionperformance,securityandstoragecapacityaretechnicalissues,resolvedbytheMifareStandardcarddesign.Thesearediscussedlaterinthe.交易性能、安全和容量等技术问题均在mifare标准票卡的设计中得到了解决。这些内Thiscarddefinitionprovidesanextensibilitymechanismthatallowssystem-specificrequirementsnotalreadycovered,tobeaddedtotheapplicationsinanopenway.MemoryOrganisation架TheMifareStandardcardhasatotalof8192bits(1024bytes)ofEEPROMforstoringdata,organizedin16sectors,eachconsistingof4blocksof16bytes(64bytesperMifare标准票卡的EEPROM共有8192位(1024字节),分16个扇区数据,每个扇416字节的块组成(64字节)。AseachsectorrequiresaSectorTrailerBlockandtheManufacturerBlockconsumes1Block,thisleavesonly47datablocksactuallyavailableforUserDatastorage.由于每个扇区都需要一个区尾块,而厂商使用块要占用一个块,因此用户数据实际可7个。TheEEPROMispartitionedasshowninTable2.EEPROM2所示。Table2:StandardCardEEPROMMemoryLayout标准卡EEPROM设块Size00ManufacturerBlock厂商使用1DataBlock2DataBlock3SectorTrailer1-0DataBlock1DataBlock2DataBlock3SectorTrailerManufacturerBlockTheManufacturerBlockisusedtostorethecardserialnumber,whichiswrittenwhenthecardismanufacturedandmaynotbesubsequentlyupdated.Table3ManufacturerBlockFormatField字Size大小(位Description描Cardserialnumberwrittentothecardatmanufacturetime.Thisnumbercanneverbechanged.8Checkbytewrittentothecardatmanufacturetime.Thisnumbercanneverbechanged.Manufacturedatawrittentothecardatmanufacturetime.Thisdanneverbechanged.Bits(16Bytes):EndofFormoreinformationontheManufacturerBlock,refertothePhilipsdatasheet[Ref:DataBlocksEachDataBlockcanbeconfiguredaseitheraRead/WriteBlock(normalmemoryuse)orasaValueBlock(electronicPurse).TheuseofeachblockisconfiguredbytheAccessBitsintheSectorTrailer.每个数据块既可以配置为读写块(正常使用)也可以配置为数值块(电子钱包)。通TheseDataBlocksareusedfortheFilesasdefinedinthefollowingSectorTrailerThisblockcontainstwo6bytesecretkeystocontrolaccesstotheDataBlocksforthatSectorandAccessControlbitsfortheSector’sDataBlocks.此块包含两个6字节的密钥,能控制所属扇区的数据块存取情况以及该扇区中数据块的存ThereisalsoasinglebyteavailableforDataTheAccessControlbitsallowthefollowingoperationsontheDataBlockRead/Write(Read/Write,ValueandSectorTrailerBlocks).读/写(读/写,数值和区Increment/Decrement/Transfer/Restore(ValueBlocksonly).增值/减值/传输/恢复FormoreinformationontheSectorTrailer,refertothePhilipsdatasheet[Ref:Formoreinformationontheuseofthesecretkeysandtheaccesscontrolbits,refertoAccessKeys(Section7).MifareCardMemoryLayoutMifare卡结ThissectiondescribestheblocktranslationtableandmemorylayoutoftheMifareStandardsmartcard.BlockTranslationTableThe47DataBlocksavailableonthecardareaccessedasLogicalBlocksusingaBlockTranslationTabletomapalogicalblocktothephysicalSectorandDataBlockonthe卡上有47个数据块可用,使用数据块转换表使逻辑块与票卡上的物理扇区和数据块的形AstheCardlayoutisfixedbyPhilips,thefollowingtableisnotstoredonthecardbutisdefinedbytheApplication.LogicalBlocks =Sector0,blocks0,1andLogicalBlocks3,4, =Sector1,blocks0,1andLogicalBlocks6,7, =Sector2,blocks0,1and LogicalBlocks45,46,47=Sector15,blocks0,1and =扇区15,块0、1、MemoryLayout结AllFilesareallocatedtofixedLogicalBlocksasshowninTable4:MemoryTable4:MemoryLayout结File文(inLogical逻辑块Description描MOC11Notantitear无防保File文(inLogical逻辑块Description描forfutureMOCdirectoryuse.为将来 12Notantitear无防保CardArea1and2Notantitear无防保PurseValue2StorageofthePurseremainingMultirideValue2StorageoftheMultirideremainingJourney2TearLAVLAV1Notantitear无防保Product2TearPurse2TearLog921toNottear无防保alisationArea1&12Notantitear无防保SmartCardFiles智能卡文Dataserialisationformatsarespecifiedinstructuretablesthroughoutthissection,withfieldsizesspecifiedasanumberofbits.DirectorySector Thisfileexistsinsector0ofthecard,andisprovidedforMOCcardField字Size大小(位Description描8=0x00Directory 区8=0x01(Issuancesector)(区8=0x10(PublicPursesector)(公共钱包区8=0xE1(ERGuse)(ERG使用8=0xE0(ERGuse(ERG使用8=0xE1(ERGuse(ERG使用8=0xE1(ERGuse(ERG使用8=0xE2(ERGuse(ERG使用8=0xE2(ERGuse(ERG使用8=0xE2(ERGuse(ERG使用8=0xE3(ERGuse(ERG使用8=0xFFUnappliedSector)(未使用扇区8=0xFFUnappliedSector)(未使用扇区8=0xFFUnappliedSector)(未使用扇区8=0xFFUnappliedSector)(未使用扇区8=0XFFUnappliedSector)(未使用扇区DirectoryItem Sector值IssuancePublicPurse公共钱JourneyProductERGLogsERGCardArea1File1TheCardArea1filestoresMOCcardcompatibilityattributesandcardissueThisisaStaticFileandisnotanti-tearprotected.这是个静态文件,没有防保护。ThefiledataformatisspecifiedinTable5CardArea1FileFormat1区文件格式.文件数据格式在Table5:CardArea1FileFormat1区文件格式中规定。ThisfileisstoredinSector1,Block0andislocatedhereforMOCcard1扇区,0块中,为了与MOCTable5CardArea1FileFormat1Field字Size大小(位Description描CityCode,forMOCcard城市代码,与MOC=1000CityCodeforBeijing(城市代码Range0...9999(BCDIndustryCode,forMOCcard=行业代码,与MOCRange0...9999(BCDIssuerSerialNumber,forMOCcardThisistheERGserialNumber,alsoknownastheRange:0…这是ERGmocIssuerSerialNumber一样。0…4,294,967,295CardCertificationCode,forMOCcard=MACderivedfrommifareSerialNumber+mocCityCode+mocIndustryCode+serialNumber(mocIssuerSerialNumber)See4.2.1MACCalculationMAC计算Range:卡认证码,与MOCMACmifareSerialNumbermocCityCodemocIndustryCode+4.2.1MACField字Size大小(位Description描4UniquelyidentifiesthecardThisisaproprietaryparticipantidentificationnumberRange:0…150…151Indicateswhethertheapplicationhasbeenissuedfornormaluseorfortestpurposesonly:theapplicationhasbeenissuedfornormaltheapplicationhasbeenissuedfortestortrainingpurposesintheproductionsystem.ThebatchnumberthecardwasissuedRange:9Specifiesthedate/timeofthestartofthemonththecardwasinitialisedasfollows:0=1stJanuary20061=1stFebruary20062=1stMarch200600:00(witharangeofapproximay42Range:0200611120062122006318CardArea1checksum1SeeSection5ChecksumBits(16Bytes):Endof MACCalculationMAC计ThemocCardCertificationCode(MAC)iscalculatedusingthemocCityCode,themocIndustryCode.andtheserialNumber(mocIssuerSerialNumber).ThekeyusedisfirstdiversifiedonthemifareSerialNumber.使用和序列calculationinSAM中的计卡认证Figure1:mocCardCertificationCodeCardArea2File2TheCardArea2filestoresattributesthatallowacardtobemanagedthroughitsnormallifecycle,post-manufacture.票卡2区文件一些属性,使得票卡生产后,在其正常生命周期中,可以进行管理。ThisisaStaticFileandisnotanti-tearprotected.这是个静态文件,没有防保护。ThefiledataformatisspecifiedinTable6CardArea2FileFormat2区文件格式.文件数据格式在Table6:CardArea2FileFormat2区文件格式中规定。ThisfileisstoredinSector1,Block1.该文件在1扇区,1块中Table6CardArea2FileFormat2Field字Size大小(位Description描8Identifiestheparticularsetofsecurityaccesskeysthatprotectthecardissuer’sfiles.Keysetnumberswillbedefinedbythecardissuerasasetofindividualkeyversionnumbers,specifyingtheparticularversionofeachaccesskey.Range:Field字Size大小(位Description描3SpecifiestheversionoftheCardIssuerfileformat.Thecurrentversionis:1Range:1...71Specifiesthepreferredlanguageofthecardholder.Languageidentifierswillbedefinedbytheapplicationissuer.0=Chinese1=0ChineseDefault)中文(默认1English4Specifiesthetypeofpassengerinthetransitsystem,e.g.adult,8StoresthemonetaryamountpaidbythecardholderasaThisallowsadevicetodeterminetherefundvalueofacardwhenitisreturnedbythecardholder.Range:0...255Note:ThisistheequivalentoftheMOCCashPledge押金)0...255元MOC中的押金字段在ERG1Indicatesthenumberoftimesthecardhasbeenre-Range:5PaddingbitstomakethethissectionendonabyteApplication3SpecifieswhetheraPeriodorMultirideProduct Noproduct 预留- 预留Field字Size大小(位Description描5IdentifiestheissueroftheProduct,relativetoCardissuer(i.e.relativetocardIssuer).Range:产品商,与卡商相关(即与cardIssuer相关)0…316IdentifiesthetypeofPurseProduspecifiedbyitsissuer.Range:1...63NOTE:Thisvaluewillbe0ifthePurseisnotin1...636IdentifiesthetypeofProduspecifiedbyitsRange1...63UniquelyidentifiestheinstanceoftheProductforthespecificapplicationi.eonlyuniquewithinthecontextofthiscard).唯一1SpecifieswhichProductistobe0=1=01定期/1SpecifiesthestatusoftheAutoloadfacilityasAutoloadAutoload5IdentifiestheissuerofthePurse,relativetotheTransitApplicationissuer(i.e.relativetoproviderIdintheApplicationIssuerFile).件中的providerId有关)Range0...31Storesthemonetaryamountpaidbythecardholdertopurchasetheproduct,tosupportoff-lineproductrefunds.Range0..131071Thevaluetobeautoloaded(purse)ornumberofridestobeautoloaded(multiride).Range:0…131071Fenor0...131071分或次Field字Size大小(位Description描7Paddingbitstomakethefiledatalength168CardArea2SeeSection5Checksum2Bits(16Bytes):Endof ValueFilesTheseFilesarestructuredinaccordancewith[Ref:13]–ValueThisfilecanonlybealteredusingtheValueBlockoperationsasdefinedinDataMifareStandardCardIC,MF1ICS50,Functional[Ref:13]本文件只能使用DatasheetMifareStandardCardICMF1ICS50Functional[Ref:13]TheyareusedtostoreandbackupboththePurseandtheMultirideremainingTheseareDynamicFilesandareanti-tearThesefilesarestoredinSectors2and3,Blocks1andThesefilesdataformatisspecifiedInTable7ValueFileFormat值文件格式.文件格式如Table7:ValueFileFormat值文件格式所示。Table7ValueFileFormatField字Size大小(位Description描Remainingvalueinverted8Notused8Notused8Notused8NotusedField字Size大小(位Description描Bits(16Bytes):EndofJourneyAreaFileTheJourneyAreafilecontainsinformationforthecurrentjourney,maintainstheactivePurse,Product,ValueFileandLogFilepointersandprovidestheanti-tearmechanismforcard.旅程区文件包含当前旅程的信息,保存钱包、产品、值文件以及日志文件使用的块选择指针,提卡的制。Note:THISFILEMUSTBETHELASTFILEWRITTENTOTHECARDDURINGANYTRANSACTIONTHATUPDATESTHECARD.ThisisaDynamicFileandisanti-tearThisfileisstoredinSector4Blocks0and1.4扇区,0、1块。ThefiledataformatisspecifiedInTable8JourneyAreaFileFormat旅程区文件格式.文件格式如Table8:JourneyAreaFileFormat旅程区文件格式所示。Table8JourneyAreaFileFormatField字Size大小(位Description描4Specifiestheblockingstatusofthecardas 预留NotBlockedBlockedOtherBlockedSurrendered/Captured 预留Blocked-FaultyCard卡锁Blocked-UnissuedCard未卡锁 预留BlockedLost/StolenBlockedCardBatch 预留BlockedInactive4SpecifieswhichLogFileisnexttobeTheLogfile’slogicalBlockNumberis:21+currentLogFileisincrementedwhenaLogfileiswrittenandifitisgreaterthan8itisresetto0.Range:当一个日志文件写入后,currentLogFile18将重0。1AcycliccounterthatallowsthedevicetodeterminewhetherJourneyAreaFileAorBiscurrentlyactive.Thisisusedforanti-tearprotection.Seesection4.5.1formoreinformation.Range:一个循环计数器,允许设备决定当前哪个旅程区文件(A或B)此字段用于旅程区文件的防保护。4.5.1节。1SpecifieswhichProductwasusedforthe0=1=01定期/SpecifiesthedateandtimefromwhichtheJourneyisvalid.Updatedonthefirstlegofthecurrentpassengertrip.SpecifiedasthenumberofminutessincecardBaseDateTime(witharangeofapproximay8years).Range:规定为自cardBaseDateTime开始的分钟数(8年Specifiesthelocationatwhichtheproductwasfirstused.Setto0xFFFiflocationunspecified.Range:0xFFFSpecifiesthelocationwherethejourneyisexpectedtoend.Setto0xFFFiflocationunspecified.Range:0xFFF。8SpecifiesthedateandtimewhentheproductwaslastSpecifiedasthenumberofminutesfromstartDateTime(witharangeofapproximay254mins/4hours)自startDateTime起的分钟数表示(2544小时TotalvaluedeductedfromtheissuingProductinthewholejourney(storedvalueforpurseproducts,numberofridesformultirideproducts,notusedforperiodproducts).Range:IdentifiesthelocationatwhichtheproductwaslastRange:0...40952Specifiesthenumberofgatedtransfersthathavebeentakenforthecurrentjourney.Range:0...31SpecifieswhichProductFilewaslast0=A1=B0=A1=B1SpecifieswhichProductValueFilewaslast0=A1=B0=A1=B1SpecifieswhichPurseFilewaslast0=A1=B0=A1B1SpecifieswhichPurseValueFilewaslast0=A1=B0=A1B3SpecifiesthevalidationstatusoftheJourneyasfollows:旅程0Productnotyetused1Lastusedtocheck-in2Lastusedtocheck-out3Lastusedtocheck-outintrainmalfunctionmode上次列车4Lastusedforcompensationfarepayment5..7=预Paddingbitstomakethefiledatalength168JourneyAreaSeeSection5Checksum5ChecksumCalculationBits(16Bytes):Endof Bits UseoftheactiveStatusField动态选择字段(activeStatus)ThisfieldisusedbytheDataIntegretySchemetodeterminewhichoftheJourneyAreaFilesistobeusedforthecurrenttransaction.RefertoSection6DataIntegritySchemeforadescriptionofhowthisfieldisused.6DataIntegrityScheme,了解此字段如何使用。LAVAreaFile上次加值(LAV)TheLastAddValueArea(LAV)filecontainsinformationregardingthelastaddvalueoperationforboththePurseandtheProduct.ThisisaStaticFileandisnotanti-tearThisfileisstoredinSector4,Block2.4扇区,2块。ThefiledataformatisspecifiedInTable9:LastAddValueAreaFileFormat上次充值区文件格式如Table9LastAddValueAreaFileFormatTable9LastAddValueAreaFileFormatField字Size大小(位Description描Product8Identifiesthesystemparticipantwhohandledthelastaddvaluetransaction,relativetotheapplicationissuer.Range:0...255Theproduct’stransactionsequencenumberofthelastaddvaluetransaction.Range:0...655358ThetotalnumberofridesremainingafterthelastaddvalueRange:0...2558ThenumberofridesaddedduringthelastaddvalueRange:0...255Thedateofthelastaddvaluetransaction,specifiedasanumberdaysfromcardBaseDateTime(witharangeofapproximay11years).Range:上次加值交易的日期,规定为从cardBaseDateTime4PaddingbitstomakethethissectionendonabytePurse8Identifiesthesystemparticipantwhohandledthelastaddvaluetransaction,relativetothecardissuerRange:0...255Field字Size大小(位Description描Thepurse’stransactionsequencenumberofthelastaddvalueRange:0...65535Thedateofthelastaddvaluetransaction,specifiedasanumberdaysfromcardBaseDateTime(witharangeofapproximay11years).Range:上次加值交易的日期,规定为从cardBaseDateTimeThePursebalanceafterthelastaddvalueRange:0...1310710...131071分Paddingbitstomakethefiledatalength168LAVAreaSeeSection5Checksum5ChecksumBits(16Bytes):Endof ProductAreaTheproductareafilecontainsinformationoneitheraMultirideorPeriodproductthatcanbeusedtoenableajourneyusingthatproduct.Itholdsinformationonthetravellocations,lastaddvalueandforproductmaintenance.产品区文件包含计次或定期产品的信息,以使得旅程中可以使用该产品。这是在产品中保TheseareDynamicFilesandareanti-tearThesefilesarestoredinSector5,Blocks0andThefiledataformatisspecifiedinTable10MultirideFileandTable11PeriodMultirideFile计次文Table10MultirideFileField字Size大小(位Description描Multiride4Specifiestheblockingstatusoftheprodu 预留NotBlockedBlockedOther 预留 Blocked–BlacklistedSAM锁定– 预留BlockedBadAutoloadDebtBlockedBankAccountClosedBlockedProductOverLimit11..14预 4Incrementedeachtimeanon-repeatingactionisappliedtotheMultirideproduct.Thisisusedinconjunctionwiththeactionlistprocessingtoensurethatanactionisappliedonlyonce.Range:1Ifsetto1,theproductisalreadyIfsetto0,theproductwillbeactivatedwhenitisfirstusedforfarepayment.Whenactivatingtheproduct,validityStartDateTimewillbesettothecurrentdate/time,andthisfieldwillbesetto1.Range:激活产品时,validityStartDateTime将被设为当前日期/时间,1。1Specifieswhetheranhasbeenprinted.指定是否 notprinted未打印 Field字Size大小(位Description描Earliestdate/timeatwhichtheproductisSpecifiedasthenumberofminutessincecardBaseDateTime(witharangeofapproximay8years).Iftheproducthasnotbeenactivated,thisfieldspecifiesshelflifeoftheproduct(i.e.thelastdate/timethattheproductmaybeactivated).Whentheproductisactivated,devicescancalculatetheproducddatebasedonthevalidityDurationType,validityDurationandvalidityStartDateTime.Range:规定是自cardBaseDateTime开始的分钟数(8年)当产品激活时,设备可以基于validityDurationType,validityDuration和validityStartDateTime计算产品的结束日期Thevalidoriginlocationfortheproduct.Setto0xFFFiflocationunspecified.Range:0xFFF表示未制定位置0...4095Thevaliddestinationlocationfortheproduct.Setto0xFFFiflocationunspecified.Range:0xFFF表示未制定位置0...4095Asequencenumberthatisincrementedwhentheproductisusedorreloaded.Range:0...65535UniquelyidentifiestheSAMassociatedwiththelastaddvalueRange:SAM卡唯一标识。0...65535ThemonetaryvalueofthelastaddvalueRange:0…131071Field字Size大小(位Description描3Thepaymentmethodofthelastaddvaluetransactionas 预留 预留 2SpecifiesvalidityDurationisstoredasoneofthefollowing:指定validityDuration中数据的单位:0Minutes1Hours2Days3CalendarMonths7Thenumberofminutes/hours/days/monthsamultirideproductisvalidforonceitisactivated.Setto0ifapurseproductisissuedontothecard.Range:0。3Paddingbitstomakethefiledatalength168MultirideFileSee5Checksum5ChecksumBits16BytesEndofblock位(16字节) PeriodFile定期文Table11PeriodFileField字Size大小(位Description描Period4SpecifiestheblockingstatusoftheProdufollows:规定产 预留NotBlockedBlockedOther 预留 Blocked–BlacklistedSAM锁定– 预留BlockedBadAutoloadDebtBlockedBankAccountClosedBlockedProductOverLimit11..14预 4Incrementedeachtimeanon-repeatingactionisappliedrthePeriodproduct.ThisisusedinconjunctionwithactionlistprocessingtoensurethatanactionisappliedRange:每次执行定期产品的非重复动作时,该数字增加。与1Ifsetto1,theproductisalreadyIfsetto0,theproductwillbeactivatedwhenitisfirstusedforfarepayment.Whenactivatingtheproduct,validityStartDateTimewillbesettothecurrentdate/time,andthisfieldwillbesetto1.Range:当产品激活时,ValidityStartDateTime字段将设成当前日期/时1。1Specifieswhetheranhasbeen notprinted 票不打打Field字Size大小(位Description描Earliestdate/timeatwhichtheproductisSpecifiedasthenumberofminutessincecardBaseDateTime(witharangeofapproximay8years).Iftheproducthasnotbeenactivated,thisfieldspecifiesshelflifeoftheproduct(i.e.thelastedate/timethattheproductmaybeactivated).Whentheproductisactivated,devicescancalculatetheproducddatebasedonthevalidityDurationType,validityDurationandvalidityStartDateTime.Range

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论