版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
道路運(yùn)輸車(chē)輛衛(wèi)星定位系統(tǒng)北斗兼容車(chē)載終端通訊協(xié)議技術(shù)規(guī)范andofBD中華人民共和國(guó)交通運(yùn)輸部發(fā)布ByTheMinistryofTransportofthePeople'sRepublicofChina二〇一三年一月January,2013目 次Content前言IV1范圍12規(guī)范性引用文件1313.1術(shù)語(yǔ)和定義13.2縮略語(yǔ)24協(xié)議基礎(chǔ)34.1通信方式34.2數(shù)據(jù)類(lèi)型Datatype34.3傳輸規(guī)則34.4消息的組成35通信連接55.1連接的建立55.2連接的維持55.3連接的斷開(kāi)56消息處理5TCP和消息處理 5SMS67協(xié)議分類(lèi)67.1概述67.267.377.4信息類(lèi)協(xié)議77.5電話類(lèi)協(xié)議87.687.787.887.9999分包消息108數(shù)據(jù)格式108.1108.2108.3終端心跳108.4108.5終端注冊(cè)118.68.7終端注銷(xiāo)12IIIII8.8終端鑒權(quán)128.912181818終端控制1820202121212627272728事件設(shè)置28事件報(bào)告29提問(wèn)下發(fā)29提問(wèn)應(yīng)答3030信息點(diǎn)播/取消31信息服務(wù)31電話回?fù)?1設(shè)置電話本31車(chē)輛控制3232323434353536設(shè)置路線36刪除路線3738383838393939 4040414142424343434444444445公鑰 45公鑰 46附 錄 A(規(guī)范性附錄) 47設(shè)備 47 47 49 51附 錄 B(規(guī)范性附錄) 54Scope2 ReferencesMessagecompositionMessagestructureIdentifierHeaderCheckcodeEstablishmentMaintenanceDisconnection消息處理MessageprocessingTCP和UDP消息處理MessageprocessingforTCPandUCP平臺(tái)主發(fā)的消息MessagessentbytheplatformMessagessentbytheterminal數(shù)據(jù)通信鏈路正常Datacommunicationlinksarenormal數(shù)據(jù)通信鏈路異常DatacommunicationlinksareabnormalSMSmessagesprocessingProtocolclassificationIntroductionSet/queryterminalparameters提問(wèn)Inquiry通用數(shù)據(jù)傳輸類(lèi)Generaldatatransmission加密類(lèi)協(xié)議Encryptedprotocols分包消息Messagesubcontracting查詢終端參數(shù)Queryterminalparameters查詢指定終端參數(shù)Querydesignatedterminalparameter查詢終端參數(shù)應(yīng)答Queryterminalparametersreply8.13 終端控制Terminalcontrol8.14 查詢終端屬性Queryterminalattributes查詢終端屬性應(yīng)答Queryterminalattributesreply下發(fā)終端升級(jí)包Sendingterminalupgradepatch8.17 終端升級(jí)結(jié)果通知Noticeofterminalupdatesresults8.18 位置信息匯報(bào)Locationinformationreporting位置信息查詢Locationinformationquery位置信息查詢應(yīng)答Locationinformationqueryreply臨時(shí)位置跟蹤控制Temporarypositiontrackingcontrol8.22 人工確認(rèn)報(bào)警消息Manuallyconfirmedalarmmessages8.23 文本信息下發(fā)Textmessagessending事件設(shè)置Eventssetting8.25事件報(bào)告Eventsreporting8.26提問(wèn)下發(fā)Questionsending8.27提問(wèn)應(yīng)答Questioningreply8.28 信息點(diǎn)播菜單設(shè)置Informationondemandmenusetting信息服務(wù)Informationservices電話回?fù)蹸allback8.32 設(shè)置電話本Settingthephonebook8.33 車(chē)輛控制Vehiclecontrol8.34 車(chē)輛控制應(yīng)答Vehiclecontrolreply8.35 設(shè)置圓形區(qū)域Settingcircularareas8.36 刪除圓形區(qū)域Deletecircularareas8.37 設(shè)置矩形區(qū)域Settingrectangleareas8.38 刪除矩形區(qū)域Deleterectangularareas設(shè)置多邊形區(qū)域Settingpolygonareas刪除多邊形區(qū)域Deletepolygonareas設(shè)置路線Settingroutes刪除路線Deleteroutes8.43 行駛記錄數(shù)據(jù)采集命令Drivingrecorddatacollectioncommand行駛記錄數(shù)據(jù)上傳Drivingrecorddataupload行駛記錄參數(shù)下傳命令Drivingrecordparameterssendingcommand電子運(yùn)單上報(bào)Electronicwaybillreporting上報(bào)駕駛員身份信息請(qǐng)求Reportingthedriveridentityinformationrequest8.48 駕駛員身份信息采集上報(bào)Thecollectionandreportingofthedriveridentityinformation8.49 定位數(shù)據(jù)批量上傳Positioningdatabatchupload多媒體事件信息上傳Multimediaeventsinformationupload多媒體數(shù)據(jù)上傳Multimediadataupload多媒體數(shù)據(jù)上傳應(yīng)答Multimediadatauploadreply攝像頭立即拍攝命令Cameraimmediate
shootingcommand攝像頭立即拍攝命令應(yīng)答Cameraimmediate
shootingcommandreply8.56 存儲(chǔ)多媒體數(shù)據(jù)檢索Storageofmultimediadataretrieval8.57 存儲(chǔ)多媒體數(shù)據(jù)檢索應(yīng)答Storageofmultimediadataretrievalreply8.58 存儲(chǔ)多媒體數(shù)據(jù)上傳命令Storedmultimediadatauploadcommand8.59 錄音開(kāi)始命令Startingrecordingcommand8.60 單條存儲(chǔ)多媒體數(shù)據(jù)檢索上傳命令Singlestorageofmultimediadataretrievaluploadcommand8.61 數(shù)據(jù)下行透?jìng)鱀atadownlinkpassthrough8.62 數(shù)據(jù)上行透?jìng)鱀atauplinkpassthrough8.63 數(shù)據(jù)壓縮上報(bào)Reportingdatacompression8.64平臺(tái)公鑰PlatformRSApublickey8.65終端公鑰TerminalRSApublickey附 錄 A(規(guī)范性附錄)AppendixA(normativeappendix)
Communicationprotocolbetweenthecar-mountedterminalandperipherals
CommunicationprotocolInstructionsforgeneralprotocolsA.4專(zhuān)用協(xié)議說(shuō)明Instructionforproprietaryprotocols附 錄 B(規(guī)范性附錄)AppendixB(normativeappendix)Message
paralleltableIIIIVIVPAGEPAGE10前 言Preface本規(guī)范是對(duì)JT/T88-2《道路運(yùn)輸車(chē)輛衛(wèi)星定位系統(tǒng)終端訊協(xié)議及數(shù)據(jù)格式的補(bǔ)充和完善,與JT/T——修改了通信連接中8678的內(nèi)容;——增加了數(shù)據(jù)格式中8.4補(bǔ)傳分包求8.11詢指定終端參數(shù)8.14查詢終端屬性8.15查詢終端屬性應(yīng)答8.16下發(fā)終端級(jí)包8.17終端升級(jí)結(jié)果通知8.22人工確認(rèn)警消息8.7上報(bào)駕駛員身份信息請(qǐng)求、8.49CAN總線數(shù)據(jù)上傳、8.55攝像頭立即拍攝命令應(yīng)答0等2并對(duì)影響的章節(jié)和表格編號(hào)進(jìn)行了調(diào)整;-changedthedataformatandtheinformationintheoriginalchapter8.4terminalregister,chapter8.8settingterminalparameters,chapter8.12locationinformationreporting,chapter8.23textmessagedownload,chapter8.28settingcirclearea,chapter8.36
dataacquisitioncommandfor
drivingrecords,chapter8.37drivingrecorddataupload,chapter8.38
download
commandsfor
drivingrecords
parameters,chapter8.40reportsandcollectionofdriveridentityinformation,chapter8.41multimediaeventsdataupload,chapter8.42respondto
multimediaeventsdatauploaded,chapter8.46
storageofresponsetomultimediadataretrieval,chapter8.49datadownlinkpassthroughandchapter8.50datauplinkpassthrough;
-increases
thedataformatandtheinformationintheoriginalchapter8.4
requestforsubcontracttransmission,chapter8.11
designated
queryterminalparameters,chapter
8.14queryterminal
attributes,chapter8.15responsesto
queryterminal
attributes,chapter
8.16issuingterminalupdates,chapter8.17noticeofterminalupdatesresults,chapter8.22manualconfirmationofalarmmessages,chapter8.47reportsofdriveridentityinformationrequests,chapter8.49locating
batchuploadof
data,chapter8.50CANbusdataupload,chapter8.55responsestorequestsforpromptshootingofcamera,chapter8.60
uploadcommandsfor
singlestorageofmultimediadataretrieval,andrevisedtherelevantsectionandtablenumbers;——修改了附錄A中,表A.2外設(shè)類(lèi)型編號(hào)表、表A.3A查詢外設(shè)屬性、A.4.1IC卡認(rèn)證請(qǐng)求、A.4.2IC——修改了附錄B本規(guī)范由中華人民共和國(guó)交通運(yùn)輸部提出。本規(guī)范起草單位:中國(guó)交通通信信息中心。-revisedtableA.2.
codetableof
peripheraltypesandtable
A.3tableofcommandtypes
inappendixA;
-increased
thecommunicationprotocolof
terminalhostandperipheralsin
A.3.4queryfortheinformationofslaveversionnumber,A.3.5self-checkingofslave,A.3.6firmwareupdatesofslave,A3.7queryofperipheralsattributes,A.4.1.
authenticationrequestfor
roadtransportICcard,A.4.2noticeofreadingresultsofroadtransportICcard,A.4.3noticeof
cardremoval,A.4.4activetriggerfor
ICcardreading
inappendixA;
-changedallthecorrespondinginformationdescribedinthecomparisontablesincludedin
theappendixB.
ThisspecificationisputforwardbytheMinistryofTransportofthePeople'sRepublicofChina.
Draftedby:ChinaTransportation&TelecommunicationInformationCenter.PAGEPAGE93PAGEPAGE92andofBDScope本規(guī)范規(guī)定了道路運(yùn)輸車(chē)輛衛(wèi)星定位系統(tǒng)北斗兼容車(chē)載終端(以下簡(jiǎn)稱(chēng)終端)與監(jiān)管/監(jiān)控平(以下簡(jiǎn)稱(chēng)平臺(tái)之間的通訊協(xié)議與數(shù)據(jù)格式包括協(xié)議基礎(chǔ)通信連接消息處理、協(xié)議分類(lèi)與說(shuō)明及數(shù)據(jù)格式。本規(guī)范適用于道路運(yùn)輸車(chē)輛衛(wèi)星定位系統(tǒng)北斗兼容車(chē)載終端和平臺(tái)之間的通信。Thespecificationspecifies
thecommunicationprotocolsanddataformatsbetween
the
GNSS
system
for
operating
vehicles
BD-compatiblevehicleterminal
(hereinafterreferredtoas"theterminal")andregulatory/monitoringplatform(hereinafterreferredtoas"theplatform"),includingprotocolbasis,communicationlinks,messageprocessing,protocolclassificationanddescription,anddataformats.
Thisspecificationappliestothecommunicationbetween
GNSS
system
for
operating
vehicles
BD-compatiblevehicleterminalsandplatforms
.2 References下列文件對(duì)于本文件的應(yīng)用是必不可少的凡是注日期的引用文件僅所注日期的版本適用于本文件凡是不注日期的引用文件其最新版(包括所有的修改單適用于本文。GB/T19056 JT/T415-2006 編目編碼規(guī)則JT/T794 道路運(yùn)輸車(chē)輛衛(wèi)星定位系統(tǒng)Thefollowingdocumentsareessentialfortheapplicationhereof.Foreach
referencewithdates,onlytheversionofthatdatesasshownhereinshallapply,andfor
each
referencewithoutdates,thelatestversion
(includingallamendmentsandmodifications)shallapply.
GB/T2260AdministrativedivisioncodeofthePeople'sRepublicofChina
GB/T19056
Vehicletravellingdatarecorder
JT/T415-2006Regulationson
catalogandencodingof
roadtransporte-governmentplatformJT/T794Technicalrequirementsfor
GNSS
system
for
operating
vehiclesterminals下列術(shù)語(yǔ)和定義適用于本文件。Thefollowingtermsanddefinitionsshallapplyhereto.Wirelesscommunicationlinksaredisconnected,ortemporarilysuspendedorheld(e.g.,duringcalling).R終端向平臺(tái)發(fā)送消息告知其安裝在某一車(chē)輛上。Theterminalsendsamessagetothe
platformforthe
installmentonavehicle.終端向平臺(tái)發(fā)送消息告知從所安裝車(chē)輛拆下。Theterminalsendsamessagetothe
platformforthe
removalfromtheinstalledvehicle.終端連接上平臺(tái)時(shí)向平臺(tái)發(fā)送消息以使平臺(tái)驗(yàn)證自己身份。Theterminalsendsamessageto
theplatformuponconnectiontheretofortheverificationofitsidentitybytheplatform.定時(shí)、定距匯報(bào)或兩者結(jié)合。Reportingoftimingorlocatingorboth.根據(jù)相關(guān)條件確定周期匯報(bào)的間隔的規(guī)則。Determinerulesonintervalofperiodicreportinginaccordancewiththerelevantregulations.終端在判斷到車(chē)輛拐彎時(shí)發(fā)送位置信息匯報(bào)消息。采樣頻率不低于1Hz,汽車(chē)方位角變化率不低于15°/s,且至少持續(xù)3s以上。Theterminal,whendetectingthevehicleisTuring,wouldsendlocationinformationforreporting.
Samplingfrequencyshallbenolessthan1hz,thechangerateofcarazimuthnolessthan15°/sforatleast3s.終端自動(dòng)或手動(dòng)接聽(tīng)來(lái)電的規(guī)則。Therulesofreceivingphonecallsautomaticallybytheterminalormanually.事件項(xiàng)由平臺(tái)預(yù)設(shè)到終端由事件編碼和事件名稱(chēng)組成駕駛員在遇到相應(yīng)事件時(shí)操作終端,觸發(fā)事件報(bào)告發(fā)送到平臺(tái)。Eventitemswillbesetontheterminalbytheplatformbydefault,composedofeventscodesandnames.Whenadriveroperatesontheterminalforthoseeventsincludedtherein,itwilltriggereventreportingsenttotheplatform.3.2縮略語(yǔ)Abbreviations下列縮略語(yǔ)適用于本文件。Thefollowingabbreviationsshallapplyhereto.RSA——一種非對(duì)稱(chēng)密碼算法(由RonRivest、Adi來(lái)自三者的名字)anasymmetriccryptographicalgorithms(developedbyandnamedafterRonRivest,AdiShamirh,LenAdleman)ProtocolbasisCommunicationmode協(xié)議采用的通信方式應(yīng)符合JT/T794TCP或作為服務(wù)器端,終端作為客戶端。當(dāng)數(shù)據(jù)通信鏈路異常時(shí),終端可以采用SMS消息方式進(jìn)行通信。ThecommunicationmodeadoptedbytheprotocolshallcomplywithrelevantprovisionsoftheJT/T794,withcommunicationprotocolusingTCPorUDP,theplatformservingastheserversideandtheterminalastheclientside.Whenabnormaldatacommunicationlinksemerge,theterminalcanuseSMSmessagesforcommunication.協(xié)議消息中使用的數(shù)據(jù)類(lèi)型Datatype見(jiàn)表1:Thedatatypesusedinthemessagesoftheprotocolareasfollows:表1數(shù)據(jù)類(lèi)型Datatypedatatupes描述及要求DescriptionandrequirementsDescriptionandrequirementsBYTE無(wú)符號(hào)單字節(jié)整型(字節(jié),8位)Unsignedsingle-byteinteger(byte,8-bit)WORD無(wú)符號(hào)雙字節(jié)整型(字,16位)Unsigneddouble-byteinteger(words,16-bit)DWORD無(wú)符號(hào)四字節(jié)整型(雙字,32位)Unsignedfour-byte
integer(doubleword,32-bit)BYTE[n]n字節(jié)NBYTEBCD[n]8421碼,n字節(jié)8421code,nbytesSTRINGGBK編碼,若無(wú)數(shù)據(jù),置空GBKcoding,leaveitblankwithoutdata約定如下:最后傳遞低八位。Theprotocolusesbig-endiannetworkbyteordertotransferwordsanddoublewordsasfollows:BYTEtransferprotocol:usingBYTEstreamfortransmission;-WORDtransferprotocol:theupper8-bitfirst,thenthelower8-bit;-DWORDtransferprotocol:
theupper24-bitfirst,thentheupper16-bit,followedbytheupper8-bitandthelower8-bit.MessagecompositionMessagestructure每條消息由標(biāo)識(shí)位、消息頭、消息體和校驗(yàn)碼組成,消息結(jié)構(gòu)圖如圖1所示:Eachmessageiscomprisedbyidentifier,header,messagetextandcheckcode.Seefigure1forthemessagestructurediagram:標(biāo)識(shí)位identifier消息頭header消息體messagetext檢驗(yàn)碼checkcode標(biāo)識(shí)位identifier圖1 Figure1messagestructurediagram:Identifier采用規(guī)則定義如下:0x7e0x7d后緊跟一個(gè)0x02;0x7d0x7d后緊跟一個(gè)0x01。轉(zhuǎn)義處理過(guò)程如下:示例:發(fā)送一包內(nèi)容為0x300x7e0x7d0x550x307d0x080x7d0x010x550x7e。0x7eforpresentation,whichifshowninthecheckcode,headerormessagetext,shallbeescapedinaccordancewiththefollowingrules:
0x7e<--->0x7dfollowedby0x02;
0x7d<--->0x7dfollowedby0x01,whichshallbeescapedasfollows:
Sendingmessage:messagepacking->calculateandfillthecheckcode->escape;
Receivingmessage:escapingreduction->validationofcheckcode->analyzingthemessage.
Example:
Ifsendadatapacketof0x30x7e00x080x7d0x55,thepackagingisasfollows:00x02x7e0x307d0x080x7d0x0100x7ex55.Header消息頭內(nèi)容詳見(jiàn)表2:
Seetable2forthedetailsoftheheaders:表2Table2detailsoftheheaders起始字節(jié)Thestartingbyte字段Fields數(shù)據(jù)類(lèi)型Datatype描述及要求Descriptionandrequirements0消息IDMessageIDWORD2消息體屬性TheattributesofmessagebodyWORD消息體屬性格式結(jié)構(gòu)圖見(jiàn)圖2Seefigure2forthestructurechartofmessagebodyattributesformatSeefigure2forthestructurechartofmessagebodyattributesformat4終端手機(jī)號(hào)TerminalmobilephonenumberBCD[6]根據(jù)安裝后終端自身的手機(jī)號(hào)轉(zhuǎn)換。手機(jī)號(hào)不足12位,則在前補(bǔ)充數(shù)字,大陸手機(jī)號(hào)補(bǔ)充數(shù)字0,港澳臺(tái)則根據(jù)其區(qū)號(hào)進(jìn)行位數(shù)補(bǔ)充。Transformationshallbedoneaccordingtothemobilephonenumberattheterminalendafterinstallation.Forphonenumberlessthan12-bitdigital,add0formobilephonenumbersofmainlandChina,andadddigitsaccordingtotherelevantareacodesfornumbersofHongKongandTaiwan.10消息流水號(hào)MessageserialnumberWORD按發(fā)送順序從0開(kāi)始循環(huán)累加Cyclicaccumulation
from0shallbedonebasedonthe
delivery
order12消息包封裝項(xiàng)Packetpackagingitem如果消息體屬性中相關(guān)標(biāo)識(shí)位確定消息分包處理,則該項(xiàng)有內(nèi)容,否則無(wú)該項(xiàng)Theexistenceofthisitemdependsoniftheidentifierinthemessagebodyattributesconfirmsthesubcontractprocessingrequests.消息體屬性格式結(jié)構(gòu)圖如圖2所示:Seefigure2forthestructurechartofmessagebodyattributesformat1514131211109876543210保留retaining分包subcontracting數(shù)據(jù)加密方式Dataencryption消息體長(zhǎng)度Thelengthofthemessage圖2 消息體屬性格式結(jié)構(gòu)圖Figure2Structurechartofmessagebodyattributesformat數(shù)據(jù)加密方式:Dataencryption——bit10~bit12為數(shù)據(jù)加密標(biāo)識(shí)位;bit10~bit12areidentifiersfordataencryption;——當(dāng)此三位都為0,表示消息體不加密;-whenallthethreeare0,itmeansthatthemessagebodyisnotencrypted;—當(dāng)?shù)?0位為1,表示消息體經(jīng)過(guò)RSA算法加密;-whenthe10this1,itmeansthatthemessagebodysencryptedbyRSAalgorithm;——其他保留。-othersarereserved.分包:subcontracting當(dāng)消息體屬性中第13位為1時(shí)表示消息體為長(zhǎng)消息,進(jìn)行分包發(fā)送處理,具體分包信息由消息包封裝項(xiàng)決定;若第13位為0,則消息頭中無(wú)消息包封裝項(xiàng)字段Fields。消息包封裝項(xiàng)內(nèi)容見(jiàn)表3:When
the13thintheattributesofmessagebodyis1,itmeansthatthemessagebodyisalongmessage,whosesubcontractedinformationshallbedeterminedbythedatapackageencapsulationitemsduringsendingprocessing;Ifthe13this0,itmeansthereisnodatapackageencapsulationfieldsintheheaders.Messagedatapackageencapsulationitemsareshowninthetable3:表3消息包封裝項(xiàng)內(nèi)容Table3Messagedatapackageencapsulationitems起始字節(jié)Thestartingbyte字段Fields數(shù)據(jù)類(lèi)型Datatype描述及要求Descriptionandrequirements0消息總包數(shù)ThetotalnumberofpacketsWORD該消息分包后的總包數(shù)Thetotalnumberofpacketsaftersubcontracting2包序號(hào)PacketserialnumberWORD從1開(kāi)始Startingfrom1校驗(yàn)碼Checkcode校驗(yàn)碼指從消息頭開(kāi)始,同后一字節(jié)異或,直到校驗(yàn)碼前一個(gè)字節(jié),占用一個(gè)字節(jié)。Checkcodereferstotheonesinglebytefromthemessageheadertothefollowingbyteor,tothebytebeforethecheckcode.通信連接Communicationlinks連接的建立Establishment終端與平臺(tái)的數(shù)據(jù)日常連接可采用TCP或UDP方式,終端復(fù)位后應(yīng)盡快與平臺(tái)建立連接,連接建立后立即向平臺(tái)發(fā)送終端鑒權(quán)消息進(jìn)行鑒權(quán)。TCPorUDPshallbeusedfor
dailylinksbetweentheterminalanddata.Theterminalshouldbeconnectedtotheplatformassoonaspossibleuponreset,afterwhichterminalauthenticationmessagesshallbesenttotheplatformforauthentication.連接的維持Maintenance連接建立和終端鑒權(quán)成功后,在沒(méi)有正常數(shù)據(jù)包傳輸?shù)那闆r下,終端應(yīng)周期性向平臺(tái)發(fā)送終端心跳消息,平臺(tái)收到后向終端發(fā)送平臺(tái)通用應(yīng)答消息,發(fā)送周期由終端參數(shù)指定。Aftertheestablishmentofthelinksandupontheterminalauthentication,intheabsenceofnormaldatapackets,terminalshould
sendterminalheartbeatmessages
periodicallytotheplatform,whichshallreplywithgeneralresponsemessagesafterreceivingthemessagewithafrequencyspecifiedbytheterminalparameters.連接的斷開(kāi)Disconnection平臺(tái)和終端均可根據(jù)TCP協(xié)議主動(dòng)斷開(kāi)連接,雙方都應(yīng)主動(dòng)判斷TCP連接是否斷開(kāi)。平臺(tái)判斷TCP連接斷開(kāi)的方法:——根據(jù)TCP協(xié)議判斷出終端主動(dòng)斷開(kāi);——相同身份的終端建立新連接,表明原連接已斷開(kāi);——在一定的時(shí)間內(nèi)未收到終端發(fā)出的消息,如終端心跳。終端判斷TCP連接斷開(kāi)的方法:——根據(jù)TCP協(xié)議判斷出平臺(tái)主動(dòng)斷開(kāi);——數(shù)據(jù)通信鏈路斷開(kāi);——數(shù)據(jù)通信鏈路正常,達(dá)到重傳次數(shù)后仍未收到應(yīng)答。EithertheplatformortheterminalcandisconnectthelinksbasedonTCPprotocolandbothsidesshouldtaketheinitiativetodeterminewhetheraTCPconnectionisdisconnected.TheplatformcanusethefollowingwaysforTCPdisconnection:
--identifiesdisconnectioninitiatedbytheterminalbasedonTCPprotocol;
-anewconnectionisestablishedforthesameterminal,whichindicatesthattheoriginalconnectionhasbeendisconnected;
-hadnotreceivedmessagesfromtheterminalfor
acertainperiod,suchasterminalheartbeat.TheterminalcanusethefollowingwaysforTCPdisconnection:
-identifiesdisconnectioninitiatedbytheplatform
basedonTCPprotocol;
-datacommunicationslinksdisconnected;
-datacommunicationlinksarenormal,withnoreplyevenafterreachingtherequiredretransmissiontimes.消息處理MessageprocessingTCP和UDP消息處理MessageprocessingforTCPandUCP平臺(tái)主發(fā)的消息Messagessentbytheplatform所有平臺(tái)主發(fā)的消息均要求終端應(yīng)答,應(yīng)答分為通用應(yīng)答和專(zhuān)門(mén)應(yīng)答,由各具體功能協(xié)議決定。發(fā)送方等待應(yīng)答超時(shí)后,應(yīng)對(duì)消息進(jìn)行重發(fā)。應(yīng)答超時(shí)時(shí)間和重傳次數(shù)由平臺(tái)參數(shù)指定,每次重傳后的應(yīng)答超時(shí)時(shí)間的計(jì)算公式見(jiàn)式(1):Allmessagessentbytheplatformshallberepliedbytheterminalandtheresponsescanbedividedintogeneralresponseandspecificresponse,determinedbyeachproprietaryprotocols.Thesendershall
resendthemessage
afteratimeoutforaresponse.Responsetimeoutandretransmissiontimesshallbedeterminedbyparametersspecifiedbytheplatform.Seethefollowingformula(1)foreachtimeoutperiodafterretransmission:TN+1=TN×(N+1) …………(1)式中:amongwhichTN+1——每次重傳后的應(yīng)答超時(shí)時(shí)間;TN——前一次的應(yīng)答超時(shí)時(shí)間;N——重傳次數(shù)。TN+1-timeoutofeachresponseafterretransmission;TN—timeoutofpreviousresponse;N-retransmissiontimes.終端主發(fā)的消息Messagessentbytheterminal數(shù)據(jù)通信鏈路正常Datacommunicationlinksarenormal數(shù)據(jù)通信鏈路正常時(shí),所有終端主發(fā)的消息均要求平臺(tái)應(yīng)答,應(yīng)答分為通用應(yīng)答和專(zhuān)門(mén)應(yīng)答,由各具體功能協(xié)議決定。終端等待應(yīng)答超時(shí)后,應(yīng)對(duì)消息進(jìn)行重發(fā)。應(yīng)答超時(shí)時(shí)間和重傳次數(shù)由終端參數(shù)指定,每次重傳后的應(yīng)答超時(shí)時(shí)間按式(1)進(jìn)行計(jì)算。對(duì)于終端發(fā)送的關(guān)鍵報(bào)警消息,若達(dá)到重傳次數(shù)后仍未收到應(yīng)答,則應(yīng)對(duì)其進(jìn)行保存。以后在發(fā)送其它消息前要先發(fā)送保存的關(guān)鍵報(bào)警消息。Whendatacommunicationlinksarenormal,all
messagessentbytheterminalshallberepliedbytheplatformandtheresponsescanbedividedintogeneralresponseandspecificresponse,determinedbyeachproprietaryprotocols.Theterminalshall
resendthemessage
afteratimeoutforaresponse.Responsetimeoutandretransmissiontimesshallbedeterminedbyparametersspecifiedbytheterminal.Seethefollowingformula(1)foreachtimeoutperiodafterretransmission.Foranykeyalarmmessagessentbytheterminal,ifnoresponseisreceivedafterreachingthespecifiedretransmissiontimes,itshallbesaved,recordedandsentbeforesendinganyothermessagesinthefuture.數(shù)據(jù)通信鏈路異常Datacommunicationlinksareabnormal數(shù)據(jù)通信鏈路異常時(shí),終端應(yīng)對(duì)需發(fā)送的位置信息匯報(bào)消息進(jìn)行保存。在數(shù)據(jù)通信鏈路恢復(fù)正常后,立即發(fā)送保存的消息。Whendatacommunicationlinksareabnormal,theterminalshallsaveandrecordalllocationinformationreportingmessagestobesentandshallsendtherecordedmessagesimmediatelyafterthe
datacommunicationlinksturnnormal.SMS消息處理SMSmessagesprocessing終端通信方式切換為GSM網(wǎng)絡(luò)的SMS消息方式時(shí),采用PDU八位編碼方式,對(duì)于長(zhǎng)度超過(guò)140字節(jié)的消息,應(yīng)按照GSM網(wǎng)絡(luò)的短信服務(wù)規(guī)范GSM03.40進(jìn)行分包處理。SMS消息的應(yīng)答、重傳和保存機(jī)制同6.1,但應(yīng)答超時(shí)時(shí)間及重傳次數(shù)應(yīng)按照表10中參數(shù)ID0x0006及0x0007的相關(guān)設(shè)定值處理。WhentheterminalcommunicationmodeswitchestoGSMnetworkSMSmessage,PDUeight-bitencodingshallbeusedandforanymessagelongerthan140bytes,itshallbesubcontractedasrequiredbytheGSMnetwork
shortmessageservice
standardsGSM03.40.Seesection6.1forSMSmessageresponse,saveandretransmission,buttheresponsetimeoutandretransmissiontimesshouldbedeterminedinaccordancewiththeparametersID0x0006and0x0007setdata
listed
intable10.協(xié)議分類(lèi)Protocolclassification概述Introduction以下按功能分類(lèi)對(duì)協(xié)議進(jìn)行描述。無(wú)特別指明,缺省采用TCP通信方式。車(chē)載終端與外接設(shè)備通訊協(xié)議見(jiàn)附錄A。協(xié)議中消息名稱(chēng)與消息ID的消息對(duì)照表見(jiàn)附錄B。Thefollowingdescriptionofprotocolareclassifiedbyfunction.Unlessotherwise
specified,thedefaultshalluseTCPascommunicationmode.
SeeAppendixAfor
car-mountedterminalandexternaldevicecommunicationprotocol.
SeeAppendixBforthecomparisontableof
messagenamesandmessageIDusedin
theprotocol.終端管理類(lèi)協(xié)議Protocolforterminalmanagement7.2.1 終端注冊(cè)/注銷(xiāo)Terminal
login/logout終端在未注冊(cè)狀態(tài)下,應(yīng)首先進(jìn)行注冊(cè),注冊(cè)成功后終端將獲得鑒權(quán)碼并進(jìn)行保存,鑒權(quán)碼在終端登錄時(shí)使用。車(chē)輛需要拆除或更換終端前,終端應(yīng)該執(zhí)行注銷(xiāo)操作,取消終端和車(chē)輛的對(duì)應(yīng)關(guān)系。終端若選擇通過(guò)SMS方式發(fā)送終端注冊(cè)和終端注銷(xiāo)消息,平臺(tái)應(yīng)通過(guò)SMS方式發(fā)送終端注冊(cè)應(yīng)答對(duì)終端注冊(cè)進(jìn)行回復(fù),通過(guò)SMS方式發(fā)送平臺(tái)通用應(yīng)答對(duì)終端注銷(xiāo)進(jìn)行回復(fù)。Theterminal,ifnotregistered,shallregisterfirst,thensavetheauthenticationcodereceivedfortheloginbytheterminalinthefuture.Whentheterminalonthevehicle
needtoberemovedorreplaced,theterminalcancelshallperformlogoutoperationtodisconnecttheterminalandthevehicle.IftheterminalusesSMSforitsloginandlogoutmessages,theplatformshallreplytotheterminalregistermessageswithterminalregistrationreplyandtotheterminallogoutmessageswiththeplatformgeneralresponseviaSMS.7.2.2 終端鑒權(quán)Terminalauthentication終端注冊(cè)后每次在與平臺(tái)建立連接后,應(yīng)立即進(jìn)行鑒權(quán)。鑒權(quán)成功前終端不得發(fā)送其它消息。終端通過(guò)發(fā)送終端鑒權(quán)消息進(jìn)行鑒權(quán),平臺(tái)回復(fù)平臺(tái)通用應(yīng)答消息。Upon
registration,the
terminal
shallimmediatelyconductauthenticationwheneverconnectedto
theplatform.
Theterminalsshallnotsendothermessagesbeforetheauthenticationiscompleted.Theterminalwillsendterminalauthenticationmessagesforauthentication,whichshallberepliedbytheplatformwithplatformgeneralreplymessages.7.2.3 設(shè)置/查詢終端參數(shù)Set/queryterminalparameters平臺(tái)通過(guò)發(fā)送設(shè)置終端參數(shù)消息設(shè)置終端參數(shù),終端回復(fù)終端通用應(yīng)答消息。平臺(tái)通過(guò)發(fā)送查詢終端參數(shù)消息查詢終端參數(shù),終端回復(fù)查詢終端參數(shù)應(yīng)答消息。不同網(wǎng)絡(luò)制式下的終端應(yīng)支持各自網(wǎng)絡(luò)的一些特有參數(shù)。Theplatformwillsendsettingsterminalparametersmessagestosettheterminalparameters,whichshallberepliedbytheterminalwithterminalgeneralreplymessages.The
platformwillinquireterminalparametersbysendingterminalparametersquerymessages,
whichshallberepliedbytheterminalwithquery
terminalparametersreplymessages.Theterminalsunderdifferentnetworksystemsshallsupportthespecificparametersusedintheirnetworks.7.2.4 終端控制Terminalcontrol平臺(tái)通過(guò)發(fā)送終端控制消息對(duì)終端進(jìn)行控制,終端回復(fù)終端通用應(yīng)答消息。Theplatformwillsendterminalcontrolmessagesforterminalcontrol,whichshallberepliedbytheterminalwithterminalgeneralreplymessages.7.3 位置、報(bào)警類(lèi)協(xié)議Protocolsforpositionandalarm7.3.1 位置信息匯報(bào)Reportinglocationinformation終端根據(jù)參數(shù)設(shè)定周期性發(fā)送位置信息匯報(bào)消息。根據(jù)參數(shù)控制,終端在判斷到車(chē)輛拐彎時(shí)可發(fā)送位置信息匯報(bào)消息。Theterminalwillsend
periodicallylocationinformationtoreportnews
assetbytheparameters.
Accordingtotheparametercontrol,theterminalcould
sendlocationinformationforreportingwhendetectingthecarsareatturns.7.3.2 位置信息查詢Locationinformationsearch平臺(tái)通過(guò)發(fā)送位置信息查詢消息,查詢指定車(chē)載終端當(dāng)時(shí)位置信息,終端回復(fù)位置信息查詢應(yīng)答消息。Theplatformwillsend
locationinformationquery
messagesfor
specifiedcarterminallocationinformationatthetime,whichshallberepliedbytheterminalwithlocation
informationqueryreplymessage.7.3.3 臨時(shí)位置跟蹤控制Temporarypositiontrackingcontrol平臺(tái)通過(guò)發(fā)送臨時(shí)位置跟蹤控制消息啟動(dòng)/停止位置跟蹤,位置跟蹤要求終端停止之前的周期匯報(bào),按消息指定時(shí)間間隔進(jìn)行匯報(bào)。終端回復(fù)終端通用應(yīng)答消息。Theplatformwillsend
temporarypositiontrackingcontrol
messagesto
start/stoplocationtracking.Theperiodicalreportsrequiredbypositiontracking
beforetheterminalstopsshallbesentatthespecifiedinterval.Theterminalshallreplywithterminalgeneralreplymessage.7.3.4 終端報(bào)警Terminalalarm終端判斷滿足報(bào)警條件時(shí)發(fā)送位置信息匯報(bào)消息,在位置匯報(bào)消息中設(shè)置相應(yīng)的報(bào)警標(biāo)志,平臺(tái)可通過(guò)回復(fù)平臺(tái)通用應(yīng)答消息進(jìn)行報(bào)警處理。各報(bào)警類(lèi)型見(jiàn)位置信息匯報(bào)消息體中的描述。報(bào)警標(biāo)志維持至報(bào)警條件解除的報(bào)警,在報(bào)警條件解除后應(yīng)立即發(fā)送位置信息匯報(bào)消息,清除相應(yīng)的報(bào)警標(biāo)志。Theterminalwill
sendlocationinformationforreportingwhenidentifyingspecified
alarmconditions,duringwhichthecorrespondingwarningsignswillbesetup.Theplatformcan
conductalarmprocessingbyreplyingwith
theplatformgeneral
replymessages.Forvariousalarmtypes,seelocationinformationdescribedinthemessagebody.Foralarmswithpersistentwarningsignsuntiltheremovalofalarm,
locationinformationshallbesentforreporting
immediatelyafter
thealarmisdisarmed,and
thecorrespondingwarningsignsshallberemovedaccordingly.7.4 信息類(lèi)協(xié)議Protocolsformessages7.4.1 文本信息下發(fā)Textinformationdelivery平臺(tái)通過(guò)發(fā)送文本信息下發(fā)消息,按指定方式通知駕駛員。終端回復(fù)終端通用應(yīng)答消息。Theplatformwillsend
textmessagedeliverymessagestoinformthedriverinaspecifiedway,whichshallberepliedbytheterminalwithterminalgeneralreplymessages.7.4.2 事件設(shè)置及報(bào)告Eventssettingandreporting平臺(tái)通過(guò)發(fā)送事件設(shè)置消息,將事件列表發(fā)到終端存儲(chǔ),駕駛員在遇到相應(yīng)事件后可進(jìn)入事件列表界面進(jìn)行選擇,選擇后終端向平臺(tái)發(fā)出事件報(bào)告消息。事件設(shè)置消息,需要終端回復(fù)終端通用應(yīng)答消息。事件報(bào)告消息,需要平臺(tái)回復(fù)平臺(tái)通用應(yīng)答消息。Theplatformwillsendeventssettingmessagestosendtheeventlisttotheterminalforrecording,whichcouldbeusedbythedriverwhenencounteringsuchevents,afterwhichtheterminalshallsendeventsreportingmessagestotheplatform.Eventssettingmessagesshallberepliedbytheterminalwithterminalgeneralreplymessages.Eventsreportingmessagesshallberepliedbytheplatformwith
platformgeneralreplymessages.提問(wèn)Inquiry平臺(tái)通過(guò)發(fā)送提問(wèn)下發(fā)消息,將帶有候選答案的提問(wèn)發(fā)到終端,終端立即顯示,駕駛員選擇后終端向平臺(tái)發(fā)出提問(wèn)應(yīng)答消息。提問(wèn)下發(fā)消息,需要終端回復(fù)終端通用應(yīng)答消息。Theplatformwillsendinquirieswith
candidateanswers
totheterminal
bysendingquestionsdeliverymessages,whichwillbedisplayedontheterminalimmediately,andtheterminalwillsend
questionreplymessagestotheplatform
afterthedrivermakesaselection.Questionsdeliverymessagesshallberepliedbytheterminalwithterminalgeneralreplymessages.信息點(diǎn)播Informationondemand平臺(tái)通過(guò)發(fā)送信息點(diǎn)播菜單設(shè)置消息,將信息點(diǎn)播項(xiàng)列表發(fā)到終端存儲(chǔ),駕駛員可以通過(guò)菜單選擇點(diǎn)播/取消相應(yīng)的信息服務(wù),選擇后終端向平臺(tái)發(fā)出信息點(diǎn)播/取消消息。信息服務(wù)被點(diǎn)播后,將定期收到來(lái)自平臺(tái)的信息服務(wù)消息,如新聞、天氣預(yù)報(bào)等。信息點(diǎn)播菜單設(shè)置消息,需要終端回復(fù)終端通用應(yīng)答消息。信息點(diǎn)播/取消消息,需要平臺(tái)回復(fù)平臺(tái)通用應(yīng)答消息。信息服務(wù)消息,需要終端回復(fù)終端通用應(yīng)答消息。Theplatformwillsend
informationondemanditemlisttotheterminalforrecordingbysendingIODmenusettingmessages,
throughwhichthedrivercould
demand/cancelthecorrespondinginformationservices,afterwhichtheterminalwillsendamessagestotheplatformforthatrequest.Wheninformationserviceisondemand,regularmessages
ofinformationservices
fromplatformwillbereceived,suchasnews,weatherreports,etc.
Informationselectionmenusettingmessagesshallberepliedbytheterminalwithterminalgeneralreplymessages.
Informationondemand/cancelmessagesshallberepliedbytheplatformwithplatformgeneralreplymessages.
Informationservicemessagesshallberepliedbytheterminalwithterminalgeneralreplymessages.7.5 電話類(lèi)協(xié)議Protocolsforphonecalls電話回?fù)蹸allback平臺(tái)通過(guò)發(fā)送電話回?fù)芟?,要求終端按指定的電話號(hào)碼回?fù)茈娫?,并指定是否按監(jiān)聽(tīng)方式(終端不打開(kāi)揚(yáng)聲器)。Theplatformwillrequesttheterminaltodialbackaspecificphonenumber
andspecifytheansweringmode(suchasnotopentheterminalspeaker)
bysendingcallbackmessages.電話回?fù)芟?,需要終端回復(fù)終端通用應(yīng)答消息。Callbackmessagesshallberepliedbytheterminalwithterminalgeneralreplymessages.設(shè)置電話本Settingthephonebook平臺(tái)通過(guò)發(fā)送設(shè)置電話本消息,對(duì)終端設(shè)置電話本,該消息需要終端回復(fù)終端通用應(yīng)答消息。Theplatformwillsetthephonebookontheterminalbysendingsettingthephonebookmessages,whichshallberepliedbytheterminalwithterminalgeneralreplymessages.7.6 車(chē)輛控制類(lèi)協(xié)議Vehiclecontrolprotocols平臺(tái)通過(guò)發(fā)送車(chē)輛控制消息,要求終端按指定的操作對(duì)車(chē)輛進(jìn)行控制。終端收到后立即回復(fù)終端通用應(yīng)答消息。之后終端對(duì)車(chē)輛進(jìn)行控制,根據(jù)結(jié)果再回復(fù)車(chē)輛控制應(yīng)答消息。Theplatformwillrequesttheterminaltocontrolthevehicleswithrequiredoperationsbysendingvehiclecontrolmessages.Theterminalshallreplyimmediatelyafterreceivingwithterminalgeneralreplymessagesandreplyagain
with
vehiclecontrolreplymessages
accordingtotheresultsofvehiclecontrol.7.7 車(chē)輛管理類(lèi)協(xié)議Vehiclemanagementprotocols平臺(tái)通過(guò)發(fā)送設(shè)置圓型區(qū)域、設(shè)置矩形區(qū)域、設(shè)置多邊形區(qū)域、設(shè)置路線等消息,對(duì)終端進(jìn)行區(qū)域和線路設(shè)置。終端根據(jù)區(qū)域和線路屬性判斷是否滿足報(bào)警條件,報(bào)警包括超速報(bào)警、進(jìn)出區(qū)域/路線報(bào)警和路段行駛時(shí)間不足/過(guò)長(zhǎng)報(bào)警,應(yīng)在位置信息匯報(bào)消息中包含相應(yīng)的位置附加信息。Theplatformwillsetuproutesandareasontheterminalbysendingroundareas,rectangularareas,polygonareasandroutessettingmessages.Theterminalshalldetermineifthe
alarmconditionsaremeet
accordingtotheareaandrouteattributesandshallincludetheadditional
correspondingpositioninformationin
thelocationinformation
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 煤礦機(jī)電設(shè)備管理系統(tǒng)技術(shù)方案
- 績(jī)效發(fā)展咨詢服務(wù)
- 展會(huì)服務(wù)合同范本在線看
- 拼花地板購(gòu)銷(xiāo)合同樣本
- 個(gè)人工作承諾
- 社區(qū)安寧餐飲業(yè)靜音承諾
- 馬戲團(tuán)表演安全保障服務(wù)協(xié)議
- 終止協(xié)議合同的操作
- 版評(píng)審表采購(gòu)合同
- 機(jī)電工程招標(biāo)文件解讀與指導(dǎo)
- 公共廣播系統(tǒng)施工與方案
- 2024年個(gè)人信用報(bào)告(個(gè)人簡(jiǎn)版)樣本(帶水印-可編輯)
- 硒鼓回收處理方案
- 書(shū)法創(chuàng)作與欣賞智慧樹(shù)知到期末考試答案章節(jié)答案2024年華僑大學(xué)
- 經(jīng)典導(dǎo)讀與欣賞-知到答案、智慧樹(shù)答案
- 悉尼歌劇院-建筑技術(shù)分析
- 肺結(jié)核病防治知識(shí)宣傳培訓(xùn)
- 三切口食管癌手術(shù)步驟
- 食品安全與衛(wèi)生智慧樹(shù)知到期末考試答案2024年
- 高三一模作文“文學(xué)不是我生命中的唯一”導(dǎo)寫(xiě)
- (2024年)功能醫(yī)學(xué)與健康管理
評(píng)論
0/150
提交評(píng)論