define.h 200 KB

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