define.h 200 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243
  1. #ifndef DEFINE_H_
  2. #define DEFINE_H_
  3. /**************************************************************************************/
  4. /*********************************NAND Flash mapping *****************************/
  5. /**************************************************************************************/
  6. /*
  7. sector size 512 KiB
  8. Page size 4096 b
  9. OOB size 224 b
  10. Erase size 524288 b
  11. -------------------------------------------------------------------------------------------------------------------------------
  12. Segment Physical address Size
  13. -------------------------------------------------------------------------------------------------------------------------------
  14. MLO 0x00000000-0x0007FFFF 512 KB
  15. Primary u-boot 0x00080000-0x0017FFFF 1 MB
  16. Environment 0x00180000-0x001FFFFF 512 KB
  17. Secondary u-boot 0x00200000-0x002FFFFF 1 MB
  18. Primary dtb 0x00300000-0x0037FFFF 512 KB
  19. Secondary dtb 0x00380000-0x003FFFFF 512 KB
  20. Primary kernel 0x00400000-0x00DFFFFF 10 MB
  21. Secondary Kernel 0x00E00000-0x017FFFFF 10 MB
  22. Primary root file system 0x03000000-0x05FFFFFF 48 MB
  23. Secondary root file system 0x06000000-0x08FFFFFF 48 MB
  24. Primary user configuration 0x09000000-0x095FFFFF 6 MB
  25. Secondary user configuration 0x09600000-0x09BFFFFF 6 MB
  26. Factory default configuration 0x09C00000-0x0A1FFFFF 6 MB
  27. Storage 0x0A200000-0x7FFFFFFF 1886 MB
  28. */
  29. /**************************************************************************************/
  30. /*********************************System Limitation**********************************/
  31. /**************************************************************************************/
  32. /*Rating outout power and current*/
  33. #define RATED_POWER 25 //kW
  34. #define RATED_CURRENT 350 //Amp, it depend on the capacity of charging connector
  35. /*relevant to Quantity */
  36. #ifdef AWRegular
  37. #define MAX_PSU_QUANTITY 62
  38. #define CHAdeMO_QUANTITY 1
  39. #define CCS_QUANTITY 1
  40. #define GB_QUANTITY 0
  41. #define AC_QUANTITY 1
  42. #define PSU_QUANTITY 2
  43. #define ONE_CONNECTOR_USE 0
  44. #elif BYTONGB
  45. #define MAX_PSU_QUANTITY 62
  46. #define CHAdeMO_QUANTITY 1
  47. #define CCS_QUANTITY 1
  48. #define GB_QUANTITY 0
  49. #define AC_QUANTITY 1
  50. #define PSU_QUANTITY 2
  51. #define ONE_CONNECTOR_USE 0
  52. #elif DW30
  53. #define MAX_PSU_QUANTITY 62
  54. #define CHAdeMO_QUANTITY 0
  55. #define CCS_QUANTITY 1
  56. #define GB_QUANTITY 0
  57. #define AC_QUANTITY 0
  58. #define PSU_QUANTITY 2
  59. #define ONE_CONNECTOR_USE 0
  60. #elif DM30
  61. #define MAX_PSU_QUANTITY 62
  62. #define CHAdeMO_QUANTITY 0
  63. #define CCS_QUANTITY 1
  64. #define GB_QUANTITY 0
  65. #define AC_QUANTITY 0
  66. #define PSU_QUANTITY 2
  67. #define ONE_CONNECTOR_USE 0
  68. #elif DS60120
  69. #define MAX_PSU_QUANTITY 62
  70. #define CHAdeMO_QUANTITY 1
  71. #define CCS_QUANTITY 1
  72. #define GB_QUANTITY 0
  73. #define AC_QUANTITY 0
  74. #define PSU_QUANTITY 2
  75. #define ONE_CONNECTOR_USE 0
  76. #elif DS60210
  77. #define MAX_PSU_QUANTITY 62
  78. #define CHAdeMO_QUANTITY 1
  79. #define CCS_QUANTITY 1
  80. #define GB_QUANTITY 0
  81. #define AC_QUANTITY 0
  82. #define PSU_QUANTITY 2
  83. #define ONE_CONNECTOR_USE 0
  84. #elif PlugIt360
  85. #define MAX_PSU_QUANTITY 62
  86. #define CHAdeMO_QUANTITY 0
  87. #define CCS_QUANTITY 1
  88. #define GB_QUANTITY 0
  89. #define AC_QUANTITY 0
  90. #define PSU_QUANTITY 2
  91. #define ONE_CONNECTOR_USE 0
  92. #else
  93. #define MAX_PSU_QUANTITY 62
  94. #define CHAdeMO_QUANTITY 1
  95. #define CCS_QUANTITY 1
  96. #define GB_QUANTITY 0
  97. #define AC_QUANTITY 1
  98. #define PSU_QUANTITY 2
  99. #define ONE_CONNECTOR_USE 0
  100. #endif
  101. /*SystemLog message*/
  102. #define SystemLogMessage //for debug info save to log file
  103. #define ConsloePrintLog //for debug info print to console
  104. /**************************************************************************************/
  105. /*****************************share memory key information*****************************/
  106. /**************************************************************************************/
  107. #define ShmSysConfigAndInfoKey 1001
  108. #define ShmPsuKey 1002
  109. #define ShmCHAdeMOCommKey 1003
  110. #define ShmCcsCommKey 1004
  111. #define ShmStatusCodeKey 1005
  112. #define ShmPrimaryMcuKey 1006
  113. #define ShmFanBdKey 1007
  114. #define ShmRelayBdKey 1008
  115. #define ShmOcppModuleKey 1009
  116. #define ShmGBTCommKey 1010
  117. #define ShmLedBdKey 1011
  118. #define ShmATEKey 1020
  119. /**************************************************************************************/
  120. /****************** Share memory configuration value constant define ******************/
  121. /**************************************************************************************/
  122. enum SYSTEM_STATUS
  123. {
  124. SYS_MODE_BOOTING = 0,
  125. SYS_MODE_IDLE = 1,
  126. SYS_MODE_AUTHORIZING = 2,
  127. SYS_MODE_MODE_REASSIGN_CHECK = 3,
  128. SYS_MODE_REASSIGN = 4,
  129. SYS_MODE_PREPARING = 5,
  130. SYS_MODE_PREPARE_FOR_EV = 6,
  131. SYS_MODE_PREPARE_FOR_EVSE = 7,
  132. SYS_MODE_CHARGING = 8,
  133. SYS_MODE_TERMINATING = 9,
  134. SYS_MODE_COMPLETE = 10,
  135. SYS_MODE_ALARM = 11,
  136. SYS_MODE_FAULT = 12,
  137. SYS_MODE_RESERVATION = 13,
  138. SYS_MODE_BOOKING = 14,
  139. SYS_MODE_MAINTAIN = 15,
  140. SYS_MODE_DEBUG = 16,
  141. SYS_MODE_CCS_PRECHARGE_STEP0 = 17,
  142. SYS_MODE_CCS_PRECHARGE_STEP1 = 18,
  143. SYS_MODE_UPDATE = 19
  144. };
  145. enum AUTHORIZATION_MODE
  146. {
  147. AUTH_MODE_ENABLE = 0,
  148. AUTH_MODE_DISABLE = 1
  149. };
  150. enum LCD_LANGUAGE
  151. {
  152. LCD_LANG_ENGLISH = 0,
  153. LCD_LANG_CHT = 1,
  154. LCD_LANG_CHS = 2,
  155. LCD_LANG_JAPANESE = 3,
  156. LCD_LANG_FRENCH = 4,
  157. LCD_LANG_ITALIAN = 5,
  158. LCD_LANG_SPANISH = 6,
  159. LCD_LANG_GERMAN = 7,
  160. LCD_LANG_DUTCH = 8,
  161. LCD_LANG_NORWEGIAN = 9,
  162. LCD_LANG_FINNISH = 10,
  163. LCD_LANG_SWEDISH = 11,
  164. LCD_LANG_SLOVENIAN = 12,
  165. LCD_LANG_THAI = 13,
  166. };
  167. enum RFID_ENDIAN
  168. {
  169. RFID_ENDIAN_LITTLE = 0,
  170. RFID_ENDIAN_BIG = 1
  171. };
  172. enum PHASE_LOSS_POLICY
  173. {
  174. LOSS_POLICY_CHARGING = 0,
  175. LOSS_POLICY_STOP = 1
  176. };
  177. enum CCS_AUTHPRIZATION_MODE
  178. {
  179. CCS_AUTH_MODE_EIM = 0,
  180. CCS_AUTH_MODE_MIXED = 1
  181. };
  182. enum OFF_LINE_POLICY
  183. {
  184. OFF_POLICY_LOCALLIST = 0,
  185. OFF_POLICY_PH_RFID = 1,
  186. OFF_POLICY_FREE = 2,
  187. OFF_POLICY_NOCHARGE = 3
  188. };
  189. /*Configuration enum*/
  190. enum CoreProfile {
  191. AllowOfflineTxForUnknownId=0,
  192. AuthorizationCacheEnabled,
  193. AuthorizeRemoteTxRequests,
  194. BlinkRepeat,
  195. ClockAlignedDataInterval,
  196. ConnectionTimeOut,
  197. GetConfigurationMaxKeys,
  198. HeartbeatInterval,
  199. LightIntensity,
  200. LocalAuthorizeOffline,
  201. LocalPreAuthorize,
  202. MaxEnergyOnInvalidId,
  203. MeterValuesAlignedData,
  204. MeterValuesAlignedDataMaxLength,
  205. MeterValuesSampledData,
  206. MeterValuesSampledDataMaxLength,
  207. MeterValueSampleInterval,
  208. MinimumStatusDuration,
  209. NumberOfConnectors,
  210. ResetRetries,
  211. ConnectorPhaseRotation,
  212. ConnectorPhaseRotationMaxLength,
  213. StopTransactionOnEVSideDisconnect,
  214. StopTransactionOnInvalidId,
  215. StopTxnAlignedData,
  216. StopTxnAlignedDataMaxLength,
  217. StopTxnSampledData,
  218. StopTxnSampledDataMaxLength,
  219. SupportedFeatureProfiles,
  220. SupportedFeatureProfilesMaxLength,
  221. TransactionMessageAttempts,
  222. TransactionMessageRetryInterval,
  223. UnlockConnectorOnEVSideDisconnect,
  224. WebSocketPingInterval,
  225. QueueOffLineStartTransactionMessage,
  226. _CoreProfile_CNT
  227. };
  228. /**************************************************************************************/
  229. /****structure SysConfigData => shall store the data to NAND flash****************/
  230. /****structure SysInfoData => shall NOT store the data to NAND flash***************/
  231. /****according to System Configuration and Information Table.xlsx Rev.0.2 *******/
  232. /**************************************************************************************/
  233. struct NoneUse
  234. {
  235. unsigned char unknown; // None use struct
  236. };
  237. struct EthConfigData
  238. {
  239. unsigned char EthDhcpClient; //0: enable,1: disable
  240. unsigned char EthMacAddress[18]; //default: Null
  241. unsigned char EthIpAddress[16]; //Eth0 default:192.168.0.10 ,Eth1 default:192.168.1.10
  242. unsigned char EthSubmaskAddress[16]; //Eth0 default:255.255.255.0 ,Eth1 default:255.255.255.0
  243. unsigned char EthGatewayAddress[16]; //Eth0 default:192.168.0.254 ,Eth1 default:192.168.1.254
  244. };
  245. struct WifiConfigData
  246. {
  247. unsigned char WifiMode; //0: disable, 1: Infrastructure client, 2: Infrastructure server, 3: Ad-Hoc
  248. unsigned char WifiSsid[256]; //default: Null
  249. unsigned char WifiPassword[256]; //default: Null
  250. int WifiRssi; //dbm
  251. unsigned char WifiDhcpServer; //0: enable, 1: disable
  252. unsigned char WifiDhcpClient; //0: enable, 1: disable
  253. unsigned char WifiMacAddress[18]; //default: Null
  254. unsigned char WifiIpAddress[16]; //default:192.168.2.10
  255. unsigned char WifiSubmaskAddress[16]; //default:255.255.255.0
  256. unsigned char WifiGatewayAddress[16]; //default:192.168.2.254
  257. unsigned char WifiNetworkConn; //0: disconnected, 1: connected
  258. };
  259. struct TeleConfigData
  260. {
  261. unsigned char TelcomModelName[64]; //default: Null
  262. unsigned char TelcomSoftwareVer[64]; //default: Null
  263. unsigned char TelcomApn[256]; //default: Null
  264. int TelcomRssi; //dbm
  265. unsigned char TelcomChapPapId[256]; //default: Null
  266. unsigned char TelcomChapPapPwd[256]; //default: Null
  267. unsigned char TelcomModemImei[16]; //default: Null
  268. unsigned char TelcomSimImsi[16]; //default: Null
  269. unsigned char TelcomSimIccid[22]; //default: Null
  270. unsigned char TelcomSimStatus; //0: no SIM card is found, 1: valid SIM card, 2: invalid SIM card
  271. unsigned char TelcomModemMode; //0: No services, 1: CDMA, 2: GSM/GPRS, 3: WCDMA, 4: GSM/WCDMA, 5: TD_SCDMA mode, 6: Unknow
  272. unsigned char TelcomIpAddress[16]; //default: Null
  273. unsigned char TelcomNetworkConn; //0: disconnected, 1: connected
  274. };
  275. struct BtConfigData
  276. {
  277. unsigned char LoginCentralID[64]; //default: Null
  278. unsigned char isLogin; //0: Central device non-login 1: Central device login
  279. unsigned char isRequestStart; //0: no action 1: request start charging
  280. unsigned char isRequestStop; //0: no action 1: request stop charging
  281. };
  282. struct BillingConfigData
  283. {
  284. unsigned char isBilling; //0:not for business 1:for business
  285. unsigned char Currency; //
  286. float Fee[24]; //fee for 24 hours
  287. float Cur_fee; // display current fee
  288. };
  289. struct LED
  290. {
  291. unsigned char Intensity; // LED bar intensity 0: Darkest 1: Medium 2: Brightest
  292. unsigned char Red[3]; // Red color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  293. unsigned char Green[3]; // Green color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  294. unsigned char Blue[3]; // Blue color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  295. };
  296. struct SysConfigData
  297. {
  298. /**************System***************/
  299. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  300. unsigned char ModelName[64]; //charger model name
  301. unsigned char AcModelName[64]; //for third gun (DC + AC)
  302. unsigned char SerialNumber[64]; //charger system serial number
  303. unsigned char SystemId[128]; //charger system ID
  304. unsigned char SystemDateTime[32]; //charger system date and time
  305. unsigned char AcPhaseCount; //AC EVSE power phase quantity, 1: One phase 3: Three phase
  306. unsigned char AuthorisationMode; //0: enable, 1: disable
  307. unsigned char DefaultLanguage; //
  308. unsigned char RfidCardNumEndian; //0: little endian, 1: big endian
  309. unsigned short AcPlugInTimes; //0~65535
  310. unsigned short GbPlugInTimes; //0~65535
  311. unsigned short Ccs1PlugInTime; //0~65535
  312. unsigned short Ccs2PlugInTimes; //0~65535
  313. unsigned short ChademoPlugInTimes; //0~65535
  314. unsigned char PsuAcInputType; //0: 220, 1: 277
  315. unsigned short RatingCurrent; //0: Depend on Model name, 1 ~ rating value amp
  316. unsigned short AcRatingCurrent; //for third gun; 0: Depend on Model name, 1 ~ rating value amp
  317. unsigned char isAPP; //for AuthorisationMode=0; 0:false, 1:true
  318. unsigned char isQRCode; //for AuthorisationMode=0; 0:false, 1:true
  319. unsigned char isRFID; //for AuthorisationMode=0; 0:false, 1:true
  320. unsigned char QRCodeMadeMode; //for isQRCode=1 ; 0: default 1:customized
  321. unsigned char QRCodeContent[128]; //for QRCodeMadeMode=1
  322. unsigned char TotalConnectorCount; //Connector count
  323. unsigned char AcConnectorCount; // For DC type
  324. unsigned char SwitchDebugFlag; // Console Debug
  325. unsigned char AlwaysGfdFlag;
  326. /**************Charging***************/
  327. unsigned short MaxChargingEnergy; //0: no limit, 1 ~ 65535 kWh
  328. unsigned short MaxChargingPower; //0: rating value, 1 ~ RATING_POWER kW
  329. unsigned short MaxChargingCurrent; //0: rating value, 1 ~ RATING_CURRENT amp
  330. unsigned short AcMaxChargingCurrent; //for third gun; 0: rating value, 1 ~ RATING_CURRENT amp
  331. unsigned short MaxChargingDuration; //0: no limit, 1 ~ 65535 minutes
  332. unsigned char PhaseLossPolicy; //0: charging, 1: stop charging
  333. unsigned char LocalWhiteCard[10][32]; //Max. card quantity is 10
  334. unsigned char UserId[32]; //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
  335. struct BillingConfigData BillingData;
  336. /**************Network***************/
  337. unsigned char FtpServer[256]; //the ftp server for Phihong server to do data transimission
  338. struct EthConfigData Eth0Interface;
  339. struct EthConfigData Eth1Interface;
  340. struct WifiConfigData AthInterface;
  341. struct TeleConfigData TelecomInterface;
  342. struct BtConfigData Bluetooth;
  343. /**************Backend***************/
  344. unsigned int BackendConnTimeout; //default : 300s
  345. unsigned char OfflinePolicy; //0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
  346. unsigned short OfflineMaxChargeEnergy; //0: same as MaxChargingEnergy, 1 ~ 65535 kWh
  347. unsigned short OfflineMaxChargeDuration; //0: same as MaxChargeDuration, 1 ~ 65535 minutes
  348. unsigned char OcppServerURL[512]; //http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
  349. unsigned char ChargeBoxId[128];
  350. unsigned char chargePointVendor[20]; //the Vendor of the ChargePoint
  351. unsigned int Checksum; //4 bytes checksum
  352. struct LED LedInfo; // LED configuration info
  353. };
  354. struct ChargingInfoData
  355. {
  356. unsigned char Index;
  357. unsigned char slotsIndex;
  358. unsigned char Type; // 0 : Chademo, 1 : CCS, 2: GB
  359. unsigned char type_index;
  360. unsigned char Evboard_id; // for EV board
  361. unsigned char StopChargeFlag; // for EV board
  362. unsigned char SystemStatus; //0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  363. unsigned char PreviousSystemStatus; // 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  364. unsigned char ATEStatus;
  365. unsigned char PreviousATEStatus;
  366. int ReservationId;
  367. unsigned char IsAvailable;
  368. float MaximumChargingVoltage; //0~6553.5 volt
  369. float AvailableChargingCurrent; //0~6553.5 amp
  370. float AvailableChargingPower; //0~6553.5 kW
  371. float DividChargingCurrent; //0~6553.5 amp
  372. float DeratingChargingCurrent; //0~6553.5 amp
  373. float DeratingChargingPower; //0~6553.5 kW
  374. float FuseChargingVoltage; //0~6553.5 volt
  375. float FireChargingVoltage; //0~6553.5 volt
  376. float PresentChargingVoltage; //0~6553.5 volt
  377. float PresentChargingCurrent; //0~6553.5 amp
  378. float PresentChargingPower; //0~6553.5 kW
  379. float PresentChargedEnergy; //0~6553.5 kWh
  380. int PresentChargedDuration; // second
  381. int RemainChargingDuration; // second
  382. float EvBatteryMaxVoltage; // 0~6553.5 volt
  383. float EvBatterytargetVoltage; // 0~6553.5 volt
  384. float EvBatterytargetCurrent; //102.3 0~200(A) (unit:1A)
  385. int EvBatterySoc; // 0~100%
  386. unsigned char ConnectorPlugIn; //0: unplug, 1: Plug-in
  387. unsigned char GunLocked; //0: unlocked 1: locked
  388. float PilotVoltage;
  389. unsigned char PilotState;//1:state A, 2:State B1, 3:State B2, 4:State C, 5:State D, 6:State E, 7:State F, 8: Pilot error
  390. unsigned char PilotDuty; // 0~100%
  391. unsigned char StartUserId[32]; // This ID is trigger start charging event user by RFID、back-end、BLE.
  392. unsigned char StartDateTime[32]; // Charging cycle start date time
  393. unsigned char StopDateTime[32]; // Charging cycle stop date time
  394. unsigned char StartMethod;
  395. float ChargingFee;
  396. // Connector Temp
  397. unsigned char ConnectorTemp; //0x00: -60¢XC ~ 0xFE: 194
  398. // Charging Status
  399. unsigned char GroundFaultStatus; // for GFD result => 0x00 : None, 0x01 : Can Start Charging, 0x02 : Stop Charging
  400. unsigned short RealRatingPower;
  401. unsigned char RelayWeldingCheck; // 0 : No Comp., 1 : Comp.
  402. unsigned char PrechargeStatus; // for ccs precharge => 0x00 : None defined, 0x01 : Accepted
  403. float PowerConsumption; // This contains the meter value (Power Consumption) kWh
  404. unsigned char RelayK1K2Status; // 0x00 : open, 0x01 : close
  405. unsigned char RelayKPK2Status; // 0x00 : open, 0x01 : close
  406. unsigned char TimeoutFlag; // 0 : none,
  407. struct timeval TimeoutTimer;
  408. unsigned char MaxChargeEnable;
  409. unsigned char IsReadyToCharging;
  410. unsigned char CcsAuthentication; // 0:EIM, 1:EIM & PnC mixed
  411. unsigned char AcCcsChargingMode; // 0:BC (PWM) only, 1:BC & PLC mixed
  412. unsigned short SampleChargingCur[2];
  413. /**************Alston for AC***************/
  414. unsigned char SelfTest_Comp;
  415. unsigned char version[16];
  416. unsigned char IsModeChagned;
  417. unsigned char IsCharging;
  418. unsigned char IsErrorOccur;
  419. float RealMaxVoltage;
  420. float RealMaxCurrent;
  421. float RealMaxPower;
  422. unsigned char ConnectorWarningCode[7];
  423. unsigned char ConnectorAlarmCode[7];
  424. unsigned char EvConnAlarmCode[7];
  425. float ChargingProfileCurrent; //0~6553.5 amp
  426. float ChargingProfilePower; //0~6553.5 kW
  427. float PresentChargingVoltageL2; //0~6553.5 volt
  428. float PresentChargingVoltageL3; //0~6553.5 volt
  429. float PresentChargingCurrentL2; //0~6553.5 amp
  430. float PresentChargingCurrentL3; //0~6553.5 amp
  431. char RemoteStartFlag;
  432. unsigned char MaxChargingToAverPassFlag;
  433. int PlugPresentStatusDuration; // second
  434. int DutyCycleDuration; // second
  435. };
  436. struct SysInfoData
  437. {
  438. /**************System***************/
  439. unsigned char BootingStatus; // 0 : booting, 1 : Initializing Complete.
  440. unsigned char AuthorizeFlag; // 0 : None, 1 : Authorizing
  441. unsigned char FactoryConfiguration; //0: normal, 1: trigger, charger will return the configuration to factory default if trigger
  442. float InputVoltageR; //0~655.35 volt
  443. float InputVoltageS; //0~655.35 volt
  444. float InputVoltageT; //0~655.35 volt
  445. unsigned int SystemFanRotaSpeed; //0 ~ 65535 RPM
  446. unsigned int PsuFanRotaSpeed; //0 ~ 65535 RPM
  447. unsigned char AuxPower5V; //0 ~ 255 volt
  448. unsigned char AuxPower12V; //0 ~ 255 volt
  449. unsigned char AuxPower24V; //0 ~ 255 volt
  450. unsigned char AuxPower48V; //0 ~ 255 volt
  451. unsigned char CsuHwRev[32]; //CSU board hardware version
  452. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  453. unsigned char CsuKernelFwRev[32];//CSU board OS kernel firmware version
  454. unsigned char CsuRootFsFwRev[32];//CSU board root file system firmware version
  455. unsigned char CsuPrimFwRev[32]; //CSU board root file system firmware version
  456. unsigned char LcmHwRev[32]; //LCM module hardware version
  457. unsigned char LcmFwRev[32]; //LCM module firmware version
  458. unsigned char PsuHwRev[32]; //PSU hardware version
  459. unsigned char PsuPrimFwRev[32]; //PSU primary firmware version
  460. unsigned char PsuSecFwRev[32]; //PSU secondary firmware version
  461. unsigned char AuxPwrHwRev[32]; //Aux. power module hardware version
  462. unsigned char AuxPwrFwRev[32]; //Aux. power module firmware version
  463. unsigned char FanModuleHwRev[32]; //Fan module hardware version
  464. unsigned char FanModuleFwRev[32]; //Fan module firmware version
  465. unsigned char RelayModuleHwRev[32]; //Relay control module hardware version
  466. unsigned char RelayModuleFwRev[32]; //Relay control module firmware version
  467. unsigned char TelcomModemFwRev[32]; //the 3G/4G modem firmware version
  468. unsigned char LedModuleFwRev[32]; //LED control module firmware version
  469. unsigned char Connector1FwRev[32]; //Connector1 module firmware version
  470. unsigned char Connector2FwRev[32]; //Connector2 module firmware version
  471. int SystemAmbientTemp; // -40 ~ 215 degree C
  472. int SystemCriticalTemp; // -40 ~ 215 degree C
  473. int CcsConnectorTemp; // -40 ~ 215 degree C
  474. int PsuAmbientTemp; // -40 ~ 215 degree C
  475. /**************Charging***************/
  476. struct ChargingInfoData ChademoChargingData[CHAdeMO_QUANTITY];
  477. struct ChargingInfoData CcsChargingData[CCS_QUANTITY];
  478. struct ChargingInfoData GbChargingData[GB_QUANTITY];
  479. struct ChargingInfoData AcChargingData[AC_QUANTITY];
  480. unsigned char CurGunSelected;
  481. unsigned char CurGunSelectedByAc;
  482. /**************Network***************/
  483. unsigned char InternetConn; //0: disconnected, 1: connected
  484. /**************Backend***************/
  485. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  486. char OrderCharging;
  487. /**************Alston***************/
  488. unsigned char WaitForPlugit; //0: none scan, 1: scanning
  489. unsigned char PageIndex; //0 : Initialize
  490. //1 : idle
  491. //4 : Authorizing
  492. //5 : Authorizing complete
  493. //6 : Authorizing fail
  494. //7 : Wait for Plug
  495. //8 : Pre-charge
  496. //9 : Charging
  497. unsigned char SelfTestSeq; //
  498. unsigned char ReAssignedFlag; //
  499. unsigned char CanAverageCharging;
  500. unsigned char MainChargingMode; // 0 : Max, 1 : Average
  501. unsigned char BridgeRelayStatus;
  502. unsigned char FirmwareUpdate; // 0 : none, 1 : update.
  503. unsigned char AcContactorStatus; // 0: disconnected, 1: connected
  504. unsigned char SystemTimeoutFlag; // 0 : none, 1 : self test
  505. struct timeval SystemTimeoutTimer;
  506. unsigned char SystemPage;
  507. unsigned char ConnectorPage;
  508. unsigned char IsAlternatvieConf; // 0 : normal, 1 : alternative
  509. unsigned char StartToChargingFlag; // 0 : Stop, 1 : Start for modbus
  510. unsigned char ChargerType; // 0 : IEC, 1 : UL
  511. };
  512. struct WARNING_CODE_INFO
  513. {
  514. unsigned char WarningCount;
  515. unsigned char PageIndex;
  516. unsigned char WarningCode[10][7];
  517. unsigned char Level;
  518. unsigned char ExtraErrProcess; // 0 : none, 1 : input uvp..
  519. };
  520. struct STOP_CHARGING_ALARM_CODE
  521. {
  522. unsigned char Level;
  523. unsigned char StopCode[4][7];
  524. };
  525. //VCCU
  526. struct VCCU_InternalVoltageStatus_DATA1
  527. {
  528. u_int16_t VCCU_Internal_VCC_12V_Voltage:16;
  529. };
  530. struct VCCU_InternalVoltageStatus_DATA2
  531. {
  532. u_int16_t VCCU_Internal_VCC_KL15_Voltage:16;
  533. };
  534. struct VCCU_InternalVoltageStatus_DATA3
  535. {
  536. u_int16_t VCCU_Internal_VCC_SS_Voltage:16;
  537. };
  538. struct VCCU_InternalVoltageStatus_DATA4
  539. {
  540. u_int16_t VCCU_Internal_VCC_KL30_Voltage:16;
  541. };
  542. struct VCCU_InternalVoltageStatus_DATA
  543. {
  544. u_int16_t VCCU_Internal_VCC_12V_Voltage;
  545. u_int16_t VCCU_Internal_VCC_KL15_Voltage;
  546. u_int16_t VCCU_Internal_VCC_SS_Voltage;
  547. u_int16_t VCCU_Internal_VCC_KL30_Voltage;
  548. };
  549. struct TD_DATA
  550. {
  551. u_int8_t Seconds;
  552. u_int8_t Minutes;
  553. u_int8_t Hours;
  554. u_int8_t Month;
  555. u_int8_t Day;
  556. u_int8_t Year;
  557. u_int8_t LocalMinuteOffset;
  558. u_int8_t LocalHourOffset;
  559. };
  560. /*
  561. * VCCU_InletStatus2
  562. * id:18FF1A80h
  563. */
  564. /*
  565. typedef struct __attribute__ ((packed))
  566. {
  567. u_int16_t VCCU_PlugPresent_Voltage:16;
  568. }VCCU_InletStatus2_DATA1;
  569. */
  570. struct VCCU_InletStatus2_DATA
  571. {
  572. u_int16_t VCCU_PlugPresent_Voltage;
  573. };
  574. struct VCCU_InternalVoltageRawValues_DATA
  575. {
  576. u_int16_t VCCU_Internal_VCC_12V_Raw;
  577. u_int16_t VCCU_Internal_VCC_KL15_Raw;
  578. u_int16_t VCCU_Internal_VCC_KL30_Raw;
  579. u_int16_t VCCU_Internal_VCC_SS_Raw;
  580. };
  581. struct VCCU_V2G_DepartureTime_DATA
  582. {
  583. u_int32_t VCCU_V2G_DepartureTime_Value;
  584. u_int8_t VCCU_V2G_DepartureTimeFlag;
  585. };
  586. struct VCCU_V2G_StateM_DATA
  587. {
  588. struct{
  589. u_int8_t VCCU_V2G_StateM_InternetAvaila :1;
  590. u_int8_t VCCU_V2G_Appl_SccChargeModeReq :3;
  591. u_int8_t VCCU_V2G_Appl_SccFuncModeReq :2;
  592. }bits;
  593. };
  594. struct VCCU_V2G_StateM_StateMachineSt
  595. {
  596. struct{
  597. u_int8_t value:8;
  598. }bits;
  599. };
  600. struct VCCU_V2G_StateM
  601. {
  602. u_int8_t VCCU_V2G_StateM_EnergyTransfer;
  603. u_int8_t VCCU_V2G_StateM_StateMachineEr;
  604. u_int8_t VCCU_V2G_StateM_StateMachineMe;
  605. u_int8_t VCCU_V2G_StateM_StateMachineSt;
  606. struct VCCU_V2G_StateM_DATA DATA;
  607. };
  608. struct VCCU_V2G_Core_DATA7
  609. {
  610. u_int8_t VCCU_V2G_Core_CyclicMsgRcvd :1;
  611. u_int8_t VCCU_V2G_Core_CyclicMsgTrig :1;
  612. u_int8_t VCCU_V2G_Core_IPAssigned :1;
  613. u_int8_t VCCU_V2G_Core_TrcvLinkState :1;
  614. u_int8_t VCCU_V2G_EthTrcv_TrcvLinkState :1;
  615. };
  616. struct VCCU_V2G_Core_DATA
  617. {
  618. u_int8_t VCCU_V2G_Core_MsgState;
  619. u_int8_t VCCU_V2G_Core_MsgStatus;
  620. u_int8_t VCCU_V2G_Core_SAPResponseCode;
  621. u_int8_t VCCU_V2G_Core_SAPSchemaID;
  622. u_int8_t VCCU_V2G_Core_SDPSecurityTx;
  623. u_int8_t VCCU_V2G_Core_StackError;
  624. struct VCCU_V2G_Core_DATA7 DATA7;
  625. };
  626. /*
  627. * VCCU_V2G_EVSEPresentVoltage
  628. * id:18FF5A80h
  629. */
  630. struct VCCU_V2G_EVSEPresentVoltage_DATA1
  631. {
  632. u_int8_t VCCU_V2G_EVSEPresentVoltage_Un :4;
  633. };
  634. struct VCCU_V2G_EVSEPresentVoltage_DATA
  635. {
  636. struct VCCU_V2G_EVSEPresentVoltage_DATA1 DATA1;
  637. u_int8_t VCCU_V2G_EVSEPresentVoltage_Mu;
  638. u_int8_t VCCU_V2G_EVSEPresentVoltage_Va;
  639. u_int8_t VCCU_V2G_EVSEPresentVolta_0000;
  640. };
  641. struct VCCU_V2G_DateTimeNow_DATA
  642. {
  643. u_int64_t VCCU_V2G_DateTimeNow;
  644. };
  645. struct VCCU_V2G_EVSEPresentCurrent_DATA1
  646. {
  647. u_int8_t VCCU_V2G_EVSEPresentCurrent_Un :4;
  648. };
  649. struct VCCU_V2G_EVSEPresentCurrent_DATA2
  650. {
  651. u_int8_t VCCU_V2G_EVSEPresentCurrent_Mu :8;
  652. };
  653. struct VCCU_V2G_EVSEPresentCurrent_DATA3
  654. {
  655. u_int16_t VCCU_V2G_EVSEPresentCurrent_Va :16;
  656. };
  657. struct VCCU_V2G_EVSEPresentCurrent_DATA4
  658. {
  659. u_int8_t VCCU_V2G_EVSEPresentCurre_0000 :8;
  660. };
  661. struct VCCU_V2G_EVSEPresentCurrent_DATA
  662. {
  663. struct VCCU_V2G_EVSEPresentCurrent_DATA1 DATA1;
  664. u_int8_t VCCU_V2G_EVSEPresentCurrent_Mu;
  665. u_int16_t VCCU_V2G_EVSEPresentCurrent_Va;
  666. u_int8_t VCCU_V2G_EVSEPresentCurre_0000;
  667. };
  668. struct VCCU_V2G_EVSEPeakCurrentRipple_DATA1
  669. {
  670. u_int8_t VCCU_V2G_EVSEPeakCurrentRipple :4;
  671. };
  672. struct VCCU_V2G_EVSEPeakCurrentRipple_DATA
  673. {
  674. struct VCCU_V2G_EVSEPeakCurrentRipple_DATA1 DATA1;
  675. u_int8_t VCCU_V2G_EVSEPeakCurrentR_0001;
  676. u_int16_t VCCU_V2G_EVSEPeakCurrentR_0002;
  677. u_int8_t VCCU_V2G_EVSEPeakCurrentR_0000;
  678. };
  679. struct VCCU_V2G_EVSEMinimumVoltageLim_DATA1
  680. {
  681. u_int8_t VCCU_V2G_EVSEMinimumVoltageLim :4;
  682. };
  683. struct VCCU_V2G_EVSEMinimumVoltageLim_DATA
  684. {
  685. struct VCCU_V2G_EVSEMinimumVoltageLim_DATA1 DATA1;
  686. u_int8_t VCCU_V2G_EVSEMinimumVolta_0001;
  687. u_int16_t VCCU_V2G_EVSEMinimumVolta_0002;
  688. u_int8_t VCCU_V2G_EVSEMinimumVolta_0000;
  689. };
  690. struct VCCU_V2G_EVSEMinimumCurrentLim_DATA1
  691. {
  692. u_int8_t VCCU_V2G_EVSEMinimumCurrentLim :4;
  693. };
  694. struct VCCU_V2G_EVSEMinimumCurrentLim_DATA
  695. {
  696. struct VCCU_V2G_EVSEMinimumCurrentLim_DATA1 DATA1;
  697. u_int8_t VCCU_V2G_EVSEMinimumCurre_0001;
  698. u_int16_t VCCU_V2G_EVSEMinimumCurre_0002;
  699. u_int8_t VCCU_V2G_EVSEMinimumCurre_0000;
  700. };
  701. struct VCCU_V2G_EVSEMaximumVoltageLim_DATA1
  702. {
  703. u_int8_t VCCU_V2G_EVSEMaximumVolta_0000 :4;
  704. u_int8_t VCCU_V2G_EVSEMaximumVoltageLim :2;
  705. };
  706. struct VCCU_V2G_EVSEMaximumVoltageLim_DATA
  707. {
  708. struct VCCU_V2G_EVSEMaximumVoltageLim_DATA1 DATA1;
  709. u_int8_t VCCU_V2G_EVSEMaximumVolta_0002;
  710. u_int16_t VCCU_V2G_EVSEMaximumVolta_0003;
  711. u_int8_t VCCU_V2G_EVSEMaximumVolta_0001;
  712. };
  713. struct VCCU_V2G_EVSEMaximumPowerLimit_DATA1
  714. {
  715. u_int8_t VCCU_V2G_EVSEMaximumPower_0000 :4;
  716. u_int8_t VCCU_V2G_EVSEMaximumPowerLimit :2;
  717. };
  718. struct VCCU_V2G_EVSEMaximumPowerLimit_DATA
  719. {
  720. struct VCCU_V2G_EVSEMaximumPowerLimit_DATA1 DATA1;
  721. u_int8_t VCCU_V2G_EVSEMaximumPower_0002;
  722. u_int16_t VCCU_V2G_EVSEMaximumPower_0003;
  723. u_int8_t VCCU_V2G_EVSEMaximumPower_0001;
  724. };
  725. struct VCCU_V2G_EVSEMaximumCurrentLim_DATA1
  726. {
  727. u_int8_t VCCU_V2G_EVSEMaximumCurre_0002 :4;
  728. u_int8_t VCCU_V2G_EVSEMaximumCurrentLim :2;
  729. };
  730. struct VCCU_V2G_EVSEMaximumCurrentLim_DATA
  731. {
  732. struct VCCU_V2G_EVSEMaximumCurrentLim_DATA1 DATA1;
  733. u_int8_t VCCU_V2G_EVSEMaximumCurre_0003;
  734. u_int16_t VCCU_V2G_EVSEMaximumCurre_0000;
  735. u_int8_t VCCU_V2G_EVSEMaximumCurre_0001;
  736. };
  737. struct VCCU_V2G_EVSEEnergyToBeDeliver_DATA1
  738. {
  739. u_int8_t VCCU_V2G_EVSEEnergyToBeDe_0002 :4;
  740. u_int8_t VCCU_V2G_EVSEEnergyToBeDeliver :2;
  741. };
  742. struct VCCU_V2G_EVSEEnergyToBeDeliver_DATA
  743. {
  744. struct VCCU_V2G_EVSEEnergyToBeDeliver_DATA1 DATA1;
  745. u_int8_t VCCU_V2G_EVSEEnergyToBeDe_0003;
  746. u_int16_t VCCU_V2G_EVSEEnergyToBeDe_0000;
  747. u_int8_t VCCU_V2G_EVSEEnergyToBeDe_0001;
  748. };
  749. struct VCCU_V2G_EVSECurrentRegulation_DATA1
  750. {
  751. u_int8_t VCCU_V2G_EVSECurrentRegul_0002 :4;
  752. u_int8_t VCCU_V2G_EVSECurrentRegulation :2;
  753. };
  754. struct VCCU_V2G_EVSECurrentRegulation_DATA
  755. {
  756. struct VCCU_V2G_EVSECurrentRegulation_DATA1 DATA1;
  757. u_int8_t VCCU_V2G_EVSECurrentRegul_0003;
  758. u_int16_t VCCU_V2G_EVSECurrentRegul_0000;
  759. u_int8_t VCCU_V2G_EVSECurrentRegul_0001;
  760. };
  761. struct VCCU_V2G_EVMaximumVoltageLimit_DATA1
  762. {
  763. u_int8_t VCCU_V2G_EVMaximumVoltage_0002 :4;//VCCU_V2G_EVMaximumVoltageLimit_Unit V
  764. u_int8_t VCCU_V2G_EVMaximumVoltageLimit :2;//VCCU_V2G_EVMaximumVoltageLimitFlag true
  765. };
  766. struct VCCU_V2G_EVMaximumVoltageLimit
  767. {
  768. struct VCCU_V2G_EVMaximumVoltageLimit_DATA1 DATA1;
  769. struct{
  770. u_int8_t value:8;
  771. }VCCU_V2G_EVMaximumVoltage_0003;
  772. struct{
  773. u_int16_t value:16;
  774. }VCCU_V2G_EVMaximumVoltage_0000;
  775. struct{
  776. u_int8_t value:8;
  777. }VCCU_V2G_EVMaximumVoltage_0001;
  778. };
  779. struct VCCU_V2G_EVMaximumPowerLimit_DATA1
  780. {
  781. u_int8_t VCCU_V2G_EVMaximumPowerLi_0000 :4;
  782. u_int8_t VCCU_V2G_EVMaximumPowerLimitFl :2;
  783. };
  784. struct VCCU_V2G_EVMaximumPowerLimit_DATA
  785. {
  786. struct VCCU_V2G_EVMaximumPowerLimit_DATA1 DATA;
  787. u_int8_t VCCU_V2G_EVMaximumPowerLimit_M;
  788. u_int16_t VCCU_V2G_EVMaximumPowerLimit_V;
  789. u_int8_t VCCU_V2G_EVMaximumPowerLimit_U;
  790. };
  791. struct VCCU_V2G_EVMaximumCurrentLimit_DATA1
  792. {
  793. u_int8_t VCCU_V2G_EVMaximumCurrent_0000 :4;//VCCU_V2G_EVMaximumCurrentLimit_Unit A
  794. u_int8_t VCCU_V2G_EVMaximumCurrentLimit :2;//VCCU_V2G_EVMaximumCurrentLimitFlag
  795. };
  796. struct VCCU_V2G_EVMaximumCurrentLimit
  797. {
  798. struct VCCU_V2G_EVMaximumCurrentLimit_DATA1 DATA1;
  799. struct{
  800. u_int8_t value:8;
  801. }VCCU_V2G_EVMaximumCurrent_0002;
  802. struct{
  803. u_int16_t value:8;
  804. }VCCU_V2G_EVMaximumCurrent_0003;
  805. struct{
  806. u_int8_t value:8;
  807. }VCCU_V2G_EVMaximumCurrent_0001;
  808. };
  809. struct VCCU_V2G_EVEnergyRequest_DATA1
  810. {
  811. u_int8_t VCCU_V2G_EVEnergyRequest_Unit :4;
  812. u_int8_t VCCU_V2G_EVEnergyRequestFlag :2;
  813. };
  814. struct VCCU_V2G_EVEnergyRequest_DATA
  815. {
  816. struct VCCU_V2G_EVEnergyRequest_DATA1 DATA1;
  817. u_int8_t VCCU_V2G_EVEnergyRequest_Multi;
  818. u_int16_t VCCU_V2G_EVEnergyRequest_Value;
  819. u_int8_t VCCU_V2G_EVEnergyRequest_UnitF;
  820. };
  821. struct VCCU_V2G_EVEnergyCapacity_DATA1
  822. {
  823. u_int8_t VCCU_V2G_EVEnergyCapacity_Unit :4;
  824. u_int8_t VCCU_V2G_EVEnergyCapacityFlag :2;
  825. };
  826. struct VCCU_V2G_EVEnergyCapacity_DATA
  827. {
  828. struct VCCU_V2G_EVEnergyCapacity_DATA1 DATA1;
  829. u_int8_t VCCU_V2G_EVEnergyCapacity_Mult;
  830. u_int16_t VCCU_V2G_EVEnergyCapacity_Valu;
  831. u_int8_t VCCU_V2G_EVEnergyCapacity_0000;
  832. };
  833. struct VCCU_V2G_EVSEStatus_DATA1
  834. {
  835. u_int8_t VCCU_V2G_EVSECurrentLimitAchie :2;
  836. u_int8_t VCCU_V2G_EVSEIsolationStatus :3;
  837. u_int8_t VCCU_V2G_EVSEIsolationStatusFl :2;
  838. };
  839. struct VCCU_V2G_EVSEStatus_DATA2
  840. {
  841. u_int8_t VCCU_V2G_EVSENotification :2;
  842. u_int8_t VCCU_V2G_EVSEProcessing :2;
  843. u_int8_t VCCU_V2G_EVSEStatusCode :4;
  844. };
  845. struct VCCU_V2G_EVSEStatus_DATA3
  846. {
  847. u_int8_t VCCU_V2G_EVSEVoltageLimitAchie :2;
  848. u_int8_t VCCU_V2G_EVSEPowerLimitAchieve :2;
  849. u_int8_t VCCU_V2G_DateTimeNowFlag :2;
  850. };
  851. struct VCCU_V2G_EVSEStatus_DATA4
  852. {
  853. u_int8_t VCCU_V2G_DateTimeNowFlag :5;
  854. };
  855. struct VCCU_V2G_EVSEStatus_DATA
  856. {
  857. struct VCCU_V2G_EVSEStatus_DATA1 DATA1;
  858. struct VCCU_V2G_EVSEStatus_DATA2 DATA2;
  859. struct VCCU_V2G_EVSEStatus_DATA3 DATA3;
  860. struct VCCU_V2G_EVSEStatus_DATA4 DATA4;
  861. u_int32_t VCCU_V2G_NotificationMaxDelay;
  862. };
  863. struct VCCU_V2G_EVTargetCurrent_DATA4
  864. {
  865. u_int8_t VCCU_V2G_EVTargetCurrent_Unit :4;//VCCU_V2G_EVTargetCurrent_Unit A
  866. };
  867. struct VCCU_V2G_EVTargetCurrent
  868. {
  869. struct{
  870. u_int16_t value:16;
  871. }VCCU_V2G_EVTargetCurrent_Value;
  872. struct{
  873. u_int8_t value:8;
  874. }VCCU_V2G_EVTargetCurrent_Multi;
  875. struct{
  876. u_int8_t value:8;
  877. }VCCU_V2G_EVTargetCurrent_UnitF;
  878. struct{
  879. u_int8_t value :4;//VCCU_V2G_EVTargetCurrent_Unit A
  880. }VCCU_V2G_EVTargetCurrent_Unit;
  881. };
  882. struct VCCU_V2G_EVTargetVoltage_DATA4
  883. {
  884. u_int8_t VCCU_V2G_EVTargetVoltage_Unit :4;//VCCU_V2G_EVTargetVoltage_Unit V
  885. };
  886. struct VCCU_V2G_EVTargetVoltage
  887. {
  888. struct{
  889. u_int16_t value :16;
  890. }VCCU_V2G_EVTargetVoltage_Value;
  891. struct{
  892. u_int8_t value :8;
  893. }VCCU_V2G_EVTargetVoltage_Multi;
  894. struct{
  895. u_int8_t value :8;
  896. }VCCU_V2G_EVTargetVoltage_UnitF;
  897. struct{
  898. u_int8_t value :4;//VCCU_V2G_EVTargetVoltage_Unit V
  899. }VCCU_V2G_EVTargetVoltage_Unit;
  900. };
  901. struct VCCU_V2G_RemainingTimeToBulkSO_DATA4
  902. {
  903. u_int8_t VCCU_V2G_RemainingTimeToB_0002 :4;
  904. u_int8_t VCCU_V2G_RemainingTimeToBulkSO :2;
  905. };
  906. struct VCCU_V2G_RemainingTimeToBulkSO_DATA
  907. {
  908. u_int16_t VCCU_V2G_RemainingTimeToB_0000;
  909. u_int8_t VCCU_V2G_RemainingTimeToB_0003;
  910. u_int8_t VCCU_V2G_RemainingTimeToB_0001;
  911. struct VCCU_V2G_RemainingTimeToBulkSO_DATA4 DATA4;
  912. };
  913. struct VCCU_V2G_RemainingTimeToFullSO_DATA4
  914. {
  915. u_int8_t VCCU_V2G_RemainingTimeToF_0002 :4;
  916. u_int8_t VCCU_V2G_RemainingTimeToFullSO :2;
  917. };
  918. struct VCCU_V2G_RemainingTimeToFullSO_DATA
  919. {
  920. u_int16_t VCCU_V2G_RemainingTimeToF_0000;
  921. u_int8_t VCCU_V2G_RemainingTimeToF_0003;
  922. u_int8_t VCCU_V2G_RemainingTimeToF_0001;
  923. struct VCCU_V2G_RemainingTimeToFullSO_DATA4 DATA4;
  924. };
  925. struct VCCU_V2G_VehicleStatus_DATA1
  926. {
  927. u_int8_t VCCU_V2G_EVErrorCode :4;//VCCU_V2G_EVErrorCode
  928. u_int8_t VCCU_V2G_BulkChargingComplete :2;
  929. u_int8_t VCCU_V2G_BulkChargingCompleteF :2;
  930. };
  931. struct VCCU_V2G_VehicleStatus_DATA2
  932. {
  933. u_int8_t VCCU_V2G_BulkSOCFlag :2;
  934. u_int8_t VCCU_V2G_FullSOCFlag :2;
  935. u_int8_t VCCU_V2G_ChargingComplete :2;
  936. u_int8_t VCCU_V2G_EVCabinConditioning :2;
  937. };
  938. struct VCCU_V2G_VehicleStatus_DATA3
  939. {
  940. u_int8_t VCCU_V2G_EVCabinConditioningFl :2;
  941. u_int8_t VCCU_V2G_EVReady :2;//VCCU_V2G_EVReady
  942. u_int8_t VCCU_V2G_EVRESSConditioning :2;
  943. u_int8_t VCCU_V2G_EVRESSConditioningFla :2;
  944. };
  945. struct VCCU_V2G_VehicleStatus_DATA4
  946. {
  947. u_int8_t VCCU_V2G_EVPowerDeliveryParame :2;
  948. u_int8_t VCCU_V2G_StateM_EnergyTra_0000 :4;//VCCU_V2G_StateM_EnergyTransferMode 3
  949. };
  950. struct VCCU_V2G_VehicleStatus
  951. {
  952. struct VCCU_V2G_VehicleStatus_DATA1 DATA1;
  953. struct VCCU_V2G_VehicleStatus_DATA2 DATA2;
  954. struct VCCU_V2G_VehicleStatus_DATA3 DATA3;
  955. struct VCCU_V2G_VehicleStatus_DATA4 DATA4;
  956. struct{
  957. u_int8_t value:8;
  958. }VCCU_V2G_BulkSOC;
  959. struct{
  960. u_int8_t value:8;
  961. }VCCU_V2G_FullSOC;
  962. struct{
  963. u_int8_t value:8;
  964. }VCCU_V2G_EVRESSSOC;
  965. };
  966. struct VCCU_ChargeFromVehicle_DATA
  967. {
  968. struct{
  969. u_int8_t VCCU_Vehicle_IsolationMeasurem:2;//VCCU_Vehicle_IsolationMeasurementStatus
  970. u_int8_t VCCU_Vehicle_PlugLockPermissio:2;//VCCU_Vehicle_PlugLockPermission
  971. u_int8_t VCCU_Vehicle_PlugUnlockPermiss:2;//VCCU_Vehicle_PlugUnlockPermission
  972. u_int8_t VCCU_Vehicle_ChargePermission:2;//VCCU_Vehicle_ChargePermission
  973. }bits;
  974. };
  975. struct VCCU_ChargeFromVehicle_DATA4
  976. {
  977. u_int8_t VCCU_Vehicle_ContactorStatus:2;
  978. };
  979. struct VCCU_ChargeFromVehicle
  980. {
  981. u_int16_t VCCU_Vehicle_ContactorVoltage;//VCCU_Vehicle_ContactorVoltage
  982. u_int16_t VCCU_Vehicle_LinkVoltage;//VCCU_Vehicle_LinkVoltage
  983. struct VCCU_ChargeFromVehicle_DATA DATA;
  984. struct{
  985. u_int8_t VCCU_Vehicle_ContactorStatus:2;//VCCU_Vehicle_ContactorStatus 3 "SNA" 2 "Stuck" 1 "Closed" 0 "Opened"
  986. u_int8_t VCCU_Vehicle_StopCharge:2;
  987. u_int8_t VCCU_Vehicle_ChargeSelection:2;
  988. }bits;
  989. };
  990. struct VCCU_ChargeToVehicle
  991. {
  992. struct{
  993. u_int8_t VCCU_Vehicle_IsolationMea_0000:2;//VCCU_Vehicle_IsolationMeasurementRequest
  994. u_int8_t VCCU_Vehicle_ContactorRequest:2;//VCCU_Vehicle_ContactorRequest
  995. }bits;
  996. };
  997. struct VCCU_Requests_DATA4
  998. {
  999. u_int8_t VCCU_HighSideOut0_Request:2;
  1000. u_int8_t VCCU_HighSideOut1_Request:2;
  1001. u_int8_t VCCU_HighSideOut2_Request:2;
  1002. u_int8_t VCCU_HighSideOut3_Request:2;
  1003. };
  1004. struct VCCU_Requests_DATA5
  1005. {
  1006. u_int8_t VCCU_HighSideOut4_Request:2;
  1007. u_int8_t VCCU_RTC_TimerRequest:2;
  1008. u_int8_t VCCU_PlugLock_MotorRequest:3;
  1009. };
  1010. struct VCCU_Requests_DATA7
  1011. {
  1012. u_int8_t VCCU_ControlPilot_ChargeModeRe:3;
  1013. u_int8_t VCCU_ChargeUnit_Request:2;
  1014. u_int8_t VCCU_Inlet_MotorRequest:2;
  1015. };
  1016. struct VCCU_Requests
  1017. {
  1018. struct{
  1019. u_int8_t value:8;
  1020. }VCCU_LED0_Request;
  1021. struct{
  1022. u_int8_t value:8;
  1023. }VCCU_LED1_Request;
  1024. struct{
  1025. u_int8_t value:8;
  1026. }VCCU_LED2_Request;
  1027. struct VCCU_Requests_DATA4 DATA4;
  1028. struct VCCU_Requests_DATA5 DATA5;
  1029. struct{
  1030. u_int8_t value:8;
  1031. }VCCU_RTC_TimerValue;
  1032. struct VCCU_Requests_DATA7 DATA7;
  1033. };
  1034. struct VCCU_RTCStatus_DATA1
  1035. {
  1036. u_int8_t VCCU_RTC_TimerStatus:2;
  1037. u_int8_t VCCU_RTC_Wakeup:2;
  1038. };
  1039. struct VCCU_RTCStatus_DATA
  1040. {
  1041. struct VCCU_RTCStatus_DATA1 DATA1;
  1042. };
  1043. struct VCCU_OutputStatus_DATA1
  1044. {
  1045. u_int8_t VCCU_HighSideOut0_SelfDiagnost:3;
  1046. u_int8_t VCCU_HighSideOut1_SelfDiagnost:3;
  1047. };
  1048. struct VCCU_OutputStatus_DATA2
  1049. {
  1050. u_int8_t VCCU_HighSideOut2_SelfDiagnost:3;
  1051. u_int8_t VCCU_HighSideOut3_SelfDiagnost:3;
  1052. };
  1053. struct VCCU_OutputStatus_DATA3
  1054. {
  1055. u_int8_t VCCU_HighSideOut4_SelfDiagnost:3;
  1056. u_int8_t VCCU_LED0_SelfDiagnosticStatus:3;
  1057. };
  1058. struct VCCU_OutputStatus_DATA4
  1059. {
  1060. u_int8_t VCCU_LED1_SelfDiagnosticStatus:3;
  1061. u_int8_t VCCU_LED2_SelfDiagnosticStatus:3;
  1062. };
  1063. struct VCCU_OutputStatus_DATA5
  1064. {
  1065. u_int8_t VCCU_HighSideOut0_Input_Deboun:2;
  1066. u_int8_t VCCU_HighSideOut0_Input_Status:2;
  1067. u_int8_t VCCU_HighSideOut1_Input_Deboun:2;
  1068. u_int8_t VCCU_HighSideOut1_Input_Status:2;
  1069. };
  1070. struct VCCU_OutputStatus_DATA6
  1071. {
  1072. u_int8_t VCCU_HighSideOut2_Input_Deboun:2;
  1073. u_int8_t VCCU_HighSideOut2_Input_Status:2;
  1074. u_int8_t VCCU_HighSideOut3_Input_Deboun:2;
  1075. u_int8_t VCCU_HighSideOut3_Input_Status:2;
  1076. };
  1077. struct VCCU_OutputStatus_DATA7
  1078. {
  1079. u_int8_t VCCU_HighSideOut4_Input_Deboun:2;
  1080. u_int8_t VCCU_HighSideOut4_Input_Status:2;
  1081. u_int8_t VCCU_HighSideOut3_Input_Wakeup:2;
  1082. };
  1083. struct VCCU_OutputStatus_DATA
  1084. {
  1085. struct VCCU_OutputStatus_DATA1 DATA1;
  1086. struct VCCU_OutputStatus_DATA2 DATA2;
  1087. struct VCCU_OutputStatus_DATA3 DATA3;
  1088. struct VCCU_OutputStatus_DATA4 DATA4;
  1089. struct VCCU_OutputStatus_DATA5 DATA5;
  1090. struct VCCU_OutputStatus_DATA6 DATA16;
  1091. struct VCCU_OutputStatus_DATA7 DATA17;
  1092. };
  1093. struct VCCU_ControlPilotStatus_DATA
  1094. {
  1095. struct{
  1096. u_int8_t VCCU_ControlPilot_Wakeup:2;
  1097. u_int8_t VCCU_ChargeUnit_Mode:3;//VCCU_ChargeUnit_Mode
  1098. u_int8_t VCCU_ChargeUnit_State:3;//VCCU_ChargeUnit_State
  1099. }bits;
  1100. };
  1101. struct VCCU_ControlPilot_Frequency
  1102. {
  1103. struct{
  1104. u_int16_t VCCU_ControlPilot_Frequency:16;
  1105. }bits;
  1106. };
  1107. struct VCCU_ControlPilot_DutyCycle
  1108. {
  1109. struct{
  1110. u_int8_t value:8;
  1111. }bits;
  1112. };
  1113. struct VCCU_ControlPilot_Voltage
  1114. {
  1115. struct{
  1116. u_int16_t value:16;
  1117. }bits;
  1118. };
  1119. struct VCCU_ChargeUnit_MaxCurrent
  1120. {
  1121. struct{
  1122. u_int8_t value:8;
  1123. }bits;
  1124. };
  1125. struct VCCU_ControlPilotStatus
  1126. {
  1127. struct VCCU_ControlPilot_Frequency ControlPilot_Frequency;
  1128. struct VCCU_ControlPilot_DutyCycle ControlPilot_DutyCycle;
  1129. struct VCCU_ControlPilot_Voltage ControlPilot_Voltage;
  1130. struct VCCU_ControlPilotStatus_DATA DATA;
  1131. u_int8_t ChargeUnit_MaxCurrent;
  1132. };
  1133. struct VCCU_InletStatus_DATA2
  1134. {
  1135. u_int8_t VCCU_PlugPresent_SelfDiagnosti:3;
  1136. u_int8_t VCCU_PlugPresent_Resistance:3;
  1137. u_int8_t VCCU_PlugPresent_Status:2;//VCCU_PlugPresent_Status
  1138. };
  1139. struct VCCU_InletStatus_DATA3
  1140. {
  1141. u_int8_t VCCU_PlugPresent_Wakeup:2;
  1142. u_int8_t VCCU_POSFeedback_SelfDiagnosti:3;
  1143. u_int8_t VCCU_PlugLock_MotorStatus:3;
  1144. };
  1145. struct VCCU_InletStatus_DATA4
  1146. {
  1147. u_int8_t VCCU_PlugLock_Output0_SelfDiag:3;
  1148. u_int8_t VCCU_PlugLock_Output1_SelfDiag:3;
  1149. u_int8_t VCCU_Inlet_HWVariant:2;
  1150. };
  1151. struct VCCU_InletStatus_DATA5
  1152. {
  1153. struct{
  1154. u_int8_t VCCU_DigitalInput_Status:2;
  1155. u_int8_t VCCU_DigitalInput_Wakeup:2;
  1156. u_int8_t VCCU_Inlet_MotorStatus:3;//VCCU_Inlet_MotorStatus
  1157. }bits;
  1158. };
  1159. struct VCCU_InletStatus_DATA7
  1160. {
  1161. struct{
  1162. u_int8_t VCCU_DigitalInput_DebouncedSta:2;//VCCU_DigitalInput_DebouncedStatus
  1163. u_int8_t VCCU_Inlet_ConnectionStatus:2;//VCCU_Inlet_ConnectionStatus
  1164. u_int8_t VCCU_S3Switch_Status:2;//S3_Switch
  1165. u_int8_t VCCU_S3Switch_DebouncedStatus:2;
  1166. }bits;
  1167. };
  1168. struct VCCU_InletStatus
  1169. {
  1170. u_int16_t VCCU_POSFeedback_Voltage;
  1171. struct VCCU_InletStatus_DATA2 DATA2;
  1172. struct VCCU_InletStatus_DATA3 DATA3;
  1173. struct VCCU_InletStatus_DATA4 DATA4;
  1174. struct VCCU_InletStatus_DATA5 DATA5;
  1175. u_int8_t VCCU_Inlet_MaxCurrent;
  1176. struct VCCU_InletStatus_DATA7 DATA7;
  1177. };
  1178. struct VCCU_PTC2_DATA4
  1179. {
  1180. u_int8_t VCCU_PTC2_SelfDiagnosticStatus:3;
  1181. };
  1182. struct VCCU_PTC2_DATA
  1183. {
  1184. u_int16_t VCCU_PTC2_Raw;
  1185. u_int16_t VCCU_PTC2_Resistance;
  1186. u_int16_t VCCU_PTC2_Temperature;
  1187. struct VCCU_PTC2_DATA4 DATA4;
  1188. };
  1189. struct VCCU_PTC1_DATA
  1190. {
  1191. u_int8_t VCCU_PTC1_SelfDiagnosticStatus:3;
  1192. };
  1193. struct VCCU_PTC1
  1194. {
  1195. struct{
  1196. u_int16_t value :16;
  1197. }VCCU_PTC1_Raw;
  1198. struct{
  1199. u_int16_t value :16;
  1200. }VCCU_PTC1_Resistance;
  1201. struct{
  1202. u_int16_t value :16;
  1203. }VCCU_PTC1_Temperature;
  1204. struct VCCU_PTC1_DATA DATA;
  1205. };
  1206. struct DM13_DATA1
  1207. {
  1208. u_int8_t J1939Network1:2;
  1209. u_int8_t SAE_J1922:2;
  1210. u_int8_t SAE_J1587:2;
  1211. u_int8_t CurrentDataLink:2;
  1212. };
  1213. struct DM13_DATA2
  1214. {
  1215. u_int8_t ManufacturerSpecificPort:2;
  1216. u_int8_t SAE_J1850:2;
  1217. u_int8_t ISO9141:2;
  1218. u_int8_t J1939Network2:2;
  1219. };
  1220. struct DM13_DATA3
  1221. {
  1222. u_int8_t J1939Network4:2;
  1223. u_int8_t ProprietaryNetwork2:2;
  1224. u_int8_t ProprietaryNetwork1:2;
  1225. u_int8_t J1939Network3:2;
  1226. };
  1227. struct DM13_DATA4
  1228. {
  1229. u_int8_t SuspendSignal:4;
  1230. u_int8_t HoldSignal :4;
  1231. };
  1232. struct DM13_DATA
  1233. {
  1234. struct DM13_DATA1 DATA1;
  1235. struct DM13_DATA2 DATA2;
  1236. struct DM13_DATA3 DATA3;
  1237. struct DM13_DATA4 DATA4;
  1238. u_int16_t SuspendDuration;
  1239. };
  1240. struct NM_CGW_DATA
  1241. {
  1242. u_int8_t WakeupRsn_CGW;
  1243. };
  1244. struct DIAG_REQ_GLOBAL_DATA
  1245. {
  1246. u_int64_t DIAG_REQ_GLOBAL;
  1247. };
  1248. struct DIAG_REQ_VCCU_DATA
  1249. {
  1250. u_int64_t DIAG_REQ_VCCU;
  1251. };
  1252. struct XCP_RESP_VCCU_DATA
  1253. {
  1254. u_int64_t XCP_RESP_VCCU;
  1255. };
  1256. struct XCP_REQ_VCCU_DATA
  1257. {
  1258. u_int64_t XCP_REQ_VCCU;
  1259. };
  1260. struct DIAG_RESP_VCCU_DATA
  1261. {
  1262. u_int64_t DIAG_RESP_VCCU;
  1263. };
  1264. struct NM_VCCU_DATA
  1265. {
  1266. u_int8_t Awake_Diag_Actv_VCCU:1;
  1267. u_int8_t Awake_ChargeCom_Actv_VCCU:1;
  1268. u_int8_t Awake_Clamp15_Actv_VCCU:1;
  1269. };
  1270. struct NM_VCCU
  1271. {
  1272. struct{
  1273. u_int8_t value:8;//VCCU_Vehicle_ContactorStatus 3 "SNA" 2 "Stuck" 1 "Closed" 0 "Opened"
  1274. }WakeupRsn_VCCU;
  1275. struct NM_VCCU_DATA DATA;
  1276. };
  1277. struct VCCU_PTC0_DATA
  1278. {
  1279. u_int8_t VCCU_PTC0_SelfDiagnosticStatus:3;
  1280. };
  1281. struct VCCU_PTC0
  1282. {
  1283. struct{
  1284. u_int16_t value :16;
  1285. }VCCU_PTC0_Raw;
  1286. struct{
  1287. u_int16_t value :16;
  1288. }VCCU_PTC0_Resistance;
  1289. struct{
  1290. u_int16_t value :16;
  1291. }VCCU_PTC0_Temperature;
  1292. struct VCCU_PTC0_DATA DATA;
  1293. };
  1294. struct VCCU
  1295. {
  1296. struct VCCU_ChargeToVehicle chargeToVehicle;
  1297. struct VCCU_V2G_StateM v2g_StateM;
  1298. struct VCCU_ControlPilotStatus controlPilotStatus;
  1299. struct VCCU_ChargeFromVehicle chargeFromVehicle;
  1300. struct VCCU_InletStatus inletStatus;
  1301. struct VCCU_V2G_VehicleStatus v2g_VehicleStatus;
  1302. struct VCCU_V2G_EVMaximumVoltageLimit v2g_EVMaximumVoltageLimit;
  1303. struct VCCU_V2G_EVMaximumCurrentLimit v2g_EVMaximumCurrentLimit;
  1304. struct VCCU_V2G_EVTargetCurrent v2g_EVTargetCurrent;
  1305. struct VCCU_V2G_EVTargetVoltage v2g_EVTargetVoltage;
  1306. struct VCCU_PTC0 ptc0;
  1307. struct VCCU_PTC1 ptc1;
  1308. };
  1309. enum MOTHERBOARD_MSG_TYPE{
  1310. MOTHERBOARD_MSG_ID01_DC_ID_ASSIGNMENT_REQ = 0,
  1311. MOTHERBOARD_MSG_ID03_DC_STATUS_NOTIFICATION,
  1312. MOTHERBOARD_MSG_ID04_DC_FW_VER_ACK,
  1313. MOTHERBOARD_MSG_ID05_DC_HW_VER_ACK,
  1314. MOTHERBOARD_MSG_ID09_DC_EV_REQUIREMENT_ACK,
  1315. MOTHERBOARD_MSG_ID0A_DC_EV_BATTINFO_ACK,
  1316. MOTHERBOARD_MSG_ID0B_DC_EV_STOP,
  1317. MOTHERBOARD_MSG_ID0D_DC_MISCINFO_ACK,
  1318. MOTHERBOARD_MSG_ID0E_DC_FW_DOWNLOAD_ACK,
  1319. MOTHERBOARD_MSG_ID0F_DC_START_BLOCK_TRANSFER_ACK,
  1320. MOTHERBOARD_MSG_ID11_DC_FW_DOWNLOAD_FINISH_ACK,
  1321. MOTHERBOARD_MSG_ID12_DC_ISOLATION_RESULT_ACK,
  1322. MOTHERBOARD_MSG_ID13_DC_EVSE_INFO_ACK,
  1323. MOTHERBOARD_MSG_ID02_CSU_ID_ASSIGNMENT_ACK,
  1324. MOTHERBOARD_MSG_ID04_CSU_FW_VER_REQ,
  1325. MOTHERBOARD_MSG_ID05_CSU_HW_VER_REQ,
  1326. MOTHERBOARD_MSG_ID06_CSU_PERMISSION,
  1327. MOTHERBOARD_MSG_ID07_CSU_OUTPUT_POWER,
  1328. MOTHERBOARD_MSG_ID08_CSU_OUTPUT_CAPACITY,
  1329. MOTHERBOARD_MSG_ID09_CSU_EV_REQUIREMENT_REQ,
  1330. MOTHERBOARD_MSG_ID0A_CSU_EV_BATTINFO_REQ,
  1331. MOTHERBOARD_MSG_ID0C_CSU_EVSE_STOP,
  1332. MOTHERBOARD_MSG_ID0D_CSU_MISCINFO_REQ,
  1333. MOTHERBOARD_MSG_ID0E_CSU_FW_DOWNLOAD_REQ,
  1334. MOTHERBOARD_MSG_ID0F_CSU_START_BLOCK_TRANSFER_REQ,
  1335. MOTHERBOARD_MSG_ID10_CSU_DATA_TRANSFER,
  1336. MOTHERBOARD_MSG_ID11_CSU_FW_DOWNLOAD_FINISH_REQ,
  1337. MOTHERBOARD_MSG_ID12_CSU_ISOLATION_RESULT_REQ,
  1338. MOTHERBOARD_MSG_ID13_CSU_EVSE_INFO_REQ
  1339. };
  1340. //------------------------------------------------------------
  1341. #define ATE_ID03_DC_STATUS_NOTIFICATION_PRIORITY 6
  1342. #define ATE_ID03_DC_STATUS_NOTIFICATION_INTERVAL 500
  1343. #define ATE_ID03_DC_STATUS_NOTIFICATION_PF 0x0300
  1344. #define ATE_ID03_DC_STATUS_NOTIFICATION_LENGTH 8
  1345. #define ATE_ID03_DC_STATUS_NOTIFICATION_TIMEOUT 1000
  1346. struct ATE_ID03_DC_STATUS_NOTIFICATION_DATA
  1347. {
  1348. u_int8_t ProximitySignal; //0 = connector un-plugged , 1 = connector plug-in
  1349. u_int8_t PilotVoltage; //chademo and GB = 0
  1350. u_int8_t state;
  1351. u_int8_t AlarmCode2;
  1352. u_int8_t AlarmCode3;
  1353. u_int8_t AlarmCode4;
  1354. u_int8_t AlarmCode5;
  1355. u_int8_t AlarmCode6;
  1356. };
  1357. //------------------------------------------------------------
  1358. #define ATE_ID04_CSU_FW_VER_REQ_PRIORITY 6
  1359. #define ATE_ID04_CSU_FW_VER_REQ_INTERVAL 100
  1360. #define ATE_ID04_CSU_FW_VER_REQ_PF 0x0400
  1361. #define ATE_ID04_CSU_FW_VER_REQ_LENGTH 8
  1362. #define ATE_ID04_CSU_FW_VER_REQ_TIMEOUT 1000
  1363. struct ATE_ID04_CSU_FW_VER_REQ_DATA
  1364. {
  1365. u_int32_t res;
  1366. u_int32_t res2;
  1367. };
  1368. //------------------------------------------------------------
  1369. #define ATE_ID04_DC_FW_VER_ACK_PRIORITY 6
  1370. #define ATE_ID04_DC_FW_VER_ACK_INTERVAL 100
  1371. #define ATE_ID04_DC_FW_VER_ACK_PF 0x0400
  1372. #define ATE_ID04_DC_FW_VER_ACK_LENGTH 8
  1373. #define ATE_ID04_DC_FW_VER_ACK_TIMEOUT 1000
  1374. struct ATE_ID04_DC_FW_VER_ACK_DATA
  1375. {
  1376. u_int32_t FirmwareVersion1;
  1377. u_int32_t FirmwareVersion2;
  1378. };
  1379. //------------------------------------------------------------
  1380. #define ATE_ID06_CSU_PERMISSION_PRIORITY 6
  1381. #define ATE_ID06_CSU_PERMISSION_INTERVAL 100
  1382. #define ATE_ID06_CSU_PERMISSION_PF 0x0600
  1383. #define ATE_ID06_CSU_PERMISSION_LENGTH 8
  1384. #define ATE_ID06_CSU_PERMISSION_TIMEOUT 1000
  1385. struct ATE_ID06_CSU_PERMISSION_DATA
  1386. {
  1387. u_int8_t Permission; //1 = start , 0 = stop
  1388. u_int16_t TotalBatteryCapacity; //0.1
  1389. u_int16_t MaximumBatteryCurrent; //0.1
  1390. u_int16_t MaximumBatteryVoltage; //0.1
  1391. u_int8_t MaxChargingTimeMin;
  1392. };
  1393. //------------------------------------------------------------
  1394. #define ATE_ID07_CSU_INPUT_POWER_PRIORITY 6
  1395. #define ATE_ID07_CSU_INPUT_POWER_INTERVAL 100
  1396. #define ATE_ID07_CSU_INPUT_POWER_PF 0x0700
  1397. #define ATE_ID07_CSU_INPUT_POWER_LENGTH 8
  1398. #define ATE_ID07_CSU_INPUT_POWER_TIMEOUT 1000
  1399. struct ATE_ID07_CSU_INPUT_POWER_DATA
  1400. {
  1401. u_int16_t PresentInputVoltage; //目前relay火線輸入電壓
  1402. u_int16_t PresentInputCurrent; //目前relay火線電流
  1403. u_int16_t res0; //0.1
  1404. u_int16_t res1; //0.1
  1405. };
  1406. //------------------------------------------------------------
  1407. #define ATE_ID08_CSU_INPUT_REQUIREMENT_PRIORITY 6
  1408. #define ATE_ID08_CSU_INPUT_REQUIREMENT_INTERVAL 100
  1409. #define ATE_ID08_CSU_INPUT_REQUIREMENT_PF 0x0800
  1410. #define ATE_ID08_CSU_INPUT_REQUIREMENT_LENGTH 8
  1411. #define ATE_ID08_CSU_INPUT_REQUIREMENT_TIMEOUT 1000
  1412. struct ATE_ID08_CSU_INPUT_REQUIREMENT_DATA
  1413. {
  1414. u_int16_t RequireVoltage; //0.1 需求電壓預設500V
  1415. u_int16_t RequireCurrent; //0.1 需求電流預設60A
  1416. u_int16_t PresentBattVoltage; //0.1 電池電壓預設192V
  1417. u_int8_t MinimumChargeCurrent; //0.1 最小測電流2A //Only CHAdeMO 1.2
  1418. u_int8_t ChargeAllow; //0.1 充電允許固定為1 //Only CHAdeMO 1.2
  1419. };
  1420. //------------------------------------------------------------
  1421. #define ATE_ID09_CSU_EVSE_OUTPUT_STATUS_REQ_PRIORITY 6
  1422. #define ATE_ID09_CSU_EVSE_OUTPUT_STATUS_REQ_INTERVAL 100
  1423. #define ATE_ID09_CSU_EVSE_OUTPUT_STATUS_REQ_PF 0x0900
  1424. #define ATE_ID09_CSU_EVSE_OUTPUT_STATUS_REQ_LENGTH 8
  1425. #define ATE_ID09_CSU_EVSE_OUTPUT_STATUS_REQ_TIMEOUT 1000
  1426. struct ATE_ID09_CSU_EVSE_OUTPUT_STATUS_REQ_DATA
  1427. {
  1428. u_int32_t res;
  1429. u_int32_t res2;
  1430. };
  1431. //------------------------------------------------------------
  1432. #define ATE_ID09_DC_EVSE_OUTPUT_STATUS_ACK_PRIORITY 6
  1433. #define ATE_ID09_DC_EVSE_OUTPUT_STATUS_ACK_INTERVAL 100
  1434. #define ATE_ID09_DC_EVSE_OUTPUT_STATUS_ACK_PF 0x0900
  1435. #define ATE_ID09_DC_EVSE_OUTPUT_STATUS_ACK_LENGTH 8
  1436. #define ATE_ID09_DC_EVSE_OUTPUT_STATUS_ACK_TIMEOUT 100
  1437. struct ATE_ID09_DC_EVSE_OUTPUT_STATUS_ACK_DATA
  1438. {
  1439. u_int8_t DcEvState;
  1440. u_int8_t ChargingMode;
  1441. u_int16_t EvsePresentOutputVoltage;
  1442. u_int16_t EvsePresentOutputCurrent;
  1443. u_int16_t RemainingTimeSec;
  1444. };
  1445. //------------------------------------------------------------
  1446. #define ATE_ID0A_CSU_EVSE_CAPACIYT_REQ_PRIORITY 6
  1447. #define ATE_ID0A_CSU_EVSE_CAPACIYT_REQ_INTERVAL 100
  1448. #define ATE_ID0A_CSU_EVSE_CAPACIYT_REQ_PF 0x0A00
  1449. #define ATE_ID0A_CSU_EVSE_CAPACIYT_REQ_LENGTH 8
  1450. #define ATE_ID0A_CSU_EVSE_CAPACIYT_REQ_TIMEOUT 300
  1451. struct ATE_ID0A_CSU_EVSE_CAPACIYT_REQ_DATA
  1452. {
  1453. u_int32_t res;
  1454. u_int32_t res2;
  1455. };
  1456. //------------------------------------------------------------
  1457. #define ATE_ID0A_DC_EVSE_CAPACIYT_ACK_PRIORITY 6
  1458. #define ATED_ID0A_DC_EVSE_CAPACIYT_ACK_INTERVAL 100
  1459. #define ATE_ID0A_DC_EVSE_CAPACIYT_ACK_PF 0x0A00
  1460. #define ATE_ID0A_DC_EVSE_CAPACIYT_ACK_LENGTH 8
  1461. #define ATE_ID0A_DC_EVSE_CAPACIYT_ACK_TIMEOUT 100
  1462. struct ATE_ID0A_DC_EVSE_CAPACIYT_ACK_DATA
  1463. {
  1464. u_int16_t EvseMaxChargeVoltage;
  1465. u_int16_t EvseMaxChargeCurrent;
  1466. u_int16_t EvseMinChargeVoltage;
  1467. u_int16_t EvseMinChargeCurrent;
  1468. u_int8_t res;
  1469. };
  1470. //------------------------------------------------------------
  1471. #define ATE_ID0B_DC_EV_STOP_PRIORITY 6
  1472. #define ATE_ID0B_DC_EV_STOP_INTERVAL 100
  1473. #define ATE_ID0B_DC_EV_STOP_PF 0x0B00
  1474. #define ATE_ID0B_DC_EV_STOP_LENGTH 8
  1475. #define ATE_ID0B_DC_EV_STOP_TIMEOUT 50
  1476. struct ATE_ID0B_DC_EV_STOP_DATA
  1477. {
  1478. u_int8_t EvStopReason; //0 = EV normal stop , 1 = EV emergency stop
  1479. u_int8_t AlarmCode1;
  1480. u_int8_t AlarmCode2;
  1481. u_int8_t AlarmCode3;
  1482. u_int8_t AlarmCode4;
  1483. u_int8_t AlarmCode5;
  1484. u_int8_t AlarmCode6;
  1485. u_int8_t res;
  1486. };
  1487. //------------------------------------------------------------
  1488. #define ATE_ID0C_CSU_EVSE_STOP_PRIORITY 6
  1489. #define ATE_ID0C_CSU_EVSE_STOP_INTERVAL 100
  1490. #define ATE_ID0C_CSU_EVSE_STOP_PF 0x0C00
  1491. #define ATE_ID0C_CSU_EVSE_STOP_LENGTH 8
  1492. #define ATE_ID0C_CSU_EVSE_STOP_TIMEOUT 300
  1493. struct ATE_ID0C_CSU_EVSE_STOP_DATA
  1494. {
  1495. u_int8_t EvseStopReason; //0 = EVSE normal stop , 1 = EVSE emergency stop
  1496. u_int8_t AlarmCode1;
  1497. u_int8_t AlarmCode2;
  1498. u_int8_t AlarmCode3;
  1499. u_int8_t AlarmCode4;
  1500. u_int8_t AlarmCode5;
  1501. u_int8_t AlarmCode6;
  1502. u_int8_t res;
  1503. };
  1504. //------------------------------------------------------------
  1505. #define ATE_ID0D_CSU_MISCINFO_REQ_PRIORITY 6
  1506. #define ATE_ID0D_CSU_MISCINFO_REQ_INTERVAL 100
  1507. #define ATE_ID0D_CSU_MISCINFO_REQ_PF 0x0D00
  1508. #define ATE_ID0D_CSU_MISCINFO_REQ_LENGTH 8
  1509. #define ATE_ID0D_CSU_MISCINFO_REQ_TIMEOUT 1000
  1510. struct ATE_ID0D_CSU_MISCINFO_REQ_DATA
  1511. {
  1512. u_int8_t K1K2Status; //0 = Off / 1 = ON
  1513. u_int8_t Soc;
  1514. u_int16_t res0;
  1515. u_int16_t res1;
  1516. u_int16_t res2;
  1517. };
  1518. //------------------------------------------------------------
  1519. #define ATE_ID0D_DC_MISCINFO_ACK_PRIORITY 6
  1520. #define ATE_ID0D_DC_MISCINFO_ACK_INTERVAL 100
  1521. #define ATE_ID0D_DC_MISCINFO_ACK_PF 0x0D00
  1522. #define ATE_ID0D_DC_MISCINFO_ACK_LENGTH 8
  1523. #define ATE_ID0D_DC_MISCINFO_ACK_TIMEOUT 100
  1524. struct ATE_ID0D_DC_MISCINFO_ACK_DATA
  1525. {
  1526. u_int8_t ConnectorLockStatus; //0 = released , 1 = locked
  1527. u_int8_t ConnectorTmp1;
  1528. u_int8_t ConnectorTmp2;
  1529. u_int8_t PilotVoltage; //CHAdeMO and GB = 0
  1530. u_int8_t K1K2OnOff;
  1531. u_int8_t Res2;
  1532. u_int8_t Res3;
  1533. u_int8_t soc;
  1534. };
  1535. struct CHADEMO
  1536. {
  1537. struct ATE_ID03_DC_STATUS_NOTIFICATION_DATA id03;
  1538. struct ATE_ID04_CSU_FW_VER_REQ_DATA id04_req;
  1539. struct ATE_ID04_DC_FW_VER_ACK_DATA id04_ack;
  1540. struct ATE_ID06_CSU_PERMISSION_DATA id06;
  1541. struct ATE_ID07_CSU_INPUT_POWER_DATA id07;
  1542. struct ATE_ID08_CSU_INPUT_REQUIREMENT_DATA id08;
  1543. struct ATE_ID09_CSU_EVSE_OUTPUT_STATUS_REQ_DATA id09_req;
  1544. struct ATE_ID09_DC_EVSE_OUTPUT_STATUS_ACK_DATA id09_ack;
  1545. struct ATE_ID0A_CSU_EVSE_CAPACIYT_REQ_DATA id0A_req;
  1546. struct ATE_ID0A_DC_EVSE_CAPACIYT_ACK_DATA id0A_ack;
  1547. struct ATE_ID0B_DC_EV_STOP_DATA id0B;
  1548. struct ATE_ID0C_CSU_EVSE_STOP_DATA id0C;
  1549. struct ATE_ID0D_CSU_MISCINFO_REQ_DATA id0D_req;
  1550. struct ATE_ID0D_DC_MISCINFO_ACK_DATA id0D_ack;
  1551. int relaystatus;
  1552. int PresentChargedDuration;
  1553. int RemainChargingDuration;
  1554. };
  1555. struct Boot_Notification
  1556. {
  1557. u_int32_t boo1;//0x02
  1558. u_int32_t boo2;//0x03
  1559. };
  1560. struct ATE_Connector_1
  1561. {
  1562. u_int16_t TargetVoltage;//0x02
  1563. u_int16_t TargetCurrent;//0x03
  1564. u_int16_t PresentVoltage;//0x03
  1565. u_int16_t PresentCurrent;//0x03
  1566. };
  1567. struct ATE_Connector_2
  1568. {
  1569. u_int16_t TargetVoltage;//0x02
  1570. u_int16_t TargetCurrent;//0x03
  1571. u_int16_t PresentVoltage;//0x03
  1572. u_int16_t PresentCurrent;//0x03
  1573. };
  1574. struct EVStatus
  1575. {
  1576. u_int8_t data;//Idle:0x01, Preparing:0x02, Charging:0x03, Charging termination:0x04, Fault:0x05
  1577. };
  1578. struct CHROMA
  1579. {
  1580. struct Boot_Notification bootNotification;
  1581. struct ATE_Connector_1 ate_Connector_1;
  1582. struct ATE_Connector_2 ate_Connector_2;
  1583. struct EVStatus evstaus;
  1584. };
  1585. struct ATE
  1586. {
  1587. unsigned char ATEStatus;
  1588. struct VCCU vccu;
  1589. struct CHADEMO chademo;
  1590. struct CHROMA chroma;
  1591. int status;
  1592. int ATEState;//0 none 1 vccu 2 gb
  1593. int targetCurrent_Value;
  1594. int targetVoltage_Value;
  1595. int chademoTargetCurrent_Value;
  1596. int chademoTargetVoltage_Value;
  1597. int maximumCurrent_value;
  1598. int maximumVoltage_value;
  1599. int linkVoltage;
  1600. int contactorVoltage;
  1601. int RequireVoltage; //0.1
  1602. int RequireCurrent; //0.1
  1603. int PresentBattVoltage; //0.1
  1604. int MinimumChargeCurrent;
  1605. int Permission; //1 = start , 0 = stop
  1606. int TotalBatteryCap; //0.1
  1607. int MaxBatteryCurrent; //0.1
  1608. int MaxBatteryVoltage; //0.1
  1609. int MaxChargingTimeMin;
  1610. unsigned char cATEStatus;
  1611. int cstatus;
  1612. int ctargetCurrent_Value;
  1613. int ctargetVoltage_Value;
  1614. int cmaximumCurrent_value;
  1615. int cmaximumVoltage_value;
  1616. int clinkVoltage;
  1617. int ccontactorVoltage;
  1618. int cRequireVoltage; //0.1
  1619. int cRequireCurrent; //0.1
  1620. int cPresentBattVoltage; //0.1
  1621. int cMinimumChargeCurrent;
  1622. int cPermission; //1 = start , 0 = stop
  1623. int cTotalBatteryCap; //0.1
  1624. int cMaxBatteryCurrent; //0.1
  1625. int cMaxBatteryVoltage; //0.1
  1626. int cMaxChargingTimeMin;
  1627. int testMode;//測試模式
  1628. int ateMode;//ATE模式 0 VCCU 1 GB
  1629. int ateStatus;
  1630. int atePreviousStatus;
  1631. };
  1632. struct SysConfigAndInfo
  1633. {
  1634. struct SysConfigData SysConfig;
  1635. struct SysInfoData SysInfo;
  1636. struct WARNING_CODE_INFO SysWarningInfo;
  1637. struct STOP_CHARGING_ALARM_CODE SysStopChargingAlarmCode;
  1638. struct ATE ate;
  1639. };
  1640. char Currency[54][3]=
  1641. {
  1642. "AED", // - Emirati Dirham
  1643. "ARS", // - Argentine Peso
  1644. "AUD", // - Australian Dollar
  1645. "BGN", // - Bulgarian Lev
  1646. "BHD", // - Bahraini Dinar
  1647. "BND", // - Bruneian Dollar
  1648. "BRL", // - Brazilian Real
  1649. "BWP", // - Botswana Pula
  1650. "CAD", // - Canadian Dollar
  1651. "CHF", // - Swiss Franc
  1652. "CLP", // - Chilean Peso
  1653. "CNY", // - Chinese Yuan Renminbi
  1654. "COP", // - Colombian Peso
  1655. "CZK", // - Czech Koruna
  1656. "DKK", // - Danish Krone
  1657. "EUR", // - Euro
  1658. "GBP", // - British Pound
  1659. "HKD", // - Hong Kong Dollar
  1660. "HRK", // - Croatian Kuna
  1661. "HUF", // - Hungarian Forint
  1662. "IDR", // - Indonesian Rupiah
  1663. "ILS", // - Israeli Shekel
  1664. "INR", // - Indian Rupee
  1665. "IRR", // - Iranian Rial
  1666. "ISK", // - Icelandic Krona
  1667. "JPY", // - Japanese Yen
  1668. "KRW", // - South Korean Won
  1669. "KWD", // - Kuwaiti Dinar
  1670. "KZT", // - Kazakhstani Tenge
  1671. "LKR", // - Sri Lankan Rupee
  1672. "LYD", // - Libyan Dinar
  1673. "MUR", // - Mauritian Rupee
  1674. "MXN", // - Mexican Peso
  1675. "MYR", // - Malaysian Ringgit
  1676. "NOK", // - Norwegian Krone
  1677. "NPR", // - Nepalese Rupee
  1678. "NZD", // - New Zealand Dollar
  1679. "OMR", // - Omani Rial
  1680. "PHP", // - Philippine Peso
  1681. "PKR", // - Pakistani Rupee
  1682. "PLN", // - Polish Zloty
  1683. "QAR", // - Qatari Riyal
  1684. "RON", // - Romanian New Leu
  1685. "RUB", // - Russian Ruble
  1686. "SAR", // - Saudi Arabian Riyal
  1687. "SEK", // - Swedish Krona
  1688. "SGD", // - Singapore Dollar
  1689. "THB", // - Thai Baht
  1690. "TRY", // - Turkish Lira
  1691. "TTD", // - Trinidadian Dollar
  1692. "TWD", // - Taiwan New Dollar
  1693. "USD", // - US Dollar
  1694. "VEF", // - Venezuelan Bolivar
  1695. "ZAR" // - South African Rand
  1696. };
  1697. /**************************************************************************************/
  1698. /**************************Alarm Share memory**************************************/
  1699. /***************************************************************************************
  1700. Status Code A B C D E F
  1701. 0: Issue 1: From EVSE 1: Fault (unrecoverable) 001 ~ 999 serial number
  1702. e.g., hardware broken, system latch
  1703. 1: Recovered 2: From EV 2: Alarm (recoverable)
  1704. e.g., OTP, OVP
  1705. 3: From Backend 3: Information
  1706. e.g., swipe card to stop charging
  1707. according to XXX.Revxx
  1708. ***************************************************************************************/
  1709. /**************************************************************************************/
  1710. char FaultStatusCode[40][6]=
  1711. {
  1712. "011001", //CHAdeMO output fuse blew
  1713. "011002", //CCS output fuse blew
  1714. "011003", //GB output fuse blew
  1715. "011004", //RCD/CCID self-test fail
  1716. "011005", //AC input contactor 1 welding
  1717. "011006", //AC input contactor 1 driving fault
  1718. "011007", //AC input contactor 2 welding
  1719. "011008", //AC input contactor 2 driving fault
  1720. "011009", //AC output relay welding
  1721. "011010", //AC output relay driving fault
  1722. "011011", //CHAdeMO output relay welding
  1723. "011012", //CHAdeMO output relay driving fault
  1724. "011013", //CCS output relay welding
  1725. "011014", //CCS output relay driving fault
  1726. "011015", //GB output relay welding
  1727. "011016", //GB output relay driving fault
  1728. "011017", //AC connector temperature sensor broken
  1729. "011018", //CHAdeMO connector temperature sensor broken
  1730. "011019", //CCS connector temperature sensor broken
  1731. "011020", //GB connector temperature sensor broken
  1732. "011021", //WiFi module broken
  1733. "011022", //3G/4G module broken
  1734. "011023", //Aux. power module broken
  1735. "011024", //Relay control module /smart box broken
  1736. "011025", //CHAdeMO connector lock fail
  1737. "011026", //GB connector lock fail
  1738. "011027", //AC connector lock fail
  1739. "011028", //CHAdeMO module broken
  1740. "011029", //CCS module broken
  1741. "011030", //GBT module broken
  1742. "011031", //PSU module broken
  1743. "011032", //RCD/CCID module broken
  1744. "011033", //Maximum Output Current setup error
  1745. "011034", //Shutter fault
  1746. "011035", //Ble module broken
  1747. "011036", //Rotary switch fault
  1748. "011037", //Reserved
  1749. "011038", //Reserved
  1750. "011039", //Reserved
  1751. "011040" //Reserved
  1752. };
  1753. struct FaultCodeData
  1754. {
  1755. unsigned char PreviousFaultVal[5];
  1756. union
  1757. {
  1758. unsigned char FaultVal[5];
  1759. struct
  1760. {
  1761. //FaultVal[0]
  1762. unsigned char ChademoOutputFuseBlew:1; //bit 0
  1763. unsigned char CcsOutputFuseBlew:1; //bit 1
  1764. unsigned char GbOutputFuseBlew:1; //bit 2
  1765. unsigned char RcdSelfTestFail:1; //bit 3
  1766. unsigned char AcInputContactor1Welding:1; //bit 4
  1767. unsigned char AcInputContactor1DrivingFault:1; //bit 5
  1768. unsigned char AcInputContactor2Welding:1; //bit 6
  1769. unsigned char AcInputContactor2DrivingFault:1; //bit 7
  1770. //FaultVal[1]
  1771. unsigned char AcOutputRelayWelding:1; //bit 0
  1772. unsigned char AcOutputRelayDrivingFault:1; //bit 1
  1773. unsigned char ChademoOutputRelayWelding:1; //bit 2
  1774. unsigned char ChademoOutputRelayDrivingFault:1; //bit 3
  1775. unsigned char CcsOutputRelayWelding:1; //bit 4
  1776. unsigned char CcsOutputRelayDrivingFault:1; //bit 5
  1777. unsigned char GbOutputRelayWelding:1; //bit 6
  1778. unsigned char GbOutputRelayDrivingFault:1; //bit 7
  1779. //FaultVal[2]
  1780. unsigned char AcConnectorTempSensorBroken:1; //bit 0
  1781. unsigned char ChademoConnectorTempSensorBroken:1; //bit 1
  1782. unsigned char CcsConnectorTempSensorBroken:1; //bit 2
  1783. unsigned char GbConnectorTempSensorBroken:1; //bit 3
  1784. unsigned char WiFiModuleBroken:1; //bit 4
  1785. unsigned char Telecom4GModuleBroken:1; //bit 5
  1786. unsigned char AuxPowerModuleBroken:1; //bit 6
  1787. unsigned char RelayControlModuleBroken :1; //bit 7
  1788. //FaultVal[3]
  1789. unsigned char ChademoConnectorLockFail:1; //bit 0
  1790. unsigned char GbConnectorLockFail:1; //bit 1
  1791. unsigned char AcConnectorLockFail:1; //bit 2
  1792. unsigned char ChademoModuleBroken:1; //bit 3
  1793. unsigned char CcsModuleBroken:1; //bit 4
  1794. unsigned char GbModuleBroken:1; //bit 5
  1795. unsigned char PsuModuleBroken:1; //bit 6
  1796. unsigned char RcdCcidModuleBroken:1; //bit 7
  1797. //FaultVal[4]
  1798. unsigned char MaximumOutputCurrentSetupError:1; //bit 0
  1799. unsigned char ShutterFault:1; //bit 1
  1800. unsigned char BleModuleBroken:1; //bit 2
  1801. unsigned char RotarySwitchFault:1; //bit 3
  1802. unsigned char :4; //bit 4 ~ 7 reserved
  1803. }bits;
  1804. }FaultEvents;
  1805. };
  1806. char AlarmStatusCode[128][6]=
  1807. {
  1808. "012200", //System L1 input OVP
  1809. "012201", //System L2 input OVP
  1810. "012202", //System L3 input OVP
  1811. "012203", //System L1 input UVP
  1812. "012204", //System L2 input UVP
  1813. "012205", //System L3 input UVP
  1814. "012206", //PSU L1 input OVP
  1815. "012207", //PSU L2 input OVP
  1816. "012208", //PSU L3 input OVP
  1817. "012209", //PSU L1 input UVP
  1818. "012210", //PSU L2 input UVP
  1819. "012211", //PSU L3 input UVP
  1820. "012212", //System L1 input drop
  1821. "012213", //System L2 input drop
  1822. "012214", //System L3 input drop
  1823. "012215", //System AC output OVP
  1824. "012216", //System AC output OCP L1
  1825. "012217", //System CHAdeMO output OVP
  1826. "012218", //System CHAdeMO output OCP
  1827. "012219", //System CCS output OVP
  1828. "012220", //System CCS output OCP
  1829. "012221", //System GB output OVP
  1830. "012222", //System GB output OCP
  1831. "012223", //System ambient/inlet OTP
  1832. "012224", //System critical point OTP
  1833. "012225", //PSU ambient/inlet OTP
  1834. "012226", //PSU critical point OTP
  1835. "012227", //Aux. power module OTP
  1836. "012228", //Relay board/smart box OTP
  1837. "012229", //CHAdeMO connector OTP
  1838. "012230", //CCS connector OTP
  1839. "012231", //GB connector OTP
  1840. "012232", //AC connector OTP
  1841. "012233", //RCD/CCID trip
  1842. "012234", //CHAdeMO GFD trip
  1843. "012235", //CCS GFD trip
  1844. "012236", //GB GFD trip
  1845. "012237", //SPD trip
  1846. "012238", //Main power breaker trip
  1847. "012239", //Aux. power breaker trip
  1848. "012240", //PSU communication fail
  1849. "012241", //WiFi module communication fail
  1850. "012242", //3G/4G module communication fail
  1851. "012243", //RFID module communication fail
  1852. "012244", //Bluetooth module communication fail
  1853. "012245", //LCM module communication fail
  1854. "012246", //Aux. power module communication fail
  1855. "012247", //Relay control boaed/smart box communication fail
  1856. "012248", //CCS module communication fail
  1857. "012249", //CHAdeMO module communication fail
  1858. "012250", //GBT module communication fail
  1859. "012251", //Emergency stop
  1860. "012252", //Door open
  1861. "012253", //System fan decay
  1862. "012254", //Fail to create share memory
  1863. "012255", //CSU initialization failed
  1864. "012256", //AC Ground Fault
  1865. "012257", //MCU self-test Fault
  1866. "012258", //Relay self-test Fault
  1867. "012259", //CHAdeMO groundfault detection timeout (GFD)
  1868. "012260", //CCS groundfault detection timeout (GFD)
  1869. "012261", //GB groundfault detection timeout (GFD)
  1870. "012262", //Circuit Short L1
  1871. "012263", // PSU Duplicate ID
  1872. "012264", // PSU Output Short Circuit
  1873. "012265", // PSU Discharge Abnormal
  1874. "012266", // PSU Dc Side ShutDown
  1875. "012267", // PSU Failure Alarm
  1876. "012268", // PSU Protection Alarm
  1877. "012269", // PSU FanFailure Alarm
  1878. "012270", // PSU Input UVP
  1879. "012271", // PSU Input OVP
  1880. "012272", // PSU WalkIn State
  1881. "012273", // PSU Power Limited State
  1882. "012274", // PSU Id Repeat
  1883. "012275", // PSU Severe Uneven Current
  1884. "012276", // PSU Three Phase Input Inadequate
  1885. "012277", // PSU Three Phase Onput Imbalance
  1886. "012278", // PSU Ffc Side ShutDown
  1887. "012279", // NO PSU Resource
  1888. "012280", // Self test Failed due to communication of Relayboard failure
  1889. "012281", // Self test Failed due to communication of Fanboard failure
  1890. "012282", // Self test Failed due to communication of Primary failure
  1891. "012283", // Self test Failed due to communication of Chademoboard failure
  1892. "012284", // Self test Failed due to communication of CCSboard failure
  1893. "012285", // Self test Failed due to AC Contact failure
  1894. "012286", // Self test Failed due to communication of PSU failure
  1895. "012287", // Self test Failed due to Model name is none match
  1896. "012288", // CCS output UVP
  1897. "012289", // Chademo output UVP
  1898. "012290", // GBT output UVP
  1899. "012291", // Self test Failed due to communication of GBTboard failure
  1900. "012292", // Self test Failed due to communication of AC failure
  1901. "012293", // Self test Failed due to communication of Ledboard failure
  1902. "012294", // Ac input OVP
  1903. "012295", // Ac input UVP
  1904. "012296", // CHAdeMO groundfault detection - warning
  1905. "012297", // CCS groundfault detection - warning
  1906. "012298", // GB groundfault detection - warning
  1907. "012299", //System AC output OCP L2
  1908. "012300", //System AC output OCP L3
  1909. "012301", //Circuit Short L2
  1910. "012302", //Circuit Short L3
  1911. };
  1912. struct AlarmCodeData
  1913. {
  1914. unsigned char PreviousAlarmVal[13];
  1915. union
  1916. {
  1917. unsigned char AlarmVal[13];
  1918. struct
  1919. {
  1920. //AlarmVal[0]
  1921. unsigned char SystemL1InputOVP:1; //bit 0
  1922. unsigned char SystemL2InputOVP:1; //bit 1
  1923. unsigned char SystemL3InputOVP:1; //bit 2
  1924. unsigned char SystemL1InputUVP:1; //bit 3
  1925. unsigned char SystemL2InputUVP:1; //bit 4
  1926. unsigned char SystemL3InputUVP:1; //bit 5
  1927. unsigned char PsuL1InputOVP:1; //bit 6
  1928. unsigned char PsuL2InputOVP:1; //bit 7
  1929. //AlarmVal[1]
  1930. unsigned char PsuL3InputOVP:1; //bit 0
  1931. unsigned char PsuL1InputUVP:1; //bit 1
  1932. unsigned char PsuL2InputUVP:1; //bit 2
  1933. unsigned char PsuL3InputUVP :1; //bit 3
  1934. unsigned char SystemL1InputDrop:1; //bit 4
  1935. unsigned char SystemL2InputDrop:1; //bit 5
  1936. unsigned char SystemL3InputDrop:1; //bit 6
  1937. unsigned char SystemAcOutputOVP:1; //bit 7
  1938. //AlarmVal[2]
  1939. unsigned char SystemAcOutputOCP:1; //bit 0
  1940. unsigned char SystemChademoOutputOVP:1; //bit 1
  1941. unsigned char SystemChademoOutputOCP:1; //bit 2
  1942. unsigned char SystemCcsOutputOVP:1; //bit 3
  1943. unsigned char SystemCcsOutputOCP:1; //bit 4
  1944. unsigned char SystemGbOutputOVP:1; //bit 5
  1945. unsigned char SystemGbOutputOCP:1; //bit 6
  1946. unsigned char SystemAmbientOTP :1; //bit 7
  1947. //AlarmVal[3]
  1948. unsigned char SystemCriticalPointOTP:1; //bit 0
  1949. unsigned char PsuAmbientOTP:1; //bit 1
  1950. unsigned char PsuCriticalPointOTP:1; //bit 2
  1951. unsigned char AuxPowerModuleOTP:1; //bit 3
  1952. unsigned char RelayBoardOTP:1; //bit 4
  1953. unsigned char ChademoConnectorOTP:1; //bit 5
  1954. unsigned char CcsConnectorOTP:1; //bit 6
  1955. unsigned char GbConnectorOTP:1; //bit 7
  1956. //AlarmVal[4]
  1957. unsigned char AcConnectorOTP:1; //bit 0
  1958. unsigned char RcdTrip:1; //bit 1
  1959. unsigned char ChademoGfdTrip:1; //bit 2
  1960. unsigned char CcsGfdTrip:1; //bit 3
  1961. unsigned char GbGfdTrip:1; //bit 4
  1962. unsigned char SpdTrip:1; //bit 5
  1963. unsigned char MainPowerBreakerTrip:1; //bit 6
  1964. unsigned char AuxPowerBreakerTrip:1; //bit 7
  1965. //AlarmVal[5]
  1966. unsigned char PsuCommunicationFail:1; //bit 0
  1967. unsigned char WiFiModuleCommFail:1; //bit 1
  1968. unsigned char Telecom4GModuleCommFail:1; //bit 2
  1969. unsigned char RfidModuleCommFail:1; //bit 3
  1970. unsigned char BluetoothModuleCommFail:1; //bit 4
  1971. unsigned char LcmModuleCommFail:1; //bit 5
  1972. unsigned char AuxPowerModuleCommFail:1; //bit 6
  1973. unsigned char RelayBoardCommFail:1; //bit 7
  1974. //AlarmVal[6]
  1975. unsigned char CcsModuleCommFail:1; //bit 0
  1976. unsigned char ChademoModuleCommFail:1; //bit 1
  1977. unsigned char GbModuleCommFail:1; //bit 2
  1978. unsigned char EmergencyStopTrip:1; //bit 3
  1979. unsigned char DoorOpen:1; //bit 4
  1980. unsigned char SystemFanDecay:1; //bit 5
  1981. unsigned char FailToCreateShareMemory:1; //bit 6
  1982. unsigned char CsuInitFailed:1; //bit 7
  1983. //AlarmVal[7]
  1984. unsigned char AcGroundfaultFail:1; //bit 0
  1985. unsigned char McuSelftestFail:1; //bit 1
  1986. unsigned char RelaySelftestFail:1; //bit 2
  1987. unsigned char ChademoGroundfaultTimeout:1; //bit 3
  1988. unsigned char CcsGroundfaultTimeout:1; //bit 4
  1989. unsigned char GbGroundfaultTimeout:1; //bit 5
  1990. unsigned char CircuitShort:1; //bit 6
  1991. unsigned char PsuDuplicateID:1; //bit 7
  1992. //AlarmVal[8]
  1993. unsigned char PsuOutputShortCircuit :1; //bit 0
  1994. unsigned char PsuDischargeAbnormal :1; //bit 1
  1995. unsigned char PsuDcSideShutDown :1; //bit 2
  1996. unsigned char PsuFailureAlarm :1; //bit 3
  1997. unsigned char PsuProtectionAlarm :1; //bit 4
  1998. unsigned char PsuFanFailureAlarm :1; //bit 5
  1999. unsigned char PsuInputUVP:1; //bit 6
  2000. unsigned char PsuInputOVP:1; //bit 7
  2001. //AlarmVal[9]
  2002. unsigned char PsuWalkInState :1; //bit 0
  2003. unsigned char PsuPowerLimitedState :1; //bit 1
  2004. unsigned char PsuIdRepeat :1; //bit 2
  2005. unsigned char PsuSevereUnevenCurrent :1; //bit 3
  2006. unsigned char PsuThreePhaseInputInadequate :1; //bit 4
  2007. unsigned char PsuThreePhaseOnputImbalance :1; //bit 5
  2008. unsigned char PsuFfcSideShutDown :1; //bit 6
  2009. unsigned char PsuNoResource:1; //bit 7
  2010. //AlarmVal[10]
  2011. unsigned char RelayboardStestFail :1; //bit 0
  2012. unsigned char FanboardStestFail :1; //bit 1
  2013. unsigned char PrimaryStestFail :1; //bit 2
  2014. unsigned char ChademoboardStestFail :1; //bit 3
  2015. unsigned char CCSboardStestFail :1; //bit 4
  2016. unsigned char AcContactStestFail :1; //bit 5
  2017. unsigned char PsuModuleStestFail :1; //bit 6
  2018. unsigned char ModelNameNoneMatchStestFail:1; //bit 7
  2019. //AlarmVal[11]
  2020. unsigned char CcsOutputUVPFail :1; //bit 0
  2021. unsigned char ChademoOutputUVPFail :1; //bit 1
  2022. unsigned char GbtOutputUVPFail :1; //bit 2
  2023. unsigned char GbtboardStestFail :1; //bit 3
  2024. unsigned char AcConnectorStestFail:1; //bit 4
  2025. unsigned char LedboardStestFail:1; //bit 5
  2026. unsigned char AcSystemInputOVP:1; //bit 6
  2027. unsigned char AcSystemInputUVP:1; //bit 7
  2028. //AlarmVal[12]
  2029. unsigned char ChademoGroundWarning :1; //bit 0
  2030. unsigned char CcsGroundfaultWarning :1; //bit 1
  2031. unsigned char GbGroundfaultWarning :1; //bit 2
  2032. unsigned char SystemAcOutputOCPL2:1; //bit 3
  2033. unsigned char SystemAcOutputOCPL3:1; //bit 4
  2034. unsigned char CircuitShortL2:1; //bit 5
  2035. unsigned char CircuitShortL3:1; //bit 6
  2036. unsigned char :1; //bit 7
  2037. }bits;
  2038. }AlarmEvents;
  2039. };
  2040. char InfoStatusCode[384][6]=
  2041. {
  2042. //Information comes from EVSE
  2043. "013600", //Normal stop charging by user
  2044. "013601", //Charging Time's up
  2045. "013602", //Replace system air filter
  2046. "013603", //Reach to CHAdeMO max. plugging times.
  2047. "013604", //Reach to CCS max. plugging times.
  2048. "013605", //Reach to GB max. plugging times.
  2049. "013606", //Reach to AC max. plugging times.
  2050. "013607", //CSU fimrware update fail
  2051. "013608", //CHAdeMO Module fimrware update fail
  2052. "013609", //CCS Module fimrware update fail
  2053. "013610", //GB Module fimrware update fail
  2054. "013611", //Aux. power module fimrware update fail
  2055. "013612", //Relay control module fimrware update fail
  2056. "013613", //LCM module fimrware update fail
  2057. "013614", //Bluetooth module fimrware update fail
  2058. "013615", //WiFi module fimrware update fail
  2059. "013616", //3G/4G module fimrware update fail
  2060. "013617", //SMR fimrware update fail
  2061. "013618", //RFID module fimrware update fail
  2062. "013619", //configured by USB flash drive
  2063. "013620", //configured by backend
  2064. "013621", //configured by webpage
  2065. "013622", //disconnected from Internet through Ethernet
  2066. "013623", //disconnected from Internet through WiFi
  2067. "013624", //disconnected from Internet through 3G/4G
  2068. "013625", //disconnected from AP through WiFi
  2069. "013626", //disconnected from APN through 3G/4G
  2070. "013627", //Reserved
  2071. "013628", //Reserved
  2072. "013629", //Reserved
  2073. "013630", //Reserved
  2074. "013631", //Reserved
  2075. //Information comes from EV
  2076. "023700", //CHAdeMO EV communication Fail
  2077. "023701", //CCS EV communication Fail
  2078. "023702", //GB EV communication Fail
  2079. "023703", //AC: pilot fault
  2080. "023704", //CHAdeMO: battery malfunction
  2081. "023705", //CHAdeMO: no charging permission
  2082. "023706", //CHAdeMO: battery incompatibility
  2083. "023707", //CHAdeMO: battery OVP
  2084. "023708", //CHAdeMO: battery UVP
  2085. "023709", //CHAdeMO: battery OTP
  2086. "023710", //CHAdeMO: battery current difference
  2087. "023711", //CHAdeMO: battery voltage difference
  2088. "023712", //CHAdeMO: shift position
  2089. "023713", //CHAdeMO: battery other fault
  2090. "023714", //CHAdeMO: charging system error
  2091. "023715", //CHAdeMO: EV normal stop
  2092. "023716", //CHAdeMO: connector temperature sensor broken
  2093. "023717", //CHAdeMO: connector lock fail
  2094. "023718", //CHAdeMO: D1 ON No Receive
  2095. "023719", //CHAdeMO: BMS K to J Timeout
  2096. "023720", //CHAdeMO: BMS Charge Allow Timeout
  2097. "023721", //CHAdeMO: Wait GroundFault Timeout
  2098. "023722", //CHAdeMO: BMS EV Relay Timeout
  2099. "023723", //CHAdeMO: BMS Request Current Timeout
  2100. "023724", //CHAdeMO: BMS K to J OFF Timeout
  2101. "023725", //CHAdeMO: BMS EV Relay OFF Timeout
  2102. "023726", //CHAdeMO: ADC More Than 10V
  2103. "023727", //CHAdeMO: ADC More Than 20V
  2104. "023728", //CHAdeMO: BMS Charge Before Stop
  2105. "023729", //CHAdeMO: Charger Get Normal Stop
  2106. "023730", //CHAdeMO: Charger Get Emergency Stop
  2107. "023731", //CHAdeMO: Isolation Result Fail
  2108. "023732", //CHAdeMO: Miss Link With MotherBoard
  2109. "023733", //CHAdeMO: Output Voltage More Than Limit
  2110. "023734", //CHAdeMO: Request Current More Than Limit
  2111. "023735", //CHAdeMO: Re Cap BMS Eqr Current Exceed
  2112. "023736", //CHAdeMO: Charge Remain Count Down
  2113. "023737", //CCS:CCS_EVCC_EVErrorCode_FAILED_RESSTemperatureInhibit
  2114. "023738", //CCS:CCS_EVCC_EVErrorCode_FAILED_EVShiftPosition
  2115. "023739", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargerConnectorLockFault
  2116. "023740", //CCS:CCS_EVCC_EVErrorCode_FAILED_EVRESSMalfunction
  2117. "023741", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingCurrentdifferential
  2118. "023742", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingVoltageOutOfRange
  2119. "023743", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingSystemIncompatibility
  2120. "023744", //CCS:CCS_EVCC_EVErrorCode_FAILED_EmergencyEvent
  2121. "023745", //CCS:CCS_EVCC_EVErrorCode_FAILED_Breaker
  2122. "023746", //CCS:CCS_EVCC_EVErrorCode_FAILED_NoData
  2123. "023747", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_A
  2124. "023748", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_B
  2125. "023749", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_C
  2126. "023750", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_1
  2127. "023751", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_2
  2128. "023752", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_3
  2129. "023753", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_1
  2130. "023754", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_2
  2131. "023755", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_3
  2132. "023756", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_4
  2133. "023757", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_5
  2134. "023758", //CCS:CCS_SECC_ResponseCode_FAILED_SequenceError
  2135. "023759", //CCS:CCS_SECC_ResponseCode_FAILED_SignatureError
  2136. "023760", //CCS:CCS_SECC_ResponseCode_FAILED_UnknownSession
  2137. "023761", //CCS:CCS_SECC_ResponseCode_FAILED_ServiceIDInvalid
  2138. "023762", //CCS:CCS_SECC_ResponseCode_FAILED_Payment SelectionInvalid
  2139. "023763", //CCS:CCS_SECC_ResponseCode_FAILED_IdentificationSelectionInvalid
  2140. "023764", //CCS:CCS_SECC_ResponseCode_FAILED_ServiceSelectionInvalid
  2141. "023765", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateExpired
  2142. "023766", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateNotYetValid
  2143. "023767", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateRevoked
  2144. "023768", //CCS:CCS_SECC_ResponseCode_FAILED_NoCertificateAvailable
  2145. "023769", //CCS:CCS_SECC_ResponseCode_FAILED_CertChainError
  2146. "023770", //CCS:CCS_SECC_ResponseCode_FAILED_CertValidationError
  2147. "023771", //CCS:CCS_SECC_ResponseCode_FAILED_CertVerificationError
  2148. "023772", //CCS:CCS_SECC_ResponseCode_FAILED_ContractCanceled
  2149. "023773", //CCS:CCS_SECC_ResponseCode_FAILED_ChallengeInvalid
  2150. "023774", //CCS:CCS_SECC_ResponseCode_FAILED_WrongEnergyTransferMode
  2151. "023775", //CCS:CCS_SECC_ResponseCode_FAILED_WrongChargeParameter
  2152. "023776", //CCS:CCS_SECC_ResponseCode_FAILED_ChargingProfileInvalid
  2153. "023777", //CCS:CCS_SECC_ResponseCode_FAILED_TariffSelectionInvalid
  2154. "023778", //CCS:CCS_SECC_ResponseCode_FAILED_EVSEPresentVoltageToLow
  2155. "023779", //CCS:CCS_SECC_ResponseCode_FAILED_PowerDeliveryNotApplied
  2156. "023780", //CCS:CCS_SECC_ResponseCode_FAILED_MeteringSignatureNotValid
  2157. "023781", //CCS:CCS_SECC_ResponseCode_FAILED_NoChargeServiceSelected
  2158. "023782", //CCS:CCS_SECC_ResponseCode_FAILED_ContactorError
  2159. "023783", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateNotAllowedAtThisEVSE
  2160. "023784", //CCS:CCS_SECC_ResponseCode_FAILED_GAChargeStop
  2161. "023785", //CCS:CCS_SECC_ResponseCode_FAILED_AlignmentError
  2162. "023786", //CCS:CCS_SECC_ResponseCode_FAILED_ACDError
  2163. "023787", //CCS:CCS_SECC_ResponseCode_FAILED_AssociationError
  2164. "023788", //CCS:CCS_SECC_ResponseCode_FAILED_EVSEChargeAbort
  2165. "023789", //CCS:CCS_SECC_ResponseCode_FAILED_NoSupportedApp-Protocol-Protocol
  2166. "023790", //CCS:CCS_SECC_ResponseCode_FAILED_ContractNotAccepted
  2167. "023791", //CCS:CCS_SECC_ResponseCode_FAILED_MOUnknown
  2168. "023792", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_Prov_CertificateRevoke
  2169. "023793", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_SubCA1_CertificateRevoked
  2170. "023794", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_SubCA2_CertificateRevoked
  2171. "023795", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_RootCA_CertificateRevoked
  2172. "023796", //CCS:CCS_SECC_ResponseCode_FAILED_MO_Prov_CertificateRevoked
  2173. "023797", //CCS:CCS_SECC_ResponseCode_FAILED_MO_SubCA1_CertificateRevoked
  2174. "023798", //CCS:CCS_SECC_ResponseCode_FAILED_MO_SubCA2_CertificateRevoked
  2175. "023799", //CCS:CCS_SECC_ResponseCode_FAILED_MO_RootCA_CertificateRevoked
  2176. "023800", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_Prov_CertificateRevoked
  2177. "023801", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_SubCA1_CertificateRevoked
  2178. "023802", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_SubCA2_CertificateRevoked
  2179. "023803", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_RootCA_CertificateRevoked
  2180. "023804", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_1
  2181. "023805", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_2
  2182. "023806", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_3
  2183. "023807", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_4
  2184. "023808", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_5
  2185. "023809", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_SLAC_init
  2186. "023810", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_match_response
  2187. "023811", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_match_sequence
  2188. "023812", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_match_MNBC
  2189. "023813", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_EVSE_avg_atten_calc
  2190. "023814", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_match_response
  2191. "023815", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_EVSE_match_session
  2192. "023816", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_assoc_session
  2193. "023817", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_vald_toggle
  2194. "023818", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_1
  2195. "023819", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_2
  2196. "023820", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_3
  2197. "023821", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_4
  2198. "023822", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_5
  2199. "023823", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_UDP_TT_match_join
  2200. "023824", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TCP_TT_match_join
  2201. "023825", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TP_amp_map_exchange
  2202. "023826", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TP_link_ready_notification
  2203. "023827", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_1
  2204. "023828", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_2
  2205. "023829", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_3
  2206. "023830", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_4
  2207. "023831", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_5
  2208. "023832", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SupportedAppProtocolRes
  2209. "023833", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SessionSetupRes
  2210. "023834", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ServiceDiscoveryRes
  2211. "023835", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ServicePaymentSelectionRes
  2212. "023836", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ContractAuthenticationRes
  2213. "023837", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ChargeParameterDiscoveryRes
  2214. "023838", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_PowerDeliveryRes
  2215. "023839", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_CableCheckRes
  2216. "023840", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_PreChargeRes
  2217. "023841", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_CurrentDemandRes
  2218. "023842", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_WeldingDetectionRes
  2219. "023843", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SessionStopRes
  2220. "023844", //CCS:CCS_SECC_TIMEOUT_V2G_Sequence_Time
  2221. "023845", //CCS:CCS_SECC_TIMEOUT_V2G_ReadyToCharge_Performance_Time
  2222. "023846", //CCS:CCS_SECC_TIMEOUT_V2G_CommunicationSetup_Performance_Time
  2223. "023847", //CCS:CCS_SECC_TIMEOUT_V2G_CableCheck_Performance_Time
  2224. "023848", //CCS:CCS_SECC_TIMEOUT_V2G_CPState_Detection_Time
  2225. "023849", //CCS:CCS_SECC_TIMEOUT_V2G_CPOscillator_Retain_Time
  2226. "023850", //CCS:CCS_SECC_TIMEOUT_V2G_PreCharge_Performace_Time
  2227. "023851", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_2
  2228. "023852", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_3
  2229. "023853", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_4
  2230. "023854", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_5
  2231. "023855", //CCS:CCS_CAN_TIMEOUT_TP_GET_EV_TARGET_INFO
  2232. "023856", //CCS:CCS_CAN_TIMEOUT_TT_GET_EV_TARGET_INFO
  2233. "023857", //CCS:CCS_CAN_TIMEOUT_TP_GET_EV_BATTERY_INFO
  2234. "023858", //CCS:CCS_CAN_TIMEOUT_TT_GET_EV_BATTERY_INFO
  2235. "023859", //CCS:CCS_CAN_TIMEOUT_TP_EV_STOP_EVENT
  2236. "023860", //CCS:CCS_CAN_TIMEOUT_TT_EV_STOP_EVENT
  2237. "023861", //CCS:CCS_CAN_TIMEOUT_TP_EVSE_STOP_EVENT
  2238. "023862", //CCS:CCS_CAN_TIMEOUT_TT_EVSE_STOP_EVENT
  2239. "023863", //CCS:CCS_CAN_TIMEOUT_TP_GET_MISC_INFO
  2240. "023864", //CCS:CCS_CAN_TIMEOUT_TT_GET_MISC_INFO
  2241. "023865", //CCS:CCS_CAN_TIMEOUT_TP_DOWNLOAD_REQUEST
  2242. "023866", //CCS:CCS_CAN_TIMEOUT_TT_DOWNLOAD_REQUEST
  2243. "023867", //CCS:CCS_CAN_TIMEOUT_TP_START_BLOCK_TRANSFER
  2244. "023868", //CCS:CCS_CAN_TIMEOUT_TT_START_BLOCK_TRANSFER
  2245. "023869", //CCS:CCS_CAN_TIMEOUT_TP_DATA_TRANSFER
  2246. "023870", //CCS:CCS_CAN_TIMEOUT_TT_DATA_TRANSFER
  2247. "023871", //CCS:CCS_CAN_TIMEOUT_TP_DOWNLOAD_FINISH
  2248. "023872", //CCS:CCS_CAN_TIMEOUT_TT_DOWNLOAD_FINISH
  2249. "023873", //CCS:CCS_CAN_TIMEOUT_TP_ISOLATION_STATUS
  2250. "023874", //CCS:CCS_CAN_TIMEOUT_TT_ISOLATION_STATUS
  2251. "023875", //CCS:CCS_CAN_TIMEOUT_TP_CONNECTOR_INFO
  2252. "023876", //CCS:CCS_CAN_TIMEOUT_TT_CONNECTOR_INFO
  2253. "023877", //CCS:CCS_CAN_TIMEOUT_TT_RTC_INFO
  2254. "023878", //CCS:CCS_CAN_TIMEOUT_TP_RTC_INFO
  2255. "023879", //CCS:CCS_CAN_TIMEOUT_TP_EVSE_PRECHARGE_INFO
  2256. "023880", //CCS:CCS_CAN_TIMEOUT_TT_EVSE_PRECHARGE_INFO
  2257. "023881", //CCS:CCS_CAN_TIMEOUT_MSG_Sequence
  2258. "023882", //CCS:CCS_CAN_MSG_Unrecognized_CMD_ID
  2259. "023883", //CCS:CCS_SECC_DIN_Msg_Decode_Error
  2260. "023884", //CCS:CCS_SECC_DIN_Msg_Encode_Error
  2261. "023885", //CCS:CCS_SECC_ISO1_Msg_Decode_Error
  2262. "023886", //CCS:CCS_SECC_ISO1_Msg_Encode_Error
  2263. "023887", //CCS:CCS_SECC_ISO2_Msg_Decode_Error
  2264. "023888", //CCS:CCS_SECC_ISO2_Msg_Encode_Error
  2265. "023889", //CCS:CCS_SECC_CP_STATUS_Error
  2266. "023890", //CCS:CCS_SECC_Unexpected_60V_Before_Charing_Error
  2267. "023891", //CCS:CCS_SECC_Not_Ready_For_Charging
  2268. "023892", //CCS:CCS_SECCC_TIMEOUT_QCA7000_COMM (The firmware code of QCA7000 may not be installed, yet)
  2269. "023893", //Reserved
  2270. "023894", //Reserved
  2271. "023895", //Reserved
  2272. "023896", //Reserved
  2273. "023897", //Reserved
  2274. "023898", //Reserved
  2275. "023899", //Reserved
  2276. "023900", //GBT: ERROR_CODE_GBT_LOS_CC1
  2277. "023901", //GBT: ERROR_CODE_GBT_CONNECTOR_LOCK_FAIL
  2278. "023902", //GBT: ERROR_CODE_GBT_BATTERY_INCOMPATIBLE
  2279. "023903", //GBT: ERROR_CODE_GBT_BMS_BROAA_TIMEOUT
  2280. "023904", //GBT: ERROR_CODE_GBT_CSU_PRECHARGE_TIMEOUT
  2281. "023905", //GBT: ERROR_CODE_GBT_BMS_PRESENT_VOLTAGE_FAULT
  2282. "023906", //GBT: ERROR_CODE_GBT_BMS_VOLTAGE_OVER_RANGE
  2283. "023907", //GBT: ERROR_CODE_GBT_BSM_CHARGE_ALLOW_00_10MIN_COUUNTDONE
  2284. "023908", //GBT: ERROR_CODE_GBT_WAIT_GROUNDFAULT_TIMEOUT
  2285. "023909", //GBT: ERROR_CODE_GBT_ADC_MORE_THAN_10V
  2286. "023910", //GBT: ERROR_CODE_GBT_ADC_MORE_THAN_60V
  2287. "023911", //GBT: ERROR_CODE_GBT_CHARGER_GET_NORMAL_STOP_CMD
  2288. "023912", //GBT: ERROR_CODE_GBT_CHARGER_GET_EMERGENCY_STOP_CMD
  2289. "023913", //GBT: ERROR_CODE_GBT_ISOLATION_RESULT_FAIL
  2290. "023914", //GBT: ERROR_CODE_GBT_MOTHER_BOARD_MISS_LINK
  2291. "023915", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_LIMIT
  2292. "023916", //GBT: ERROR_CODE_GBT_REQ_CURRENT_MORE_THAN_LIMIT
  2293. "023917", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_10_PERCENT
  2294. "023918", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_DIFF_BCS_5_PERCENT
  2295. "023919", //GBT: ERROR_CODE_GBT_STOP_ADC_MORE_THAN_10V
  2296. "023920", // Reserved
  2297. "023921", // Reserved
  2298. "023922", // Reserved
  2299. "023923", // Reserved
  2300. "023924", // Reserved
  2301. "023925", // Reserved
  2302. "023926", // Reserved
  2303. "023927", // Reserved
  2304. "023928", // Reserved
  2305. "023929", // Reserved
  2306. "023930", //GBT: ERROR_CODE_CEM_BHM_TIMEOUT
  2307. "023931", //GBT: ERROR_CODE_CEM_BRM_TIMEOUT
  2308. "023932", //GBT: ERROR_CODE_CEM_BCP_TIMEOUT
  2309. "023933", //GBT: ERROR_CODE_CEM_BRO_TIMEOUT
  2310. "023934", //GBT: ERROR_CODE_CEM_BCL_TIMEOUT
  2311. "023935", //GBT: ERROR_CODE_CEM_BCS_TIMEOUT
  2312. "023936", //GBT: ERROR_CODE_CEM_BSM_TIMEOUT
  2313. "023937", //GBT: ERROR_CODE_CEM_BST_TIMEOUT
  2314. "023938", //GBT: ERROR_CODE_CEM_BSD_TIMEOUT
  2315. "023939", //GBT: ERROR_CODE_CEM_BEM_OTHER_TIMEOUT
  2316. "023940", //GBT: ERROR_CODE_BEM_CRM_TIMEOUT
  2317. "023941", //GBT: ERROR_CODE_BEM_CRMAA_TIMEOUT
  2318. "023942", //GBT: ERROR_CODE_BEM_CTS_CML_TIMEOUT
  2319. "023943", //GBT: ERROR_CODE_BEM_CRO_TIMEOUT
  2320. "023944", //GBT: ERROR_CODE_BEM_CCS_TIMEOUT
  2321. "023945", //GBT: ERROR_CODE_BEM_CST_TIMEOUT
  2322. "023946", //GBT: ERROR_CODE_BEM_CSD_TIMEOUT
  2323. "023947", //GBT: ERROR_CODE_BEM_BEM_OTHER_TIMEOUT
  2324. "023948", // Reserved
  2325. "023949", // Reserved
  2326. "023950", //GBT: ERROR_CODE_BST_SOC_GOAL
  2327. "023951", //GBT: ERROR_CODE_BST_TOTAL_VOLTAGE_GOAL
  2328. "023952", //GBT: ERROR_CODE_BST_CELL_VOLTAGE_GOAL
  2329. "023953", //GBT: ERROR_CODE_BST_GET_CST
  2330. "023954", //GBT: ERROR_CODE_BST_ISOLATION
  2331. "023955", //GBT: ERROR_CODE_BST_OUTPUT_CONNECTOR_OTP
  2332. "023956", //GBT: ERROR_CODE_BST_COMPONENT
  2333. "023957", //GBT: ERROR_CODE_BST_CHARGE_CONNECTOR
  2334. "023958", //GBT: ERROR_CODE_BST_OTP
  2335. "023959", //GBT: ERROR_CODE_BST_OTHER
  2336. "023960", //GBT: ERROR_CODE_BST_HIGH_V
  2337. "023961", //GBT: ERROR_CODE_BST_CC2
  2338. "023962", //GBT: ERROR_CODE_BST_CURRENT
  2339. "023963", //GBT: ERROR_CODE_BST_VOLTAGE
  2340. "023964", //GBT: ERROR_CODE_GET_BST_NO_REASON
  2341. "023965", // Reserved
  2342. "023966", // Reserved
  2343. "023967", // Reserved
  2344. "023968", // Reserved
  2345. "023969", // Reserved
  2346. "023970", //GBT: ERROR_CODE_BSM_CELL_OVER_VOLTAGE
  2347. "023971", //GBT: ERROR_CODE_BSM_CELL_UNDER_VOLTAGE
  2348. "023972", //GBT: ERROR_CODE_BSM_OVER_SOC
  2349. "023973", //GBT: ERROR_CODE_BSM_UNDER_SOC
  2350. "023974", //GBT: ERROR_CODE_BSM_CURRENT
  2351. "023975", //GBT: ERROR_CODE_BSM_TEMPERATURE
  2352. "023976", //GBT: ERROR_CODE_BSM_ISOLATE
  2353. "023977", //GBT: ERROR_CODE_BSM_OUTPUT_CONNECTOR
  2354. "023978", // Reserved
  2355. "023979", // Reserved
  2356. "033900", //disconnected from backend through Ethernet
  2357. "033901", //disconnected from backend through WiFi
  2358. "033902", //disconnected from backend through 3G/4G
  2359. "033903", //Remote start charging by backend
  2360. "033904", //Remote stop charging by backend
  2361. "033905", //Remote reset by backend
  2362. "033906", //Reserved
  2363. "033907", //Reserved
  2364. };
  2365. struct InfoCodeData
  2366. {
  2367. unsigned char PreviousInfoVal[40];
  2368. union
  2369. {
  2370. unsigned char InfoVal[40];
  2371. struct
  2372. {
  2373. //InfoVal[0]
  2374. unsigned char NormalStopChargingByUser:1; //bit 0
  2375. unsigned char ChargingTimesUp:1; //bit 1
  2376. unsigned char ReplaceSystemAirFilter:1; //bit 2
  2377. unsigned char ReachChademoMaxPluggingTimes:1; //bit 3
  2378. unsigned char ReachCcsMaxPluggingTimes:1; //bit 4
  2379. unsigned char ReachGbMaxPluggingTimes:1; //bit 5
  2380. unsigned char ReachAcMaxPluggingTimes:1; //bit 6
  2381. unsigned char CsuFimrwareUpdateFail:1; //bit 7
  2382. //InfoVal[1]
  2383. unsigned char ChademoModuleFimrwareUpdateFail:1; //bit 0
  2384. unsigned char CcsModuleFimrwareUpdateFail:1; //bit 1
  2385. unsigned char GbModuleFimrwareUpdateFail:1; //bit 2
  2386. unsigned char AuxPowerModuleFimrwareUpdateFail:1; //bit 3
  2387. unsigned char RelayBoardFimrwareUpdateFail:1; //bit 4
  2388. unsigned char LcmModuleFimrwareUpdateFail:1; //bit 5
  2389. unsigned char BluetoothModuleFimrwareUpdateFail:1; //bit 6
  2390. unsigned char WiFiModuleFimrwareUpdateFail:1; //bit 7
  2391. //InfoVal[2]
  2392. unsigned char Telocom4GModuleFimrwareUpdateFail:1; //bit 0
  2393. unsigned char PsuFimrwareUpdateFail:1; //bit 1
  2394. unsigned char RfidModuleFimrwareUpdateFail:1; //bit 2
  2395. unsigned char ConfiguredByUsbFlashDrive:1; //bit 3
  2396. unsigned char ConfiguredByBackend:1; //bit 4
  2397. unsigned char ConfiguredByWebpage:1; //bit 5
  2398. unsigned char InternetDisconnectViaEthernet:1; //bit 6
  2399. unsigned char InternetDisconnectViaWiFi :1; //bit 7
  2400. //InfoVal[3]
  2401. unsigned char InternetDisconnectVia4Gi:1; //bit 0
  2402. unsigned char ApDisconnectViaWiFi:1; //bit 1
  2403. unsigned char ApnDisconnectVia4Gi:1; //bit 2
  2404. unsigned char :5; //bit 3~7 reserved
  2405. //InfoVal[4]
  2406. unsigned char ChademoEvCommFail:1; //bit 0
  2407. unsigned char CcsEvCommFail:1; //bit 1
  2408. unsigned char GbEvCommFail:1; //bit 2
  2409. unsigned char PilotFault:1; //bit 3
  2410. unsigned char ChademoBatteryMalfun:1; //bit 4
  2411. unsigned char ChademoNoPermission:1; //bit 5
  2412. unsigned char ChademoBatteryIncompatibility:1; //bit 6
  2413. unsigned char ChademoBatteryOVP:1; //bit 7
  2414. //InfoVal[5]
  2415. unsigned char ChademoBatteryUVP:1; //bit 0
  2416. unsigned char ChademoBatteryOTP:1; //bit 1
  2417. unsigned char ChademoBatteryCurrentDiff:1; //bit 2
  2418. unsigned char ChademoBatteryVoltageDiff:1; //bit 3
  2419. unsigned char ChademoShiftPosition:1; //bit 4
  2420. unsigned char ChademoBatteryOtherFault:1; //bit 5
  2421. unsigned char ChademoChargingSystemError:1; //bit 6
  2422. unsigned char ChademoEvNormalStop:1; //bit 7
  2423. //InfoVal[6]
  2424. unsigned char ChademoTempSensorBroken:1; //bit 0
  2425. unsigned char ChademoConnectorLockFail:1; //bit 1
  2426. unsigned char ChademoD1OnNoReceive:1; //bit 2
  2427. unsigned char ChademoBmsKtoJTimeout:1; //bit 3
  2428. unsigned char ChademoBmsChargeAllowTimeout:1; //bit 4
  2429. unsigned char ChademoWaitGfdTimeout:1; //bit 5
  2430. unsigned char ChademoBmsEvRelayTimeout:1; //bit 6
  2431. unsigned char ChademoBmsReqCurrentTimeout:1; //bit 7
  2432. //InfoVal[7]
  2433. unsigned char ChademoBmsKtoJOffTimeout :1; //bit 0
  2434. unsigned char ChademoBmsEvRelayOffTimeout :1; //bit 1
  2435. unsigned char ChademoAdcMoreThan10V :1; //bit 2
  2436. unsigned char ChademoAdcMoreThan20V :1; //bit 3
  2437. unsigned char ChademoBmsChargeBeforeStop :1; //bit 4
  2438. unsigned char ChademoChargerGetNormalStop :1; //bit 5
  2439. unsigned char ChademoChargerGetEmergencyStop :1; //bit 6
  2440. unsigned char ChademoIsolationResultFail :1; //bit 7
  2441. //InfoVal[8]
  2442. unsigned char ChademoMissLinkWithMotherBoard :1; //bit 0
  2443. unsigned char ChademoOutputVolMoreThanLimit :1; //bit 1
  2444. unsigned char ChademoReqCurrentMoreThanLimit :1; //bit 2
  2445. unsigned char ChademoReCapBmsEqrCurrentExceed :1; //bit 3
  2446. unsigned char ChademoChargeRemainCountDown :1; //bit 4
  2447. unsigned char CcsRESTemperatureInhibit:1; //bit 5
  2448. unsigned char CcsEVShiftPosition:1; //bit 6
  2449. unsigned char CcsChargerConnectorLockFault:1; //bit 7
  2450. //InfoVal[9]
  2451. unsigned char CcsEVRESSMalfunction:1; //bit 0
  2452. unsigned char CcsChargingCurrentdifferential:1; //bit 1
  2453. unsigned char CcsChargingVoltageOutOfRange:1; //bit 2
  2454. unsigned char CcsChargingSystemIncompatibility:1; //bit 3
  2455. unsigned char CcsEmergencyEvent:1; //bit 4
  2456. unsigned char CcsBreaker:1; //bit 5
  2457. unsigned char CcsNoData:1; //bit 6
  2458. unsigned char Ccsreserved_by_DIN_A:1; //bit 7
  2459. //InfoVal[10]
  2460. unsigned char Ccsreserved_by_DIN_B:1; //bit 0
  2461. unsigned char Ccsreserved_by_DIN_C:1; //bit 1
  2462. unsigned char Ccsreserved_by_ISO_1:1; //bit 2
  2463. unsigned char Ccsreserved_by_ISO_2:1; //bit 3
  2464. unsigned char Ccsreserved_by_ISO_3:1; //bit 4
  2465. unsigned char Ccsreserved_by_OEM_1:1; //bit 5
  2466. unsigned char Ccsreserved_by_OEM_2:1; //bit 6
  2467. unsigned char Ccsreserved_by_OEM_3:1; //bit 7
  2468. //InfoVal[11]
  2469. unsigned char Ccsreserved_by_OEM_4:1; //bit 0
  2470. unsigned char Ccsreserved_by_OEM_5:1; //bit 1
  2471. unsigned char CcsSequenceError:1; //bit 2
  2472. unsigned char CcsSignatureError:1; //bit 3
  2473. unsigned char CcsUnknownSession:1; //bit 4
  2474. unsigned char CcsServiceIDInvalid:1; //bit 5
  2475. unsigned char CcsPaymentSelectionInvalid:1; //bit 6
  2476. unsigned char CcsIdentificationSelectionInvalid:1; //bit 7
  2477. //InfoVal[12]
  2478. unsigned char CcsServiceSelectionInvalid:1; //bit 0
  2479. unsigned char CcsCertificateExpired:1; //bit 1
  2480. unsigned char CcsCertificateNotYetValid:1; //bit 2
  2481. unsigned char CcsCertificateRevoked:1; //bit 3
  2482. unsigned char CcsNoCertificateAvailable:1; //bit 4
  2483. unsigned char CcsCertChainError:1; //bit 5
  2484. unsigned char CcsCertValidationError:1; //bit 6
  2485. unsigned char CcsCertVerificationError:1; //bit 7
  2486. //InfoVal[13]
  2487. unsigned char CcsContractCanceled:1; //bit 0
  2488. unsigned char CcsChallengeInvalid:1; //bit 1
  2489. unsigned char CcsWrongEnergyTransferMode:1; //bit 2
  2490. unsigned char CcsWrongChargeParameter:1; //bit 3
  2491. unsigned char CcsChargingProfileInvalid:1; //bit 4
  2492. unsigned char CcsTariffSelectionInvalid:1; //bit 5
  2493. unsigned char CcsEVSEPresentVoltageToLow:1; //bit 6
  2494. unsigned char CcsPowerDeliveryNotApplied:1; //bit 7
  2495. //InfoVal[14]
  2496. unsigned char CcsMeteringSignatureNotValid:1; //bit 0
  2497. unsigned char CcsNoChargeServiceSelected:1; //bit 1
  2498. unsigned char CcsContactorError:1; //bit 2
  2499. unsigned char CcsCertificateNotAllowedAtThisEVSE:1; //bit 3
  2500. unsigned char CcsGAChargeStop:1; //bit 4
  2501. unsigned char CcsAlignmentError:1; //bit 5
  2502. unsigned char CcsACDError:1; //bit 6
  2503. unsigned char CcsAssociationError:1; //bit 7
  2504. //InfoVal[15]
  2505. unsigned char CcsEVSEChargeAbort:1; //bit 0
  2506. unsigned char CcsNoSupportedAppProtocol:1; //bit 1
  2507. unsigned char CcsContractNotAccepted:1; //bit 2
  2508. unsigned char CcsMOUnknown:1; //bit 3
  2509. unsigned char CcsOEM_Prov_CertificateRevoke:1; //bit 4
  2510. unsigned char CcsOEM_SubCA1_CertificateRevoked:1; //bit 5
  2511. unsigned char CcsOEM_SubCA2_CertificateRevoked:1; //bit 6
  2512. unsigned char CcsOEM_RootCA_CertificateRevoked:1; //bit 7
  2513. //InfoVal[16]
  2514. unsigned char CcsMO_Prov_CertificateRevoked:1; //bit 0
  2515. unsigned char CcsMO_SubCA1_CertificateRevoked:1; //bit 1
  2516. unsigned char CcsMO_SubCA2_CertificateRevoked:1; //bit 2
  2517. unsigned char CcsMO_RootCA_CertificateRevoked:1; //bit 3
  2518. unsigned char CcsCPS_Prov_CertificateRevoked:1; //bit 4
  2519. unsigned char CcsCPS_SubCA1_CertificateRevoked:1; //bit 5
  2520. unsigned char CcsCPS_SubCA2_CertificateRevoked:1; //bit 6
  2521. unsigned char CcsCPS_RootCA_CertificateRevoked:1; //bit 7
  2522. //InfoVal[17]
  2523. unsigned char :5; //bit 0~4 reserved
  2524. unsigned char CcsTT_EVSE_SLAC_init:1; //bit 5
  2525. unsigned char CcsTP_match_response:1; //bit 6
  2526. unsigned char CcsTT_match_sequence:1; //bit 7
  2527. //InfoVal[18]
  2528. unsigned char CcsTT_EVSE_match_MNBC:1; //bit 0
  2529. unsigned char CcsTP_EVSE_avg_atten_calc:1; //bit 1
  2530. unsigned char CcsTT_match_response:1; //bit 2
  2531. unsigned char CcsTP_EVSE_match_session:1; //bit 3
  2532. unsigned char CcsTT_EVSE_assoc_session:1; //bit 4
  2533. unsigned char CcsTT_EVSE_vald_toggle:1; //bit 5
  2534. unsigned char :2; //bit 6~7 reserved
  2535. //InfoVal[19]
  2536. unsigned char :3; //bit 0~2 reserved
  2537. unsigned char CcsUDP_TT_match_join:1; //bit 3
  2538. unsigned char CcsTCP_TT_match_join:1; //bit 4
  2539. unsigned char CcsTP_amp_map_exchange:1; //bit 5
  2540. unsigned char CcsTP_link_ready_notification:1; //bit 6
  2541. unsigned char :1; //bit 7 resetved
  2542. //InfoVal[20]
  2543. unsigned char :4; //bit 0~3 reserved
  2544. unsigned char CcsSupportedAppProtocolRes:1; //bit 4
  2545. unsigned char CcsSessionSetupRes:1; //bit 5
  2546. unsigned char CcsServiceDiscoveryRes:1; //bit 6
  2547. unsigned char CcsServicePaymentSelectionRes:1; //bit 7
  2548. //InfoVal[21]
  2549. unsigned char CcsContractAuthenticationRes:1; //bit 0
  2550. unsigned char CcsChargeParameterDiscoveryRes:1; //bit 1
  2551. unsigned char CcsPowerDeliveryRes:1; //bit 2
  2552. unsigned char CcsCableCheckRes:1; //bit 3
  2553. unsigned char CcsPreChargeRes:1; //bit 4
  2554. unsigned char CcsCurrentDemandRes:1; //bit 5
  2555. unsigned char CcsWeldingDetectionRes:1; //bit 6
  2556. unsigned char CcsSessionStopRes:1; //bit 7
  2557. //InfoVal[22]
  2558. unsigned char CcsSequence_Time:1; //bit 0
  2559. unsigned char CcsReadyToCharge_Performance_Time:1; //bit 1
  2560. unsigned char CcsCommunicationSetup_Performance_Time:1; //bit 2
  2561. unsigned char CcsCableCheck_Performance_Time:1; //bit 3
  2562. unsigned char CcsCPState_Detection_Time:1; //bit 4
  2563. unsigned char CcsCPOscillator_Retain_Time:1; //bit 5
  2564. unsigned char CcsSeccTimeoutV2GPreChargePerformaceTime:1; //bit 6
  2565. unsigned char :1; //bit 7 reserved
  2566. //InfoVal[23]
  2567. unsigned char :3; //bit 0~2 reserved
  2568. unsigned char CcsTP_GET_EV_TARGET_INFO:1; //bit 3
  2569. unsigned char CcsTT_GET_EV_TARGET_INFO:1; //bit 4
  2570. unsigned char CcsTP_GET_EV_BATTERY_INFO:1; //bit 5
  2571. unsigned char CcsTT_GET_EV_BATTERY_INFO:1; //bit 6
  2572. unsigned char CcsTP_EV_STOP_EVENT:1; //bit 7
  2573. //InfoVal[24]
  2574. unsigned char CcsTT_EV_STOP_EVENT:1; //bit 0
  2575. unsigned char CcsTP_EVSE_STOP_EVENT:1; //bit 1
  2576. unsigned char CcsTT_EVSE_STOP_EVENT:1; //bit 2
  2577. unsigned char CcsTP_GET_MISC_INFO:1; //bit 3
  2578. unsigned char CcsTT_GET_MISC_INFO:1; //bit 4
  2579. unsigned char CcsTP_DOWNLOAD_REQUEST:1; //bit 5
  2580. unsigned char CcsTT_DOWNLOAD_REQUEST:1; //bit 6
  2581. unsigned char CcsTP_START_BLOCK_TRANSFER:1; //bit 7
  2582. //InfoVal[25]
  2583. unsigned char CcsTT_START_BLOCK_TRANSFER:1; //bit 0
  2584. unsigned char CcsTP_DATA_TRANSFER:1; //bit 1
  2585. unsigned char CcsTT_DATA_TRANSFER:1; //bit 2
  2586. unsigned char CcsTP_DOWNLOAD_FINISH:1; //bit 3
  2587. unsigned char CcsTT_DOWNLOAD_FINISH:1; //bit 4
  2588. unsigned char CcsTP_ISOLATION_STATUS:1; //bit 5
  2589. unsigned char CcsTT_ISOLATION_STATUS:1; //bit 6
  2590. unsigned char CcsTP_CONNECTOR_INFO:1; //bit 7
  2591. //InfoVal[26]
  2592. unsigned char CcsTT_CONNECTOR_INFO:1; //bit 0
  2593. unsigned char CcsTT_RTC_INFO:1; //bit 1
  2594. unsigned char CcsTP_RTC_INFO:1; //bit 2
  2595. unsigned char CcsTP_EVSE_PRECHARGE_INFO:1; //bit 3
  2596. unsigned char CcsTT_EVSE_PRECHARGE_INFO:1; //bit 4
  2597. unsigned char CcsMSG_Sequence:1; //bit 5
  2598. unsigned char CcsCAN_MSG_Unrecognized_CMD_ID:1; //bit 6
  2599. unsigned char CcsDIN_Msg_Decode_Error:1; //bit 7
  2600. //InfoVal[27]
  2601. unsigned char CcsDIN_Msg_Encode_Error:1; //bit 0
  2602. unsigned char CcsISO1_Msg_Decode_Error:1; //bit 1
  2603. unsigned char CcsISO1_Msg_Encode_Error:1; //bit 2
  2604. unsigned char CcsISO2_Msg_Decode_Error:1; //bit 3
  2605. unsigned char CcsISO2_Msg_Encode_Error:1; //bit 4
  2606. unsigned char CcsCpStatus_Error:1; //bit 5
  2607. unsigned char CcsUnexpectVolBeforeCharing_Error:1; //bit 6
  2608. unsigned char CcsSeccNotReadyForCharging:1; //bit 7 reserved
  2609. //InfoVal[28]
  2610. unsigned char CcsSeccTimeoutQCA7000Comm:1; //bit 0
  2611. unsigned char :7; //bit 1~7 reserved
  2612. //InfoVal[29]
  2613. unsigned char ERROR_CODE_GBT_LOS_CC1 :1; //bit 0
  2614. unsigned char ERROR_CODE_GBT_CONNECTOR_LOCK_FAIL :1; //bit 1
  2615. unsigned char ERROR_CODE_GBT_BATTERY_INCOMPATIBLE :1; //bit 2
  2616. unsigned char ERROR_CODE_GBT_BMS_BROAA_TIMEOUT :1; //bit 3
  2617. unsigned char ERROR_CODE_GBT_CSU_PRECHARGE_TIMEOUT :1; //bit 4
  2618. unsigned char ERROR_CODE_GBT_BMS_PRESENT_VOLTAGE_FAULT :1; //bit 5
  2619. unsigned char ERROR_CODE_GBT_BMS_VOLTAGE_OVER_RANGE :1; //bit 6
  2620. unsigned char ERROR_CODE_GBT_BSM_CHARGE_ALLOW_00_10MIN_COUUNTDONE :1; //bit 7
  2621. //InfoVal[30]
  2622. unsigned char ERROR_CODE_GBT_WAIT_GROUNDFAULT_TIMEOUT :1; //bit 0
  2623. unsigned char ERROR_CODE_GBT_ADC_MORE_THAN_10V :1; //bit 1
  2624. unsigned char ERROR_CODE_GBT_ADC_MORE_THAN_60V :1; //bit 2
  2625. unsigned char ERROR_CODE_GBT_CHARGER_GET_NORMAL_STOP_CMD :1; //bit 3
  2626. unsigned char ERROR_CODE_GBT_CHARGER_GET_EMERGENCY_STOP_CMD :1; //bit 4
  2627. unsigned char ERROR_CODE_GBT_ISOLATION_RESULT_FAIL :1; //bit 5
  2628. unsigned char ERROR_CODE_GBT_MOTHER_BOARD_MISS_LINK :1; //bit 6
  2629. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_LIMIT :1; //bit 7
  2630. //InfoVal[31]
  2631. unsigned char ERROR_CODE_GBT_REQ_CURRENT_MORE_THAN_LIMIT :1; //bit 0
  2632. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_10_PERCENT :1; //bit 1
  2633. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_DIFF_BCS_5_PERCENT :1; //bit 2
  2634. unsigned char ERROR_CODE_GBT_STOP_ADC_MORE_THAN_10V :1; //bit 3
  2635. unsigned char :4; //bit 4 ~ 7 reserved
  2636. //InfoVal[32]
  2637. unsigned char :6; //bit 0 ~ 5 reserved
  2638. unsigned char ERROR_CODE_CEM_BHM_TIMEOUT :1; //bit 6
  2639. unsigned char ERROR_CODE_CEM_BRM_TIMEOUT :1; //bit 7
  2640. //InfoVal[33]
  2641. unsigned char ERROR_CODE_CEM_BCP_TIMEOUT :1; //bit 0
  2642. unsigned char ERROR_CODE_CEM_BRO_TIMEOUT :1; //bit 1
  2643. unsigned char ERROR_CODE_CEM_BCL_TIMEOUT :1; //bit 2
  2644. unsigned char ERROR_CODE_CEM_BCS_TIMEOUT :1; //bit 3
  2645. unsigned char ERROR_CODE_CEM_BSM_TIMEOUT :1; //bit 4
  2646. unsigned char ERROR_CODE_CEM_BST_TIMEOUT :1; //bit 5
  2647. unsigned char ERROR_CODE_CEM_BSD_TIMEOUT :1; //bit 6
  2648. unsigned char ERROR_CODE_CEM_BEM_OTHER_TIMEOUT :1; //bit 7
  2649. //InfoVal[34]
  2650. unsigned char ERROR_CODE_BEM_CRM_TIMEOUT :1; //bit 0
  2651. unsigned char ERROR_CODE_BEM_CRMAA_TIMEOUT :1; //bit 1
  2652. unsigned char ERROR_CODE_BEM_CTS_CML_TIMEOUT :1; //bit 2
  2653. unsigned char ERROR_CODE_BEM_CRO_TIMEOUT :1; //bit 3
  2654. unsigned char ERROR_CODE_BEM_CCS_TIMEOUT :1; //bit 4
  2655. unsigned char ERROR_CODE_BEM_CST_TIMEOUT :1; //bit 5
  2656. unsigned char ERROR_CODE_BEM_CSD_TIMEOUT :1; //bit 6
  2657. unsigned char ERROR_CODE_BEM_BEM_OTHER_TIMEOUT :1; //bit 7
  2658. //InfoVal[35]
  2659. unsigned char :2; //bit 0 ~ 1
  2660. unsigned char ERROR_CODE_BST_SOC_GOAL :1; //bit 2
  2661. unsigned char ERROR_CODE_BST_TOTAL_VOLTAGE_GOAL :1; //bit 3
  2662. unsigned char ERROR_CODE_BST_CELL_VOLTAGE_GOAL :1; //bit 4
  2663. unsigned char ERROR_CODE_BST_GET_CST :1; //bit 5
  2664. unsigned char ERROR_CODE_BST_ISOLATION :1; //bit 6
  2665. unsigned char ERROR_CODE_BST_OUTPUT_CONNECTOR_OTP :1; //bit 7
  2666. //InfoVal[36]
  2667. unsigned char ERROR_CODE_BST_COMPONENT :1; //bit 0
  2668. unsigned char ERROR_CODE_BST_CHARGE_CONNECTOR :1; //bit 1
  2669. unsigned char ERROR_CODE_BST_OTP :1; //bit 2
  2670. unsigned char ERROR_CODE_BST_OTHER :1; //bit 3
  2671. unsigned char ERROR_CODE_BST_HIGH_V :1; //bit 4
  2672. unsigned char ERROR_CODE_BST_CC2 :1; //bit 5
  2673. unsigned char ERROR_CODE_BST_CURRENT :1; //bit 6
  2674. unsigned char ERROR_CODE_BST_VOLTAGE :1; //bit 7
  2675. //InfoVal[37]
  2676. unsigned char ERROR_CODE_GET_BST_NO_REASON :1; //bit 0
  2677. unsigned char :5; //bit 1 ~ 5 reserved
  2678. unsigned char ERROR_CODE_BSM_CELL_OVER_VOLTAGE :1; //bit 6
  2679. unsigned char ERROR_CODE_BSM_CELL_UNDER_VOLTAGE :1; //bit 7
  2680. //InfoVal[38]
  2681. unsigned char ERROR_CODE_BSM_OVER_SOC :1; //bit 0
  2682. unsigned char ERROR_CODE_BSM_UNDER_SOC :1; //bit 1
  2683. unsigned char ERROR_CODE_BSM_CURRENT :1; //bit 2
  2684. unsigned char ERROR_CODE_BSM_TEMPERATURE :1; //bit 3
  2685. unsigned char ERROR_CODE_BSM_ISOLATE :1; //bit 4
  2686. unsigned char ERROR_CODE_BSM_OUTPUT_CONNECTOR :1; //bit 5
  2687. unsigned char :2; //bit 6 ~ 7 reserved
  2688. //InfoVal[39]
  2689. unsigned char BackendDisconnectedViaEthernet:1; //bit 0
  2690. unsigned char BackendDisconnectViaWiFi:1; //bit 1
  2691. unsigned char BackendDisconnectVia4G:1; //bit 2
  2692. unsigned char BackendRemoteStart:1; //bit 3
  2693. unsigned char BackendRemoteStop:1; //bit 4
  2694. unsigned char BackendRemoteReset:1; //bit 5
  2695. unsigned char :2; //bit 6 ~ 7 reserved
  2696. }bits;
  2697. }InfoEvents;
  2698. };
  2699. struct StatusCodeData
  2700. {
  2701. struct FaultCodeData FaultCode;
  2702. struct AlarmCodeData AlarmCode;
  2703. struct InfoCodeData InfoCode;
  2704. };
  2705. /**************************************************************************************/
  2706. /**************************PSU Share memory***************************************/
  2707. /**************************************************************************************/
  2708. struct PsuModuleVer
  2709. {
  2710. unsigned char FwPrimaryVersion[16];
  2711. unsigned char FwSecondVersion[16];
  2712. };
  2713. /*Following are the information for each PSU module*/
  2714. struct PsuModuleData
  2715. {
  2716. unsigned char AssignID;
  2717. unsigned char PhysicalID;
  2718. unsigned char GroupID;
  2719. unsigned char Address;
  2720. unsigned char FireWireIndex;
  2721. unsigned char FwVersion[16];
  2722. unsigned char SerialNumber[32];
  2723. unsigned char StateMachine; //0: Identification, 1:Operation, 2: Alarm, 3: Failure, s4:Upgrade
  2724. unsigned char OutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  2725. unsigned short FanSpeed_1; //RPM
  2726. unsigned short FanSpeed_2; //RPM
  2727. unsigned short FanSpeed_3; //RPM
  2728. unsigned short FanSpeed_4; //RPM
  2729. unsigned short InputVoltage_Type; //0x00 = Line to Line Vol, 0x01 = Line to Neutral Vol
  2730. unsigned short InputVoltageL1; //abcd=abc.d volt
  2731. unsigned short InputVoltageL2; //abcd=abc.d volt
  2732. unsigned short InputVoltageL3; //abcd=abc.d volt
  2733. unsigned short InputCurrentL1; //abcd=abc.d amp
  2734. unsigned short InputCurrentL2; //abcd=abc.d amp
  2735. unsigned short InputCurrentL3; //abcd=abc.d amp
  2736. unsigned short PresentOutputVoltage; //abcd=abc.d volt
  2737. unsigned short PresentOutputCurrent; //abcd=abc.d amp
  2738. unsigned short AvailableCurrent; //abcd=abc.d amp
  2739. unsigned int AvailablePower; //Watt
  2740. char CriticalTemp1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2741. char CriticalTemp2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2742. char CriticalTemp3; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2743. char ExletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2744. char InletTemp_1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2745. char InletTemp_2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2746. char InletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2747. char OutletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  2748. unsigned int AlarmCode;
  2749. unsigned int FaultCode; //
  2750. unsigned int IAvailableCurrent; //abcd=abc.d amp
  2751. };
  2752. /*Following are the information for each PSU Group*/
  2753. struct PsuGroupData
  2754. {
  2755. unsigned char GroupPresentPsuQuantity;
  2756. unsigned char GroupOutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  2757. unsigned short GroupTargetOutputVoltage; //abcd=abc.d volt
  2758. unsigned short GroupTargetOutputCurrent; //abcd=abc.d amp
  2759. unsigned short GroupAvailableCurrent; //abcd=abc.d amp
  2760. unsigned int GroupAvailablePower; //Watt
  2761. unsigned short GroupPresentOutputVoltage; //abcd=abc.d volt
  2762. unsigned short GroupPresentOutputCurrent; //abcd=abc.d Amps
  2763. unsigned int GroupPresentOutputPower; //Watt
  2764. struct PsuModuleData PsuModule[MAX_PSU_QUANTITY];
  2765. };
  2766. /*Following is the information for system all PSU*/
  2767. struct PsuData
  2768. {
  2769. unsigned char SystemPresentPsuQuantity;
  2770. unsigned short SystemAvailableCurrent; //abcd=abc.d amp
  2771. unsigned int SystemAvailablePower; //Watt
  2772. struct PsuGroupData PsuGroup[4];
  2773. unsigned char GroupCount;
  2774. unsigned char Work_Step;
  2775. struct PsuModuleVer PsuVersion[MAX_PSU_QUANTITY];
  2776. };
  2777. /************************************************************************************/
  2778. /**************************CHAdeMO protocol Share memory*********************/
  2779. /**************************************************************************************/
  2780. struct CHAdeMOEvData
  2781. {
  2782. unsigned char SupportDynamicControl; //110.0
  2783. // bit0=1:supported
  2784. unsigned char SupportHighCurrent; //110.0
  2785. // bit1=1:supported
  2786. unsigned char MiniChargeCurrent; //100.0 0~200(A) (unit:1A)
  2787. // 0x00: request for current equivalent to 1.5kW
  2788. // 0x01: no request
  2789. // 0x02: request of 1A and following are the same rule
  2790. unsigned short MaxiBatteryVoltage; //100.5,100.4 0~600(V) (unit:1V)
  2791. unsigned short MaxiChargingTime; //101.2,101.1 10(sec.)~255(min.) (Unit:sec)
  2792. // Set 0xFF to 101.1 (Unit: 10sec) in case 101.2 (Unit: 1min) is used
  2793. unsigned char EstimatChargingTime; //101.3 0~254(min.) (Unit:sec)
  2794. // Display Only
  2795. unsigned short TotalBatteryCapacity; //101.6,101.5 0.1~6553.5(kWh) (unit:0.1 kWh)
  2796. unsigned char ProtocolVersion; //102.0 0~255
  2797. // 0x02: CHAdeMO specification ver.1.2
  2798. unsigned short TargetBatteryVoltage; //102.2,102.1 0~600(V) (unit:1V)
  2799. unsigned short ChargingCurrentRequest; //102.3 0~200(A) (unit:1A)
  2800. //110.2,110.1 0~1023(A) (unit:1A)
  2801. unsigned char BatteryAlarm; //102.4 >0:alarm
  2802. // bit0=1:Battery overvoltage
  2803. // bit1=1:Battery undervoltage
  2804. // bit2=1:Battery current deviation error
  2805. // bit3=1:High battery temperature
  2806. // bit4=1:Battery voltage deviation error
  2807. unsigned char EvDetection; //102.5
  2808. // bit0=0:Vehicle charging disabled, (stop charging)
  2809. // bit0=1:Vehicle charging enabled,
  2810. // bit1=0:¡§Parking¡¨ position
  2811. // bit1=1:other position (stop charging)
  2812. // bit2=0:Charging system normal
  2813. // bit2=1:Charging system error (stop charging)
  2814. // bit3=0:EV contactor close or during welding detection
  2815. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  2816. // bit4=0:No stop request before charging
  2817. // bit4=1:Normal stop request before charging (stop charging)
  2818. unsigned char SOC; //102.6 0~100(%) (unit:%)
  2819. // Display Only
  2820. unsigned char Communicating; // it is true if receive EV CAN message within every 1500ms
  2821. unsigned char PresentMsgFlowStatus; //
  2822. };
  2823. struct CHAdeMOEvseData
  2824. {
  2825. unsigned char SelfTest_Comp;
  2826. unsigned char version[16]; //Chademo firmware version
  2827. unsigned char SupportDynamicControl; //118.0
  2828. // bit0=1:supported
  2829. unsigned char SupportHighCurrent; //118.0
  2830. // bit1=1:supported
  2831. unsigned short AvailableOutputVoltage; //108.2,108.1 0~600(V) (unit:1V)
  2832. unsigned short AvailableOutputCurrent; //108.3 0~255(A) (unit:1A)
  2833. //118.2,118.1 0~1023(A) (unit:1A)
  2834. unsigned short ThresholdVoltage; //108.5,108.4 0~600(V) (unit:1V)
  2835. unsigned char ConnectorTemperatureP; //108.6 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  2836. unsigned char ConnectorTemperatureN; //108.7 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  2837. unsigned char ProtocolVersion; //109.0 0~255
  2838. // 0x00: CHAdeMO specification 0.9 and earlier
  2839. // 0x01: CHAdeMO specification 0.9 and 0.9.1
  2840. // 0x02: CHAdeMO specification 1.0.0, 1.0.1, 1.1 and 1.2
  2841. unsigned short PresentOutputVoltage; //109.2,109.1 0~600(V) (unit:1V)
  2842. unsigned short PresentOutputCurrent; //109.3 0~255(A) (unit:1A)
  2843. //118.4,118.3 0~1023(A) (unit:1A)
  2844. unsigned char EvseDetection; //109.5
  2845. // bit0=0:not charging state now
  2846. // bit0=1:charging state now
  2847. // bit1=0:EVSE normal
  2848. // bit1=1:EVSE error
  2849. // bit2=0:Not Energizing state
  2850. // bit2=1:Energizing state
  2851. // bit3=0:No Battery incompatibility
  2852. // bit3=1:Battery incompatibility
  2853. // bit4=0:No Charging system error
  2854. // bit4=1:Charging system error
  2855. // bit5=0:No Charging stop control
  2856. // bit5=1:Charging stop control
  2857. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  2858. // Set 0xFF to 109.6 (Unit: 10sec) in case 109.7 (Unit: 1min) is used
  2859. unsigned char HighPowerCondition; //118.5
  2860. // bit0=0:Present charging current H¡¦118.3,H¡¦118.4¡¨ is less than or equal to rated current of a charging cable
  2861. // bit0=1:Present charging current H¡¦118.3,H¡¦118.4¡¨ is exceeds to rated current of a charging cable
  2862. // bit1=1:charging cable Cooling function Operating Installed
  2863. // bit2=1:charging cable Current limiting function
  2864. // bit3=1:charging connector Cooling function Operating
  2865. // bit4=1:charging connector Current limiting function Installed
  2866. // bit5=1:charging connector Over-temperature protection Installed
  2867. // bit6=1:Functional safety Applied
  2868. unsigned int MaxiGroupPower; // XXXXXXXX (Unit:Watt)depend on which group to be used
  2869. unsigned int MaxiGroupCurrent; // XXXXXXXX (unit:1A)depend on which group to be used
  2870. unsigned short ApplyOutputVoltage; // 0~600(V) (unit:1V)
  2871. unsigned short ElapseChargingTime; // (Unit:sec)
  2872. unsigned short ElapseEnergy; // (Unit:10xkWh)
  2873. unsigned char EvboardStatus; // 0 : init
  2874. };
  2875. struct CHAdeMOData
  2876. {
  2877. struct CHAdeMOEvData ev[CHAdeMO_QUANTITY];
  2878. struct CHAdeMOEvseData evse[CHAdeMO_QUANTITY];
  2879. };
  2880. /************************************************************************************/
  2881. /**************************GBT protocol Share memory*********************/
  2882. /**************************************************************************************/
  2883. struct GBTEvData
  2884. {
  2885. unsigned short MaxiBatteryVoltage; // 0~600(V) (unit:1V)
  2886. unsigned short MaxiChargingTime; // 10(sec.)~255(min.) (Unit:sec)
  2887. unsigned char EstimatChargingTime; // 0~254(min.) (Unit:sec)
  2888. unsigned short TotalBatteryCapacity; // 0.1~6553.5(kWh) (unit:0.1 kWh)
  2889. unsigned char ProtocolVersion; // 0~255
  2890. unsigned short TargetBatteryVoltage; // 0~600(V) (unit:1V)
  2891. unsigned short ChargingCurrentRequest; // 0~200(A) (unit:1A)
  2892. // 0~1023(A) (unit:1A)
  2893. unsigned char EvDetection; //102.5
  2894. // bit0=0:Vehicle charging disabled, (stop charging)
  2895. // bit0=1:Vehicle charging enabled,
  2896. // bit1=0:¡§Parking¡¨ position
  2897. // bit1=1:other position (stop charging)
  2898. // bit2=0:Charging system normal
  2899. // bit2=1:Charging system error (stop charging)
  2900. // bit3=0:EV contactor close or during welding detection
  2901. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  2902. // bit4=0:No stop request before charging
  2903. // bit4=1:Normal stop request before charging (stop charging)
  2904. unsigned char SOC; //102.6 0~100(%) (unit:%)
  2905. // Display Only
  2906. unsigned char PresentMsgFlowStatus; //
  2907. };
  2908. struct GBTEvseData
  2909. {
  2910. unsigned char SelfTest_Comp;
  2911. unsigned char version[16]; // GBT firmware version
  2912. unsigned short AvailableOutputVoltage; // 0~600(V) (unit:1V)
  2913. unsigned short AvailableOutputCurrent; // 0~255(A) (unit:1A)
  2914. unsigned char ConnectorTemperatureP; // -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  2915. unsigned char ConnectorTemperatureN; // -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  2916. unsigned short PresentOutputVoltage; // 0~600(V) (unit:1V)
  2917. unsigned short PresentOutputCurrent; // 0~255(A) (unit:1A)
  2918. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  2919. unsigned char EvboardStatus; // 0 : init
  2920. };
  2921. struct GBTData
  2922. {
  2923. struct GBTEvData ev[GB_QUANTITY];
  2924. struct GBTEvseData evse[GB_QUANTITY];
  2925. };
  2926. /************************************************************************************/
  2927. /**************************CCS protocol Share memory***************************/
  2928. /**************************DIN70121: 201412***************************************/
  2929. /**************************ISO15118_2014: 2014************************************/
  2930. /**************************ISO15118_2018: 2018************************************/
  2931. /************************************************************************************/
  2932. typedef enum boolean { FALSE, TRUE } BOOL;
  2933. enum ResponseCodeType_DIN70121 { OK_DIN70121 = 0, OK_NewSessionEstablished_DIN70121 = 1, OK_OldSessionJoined_DIN70121 = 2, OK_CertificateExpiresSoon_DIN70121 = 3,
  2934. FAILED_DIN70121 = 4, FAILED_SequenceError_DIN70121 = 5, FAILED_ServiceIDInvalid_DIN70121 = 6, FAILED_UnknownSession_DIN70121 = 7,
  2935. FAILED_ServiceSelectionInvalid_DIN70121 = 8, FAILED_PaymentSelectionInvalid_DIN70121 = 9, FAILED_CertificateExpired_DIN70121 = 10,
  2936. FAILED_SignatureError_DIN70121 = 11, FAILED_NoCertificateAvailable_DIN70121 = 12, FAILED_CertChainError_DIN70121 = 13, FAILED_ChallengeInvalid_DIN70121 = 14,
  2937. FAILED_ContractCanceled_DIN70121 = 15, FAILED_WrongChargeParameter_DIN70121 = 16, FAILED_PowerDeliveryNotApplied_DIN70121 = 17,
  2938. FAILED_TariffSelectionInvalid_DIN70121 = 18, FAILED_ChargingProfileInvalid_DIN70121 = 19, FAILED_EVSEPresentVoltageToLow_DIN70121 = 20,
  2939. FAILED_MeteringSignatureNotValid_DIN70121 = 21, FAILED_WrongEnergyTransferType_DIN70121 = 22};
  2940. enum ResponseCodeType_ISO15118_2014 { OK_ISO15118_2014 = 0, OK_NewSessionEstablished_ISO15118_2014 = 1, OK_OldSessionJoined_ISO15118_2014 = 2, OK_CertificateExpiresSoon_ISO15118_2014 = 3,
  2941. FAILED_ISO15118_2014 = 4, FAILED_SequenceError_ISO15118_2014 = 5, FAILED_ServiceIDInvalid_ISO15118_2014 = 6, FAILED_UnknownSession_ISO15118_2014 = 7,
  2942. FAILED_ServiceSelectionInvalid_ISO15118_2014 = 8, FAILED_PaymentSelectionInvalid_ISO15118_2014 = 9, FAILED_CertificateExpired_ISO15118_2014 = 10,
  2943. FAILED_SignatureError_ISO15118_2014 = 11, FAILED_NoCertificateAvailable_ISO15118_2014 = 12, FAILED_CertChainError_ISO15118_2014 = 13, FAILED_ChallengeInvalid_ISO15118_2014 = 14,
  2944. FAILED_ContractCanceled_ISO15118_2014 = 15, FAILED_WrongChargeParameter_ISO15118_2014 = 16, FAILED_PowerDeliveryNotApplied_ISO15118_2014 = 17,
  2945. FAILED_TariffSelectionInvalid_ISO15118_2014 = 18, FAILED_ChargingProfileInvalid_ISO15118_2014 = 19, FAILED_MeteringSignatureNotValid_ISO15118_2014 = 20,
  2946. FAILED_NoChargeServiceSelected_ISO15118_2014 = 21, FAILED_WrongEnergyTransferMode_ISO15118_2014 = 22, FAILED_ContactorError_ISO15118_2014 = 23,
  2947. FAILED_CertificateNotAllowedAtThisEVSE_ISO15118_2014 = 24, FAILED_CertificateRevoked_ISO15118_2014 = 25 };
  2948. enum ResponseCodeType_ISO15118_2018 { OK_ISO15118_2018 = 0, OK_NewSessionEstablished_ISO15118_2018 = 1, OK_OldSessionJoined_ISO15118_2018 = 2, OK_CertificateExpiresSoon_ISO15118_2018 = 3,
  2949. OK_IsolationValid_ISO15118_2018 = 4, OK_IsolationWarning_ISO15118_2018 = 5, WARNING_CertificateExpired_ISO15118_2018 = 6, WARNING_NoCertificateAvailable_ISO15118_2018 = 7,
  2950. WARNING_CertValidationError_ISO15118_2018 = 8, WARNING_CertVerificationError_ISO15118_2018 = 9, WARNING_ContractCanceled_ISO15118_2018 = 10,
  2951. FAILED_ISO15118_2018 = 11, FAILED_SequenceError_ISO15118_2018 = 12, FAILED_ServiceIDInvalid_ISO15118_2018 = 13, FAILED_UnknownSession_ISO15118_2018 = 14,
  2952. FAILED_ServiceSelectionInvalid_ISO15118_2018 = 15, FAILED_SignatureError_ISO15118_2018 = 16, FAILED_IdentificationSelectionInvalid_ISO15118_2018 = 17,
  2953. FAILED_ChallengeInvalid_ISO15118_2018 = 18, FAILED_WrongChargeParameter_ISO15118_2018 = 19, FAILED_IsolationFault_ISO15118_2018 = 20,
  2954. FAILED_PowerDeliveryNotApplied_ISO15118_2018 = 21, FAILED_TariffSelectionInvalid_ISO15118_2018 = 22, FAILED_ChargingProfileInvalid_ISO15118_2018 = 23,
  2955. FAILED_MeteringSignatureNotValid_ISO15118_2018 = 24, FAILED_NoChargeServiceSelected_ISO15118_2018 = 25, FAILED_WrongEnergyTransferMode_ISO15118_2018 = 26,
  2956. FAILED_ContactorError_ISO15118_2018 = 27, FAILED_CertificateRevoked_ISO15118_2018 = 28, FAILED_CertificateNotYetValid_ISO15118_2018 = 29 };
  2957. enum EVSENotificationType { None = 0, StopCharging = 1, ReNegotiation = 2};
  2958. enum ServiceCategoryType { EVCharging = 0, Internet = 1, ContractCertificate = 2, OtherCustom = 3};
  2959. enum PaymentOptionType { Contract = 0, ExternalPayment = 1};
  2960. /*enum EVSESupportedEnergyTransferType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  2961. DC_combo_core = 4, DC_dual = 5, AC_core1p_DC_extended = 6, AC_single_DC_core = 7,
  2962. AC_single_phase_three_phase_core_DC_extended = 8, AC_core3p_DC_extended = 9};*/
  2963. enum EnergyTransferModeType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  2964. DC_combo_core = 4, DC_unique = 5};
  2965. //enum identificationOptionType { Contract = 0, ExternalIdentification = 1};
  2966. enum unitSymbolType_DIN70121 { h_DIN70121 = 0, m_DIN70121 = 1, s_DIN70121 = 2, A_DIN70121 = 3, Ah_DIN70121 = 4, V_DIN70121 = 5, VA_DIN70121 = 6, W_DIN70121 = 7, Ws_DIN70121 = 8, Wh_DIN70121 = 9};
  2967. enum unitSymbolType_ISO15118_2014 { h_ISO15118_2014 = 0, m_ISO15118_2014 = 1, s_ISO15118_2014 = 2, A_ISO15118_2014 = 3, V_ISO15118_2014 = 4, W_ISO15118_2014 = 5, Wh_ISO15118_2014 = 6};
  2968. enum ProcessingType { Finished = 0, Ongoing = 1, Ongoing_WaitingForCustomerInteraction = 2};
  2969. enum EVSEProcessingType_DIN70121 { Finished_DIN70121 = 0, Ongoing_DIN70121 = 1};
  2970. enum EVSEProcessingType_ISO15118_2014 { Finished_ISO15118_2014 = 0, Ongoing_ISO15118_2014 = 1, Ongoing_WaitingForCustomerInteraction_ISO15118_2014=2 };
  2971. enum DC_EVErrorCodeType { NO_ERROR = 0, FAILED_RESSTemperatureInhibit = 1, FAILED_EVShiftPosition = 2, FAILED_ChargerConnectorLockFault = 3,
  2972. FAILED_EVRESSMalfunction = 4, FAILED_ChargingCurrentdifferential = 5, FAILED_ChargingVoltageOutOfRange = 6,
  2973. Reserved_A = 7, Reserved_B = 8, Reserved_C = 9, FAILED_ChargingSystemIncompatibility = 10, NoData = 11};
  2974. enum IsolationLevelType_DIN70121 { Invalid_DIN70121 = 0, Valid_DIN70121 = 1, Warning_DIN70121 = 2, Fault_DIN70121 = 3};
  2975. enum IsolationLevelType_ISO15118_2014 { Invalid_ISO15118_2014 = 0, Valid_ISO15118_2014 = 1, Warning_ISO15118_2014 = 2, Fault_ISO15118_2014 = 3, No_IMD_ISO15118_2014 = 4};
  2976. enum DC_EVSEStatusCodeType { EVSE_NotReady = 0, EVSE_Ready = 1, EVSE_Shutdown = 2, EVSE_UtilityInterruptEvent = 3,
  2977. EVSE_IsolationMonitoringActive = 4, EVSE_EmergencyShutdown = 5, EVSE_Malfunction = 6,
  2978. Reserved_8 = 7, Reserved_9 = 8};
  2979. enum ScheduleOriginType { EV = 0, SA = 1};
  2980. enum ChargeProgressType_ISO15118_2014 {start_ISO15118_2014 = 0, Stop_ISO15118_2014 = 1, Renegotiate_ISO15118_2014 = 2};
  2981. enum ChargeProgressType_ISO15118_2018 {start_ISO15118_2018 = 0, Renegotiate_ISO15118_2018 = 1, Standby_ISO15118_2018 = 2, Stop_ISO15118_2018 = 3};
  2982. enum evOperationType {Charge = 0, Discharge = 1, Standby = 2};
  2983. enum mechanicalChargingDeviceStatusType {Home = 0, Moving = 1, EndPosition = 2};
  2984. enum EV_CP_StatusType {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5};
  2985. enum EV_Error_Status_CodeType { No_EV_Error = 0, EV_FAILED_EmergencyEvent = 1, EV_FAILED_Breaker = 2, EV_FAILED_RESSTemperatureInhibit = 3,
  2986. EV_FAILED_RESS = 4, EV_FAILED_ChargingCurrentDifferential = 5, EV_FAILED_ChargingVoltageOutOfRange = 6,
  2987. Reserved_by_ISO_1 = 7, Reserved_by_ISO_2 = 8, Reserved_by_ISO_3 = 9, OEM1 = 10,
  2988. OEM2 = 11, OEM3 = 12, OEM4 = 13};
  2989. enum IsolationStatusType { Invalid = 0, Safe = 1, Warning = 2, Fault = 3};
  2990. enum ChargingSessionType { Terminate = 0, Pause = 1};
  2991. enum CostKindType { relativePricePercentage = 0, RenewableGenerationPercentage = 1, CarbonDioxideEmission = 2};
  2992. struct PhysicalValueType_DIN70121 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  2993. {
  2994. int Multiplier; //range: -3..+3
  2995. enum unitSymbolType_DIN70121 Unit;
  2996. short Value;
  2997. };
  2998. struct PhysicalValueType_ISO15118_2014 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  2999. {
  3000. int Multiplier; //range: -3..+3
  3001. enum unitSymbolType_ISO15118_2014 Unit;
  3002. short Value;
  3003. };
  3004. struct PhysicalValueType_ISO15118_2018 //The final physical value is determined by: Value * 10 ^ Exponent [Unit]
  3005. {
  3006. int Exponent; //range: -3..+3
  3007. short Value;
  3008. };
  3009. struct AppProtocolType
  3010. {
  3011. unsigned char ProtocolNamespace[100];
  3012. unsigned int VersionNumberMajor;
  3013. unsigned int VersionNumberMinor;
  3014. unsigned char SchemaID;
  3015. unsigned char Priority; //range 1..20
  3016. };
  3017. struct ACD_SSEnergyTransferModeType
  3018. {
  3019. unsigned char EVID[20];
  3020. };
  3021. struct EVSEStatusType
  3022. {
  3023. unsigned short NotificationMaxDelay; //in seconds
  3024. enum EVSENotificationType EVSENotification;
  3025. };
  3026. struct ServiceIDListType
  3027. {
  3028. unsigned short ServiceID[10]; //refer to chapter 8.6.2.1 Table 192
  3029. };
  3030. struct PaymentOptionListType
  3031. {
  3032. enum PaymentOptionType PaymentOption[2];
  3033. };
  3034. struct ServiceTagType
  3035. {
  3036. unsigned short ServiceID;
  3037. unsigned char ServiceName[32];//Optional Element
  3038. enum ServiceCategoryType ServiceCategory;
  3039. unsigned char ServiceScope[32];//Optional Element
  3040. };
  3041. struct ServiceType_DIN70121
  3042. {
  3043. struct ServiceTagType ServiceTag;
  3044. BOOL FreeService;
  3045. };
  3046. struct ServiceType_ISO15118_2014
  3047. {
  3048. unsigned short ServiceID;
  3049. unsigned char ServiceName[32]; //Optional
  3050. enum ServiceCategoryType ServiceCategory;
  3051. unsigned char ServiceScope[64]; //Optional
  3052. BOOL FreeService;
  3053. };
  3054. /*struct ServiceType_ISO15118_2018
  3055. {
  3056. unsigned short ServiceID;
  3057. BOOL FreeService;
  3058. }; */
  3059. struct SupportedEnergyTransferModeType
  3060. {
  3061. enum EnergyTransferModeType EnergyTransferMode[6];
  3062. };
  3063. struct ServiceChargeType
  3064. {
  3065. struct ServiceType_DIN70121 Services;
  3066. //enum EVSESupportedEnergyTransferType EnergyTransferType;
  3067. enum EnergyTransferModeType EnergyTransferType;
  3068. };
  3069. struct ChargeServiceType
  3070. {
  3071. struct ServiceType_ISO15118_2014 Services;
  3072. struct SupportedEnergyTransferModeType SupportedEnergyTransferMode;
  3073. };
  3074. struct ServiceListType
  3075. {
  3076. struct ServiceType_ISO15118_2014 Service[8];
  3077. };
  3078. struct IdentificationOptionListType
  3079. {
  3080. enum PaymentOptionType IdentificationOption[2];
  3081. };
  3082. struct ParameterType
  3083. {
  3084. unsigned char Name[32];
  3085. struct PhysicalValueType_ISO15118_2014 PhysicalValue_ISO15118_2014;
  3086. struct PhysicalValueType_ISO15118_2018 PhysicalValue_ISO15118_2018;
  3087. };
  3088. struct ParameterSetType
  3089. {
  3090. short ParameterSetID;
  3091. struct ParameterType Parameter[16];
  3092. };
  3093. struct ServiceParameterListType
  3094. {
  3095. struct ParameterSetType ParameterSet[255];
  3096. };
  3097. struct WPT_SDlEnergyTransferModeType
  3098. {
  3099. struct ServiceParameterListType ServiceParameterList;
  3100. };
  3101. struct SelectedServiceType
  3102. {
  3103. unsigned short ServiceID;
  3104. short ParameterSetID;
  3105. };
  3106. struct SelectedServiceListType
  3107. {
  3108. struct SelectedServiceType SelectedService[16];
  3109. };
  3110. struct CertificateChainType
  3111. {
  3112. unsigned char Id[32]; //Optional
  3113. unsigned char Certificate[800]; //check size again
  3114. unsigned char SubCertificates[4][800]; //Optional, check size again
  3115. };
  3116. struct PNC_AReqIdentificationModeType
  3117. {
  3118. unsigned char GenChallenge[16]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  3119. unsigned char Id[32]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  3120. };
  3121. struct AC_EVChargeParameterType
  3122. {
  3123. unsigned int DepartureTime; //Optional
  3124. struct PhysicalValueType_ISO15118_2014 EAmount;
  3125. struct PhysicalValueType_ISO15118_2014 EVMaxVoltage;
  3126. struct PhysicalValueType_ISO15118_2014 EVMaxCurrent;
  3127. struct PhysicalValueType_ISO15118_2014 EVMinCurrent;
  3128. };
  3129. struct DC_EVStatusType_DIN70121
  3130. {
  3131. BOOL EVReady;
  3132. BOOL EVCabinConditioning;
  3133. BOOL EVRESSConiditioning;
  3134. enum DC_EVErrorCodeType EVErrorCode;
  3135. unsigned char EVRESSSOC; /*0-100 percentage*/
  3136. };
  3137. struct DC_EVChargeParameterType_DIN70121
  3138. {
  3139. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  3140. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;
  3141. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  3142. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;
  3143. struct PhysicalValueType_DIN70121 EVEnergyCapacity; //Optional
  3144. struct PhysicalValueType_DIN70121 EVEnergyRequest; //Optional
  3145. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  3146. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  3147. };
  3148. struct DC_EVStatusType_ISO15118_2014
  3149. {
  3150. BOOL EVReady;
  3151. enum DC_EVErrorCodeType EVErrorCode;
  3152. unsigned char EVRESSSOC; /*0-100 percentage*/
  3153. };
  3154. struct DC_EVChargeParameterType_ISO15118_2014
  3155. {
  3156. unsigned int DepartureTime; //Optional
  3157. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  3158. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;
  3159. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  3160. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;
  3161. struct PhysicalValueType_ISO15118_2014 EVEnergyCapacity; //Optional
  3162. struct PhysicalValueType_ISO15118_2014 EVEnergyRequest; //Optional
  3163. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  3164. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  3165. };
  3166. struct Dynamic_CPDReqControlModeType
  3167. {
  3168. unsigned int DepartureTime;
  3169. };
  3170. struct RelativeTimeIntervalType
  3171. {
  3172. unsigned int duration; //Optional
  3173. unsigned int start;
  3174. };
  3175. struct PMaxScheduleEntryType
  3176. {
  3177. struct RelativeTimeIntervalType RelativeTimeInterval;
  3178. unsigned short PMax;
  3179. };
  3180. struct PMaxScheduleType
  3181. {
  3182. unsigned short PMaxScheduleID; //no this itme in ISO15118_2014
  3183. struct PMaxScheduleEntryType PMaxScheduleEntry[1024];
  3184. };
  3185. struct CostType
  3186. {
  3187. unsigned int amount;
  3188. enum CostKindType costKind;
  3189. int amountMultiplier; //Optional , range: -3..+3
  3190. };
  3191. struct ConsumptionCostType
  3192. {
  3193. struct CostType Cost[3];
  3194. struct PhysicalValueType_ISO15118_2014 startValue;
  3195. };
  3196. struct SalesTariffEntryType
  3197. {
  3198. struct RelativeTimeIntervalType RelativeTimeInterval;
  3199. unsigned char EPriceLevel; //Optional
  3200. struct ConsumptionCostType ConsumptionCost[3]; //Optional
  3201. };
  3202. struct SalesTariffType
  3203. {
  3204. unsigned char Id[32]; //Optional
  3205. short SalesTariffID;
  3206. unsigned char SalesTariffDescription[32]; //Optional
  3207. unsigned char NumEPriceLevels; //Optional
  3208. struct SalesTariffEntryType SalesTariffEntry[1024];
  3209. };
  3210. struct SAScheduleTupleType
  3211. {
  3212. short SAScheduleTupleID;
  3213. struct PMaxScheduleType PMaxSchedule;
  3214. struct SalesTariffType SalesTariff; //Optional
  3215. };
  3216. struct ScheduleListType
  3217. {
  3218. enum ScheduleOriginType ScheduleOrigin;
  3219. struct SAScheduleTupleType ScheduleTuple[3];
  3220. };
  3221. struct Scheduled_CPDReqControlModeType
  3222. {
  3223. enum ProcessingType EVProcessing;
  3224. unsigned int DepartureTime; //Optional
  3225. unsigned short MaxSupportingPoints;
  3226. struct ScheduleListType ScheduleList; //Optional
  3227. };
  3228. struct AC_CPDReqEnergyTransferModeType
  3229. {
  3230. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  3231. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  3232. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  3233. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  3234. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  3235. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  3236. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  3237. };
  3238. struct DC_CPDReqEnergyTransferModeType
  3239. {
  3240. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  3241. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower; //Optional
  3242. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  3243. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  3244. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  3245. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  3246. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  3247. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  3248. unsigned char TargetSOC; //Optional
  3249. unsigned char BulkSOC; //Optional
  3250. };
  3251. struct BPT_AC_CPDReqEnergyTransferModeType
  3252. {
  3253. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  3254. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  3255. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  3256. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  3257. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  3258. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  3259. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  3260. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  3261. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  3262. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  3263. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  3264. };
  3265. struct BPT_DC_CPDReqEnergyTransferModeType
  3266. {
  3267. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  3268. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;
  3269. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  3270. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  3271. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  3272. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  3273. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  3274. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  3275. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  3276. struct PhysicalValueType_ISO15118_2018 EVMinimumVoltage;
  3277. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  3278. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  3279. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  3280. unsigned char TargetSOC; //Optional
  3281. unsigned char BulkSOC; //Optional
  3282. };
  3283. struct WPT_CPDReqEnergyTransferModeType
  3284. {
  3285. struct PhysicalValueType_ISO15118_2018 EVMaximumPower; //Optional
  3286. struct PhysicalValueType_ISO15118_2018 EVMinimumPower; //Optional
  3287. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  3288. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  3289. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  3290. };
  3291. struct ACD_CPDReqEnergyTransferModeType
  3292. {
  3293. //cannot be found in standard
  3294. };
  3295. struct SAScheduleListType
  3296. {
  3297. struct SAScheduleTupleType SAScheduleTuple[3];
  3298. };
  3299. struct DC_EVSEStatusType_DIN70121
  3300. {
  3301. enum IsolationLevelType_DIN70121 EVSEIsolationStatus; //Optional
  3302. enum DC_EVSEStatusCodeType EVSEStatusCode;
  3303. unsigned int NotificationMaxDelay;
  3304. enum EVSENotificationType EVSENotification;
  3305. };
  3306. struct DC_EVSEChargeParameterType_DIN70121
  3307. {
  3308. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3309. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;
  3310. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  3311. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;
  3312. struct PhysicalValueType_DIN70121 EVSEMinimumCurrentLimit;
  3313. struct PhysicalValueType_DIN70121 EVSEMinimumVoltageLimit;
  3314. struct PhysicalValueType_DIN70121 EVSECurrentRegulationTolerance; //Optional
  3315. struct PhysicalValueType_DIN70121 EVSEPeakCurrentRipple;
  3316. struct PhysicalValueType_DIN70121 EVSEEnergyToBeDelivered; //Optional
  3317. };
  3318. struct AC_EVSEStatusType
  3319. {
  3320. BOOL RCD;
  3321. unsigned short NotificationMaxDelay;
  3322. enum EVSENotificationType EVSENotification; //need to be confirmed
  3323. };
  3324. struct AC_EVSEChargeParameterType
  3325. {
  3326. struct AC_EVSEStatusType AC_EVSEStatus;
  3327. struct PhysicalValueType_ISO15118_2014 EVSENominalVoltage;
  3328. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;
  3329. };
  3330. struct DC_EVSEStatusType_ISO15118_2014
  3331. {
  3332. unsigned short NotificationMaxDelay;
  3333. enum EVSENotificationType EVSENotification;
  3334. enum IsolationLevelType_ISO15118_2014 EVSEIsolationStatus; //Optional
  3335. enum DC_EVSEStatusCodeType DC_EVSEStatusCode;
  3336. };
  3337. struct DC_EVSEChargeParameterType_ISO15118_2014
  3338. {
  3339. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3340. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;
  3341. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;
  3342. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;
  3343. struct PhysicalValueType_ISO15118_2014 EVSEMinimumCurrentLimit;
  3344. struct PhysicalValueType_ISO15118_2014 EVSEMinimumVoltageLimit;
  3345. struct PhysicalValueType_ISO15118_2014 EVSECurrentRegulationTolerance; //Optional
  3346. struct PhysicalValueType_ISO15118_2014 EVSEPeakCurrentRipple;
  3347. struct PhysicalValueType_ISO15118_2014 EVSEEnergyToBeDelivered; //Optional
  3348. };
  3349. struct Scheduled_CPDResControlModeType
  3350. {
  3351. struct ScheduleListType ScheduleList;
  3352. };
  3353. struct AC_CPDResEnergyTransferModeType
  3354. {
  3355. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  3356. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  3357. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  3358. };
  3359. struct DC_CPDResEnergyTransferModeType
  3360. {
  3361. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  3362. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  3363. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  3364. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  3365. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  3366. };
  3367. struct BPT_AC_CPDResEnergyTransferModeType
  3368. {
  3369. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  3370. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent[3];
  3371. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  3372. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  3373. };
  3374. struct BPT_DC_CPDResEnergyTransferModeType
  3375. {
  3376. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  3377. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargePower;
  3378. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  3379. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent;
  3380. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  3381. struct PhysicalValueType_ISO15118_2018 EVSEMinimumDischargeCurrent;
  3382. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  3383. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  3384. };
  3385. struct WPT_CPDResEnergyTransferModeType
  3386. {
  3387. struct PhysicalValueType_ISO15118_2018 EVSEMaximumPower;
  3388. struct PhysicalValueType_ISO15118_2018 EVSEMinimumPower;
  3389. };
  3390. struct ACD_CPDResEnergyTransferModeType
  3391. {
  3392. //not found in ISO15118_2018
  3393. };
  3394. struct ProfileEntryType_DIN70121
  3395. {
  3396. unsigned int ChargingProfileEntryStart;
  3397. short ChargingProfileEntryMaxPower;
  3398. };
  3399. struct ChargingProfileType_DIN70121
  3400. {
  3401. short SAScheduleTupleID;
  3402. struct ProfileEntryType_DIN70121 ProfileEntry[24];
  3403. };
  3404. struct DC_EVPowerDeliveryParameterType_DIN70121
  3405. {
  3406. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  3407. BOOL BulkChargingComplete; //Optional
  3408. BOOL ChargingComplete;
  3409. };
  3410. struct ProfileEntryType_ISO15118_2014
  3411. {
  3412. unsigned int ChargingProfileEntryStart;
  3413. struct PhysicalValueType_ISO15118_2018 ChargingProfileEntryMaxPower;
  3414. unsigned char ChargingProfileEntryMaxNumberOfPhasesInUse; //Optional
  3415. };
  3416. struct ChargingProfileType_ISO15118_2014
  3417. {
  3418. struct ProfileEntryType_ISO15118_2014 ProfileEntry[24];
  3419. };
  3420. struct DC_EVPowerDeliveryParameterType_ISO15118_2014
  3421. {
  3422. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  3423. BOOL BulkChargingComplete; //Optional
  3424. BOOL ChargingComplete;
  3425. };
  3426. struct TimeInterval
  3427. {
  3428. unsigned int start;
  3429. unsigned int duration; //Optional
  3430. };
  3431. struct PowerScheduleEntryType
  3432. {
  3433. struct TimeInterval TimeInterval;
  3434. struct PhysicalValueType_ISO15118_2018 Power[3];
  3435. };
  3436. struct EVPowerProfileType
  3437. {
  3438. struct PowerScheduleEntryType EVPowerProfileEntry[2048];
  3439. };
  3440. struct Scheduled_PDReqControlModeType
  3441. {
  3442. unsigned char ScheduleTupleID;
  3443. struct EVPowerProfileType EVPowerProfile;
  3444. };
  3445. struct BPT_Scheduled_PDReqControlModeType
  3446. {
  3447. unsigned char ScheduleTupleID;
  3448. struct EVPowerProfileType EVPowerProfile; //Optional
  3449. enum evOperationType EVOperation;
  3450. };
  3451. struct ListOfRootCertificateIDsType
  3452. {
  3453. unsigned char RootCertificateID[20][40];
  3454. };
  3455. struct ContractSignatureEncryptedPrivateKeyType
  3456. {
  3457. unsigned char Id[32];
  3458. };
  3459. struct DiffieHellmanPublickeyType
  3460. {
  3461. unsigned char Id[32];
  3462. };
  3463. struct ContractCertificateEncryptedPrivateKeyType
  3464. {
  3465. unsigned char Id[32];
  3466. };
  3467. struct EVTechnicalStatusType
  3468. {
  3469. BOOL EV_Status_ReadyToCharge;
  3470. BOOL EV_Status_ImmobilizationRequest; //Optional
  3471. BOOL EV_Status_Immobilized;
  3472. struct PhysicalValueType_ISO15118_2018 EV_Status_WLAN_Strength;
  3473. enum EV_CP_StatusType EV_CP_Status;
  3474. unsigned char EV_Status_RESSSOC; //0~100%
  3475. enum EV_Error_Status_CodeType EV_Error_Status_Code;
  3476. BOOL EVSE_Timeout;
  3477. };
  3478. struct MeterInfoType_ISO15118_2014
  3479. {
  3480. unsigned char MeterID[32];
  3481. unsigned long MeterReading; //Optional
  3482. unsigned char SigMeterReading[64]; //Optional
  3483. short MeterStatus; //Optional
  3484. short TMeter; //Optional
  3485. };
  3486. struct Scheduled_MRReqControlModeType
  3487. {
  3488. unsigned char ScheduleTupleID;
  3489. };
  3490. struct MeterInfoType_ISO15118_2018
  3491. {
  3492. unsigned char MeterID[32];
  3493. unsigned long MeterReadingWhCharged; //Optional
  3494. unsigned long MeterReadingWhDischarged; //Optional
  3495. unsigned long MeterReadingVARhLeading; //Optional
  3496. unsigned long MeterReadingVARhLagging; //Optional
  3497. unsigned char SignatureMeterReading[64]; //Optional
  3498. short MeterStatus; //Optional
  3499. short TimeStampMeter; //Optional
  3500. BOOL ReceiptRequired; //Optional
  3501. };
  3502. struct PnC_CLReqIdentificationModeType
  3503. {
  3504. BOOL MeteringReceiptRequested;
  3505. };
  3506. struct Dynamic_CSReqControlModeType
  3507. {
  3508. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  3509. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  3510. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  3511. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  3512. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  3513. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  3514. };
  3515. struct Scheduled_CSReqControlModeType
  3516. {
  3517. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  3518. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  3519. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  3520. BOOL Standby;
  3521. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  3522. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent; //Optional
  3523. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent; //Optional
  3524. };
  3525. struct DisplayParametersType
  3526. {
  3527. unsigned short CurrentRange;
  3528. unsigned char CurrentSOC; //0~100%
  3529. unsigned char MinimumSOC; //0~100%
  3530. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMaximumSOC;
  3531. struct PhysicalValueType_ISO15118_2018 RemainingTimeToTargetSOC;
  3532. struct PhysicalValueType_ISO15118_2018 RemainingTimeToBulkSOC;
  3533. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMinimumSOC;
  3534. BOOL ChargingComplete;
  3535. BOOL BulkChargingComplete;
  3536. BOOL InletHot;
  3537. };
  3538. struct PnC_CLResIdentificationModeType
  3539. {
  3540. struct MeterInfoType_ISO15118_2018 MeterInfo;
  3541. };
  3542. struct Dynamic_CSResControlModeType
  3543. {
  3544. struct PhysicalValueType_ISO15118_2018 EVSETargetActivePower;
  3545. };
  3546. struct Scheduled_CDResControlModeType
  3547. {
  3548. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  3549. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  3550. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage; //Optional
  3551. };
  3552. struct LFA_EVFinePositioningSetupParametersType
  3553. {
  3554. unsigned char NumberOfSensors;
  3555. //NOT complete yet, to be continue.....
  3556. };
  3557. /****SupportedAppProtocolRequest****/
  3558. struct SupportedAppProtocolRequest_DIN70121
  3559. {
  3560. struct AppProtocolType AppProtocol[20];
  3561. };
  3562. struct SupportedAppProtocolRequest_ISO15118_2014
  3563. {
  3564. struct AppProtocolType AppProtocol[20];
  3565. };
  3566. struct SupportedAppProtocolRequest_ISO15118_2018
  3567. {
  3568. struct AppProtocolType AppProtocol[20];
  3569. };
  3570. /****SupportedAppProtocolResponse****/
  3571. struct SupportedAppProtocolResponse_DIN70121
  3572. {
  3573. enum ResponseCodeType_DIN70121 ResponseCode;
  3574. unsigned char SchemaID; //Optional
  3575. };
  3576. struct SupportedAppProtocolResponse_ISO15118_2014
  3577. {
  3578. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3579. unsigned char SchemaID; //Optional
  3580. };
  3581. struct SupportedAppProtocolResponse_ISO15118_2018
  3582. {
  3583. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3584. unsigned char SchemaID; //Optional
  3585. };
  3586. /****SessionSetupRequest****/
  3587. struct SessionSetupRequest_DIN70121
  3588. {
  3589. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  3590. };
  3591. struct SessionSetupRequest_ISO15118_2014
  3592. {
  3593. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  3594. };
  3595. struct SessionSetupRequest_ISO15118_2018
  3596. {
  3597. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  3598. struct ACD_SSEnergyTransferModeType ACD_SSEnergyTransferMode; //For ACD mandatory, optional for rest
  3599. };
  3600. /****SessionSetupResponse****/
  3601. struct SessionSetupResponse_DIN70121
  3602. {
  3603. enum ResponseCodeType_DIN70121 ResponseCode;
  3604. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3605. unsigned int EVSETimeStamp; //EPOCH format, Optional
  3606. };
  3607. struct SessionSetupResponse_ISO15118_2014
  3608. {
  3609. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3610. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3611. unsigned int EVSETimeStamp; //EPOCH format, Optional
  3612. };
  3613. struct SessionSetupResponse_ISO15118_2018
  3614. {
  3615. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3616. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3617. struct EVSEStatusType EVSEStatus; //Optional
  3618. };
  3619. /****ServiceDiscoveryRequest****/
  3620. struct ServiceDiscoveryRequest_DIN70121
  3621. {
  3622. unsigned char ServiceScope[32]; //Optional
  3623. enum ServiceCategoryType ServiceCategory; //Optional
  3624. };
  3625. struct ServiceDiscoveryRequest_ISO15118_2014
  3626. {
  3627. unsigned char ServiceScope[32]; //Optional
  3628. enum ServiceCategoryType ServiceCategory; //Optional
  3629. };
  3630. struct ServiceDiscoveryRequest_ISO15118_2018
  3631. {
  3632. struct ServiceIDListType SupportedServiceIDs; //Optional
  3633. };
  3634. /****ServiceDiscoveryResponse****/
  3635. struct ServiceDiscoveryResponse_DIN70121
  3636. {
  3637. enum ResponseCodeType_DIN70121 ResponseCode;
  3638. struct PaymentOptionListType PaymentOptions;
  3639. struct ServiceChargeType ChargeService_DIN70121;
  3640. };
  3641. struct ServiceDiscoveryResponse_ISO15118_2014
  3642. {
  3643. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3644. struct PaymentOptionListType PaymentOptions;
  3645. struct ChargeServiceType ChargeService;
  3646. struct ServiceListType ServiceList; //Optional
  3647. };
  3648. struct ServiceDiscoveryResponse_ISO15118_2018
  3649. {
  3650. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3651. struct EVSEStatusType EVSEStatus; //Optional
  3652. struct IdentificationOptionListType IdentificationOptionList;
  3653. struct ServiceListType EnergyTransferServiceList;
  3654. struct ServiceListType VASList; //Optional
  3655. };
  3656. /****ServiceDetailRequest****/
  3657. //Only in ISO15118_2014 and ISO15118_2018
  3658. struct ServiceDetailRequest_ISO15118_2014
  3659. {
  3660. unsigned short ServiceID;
  3661. };
  3662. struct ServiceDetailRequest_ISO15118_2018
  3663. {
  3664. unsigned short ServiceID;
  3665. struct WPT_SDlEnergyTransferModeType WPT_SDlEnergyTransferMode;
  3666. };
  3667. /****ServiceDetailResponse****/
  3668. struct ServiceDetailResponse_ISO15118_2014
  3669. {
  3670. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3671. unsigned short ServiceID;
  3672. struct ServiceParameterListType ServiceParameterList;
  3673. };
  3674. struct ServiceDetailResponse_ISO15118_2018
  3675. {
  3676. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3677. unsigned short ServiceID;
  3678. struct ServiceParameterListType ServiceParameterList;
  3679. struct EVSEStatusType EVSEStatus; //Optional
  3680. };
  3681. /****ServiceAndPaymentSelectionRequest / ServiceSelectionRequest****/
  3682. struct ServiceAndPaymentSelectionRequest_DIN70121
  3683. {
  3684. enum PaymentOptionType SelectedPaymentOption;
  3685. struct SelectedServiceListType SelectedServiceList;
  3686. };
  3687. struct ServiceAndPaymentSelectionRequest_ISO15118_2014
  3688. {
  3689. enum PaymentOptionType SelectedPaymentOption;
  3690. struct SelectedServiceListType SelectedServiceList;
  3691. };
  3692. struct ServiceSelectionRequest_ISO15118_2018
  3693. {
  3694. enum PaymentOptionType SelectedPaymentOption;
  3695. struct SelectedServiceType SelectedEnergyTransferService;
  3696. struct SelectedServiceListType SelectedVASList;
  3697. enum ProcessingType EVProcessing;
  3698. };
  3699. /****ServiceAndPaymentSelectionResponse / ServiceSelectionResponse****/
  3700. struct ServiceAndPaymentSelectionResponse_DIN70121
  3701. {
  3702. enum ResponseCodeType_DIN70121 ResponseCode;
  3703. };
  3704. struct ServiceAndPaymentSelectionResponse_ISO15118_2014
  3705. {
  3706. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3707. };
  3708. struct ServiceSelectionResponse_ISO15118_2018
  3709. {
  3710. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3711. struct EVSEStatusType EVSEStatus; //Optional
  3712. };
  3713. /****PaymentDetailsRequest / IdentificationDetailsRequest****/
  3714. struct PaymentDetailsRequest_ISO15118_2014
  3715. {
  3716. unsigned char eMAID[16];
  3717. struct CertificateChainType ContractSignatureCertChain;
  3718. };
  3719. struct IdentificationDetailsRequest_ISO15118_2018
  3720. {
  3721. struct CertificateChainType ContractSignatureCertChain;
  3722. };
  3723. /****PaymentDetailsResponse / IdentificationDetailsResponse ****/
  3724. struct PaymentDetailsResponse_ISO15118_2014
  3725. {
  3726. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3727. unsigned char GenChallenge[16];
  3728. long EVSETimeStamp;
  3729. };
  3730. struct IdentificationDetailsResponse_ISO15118_2018
  3731. {
  3732. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3733. struct EVSEStatusType EVSEStatus; //Optional
  3734. unsigned char GenChallenge[16];
  3735. enum ProcessingType EVSEProcessing;
  3736. };
  3737. /****ContractAuthenticationRequest / AuthorizationRequest****/
  3738. struct ContractAuthenticationRequest_DIN70121
  3739. {
  3740. //None
  3741. };
  3742. struct AuthorizationRequest_ISO15118_2014
  3743. {
  3744. unsigned char GenChallenge[16]; //Optional
  3745. unsigned char Id[32]; //Optional
  3746. };
  3747. struct AuthorizationRequest_ISO15118_2018
  3748. {
  3749. struct PNC_AReqIdentificationModeType PNC_AReqIdentificationMode; //Optional
  3750. };
  3751. /****ContractAuthenticationResponse / AuthorizationResponse****/
  3752. struct ContractAuthenticationResponse_DIN70121
  3753. {
  3754. enum ResponseCodeType_DIN70121 ResponseCode;
  3755. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  3756. };
  3757. struct AuthorizationResponse_ISO15118_2014
  3758. {
  3759. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3760. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  3761. };
  3762. struct AuthorizationResponse_ISO15118_2018
  3763. {
  3764. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3765. enum ProcessingType EVSEProcessing;
  3766. struct EVSEStatusType EVSEStatus; //Optional
  3767. };
  3768. /****ChargeParameterDiscoveryRequest****/
  3769. struct ChargeParameterDiscoveryRequest_DIN70121
  3770. {
  3771. enum EnergyTransferModeType EVRequestedEnergyTransferType;
  3772. struct DC_EVChargeParameterType_DIN70121 DC_EVChargeParameter;
  3773. };
  3774. struct ChargeParameterDiscoveryRequest_ISO15118_2014
  3775. {
  3776. unsigned short MaxEntriesSAScheduleTuple; //Optional
  3777. enum EnergyTransferModeType RequestedEnergyTransferMode;
  3778. struct AC_EVChargeParameterType AC_EVChargeParameter;
  3779. struct DC_EVChargeParameterType_ISO15118_2014 DC_EVChargeParameter;
  3780. };
  3781. struct ChargeParameterDiscoveryRequest_ISO15118_2018
  3782. {
  3783. struct Dynamic_CPDReqControlModeType Dynamic_CPDReqControlMode;
  3784. struct Scheduled_CPDReqControlModeType Scheduled_CPDReqControlMode;
  3785. struct AC_CPDReqEnergyTransferModeType AC_CPDReqEnergyTransferMode;
  3786. struct DC_CPDReqEnergyTransferModeType DC_CPDReqEnergyTransferMode;
  3787. struct BPT_AC_CPDReqEnergyTransferModeType BPT_AC_CPDReqEnergyTransferMode;
  3788. struct BPT_DC_CPDReqEnergyTransferModeType BPT_DC_CPDReqEnergyTransferMode;
  3789. struct WPT_CPDReqEnergyTransferModeType WPT_CPDReqEnergyTransferMode;
  3790. struct ACD_CPDReqEnergyTransferModeType ACD_CPDReqEnergyTransferMode;
  3791. };
  3792. /****ChargeParameterDiscoveryResponse****/
  3793. struct ChargeParameterDiscoveryResponse_DIN70121
  3794. {
  3795. enum ResponseCodeType_DIN70121 ResponseCode;
  3796. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  3797. struct SAScheduleListType SAScheduleList;
  3798. struct DC_EVSEChargeParameterType_DIN70121 DC_EVSEChargeParameter;
  3799. };
  3800. struct ChargeParameterDiscoveryResponse_ISO15118_2014
  3801. {
  3802. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  3803. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3804. struct SAScheduleListType SAScheduleList;
  3805. struct AC_EVSEChargeParameterType AC_EVSEChargeParameter;
  3806. struct DC_EVSEChargeParameterType_ISO15118_2014 DC_EVSEChargeParameter;
  3807. };
  3808. struct ChargeParameterDiscoveryResponse_ISO15118_2018
  3809. {
  3810. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3811. struct EVSEStatusType EVSEStatus; //Optional
  3812. enum ProcessingType EVSEProcessing;
  3813. struct Scheduled_CPDResControlModeType Scheduled_CPDResControlMode; //Optional
  3814. struct AC_CPDResEnergyTransferModeType AC_CPDResEnergyTransferMode;
  3815. struct DC_CPDResEnergyTransferModeType DC_CPDResEnergyTransferMode;
  3816. struct BPT_AC_CPDResEnergyTransferModeType BPT_AC_CPDResEnergyTransferMode;
  3817. struct BPT_DC_CPDResEnergyTransferModeType BPT_DC_CPDResEnergyTransferMode;
  3818. struct WPT_CPDResEnergyTransferModeType WPT_CPDResEnergyTransferMode;
  3819. struct ACD_CPDResEnergyTransferModeType ACD_CPDResEnergyTransferMode;
  3820. };
  3821. /****PowerDeliveryRequest****/
  3822. struct PowerDeliveryRequest_DIN70121
  3823. {
  3824. BOOL ReadyToChargeState;
  3825. struct ChargingProfileType_DIN70121 ChargingProfile;
  3826. struct DC_EVPowerDeliveryParameterType_DIN70121 DC_EVPowerDeliveryParameter;
  3827. };
  3828. struct PowerDeliveryRequest_ISO15118_2014
  3829. {
  3830. enum ChargeProgressType_ISO15118_2014 ChargeProgress;
  3831. short SAScheduleTupleID;
  3832. struct ChargingProfileType_ISO15118_2014 ChargingProfile;
  3833. struct DC_EVPowerDeliveryParameterType_ISO15118_2014 DC_EVPowerDeliveryParameter;
  3834. };
  3835. struct PowerDeliveryRequest_ISO15118_2018
  3836. {
  3837. enum ChargeProgressType_ISO15118_2018 ChargeProgress;
  3838. struct Scheduled_PDReqControlModeType Scheduled_PDReqControlMode;
  3839. struct BPT_Scheduled_PDReqControlModeType BPT_Scheduled_PDReqControlMode;
  3840. };
  3841. /****PowerDeliveryResponse****/
  3842. struct PowerDeliveryResponse_DIN70121
  3843. {
  3844. enum ResponseCodeType_DIN70121 ResponseCode;
  3845. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3846. };
  3847. struct PowerDeliveryResponse_ISO15118_2014
  3848. {
  3849. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3850. struct AC_EVSEStatusType AC_EVSEStatus;
  3851. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3852. };
  3853. struct PowerDeliveryResponse_ISO15118_2018
  3854. {
  3855. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3856. struct EVSEStatusType EVSEStatus; //Optional
  3857. };
  3858. /****CertificateUpdateRequest****/
  3859. struct CertificateUpdateRequest_ISO15118_2014
  3860. {
  3861. unsigned char Id[32];
  3862. struct CertificateChainType ContractSignatureCertChain;
  3863. unsigned char eMAID[16];
  3864. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  3865. };
  3866. /****CertificateUpdateResponse****/
  3867. struct CertificateUpdateResponse_ISO15118_2014
  3868. {
  3869. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3870. struct CertificateChainType SAProvisioningCertificateChain;
  3871. struct CertificateChainType ContractSignatureCertChain;
  3872. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  3873. struct DiffieHellmanPublickeyType DHpublickey;
  3874. unsigned char eMAID[16];
  3875. short RetryCounter; //Optional
  3876. };
  3877. /****CertificateInstallationRequest****/
  3878. struct CertificateInstallationRequest_ISO15118_2014
  3879. {
  3880. unsigned char Id[32];
  3881. unsigned char OEMProvisioningCert[800];
  3882. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  3883. };
  3884. struct CertificateInstallationRequest_ISO15118_2018
  3885. {
  3886. unsigned char Id[32];
  3887. struct CertificateChainType OEMProvisioningCertChain;
  3888. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  3889. unsigned short MaxSupportedCerts;
  3890. };
  3891. /****CertificateInstallationResponse****/
  3892. struct CertificateInstallationResponse_ISO15118_2014
  3893. {
  3894. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3895. struct CertificateChainType SAProvisioningCertificateChain;
  3896. struct CertificateChainType ContractSignatureCertChain;
  3897. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  3898. struct DiffieHellmanPublickeyType DHpublickey;
  3899. unsigned char eMAID[16];
  3900. };
  3901. struct CertificateInstallationResponse_ISO15118_2018
  3902. {
  3903. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3904. struct EVSEStatusType EVSEStatus; //Optional
  3905. struct CertificateChainType SAProvisioningCertificateChain;
  3906. struct CertificateChainType ContractCertificateChain;
  3907. struct ContractCertificateEncryptedPrivateKeyType ContractEncryptedPrivateKey;
  3908. struct DiffieHellmanPublickeyType DHpublickey;
  3909. enum ProcessingType EVSEProcessing;
  3910. unsigned short RemainingContractCertificateChains;
  3911. };
  3912. /****SystemStatusRequest****/
  3913. struct SystemStatusRequest_ISO15118_2018
  3914. {
  3915. enum mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus;
  3916. struct EVTechnicalStatusType EVTechnicalStatus;
  3917. unsigned char EV_OEMStatus[800]; //Optional
  3918. };
  3919. /****SystemStatusResponse****/
  3920. struct SystemStatusResponse_ISO15118_2018
  3921. {
  3922. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3923. enum mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus;
  3924. BOOL EVSE_ReadyToCharge;
  3925. enum IsolationStatusType EVSE_IsolationStatus;
  3926. BOOL EVSE_Disabled;
  3927. BOOL EVSE_UtilityInterruptEvent;
  3928. BOOL EVSE_EmergencyShutdown;
  3929. BOOL EVSE_Malfunction;
  3930. BOOL EV_InChargePosition;
  3931. BOOL EV_AssociationStatus;
  3932. };
  3933. /****SessionStopRequest****/
  3934. struct SessionStopRequest_DIN70121
  3935. {
  3936. //No member in standard
  3937. };
  3938. struct SessionStopRequest_ISO15118_2014
  3939. {
  3940. enum ChargingSessionType ChargingSession;
  3941. };
  3942. struct SessionStopRequest_ISO15118_2018
  3943. {
  3944. enum ChargingSessionType ChargingSession;
  3945. };
  3946. /****SessionStopResponse****/
  3947. struct SessionStopResponse_DIN70121
  3948. {
  3949. enum ResponseCodeType_DIN70121 ResponseCode;
  3950. };
  3951. struct SessionStopResponse_ISO15118_2014
  3952. {
  3953. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3954. };
  3955. struct SessionStopResponse_ISO15118_2018
  3956. {
  3957. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3958. struct EVSEStatusType EVSEStatus; //Optional
  3959. };
  3960. /****MeteringReceiptRequest****/
  3961. struct MeteringReceiptRequest_ISO15118_2014
  3962. {
  3963. unsigned char Id[32]; //Optional
  3964. unsigned char SessionID[8];
  3965. short SAScheduleTupleID; //Optional
  3966. struct MeterInfoType_ISO15118_2014 MeterInfo;
  3967. };
  3968. struct MeteringReceiptRequest_ISO15118_2018
  3969. {
  3970. unsigned char Id[32]; //Optional
  3971. unsigned char SessionID[8];
  3972. struct Scheduled_MRReqControlModeType Schedule_MRReqControlMode;
  3973. struct MeterInfoType_ISO15118_2018 MeterInfo;
  3974. };
  3975. /****MeteringReceiptResponse****/
  3976. struct MeteringReceiptResponse_ISO15118_2014
  3977. {
  3978. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3979. struct AC_EVSEStatusType AC_EVSEStatus;
  3980. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3981. };
  3982. struct MeteringReceiptResponse_ISO15118_2018
  3983. {
  3984. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3985. struct EVSEStatusType EVSEStatus; //Optional
  3986. };
  3987. /****ChargingStatusRequest (AC Only)****/
  3988. struct ChargingStatusRequest_ISO15118_2014
  3989. {
  3990. //No member in standard
  3991. };
  3992. struct ChargingStatusRequest_ISO15118_2018
  3993. {
  3994. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  3995. struct Dynamic_CSReqControlModeType Dynamic_CSReqControlMode;
  3996. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  3997. struct DisplayParametersType DisplayParameters;
  3998. };
  3999. /****ChargingStatusResponse (AC Only)****/
  4000. struct ChargingStatusResponse_ISO15118_2014
  4001. {
  4002. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  4003. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  4004. short SAScheduleTupleID;
  4005. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent; //Optional
  4006. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  4007. BOOL ReceiptRequired; //Optional
  4008. struct AC_EVSEStatusType AC_EVSEStatus;
  4009. };
  4010. struct ChargingStatusResponse_ISO15118_2018
  4011. {
  4012. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  4013. struct EVSEStatusType EVSEStatus; //Optional
  4014. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  4015. struct PhysicalValueType_ISO15118_2018 EVSETargetFrequency; //Optional
  4016. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  4017. struct Dynamic_CSResControlModeType Dynamic_CSResControlMode;
  4018. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  4019. };
  4020. /****CableCheckRequest (DC Only)****/
  4021. struct CableCheckRequest_DIN70121
  4022. {
  4023. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  4024. };
  4025. struct CableCheckRequest_ISO15118_2014
  4026. {
  4027. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  4028. };
  4029. struct CableCheckRequest_ISO15118_2018
  4030. {
  4031. //No member in standard
  4032. };
  4033. /****CableCheckResponse (DC Only)****/
  4034. struct CableCheckResponse_DIN70121
  4035. {
  4036. enum ResponseCodeType_DIN70121 ResponseCode;
  4037. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  4038. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  4039. };
  4040. struct CableCheckResponse_ISO15118_2014
  4041. {
  4042. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  4043. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  4044. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  4045. };
  4046. struct CableCheckResponse_ISO15118_2018
  4047. {
  4048. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  4049. struct EVSEStatusType EVSEStatus; //Optional
  4050. enum ProcessingType EVSEProcessing;
  4051. };
  4052. /****PreChargeRequest (DC Only)****/
  4053. struct PreChargeRequest_DIN70121
  4054. {
  4055. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  4056. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  4057. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  4058. };
  4059. struct PreChargeRequest_ISO15118_2014
  4060. {
  4061. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  4062. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  4063. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  4064. };
  4065. struct PreChargeRequest_ISO15118_2018
  4066. {
  4067. struct PhysicalValueType_ISO15118_2018 EVTargetVoltage;
  4068. struct PhysicalValueType_ISO15118_2018 EVTargetCurrent;
  4069. };
  4070. /****PreChargeResponse (DC Only)****/
  4071. struct PreChargeResponse_DIN70121
  4072. {
  4073. enum ResponseCodeType_DIN70121 ResponseCode;
  4074. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  4075. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  4076. };
  4077. struct PreChargeResponse_ISO15118_2014
  4078. {
  4079. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  4080. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  4081. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  4082. };
  4083. struct PreChargeResponse_ISO15118_2018
  4084. {
  4085. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  4086. struct EVSEStatusType EVSEStatus; //Optional
  4087. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  4088. };
  4089. /****CurrentDemandRequest (DC Only)****/
  4090. struct CurrentDemandRequest_DIN70121
  4091. {
  4092. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  4093. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  4094. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit; //Optional
  4095. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit; //Optional
  4096. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  4097. BOOL BulkChargingComplete; //Optional
  4098. BOOL ChargingComplete;
  4099. struct PhysicalValueType_DIN70121 RemainingTimeToFullSoC; //Optional
  4100. struct PhysicalValueType_DIN70121 RemainingTimeToBulkSoC; //Optional
  4101. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  4102. };
  4103. struct CurrentDemandRequest_ISO15118_2014
  4104. {
  4105. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  4106. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  4107. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit; //Optional
  4108. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit; //Optional
  4109. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  4110. BOOL BulkChargingComplete; //Optional
  4111. BOOL ChargingComplete;
  4112. struct PhysicalValueType_ISO15118_2014 RemainingTimeToFullSoC; //Optional
  4113. struct PhysicalValueType_ISO15118_2014 RemainingTimeToBulkSoC; //Optional
  4114. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  4115. };
  4116. struct CurrentDemandRequest_ISO15118_2018
  4117. {
  4118. struct DisplayParametersType DisplayParameters; //Optional
  4119. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  4120. struct Dynamic_CSReqControlModeType Dynamic_CDReqControlMode;
  4121. struct Scheduled_CSReqControlModeType Scheduled_CDReqControlMode;
  4122. };
  4123. /****CurrentDemandResponse (DC Only)****/
  4124. struct CurrentDemandResponse_DIN70121
  4125. {
  4126. enum ResponseCodeType_DIN70121 ResponseCode;
  4127. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  4128. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  4129. struct PhysicalValueType_DIN70121 EVSEPresentCurrent;
  4130. BOOL EVSECurrentLimitAchieved;
  4131. BOOL EVSEVoltageLimitAchieved;
  4132. BOOL EVSEPowerLimitAchieved;
  4133. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit; //Optional
  4134. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit; //Optional
  4135. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  4136. };
  4137. struct CurrentDemandResponse_ISO15118_2014
  4138. {
  4139. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  4140. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  4141. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  4142. struct PhysicalValueType_ISO15118_2014 EVSEPresentCurrent;
  4143. BOOL EVSECurrentLimitAchieved;
  4144. BOOL EVSEVoltageLimitAchieved;
  4145. BOOL EVSEPowerLimitAchieved;
  4146. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit; //Optional
  4147. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit; //Optional
  4148. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit; //Optional
  4149. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  4150. short SAScheduleTupleID;
  4151. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  4152. BOOL ReceiptRequired; //Optional
  4153. };
  4154. struct CurrentDemandResponse_ISO15118_2018
  4155. {
  4156. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  4157. struct EVSEStatusType EVSEStatus; //Optional
  4158. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  4159. struct PhysicalValueType_ISO15118_2018 EVSEPresentCurrent;
  4160. BOOL EVSECurrentLimitAchieved;
  4161. BOOL EVSEVoltageLimitAchieved;
  4162. BOOL EVSEPowerLimitAchieved;
  4163. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeVoltage; //Optional
  4164. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  4165. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  4166. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  4167. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  4168. struct Scheduled_CDResControlModeType Scheduled_CDResControlMode;
  4169. };
  4170. /****WeldingDetectionRequest (DC Only)*****/
  4171. struct WeldingDetectionRequest_DIN70121
  4172. {
  4173. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  4174. };
  4175. struct WeldingDetectionRequest_ISO15118_2014
  4176. {
  4177. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  4178. };
  4179. struct WeldingDetectionRequest_ISO15118_2018
  4180. {
  4181. //No member in Standard
  4182. };
  4183. /****WeldingDetectionResponse (DC Only)****/
  4184. struct WeldingDetectionResponse_DIN70121
  4185. {
  4186. enum ResponseCodeType_DIN70121 ResponseCode;
  4187. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  4188. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  4189. };
  4190. struct WeldingDetectionResponse_ISO15118_2014
  4191. {
  4192. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  4193. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  4194. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  4195. };
  4196. struct WeldingDetectionResponse_ISO15118_2018
  4197. {
  4198. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  4199. struct EVSEStatusType EVSEStatus; //Optional
  4200. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  4201. };
  4202. /****FinePositioningSetupRequest (WPT Only)****/
  4203. struct FinePositioningSetupRequest_ISO15118_2018
  4204. {
  4205. struct LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters; //Optional
  4206. };
  4207. /****FinePositioningSetupResponse (WPT Only)****/
  4208. struct FinePositioningSetupResponse_ISO15118_2018
  4209. {
  4210. //NOT complete yet, to be continue.....
  4211. };
  4212. struct V2GMessageType_DIN70121
  4213. {
  4214. unsigned char SelfTest_Comp;
  4215. unsigned char version[16];
  4216. unsigned char PresentMsgFlowStatus;
  4217. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  4218. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  4219. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  4220. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  4221. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  4222. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  4223. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  4224. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  4225. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  4226. 28: AuthorizationRequest, 29: AuthorizationResponse,
  4227. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  4228. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  4229. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  4230. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  4231. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  4232. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  4233. 52: SessionStopRequest, 53: SessionStopResponse
  4234. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  4235. */
  4236. struct SupportedAppProtocolRequest_DIN70121 SupportedAppProtocolRequest;
  4237. struct SupportedAppProtocolResponse_DIN70121 SupportedAppProtocolResponse;
  4238. struct SessionSetupRequest_DIN70121 SessionSetupRequest;
  4239. struct SessionSetupResponse_DIN70121 SessionSetupResponse;
  4240. struct ServiceDiscoveryRequest_DIN70121 ServiceDiscoveryRequest;
  4241. struct ServiceDiscoveryResponse_DIN70121 ServiceDiscoveryResponse;
  4242. struct ServiceAndPaymentSelectionRequest_DIN70121 ServiceAndPaymentSelectionRequest;
  4243. struct ServiceAndPaymentSelectionResponse_DIN70121 ServiceAndPaymentSelectionResponse;
  4244. struct ContractAuthenticationRequest_DIN70121 ContractAuthenticationRequest;
  4245. struct ContractAuthenticationResponse_DIN70121 ContractAuthenticationResponse;
  4246. struct ChargeParameterDiscoveryRequest_DIN70121 ChargeParameterDiscoveryRequest;
  4247. struct ChargeParameterDiscoveryResponse_DIN70121 ChargeParameterDiscoveryResponse;
  4248. struct CableCheckRequest_DIN70121 CableCheckRequest;
  4249. struct CableCheckResponse_DIN70121 CableCheckResponse;
  4250. struct PreChargeRequest_DIN70121 PreChargeRequest;
  4251. struct PreChargeResponse_DIN70121 PreChargeResponse;
  4252. struct PowerDeliveryRequest_DIN70121 PowerDeliveryRequest;
  4253. struct PowerDeliveryResponse_DIN70121 PowerDeliveryResponse;
  4254. struct CurrentDemandRequest_DIN70121 CurrentDemandRequest;
  4255. struct CurrentDemandResponse_DIN70121 CurrentDemandResponse;
  4256. struct WeldingDetectionRequest_DIN70121 WeldingDetectionRequest;
  4257. struct WeldingDetectionResponse_DIN70121 WeldingDetectionResponse;
  4258. struct SessionStopRequest_DIN70121 SessionStopRequest;
  4259. struct SessionStopResponse_DIN70121 SessionStopResponse;
  4260. };
  4261. struct V2GMessageType_ISO15118_2014
  4262. {
  4263. unsigned char PresentMsgFlowStatus;
  4264. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  4265. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  4266. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  4267. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  4268. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  4269. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  4270. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  4271. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  4272. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  4273. 28: AuthorizationRequest, 29: AuthorizationResponse,
  4274. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  4275. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  4276. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  4277. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  4278. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  4279. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  4280. 52: SessionStopRequest, 53: SessionStopResponse
  4281. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  4282. */
  4283. struct SupportedAppProtocolRequest_ISO15118_2014 SupportedAppProtocolRequest;
  4284. struct SupportedAppProtocolResponse_ISO15118_2014 SupportedAppProtocolResponse;
  4285. struct SessionSetupRequest_ISO15118_2014 SessionSetupRequest;
  4286. struct SessionSetupResponse_ISO15118_2014 SessionSetupResponse;
  4287. struct ServiceDiscoveryRequest_ISO15118_2014 ServiceDiscoveryRequest;
  4288. struct ServiceDiscoveryResponse_ISO15118_2014 ServiceDiscoveryResponse;
  4289. struct ServiceDetailRequest_ISO15118_2014 ServiceDetailRequest;
  4290. struct ServiceDetailResponse_ISO15118_2014 ServiceDetailResponse;
  4291. struct ServiceAndPaymentSelectionRequest_ISO15118_2014 ServiceAndPaymentSelectionRequest;
  4292. struct ServiceAndPaymentSelectionResponse_ISO15118_2014 ServiceAndPaymentSelectionResponse;
  4293. struct PaymentDetailsRequest_ISO15118_2014 PaymentDetailsRequest;
  4294. struct PaymentDetailsResponse_ISO15118_2014 PaymentDetailsResponse;
  4295. struct AuthorizationRequest_ISO15118_2014 AuthorizationRequest;
  4296. struct AuthorizationResponse_ISO15118_2014 AuthorizationResponse;
  4297. struct CertificateUpdateRequest_ISO15118_2014 CertificateUpdateRequest;
  4298. struct CertificateUpdateResponse_ISO15118_2014 CertificateUpdateResponse;
  4299. struct CertificateInstallationRequest_ISO15118_2014 CertificateInstallationRequest;
  4300. struct CertificateInstallationResponse_ISO15118_2014 CertificateInstallationResponse;
  4301. struct ChargeParameterDiscoveryRequest_ISO15118_2014 ChargeParameterDiscoveryRequest;
  4302. struct ChargeParameterDiscoveryResponse_ISO15118_2014 ChargeParameterDiscoveryResponse;
  4303. struct CableCheckRequest_ISO15118_2014 CableCheckRequest;
  4304. struct CableCheckResponse_ISO15118_2014 CableCheckResponse;
  4305. struct PreChargeRequest_ISO15118_2014 PreChargeRequest;
  4306. struct PreChargeResponse_ISO15118_2014 PreChargeResponse;
  4307. struct PowerDeliveryRequest_ISO15118_2014 PowerDeliveryRequest;
  4308. struct PowerDeliveryResponse_ISO15118_2014 PowerDeliveryResponse;
  4309. struct ChargingStatusRequest_ISO15118_2014 ChargingStatusRequest;
  4310. struct ChargingStatusResponse_ISO15118_2014 ChargingStatusResponse;
  4311. struct CurrentDemandRequest_ISO15118_2014 CurrentDemandRequest;
  4312. struct CurrentDemandResponse_ISO15118_2014 CurrentDemandResponse;
  4313. struct MeteringReceiptRequest_ISO15118_2014 MeteringReceiptRequest;
  4314. struct MeteringReceiptResponse_ISO15118_2014 MeteringReceiptResponse;
  4315. struct WeldingDetectionRequest_ISO15118_2014 WeldingDetectionRequest;
  4316. struct WeldingDetectionResponse_ISO15118_2014 WeldingDetectionResponse;
  4317. struct SessionStopRequest_ISO15118_2014 SessionStopRequest;
  4318. struct SessionStopResponse_ISO15118_2014 SessionStopResponse;
  4319. };
  4320. struct V2GMessageType_ISO15118_2018
  4321. {
  4322. unsigned char PresentMsgFlowStatus;
  4323. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  4324. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  4325. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  4326. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  4327. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  4328. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  4329. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  4330. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  4331. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  4332. 28: AuthorizationRequest, 29: AuthorizationResponse,
  4333. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  4334. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  4335. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  4336. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  4337. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  4338. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  4339. 52: SessionStopRequest, 53: SessionStopResponse
  4340. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  4341. */
  4342. struct SupportedAppProtocolRequest_ISO15118_2018 SupportedAppProtocolRequest;
  4343. struct SupportedAppProtocolResponse_ISO15118_2018 SupportedAppProtocolResponse;
  4344. struct SessionSetupRequest_ISO15118_2018 SessionSetupRequest;
  4345. struct SessionSetupResponse_ISO15118_2018 SessionSetupResponse;
  4346. struct ServiceDiscoveryRequest_ISO15118_2018 ServiceDiscoveryRequest;
  4347. struct ServiceDiscoveryResponse_ISO15118_2018 ServiceDiscoveryResponse;
  4348. struct ServiceDetailRequest_ISO15118_2018 ServiceDetailRequest;
  4349. struct ServiceDetailResponse_ISO15118_2018 ServiceDetailResponse;
  4350. struct ServiceSelectionRequest_ISO15118_2018 ServiceSelectionRequest;
  4351. struct ServiceSelectionResponse_ISO15118_2018 ServiceSelectionResponse;
  4352. struct IdentificationDetailsRequest_ISO15118_2018 IdentificationDetailsRequest;
  4353. struct IdentificationDetailsResponse_ISO15118_2018 IdentificationDetailsResponse;
  4354. struct AuthorizationRequest_ISO15118_2018 AuthorizationRequest;
  4355. struct AuthorizationResponse_ISO15118_2018 AuthorizationResponse;
  4356. struct CertificateInstallationRequest_ISO15118_2018 CertificateInstallationRequest;
  4357. struct CertificateInstallationResponse_ISO15118_2018 CertificateInstallationResponse;
  4358. struct ChargeParameterDiscoveryRequest_ISO15118_2018 ChargeParameterDiscoveryRequest;
  4359. struct ChargeParameterDiscoveryResponse_ISO15118_2018 ChargeParameterDiscoveryResponse;
  4360. struct CableCheckRequest_ISO15118_2018 CableCheckRequest;
  4361. struct CableCheckResponse_ISO15118_2018 CableCheckResponse;
  4362. struct PreChargeRequest_ISO15118_2018 PreChargeRequest;
  4363. struct PreChargeResponse_ISO15118_2018 PreChargeResponse;
  4364. struct PowerDeliveryRequest_ISO15118_2018 PowerDeliveryRequest;
  4365. struct PowerDeliveryResponse_ISO15118_2018 PowerDeliveryResponse;
  4366. struct ChargingStatusRequest_ISO15118_2018 ChargingStatusRequest;
  4367. struct ChargingStatusResponse_ISO15118_2018 ChargingStatusResponse;
  4368. struct CurrentDemandRequest_ISO15118_2018 CurrentDemandRequest;
  4369. struct CurrentDemandResponse_ISO15118_2018 CurrentDemandResponse;
  4370. struct MeteringReceiptRequest_ISO15118_2018 MeteringReceiptRequest;
  4371. struct MeteringReceiptResponse_ISO15118_2018 MeteringReceiptResponse;
  4372. struct WeldingDetectionRequest_ISO15118_2018 WeldingDetectionRequest;
  4373. struct WeldingDetectionResponse_ISO15118_2018 WeldingDetectionResponse;
  4374. struct SessionStopRequest_ISO15118_2018 SessionStopRequest;
  4375. struct SessionStopResponse_ISO15118_2018 SessionStopResponse;
  4376. };
  4377. struct CcsData
  4378. {
  4379. unsigned char CommProtocol; // 1: V2GMessage_DIN70121, 2:V2GMessage_ISO15118_2014, 3:V2GMessage_ISO15118_2018
  4380. struct V2GMessageType_DIN70121 V2GMessage_DIN70121[CCS_QUANTITY];
  4381. struct V2GMessageType_ISO15118_2014 V2GMessage_ISO15118_2014[CCS_QUANTITY];
  4382. struct V2GMessageType_ISO15118_2018 V2GMessage_ISO15118_2018[CCS_QUANTITY];
  4383. };
  4384. /**************************************************************************************/
  4385. /***************STM32F407 Communication Share memory**************************/
  4386. /**************************************************************************************/
  4387. struct PrimaryMcuData
  4388. {
  4389. unsigned char SelfTest_Comp;
  4390. unsigned char version[16]; //STM32F407 firmware version
  4391. unsigned int InputVoltage; //value comes from external meter
  4392. unsigned int InputCurrent; //value comes from external meter
  4393. union
  4394. {
  4395. unsigned char OutputDrvValue[1];
  4396. struct
  4397. {
  4398. //OutputDrvValue[0]
  4399. unsigned char AcContactorDrv:1; //bit 0, H: ON, L:OFF
  4400. unsigned char Button1LedDrv:1; //bit 1, H: ON, L:OFF
  4401. unsigned char Button2LedDrv:1; //bit 2, H: ON, L:OFF
  4402. unsigned char SystemLed1Drv:1; //bit 3, H: ON, L:OFF
  4403. unsigned char SystemLed2Drv:1; //bit 4, H: ON, L:OFF
  4404. unsigned char SystemLed3Drv:1; //bit 5, H: ON, L:OFF
  4405. unsigned char SystemLed4Drv:1; //bit 6, H: ON, L:OFF
  4406. unsigned char:1; //bit 7 reserved
  4407. }bits;
  4408. }OutputDrv;
  4409. union
  4410. {
  4411. unsigned char InputDetValue[2];
  4412. struct
  4413. {
  4414. //InputDetValue[0]
  4415. unsigned char AcContactorDetec:1; //bit 0, H: ON, L:OFF
  4416. unsigned char AcMainBreakerDetec:1; //bit 1, H: ON, L:OFF
  4417. unsigned char SpdDetec:1; //bit 2, H: ON, L:OFF
  4418. unsigned char DoorOpen:1; //bit 3, H: Open, L:Close
  4419. unsigned char Gfd1:1; //bit 4, H: Trigger, L:Normal
  4420. unsigned char Gfd2:1; //bit 5, H: Trigger, L:Normal
  4421. unsigned char Button1:1; //bit 6 , H: Push, L:Release
  4422. unsigned char Button2:1; //bit 7, H: Push, L:Release
  4423. //InputDetValue[1]
  4424. unsigned char EmergencyButton:1; //bit 0, H: Push, L:Release
  4425. unsigned char :7; //bit 1~7, Reserved
  4426. }bits;
  4427. }InputDet;
  4428. };
  4429. /**************************************************************************************/
  4430. /*************Fan power module Communication Share memory******************/
  4431. /**************************************************************************************/
  4432. struct FanModuleData
  4433. {
  4434. unsigned char SelfTest_Comp;
  4435. unsigned char version[16]; //fan power module firmware version
  4436. unsigned short PresentFan1Speed; //RPM
  4437. unsigned short PresentFan2Speed; //RPM
  4438. unsigned short PresentFan3Speed; //RPM
  4439. unsigned short PresentFan4Speed; //RPM
  4440. unsigned short SetFan1Speed; //RPM
  4441. unsigned short SetFan2Speed; //RPM
  4442. unsigned short SetFan3Speed; //RPM
  4443. unsigned short SetFan4Speed; //RPM
  4444. unsigned short TestFanSpeed; //RPM
  4445. unsigned char DiffOfAirPressure; //pa
  4446. unsigned char UpdateFW; //1:do update
  4447. };
  4448. /**************************************************************************************/
  4449. /***********Relay control module Communication Share memory******************/
  4450. /**************************************************************************************/
  4451. struct RelayModuleData
  4452. {
  4453. unsigned char SelfTest_Comp;
  4454. unsigned char version[16]; //relay module firmware version
  4455. unsigned short InputL1Volt; //XXXXX.x volt
  4456. unsigned short InputL2Volt; //XXXXX.x volt
  4457. unsigned short InputL3Volt; //XXXXX.x volt
  4458. unsigned short Gun1FuseOutputVolt; //XXXXX.x volt
  4459. unsigned short Gun2FuseOutputVolt; //XXXXX.x volt
  4460. unsigned short Gun1RelayOutputVolt; //XXXXX.x volt
  4461. unsigned short Gun2RelayOutputVolt; //XXXXX.x volt
  4462. unsigned short Gun1OutputCurrent; //XXXXX.x amp
  4463. unsigned short Gun2OutputCurrent; //XXXXX.x amp
  4464. unsigned char UpdateFW; //1:do update
  4465. };
  4466. /**************************************************************************************/
  4467. /***********Led control module Communication Share memory******************/
  4468. /**************************************************************************************/
  4469. struct LedModuleData
  4470. {
  4471. unsigned char SelfTest_Comp;
  4472. unsigned char version[16]; //led module firmware version
  4473. unsigned short Connect_1_Status; // Idle : 0, Charging : 1, Alarm : 2
  4474. unsigned short Connect_2_Status; // Idle : 0, Charging : 1, Alarm : 2
  4475. unsigned short EnableFunc; // reserved
  4476. };
  4477. /**************************************************************************************/
  4478. /************************OCPP Share memory***************************************/
  4479. /**************************************************************************************/
  4480. struct StructIdTagInfo
  4481. {
  4482. unsigned char ExpiryDate[28];
  4483. unsigned char ParentIdTag[20];
  4484. unsigned char Status[16]; //Accepted, Blocked, Expired, Invalid, ConcurrentTx
  4485. };
  4486. struct StructLocalAuthorizationList
  4487. {
  4488. unsigned char IdTag[20];
  4489. struct StructIdTagInfo IdTagInfo;
  4490. };
  4491. struct StructSampledValue
  4492. {
  4493. unsigned char Value[128];
  4494. unsigned char Context[30];//Interruption.Begin, Interruption.End, Sample.Clock, Sample.Periodic, Transaction.Begin, Transaction.End, Trigger, Other
  4495. unsigned char Format[16];//Raw,SignedData
  4496. unsigned char Measurand[40];/* "Energy.Active.Export.Register",
  4497. "Energy.Active.Import.Register",
  4498. "Energy.Reactive.Export.Register",
  4499. "Energy.Reactive.Import.Register",
  4500. "Energy.Active.Export.Interval",
  4501. "Energy.Active.Import.Interval",
  4502. "Energy.Reactive.Export.Interval",
  4503. "Energy.Reactive.Import.Interval",
  4504. "Power.Active.Export",
  4505. "Power.Active.Import",
  4506. "Power.Offered",
  4507. "Power.Reactive.Export",
  4508. "Power.Reactive.Import",
  4509. "Power.Factor",
  4510. "Current.Import",
  4511. "Current.Export",
  4512. "Current.Offered",
  4513. "Voltage",
  4514. "Frequency",
  4515. "Temperature",
  4516. "SoC",
  4517. "RPM"
  4518. */
  4519. unsigned char Phase[10]; /* "L1",
  4520. "L2",
  4521. "L3",
  4522. "N",
  4523. "L1-N",
  4524. "L2-N",
  4525. "L3-N",
  4526. "L1-L2",
  4527. "L2-L3",
  4528. "L3-L1"
  4529. */
  4530. unsigned char Location[10]; //Cable,EV,Inlet,Outlet,Body
  4531. unsigned char Unit[20]; /* "Wh",
  4532. "kWh",
  4533. "varh",
  4534. "kvarh",
  4535. "W",
  4536. "kW",
  4537. "VA",
  4538. "kVA",
  4539. "var",
  4540. "kvar",
  4541. "A",
  4542. "V",
  4543. "K",
  4544. "Celcius",
  4545. "Fahrenheit",
  4546. "Percent"
  4547. */
  4548. };
  4549. struct StructMeterValue
  4550. {
  4551. unsigned char TimeStamp[28];
  4552. struct StructSampledValue SampledValue[10];
  4553. };
  4554. struct StructConfigurationKeyItems
  4555. {
  4556. unsigned char Item[50];
  4557. };
  4558. struct StructConfigurationKey
  4559. {
  4560. unsigned char Key[50];
  4561. unsigned char ReadOnly[8]; //boolean
  4562. unsigned char Value[500];
  4563. };
  4564. struct StructChargingSchedulePeriod
  4565. {
  4566. int StartPeriod;
  4567. float Limit;//0.1;
  4568. int NumberPhases;
  4569. };
  4570. struct StructChargingSchedule
  4571. {
  4572. int Duration;
  4573. unsigned char StartSchedule[28];
  4574. unsigned char ChargingRateUnit[4]; //A, W
  4575. struct StructChargingSchedulePeriod ChargingSchedulePeriod[10];
  4576. float MinChargingRate; //0.1;
  4577. };
  4578. struct StructChargingProfile
  4579. {
  4580. int ChargingProfileId;
  4581. int TransactionId;
  4582. int StackLevel;
  4583. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  4584. unsigned char ChargingProfileKind[12]; //Absolute, Recurring, Relative
  4585. unsigned char RecurrencyKind[8]; //Daily, Weekly
  4586. unsigned char ValidFrom[28];
  4587. unsigned char ValidTo[28];
  4588. struct StructChargingSchedule ChargingSchedule;
  4589. };
  4590. struct StructBootNotification
  4591. {
  4592. unsigned char CpVendor[20]; //chargePointVendor //mandatory
  4593. unsigned char CpModel[20]; //chargePointModel //mandatory
  4594. unsigned char CpSN[25]; //chargePointSerialNumber
  4595. unsigned char CbSN[25]; //chargeBoxSerialNumber
  4596. unsigned char CpFwVersion[50]; //firmwareVersion
  4597. unsigned char CpIccid[22]; //iccid
  4598. unsigned char CpImsi[20]; //imsi
  4599. unsigned char CpMeterType[25]; //meterType
  4600. unsigned char CpMeterSerialNumber[25]; //meterSerialNumber
  4601. unsigned char ResponseStatus[16]; //Accepted, Pending, Rejected
  4602. unsigned char ResponseCurrentTime[28]; //currentTime //mandatory
  4603. int ResponseHeartbeatInterval; //interval //mandatory
  4604. };
  4605. struct StructHeartbeat
  4606. {
  4607. unsigned char ResponseCurrentTime[28];
  4608. };
  4609. struct StructAuthorize
  4610. {
  4611. unsigned char IdTag[20];
  4612. struct StructIdTagInfo ResponseIdTagInfo;
  4613. };
  4614. struct StructStartTransaction
  4615. {
  4616. int ConnectorId;
  4617. unsigned char IdTag[20];
  4618. int MeterStart;
  4619. int ReservationId;
  4620. unsigned char Timestamp[28];
  4621. struct StructIdTagInfo ResponseIdTagInfo;
  4622. int ResponseTransactionId;
  4623. };
  4624. struct StructStopTransaction
  4625. {
  4626. unsigned char IdTag[20];
  4627. int MeterStop;
  4628. unsigned char Timestamp[28];
  4629. int TransactionId;
  4630. unsigned char StopReason[20]; /* "EmergencyStop",
  4631. "EVDisconnected",
  4632. "HardReset",
  4633. "Local",
  4634. "Other",
  4635. "PowerLoss",
  4636. "Reboot",
  4637. "Remote",
  4638. "SoftReset",
  4639. "UnlockCommand",
  4640. "DeAuthorized"
  4641. */
  4642. struct StructMeterValue TransactionData[1];
  4643. struct StructIdTagInfo ResponseIdTagInfo;
  4644. };
  4645. struct StructStatusNotification
  4646. {
  4647. int ConnectorId;
  4648. unsigned char ErrorCode[25]; /* "ConnectorLockFailure",
  4649. "EVCommunicationError",
  4650. "GroundFailure",
  4651. "HighTemperature",
  4652. "InternalError",
  4653. "LocalListConflict",
  4654. "NoError",
  4655. "OtherError",
  4656. "OverCurrentFailure",
  4657. "PowerMeterFailure",
  4658. "PowerSwitchFailure",
  4659. "ReaderFailure",
  4660. "ResetFailure",
  4661. "UnderVoltage",
  4662. "OverVoltage",
  4663. "WeakSignal"
  4664. */
  4665. unsigned char Info[50];
  4666. unsigned char Status[20]; /* "Available",
  4667. "Preparing",
  4668. "Charging",
  4669. "SuspendedEVSE",
  4670. "SuspendedEV",
  4671. "Finishing",
  4672. "Reserved",
  4673. "Unavailable",
  4674. "Faulted"
  4675. */
  4676. unsigned char Timestamp[28];
  4677. unsigned char VendorId[256];
  4678. unsigned char VendorErrorCode[50];
  4679. };
  4680. struct StructCancelReservation
  4681. {
  4682. int ReservationId;
  4683. unsigned char ResponseStatus[16]; //Accepted, Rejected
  4684. unsigned char guid[37];
  4685. };
  4686. struct StructChangeAvailability
  4687. {
  4688. int ConnectorId;
  4689. unsigned char Type[16]; //Inoperative, Operative
  4690. unsigned char ResponseStatus[16]; //Accepted, Rejected, Scheduled
  4691. unsigned char guid[37];
  4692. };
  4693. struct StructChangeConfiguration
  4694. {
  4695. unsigned char Key[50];
  4696. unsigned char Value[500];
  4697. unsigned char ResponseStatus[16]; //Accepted, Rejected, RebootRequired, NotSupported
  4698. };
  4699. struct StructClearCache
  4700. {
  4701. unsigned char ResponseStatus[16]; //Accepted, Rejected
  4702. };
  4703. struct StructClearChargingProfile
  4704. {
  4705. int Id;
  4706. int ConnectorId;
  4707. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  4708. int StackLevel;
  4709. unsigned char ResponseStatus[16]; //Accepted, Unknown
  4710. };
  4711. struct StructDataTransfer
  4712. {
  4713. unsigned char VendorId[256];
  4714. unsigned char MessageId[52];
  4715. unsigned char Data[512];
  4716. unsigned char ResponseStatus[18]; //Accepted, Rejected,UnknownMessageId,UnknownVendorId
  4717. unsigned char ResponseData[256];
  4718. };
  4719. struct StructDiagnosticsStatusNotification
  4720. {
  4721. unsigned char Status[16]; //Idle,Uploaded,UploadFailed,Uploading
  4722. };
  4723. struct StructFirmwareStatusNotification
  4724. {
  4725. unsigned char Status[20]; //Downloaded,DownloadFailed,Downloading,Idle,InstallationFailed,Installing,Installed
  4726. };
  4727. struct StructGetCompositeSchedule
  4728. {
  4729. int ConnectorId;
  4730. int Duration;
  4731. unsigned char ChargingRateUnit[4]; //A,W
  4732. unsigned char ResponseStatus[12]; //Accepted,Rejected
  4733. int ResponseConnectorId;
  4734. unsigned char ResponseScheduleStart[28];
  4735. struct StructChargingSchedule ResponseChargingSchedule;
  4736. };
  4737. struct StructGetConfiguration
  4738. {
  4739. struct StructConfigurationKeyItems *Key;
  4740. struct StructConfigurationKey *ResponseConfigurationKey;
  4741. struct StructConfigurationKeyItems *ResponseUnknownKey;
  4742. };
  4743. struct StructGetDiagnostics
  4744. {
  4745. unsigned char Location[256];
  4746. int Retries;
  4747. int RetryInterval;
  4748. unsigned char StartTime[28];
  4749. unsigned char StopTime[28];
  4750. unsigned char ResponseFileName[256];
  4751. };
  4752. struct StructGetLocalListVersion
  4753. {
  4754. int ResponseListVersion;
  4755. };
  4756. struct StructMeterValues
  4757. {
  4758. int ConnectorId;
  4759. int TransactionId;
  4760. struct StructMeterValue MeterValue[0];
  4761. };
  4762. struct StructRemoteStartTransaction
  4763. {
  4764. int ConnectorId;
  4765. unsigned char IdTag[20];
  4766. struct StructChargingProfile ChargingProfile;
  4767. unsigned char ResponseStatus[10]; //Accepted, Rejected
  4768. unsigned char guid[37];
  4769. };
  4770. struct StructRemoteStopTransaction
  4771. {
  4772. int TransactionId;
  4773. unsigned char ResponseStatus[10]; //Accepted, Rejected
  4774. };
  4775. struct StructReserveNow
  4776. {
  4777. int ConnectorId;
  4778. unsigned char ExpiryDate[28];
  4779. unsigned char IdTag[20];
  4780. unsigned char ParentIdTag[20];
  4781. int ReservationId;
  4782. unsigned char ResponseStatus[12]; //Accepted, Faulted, Occupied, Rejected, Unavailable
  4783. unsigned char guid[37]; //OCPP Server request message uuid
  4784. };
  4785. struct StructReset
  4786. {
  4787. unsigned char Type[8]; //Hard, Soft
  4788. unsigned char ResponseStatus[10]; //Accepted, Rejected
  4789. unsigned char guid[37]; //OCPP Server request message uuid
  4790. };
  4791. struct StructSendLocalList
  4792. {
  4793. int ListVersion;
  4794. unsigned char UpdateType[16]; //Differential, Full
  4795. struct StructLocalAuthorizationList *LocalAuthorizationList;
  4796. unsigned char ResponseStatus[16]; //Accepted, Failed, NotSupported, VersionMismatch
  4797. };
  4798. struct StructSetChargingProfile
  4799. {
  4800. int ConnectorId;
  4801. struct StructChargingProfile ChargingProfile;
  4802. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotSupported
  4803. };
  4804. struct StructTriggerMessage
  4805. {
  4806. unsigned char RequestedMessage[32]; /*
  4807. "BootNotification",
  4808. "DiagnosticsStatusNotification",
  4809. "FirmwareStatusNotification",
  4810. "Heartbeat",
  4811. "MeterValues",
  4812. "StatusNotification"
  4813. */
  4814. int ConnectorId;
  4815. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotImplemented
  4816. };
  4817. struct StructUnlockConnector
  4818. {
  4819. int ConnectorId;
  4820. unsigned char ResponseStatus[16]; //Unlocked, UnlockFailed, NotSupported
  4821. unsigned char guid[37]; //OCPP Server request message uuid
  4822. };
  4823. struct StructUpdateFirmware
  4824. {
  4825. unsigned char Location[256];
  4826. int Retries;
  4827. unsigned char RetrieveDate[28];
  4828. int RetryInterval;
  4829. };
  4830. struct OCPP16ConfigurationItem
  4831. {
  4832. unsigned char ItemName[64];
  4833. unsigned char ItemAccessibility;//0:RO, 1:RW
  4834. unsigned char ItemData[128];
  4835. };
  4836. struct OCPP16ConfigurationTable
  4837. {
  4838. //please refer to OCPP 1.6 chapter 9
  4839. struct OCPP16ConfigurationItem CoreProfile[35];
  4840. struct OCPP16ConfigurationItem LocalAuthListManagementProfile[3];
  4841. struct OCPP16ConfigurationItem ReservationProfile[1];
  4842. struct OCPP16ConfigurationItem SmartChargingProfile[5];
  4843. };
  4844. struct OCPP16Data
  4845. {
  4846. unsigned char OcppServerURL[512]; //http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
  4847. unsigned char ChargeBoxId[128];
  4848. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  4849. unsigned int Timeout_Secs;
  4850. unsigned short Ping_Pong_Interval;
  4851. union
  4852. {
  4853. //Operations Initiated by Charge Point
  4854. unsigned char CpMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4855. struct
  4856. {
  4857. //CpMsgValue[0]
  4858. unsigned char DataTransferReq:1; //bit 0,
  4859. unsigned char DataTransferConf:1; //bit 1,
  4860. unsigned char StartTransactionReq:1; //bit 2,
  4861. unsigned char StartTransactionConf:1; //bit 3,
  4862. unsigned char StopTransactionReq:1; //bit 4,
  4863. unsigned char StopTransactionConf:1; //bit 5,
  4864. unsigned char :2; //bit 6,7 , reserved
  4865. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4866. }CpMsg;
  4867. union
  4868. {
  4869. //Operations Initiated by Sequence Point
  4870. unsigned char SpMsgValue[1];
  4871. struct
  4872. {
  4873. //SpMsgValue[0]
  4874. unsigned char BootNotificationReq :1; //bit 0,
  4875. unsigned char BootNotificationConf :1; //bit 1,
  4876. unsigned char AuthorizeReq :1; //bit 2,
  4877. unsigned char AuthorizeConf :1; //bit 3,
  4878. unsigned char DiagnosticsStatusNotificationReq :1; //bit 4,
  4879. unsigned char DiagnosticsStatusNotificationConf :1; //bit 5,
  4880. unsigned char FirmwareStatusNotificationReq :1; //bit 6,
  4881. unsigned char FirmwareStatusNotificationConf :1; //bit 7,
  4882. } bits;
  4883. } SpMsg;
  4884. union
  4885. {
  4886. //Operations Initiated by Central System
  4887. unsigned char CsMsgValue[3 * (CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY)];
  4888. struct
  4889. {
  4890. //CsMsgValue[0]
  4891. unsigned char CancelReservationReq :1; //bit 0,
  4892. unsigned char CancelReservationConf :1; //bit 1,
  4893. unsigned char ChangeAvailabilityReq :1; //bit 2,
  4894. unsigned char ChangeAvailabilityConf :1; //bit 3,
  4895. unsigned char ReserveNowReq :1; //bit 4,
  4896. unsigned char ReserveNowConf :1; //bit 5,
  4897. unsigned char SetChargingProfileReq :1; //bit 6,
  4898. unsigned char SetChargingProfileConf :1; //bit 7,
  4899. //CsMsgValue[1]
  4900. unsigned char TriggerMessageReq :1; //bit 0,
  4901. unsigned char TriggerMessageConf :1; //bit 1,
  4902. unsigned char UnlockConnectorReq :1; //bit 2,
  4903. unsigned char UnlockConnectorConf :1; //bit 3,
  4904. unsigned char RemoteStartTransactionReq :1; //bit 4,
  4905. unsigned char RemoteStartTransactionConf :1; //bit 5,
  4906. unsigned char RemoteStopTransactionReq :1; //bit 6,
  4907. unsigned char RemoteStopTransactionConf :1; //bit 7,
  4908. //CsMsgValue[2]
  4909. unsigned char ClearChargingProfileReq :1; //bit 0,
  4910. unsigned char ClearChargingProfileConf :1; //bit 1,
  4911. unsigned char DataTransferReq :1; //bit 2,
  4912. unsigned char DataTransferConf :1; //bit 3,
  4913. unsigned char GetCompositeScheduleReq :1; //bit 4,
  4914. unsigned char GetCompositeScheduleConf :1; //bit 5,
  4915. unsigned char :2; //bit 6,7
  4916. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4917. }CsMsg;
  4918. union
  4919. {
  4920. //Operations Initiated by Main System
  4921. unsigned char MsMsgValue[2];
  4922. struct
  4923. {
  4924. //CsMsgValue[0]
  4925. unsigned char ChangeConfigurationReq :1; //bit 0,
  4926. unsigned char ChangeConfigurationConf :1; //bit 1,
  4927. unsigned char ClearCacheReq :1; //bit 2,
  4928. unsigned char ClearCacheConf :1; //bit 3,
  4929. unsigned char GetConfigurationReq :1; //bit 4,
  4930. unsigned char GetConfigurationConf :1; //bit 5,
  4931. unsigned char UpdateFirmwareReq :1; //bit 6,
  4932. unsigned char UpdateFirmwareConf :1; //bit 7,
  4933. //CsMsgValue[1]
  4934. unsigned char GetDiagnosticsReq :1; //bit 0,
  4935. unsigned char GetDiagnosticsConf :1; //bit 1,
  4936. unsigned char GetLocalListVersionReq :1; //bit 2,
  4937. unsigned char GetLocalListVersionConf :1; //bit 3,
  4938. unsigned char ResetReq :1; //bit 4,
  4939. unsigned char ResetConf :1; //bit 5,
  4940. unsigned char SendLocalListReq :1; //bit 6,
  4941. unsigned char SendLocalListConf :1; //bit 7,
  4942. } bits;
  4943. } MsMsg;
  4944. union
  4945. {
  4946. //Operations triggered by CSU
  4947. unsigned char CSUMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4948. struct
  4949. {
  4950. //CSUMsgValue[0]
  4951. unsigned char ChargingProfileReq:1; //bit 0,
  4952. unsigned char ChargingProfileConf:1; //bit 0,
  4953. unsigned char :6; //bit 1,2,3,4,5,6,7 , reserved
  4954. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4955. }CSUMsg;
  4956. struct StructBootNotification BootNotification;
  4957. struct StructHeartbeat Heartbeat;
  4958. struct StructAuthorize Authorize;
  4959. struct StructStartTransaction StartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4960. struct StructStopTransaction StopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4961. struct StructStatusNotification StatusNotification[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4962. struct StructCancelReservation CancelReservation[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4963. struct StructChangeAvailability ChangeAvailability[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4964. struct StructChangeConfiguration ChangeConfiguration;
  4965. struct StructClearCache ClearCache;
  4966. struct StructClearChargingProfile ClearChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4967. struct StructDataTransfer DataTransfer[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4968. struct StructDiagnosticsStatusNotification DiagnosticsStatusNotification;
  4969. struct StructFirmwareStatusNotification FirmwareStatusNotification;
  4970. struct StructGetCompositeSchedule GetCompositeSchedule[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4971. struct StructGetConfiguration GetConfiguration;
  4972. struct StructGetDiagnostics GetDiagnostics;
  4973. struct StructGetLocalListVersion GetLocalListVersion;
  4974. struct StructMeterValues MeterValues[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4975. struct StructRemoteStartTransaction RemoteStartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4976. struct StructRemoteStopTransaction RemoteStopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4977. struct StructReserveNow ReserveNow[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4978. struct StructReset Reset;
  4979. struct StructSendLocalList SendLocalList;
  4980. struct StructSetChargingProfile SetChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4981. struct StructTriggerMessage TriggerMessage[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4982. struct StructUnlockConnector UnlockConnector[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4983. struct StructUpdateFirmware UpdateFirmware;
  4984. struct OCPP16ConfigurationTable ConfigurationTable;
  4985. struct StructChargingProfile SmartChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4986. };
  4987. #endif // DEFINE_H_