define.h 250 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421
  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. #elif DD360
  93. #define MAX_PSU_QUANTITY 62
  94. #define CHAdeMO_QUANTITY 0
  95. #define CCS_QUANTITY 1
  96. #define GB_QUANTITY 0
  97. #define AC_QUANTITY 0
  98. #define PSU_QUANTITY 2
  99. #define ONE_CONNECTOR_USE 0
  100. #elif DO360
  101. #define MAX_PSU_QUANTITY 62
  102. #define CHAdeMO_QUANTITY 0
  103. #define CCS_QUANTITY 1
  104. #define GB_QUANTITY 0
  105. #define AC_QUANTITY 0
  106. #define PSU_QUANTITY 2
  107. #define ONE_CONNECTOR_USE 0
  108. #elif ATE
  109. #define MAX_PSU_QUANTITY 62
  110. #define CHAdeMO_QUANTITY 0
  111. #define CCS_QUANTITY 1
  112. #define GB_QUANTITY 0
  113. #define AC_QUANTITY 0
  114. #define PSU_QUANTITY 2
  115. #define ONE_CONNECTOR_USE 0
  116. #else
  117. #define MAX_PSU_QUANTITY 62
  118. #define CHAdeMO_QUANTITY 1
  119. #define CCS_QUANTITY 1
  120. #define GB_QUANTITY 0
  121. #define AC_QUANTITY 1
  122. #define PSU_QUANTITY 2
  123. #define ONE_CONNECTOR_USE 0
  124. #endif
  125. /*SystemLog message*/
  126. #define SystemLogMessage //for debug info save to log file
  127. #define ConsloePrintLog //for debug info print to console
  128. /**************************************************************************************/
  129. /*****************************share memory key information*****************************/
  130. /**************************************************************************************/
  131. #define ShmSysConfigAndInfoKey 1001
  132. #define ShmPsuKey 1002
  133. #define ShmCHAdeMOCommKey 1003
  134. #define ShmCcsCommKey 1004
  135. #define ShmStatusCodeKey 1005
  136. #define ShmPrimaryMcuKey 1006
  137. #define ShmFanBdKey 1007
  138. #define ShmRelayBdKey 1008
  139. #define ShmOcppModuleKey 1009
  140. #define ShmGBTCommKey 1010
  141. #define ShmLedBdKey 1011
  142. /**************************************************************************************/
  143. /****************** Share memory configuration value constant define ******************/
  144. /**************************************************************************************/
  145. enum SYSTEM_STATUS
  146. {
  147. SYS_MODE_BOOTING = 0,
  148. SYS_MODE_IDLE = 1,
  149. SYS_MODE_AUTHORIZING = 2,
  150. SYS_MODE_MODE_REASSIGN_CHECK = 3,
  151. SYS_MODE_REASSIGN = 4,
  152. SYS_MODE_PREPARING = 5,
  153. SYS_MODE_PREPARE_FOR_EV = 6,
  154. SYS_MODE_PREPARE_FOR_EVSE = 7,
  155. SYS_MODE_CHARGING = 8,
  156. SYS_MODE_TERMINATING = 9,
  157. SYS_MODE_COMPLETE = 10,
  158. SYS_MODE_ALARM = 11,
  159. SYS_MODE_FAULT = 12,
  160. SYS_MODE_RESERVATION = 13,
  161. SYS_MODE_BOOKING = 14,
  162. SYS_MODE_MAINTAIN = 15,
  163. SYS_MODE_DEBUG = 16,
  164. SYS_MODE_CCS_PRECHARGE_STEP0 = 17,
  165. SYS_MODE_CCS_PRECHARGE_STEP1 = 18,
  166. SYS_MODE_UPDATE = 19
  167. };
  168. enum AUTHORIZATION_MODE
  169. {
  170. AUTH_MODE_ENABLE = 0,
  171. AUTH_MODE_DISABLE = 1
  172. };
  173. enum LCD_LANGUAGE
  174. {
  175. LCD_LANG_ENGLISH = 0,
  176. LCD_LANG_CHT = 1,
  177. LCD_LANG_CHS = 2,
  178. LCD_LANG_JAPANESE = 3,
  179. LCD_LANG_FRENCH = 4,
  180. LCD_LANG_ITALIAN = 5,
  181. LCD_LANG_SPANISH = 6,
  182. LCD_LANG_GERMAN = 7,
  183. LCD_LANG_DUTCH = 8,
  184. LCD_LANG_NORWEGIAN = 9,
  185. LCD_LANG_FINNISH = 10,
  186. LCD_LANG_SWEDISH = 11,
  187. LCD_LANG_SLOVENIAN = 12,
  188. LCD_LANG_THAI = 13,
  189. };
  190. enum RFID_ENDIAN
  191. {
  192. RFID_ENDIAN_LITTLE = 0,
  193. RFID_ENDIAN_BIG = 1
  194. };
  195. enum PHASE_LOSS_POLICY
  196. {
  197. LOSS_POLICY_CHARGING = 0,
  198. LOSS_POLICY_STOP = 1
  199. };
  200. enum CCS_AUTHPRIZATION_MODE
  201. {
  202. CCS_AUTH_MODE_EIM = 0,
  203. CCS_AUTH_MODE_MIXED = 1
  204. };
  205. enum OFF_LINE_POLICY
  206. {
  207. OFF_POLICY_LOCALLIST = 0,
  208. OFF_POLICY_PH_RFID = 1,
  209. OFF_POLICY_FREE = 2,
  210. OFF_POLICY_NOCHARGE = 3
  211. };
  212. /*Configuration enum*/
  213. enum CoreProfile {
  214. AllowOfflineTxForUnknownId=0,
  215. AuthorizationCacheEnabled,
  216. AuthorizeRemoteTxRequests,
  217. BlinkRepeat,
  218. ClockAlignedDataInterval,
  219. ConnectionTimeOut,
  220. GetConfigurationMaxKeys,
  221. HeartbeatInterval,
  222. LightIntensity,
  223. LocalAuthorizeOffline,
  224. LocalPreAuthorize,
  225. MaxEnergyOnInvalidId,
  226. MeterValuesAlignedData,
  227. MeterValuesAlignedDataMaxLength,
  228. MeterValuesSampledData,
  229. MeterValuesSampledDataMaxLength,
  230. MeterValueSampleInterval,
  231. MinimumStatusDuration,
  232. NumberOfConnectors,
  233. ResetRetries,
  234. ConnectorPhaseRotation,
  235. ConnectorPhaseRotationMaxLength,
  236. StopTransactionOnEVSideDisconnect,
  237. StopTransactionOnInvalidId,
  238. StopTxnAlignedData,
  239. StopTxnAlignedDataMaxLength,
  240. StopTxnSampledData,
  241. StopTxnSampledDataMaxLength,
  242. SupportedFeatureProfiles,
  243. SupportedFeatureProfilesMaxLength,
  244. TransactionMessageAttempts,
  245. TransactionMessageRetryInterval,
  246. UnlockConnectorOnEVSideDisconnect,
  247. WebSocketPingInterval,
  248. QueueOffLineStartTransactionMessage,
  249. _CoreProfile_CNT
  250. };
  251. /**************************************************************************************/
  252. /****structure SysConfigData => shall store the data to NAND flash****************/
  253. /****structure SysInfoData => shall NOT store the data to NAND flash***************/
  254. /****according to System Configuration and Information Table.xlsx Rev.0.2 *******/
  255. /**************************************************************************************/
  256. struct NoneUse
  257. {
  258. unsigned char unknown; // None use struct
  259. };
  260. struct EthConfigData
  261. {
  262. unsigned char EthDhcpClient; //0: enable,1: disable
  263. unsigned char EthMacAddress[18]; //default: Null
  264. unsigned char EthIpAddress[16]; //Eth0 default:192.168.0.10 ,Eth1 default:192.168.1.10
  265. unsigned char EthSubmaskAddress[16]; //Eth0 default:255.255.255.0 ,Eth1 default:255.255.255.0
  266. unsigned char EthGatewayAddress[16]; //Eth0 default:192.168.0.254 ,Eth1 default:192.168.1.254
  267. };
  268. struct WifiConfigData
  269. {
  270. unsigned char WifiMode; //0: disable, 1: Infrastructure client, 2: Infrastructure server, 3: Ad-Hoc
  271. unsigned char WifiSsid[256]; //default: Null
  272. unsigned char WifiPassword[256]; //default: Null
  273. int WifiRssi; //dbm
  274. unsigned char WifiDhcpServer; //0: enable, 1: disable
  275. unsigned char WifiDhcpClient; //0: enable, 1: disable
  276. unsigned char WifiMacAddress[18]; //default: Null
  277. unsigned char WifiIpAddress[16]; //default:192.168.2.10
  278. unsigned char WifiSubmaskAddress[16]; //default:255.255.255.0
  279. unsigned char WifiGatewayAddress[16]; //default:192.168.2.254
  280. unsigned char WifiNetworkConn; //0: disconnected, 1: connected
  281. };
  282. struct TeleConfigData
  283. {
  284. unsigned char TelcomModelName[64]; //default: Null
  285. unsigned char TelcomSoftwareVer[64]; //default: Null
  286. unsigned char TelcomApn[256]; //default: Null
  287. int TelcomRssi; //dbm
  288. unsigned char TelcomChapPapId[256]; //default: Null
  289. unsigned char TelcomChapPapPwd[256]; //default: Null
  290. unsigned char TelcomModemImei[16]; //default: Null
  291. unsigned char TelcomSimImsi[16]; //default: Null
  292. unsigned char TelcomSimIccid[22]; //default: Null
  293. unsigned char TelcomSimStatus; //0: no SIM card is found, 1: valid SIM card, 2: invalid SIM card
  294. unsigned char TelcomModemMode; //0: No services, 1: CDMA, 2: GSM/GPRS, 3: WCDMA, 4: GSM/WCDMA, 5: TD_SCDMA mode, 6: Unknow
  295. unsigned char TelcomIpAddress[16]; //default: Null
  296. unsigned char TelcomNetworkConn; //0: disconnected, 1: connected
  297. };
  298. struct BtConfigData
  299. {
  300. unsigned char LoginCentralID[64]; //default: Null
  301. unsigned char isLogin; //0: Central device non-login 1: Central device login
  302. unsigned char isRequestStart; //0: no action 1: request start charging
  303. unsigned char isRequestStop; //0: no action 1: request stop charging
  304. };
  305. struct BillingConfigData
  306. {
  307. unsigned char isBilling; //0:not for business 1:for business
  308. unsigned char Currency; //
  309. float Fee[24]; //fee for 24 hours
  310. float Cur_fee; // display current fee
  311. };
  312. struct LED
  313. {
  314. unsigned char Intensity; // LED bar intensity 0: Darkest 1: Medium 2: Brightest
  315. unsigned char Red[3]; // Red color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  316. unsigned char Green[3]; // Green color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  317. unsigned char Blue[3]; // Blue color 0~100, element 0: IDLE 1: CHARGING 2: FAULT
  318. };
  319. struct SysConfigData
  320. {
  321. /**************System***************/
  322. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  323. unsigned char ModelName[64]; //charger model name
  324. unsigned char AcModelName[64]; //for third gun (DC + AC)
  325. unsigned char SerialNumber[64]; //charger system serial number
  326. unsigned char SystemId[128]; //charger system ID
  327. unsigned char SystemDateTime[32]; //charger system date and time
  328. unsigned char AcPhaseCount; //AC EVSE power phase quantity, 1: One phase 3: Three phase
  329. unsigned char AuthorisationMode; //0: enable, 1: disable
  330. unsigned char DefaultLanguage; //
  331. unsigned char RfidCardNumEndian; //0: little endian, 1: big endian
  332. unsigned short AcPlugInTimes; //0~65535
  333. unsigned short GbPlugInTimes; //0~65535
  334. unsigned short Ccs1PlugInTime; //0~65535
  335. unsigned short Ccs2PlugInTimes; //0~65535
  336. unsigned short ChademoPlugInTimes; //0~65535
  337. unsigned char PsuAcInputType; //0: 220, 1: 277
  338. unsigned short RatingCurrent; //0: Depend on Model name, 1 ~ rating value amp
  339. unsigned short AcRatingCurrent; //for third gun; 0: Depend on Model name, 1 ~ rating value amp
  340. unsigned char isAPP; //for AuthorisationMode=0; 0:false, 1:true
  341. unsigned char isQRCode; //for AuthorisationMode=0; 0:false, 1:true
  342. unsigned char isRFID; //for AuthorisationMode=0; 0:false, 1:true
  343. unsigned char QRCodeMadeMode; //for isQRCode=1 ; 0: default 1:customized
  344. unsigned char QRCodeContent[128]; //for QRCodeMadeMode=1
  345. unsigned char TotalConnectorCount; //Connector count
  346. unsigned char AcConnectorCount; // For DC type
  347. unsigned char SwitchDebugFlag; // Console Debug
  348. unsigned char AlwaysGfdFlag;
  349. /**************Charging***************/
  350. unsigned short MaxChargingEnergy; //0: no limit, 1 ~ 65535 kWh
  351. unsigned short MaxChargingPower; //0: rating value, 1 ~ RATING_POWER kW
  352. unsigned short MaxChargingCurrent; //0: rating value, 1 ~ RATING_CURRENT amp
  353. unsigned short AcMaxChargingCurrent; //for third gun; 0: rating value, 1 ~ RATING_CURRENT amp
  354. unsigned short MaxChargingDuration; //0: no limit, 1 ~ 65535 minutes
  355. unsigned char PhaseLossPolicy; //0: charging, 1: stop charging
  356. unsigned char LocalWhiteCard[10][32]; //Max. card quantity is 10
  357. unsigned char UserId[32]; //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
  358. struct BillingConfigData BillingData;
  359. /**************Network***************/
  360. unsigned char FtpServer[256]; //the ftp server for Phihong server to do data transimission
  361. struct EthConfigData Eth0Interface;
  362. struct EthConfigData Eth1Interface;
  363. struct WifiConfigData AthInterface;
  364. struct TeleConfigData TelecomInterface;
  365. struct BtConfigData Bluetooth;
  366. /**************Backend***************/
  367. unsigned int BackendConnTimeout; //default : 300s
  368. unsigned char OfflinePolicy; //0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
  369. unsigned short OfflineMaxChargeEnergy; //0: same as MaxChargingEnergy, 1 ~ 65535 kWh
  370. unsigned short OfflineMaxChargeDuration; //0: same as MaxChargeDuration, 1 ~ 65535 minutes
  371. 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"
  372. unsigned char ChargeBoxId[128];
  373. unsigned char chargePointVendor[20]; //the Vendor of the ChargePoint
  374. unsigned int Checksum; //4 bytes checksum
  375. struct LED LedInfo; // LED configuration info
  376. };
  377. struct ChargingInfoData
  378. {
  379. unsigned char Index;
  380. unsigned char slotsIndex;
  381. unsigned char Type; // 0 : Chademo, 1 : CCS, 2: GB
  382. unsigned char type_index;
  383. unsigned char Evboard_id; // for EV board
  384. unsigned char StopChargeFlag; // for EV board
  385. unsigned char SystemStatus; //0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  386. unsigned char PreviousSystemStatus; // 0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
  387. int ReservationId;
  388. unsigned char IsAvailable;
  389. float MaximumChargingVoltage; //0~6553.5 volt
  390. float AvailableChargingCurrent; //0~6553.5 amp
  391. float AvailableChargingPower; //0~6553.5 kW
  392. float DividChargingCurrent; //0~6553.5 amp
  393. float DeratingChargingCurrent; //0~6553.5 amp
  394. float DeratingChargingPower; //0~6553.5 kW
  395. float FuseChargingVoltage; //0~6553.5 volt
  396. float FireChargingVoltage; //0~6553.5 volt
  397. float PresentChargingVoltage; //0~6553.5 volt
  398. float PresentChargingCurrent; //0~6553.5 amp
  399. float PresentChargingPower; //0~6553.5 kW
  400. float PresentChargedEnergy; //0~6553.5 kWh
  401. int PresentChargedDuration; // second
  402. int RemainChargingDuration; // second
  403. float EvBatteryMaxVoltage; // 0~6553.5 volt
  404. float EvBatterytargetVoltage; // 0~6553.5 volt
  405. float EvBatterytargetCurrent; //102.3 0~200(A) (unit:1A)
  406. int EvBatterySoc; // 0~100%
  407. unsigned char ConnectorPlugIn; //0: unplug, 1: Plug-in
  408. unsigned char GunLocked; //0: unlocked 1: locked
  409. float PilotVoltage;
  410. 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
  411. unsigned char PilotDuty; // 0~100%
  412. unsigned char StartUserId[32]; // This ID is trigger start charging event user by RFID、back-end、BLE.
  413. unsigned char StartDateTime[32]; // Charging cycle start date time
  414. unsigned char StopDateTime[32]; // Charging cycle stop date time
  415. unsigned char StartMethod;
  416. float ChargingFee;
  417. // Connector Temp
  418. unsigned char ConnectorTemp; //0x00: -60¢XC ~ 0xFE: 194
  419. // Charging Status
  420. unsigned char GroundFaultStatus; // for GFD result => 0x00 : None, 0x01 : Can Start Charging, 0x02 : Stop Charging
  421. unsigned short RealRatingPower;
  422. unsigned char RelayWeldingCheck; // 0 : No Comp., 1 : Comp.
  423. unsigned char PrechargeStatus; // for ccs precharge => 0x00 : None defined, 0x01 : Accepted
  424. float PowerConsumption; // This contains the meter value (Power Consumption) kWh
  425. unsigned char RelayK1K2Status; // 0x00 : open, 0x01 : close
  426. unsigned char RelayKPK2Status; // 0x00 : open, 0x01 : close
  427. unsigned char TimeoutFlag; // 0 : none,
  428. struct timeval TimeoutTimer;
  429. unsigned char MaxChargeEnable;
  430. unsigned char IsReadyToCharging;
  431. unsigned char CcsAuthentication; // 0:EIM, 1:EIM & PnC mixed
  432. unsigned char AcCcsChargingMode; // 0:BC (PWM) only, 1:BC & PLC mixed
  433. unsigned short SampleChargingCur[10];
  434. /**************Alston for AC***************/
  435. unsigned char SelfTest_Comp;
  436. unsigned char version[16];
  437. unsigned char IsModeChagned;
  438. unsigned char IsCharging;
  439. unsigned char IsErrorOccur;
  440. float RealMaxVoltage;
  441. float RealMaxCurrent;
  442. float RealMaxPower;
  443. unsigned char ConnectorWarningCode[7];
  444. unsigned char ConnectorAlarmCode[7];
  445. unsigned char EvConnAlarmCode[7];
  446. float ChargingProfileCurrent; //0~6553.5 amp
  447. float ChargingProfilePower; //0~6553.5 kW
  448. float PresentChargingVoltageL2; //0~6553.5 volt
  449. float PresentChargingVoltageL3; //0~6553.5 volt
  450. float PresentChargingCurrentL2; //0~6553.5 amp
  451. float PresentChargingCurrentL3; //0~6553.5 amp
  452. char RemoteStartFlag;
  453. unsigned char MaxChargingToAverPassFlag;
  454. unsigned char EVCCID[18]; //the MAC address of the EVCC in Hex
  455. unsigned char isRemoteStart;
  456. };
  457. struct SysInfoData
  458. {
  459. /**************System***************/
  460. unsigned char BootingStatus; // 0 : booting, 1 : Initializing Complete.
  461. unsigned char AuthorizeFlag; // 0 : None, 1 : Authorizing
  462. unsigned char FactoryConfiguration; //0: normal, 1: trigger, charger will return the configuration to factory default if trigger
  463. float InputVoltageR; //0~655.35 volt
  464. float InputVoltageS; //0~655.35 volt
  465. float InputVoltageT; //0~655.35 volt
  466. unsigned int SystemFanRotaSpeed; //0 ~ 65535 RPM
  467. unsigned int PsuFanRotaSpeed; //0 ~ 65535 RPM
  468. unsigned char AuxPower5V; //0 ~ 255 volt
  469. unsigned char AuxPower12V; //0 ~ 255 volt
  470. unsigned char AuxPower24V; //0 ~ 255 volt
  471. unsigned char AuxPower48V; //0 ~ 255 volt
  472. unsigned char CsuHwRev[32]; //CSU board hardware version
  473. unsigned char CsuBootLoadFwRev[32]; //CSU board bootloader firmware version
  474. unsigned char CsuKernelFwRev[32];//CSU board OS kernel firmware version
  475. unsigned char CsuRootFsFwRev[32];//CSU board root file system firmware version
  476. unsigned char CsuPrimFwRev[32]; //CSU board root file system firmware version
  477. unsigned char LcmHwRev[32]; //LCM module hardware version
  478. unsigned char LcmFwRev[32]; //LCM module firmware version
  479. unsigned char PsuHwRev[32]; //PSU hardware version
  480. unsigned char PsuPrimFwRev[32]; //PSU primary firmware version
  481. unsigned char PsuSecFwRev[32]; //PSU secondary firmware version
  482. unsigned char AuxPwrHwRev[32]; //Aux. power module hardware version
  483. unsigned char AuxPwrFwRev[32]; //Aux. power module firmware version
  484. unsigned char FanModuleHwRev[32]; //Fan module hardware version
  485. unsigned char FanModuleFwRev[32]; //Fan module firmware version
  486. unsigned char RelayModuleHwRev[32]; //Relay control module hardware version
  487. unsigned char RelayModuleFwRev[32]; //Relay control module firmware version
  488. unsigned char TelcomModemFwRev[32]; //the 3G/4G modem firmware version
  489. unsigned char LedModuleFwRev[32]; //LED control module firmware version
  490. unsigned char Connector1FwRev[32]; //Connector1 module firmware version
  491. unsigned char Connector2FwRev[32]; //Connector2 module firmware version
  492. int SystemAmbientTemp; // -40 ~ 215 degree C
  493. int SystemCriticalTemp; // -40 ~ 215 degree C
  494. int CcsConnectorTemp; // -40 ~ 215 degree C
  495. int PsuAmbientTemp; // -40 ~ 215 degree C
  496. /**************Charging***************/
  497. struct ChargingInfoData ChademoChargingData[CHAdeMO_QUANTITY];
  498. struct ChargingInfoData CcsChargingData[CCS_QUANTITY];
  499. struct ChargingInfoData GbChargingData[GB_QUANTITY];
  500. struct ChargingInfoData AcChargingData[AC_QUANTITY];
  501. unsigned char CurGunSelected;
  502. unsigned char CurGunSelectedByAc;
  503. /**************Network***************/
  504. unsigned char InternetConn; //0: disconnected, 1: connected
  505. /**************Backend***************/
  506. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  507. char OrderCharging;
  508. /**************Alston***************/
  509. unsigned char WaitForPlugit; //0: none scan, 1: scanning
  510. unsigned char PageIndex; //0 : Initialize
  511. //1 : idle
  512. //4 : Authorizing
  513. //5 : Authorizing complete
  514. //6 : Authorizing fail
  515. //7 : Wait for Plug
  516. //8 : Pre-charge
  517. //9 : Charging
  518. unsigned char SelfTestSeq; //
  519. unsigned char ReAssignedFlag; //
  520. unsigned char CanAverageCharging;
  521. unsigned char MainChargingMode; // 0 : Max, 1 : Average
  522. unsigned char BridgeRelayStatus;
  523. unsigned char FirmwareUpdate; // 0 : none, 1 : update.
  524. unsigned char AcContactorStatus; // 0: disconnected, 1: connected
  525. unsigned char SystemTimeoutFlag; // 0 : none, 1 : self test
  526. struct timeval SystemTimeoutTimer;
  527. unsigned char SystemPage;
  528. unsigned char ConnectorPage;
  529. unsigned char IsAlternatvieConf; // 0 : normal, 1 : alternative
  530. unsigned char StartToChargingFlag; // 0 : Stop, 1 : Start for modbus
  531. unsigned char ChargerType; // 0 : IEC, 1 : UL
  532. };
  533. struct WARNING_CODE_INFO
  534. {
  535. unsigned char WarningCount;
  536. unsigned char PageIndex;
  537. unsigned char WarningCode[10][7];
  538. unsigned char Level;
  539. unsigned char ExtraErrProcess; // 0 : none, 1 : input uvp..
  540. };
  541. struct SysConfigAndInfo
  542. {
  543. struct SysConfigData SysConfig;
  544. struct SysInfoData SysInfo;
  545. struct WARNING_CODE_INFO SysWarningInfo;
  546. };
  547. char Currency[54][3]=
  548. {
  549. "AED", // - Emirati Dirham
  550. "ARS", // - Argentine Peso
  551. "AUD", // - Australian Dollar
  552. "BGN", // - Bulgarian Lev
  553. "BHD", // - Bahraini Dinar
  554. "BND", // - Bruneian Dollar
  555. "BRL", // - Brazilian Real
  556. "BWP", // - Botswana Pula
  557. "CAD", // - Canadian Dollar
  558. "CHF", // - Swiss Franc
  559. "CLP", // - Chilean Peso
  560. "CNY", // - Chinese Yuan Renminbi
  561. "COP", // - Colombian Peso
  562. "CZK", // - Czech Koruna
  563. "DKK", // - Danish Krone
  564. "EUR", // - Euro
  565. "GBP", // - British Pound
  566. "HKD", // - Hong Kong Dollar
  567. "HRK", // - Croatian Kuna
  568. "HUF", // - Hungarian Forint
  569. "IDR", // - Indonesian Rupiah
  570. "ILS", // - Israeli Shekel
  571. "INR", // - Indian Rupee
  572. "IRR", // - Iranian Rial
  573. "ISK", // - Icelandic Krona
  574. "JPY", // - Japanese Yen
  575. "KRW", // - South Korean Won
  576. "KWD", // - Kuwaiti Dinar
  577. "KZT", // - Kazakhstani Tenge
  578. "LKR", // - Sri Lankan Rupee
  579. "LYD", // - Libyan Dinar
  580. "MUR", // - Mauritian Rupee
  581. "MXN", // - Mexican Peso
  582. "MYR", // - Malaysian Ringgit
  583. "NOK", // - Norwegian Krone
  584. "NPR", // - Nepalese Rupee
  585. "NZD", // - New Zealand Dollar
  586. "OMR", // - Omani Rial
  587. "PHP", // - Philippine Peso
  588. "PKR", // - Pakistani Rupee
  589. "PLN", // - Polish Zloty
  590. "QAR", // - Qatari Riyal
  591. "RON", // - Romanian New Leu
  592. "RUB", // - Russian Ruble
  593. "SAR", // - Saudi Arabian Riyal
  594. "SEK", // - Swedish Krona
  595. "SGD", // - Singapore Dollar
  596. "THB", // - Thai Baht
  597. "TRY", // - Turkish Lira
  598. "TTD", // - Trinidadian Dollar
  599. "TWD", // - Taiwan New Dollar
  600. "USD", // - US Dollar
  601. "VEF", // - Venezuelan Bolivar
  602. "ZAR" // - South African Rand
  603. };
  604. /**************************************************************************************/
  605. /**************************Alarm Share memory**************************************/
  606. /***************************************************************************************
  607. Status Code A B C D E F
  608. 0: Issue 1: From EVSE 1: Fault (unrecoverable) 001 ~ 999 serial number
  609. e.g., hardware broken, system latch
  610. 1: Recovered 2: From EV 2: Alarm (recoverable)
  611. e.g., OTP, OVP
  612. 3: From Backend 3: Information
  613. e.g., swipe card to stop charging
  614. according to XXX.Revxx
  615. ***************************************************************************************/
  616. /**************************************************************************************/
  617. char FaultStatusCode[40][6]=
  618. {
  619. "011001", //CHAdeMO output fuse blew
  620. "011002", //CCS output fuse blew
  621. "011003", //GB output fuse blew
  622. "011004", //RCD/CCID self-test fail
  623. "011005", //AC input contactor 1 welding
  624. "011006", //AC input contactor 1 driving fault
  625. "011007", //AC input contactor 2 welding
  626. "011008", //AC input contactor 2 driving fault
  627. "011009", //AC output relay welding
  628. "011010", //AC output relay driving fault
  629. "011011", //CHAdeMO output relay welding
  630. "011012", //CHAdeMO output relay driving fault
  631. "011013", //CCS output relay welding
  632. "011014", //CCS output relay driving fault
  633. "011015", //GB output relay welding
  634. "011016", //GB output relay driving fault
  635. "011017", //AC connector temperature sensor broken
  636. "011018", //CHAdeMO connector temperature sensor broken
  637. "011019", //CCS connector temperature sensor broken
  638. "011020", //GB connector temperature sensor broken
  639. "011021", //WiFi module broken
  640. "011022", //3G/4G module broken
  641. "011023", //Aux. power module broken
  642. "011024", //Relay control module /smart box broken
  643. "011025", //CHAdeMO connector lock fail
  644. "011026", //GB connector lock fail
  645. "011027", //AC connector lock fail
  646. "011028", //CHAdeMO module broken
  647. "011029", //CCS module broken
  648. "011030", //GBT module broken
  649. "011031", //PSU module broken
  650. "011032", //RCD/CCID module broken
  651. "011033", //Maximum Output Current setup error
  652. "011034", //Shutter fault
  653. "011035", //Ble module broken
  654. "011036", //Rotary switch fault
  655. "011037", //Reserved
  656. "011038", //Reserved
  657. "011039", //Reserved
  658. "011040" //Reserved
  659. };
  660. struct FaultCodeData
  661. {
  662. unsigned char PreviousFaultVal[5];
  663. union
  664. {
  665. unsigned char FaultVal[5];
  666. struct
  667. {
  668. //FaultVal[0]
  669. unsigned char ChademoOutputFuseBlew:1; //bit 0
  670. unsigned char CcsOutputFuseBlew:1; //bit 1
  671. unsigned char GbOutputFuseBlew:1; //bit 2
  672. unsigned char RcdSelfTestFail:1; //bit 3
  673. unsigned char AcInputContactor1Welding:1; //bit 4
  674. unsigned char AcInputContactor1DrivingFault:1; //bit 5
  675. unsigned char AcInputContactor2Welding:1; //bit 6
  676. unsigned char AcInputContactor2DrivingFault:1; //bit 7
  677. //FaultVal[1]
  678. unsigned char AcOutputRelayWelding:1; //bit 0
  679. unsigned char AcOutputRelayDrivingFault:1; //bit 1
  680. unsigned char ChademoOutputRelayWelding:1; //bit 2
  681. unsigned char ChademoOutputRelayDrivingFault:1; //bit 3
  682. unsigned char CcsOutputRelayWelding:1; //bit 4
  683. unsigned char CcsOutputRelayDrivingFault:1; //bit 5
  684. unsigned char GbOutputRelayWelding:1; //bit 6
  685. unsigned char GbOutputRelayDrivingFault:1; //bit 7
  686. //FaultVal[2]
  687. unsigned char AcConnectorTempSensorBroken:1; //bit 0
  688. unsigned char ChademoConnectorTempSensorBroken:1; //bit 1
  689. unsigned char CcsConnectorTempSensorBroken:1; //bit 2
  690. unsigned char GbConnectorTempSensorBroken:1; //bit 3
  691. unsigned char WiFiModuleBroken:1; //bit 4
  692. unsigned char Telecom4GModuleBroken:1; //bit 5
  693. unsigned char AuxPowerModuleBroken:1; //bit 6
  694. unsigned char RelayControlModuleBroken :1; //bit 7
  695. //FaultVal[3]
  696. unsigned char ChademoConnectorLockFail:1; //bit 0
  697. unsigned char GbConnectorLockFail:1; //bit 1
  698. unsigned char AcConnectorLockFail:1; //bit 2
  699. unsigned char ChademoModuleBroken:1; //bit 3
  700. unsigned char CcsModuleBroken:1; //bit 4
  701. unsigned char GbModuleBroken:1; //bit 5
  702. unsigned char PsuModuleBroken:1; //bit 6
  703. unsigned char RcdCcidModuleBroken:1; //bit 7
  704. //FaultVal[4]
  705. unsigned char MaximumOutputCurrentSetupError:1; //bit 0
  706. unsigned char ShutterFault:1; //bit 1
  707. unsigned char BleModuleBroken:1; //bit 2
  708. unsigned char RotarySwitchFault:1; //bit 3
  709. unsigned char :4; //bit 4 ~ 7 reserved
  710. }bits;
  711. }FaultEvents;
  712. };
  713. char AlarmStatusCode[128][6]=
  714. {
  715. "012200", //System L1 input OVP
  716. "012201", //System L2 input OVP
  717. "012202", //System L3 input OVP
  718. "012203", //System L1 input UVP
  719. "012204", //System L2 input UVP
  720. "012205", //System L3 input UVP
  721. "012206", //PSU L1 input OVP
  722. "012207", //PSU L2 input OVP
  723. "012208", //PSU L3 input OVP
  724. "012209", //PSU L1 input UVP
  725. "012210", //PSU L2 input UVP
  726. "012211", //PSU L3 input UVP
  727. "012212", //System L1 input drop
  728. "012213", //System L2 input drop
  729. "012214", //System L3 input drop
  730. "012215", //System AC output OVP
  731. "012216", //System AC output OCP L1
  732. "012217", //System CHAdeMO output OVP
  733. "012218", //System CHAdeMO output OCP
  734. "012219", //System CCS output OVP
  735. "012220", //System CCS output OCP
  736. "012221", //System GB output OVP
  737. "012222", //System GB output OCP
  738. "012223", //System ambient/inlet OTP
  739. "012224", //System critical point OTP
  740. "012225", //PSU ambient/inlet OTP
  741. "012226", //PSU critical point OTP
  742. "012227", //Aux. power module OTP
  743. "012228", //Relay board/smart box OTP
  744. "012229", //CHAdeMO connector OTP
  745. "012230", //CCS connector OTP
  746. "012231", //GB connector OTP
  747. "012232", //AC connector OTP
  748. "012233", //RCD/CCID trip
  749. "012234", //CHAdeMO GFD trip
  750. "012235", //CCS GFD trip
  751. "012236", //GB GFD trip
  752. "012237", //SPD trip
  753. "012238", //Main power breaker trip
  754. "012239", //Aux. power breaker trip
  755. "012240", //PSU communication fail
  756. "012241", //WiFi module communication fail
  757. "012242", //3G/4G module communication fail
  758. "012243", //RFID module communication fail
  759. "012244", //Bluetooth module communication fail
  760. "012245", //LCM module communication fail
  761. "012246", //Aux. power module communication fail
  762. "012247", //Relay control boaed/smart box communication fail
  763. "012248", //CCS module communication fail
  764. "012249", //CHAdeMO module communication fail
  765. "012250", //GBT module communication fail
  766. "012251", //Emergency stop
  767. "012252", //Door open
  768. "012253", //System fan decay
  769. "012254", //Fail to create share memory
  770. "012255", //CSU initialization failed
  771. "012256", //AC Ground Fault
  772. "012257", //MCU self-test Fault
  773. "012258", //Relay self-test Fault
  774. "012259", //CHAdeMO groundfault detection timeout (GFD)
  775. "012260", //CCS groundfault detection timeout (GFD)
  776. "012261", //GB groundfault detection timeout (GFD)
  777. "012262", //Circuit Short L1
  778. "012263", // PSU Duplicate ID
  779. "012264", // PSU Output Short Circuit
  780. "012265", // PSU Discharge Abnormal
  781. "012266", // PSU Dc Side ShutDown
  782. "012267", // PSU Failure Alarm
  783. "012268", // PSU Protection Alarm
  784. "012269", // PSU FanFailure Alarm
  785. "012270", // PSU Input UVP
  786. "012271", // PSU Input OVP
  787. "012272", // PSU WalkIn State
  788. "012273", // PSU Power Limited State
  789. "012274", // PSU Id Repeat
  790. "012275", // PSU Severe Uneven Current
  791. "012276", // PSU Three Phase Input Inadequate
  792. "012277", // PSU Three Phase Onput Imbalance
  793. "012278", // PSU Ffc Side ShutDown
  794. "012279", // NO PSU Resource
  795. "012280", // Self test Failed due to communication of Relayboard failure
  796. "012281", // Self test Failed due to communication of Fanboard failure
  797. "012282", // Self test Failed due to communication of Primary failure
  798. "012283", // Self test Failed due to communication of Chademoboard failure
  799. "012284", // Self test Failed due to communication of CCSboard failure
  800. "012285", // Self test Failed due to AC Contact failure
  801. "012286", // Self test Failed due to communication of PSU failure
  802. "012287", // Self test Failed due to Model name is none match
  803. "012288", // CCS output UVP
  804. "012289", // Chademo output UVP
  805. "012290", // GBT output UVP
  806. "012291", // Self test Failed due to communication of GBTboard failure
  807. "012292", // Self test Failed due to communication of AC failure
  808. "012293", // Self test Failed due to communication of Ledboard failure
  809. "012294", // Ac input OVP
  810. "012295", // Ac input UVP
  811. "012296", // CHAdeMO groundfault detection - warning
  812. "012297", // CCS groundfault detection - warning
  813. "012298", // GB groundfault detection - warning
  814. "012299", //System AC output OCP L2
  815. "012300", //System AC output OCP L3
  816. "012301", //Circuit Short L2
  817. "012302", //Circuit Short L3
  818. };
  819. struct AlarmCodeData
  820. {
  821. unsigned char PreviousAlarmVal[13];
  822. union
  823. {
  824. unsigned char AlarmVal[13];
  825. struct
  826. {
  827. //AlarmVal[0]
  828. unsigned char SystemL1InputOVP:1; //bit 0
  829. unsigned char SystemL2InputOVP:1; //bit 1
  830. unsigned char SystemL3InputOVP:1; //bit 2
  831. unsigned char SystemL1InputUVP:1; //bit 3
  832. unsigned char SystemL2InputUVP:1; //bit 4
  833. unsigned char SystemL3InputUVP:1; //bit 5
  834. unsigned char PsuL1InputOVP:1; //bit 6
  835. unsigned char PsuL2InputOVP:1; //bit 7
  836. //AlarmVal[1]
  837. unsigned char PsuL3InputOVP:1; //bit 0
  838. unsigned char PsuL1InputUVP:1; //bit 1
  839. unsigned char PsuL2InputUVP:1; //bit 2
  840. unsigned char PsuL3InputUVP :1; //bit 3
  841. unsigned char SystemL1InputDrop:1; //bit 4
  842. unsigned char SystemL2InputDrop:1; //bit 5
  843. unsigned char SystemL3InputDrop:1; //bit 6
  844. unsigned char SystemAcOutputOVP:1; //bit 7
  845. //AlarmVal[2]
  846. unsigned char SystemAcOutputOCP:1; //bit 0
  847. unsigned char SystemChademoOutputOVP:1; //bit 1
  848. unsigned char SystemChademoOutputOCP:1; //bit 2
  849. unsigned char SystemCcsOutputOVP:1; //bit 3
  850. unsigned char SystemCcsOutputOCP:1; //bit 4
  851. unsigned char SystemGbOutputOVP:1; //bit 5
  852. unsigned char SystemGbOutputOCP:1; //bit 6
  853. unsigned char SystemAmbientOTP :1; //bit 7
  854. //AlarmVal[3]
  855. unsigned char SystemCriticalPointOTP:1; //bit 0
  856. unsigned char PsuAmbientOTP:1; //bit 1
  857. unsigned char PsuCriticalPointOTP:1; //bit 2
  858. unsigned char AuxPowerModuleOTP:1; //bit 3
  859. unsigned char RelayBoardOTP:1; //bit 4
  860. unsigned char ChademoConnectorOTP:1; //bit 5
  861. unsigned char CcsConnectorOTP:1; //bit 6
  862. unsigned char GbConnectorOTP:1; //bit 7
  863. //AlarmVal[4]
  864. unsigned char AcConnectorOTP:1; //bit 0
  865. unsigned char RcdTrip:1; //bit 1
  866. unsigned char ChademoGfdTrip:1; //bit 2
  867. unsigned char CcsGfdTrip:1; //bit 3
  868. unsigned char GbGfdTrip:1; //bit 4
  869. unsigned char SpdTrip:1; //bit 5
  870. unsigned char MainPowerBreakerTrip:1; //bit 6
  871. unsigned char AuxPowerBreakerTrip:1; //bit 7
  872. //AlarmVal[5]
  873. unsigned char PsuCommunicationFail:1; //bit 0
  874. unsigned char WiFiModuleCommFail:1; //bit 1
  875. unsigned char Telecom4GModuleCommFail:1; //bit 2
  876. unsigned char RfidModuleCommFail:1; //bit 3
  877. unsigned char BluetoothModuleCommFail:1; //bit 4
  878. unsigned char LcmModuleCommFail:1; //bit 5
  879. unsigned char AuxPowerModuleCommFail:1; //bit 6
  880. unsigned char RelayBoardCommFail:1; //bit 7
  881. //AlarmVal[6]
  882. unsigned char CcsModuleCommFail:1; //bit 0
  883. unsigned char ChademoModuleCommFail:1; //bit 1
  884. unsigned char GbModuleCommFail:1; //bit 2
  885. unsigned char EmergencyStopTrip:1; //bit 3
  886. unsigned char DoorOpen:1; //bit 4
  887. unsigned char SystemFanDecay:1; //bit 5
  888. unsigned char FailToCreateShareMemory:1; //bit 6
  889. unsigned char CsuInitFailed:1; //bit 7
  890. //AlarmVal[7]
  891. unsigned char AcGroundfaultFail:1; //bit 0
  892. unsigned char McuSelftestFail:1; //bit 1
  893. unsigned char RelaySelftestFail:1; //bit 2
  894. unsigned char ChademoGroundfaultTimeout:1; //bit 3
  895. unsigned char CcsGroundfaultTimeout:1; //bit 4
  896. unsigned char GbGroundfaultTimeout:1; //bit 5
  897. unsigned char CircuitShort:1; //bit 6
  898. unsigned char PsuDuplicateID:1; //bit 7
  899. //AlarmVal[8]
  900. unsigned char PsuOutputShortCircuit :1; //bit 0
  901. unsigned char PsuDischargeAbnormal :1; //bit 1
  902. unsigned char PsuDcSideShutDown :1; //bit 2
  903. unsigned char PsuFailureAlarm :1; //bit 3
  904. unsigned char PsuProtectionAlarm :1; //bit 4
  905. unsigned char PsuFanFailureAlarm :1; //bit 5
  906. unsigned char PsuInputUVP:1; //bit 6
  907. unsigned char PsuInputOVP:1; //bit 7
  908. //AlarmVal[9]
  909. unsigned char PsuWalkInState :1; //bit 0
  910. unsigned char PsuPowerLimitedState :1; //bit 1
  911. unsigned char PsuIdRepeat :1; //bit 2
  912. unsigned char PsuSevereUnevenCurrent :1; //bit 3
  913. unsigned char PsuThreePhaseInputInadequate :1; //bit 4
  914. unsigned char PsuThreePhaseOnputImbalance :1; //bit 5
  915. unsigned char PsuFfcSideShutDown :1; //bit 6
  916. unsigned char PsuNoResource:1; //bit 7
  917. //AlarmVal[10]
  918. unsigned char RelayboardStestFail :1; //bit 0
  919. unsigned char FanboardStestFail :1; //bit 1
  920. unsigned char PrimaryStestFail :1; //bit 2
  921. unsigned char ChademoboardStestFail :1; //bit 3
  922. unsigned char CCSboardStestFail :1; //bit 4
  923. unsigned char AcContactStestFail :1; //bit 5
  924. unsigned char PsuModuleStestFail :1; //bit 6
  925. unsigned char ModelNameNoneMatchStestFail:1; //bit 7
  926. //AlarmVal[11]
  927. unsigned char CcsOutputUVPFail :1; //bit 0
  928. unsigned char ChademoOutputUVPFail :1; //bit 1
  929. unsigned char GbtOutputUVPFail :1; //bit 2
  930. unsigned char GbtboardStestFail :1; //bit 3
  931. unsigned char AcConnectorStestFail:1; //bit 4
  932. unsigned char LedboardStestFail:1; //bit 5
  933. unsigned char AcSystemInputOVP:1; //bit 6
  934. unsigned char AcSystemInputUVP:1; //bit 7
  935. //AlarmVal[12]
  936. unsigned char ChademoGroundWarning :1; //bit 0
  937. unsigned char CcsGroundfaultWarning :1; //bit 1
  938. unsigned char GbGroundfaultWarning :1; //bit 2
  939. unsigned char SystemAcOutputOCPL2:1; //bit 3
  940. unsigned char SystemAcOutputOCPL3:1; //bit 4
  941. unsigned char CircuitShortL2:1; //bit 5
  942. unsigned char CircuitShortL3:1; //bit 6
  943. unsigned char :1; //bit 7
  944. }bits;
  945. }AlarmEvents;
  946. };
  947. char InfoStatusCode[384][6]=
  948. {
  949. //Information comes from EVSE
  950. "013600", //Normal stop charging by user
  951. "013601", //Charging Time's up
  952. "013602", //Replace system air filter
  953. "013603", //Reach to CHAdeMO max. plugging times.
  954. "013604", //Reach to CCS max. plugging times.
  955. "013605", //Reach to GB max. plugging times.
  956. "013606", //Reach to AC max. plugging times.
  957. "013607", //CSU fimrware update fail
  958. "013608", //CHAdeMO Module fimrware update fail
  959. "013609", //CCS Module fimrware update fail
  960. "013610", //GB Module fimrware update fail
  961. "013611", //Aux. power module fimrware update fail
  962. "013612", //Relay control module fimrware update fail
  963. "013613", //LCM module fimrware update fail
  964. "013614", //Bluetooth module fimrware update fail
  965. "013615", //WiFi module fimrware update fail
  966. "013616", //3G/4G module fimrware update fail
  967. "013617", //SMR fimrware update fail
  968. "013618", //RFID module fimrware update fail
  969. "013619", //configured by USB flash drive
  970. "013620", //configured by backend
  971. "013621", //configured by webpage
  972. "013622", //disconnected from Internet through Ethernet
  973. "013623", //disconnected from Internet through WiFi
  974. "013624", //disconnected from Internet through 3G/4G
  975. "013625", //disconnected from AP through WiFi
  976. "013626", //disconnected from APN through 3G/4G
  977. "013627", //Reserved
  978. "013628", //Reserved
  979. "013629", //Reserved
  980. "013630", //Reserved
  981. "013631", //Reserved
  982. //Information comes from EV
  983. "023700", //CHAdeMO EV communication Fail
  984. "023701", //CCS EV communication Fail
  985. "023702", //GB EV communication Fail
  986. "023703", //AC: pilot fault
  987. "023704", //CHAdeMO: battery malfunction
  988. "023705", //CHAdeMO: no charging permission
  989. "023706", //CHAdeMO: battery incompatibility
  990. "023707", //CHAdeMO: battery OVP
  991. "023708", //CHAdeMO: battery UVP
  992. "023709", //CHAdeMO: battery OTP
  993. "023710", //CHAdeMO: battery current difference
  994. "023711", //CHAdeMO: battery voltage difference
  995. "023712", //CHAdeMO: shift position
  996. "023713", //CHAdeMO: battery other fault
  997. "023714", //CHAdeMO: charging system error
  998. "023715", //CHAdeMO: EV normal stop
  999. "023716", //CHAdeMO: connector temperature sensor broken
  1000. "023717", //CHAdeMO: connector lock fail
  1001. "023718", //CHAdeMO: D1 ON No Receive
  1002. "023719", //CHAdeMO: BMS K to J Timeout
  1003. "023720", //CHAdeMO: BMS Charge Allow Timeout
  1004. "023721", //CHAdeMO: Wait GroundFault Timeout
  1005. "023722", //CHAdeMO: BMS EV Relay Timeout
  1006. "023723", //CHAdeMO: BMS Request Current Timeout
  1007. "023724", //CHAdeMO: BMS K to J OFF Timeout
  1008. "023725", //CHAdeMO: BMS EV Relay OFF Timeout
  1009. "023726", //CHAdeMO: ADC More Than 10V
  1010. "023727", //CHAdeMO: ADC More Than 20V
  1011. "023728", //CHAdeMO: BMS Charge Before Stop
  1012. "023729", //CHAdeMO: Charger Get Normal Stop
  1013. "023730", //CHAdeMO: Charger Get Emergency Stop
  1014. "023731", //CHAdeMO: Isolation Result Fail
  1015. "023732", //CHAdeMO: Miss Link With MotherBoard
  1016. "023733", //CHAdeMO: Output Voltage More Than Limit
  1017. "023734", //CHAdeMO: Request Current More Than Limit
  1018. "023735", //CHAdeMO: Re Cap BMS Eqr Current Exceed
  1019. "023736", //CHAdeMO: Charge Remain Count Down
  1020. "023737", //CCS:CCS_EVCC_EVErrorCode_FAILED_RESSTemperatureInhibit
  1021. "023738", //CCS:CCS_EVCC_EVErrorCode_FAILED_EVShiftPosition
  1022. "023739", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargerConnectorLockFault
  1023. "023740", //CCS:CCS_EVCC_EVErrorCode_FAILED_EVRESSMalfunction
  1024. "023741", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingCurrentdifferential
  1025. "023742", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingVoltageOutOfRange
  1026. "023743", //CCS:CCS_EVCC_EVErrorCode_FAILED_ChargingSystemIncompatibility
  1027. "023744", //CCS:CCS_EVCC_EVErrorCode_FAILED_EmergencyEvent
  1028. "023745", //CCS:CCS_EVCC_EVErrorCode_FAILED_Breaker
  1029. "023746", //CCS:CCS_EVCC_EVErrorCode_FAILED_NoData
  1030. "023747", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_A
  1031. "023748", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_B
  1032. "023749", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_DIN_C
  1033. "023750", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_1
  1034. "023751", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_2
  1035. "023752", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_ISO_3
  1036. "023753", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_1
  1037. "023754", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_2
  1038. "023755", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_3
  1039. "023756", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_4
  1040. "023757", //CCS:CCS_EVCC_EVErrorCode_FAILED_reserved_by_OEM_5
  1041. "023758", //CCS:CCS_SECC_ResponseCode_FAILED_SequenceError
  1042. "023759", //CCS:CCS_SECC_ResponseCode_FAILED_SignatureError
  1043. "023760", //CCS:CCS_SECC_ResponseCode_FAILED_UnknownSession
  1044. "023761", //CCS:CCS_SECC_ResponseCode_FAILED_ServiceIDInvalid
  1045. "023762", //CCS:CCS_SECC_ResponseCode_FAILED_Payment SelectionInvalid
  1046. "023763", //CCS:CCS_SECC_ResponseCode_FAILED_IdentificationSelectionInvalid
  1047. "023764", //CCS:CCS_SECC_ResponseCode_FAILED_ServiceSelectionInvalid
  1048. "023765", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateExpired
  1049. "023766", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateNotYetValid
  1050. "023767", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateRevoked
  1051. "023768", //CCS:CCS_SECC_ResponseCode_FAILED_NoCertificateAvailable
  1052. "023769", //CCS:CCS_SECC_ResponseCode_FAILED_CertChainError
  1053. "023770", //CCS:CCS_SECC_ResponseCode_FAILED_CertValidationError
  1054. "023771", //CCS:CCS_SECC_ResponseCode_FAILED_CertVerificationError
  1055. "023772", //CCS:CCS_SECC_ResponseCode_FAILED_ContractCanceled
  1056. "023773", //CCS:CCS_SECC_ResponseCode_FAILED_ChallengeInvalid
  1057. "023774", //CCS:CCS_SECC_ResponseCode_FAILED_WrongEnergyTransferMode
  1058. "023775", //CCS:CCS_SECC_ResponseCode_FAILED_WrongChargeParameter
  1059. "023776", //CCS:CCS_SECC_ResponseCode_FAILED_ChargingProfileInvalid
  1060. "023777", //CCS:CCS_SECC_ResponseCode_FAILED_TariffSelectionInvalid
  1061. "023778", //CCS:CCS_SECC_ResponseCode_FAILED_EVSEPresentVoltageToLow
  1062. "023779", //CCS:CCS_SECC_ResponseCode_FAILED_PowerDeliveryNotApplied
  1063. "023780", //CCS:CCS_SECC_ResponseCode_FAILED_MeteringSignatureNotValid
  1064. "023781", //CCS:CCS_SECC_ResponseCode_FAILED_NoChargeServiceSelected
  1065. "023782", //CCS:CCS_SECC_ResponseCode_FAILED_ContactorError
  1066. "023783", //CCS:CCS_SECC_ResponseCode_FAILED_CertificateNotAllowedAtThisEVSE
  1067. "023784", //CCS:CCS_SECC_ResponseCode_FAILED_GAChargeStop
  1068. "023785", //CCS:CCS_SECC_ResponseCode_FAILED_AlignmentError
  1069. "023786", //CCS:CCS_SECC_ResponseCode_FAILED_ACDError
  1070. "023787", //CCS:CCS_SECC_ResponseCode_FAILED_AssociationError
  1071. "023788", //CCS:CCS_SECC_ResponseCode_FAILED_EVSEChargeAbort
  1072. "023789", //CCS:CCS_SECC_ResponseCode_FAILED_NoSupportedApp-Protocol-Protocol
  1073. "023790", //CCS:CCS_SECC_ResponseCode_FAILED_ContractNotAccepted
  1074. "023791", //CCS:CCS_SECC_ResponseCode_FAILED_MOUnknown
  1075. "023792", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_Prov_CertificateRevoke
  1076. "023793", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_SubCA1_CertificateRevoked
  1077. "023794", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_SubCA2_CertificateRevoked
  1078. "023795", //CCS:CCS_SECC_ResponseCode_FAILED_OEM_RootCA_CertificateRevoked
  1079. "023796", //CCS:CCS_SECC_ResponseCode_FAILED_MO_Prov_CertificateRevoked
  1080. "023797", //CCS:CCS_SECC_ResponseCode_FAILED_MO_SubCA1_CertificateRevoked
  1081. "023798", //CCS:CCS_SECC_ResponseCode_FAILED_MO_SubCA2_CertificateRevoked
  1082. "023799", //CCS:CCS_SECC_ResponseCode_FAILED_MO_RootCA_CertificateRevoked
  1083. "023800", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_Prov_CertificateRevoked
  1084. "023801", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_SubCA1_CertificateRevoked
  1085. "023802", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_SubCA2_CertificateRevoked
  1086. "023803", //CCS:CCS_SECC_ResponseCode_FAILED_CPS_RootCA_CertificateRevoked
  1087. "023804", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_1
  1088. "023805", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_2
  1089. "023806", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_3
  1090. "023807", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_4
  1091. "023808", //CCS:CCS_SECC_ResponseCode_FAILED_reserved_5
  1092. "023809", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_SLAC_init
  1093. "023810", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_match_response
  1094. "023811", //CCS:CCS_SECC_TIMEOUT_CM_START_ATTEN_CHAR_IND
  1095. "023812", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_match_MNBC
  1096. "023813", //CCS:CCS_SECC_TIMEOUT_SLAC_TP_EVSE_avg_atten_calc
  1097. "023814", //CCS:CCS_SECC_TIMEOUT_SLAC_CM_ATTEN_CHAR_RSP
  1098. "023815", //CCS:CCS_SECC_TIMEOUT_SLAC_CM_VALIDATE_REQ_1ST__CM_SLAC_MATCH_REQ
  1099. "023816", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_assoc_session
  1100. "023817", //CCS:CCS_SECC_TIMEOUT_SLAC_TT_EVSE_vald_toggle
  1101. "023818", //CCS:CCS_SECC_TIMEOUT_SLAC_CM_MNBC_SOUND_IND
  1102. "023819", //CCS:CCS_SECC_TIMEOUT_SLAC_CM_VALIDATE_REQ_2ND__CM_SLAC_MATCH_REQ
  1103. "023820", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_3
  1104. "023821", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_4
  1105. "023822", //CCS:CCS_SECC_TIMEOUT_SLAC_reserved_5
  1106. "023823", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_UDP_TT_match_join
  1107. "023824", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TCP_TT_match_join
  1108. "023825", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TP_amp_map_exchange
  1109. "023826", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_TP_link_ready_notification
  1110. "023827", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_1
  1111. "023828", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_2
  1112. "023829", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_3
  1113. "023830", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_4
  1114. "023831", //CCS:CCS_SECC_TIMEOUT_SLACC_SDP_reserved_5
  1115. "023832", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SupportedAppProtocolRes
  1116. "023833", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SessionSetupRes
  1117. "023834", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ServiceDiscoveryRes
  1118. "023835", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ServicePaymentSelectionRes
  1119. "023836", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ContractAuthenticationRes
  1120. "023837", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_ChargeParameterDiscoveryRes
  1121. "023838", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_PowerDeliveryRes
  1122. "023839", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_CableCheckRes
  1123. "023840", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_PreChargeRes
  1124. "023841", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_CurrentDemandRes
  1125. "023842", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_WeldingDetectionRes
  1126. "023843", //CCS:CCS_SECC_TIMEOUT_V2G_Msg_Performance_Time_SessionStopRes
  1127. "023844", //CCS:CCS_SECC_TIMEOUT_V2G_Sequence_Time
  1128. "023845", //CCS:CCS_SECC_TIMEOUT_V2G_ReadyToCharge_Performance_Time
  1129. "023846", //CCS:CCS_SECC_TIMEOUT_V2G_CommunicationSetup_Performance_Time
  1130. "023847", //CCS:CCS_SECC_TIMEOUT_V2G_CableCheck_Performance_Time
  1131. "023848", //CCS:CCS_SECC_TIMEOUT_V2G_CPState_Detection_Time
  1132. "023849", //CCS:CCS_SECC_TIMEOUT_V2G_CPOscillator_Retain_Time
  1133. "023850", //CCS:CCS_SECC_TIMEOUT_V2G_PreCharge_Performace_Time
  1134. "023851", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_2
  1135. "023852", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_3
  1136. "023853", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_4
  1137. "023854", //CCS:CCS_SECC_TIMEOUT_V2G_reserved_5
  1138. "023855", //CCS:CCS_CAN_TIMEOUT_TP_GET_EV_TARGET_INFO
  1139. "023856", //CCS:CCS_CAN_TIMEOUT_TT_GET_EV_TARGET_INFO
  1140. "023857", //CCS:CCS_CAN_TIMEOUT_TP_GET_EV_BATTERY_INFO
  1141. "023858", //CCS:CCS_CAN_TIMEOUT_TT_GET_EV_BATTERY_INFO
  1142. "023859", //CCS:CCS_CAN_TIMEOUT_TP_EV_STOP_EVENT
  1143. "023860", //CCS:CCS_CAN_TIMEOUT_TT_EV_STOP_EVENT
  1144. "023861", //CCS:CCS_CAN_TIMEOUT_TP_EVSE_STOP_EVENT
  1145. "023862", //CCS:CCS_CAN_TIMEOUT_TT_EVSE_STOP_EVENT
  1146. "023863", //CCS:CCS_CAN_TIMEOUT_TP_GET_MISC_INFO
  1147. "023864", //CCS:CCS_CAN_TIMEOUT_TT_GET_MISC_INFO
  1148. "023865", //CCS:CCS_CAN_TIMEOUT_TP_DOWNLOAD_REQUEST
  1149. "023866", //CCS:CCS_CAN_TIMEOUT_TT_DOWNLOAD_REQUEST
  1150. "023867", //CCS:CCS_CAN_TIMEOUT_TP_START_BLOCK_TRANSFER
  1151. "023868", //CCS:CCS_CAN_TIMEOUT_TT_START_BLOCK_TRANSFER
  1152. "023869", //CCS:CCS_CAN_TIMEOUT_TP_DATA_TRANSFER
  1153. "023870", //CCS:CCS_CAN_TIMEOUT_TT_DATA_TRANSFER
  1154. "023871", //CCS:CCS_CAN_TIMEOUT_TP_DOWNLOAD_FINISH
  1155. "023872", //CCS:CCS_CAN_TIMEOUT_TT_DOWNLOAD_FINISH
  1156. "023873", //CCS:CCS_CAN_TIMEOUT_TP_ISOLATION_STATUS
  1157. "023874", //CCS:CCS_CAN_TIMEOUT_TT_ISOLATION_STATUS
  1158. "023875", //CCS:CCS_CAN_TIMEOUT_TP_CONNECTOR_INFO
  1159. "023876", //CCS:CCS_CAN_TIMEOUT_TT_CONNECTOR_INFO
  1160. "023877", //CCS:CCS_CAN_TIMEOUT_TT_RTC_INFO
  1161. "023878", //CCS:CCS_CAN_TIMEOUT_TP_RTC_INFO
  1162. "023879", //CCS:CCS_CAN_TIMEOUT_TP_EVSE_PRECHARGE_INFO
  1163. "023880", //CCS:CCS_CAN_TIMEOUT_TT_EVSE_PRECHARGE_INFO
  1164. "023881", //CCS:CCS_CAN_TIMEOUT_MSG_Sequence
  1165. "023882", //CCS:CCS_CAN_MSG_Unrecognized_CMD_ID
  1166. "023883", //CCS:CCS_SECC_DIN_Msg_Decode_Error
  1167. "023884", //CCS:CCS_SECC_DIN_Msg_Encode_Error
  1168. "023885", //CCS:CCS_SECC_ISO1_Msg_Decode_Error
  1169. "023886", //CCS:CCS_SECC_ISO1_Msg_Encode_Error
  1170. "023887", //CCS:CCS_SECC_ISO2_Msg_Decode_Error
  1171. "023888", //CCS:CCS_SECC_ISO2_Msg_Encode_Error
  1172. "023889", //CCS:CCS_SECC_CP_STATUS_Error
  1173. "023890", //CCS:CCS_SECC_Unexpected_60V_Before_Charing_Error
  1174. "023891", //CCS:CCS_SECC_Not_Ready_For_Charging
  1175. "023892", //CCS:CCS_SECCC_TIMEOUT_QCA7000_COMM (The firmware code of QCA7000 may not be installed, yet)
  1176. "023893", //CCS:CCS_SECC_FAIL_QCA7000_SETKEY
  1177. "023894", //Reserved
  1178. "023895", //Reserved
  1179. "023896", //Reserved
  1180. "023897", //Reserved
  1181. "023898", //Reserved
  1182. "023899", //Reserved
  1183. "023900", //GBT: ERROR_CODE_GBT_LOS_CC1
  1184. "023901", //GBT: ERROR_CODE_GBT_CONNECTOR_LOCK_FAIL
  1185. "023902", //GBT: ERROR_CODE_GBT_BATTERY_INCOMPATIBLE
  1186. "023903", //GBT: ERROR_CODE_GBT_BMS_BROAA_TIMEOUT
  1187. "023904", //GBT: ERROR_CODE_GBT_CSU_PRECHARGE_TIMEOUT
  1188. "023905", //GBT: ERROR_CODE_GBT_BMS_PRESENT_VOLTAGE_FAULT
  1189. "023906", //GBT: ERROR_CODE_GBT_BMS_VOLTAGE_OVER_RANGE
  1190. "023907", //GBT: ERROR_CODE_GBT_BSM_CHARGE_ALLOW_00_10MIN_COUUNTDONE
  1191. "023908", //GBT: ERROR_CODE_GBT_WAIT_GROUNDFAULT_TIMEOUT
  1192. "023909", //GBT: ERROR_CODE_GBT_ADC_MORE_THAN_10V
  1193. "023910", //GBT: ERROR_CODE_GBT_ADC_MORE_THAN_60V
  1194. "023911", //GBT: ERROR_CODE_GBT_CHARGER_GET_NORMAL_STOP_CMD
  1195. "023912", //GBT: ERROR_CODE_GBT_CHARGER_GET_EMERGENCY_STOP_CMD
  1196. "023913", //GBT: ERROR_CODE_GBT_ISOLATION_RESULT_FAIL
  1197. "023914", //GBT: ERROR_CODE_GBT_MOTHER_BOARD_MISS_LINK
  1198. "023915", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_LIMIT
  1199. "023916", //GBT: ERROR_CODE_GBT_REQ_CURRENT_MORE_THAN_LIMIT
  1200. "023917", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_10_PERCENT
  1201. "023918", //GBT: ERROR_CODE_GBT_OUTPUT_VOLTAGE_DIFF_BCS_5_PERCENT
  1202. "023919", //GBT: ERROR_CODE_GBT_STOP_ADC_MORE_THAN_10V
  1203. "023920", // Reserved
  1204. "023921", // Reserved
  1205. "023922", // Reserved
  1206. "023923", // Reserved
  1207. "023924", // Reserved
  1208. "023925", // Reserved
  1209. "023926", // Reserved
  1210. "023927", // Reserved
  1211. "023928", // Reserved
  1212. "023929", // Reserved
  1213. "023930", //GBT: ERROR_CODE_CEM_BHM_TIMEOUT
  1214. "023931", //GBT: ERROR_CODE_CEM_BRM_TIMEOUT
  1215. "023932", //GBT: ERROR_CODE_CEM_BCP_TIMEOUT
  1216. "023933", //GBT: ERROR_CODE_CEM_BRO_TIMEOUT
  1217. "023934", //GBT: ERROR_CODE_CEM_BCL_TIMEOUT
  1218. "023935", //GBT: ERROR_CODE_CEM_BCS_TIMEOUT
  1219. "023936", //GBT: ERROR_CODE_CEM_BSM_TIMEOUT
  1220. "023937", //GBT: ERROR_CODE_CEM_BST_TIMEOUT
  1221. "023938", //GBT: ERROR_CODE_CEM_BSD_TIMEOUT
  1222. "023939", //GBT: ERROR_CODE_CEM_BEM_OTHER_TIMEOUT
  1223. "023940", //GBT: ERROR_CODE_BEM_CRM_TIMEOUT
  1224. "023941", //GBT: ERROR_CODE_BEM_CRMAA_TIMEOUT
  1225. "023942", //GBT: ERROR_CODE_BEM_CTS_CML_TIMEOUT
  1226. "023943", //GBT: ERROR_CODE_BEM_CRO_TIMEOUT
  1227. "023944", //GBT: ERROR_CODE_BEM_CCS_TIMEOUT
  1228. "023945", //GBT: ERROR_CODE_BEM_CST_TIMEOUT
  1229. "023946", //GBT: ERROR_CODE_BEM_CSD_TIMEOUT
  1230. "023947", //GBT: ERROR_CODE_BEM_BEM_OTHER_TIMEOUT
  1231. "023948", // Reserved
  1232. "023949", // Reserved
  1233. "023950", //GBT: ERROR_CODE_BST_SOC_GOAL
  1234. "023951", //GBT: ERROR_CODE_BST_TOTAL_VOLTAGE_GOAL
  1235. "023952", //GBT: ERROR_CODE_BST_CELL_VOLTAGE_GOAL
  1236. "023953", //GBT: ERROR_CODE_BST_GET_CST
  1237. "023954", //GBT: ERROR_CODE_BST_ISOLATION
  1238. "023955", //GBT: ERROR_CODE_BST_OUTPUT_CONNECTOR_OTP
  1239. "023956", //GBT: ERROR_CODE_BST_COMPONENT
  1240. "023957", //GBT: ERROR_CODE_BST_CHARGE_CONNECTOR
  1241. "023958", //GBT: ERROR_CODE_BST_OTP
  1242. "023959", //GBT: ERROR_CODE_BST_OTHER
  1243. "023960", //GBT: ERROR_CODE_BST_HIGH_V
  1244. "023961", //GBT: ERROR_CODE_BST_CC2
  1245. "023962", //GBT: ERROR_CODE_BST_CURRENT
  1246. "023963", //GBT: ERROR_CODE_BST_VOLTAGE
  1247. "023964", //GBT: ERROR_CODE_GET_BST_NO_REASON
  1248. "023965", // Reserved
  1249. "023966", // Reserved
  1250. "023967", // Reserved
  1251. "023968", // Reserved
  1252. "023969", // Reserved
  1253. "023970", //GBT: ERROR_CODE_BSM_CELL_OVER_VOLTAGE
  1254. "023971", //GBT: ERROR_CODE_BSM_CELL_UNDER_VOLTAGE
  1255. "023972", //GBT: ERROR_CODE_BSM_OVER_SOC
  1256. "023973", //GBT: ERROR_CODE_BSM_UNDER_SOC
  1257. "023974", //GBT: ERROR_CODE_BSM_CURRENT
  1258. "023975", //GBT: ERROR_CODE_BSM_TEMPERATURE
  1259. "023976", //GBT: ERROR_CODE_BSM_ISOLATE
  1260. "023977", //GBT: ERROR_CODE_BSM_OUTPUT_CONNECTOR
  1261. "023978", // Reserved
  1262. "023979", // Reserved
  1263. "033900", //disconnected from backend through Ethernet
  1264. "033901", //disconnected from backend through WiFi
  1265. "033902", //disconnected from backend through 3G/4G
  1266. "033903", //Remote start charging by backend
  1267. "033904", //Remote stop charging by backend
  1268. "033905", //Remote reset by backend
  1269. "033906", //Authorization failed
  1270. "033907", //Reserved
  1271. };
  1272. struct InfoCodeData
  1273. {
  1274. unsigned char PreviousInfoVal[40];
  1275. union
  1276. {
  1277. unsigned char InfoVal[40];
  1278. struct
  1279. {
  1280. //InfoVal[0]
  1281. unsigned char NormalStopChargingByUser:1; //bit 0
  1282. unsigned char ChargingTimesUp:1; //bit 1
  1283. unsigned char ReplaceSystemAirFilter:1; //bit 2
  1284. unsigned char ReachChademoMaxPluggingTimes:1; //bit 3
  1285. unsigned char ReachCcsMaxPluggingTimes:1; //bit 4
  1286. unsigned char ReachGbMaxPluggingTimes:1; //bit 5
  1287. unsigned char ReachAcMaxPluggingTimes:1; //bit 6
  1288. unsigned char CsuFimrwareUpdateFail:1; //bit 7
  1289. //InfoVal[1]
  1290. unsigned char ChademoModuleFimrwareUpdateFail:1; //bit 0
  1291. unsigned char CcsModuleFimrwareUpdateFail:1; //bit 1
  1292. unsigned char GbModuleFimrwareUpdateFail:1; //bit 2
  1293. unsigned char AuxPowerModuleFimrwareUpdateFail:1; //bit 3
  1294. unsigned char RelayBoardFimrwareUpdateFail:1; //bit 4
  1295. unsigned char LcmModuleFimrwareUpdateFail:1; //bit 5
  1296. unsigned char BluetoothModuleFimrwareUpdateFail:1; //bit 6
  1297. unsigned char WiFiModuleFimrwareUpdateFail:1; //bit 7
  1298. //InfoVal[2]
  1299. unsigned char Telocom4GModuleFimrwareUpdateFail:1; //bit 0
  1300. unsigned char PsuFimrwareUpdateFail:1; //bit 1
  1301. unsigned char RfidModuleFimrwareUpdateFail:1; //bit 2
  1302. unsigned char ConfiguredByUsbFlashDrive:1; //bit 3
  1303. unsigned char ConfiguredByBackend:1; //bit 4
  1304. unsigned char ConfiguredByWebpage:1; //bit 5
  1305. unsigned char InternetDisconnectViaEthernet:1; //bit 6
  1306. unsigned char InternetDisconnectViaWiFi :1; //bit 7
  1307. //InfoVal[3]
  1308. unsigned char InternetDisconnectVia4Gi:1; //bit 0
  1309. unsigned char ApDisconnectViaWiFi:1; //bit 1
  1310. unsigned char ApnDisconnectVia4Gi:1; //bit 2
  1311. unsigned char :5; //bit 3~7 reserved
  1312. //InfoVal[4]
  1313. unsigned char ChademoEvCommFail:1; //bit 0
  1314. unsigned char CcsEvCommFail:1; //bit 1
  1315. unsigned char GbEvCommFail:1; //bit 2
  1316. unsigned char PilotFault:1; //bit 3
  1317. unsigned char ChademoBatteryMalfun:1; //bit 4
  1318. unsigned char ChademoNoPermission:1; //bit 5
  1319. unsigned char ChademoBatteryIncompatibility:1; //bit 6
  1320. unsigned char ChademoBatteryOVP:1; //bit 7
  1321. //InfoVal[5]
  1322. unsigned char ChademoBatteryUVP:1; //bit 0
  1323. unsigned char ChademoBatteryOTP:1; //bit 1
  1324. unsigned char ChademoBatteryCurrentDiff:1; //bit 2
  1325. unsigned char ChademoBatteryVoltageDiff:1; //bit 3
  1326. unsigned char ChademoShiftPosition:1; //bit 4
  1327. unsigned char ChademoBatteryOtherFault:1; //bit 5
  1328. unsigned char ChademoChargingSystemError:1; //bit 6
  1329. unsigned char ChademoEvNormalStop:1; //bit 7
  1330. //InfoVal[6]
  1331. unsigned char ChademoTempSensorBroken:1; //bit 0
  1332. unsigned char ChademoConnectorLockFail:1; //bit 1
  1333. unsigned char ChademoD1OnNoReceive:1; //bit 2
  1334. unsigned char ChademoBmsKtoJTimeout:1; //bit 3
  1335. unsigned char ChademoBmsChargeAllowTimeout:1; //bit 4
  1336. unsigned char ChademoWaitGfdTimeout:1; //bit 5
  1337. unsigned char ChademoBmsEvRelayTimeout:1; //bit 6
  1338. unsigned char ChademoBmsReqCurrentTimeout:1; //bit 7
  1339. //InfoVal[7]
  1340. unsigned char ChademoBmsKtoJOffTimeout :1; //bit 0
  1341. unsigned char ChademoBmsEvRelayOffTimeout :1; //bit 1
  1342. unsigned char ChademoAdcMoreThan10V :1; //bit 2
  1343. unsigned char ChademoAdcMoreThan20V :1; //bit 3
  1344. unsigned char ChademoBmsChargeBeforeStop :1; //bit 4
  1345. unsigned char ChademoChargerGetNormalStop :1; //bit 5
  1346. unsigned char ChademoChargerGetEmergencyStop :1; //bit 6
  1347. unsigned char ChademoIsolationResultFail :1; //bit 7
  1348. //InfoVal[8]
  1349. unsigned char ChademoMissLinkWithMotherBoard :1; //bit 0
  1350. unsigned char ChademoOutputVolMoreThanLimit :1; //bit 1
  1351. unsigned char ChademoReqCurrentMoreThanLimit :1; //bit 2
  1352. unsigned char ChademoReCapBmsEqrCurrentExceed :1; //bit 3
  1353. unsigned char ChademoChargeRemainCountDown :1; //bit 4
  1354. unsigned char CcsRESTemperatureInhibit:1; //bit 5
  1355. unsigned char CcsEVShiftPosition:1; //bit 6
  1356. unsigned char CcsChargerConnectorLockFault:1; //bit 7
  1357. //InfoVal[9]
  1358. unsigned char CcsEVRESSMalfunction:1; //bit 0
  1359. unsigned char CcsChargingCurrentdifferential:1; //bit 1
  1360. unsigned char CcsChargingVoltageOutOfRange:1; //bit 2
  1361. unsigned char CcsChargingSystemIncompatibility:1; //bit 3
  1362. unsigned char CcsEmergencyEvent:1; //bit 4
  1363. unsigned char CcsBreaker:1; //bit 5
  1364. unsigned char CcsNoData:1; //bit 6
  1365. unsigned char Ccsreserved_by_DIN_A:1; //bit 7
  1366. //InfoVal[10]
  1367. unsigned char Ccsreserved_by_DIN_B:1; //bit 0
  1368. unsigned char Ccsreserved_by_DIN_C:1; //bit 1
  1369. unsigned char Ccsreserved_by_ISO_1:1; //bit 2
  1370. unsigned char Ccsreserved_by_ISO_2:1; //bit 3
  1371. unsigned char Ccsreserved_by_ISO_3:1; //bit 4
  1372. unsigned char Ccsreserved_by_OEM_1:1; //bit 5
  1373. unsigned char Ccsreserved_by_OEM_2:1; //bit 6
  1374. unsigned char Ccsreserved_by_OEM_3:1; //bit 7
  1375. //InfoVal[11]
  1376. unsigned char Ccsreserved_by_OEM_4:1; //bit 0
  1377. unsigned char Ccsreserved_by_OEM_5:1; //bit 1
  1378. unsigned char CcsSequenceError:1; //bit 2
  1379. unsigned char CcsSignatureError:1; //bit 3
  1380. unsigned char CcsUnknownSession:1; //bit 4
  1381. unsigned char CcsServiceIDInvalid:1; //bit 5
  1382. unsigned char CcsPaymentSelectionInvalid:1; //bit 6
  1383. unsigned char CcsIdentificationSelectionInvalid:1; //bit 7
  1384. //InfoVal[12]
  1385. unsigned char CcsServiceSelectionInvalid:1; //bit 0
  1386. unsigned char CcsCertificateExpired:1; //bit 1
  1387. unsigned char CcsCertificateNotYetValid:1; //bit 2
  1388. unsigned char CcsCertificateRevoked:1; //bit 3
  1389. unsigned char CcsNoCertificateAvailable:1; //bit 4
  1390. unsigned char CcsCertChainError:1; //bit 5
  1391. unsigned char CcsCertValidationError:1; //bit 6
  1392. unsigned char CcsCertVerificationError:1; //bit 7
  1393. //InfoVal[13]
  1394. unsigned char CcsContractCanceled:1; //bit 0
  1395. unsigned char CcsChallengeInvalid:1; //bit 1
  1396. unsigned char CcsWrongEnergyTransferMode:1; //bit 2
  1397. unsigned char CcsWrongChargeParameter:1; //bit 3
  1398. unsigned char CcsChargingProfileInvalid:1; //bit 4
  1399. unsigned char CcsTariffSelectionInvalid:1; //bit 5
  1400. unsigned char CcsEVSEPresentVoltageToLow:1; //bit 6
  1401. unsigned char CcsPowerDeliveryNotApplied:1; //bit 7
  1402. //InfoVal[14]
  1403. unsigned char CcsMeteringSignatureNotValid:1; //bit 0
  1404. unsigned char CcsNoChargeServiceSelected:1; //bit 1
  1405. unsigned char CcsContactorError:1; //bit 2
  1406. unsigned char CcsCertificateNotAllowedAtThisEVSE:1; //bit 3
  1407. unsigned char CcsGAChargeStop:1; //bit 4
  1408. unsigned char CcsAlignmentError:1; //bit 5
  1409. unsigned char CcsACDError:1; //bit 6
  1410. unsigned char CcsAssociationError:1; //bit 7
  1411. //InfoVal[15]
  1412. unsigned char CcsEVSEChargeAbort:1; //bit 0
  1413. unsigned char CcsNoSupportedAppProtocol:1; //bit 1
  1414. unsigned char CcsContractNotAccepted:1; //bit 2
  1415. unsigned char CcsMOUnknown:1; //bit 3
  1416. unsigned char CcsOEM_Prov_CertificateRevoke:1; //bit 4
  1417. unsigned char CcsOEM_SubCA1_CertificateRevoked:1; //bit 5
  1418. unsigned char CcsOEM_SubCA2_CertificateRevoked:1; //bit 6
  1419. unsigned char CcsOEM_RootCA_CertificateRevoked:1; //bit 7
  1420. //InfoVal[16]
  1421. unsigned char CcsMO_Prov_CertificateRevoked:1; //bit 0
  1422. unsigned char CcsMO_SubCA1_CertificateRevoked:1; //bit 1
  1423. unsigned char CcsMO_SubCA2_CertificateRevoked:1; //bit 2
  1424. unsigned char CcsMO_RootCA_CertificateRevoked:1; //bit 3
  1425. unsigned char CcsCPS_Prov_CertificateRevoked:1; //bit 4
  1426. unsigned char CcsCPS_SubCA1_CertificateRevoked:1; //bit 5
  1427. unsigned char CcsCPS_SubCA2_CertificateRevoked:1; //bit 6
  1428. unsigned char CcsCPS_RootCA_CertificateRevoked:1; //bit 7
  1429. //InfoVal[17]
  1430. unsigned char :5; //bit 0~4 reserved
  1431. unsigned char CcsTT_EVSE_SLAC_init:1; //bit 5
  1432. unsigned char CcsTP_match_response:1; //bit 6
  1433. unsigned char CcsTT_match_sequence:1; //bit 7
  1434. //InfoVal[18]
  1435. unsigned char CcsTT_EVSE_match_MNBC:1; //bit 0
  1436. unsigned char CcsTP_EVSE_avg_atten_calc:1; //bit 1
  1437. unsigned char CcsTT_match_response:1; //bit 2
  1438. unsigned char CcsTP_EVSE_match_session:1; //bit 3
  1439. unsigned char CcsTT_EVSE_assoc_session:1; //bit 4
  1440. unsigned char CcsTT_EVSE_vald_toggle:1; //bit 5
  1441. unsigned char CcsSeccSlacTimeoutCmMnbcSound:1; //bit 6 reserved
  1442. unsigned char CcsSeccSlacTimeoutCmValidateReq:1; //bit 7 reserved
  1443. //InfoVal[19]
  1444. unsigned char :3; //bit 0~2 reserved
  1445. unsigned char CcsUDP_TT_match_join:1; //bit 3
  1446. unsigned char CcsTCP_TT_match_join:1; //bit 4
  1447. unsigned char CcsTP_amp_map_exchange:1; //bit 5
  1448. unsigned char CcsTP_link_ready_notification:1; //bit 6
  1449. unsigned char :1; //bit 7 resetved
  1450. //InfoVal[20]
  1451. unsigned char :4; //bit 0~3 reserved
  1452. unsigned char CcsSupportedAppProtocolRes:1; //bit 4
  1453. unsigned char CcsSessionSetupRes:1; //bit 5
  1454. unsigned char CcsServiceDiscoveryRes:1; //bit 6
  1455. unsigned char CcsServicePaymentSelectionRes:1; //bit 7
  1456. //InfoVal[21]
  1457. unsigned char CcsContractAuthenticationRes:1; //bit 0
  1458. unsigned char CcsChargeParameterDiscoveryRes:1; //bit 1
  1459. unsigned char CcsPowerDeliveryRes:1; //bit 2
  1460. unsigned char CcsCableCheckRes:1; //bit 3
  1461. unsigned char CcsPreChargeRes:1; //bit 4
  1462. unsigned char CcsCurrentDemandRes:1; //bit 5
  1463. unsigned char CcsWeldingDetectionRes:1; //bit 6
  1464. unsigned char CcsSessionStopRes:1; //bit 7
  1465. //InfoVal[22]
  1466. unsigned char CcsSequence_Time:1; //bit 0
  1467. unsigned char CcsReadyToCharge_Performance_Time:1; //bit 1
  1468. unsigned char CcsCommunicationSetup_Performance_Time:1; //bit 2
  1469. unsigned char CcsCableCheck_Performance_Time:1; //bit 3
  1470. unsigned char CcsCPState_Detection_Time:1; //bit 4
  1471. unsigned char CcsCPOscillator_Retain_Time:1; //bit 5
  1472. unsigned char CcsSeccTimeoutV2GPreChargePerformaceTime:1; //bit 6
  1473. unsigned char :1; //bit 7 reserved
  1474. //InfoVal[23]
  1475. unsigned char :3; //bit 0~2 reserved
  1476. unsigned char CcsTP_GET_EV_TARGET_INFO:1; //bit 3
  1477. unsigned char CcsTT_GET_EV_TARGET_INFO:1; //bit 4
  1478. unsigned char CcsTP_GET_EV_BATTERY_INFO:1; //bit 5
  1479. unsigned char CcsTT_GET_EV_BATTERY_INFO:1; //bit 6
  1480. unsigned char CcsTP_EV_STOP_EVENT:1; //bit 7
  1481. //InfoVal[24]
  1482. unsigned char CcsTT_EV_STOP_EVENT:1; //bit 0
  1483. unsigned char CcsTP_EVSE_STOP_EVENT:1; //bit 1
  1484. unsigned char CcsTT_EVSE_STOP_EVENT:1; //bit 2
  1485. unsigned char CcsTP_GET_MISC_INFO:1; //bit 3
  1486. unsigned char CcsTT_GET_MISC_INFO:1; //bit 4
  1487. unsigned char CcsTP_DOWNLOAD_REQUEST:1; //bit 5
  1488. unsigned char CcsTT_DOWNLOAD_REQUEST:1; //bit 6
  1489. unsigned char CcsTP_START_BLOCK_TRANSFER:1; //bit 7
  1490. //InfoVal[25]
  1491. unsigned char CcsTT_START_BLOCK_TRANSFER:1; //bit 0
  1492. unsigned char CcsTP_DATA_TRANSFER:1; //bit 1
  1493. unsigned char CcsTT_DATA_TRANSFER:1; //bit 2
  1494. unsigned char CcsTP_DOWNLOAD_FINISH:1; //bit 3
  1495. unsigned char CcsTT_DOWNLOAD_FINISH:1; //bit 4
  1496. unsigned char CcsTP_ISOLATION_STATUS:1; //bit 5
  1497. unsigned char CcsTT_ISOLATION_STATUS:1; //bit 6
  1498. unsigned char CcsTP_CONNECTOR_INFO:1; //bit 7
  1499. //InfoVal[26]
  1500. unsigned char CcsTT_CONNECTOR_INFO:1; //bit 0
  1501. unsigned char CcsTT_RTC_INFO:1; //bit 1
  1502. unsigned char CcsTP_RTC_INFO:1; //bit 2
  1503. unsigned char CcsTP_EVSE_PRECHARGE_INFO:1; //bit 3
  1504. unsigned char CcsTT_EVSE_PRECHARGE_INFO:1; //bit 4
  1505. unsigned char CcsMSG_Sequence:1; //bit 5
  1506. unsigned char CcsCAN_MSG_Unrecognized_CMD_ID:1; //bit 6
  1507. unsigned char CcsDIN_Msg_Decode_Error:1; //bit 7
  1508. //InfoVal[27]
  1509. unsigned char CcsDIN_Msg_Encode_Error:1; //bit 0
  1510. unsigned char CcsISO1_Msg_Decode_Error:1; //bit 1
  1511. unsigned char CcsISO1_Msg_Encode_Error:1; //bit 2
  1512. unsigned char CcsISO2_Msg_Decode_Error:1; //bit 3
  1513. unsigned char CcsISO2_Msg_Encode_Error:1; //bit 4
  1514. unsigned char CcsCpStatus_Error:1; //bit 5
  1515. unsigned char CcsUnexpectVolBeforeCharing_Error:1; //bit 6
  1516. unsigned char CcsSeccNotReadyForCharging:1; //bit 7 reserved
  1517. //InfoVal[28]
  1518. unsigned char CcsSeccTimeoutQCA7000Comm:1; //bit 0
  1519. unsigned char CcsSeccFailForQCA7000SetKey:1; //bit 1
  1520. unsigned char :6; //bit 2~7 reserved
  1521. //InfoVal[29]
  1522. unsigned char ERROR_CODE_GBT_LOS_CC1 :1; //bit 0
  1523. unsigned char ERROR_CODE_GBT_CONNECTOR_LOCK_FAIL :1; //bit 1
  1524. unsigned char ERROR_CODE_GBT_BATTERY_INCOMPATIBLE :1; //bit 2
  1525. unsigned char ERROR_CODE_GBT_BMS_BROAA_TIMEOUT :1; //bit 3
  1526. unsigned char ERROR_CODE_GBT_CSU_PRECHARGE_TIMEOUT :1; //bit 4
  1527. unsigned char ERROR_CODE_GBT_BMS_PRESENT_VOLTAGE_FAULT :1; //bit 5
  1528. unsigned char ERROR_CODE_GBT_BMS_VOLTAGE_OVER_RANGE :1; //bit 6
  1529. unsigned char ERROR_CODE_GBT_BSM_CHARGE_ALLOW_00_10MIN_COUUNTDONE :1; //bit 7
  1530. //InfoVal[30]
  1531. unsigned char ERROR_CODE_GBT_WAIT_GROUNDFAULT_TIMEOUT :1; //bit 0
  1532. unsigned char ERROR_CODE_GBT_ADC_MORE_THAN_10V :1; //bit 1
  1533. unsigned char ERROR_CODE_GBT_ADC_MORE_THAN_60V :1; //bit 2
  1534. unsigned char ERROR_CODE_GBT_CHARGER_GET_NORMAL_STOP_CMD :1; //bit 3
  1535. unsigned char ERROR_CODE_GBT_CHARGER_GET_EMERGENCY_STOP_CMD :1; //bit 4
  1536. unsigned char ERROR_CODE_GBT_ISOLATION_RESULT_FAIL :1; //bit 5
  1537. unsigned char ERROR_CODE_GBT_MOTHER_BOARD_MISS_LINK :1; //bit 6
  1538. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_LIMIT :1; //bit 7
  1539. //InfoVal[31]
  1540. unsigned char ERROR_CODE_GBT_REQ_CURRENT_MORE_THAN_LIMIT :1; //bit 0
  1541. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_10_PERCENT :1; //bit 1
  1542. unsigned char ERROR_CODE_GBT_OUTPUT_VOLTAGE_DIFF_BCS_5_PERCENT :1; //bit 2
  1543. unsigned char ERROR_CODE_GBT_STOP_ADC_MORE_THAN_10V :1; //bit 3
  1544. unsigned char :4; //bit 4 ~ 7 reserved
  1545. //InfoVal[32]
  1546. unsigned char :6; //bit 0 ~ 5 reserved
  1547. unsigned char ERROR_CODE_CEM_BHM_TIMEOUT :1; //bit 6
  1548. unsigned char ERROR_CODE_CEM_BRM_TIMEOUT :1; //bit 7
  1549. //InfoVal[33]
  1550. unsigned char ERROR_CODE_CEM_BCP_TIMEOUT :1; //bit 0
  1551. unsigned char ERROR_CODE_CEM_BRO_TIMEOUT :1; //bit 1
  1552. unsigned char ERROR_CODE_CEM_BCL_TIMEOUT :1; //bit 2
  1553. unsigned char ERROR_CODE_CEM_BCS_TIMEOUT :1; //bit 3
  1554. unsigned char ERROR_CODE_CEM_BSM_TIMEOUT :1; //bit 4
  1555. unsigned char ERROR_CODE_CEM_BST_TIMEOUT :1; //bit 5
  1556. unsigned char ERROR_CODE_CEM_BSD_TIMEOUT :1; //bit 6
  1557. unsigned char ERROR_CODE_CEM_BEM_OTHER_TIMEOUT :1; //bit 7
  1558. //InfoVal[34]
  1559. unsigned char ERROR_CODE_BEM_CRM_TIMEOUT :1; //bit 0
  1560. unsigned char ERROR_CODE_BEM_CRMAA_TIMEOUT :1; //bit 1
  1561. unsigned char ERROR_CODE_BEM_CTS_CML_TIMEOUT :1; //bit 2
  1562. unsigned char ERROR_CODE_BEM_CRO_TIMEOUT :1; //bit 3
  1563. unsigned char ERROR_CODE_BEM_CCS_TIMEOUT :1; //bit 4
  1564. unsigned char ERROR_CODE_BEM_CST_TIMEOUT :1; //bit 5
  1565. unsigned char ERROR_CODE_BEM_CSD_TIMEOUT :1; //bit 6
  1566. unsigned char ERROR_CODE_BEM_BEM_OTHER_TIMEOUT :1; //bit 7
  1567. //InfoVal[35]
  1568. unsigned char :2; //bit 0 ~ 1
  1569. unsigned char ERROR_CODE_BST_SOC_GOAL :1; //bit 2
  1570. unsigned char ERROR_CODE_BST_TOTAL_VOLTAGE_GOAL :1; //bit 3
  1571. unsigned char ERROR_CODE_BST_CELL_VOLTAGE_GOAL :1; //bit 4
  1572. unsigned char ERROR_CODE_BST_GET_CST :1; //bit 5
  1573. unsigned char ERROR_CODE_BST_ISOLATION :1; //bit 6
  1574. unsigned char ERROR_CODE_BST_OUTPUT_CONNECTOR_OTP :1; //bit 7
  1575. //InfoVal[36]
  1576. unsigned char ERROR_CODE_BST_COMPONENT :1; //bit 0
  1577. unsigned char ERROR_CODE_BST_CHARGE_CONNECTOR :1; //bit 1
  1578. unsigned char ERROR_CODE_BST_OTP :1; //bit 2
  1579. unsigned char ERROR_CODE_BST_OTHER :1; //bit 3
  1580. unsigned char ERROR_CODE_BST_HIGH_V :1; //bit 4
  1581. unsigned char ERROR_CODE_BST_CC2 :1; //bit 5
  1582. unsigned char ERROR_CODE_BST_CURRENT :1; //bit 6
  1583. unsigned char ERROR_CODE_BST_VOLTAGE :1; //bit 7
  1584. //InfoVal[37]
  1585. unsigned char ERROR_CODE_GET_BST_NO_REASON :1; //bit 0
  1586. unsigned char :5; //bit 1 ~ 5 reserved
  1587. unsigned char ERROR_CODE_BSM_CELL_OVER_VOLTAGE :1; //bit 6
  1588. unsigned char ERROR_CODE_BSM_CELL_UNDER_VOLTAGE :1; //bit 7
  1589. //InfoVal[38]
  1590. unsigned char ERROR_CODE_BSM_OVER_SOC :1; //bit 0
  1591. unsigned char ERROR_CODE_BSM_UNDER_SOC :1; //bit 1
  1592. unsigned char ERROR_CODE_BSM_CURRENT :1; //bit 2
  1593. unsigned char ERROR_CODE_BSM_TEMPERATURE :1; //bit 3
  1594. unsigned char ERROR_CODE_BSM_ISOLATE :1; //bit 4
  1595. unsigned char ERROR_CODE_BSM_OUTPUT_CONNECTOR :1; //bit 5
  1596. unsigned char :2; //bit 6 ~ 7 reserved
  1597. //InfoVal[39]
  1598. unsigned char BackendDisconnectedViaEthernet:1; //bit 0
  1599. unsigned char BackendDisconnectViaWiFi:1; //bit 1
  1600. unsigned char BackendDisconnectVia4G:1; //bit 2
  1601. unsigned char BackendRemoteStart:1; //bit 3
  1602. unsigned char BackendRemoteStop:1; //bit 4
  1603. unsigned char BackendRemoteReset:1; //bit 5
  1604. unsigned char AuthorizationFailed:1; //bit 6
  1605. unsigned char :1; //bit 7 reserved
  1606. }bits;
  1607. }InfoEvents;
  1608. };
  1609. struct StatusCodeData
  1610. {
  1611. struct FaultCodeData FaultCode;
  1612. struct AlarmCodeData AlarmCode;
  1613. struct InfoCodeData InfoCode;
  1614. };
  1615. /**************************************************************************************/
  1616. /**************************PSU Share memory***************************************/
  1617. /**************************************************************************************/
  1618. struct PsuModuleVer
  1619. {
  1620. unsigned char FwPrimaryVersion[16];
  1621. unsigned char FwSecondVersion[16];
  1622. };
  1623. /*Following are the information for each PSU module*/
  1624. struct PsuModuleData
  1625. {
  1626. unsigned char AssignID;
  1627. unsigned char PhysicalID;
  1628. unsigned char GroupID;
  1629. unsigned char Address;
  1630. unsigned char FireWireIndex;
  1631. unsigned char FwVersion[16];
  1632. unsigned char SerialNumber[32];
  1633. unsigned char StateMachine; //0: Identification, 1:Operation, 2: Alarm, 3: Failure, s4:Upgrade
  1634. unsigned char OutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  1635. unsigned short FanSpeed_1; //RPM
  1636. unsigned short FanSpeed_2; //RPM
  1637. unsigned short FanSpeed_3; //RPM
  1638. unsigned short FanSpeed_4; //RPM
  1639. unsigned short InputVoltage_Type; //0x00 = Line to Line Vol, 0x01 = Line to Neutral Vol
  1640. unsigned short InputVoltageL1; //abcd=abc.d volt
  1641. unsigned short InputVoltageL2; //abcd=abc.d volt
  1642. unsigned short InputVoltageL3; //abcd=abc.d volt
  1643. unsigned short InputCurrentL1; //abcd=abc.d amp
  1644. unsigned short InputCurrentL2; //abcd=abc.d amp
  1645. unsigned short InputCurrentL3; //abcd=abc.d amp
  1646. unsigned short PresentOutputVoltage; //abcd=abc.d volt
  1647. unsigned short PresentOutputCurrent; //abcd=abc.d amp
  1648. unsigned short AvailableCurrent; //abcd=abc.d amp
  1649. unsigned int AvailablePower; //Watt
  1650. char CriticalTemp1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1651. char CriticalTemp2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1652. char CriticalTemp3; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1653. char ExletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1654. char InletTemp_1; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1655. char InletTemp_2; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1656. char InletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1657. char OutletTemp; //0x00: -60¢XC ~ 0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
  1658. unsigned int AlarmCode;
  1659. unsigned int FaultCode; //
  1660. unsigned int IAvailableCurrent; //abcd=abc.d amp
  1661. };
  1662. /*Following are the information for each PSU Group*/
  1663. struct PsuGroupData
  1664. {
  1665. unsigned char GroupPresentPsuQuantity;
  1666. unsigned char GroupOutputPowerSwitch; //0: D.D normal OFF, 1: D.D emergency OFF, 2: D.D ON
  1667. unsigned short GroupTargetOutputVoltage; //abcd=abc.d volt
  1668. unsigned short GroupTargetOutputCurrent; //abcd=abc.d amp
  1669. unsigned short GroupAvailableCurrent; //abcd=abc.d amp
  1670. unsigned int GroupAvailablePower; //Watt
  1671. unsigned int GroupRealOutputPower; //Watt
  1672. unsigned short GroupPresentOutputVoltage; //abcd=abc.d volt
  1673. unsigned short GroupPresentOutputCurrent; //abcd=abc.d Amps
  1674. unsigned int GroupPresentOutputPower; //Watt
  1675. struct PsuModuleData PsuModule[MAX_PSU_QUANTITY];
  1676. };
  1677. /*Following is the information for system all PSU*/
  1678. struct PsuData
  1679. {
  1680. unsigned char SystemPresentPsuQuantity;
  1681. unsigned short SystemAvailableCurrent; //abcd=abc.d amp
  1682. unsigned int SystemAvailablePower; //Watt
  1683. struct PsuGroupData PsuGroup[4];
  1684. unsigned char GroupCount;
  1685. unsigned char Work_Step;
  1686. struct PsuModuleVer PsuVersion[MAX_PSU_QUANTITY];
  1687. };
  1688. /************************************************************************************/
  1689. /**************************CHAdeMO protocol Share memory*********************/
  1690. /**************************************************************************************/
  1691. struct CHAdeMOEvData
  1692. {
  1693. unsigned char SupportDynamicControl; //110.0
  1694. // bit0=1:supported
  1695. unsigned char SupportHighCurrent; //110.0
  1696. // bit1=1:supported
  1697. unsigned char MiniChargeCurrent; //100.0 0~200(A) (unit:1A)
  1698. // 0x00: request for current equivalent to 1.5kW
  1699. // 0x01: no request
  1700. // 0x02: request of 1A and following are the same rule
  1701. unsigned short MaxiBatteryVoltage; //100.5,100.4 0~600(V) (unit:1V)
  1702. unsigned short MaxiChargingTime; //101.2,101.1 10(sec.)~255(min.) (Unit:sec)
  1703. // Set 0xFF to 101.1 (Unit: 10sec) in case 101.2 (Unit: 1min) is used
  1704. unsigned char EstimatChargingTime; //101.3 0~254(min.) (Unit:sec)
  1705. // Display Only
  1706. unsigned short TotalBatteryCapacity; //101.6,101.5 0.1~6553.5(kWh) (unit:0.1 kWh)
  1707. unsigned char ProtocolVersion; //102.0 0~255
  1708. // 0x02: CHAdeMO specification ver.1.2
  1709. unsigned short TargetBatteryVoltage; //102.2,102.1 0~600(V) (unit:1V)
  1710. unsigned short ChargingCurrentRequest; //102.3 0~200(A) (unit:1A)
  1711. //110.2,110.1 0~1023(A) (unit:1A)
  1712. unsigned char BatteryAlarm; //102.4 >0:alarm
  1713. // bit0=1:Battery overvoltage
  1714. // bit1=1:Battery undervoltage
  1715. // bit2=1:Battery current deviation error
  1716. // bit3=1:High battery temperature
  1717. // bit4=1:Battery voltage deviation error
  1718. unsigned char EvDetection; //102.5
  1719. // bit0=0:Vehicle charging disabled, (stop charging)
  1720. // bit0=1:Vehicle charging enabled,
  1721. // bit1=0:¡§Parking¡¨ position
  1722. // bit1=1:other position (stop charging)
  1723. // bit2=0:Charging system normal
  1724. // bit2=1:Charging system error (stop charging)
  1725. // bit3=0:EV contactor close or during welding detection
  1726. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  1727. // bit4=0:No stop request before charging
  1728. // bit4=1:Normal stop request before charging (stop charging)
  1729. unsigned char SOC; //102.6 0~100(%) (unit:%)
  1730. // Display Only
  1731. unsigned char Communicating; // it is true if receive EV CAN message within every 1500ms
  1732. unsigned char PresentMsgFlowStatus; //
  1733. };
  1734. struct CHAdeMOEvseData
  1735. {
  1736. unsigned char SelfTest_Comp;
  1737. unsigned char version[16]; //Chademo firmware version
  1738. unsigned char SupportDynamicControl; //118.0
  1739. // bit0=1:supported
  1740. unsigned char SupportHighCurrent; //118.0
  1741. // bit1=1:supported
  1742. unsigned short AvailableOutputVoltage; //108.2,108.1 0~600(V) (unit:1V)
  1743. unsigned short AvailableOutputCurrent; //108.3 0~255(A) (unit:1A)
  1744. //118.2,118.1 0~1023(A) (unit:1A)
  1745. unsigned short ThresholdVoltage; //108.5,108.4 0~600(V) (unit:1V)
  1746. unsigned char ConnectorTemperatureP; //108.6 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  1747. unsigned char ConnectorTemperatureN; //108.7 -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  1748. unsigned char ProtocolVersion; //109.0 0~255
  1749. // 0x00: CHAdeMO specification 0.9 and earlier
  1750. // 0x01: CHAdeMO specification 0.9 and 0.9.1
  1751. // 0x02: CHAdeMO specification 1.0.0, 1.0.1, 1.1 and 1.2
  1752. unsigned short PresentOutputVoltage; //109.2,109.1 0~600(V) (unit:1V)
  1753. unsigned short PresentOutputCurrent; //109.3 0~255(A) (unit:1A)
  1754. //118.4,118.3 0~1023(A) (unit:1A)
  1755. unsigned char EvseDetection; //109.5
  1756. // bit0=0:not charging state now
  1757. // bit0=1:charging state now
  1758. // bit1=0:EVSE normal
  1759. // bit1=1:EVSE error
  1760. // bit2=0:Not Energizing state
  1761. // bit2=1:Energizing state
  1762. // bit3=0:No Battery incompatibility
  1763. // bit3=1:Battery incompatibility
  1764. // bit4=0:No Charging system error
  1765. // bit4=1:Charging system error
  1766. // bit5=0:No Charging stop control
  1767. // bit5=1:Charging stop control
  1768. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  1769. // Set 0xFF to 109.6 (Unit: 10sec) in case 109.7 (Unit: 1min) is used
  1770. unsigned char HighPowerCondition; //118.5
  1771. // bit0=0:Present charging current H¡¦118.3,H¡¦118.4¡¨ is less than or equal to rated current of a charging cable
  1772. // bit0=1:Present charging current H¡¦118.3,H¡¦118.4¡¨ is exceeds to rated current of a charging cable
  1773. // bit1=1:charging cable Cooling function Operating Installed
  1774. // bit2=1:charging cable Current limiting function
  1775. // bit3=1:charging connector Cooling function Operating
  1776. // bit4=1:charging connector Current limiting function Installed
  1777. // bit5=1:charging connector Over-temperature protection Installed
  1778. // bit6=1:Functional safety Applied
  1779. unsigned int MaxiGroupPower; // XXXXXXXX (Unit:Watt)depend on which group to be used
  1780. unsigned int MaxiGroupCurrent; // XXXXXXXX (unit:1A)depend on which group to be used
  1781. unsigned short ApplyOutputVoltage; // 0~600(V) (unit:1V)
  1782. unsigned short ElapseChargingTime; // (Unit:sec)
  1783. unsigned short ElapseEnergy; // (Unit:10xkWh)
  1784. unsigned char EvboardStatus; // 0 : init
  1785. };
  1786. struct CHAdeMOData
  1787. {
  1788. struct CHAdeMOEvData ev[CHAdeMO_QUANTITY];
  1789. struct CHAdeMOEvseData evse[CHAdeMO_QUANTITY];
  1790. };
  1791. /************************************************************************************/
  1792. /**************************GBT protocol Share memory*********************/
  1793. /**************************************************************************************/
  1794. struct GBTEvData
  1795. {
  1796. unsigned short MaxiBatteryVoltage; // 0~600(V) (unit:1V)
  1797. unsigned short MaxiChargingTime; // 10(sec.)~255(min.) (Unit:sec)
  1798. unsigned char EstimatChargingTime; // 0~254(min.) (Unit:sec)
  1799. unsigned short TotalBatteryCapacity; // 0.1~6553.5(kWh) (unit:0.1 kWh)
  1800. unsigned char ProtocolVersion; // 0~255
  1801. unsigned short TargetBatteryVoltage; // 0~600(V) (unit:1V)
  1802. unsigned short ChargingCurrentRequest; // 0~200(A) (unit:1A)
  1803. // 0~1023(A) (unit:1A)
  1804. unsigned char EvDetection; //102.5
  1805. // bit0=0:Vehicle charging disabled, (stop charging)
  1806. // bit0=1:Vehicle charging enabled,
  1807. // bit1=0:¡§Parking¡¨ position
  1808. // bit1=1:other position (stop charging)
  1809. // bit2=0:Charging system normal
  1810. // bit2=1:Charging system error (stop charging)
  1811. // bit3=0:EV contactor close or during welding detection
  1812. // bit3=1:EV contactor open or termination of welding detection (stop charging)
  1813. // bit4=0:No stop request before charging
  1814. // bit4=1:Normal stop request before charging (stop charging)
  1815. unsigned char SOC; //102.6 0~100(%) (unit:%)
  1816. // Display Only
  1817. unsigned char PresentMsgFlowStatus; //
  1818. };
  1819. struct GBTEvseData
  1820. {
  1821. unsigned char SelfTest_Comp;
  1822. unsigned char version[16]; // GBT firmware version
  1823. unsigned short AvailableOutputVoltage; // 0~600(V) (unit:1V)
  1824. unsigned short AvailableOutputCurrent; // 0~255(A) (unit:1A)
  1825. unsigned char ConnectorTemperatureP; // -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  1826. unsigned char ConnectorTemperatureN; // -40~215(degC) (unit:degC) //value 0=-40 [NISSAN customized]
  1827. unsigned short PresentOutputVoltage; // 0~600(V) (unit:1V)
  1828. unsigned short PresentOutputCurrent; // 0~255(A) (unit:1A)
  1829. unsigned short RemainChargingTime; //109.7,109.6 10(sec.)~255(min.) (Unit:sec)
  1830. unsigned char EvboardStatus; // 0 : init
  1831. };
  1832. struct GBTData
  1833. {
  1834. struct GBTEvData ev[GB_QUANTITY];
  1835. struct GBTEvseData evse[GB_QUANTITY];
  1836. };
  1837. /************************************************************************************/
  1838. /**************************CCS protocol Share memory***************************/
  1839. /**************************DIN70121: 201412***************************************/
  1840. /**************************ISO15118_2014: 2014************************************/
  1841. /**************************ISO15118_2018: 2018************************************/
  1842. /************************************************************************************/
  1843. typedef enum boolean { FALSE, TRUE } BOOL;
  1844. enum ResponseCodeType_DIN70121 { OK_DIN70121 = 0, OK_NewSessionEstablished_DIN70121 = 1, OK_OldSessionJoined_DIN70121 = 2, OK_CertificateExpiresSoon_DIN70121 = 3,
  1845. FAILED_DIN70121 = 4, FAILED_SequenceError_DIN70121 = 5, FAILED_ServiceIDInvalid_DIN70121 = 6, FAILED_UnknownSession_DIN70121 = 7,
  1846. FAILED_ServiceSelectionInvalid_DIN70121 = 8, FAILED_PaymentSelectionInvalid_DIN70121 = 9, FAILED_CertificateExpired_DIN70121 = 10,
  1847. FAILED_SignatureError_DIN70121 = 11, FAILED_NoCertificateAvailable_DIN70121 = 12, FAILED_CertChainError_DIN70121 = 13, FAILED_ChallengeInvalid_DIN70121 = 14,
  1848. FAILED_ContractCanceled_DIN70121 = 15, FAILED_WrongChargeParameter_DIN70121 = 16, FAILED_PowerDeliveryNotApplied_DIN70121 = 17,
  1849. FAILED_TariffSelectionInvalid_DIN70121 = 18, FAILED_ChargingProfileInvalid_DIN70121 = 19, FAILED_EVSEPresentVoltageToLow_DIN70121 = 20,
  1850. FAILED_MeteringSignatureNotValid_DIN70121 = 21, FAILED_WrongEnergyTransferType_DIN70121 = 22};
  1851. enum ResponseCodeType_ISO15118_2014 { OK_ISO15118_2014 = 0, OK_NewSessionEstablished_ISO15118_2014 = 1, OK_OldSessionJoined_ISO15118_2014 = 2, OK_CertificateExpiresSoon_ISO15118_2014 = 3,
  1852. FAILED_ISO15118_2014 = 4, FAILED_SequenceError_ISO15118_2014 = 5, FAILED_ServiceIDInvalid_ISO15118_2014 = 6, FAILED_UnknownSession_ISO15118_2014 = 7,
  1853. FAILED_ServiceSelectionInvalid_ISO15118_2014 = 8, FAILED_PaymentSelectionInvalid_ISO15118_2014 = 9, FAILED_CertificateExpired_ISO15118_2014 = 10,
  1854. FAILED_SignatureError_ISO15118_2014 = 11, FAILED_NoCertificateAvailable_ISO15118_2014 = 12, FAILED_CertChainError_ISO15118_2014 = 13, FAILED_ChallengeInvalid_ISO15118_2014 = 14,
  1855. FAILED_ContractCanceled_ISO15118_2014 = 15, FAILED_WrongChargeParameter_ISO15118_2014 = 16, FAILED_PowerDeliveryNotApplied_ISO15118_2014 = 17,
  1856. FAILED_TariffSelectionInvalid_ISO15118_2014 = 18, FAILED_ChargingProfileInvalid_ISO15118_2014 = 19, FAILED_MeteringSignatureNotValid_ISO15118_2014 = 20,
  1857. FAILED_NoChargeServiceSelected_ISO15118_2014 = 21, FAILED_WrongEnergyTransferMode_ISO15118_2014 = 22, FAILED_ContactorError_ISO15118_2014 = 23,
  1858. FAILED_CertificateNotAllowedAtThisEVSE_ISO15118_2014 = 24, FAILED_CertificateRevoked_ISO15118_2014 = 25 };
  1859. enum ResponseCodeType_ISO15118_2018 { OK_ISO15118_2018 = 0, OK_NewSessionEstablished_ISO15118_2018 = 1, OK_OldSessionJoined_ISO15118_2018 = 2, OK_CertificateExpiresSoon_ISO15118_2018 = 3,
  1860. OK_IsolationValid_ISO15118_2018 = 4, OK_IsolationWarning_ISO15118_2018 = 5, WARNING_CertificateExpired_ISO15118_2018 = 6, WARNING_NoCertificateAvailable_ISO15118_2018 = 7,
  1861. WARNING_CertValidationError_ISO15118_2018 = 8, WARNING_CertVerificationError_ISO15118_2018 = 9, WARNING_ContractCanceled_ISO15118_2018 = 10,
  1862. FAILED_ISO15118_2018 = 11, FAILED_SequenceError_ISO15118_2018 = 12, FAILED_ServiceIDInvalid_ISO15118_2018 = 13, FAILED_UnknownSession_ISO15118_2018 = 14,
  1863. FAILED_ServiceSelectionInvalid_ISO15118_2018 = 15, FAILED_SignatureError_ISO15118_2018 = 16, FAILED_IdentificationSelectionInvalid_ISO15118_2018 = 17,
  1864. FAILED_ChallengeInvalid_ISO15118_2018 = 18, FAILED_WrongChargeParameter_ISO15118_2018 = 19, FAILED_IsolationFault_ISO15118_2018 = 20,
  1865. FAILED_PowerDeliveryNotApplied_ISO15118_2018 = 21, FAILED_TariffSelectionInvalid_ISO15118_2018 = 22, FAILED_ChargingProfileInvalid_ISO15118_2018 = 23,
  1866. FAILED_MeteringSignatureNotValid_ISO15118_2018 = 24, FAILED_NoChargeServiceSelected_ISO15118_2018 = 25, FAILED_WrongEnergyTransferMode_ISO15118_2018 = 26,
  1867. FAILED_ContactorError_ISO15118_2018 = 27, FAILED_CertificateRevoked_ISO15118_2018 = 28, FAILED_CertificateNotYetValid_ISO15118_2018 = 29 };
  1868. enum EVSENotificationType { None = 0, StopCharging = 1, ReNegotiation = 2};
  1869. enum ServiceCategoryType { EVCharging = 0, Internet = 1, ContractCertificate = 2, OtherCustom = 3};
  1870. enum PaymentOptionType { Contract = 0, ExternalPayment = 1};
  1871. /*enum EVSESupportedEnergyTransferType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  1872. DC_combo_core = 4, DC_dual = 5, AC_core1p_DC_extended = 6, AC_single_DC_core = 7,
  1873. AC_single_phase_three_phase_core_DC_extended = 8, AC_core3p_DC_extended = 9};*/
  1874. enum EnergyTransferModeType { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
  1875. DC_combo_core = 4, DC_unique = 5};
  1876. //enum identificationOptionType { Contract = 0, ExternalIdentification = 1};
  1877. 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};
  1878. 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};
  1879. enum ProcessingType { Finished = 0, Ongoing = 1, Ongoing_WaitingForCustomerInteraction = 2};
  1880. enum EVSEProcessingType_DIN70121 { Finished_DIN70121 = 0, Ongoing_DIN70121 = 1};
  1881. enum EVSEProcessingType_ISO15118_2014 { Finished_ISO15118_2014 = 0, Ongoing_ISO15118_2014 = 1, Ongoing_WaitingForCustomerInteraction_ISO15118_2014=2 };
  1882. enum DC_EVErrorCodeType { NO_ERROR = 0, FAILED_RESSTemperatureInhibit = 1, FAILED_EVShiftPosition = 2, FAILED_ChargerConnectorLockFault = 3,
  1883. FAILED_EVRESSMalfunction = 4, FAILED_ChargingCurrentdifferential = 5, FAILED_ChargingVoltageOutOfRange = 6,
  1884. Reserved_A = 7, Reserved_B = 8, Reserved_C = 9, FAILED_ChargingSystemIncompatibility = 10, NoData = 11};
  1885. enum IsolationLevelType_DIN70121 { Invalid_DIN70121 = 0, Valid_DIN70121 = 1, Warning_DIN70121 = 2, Fault_DIN70121 = 3};
  1886. 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};
  1887. enum DC_EVSEStatusCodeType { EVSE_NotReady = 0, EVSE_Ready = 1, EVSE_Shutdown = 2, EVSE_UtilityInterruptEvent = 3,
  1888. EVSE_IsolationMonitoringActive = 4, EVSE_EmergencyShutdown = 5, EVSE_Malfunction = 6,
  1889. Reserved_8 = 7, Reserved_9 = 8};
  1890. enum ScheduleOriginType { EV = 0, SA = 1};
  1891. enum ChargeProgressType_ISO15118_2014 {start_ISO15118_2014 = 0, Stop_ISO15118_2014 = 1, Renegotiate_ISO15118_2014 = 2};
  1892. enum ChargeProgressType_ISO15118_2018 {start_ISO15118_2018 = 0, Renegotiate_ISO15118_2018 = 1, Standby_ISO15118_2018 = 2, Stop_ISO15118_2018 = 3};
  1893. enum evOperationType {Charge = 0, Discharge = 1, Standby = 2};
  1894. enum mechanicalChargingDeviceStatusType {Home = 0, Moving = 1, EndPosition = 2};
  1895. enum EV_CP_StatusType {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5};
  1896. enum EV_Error_Status_CodeType { No_EV_Error = 0, EV_FAILED_EmergencyEvent = 1, EV_FAILED_Breaker = 2, EV_FAILED_RESSTemperatureInhibit = 3,
  1897. EV_FAILED_RESS = 4, EV_FAILED_ChargingCurrentDifferential = 5, EV_FAILED_ChargingVoltageOutOfRange = 6,
  1898. Reserved_by_ISO_1 = 7, Reserved_by_ISO_2 = 8, Reserved_by_ISO_3 = 9, OEM1 = 10,
  1899. OEM2 = 11, OEM3 = 12, OEM4 = 13};
  1900. enum IsolationStatusType { Invalid = 0, Safe = 1, Warning = 2, Fault = 3};
  1901. enum ChargingSessionType { Terminate = 0, Pause = 1};
  1902. enum CostKindType { relativePricePercentage = 0, RenewableGenerationPercentage = 1, CarbonDioxideEmission = 2};
  1903. struct PhysicalValueType_DIN70121 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  1904. {
  1905. int Multiplier; //range: -3..+3
  1906. enum unitSymbolType_DIN70121 Unit;
  1907. short Value;
  1908. };
  1909. struct PhysicalValueType_ISO15118_2014 //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
  1910. {
  1911. int Multiplier; //range: -3..+3
  1912. enum unitSymbolType_ISO15118_2014 Unit;
  1913. short Value;
  1914. };
  1915. struct PhysicalValueType_ISO15118_2018 //The final physical value is determined by: Value * 10 ^ Exponent [Unit]
  1916. {
  1917. int Exponent; //range: -3..+3
  1918. short Value;
  1919. };
  1920. struct AppProtocolType
  1921. {
  1922. unsigned char ProtocolNamespace[100];
  1923. unsigned int VersionNumberMajor;
  1924. unsigned int VersionNumberMinor;
  1925. unsigned char SchemaID;
  1926. unsigned char Priority; //range 1..20
  1927. };
  1928. struct ACD_SSEnergyTransferModeType
  1929. {
  1930. unsigned char EVID[20];
  1931. };
  1932. struct EVSEStatusType
  1933. {
  1934. unsigned short NotificationMaxDelay; //in seconds
  1935. enum EVSENotificationType EVSENotification;
  1936. };
  1937. struct ServiceIDListType
  1938. {
  1939. unsigned short ServiceID[10]; //refer to chapter 8.6.2.1 Table 192
  1940. };
  1941. struct PaymentOptionListType
  1942. {
  1943. enum PaymentOptionType PaymentOption[2];
  1944. };
  1945. struct ServiceTagType
  1946. {
  1947. unsigned short ServiceID;
  1948. unsigned char ServiceName[32];//Optional Element
  1949. enum ServiceCategoryType ServiceCategory;
  1950. unsigned char ServiceScope[32];//Optional Element
  1951. };
  1952. struct ServiceType_DIN70121
  1953. {
  1954. struct ServiceTagType ServiceTag;
  1955. BOOL FreeService;
  1956. };
  1957. struct ServiceType_ISO15118_2014
  1958. {
  1959. unsigned short ServiceID;
  1960. unsigned char ServiceName[32]; //Optional
  1961. enum ServiceCategoryType ServiceCategory;
  1962. unsigned char ServiceScope[64]; //Optional
  1963. BOOL FreeService;
  1964. };
  1965. /*struct ServiceType_ISO15118_2018
  1966. {
  1967. unsigned short ServiceID;
  1968. BOOL FreeService;
  1969. }; */
  1970. struct SupportedEnergyTransferModeType
  1971. {
  1972. enum EnergyTransferModeType EnergyTransferMode[6];
  1973. };
  1974. struct ServiceChargeType
  1975. {
  1976. struct ServiceType_DIN70121 Services;
  1977. //enum EVSESupportedEnergyTransferType EnergyTransferType;
  1978. enum EnergyTransferModeType EnergyTransferType;
  1979. };
  1980. struct ChargeServiceType
  1981. {
  1982. struct ServiceType_ISO15118_2014 Services;
  1983. struct SupportedEnergyTransferModeType SupportedEnergyTransferMode;
  1984. };
  1985. struct ServiceListType
  1986. {
  1987. struct ServiceType_ISO15118_2014 Service[8];
  1988. };
  1989. struct IdentificationOptionListType
  1990. {
  1991. enum PaymentOptionType IdentificationOption[2];
  1992. };
  1993. struct ParameterType
  1994. {
  1995. unsigned char Name[32];
  1996. struct PhysicalValueType_ISO15118_2014 PhysicalValue_ISO15118_2014;
  1997. struct PhysicalValueType_ISO15118_2018 PhysicalValue_ISO15118_2018;
  1998. };
  1999. struct ParameterSetType
  2000. {
  2001. short ParameterSetID;
  2002. struct ParameterType Parameter[16];
  2003. };
  2004. struct ServiceParameterListType
  2005. {
  2006. struct ParameterSetType ParameterSet[255];
  2007. };
  2008. struct WPT_SDlEnergyTransferModeType
  2009. {
  2010. struct ServiceParameterListType ServiceParameterList;
  2011. };
  2012. struct SelectedServiceType
  2013. {
  2014. unsigned short ServiceID;
  2015. short ParameterSetID;
  2016. };
  2017. struct SelectedServiceListType
  2018. {
  2019. struct SelectedServiceType SelectedService[16];
  2020. };
  2021. struct CertificateChainType
  2022. {
  2023. unsigned char Id[32]; //Optional
  2024. unsigned char Certificate[800]; //check size again
  2025. unsigned char SubCertificates[4][800]; //Optional, check size again
  2026. };
  2027. struct PNC_AReqIdentificationModeType
  2028. {
  2029. unsigned char GenChallenge[16]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  2030. unsigned char Id[32]; //DIN70121=> None, ISO15118_2014=>None, ISO15118_2018=>Optional
  2031. };
  2032. struct AC_EVChargeParameterType
  2033. {
  2034. unsigned int DepartureTime; //Optional
  2035. struct PhysicalValueType_ISO15118_2014 EAmount;
  2036. struct PhysicalValueType_ISO15118_2014 EVMaxVoltage;
  2037. struct PhysicalValueType_ISO15118_2014 EVMaxCurrent;
  2038. struct PhysicalValueType_ISO15118_2014 EVMinCurrent;
  2039. };
  2040. struct DC_EVStatusType_DIN70121
  2041. {
  2042. BOOL EVReady;
  2043. BOOL EVCabinConditioning;
  2044. BOOL EVRESSConiditioning;
  2045. enum DC_EVErrorCodeType EVErrorCode;
  2046. unsigned char EVRESSSOC; /*0-100 percentage*/
  2047. };
  2048. struct DC_EVChargeParameterType_DIN70121
  2049. {
  2050. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2051. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;
  2052. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  2053. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;
  2054. struct PhysicalValueType_DIN70121 EVEnergyCapacity; //Optional
  2055. struct PhysicalValueType_DIN70121 EVEnergyRequest; //Optional
  2056. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  2057. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  2058. };
  2059. struct DC_EVStatusType_ISO15118_2014
  2060. {
  2061. BOOL EVReady;
  2062. enum DC_EVErrorCodeType EVErrorCode;
  2063. unsigned char EVRESSSOC; /*0-100 percentage*/
  2064. };
  2065. struct DC_EVChargeParameterType_ISO15118_2014
  2066. {
  2067. unsigned int DepartureTime; //Optional
  2068. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2069. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;
  2070. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  2071. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;
  2072. struct PhysicalValueType_ISO15118_2014 EVEnergyCapacity; //Optional
  2073. struct PhysicalValueType_ISO15118_2014 EVEnergyRequest; //Optional
  2074. unsigned char FullSOC;/*0-100 percentage*/ //Optional
  2075. unsigned char BulkSOC;/*0-100 percentage*/ //Optional
  2076. };
  2077. struct Dynamic_CPDReqControlModeType
  2078. {
  2079. unsigned int DepartureTime;
  2080. };
  2081. struct RelativeTimeIntervalType
  2082. {
  2083. unsigned int duration; //Optional
  2084. unsigned int start;
  2085. };
  2086. struct PMaxScheduleEntryType
  2087. {
  2088. struct RelativeTimeIntervalType RelativeTimeInterval;
  2089. unsigned short PMax;
  2090. };
  2091. struct PMaxScheduleType
  2092. {
  2093. unsigned short PMaxScheduleID; //no this itme in ISO15118_2014
  2094. struct PMaxScheduleEntryType PMaxScheduleEntry[1024];
  2095. };
  2096. struct CostType
  2097. {
  2098. unsigned int amount;
  2099. enum CostKindType costKind;
  2100. int amountMultiplier; //Optional , range: -3..+3
  2101. };
  2102. struct ConsumptionCostType
  2103. {
  2104. struct CostType Cost[3];
  2105. struct PhysicalValueType_ISO15118_2014 startValue;
  2106. };
  2107. struct SalesTariffEntryType
  2108. {
  2109. struct RelativeTimeIntervalType RelativeTimeInterval;
  2110. unsigned char EPriceLevel; //Optional
  2111. struct ConsumptionCostType ConsumptionCost[3]; //Optional
  2112. };
  2113. struct SalesTariffType
  2114. {
  2115. unsigned char Id[32]; //Optional
  2116. short SalesTariffID;
  2117. unsigned char SalesTariffDescription[32]; //Optional
  2118. unsigned char NumEPriceLevels; //Optional
  2119. struct SalesTariffEntryType SalesTariffEntry[1024];
  2120. };
  2121. struct SAScheduleTupleType
  2122. {
  2123. short SAScheduleTupleID;
  2124. struct PMaxScheduleType PMaxSchedule;
  2125. struct SalesTariffType SalesTariff; //Optional
  2126. };
  2127. struct ScheduleListType
  2128. {
  2129. enum ScheduleOriginType ScheduleOrigin;
  2130. struct SAScheduleTupleType ScheduleTuple[3];
  2131. };
  2132. struct Scheduled_CPDReqControlModeType
  2133. {
  2134. enum ProcessingType EVProcessing;
  2135. unsigned int DepartureTime; //Optional
  2136. unsigned short MaxSupportingPoints;
  2137. struct ScheduleListType ScheduleList; //Optional
  2138. };
  2139. struct AC_CPDReqEnergyTransferModeType
  2140. {
  2141. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2142. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2143. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2144. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2145. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2146. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2147. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  2148. };
  2149. struct DC_CPDReqEnergyTransferModeType
  2150. {
  2151. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  2152. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower; //Optional
  2153. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2154. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2155. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  2156. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2157. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2158. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2159. unsigned char TargetSOC; //Optional
  2160. unsigned char BulkSOC; //Optional
  2161. };
  2162. struct BPT_AC_CPDReqEnergyTransferModeType
  2163. {
  2164. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2165. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  2166. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  2167. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2168. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  2169. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2170. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  2171. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2172. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2173. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2174. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  2175. };
  2176. struct BPT_DC_CPDReqEnergyTransferModeType
  2177. {
  2178. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2179. struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;
  2180. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
  2181. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
  2182. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2183. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2184. struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
  2185. struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
  2186. struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
  2187. struct PhysicalValueType_ISO15118_2018 EVMinimumVoltage;
  2188. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  2189. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  2190. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  2191. unsigned char TargetSOC; //Optional
  2192. unsigned char BulkSOC; //Optional
  2193. };
  2194. struct WPT_CPDReqEnergyTransferModeType
  2195. {
  2196. struct PhysicalValueType_ISO15118_2018 EVMaximumPower; //Optional
  2197. struct PhysicalValueType_ISO15118_2018 EVMinimumPower; //Optional
  2198. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2199. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2200. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2201. };
  2202. struct ACD_CPDReqEnergyTransferModeType
  2203. {
  2204. //cannot be found in standard
  2205. };
  2206. struct SAScheduleListType
  2207. {
  2208. struct SAScheduleTupleType SAScheduleTuple[3];
  2209. };
  2210. struct DC_EVSEStatusType_DIN70121
  2211. {
  2212. enum IsolationLevelType_DIN70121 EVSEIsolationStatus; //Optional
  2213. enum DC_EVSEStatusCodeType EVSEStatusCode;
  2214. unsigned int NotificationMaxDelay;
  2215. enum EVSENotificationType EVSENotification;
  2216. };
  2217. struct DC_EVSEChargeParameterType_DIN70121
  2218. {
  2219. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2220. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;
  2221. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  2222. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;
  2223. struct PhysicalValueType_DIN70121 EVSEMinimumCurrentLimit;
  2224. struct PhysicalValueType_DIN70121 EVSEMinimumVoltageLimit;
  2225. struct PhysicalValueType_DIN70121 EVSECurrentRegulationTolerance; //Optional
  2226. struct PhysicalValueType_DIN70121 EVSEPeakCurrentRipple;
  2227. struct PhysicalValueType_DIN70121 EVSEEnergyToBeDelivered; //Optional
  2228. };
  2229. struct AC_EVSEStatusType
  2230. {
  2231. BOOL RCD;
  2232. unsigned short NotificationMaxDelay;
  2233. enum EVSENotificationType EVSENotification; //need to be confirmed
  2234. };
  2235. struct AC_EVSEChargeParameterType
  2236. {
  2237. struct AC_EVSEStatusType AC_EVSEStatus;
  2238. struct PhysicalValueType_ISO15118_2014 EVSENominalVoltage;
  2239. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;
  2240. };
  2241. struct DC_EVSEStatusType_ISO15118_2014
  2242. {
  2243. unsigned short NotificationMaxDelay;
  2244. enum EVSENotificationType EVSENotification;
  2245. enum IsolationLevelType_ISO15118_2014 EVSEIsolationStatus; //Optional
  2246. enum DC_EVSEStatusCodeType DC_EVSEStatusCode;
  2247. };
  2248. struct DC_EVSEChargeParameterType_ISO15118_2014
  2249. {
  2250. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2251. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;
  2252. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;
  2253. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;
  2254. struct PhysicalValueType_ISO15118_2014 EVSEMinimumCurrentLimit;
  2255. struct PhysicalValueType_ISO15118_2014 EVSEMinimumVoltageLimit;
  2256. struct PhysicalValueType_ISO15118_2014 EVSECurrentRegulationTolerance; //Optional
  2257. struct PhysicalValueType_ISO15118_2014 EVSEPeakCurrentRipple;
  2258. struct PhysicalValueType_ISO15118_2014 EVSEEnergyToBeDelivered; //Optional
  2259. };
  2260. struct Scheduled_CPDResControlModeType
  2261. {
  2262. struct ScheduleListType ScheduleList;
  2263. };
  2264. struct AC_CPDResEnergyTransferModeType
  2265. {
  2266. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  2267. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  2268. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  2269. };
  2270. struct DC_CPDResEnergyTransferModeType
  2271. {
  2272. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  2273. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  2274. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  2275. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  2276. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  2277. };
  2278. struct BPT_AC_CPDResEnergyTransferModeType
  2279. {
  2280. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
  2281. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent[3];
  2282. struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
  2283. struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
  2284. };
  2285. struct BPT_DC_CPDResEnergyTransferModeType
  2286. {
  2287. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
  2288. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargePower;
  2289. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
  2290. struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent;
  2291. struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
  2292. struct PhysicalValueType_ISO15118_2018 EVSEMinimumDischargeCurrent;
  2293. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
  2294. struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
  2295. };
  2296. struct WPT_CPDResEnergyTransferModeType
  2297. {
  2298. struct PhysicalValueType_ISO15118_2018 EVSEMaximumPower;
  2299. struct PhysicalValueType_ISO15118_2018 EVSEMinimumPower;
  2300. };
  2301. struct ACD_CPDResEnergyTransferModeType
  2302. {
  2303. //not found in ISO15118_2018
  2304. };
  2305. struct ProfileEntryType_DIN70121
  2306. {
  2307. unsigned int ChargingProfileEntryStart;
  2308. short ChargingProfileEntryMaxPower;
  2309. };
  2310. struct ChargingProfileType_DIN70121
  2311. {
  2312. short SAScheduleTupleID;
  2313. struct ProfileEntryType_DIN70121 ProfileEntry[24];
  2314. };
  2315. struct DC_EVPowerDeliveryParameterType_DIN70121
  2316. {
  2317. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2318. BOOL BulkChargingComplete; //Optional
  2319. BOOL ChargingComplete;
  2320. };
  2321. struct ProfileEntryType_ISO15118_2014
  2322. {
  2323. unsigned int ChargingProfileEntryStart;
  2324. struct PhysicalValueType_ISO15118_2018 ChargingProfileEntryMaxPower;
  2325. unsigned char ChargingProfileEntryMaxNumberOfPhasesInUse; //Optional
  2326. };
  2327. struct ChargingProfileType_ISO15118_2014
  2328. {
  2329. struct ProfileEntryType_ISO15118_2014 ProfileEntry[24];
  2330. };
  2331. struct DC_EVPowerDeliveryParameterType_ISO15118_2014
  2332. {
  2333. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2334. BOOL BulkChargingComplete; //Optional
  2335. BOOL ChargingComplete;
  2336. };
  2337. struct TimeInterval
  2338. {
  2339. unsigned int start;
  2340. unsigned int duration; //Optional
  2341. };
  2342. struct PowerScheduleEntryType
  2343. {
  2344. struct TimeInterval TimeInterval;
  2345. struct PhysicalValueType_ISO15118_2018 Power[3];
  2346. };
  2347. struct EVPowerProfileType
  2348. {
  2349. struct PowerScheduleEntryType EVPowerProfileEntry[2048];
  2350. };
  2351. struct Scheduled_PDReqControlModeType
  2352. {
  2353. unsigned char ScheduleTupleID;
  2354. struct EVPowerProfileType EVPowerProfile;
  2355. };
  2356. struct BPT_Scheduled_PDReqControlModeType
  2357. {
  2358. unsigned char ScheduleTupleID;
  2359. struct EVPowerProfileType EVPowerProfile; //Optional
  2360. enum evOperationType EVOperation;
  2361. };
  2362. struct ListOfRootCertificateIDsType
  2363. {
  2364. unsigned char RootCertificateID[20][40];
  2365. };
  2366. struct ContractSignatureEncryptedPrivateKeyType
  2367. {
  2368. unsigned char Id[32];
  2369. };
  2370. struct DiffieHellmanPublickeyType
  2371. {
  2372. unsigned char Id[32];
  2373. };
  2374. struct ContractCertificateEncryptedPrivateKeyType
  2375. {
  2376. unsigned char Id[32];
  2377. };
  2378. struct EVTechnicalStatusType
  2379. {
  2380. BOOL EV_Status_ReadyToCharge;
  2381. BOOL EV_Status_ImmobilizationRequest; //Optional
  2382. BOOL EV_Status_Immobilized;
  2383. struct PhysicalValueType_ISO15118_2018 EV_Status_WLAN_Strength;
  2384. enum EV_CP_StatusType EV_CP_Status;
  2385. unsigned char EV_Status_RESSSOC; //0~100%
  2386. enum EV_Error_Status_CodeType EV_Error_Status_Code;
  2387. BOOL EVSE_Timeout;
  2388. };
  2389. struct MeterInfoType_ISO15118_2014
  2390. {
  2391. unsigned char MeterID[32];
  2392. unsigned long MeterReading; //Optional
  2393. unsigned char SigMeterReading[64]; //Optional
  2394. short MeterStatus; //Optional
  2395. short TMeter; //Optional
  2396. };
  2397. struct Scheduled_MRReqControlModeType
  2398. {
  2399. unsigned char ScheduleTupleID;
  2400. };
  2401. struct MeterInfoType_ISO15118_2018
  2402. {
  2403. unsigned char MeterID[32];
  2404. unsigned long MeterReadingWhCharged; //Optional
  2405. unsigned long MeterReadingWhDischarged; //Optional
  2406. unsigned long MeterReadingVARhLeading; //Optional
  2407. unsigned long MeterReadingVARhLagging; //Optional
  2408. unsigned char SignatureMeterReading[64]; //Optional
  2409. short MeterStatus; //Optional
  2410. short TimeStampMeter; //Optional
  2411. BOOL ReceiptRequired; //Optional
  2412. };
  2413. struct PnC_CLReqIdentificationModeType
  2414. {
  2415. BOOL MeteringReceiptRequested;
  2416. };
  2417. struct Dynamic_CSReqControlModeType
  2418. {
  2419. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
  2420. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
  2421. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
  2422. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
  2423. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
  2424. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
  2425. };
  2426. struct Scheduled_CSReqControlModeType
  2427. {
  2428. struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest; //Optional
  2429. struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest; //Optional
  2430. struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest; //Optional
  2431. BOOL Standby;
  2432. struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower; //Optional
  2433. struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent; //Optional
  2434. struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent; //Optional
  2435. };
  2436. struct DisplayParametersType
  2437. {
  2438. unsigned short CurrentRange;
  2439. unsigned char CurrentSOC; //0~100%
  2440. unsigned char MinimumSOC; //0~100%
  2441. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMaximumSOC;
  2442. struct PhysicalValueType_ISO15118_2018 RemainingTimeToTargetSOC;
  2443. struct PhysicalValueType_ISO15118_2018 RemainingTimeToBulkSOC;
  2444. struct PhysicalValueType_ISO15118_2018 RemainingTimeToMinimumSOC;
  2445. BOOL ChargingComplete;
  2446. BOOL BulkChargingComplete;
  2447. BOOL InletHot;
  2448. };
  2449. struct PnC_CLResIdentificationModeType
  2450. {
  2451. struct MeterInfoType_ISO15118_2018 MeterInfo;
  2452. };
  2453. struct Dynamic_CSResControlModeType
  2454. {
  2455. struct PhysicalValueType_ISO15118_2018 EVSETargetActivePower;
  2456. };
  2457. struct Scheduled_CDResControlModeType
  2458. {
  2459. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  2460. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  2461. struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage; //Optional
  2462. };
  2463. struct LFA_EVFinePositioningSetupParametersType
  2464. {
  2465. unsigned char NumberOfSensors;
  2466. //NOT complete yet, to be continue.....
  2467. };
  2468. /****SupportedAppProtocolRequest****/
  2469. struct SupportedAppProtocolRequest_DIN70121
  2470. {
  2471. struct AppProtocolType AppProtocol[20];
  2472. };
  2473. struct SupportedAppProtocolRequest_ISO15118_2014
  2474. {
  2475. struct AppProtocolType AppProtocol[20];
  2476. };
  2477. struct SupportedAppProtocolRequest_ISO15118_2018
  2478. {
  2479. struct AppProtocolType AppProtocol[20];
  2480. };
  2481. /****SupportedAppProtocolResponse****/
  2482. struct SupportedAppProtocolResponse_DIN70121
  2483. {
  2484. enum ResponseCodeType_DIN70121 ResponseCode;
  2485. unsigned char SchemaID; //Optional
  2486. };
  2487. struct SupportedAppProtocolResponse_ISO15118_2014
  2488. {
  2489. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2490. unsigned char SchemaID; //Optional
  2491. };
  2492. struct SupportedAppProtocolResponse_ISO15118_2018
  2493. {
  2494. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2495. unsigned char SchemaID; //Optional
  2496. };
  2497. /****SessionSetupRequest****/
  2498. struct SessionSetupRequest_DIN70121
  2499. {
  2500. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2501. };
  2502. struct SessionSetupRequest_ISO15118_2014
  2503. {
  2504. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2505. };
  2506. struct SessionSetupRequest_ISO15118_2018
  2507. {
  2508. unsigned char EVCCID[8]; //the MAC address of the EVCC in Hex
  2509. struct ACD_SSEnergyTransferModeType ACD_SSEnergyTransferMode; //For ACD mandatory, optional for rest
  2510. };
  2511. /****SessionSetupResponse****/
  2512. struct SessionSetupResponse_DIN70121
  2513. {
  2514. enum ResponseCodeType_DIN70121 ResponseCode;
  2515. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2516. unsigned int EVSETimeStamp; //EPOCH format, Optional
  2517. };
  2518. struct SessionSetupResponse_ISO15118_2014
  2519. {
  2520. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2521. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2522. unsigned int EVSETimeStamp; //EPOCH format, Optional
  2523. };
  2524. struct SessionSetupResponse_ISO15118_2018
  2525. {
  2526. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2527. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2528. struct EVSEStatusType EVSEStatus; //Optional
  2529. };
  2530. /****ServiceDiscoveryRequest****/
  2531. struct ServiceDiscoveryRequest_DIN70121
  2532. {
  2533. unsigned char ServiceScope[32]; //Optional
  2534. enum ServiceCategoryType ServiceCategory; //Optional
  2535. };
  2536. struct ServiceDiscoveryRequest_ISO15118_2014
  2537. {
  2538. unsigned char ServiceScope[32]; //Optional
  2539. enum ServiceCategoryType ServiceCategory; //Optional
  2540. };
  2541. struct ServiceDiscoveryRequest_ISO15118_2018
  2542. {
  2543. struct ServiceIDListType SupportedServiceIDs; //Optional
  2544. };
  2545. /****ServiceDiscoveryResponse****/
  2546. struct ServiceDiscoveryResponse_DIN70121
  2547. {
  2548. enum ResponseCodeType_DIN70121 ResponseCode;
  2549. struct PaymentOptionListType PaymentOptions;
  2550. struct ServiceChargeType ChargeService_DIN70121;
  2551. };
  2552. struct ServiceDiscoveryResponse_ISO15118_2014
  2553. {
  2554. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2555. struct PaymentOptionListType PaymentOptions;
  2556. struct ChargeServiceType ChargeService;
  2557. struct ServiceListType ServiceList; //Optional
  2558. };
  2559. struct ServiceDiscoveryResponse_ISO15118_2018
  2560. {
  2561. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2562. struct EVSEStatusType EVSEStatus; //Optional
  2563. struct IdentificationOptionListType IdentificationOptionList;
  2564. struct ServiceListType EnergyTransferServiceList;
  2565. struct ServiceListType VASList; //Optional
  2566. };
  2567. /****ServiceDetailRequest****/
  2568. //Only in ISO15118_2014 and ISO15118_2018
  2569. struct ServiceDetailRequest_ISO15118_2014
  2570. {
  2571. unsigned short ServiceID;
  2572. };
  2573. struct ServiceDetailRequest_ISO15118_2018
  2574. {
  2575. unsigned short ServiceID;
  2576. struct WPT_SDlEnergyTransferModeType WPT_SDlEnergyTransferMode;
  2577. };
  2578. /****ServiceDetailResponse****/
  2579. struct ServiceDetailResponse_ISO15118_2014
  2580. {
  2581. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2582. unsigned short ServiceID;
  2583. struct ServiceParameterListType ServiceParameterList;
  2584. };
  2585. struct ServiceDetailResponse_ISO15118_2018
  2586. {
  2587. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2588. unsigned short ServiceID;
  2589. struct ServiceParameterListType ServiceParameterList;
  2590. struct EVSEStatusType EVSEStatus; //Optional
  2591. };
  2592. /****ServiceAndPaymentSelectionRequest / ServiceSelectionRequest****/
  2593. struct ServiceAndPaymentSelectionRequest_DIN70121
  2594. {
  2595. enum PaymentOptionType SelectedPaymentOption;
  2596. struct SelectedServiceListType SelectedServiceList;
  2597. };
  2598. struct ServiceAndPaymentSelectionRequest_ISO15118_2014
  2599. {
  2600. enum PaymentOptionType SelectedPaymentOption;
  2601. struct SelectedServiceListType SelectedServiceList;
  2602. };
  2603. struct ServiceSelectionRequest_ISO15118_2018
  2604. {
  2605. enum PaymentOptionType SelectedPaymentOption;
  2606. struct SelectedServiceType SelectedEnergyTransferService;
  2607. struct SelectedServiceListType SelectedVASList;
  2608. enum ProcessingType EVProcessing;
  2609. };
  2610. /****ServiceAndPaymentSelectionResponse / ServiceSelectionResponse****/
  2611. struct ServiceAndPaymentSelectionResponse_DIN70121
  2612. {
  2613. enum ResponseCodeType_DIN70121 ResponseCode;
  2614. };
  2615. struct ServiceAndPaymentSelectionResponse_ISO15118_2014
  2616. {
  2617. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2618. };
  2619. struct ServiceSelectionResponse_ISO15118_2018
  2620. {
  2621. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2622. struct EVSEStatusType EVSEStatus; //Optional
  2623. };
  2624. /****PaymentDetailsRequest / IdentificationDetailsRequest****/
  2625. struct PaymentDetailsRequest_ISO15118_2014
  2626. {
  2627. unsigned char eMAID[16];
  2628. struct CertificateChainType ContractSignatureCertChain;
  2629. };
  2630. struct IdentificationDetailsRequest_ISO15118_2018
  2631. {
  2632. struct CertificateChainType ContractSignatureCertChain;
  2633. };
  2634. /****PaymentDetailsResponse / IdentificationDetailsResponse ****/
  2635. struct PaymentDetailsResponse_ISO15118_2014
  2636. {
  2637. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2638. unsigned char GenChallenge[16];
  2639. long EVSETimeStamp;
  2640. };
  2641. struct IdentificationDetailsResponse_ISO15118_2018
  2642. {
  2643. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2644. struct EVSEStatusType EVSEStatus; //Optional
  2645. unsigned char GenChallenge[16];
  2646. enum ProcessingType EVSEProcessing;
  2647. };
  2648. /****ContractAuthenticationRequest / AuthorizationRequest****/
  2649. struct ContractAuthenticationRequest_DIN70121
  2650. {
  2651. //None
  2652. };
  2653. struct AuthorizationRequest_ISO15118_2014
  2654. {
  2655. unsigned char GenChallenge[16]; //Optional
  2656. unsigned char Id[32]; //Optional
  2657. };
  2658. struct AuthorizationRequest_ISO15118_2018
  2659. {
  2660. struct PNC_AReqIdentificationModeType PNC_AReqIdentificationMode; //Optional
  2661. };
  2662. /****ContractAuthenticationResponse / AuthorizationResponse****/
  2663. struct ContractAuthenticationResponse_DIN70121
  2664. {
  2665. enum ResponseCodeType_DIN70121 ResponseCode;
  2666. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  2667. };
  2668. struct AuthorizationResponse_ISO15118_2014
  2669. {
  2670. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2671. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  2672. };
  2673. struct AuthorizationResponse_ISO15118_2018
  2674. {
  2675. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2676. enum ProcessingType EVSEProcessing;
  2677. struct EVSEStatusType EVSEStatus; //Optional
  2678. };
  2679. /****ChargeParameterDiscoveryRequest****/
  2680. struct ChargeParameterDiscoveryRequest_DIN70121
  2681. {
  2682. enum EnergyTransferModeType EVRequestedEnergyTransferType;
  2683. struct DC_EVChargeParameterType_DIN70121 DC_EVChargeParameter;
  2684. };
  2685. struct ChargeParameterDiscoveryRequest_ISO15118_2014
  2686. {
  2687. unsigned short MaxEntriesSAScheduleTuple; //Optional
  2688. enum EnergyTransferModeType RequestedEnergyTransferMode;
  2689. struct AC_EVChargeParameterType AC_EVChargeParameter;
  2690. struct DC_EVChargeParameterType_ISO15118_2014 DC_EVChargeParameter;
  2691. };
  2692. struct ChargeParameterDiscoveryRequest_ISO15118_2018
  2693. {
  2694. struct Dynamic_CPDReqControlModeType Dynamic_CPDReqControlMode;
  2695. struct Scheduled_CPDReqControlModeType Scheduled_CPDReqControlMode;
  2696. struct AC_CPDReqEnergyTransferModeType AC_CPDReqEnergyTransferMode;
  2697. struct DC_CPDReqEnergyTransferModeType DC_CPDReqEnergyTransferMode;
  2698. struct BPT_AC_CPDReqEnergyTransferModeType BPT_AC_CPDReqEnergyTransferMode;
  2699. struct BPT_DC_CPDReqEnergyTransferModeType BPT_DC_CPDReqEnergyTransferMode;
  2700. struct WPT_CPDReqEnergyTransferModeType WPT_CPDReqEnergyTransferMode;
  2701. struct ACD_CPDReqEnergyTransferModeType ACD_CPDReqEnergyTransferMode;
  2702. };
  2703. /****ChargeParameterDiscoveryResponse****/
  2704. struct ChargeParameterDiscoveryResponse_DIN70121
  2705. {
  2706. enum ResponseCodeType_DIN70121 ResponseCode;
  2707. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  2708. struct SAScheduleListType SAScheduleList;
  2709. struct DC_EVSEChargeParameterType_DIN70121 DC_EVSEChargeParameter;
  2710. };
  2711. struct ChargeParameterDiscoveryResponse_ISO15118_2014
  2712. {
  2713. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  2714. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2715. struct SAScheduleListType SAScheduleList;
  2716. struct AC_EVSEChargeParameterType AC_EVSEChargeParameter;
  2717. struct DC_EVSEChargeParameterType_ISO15118_2014 DC_EVSEChargeParameter;
  2718. };
  2719. struct ChargeParameterDiscoveryResponse_ISO15118_2018
  2720. {
  2721. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2722. struct EVSEStatusType EVSEStatus; //Optional
  2723. enum ProcessingType EVSEProcessing;
  2724. struct Scheduled_CPDResControlModeType Scheduled_CPDResControlMode; //Optional
  2725. struct AC_CPDResEnergyTransferModeType AC_CPDResEnergyTransferMode;
  2726. struct DC_CPDResEnergyTransferModeType DC_CPDResEnergyTransferMode;
  2727. struct BPT_AC_CPDResEnergyTransferModeType BPT_AC_CPDResEnergyTransferMode;
  2728. struct BPT_DC_CPDResEnergyTransferModeType BPT_DC_CPDResEnergyTransferMode;
  2729. struct WPT_CPDResEnergyTransferModeType WPT_CPDResEnergyTransferMode;
  2730. struct ACD_CPDResEnergyTransferModeType ACD_CPDResEnergyTransferMode;
  2731. };
  2732. /****PowerDeliveryRequest****/
  2733. struct PowerDeliveryRequest_DIN70121
  2734. {
  2735. BOOL ReadyToChargeState;
  2736. struct ChargingProfileType_DIN70121 ChargingProfile;
  2737. struct DC_EVPowerDeliveryParameterType_DIN70121 DC_EVPowerDeliveryParameter;
  2738. };
  2739. struct PowerDeliveryRequest_ISO15118_2014
  2740. {
  2741. enum ChargeProgressType_ISO15118_2014 ChargeProgress;
  2742. short SAScheduleTupleID;
  2743. struct ChargingProfileType_ISO15118_2014 ChargingProfile;
  2744. struct DC_EVPowerDeliveryParameterType_ISO15118_2014 DC_EVPowerDeliveryParameter;
  2745. };
  2746. struct PowerDeliveryRequest_ISO15118_2018
  2747. {
  2748. enum ChargeProgressType_ISO15118_2018 ChargeProgress;
  2749. struct Scheduled_PDReqControlModeType Scheduled_PDReqControlMode;
  2750. struct BPT_Scheduled_PDReqControlModeType BPT_Scheduled_PDReqControlMode;
  2751. };
  2752. /****PowerDeliveryResponse****/
  2753. struct PowerDeliveryResponse_DIN70121
  2754. {
  2755. enum ResponseCodeType_DIN70121 ResponseCode;
  2756. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2757. };
  2758. struct PowerDeliveryResponse_ISO15118_2014
  2759. {
  2760. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2761. struct AC_EVSEStatusType AC_EVSEStatus;
  2762. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2763. };
  2764. struct PowerDeliveryResponse_ISO15118_2018
  2765. {
  2766. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2767. struct EVSEStatusType EVSEStatus; //Optional
  2768. };
  2769. /****CertificateUpdateRequest****/
  2770. struct CertificateUpdateRequest_ISO15118_2014
  2771. {
  2772. unsigned char Id[32];
  2773. struct CertificateChainType ContractSignatureCertChain;
  2774. unsigned char eMAID[16];
  2775. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  2776. };
  2777. /****CertificateUpdateResponse****/
  2778. struct CertificateUpdateResponse_ISO15118_2014
  2779. {
  2780. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2781. struct CertificateChainType SAProvisioningCertificateChain;
  2782. struct CertificateChainType ContractSignatureCertChain;
  2783. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  2784. struct DiffieHellmanPublickeyType DHpublickey;
  2785. unsigned char eMAID[16];
  2786. short RetryCounter; //Optional
  2787. };
  2788. /****CertificateInstallationRequest****/
  2789. struct CertificateInstallationRequest_ISO15118_2014
  2790. {
  2791. unsigned char Id[32];
  2792. unsigned char OEMProvisioningCert[800];
  2793. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  2794. };
  2795. struct CertificateInstallationRequest_ISO15118_2018
  2796. {
  2797. unsigned char Id[32];
  2798. struct CertificateChainType OEMProvisioningCertChain;
  2799. struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
  2800. unsigned short MaxSupportedCerts;
  2801. };
  2802. /****CertificateInstallationResponse****/
  2803. struct CertificateInstallationResponse_ISO15118_2014
  2804. {
  2805. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2806. struct CertificateChainType SAProvisioningCertificateChain;
  2807. struct CertificateChainType ContractSignatureCertChain;
  2808. struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
  2809. struct DiffieHellmanPublickeyType DHpublickey;
  2810. unsigned char eMAID[16];
  2811. };
  2812. struct CertificateInstallationResponse_ISO15118_2018
  2813. {
  2814. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2815. struct EVSEStatusType EVSEStatus; //Optional
  2816. struct CertificateChainType SAProvisioningCertificateChain;
  2817. struct CertificateChainType ContractCertificateChain;
  2818. struct ContractCertificateEncryptedPrivateKeyType ContractEncryptedPrivateKey;
  2819. struct DiffieHellmanPublickeyType DHpublickey;
  2820. enum ProcessingType EVSEProcessing;
  2821. unsigned short RemainingContractCertificateChains;
  2822. };
  2823. /****SystemStatusRequest****/
  2824. struct SystemStatusRequest_ISO15118_2018
  2825. {
  2826. enum mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus;
  2827. struct EVTechnicalStatusType EVTechnicalStatus;
  2828. unsigned char EV_OEMStatus[800]; //Optional
  2829. };
  2830. /****SystemStatusResponse****/
  2831. struct SystemStatusResponse_ISO15118_2018
  2832. {
  2833. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2834. enum mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus;
  2835. BOOL EVSE_ReadyToCharge;
  2836. enum IsolationStatusType EVSE_IsolationStatus;
  2837. BOOL EVSE_Disabled;
  2838. BOOL EVSE_UtilityInterruptEvent;
  2839. BOOL EVSE_EmergencyShutdown;
  2840. BOOL EVSE_Malfunction;
  2841. BOOL EV_InChargePosition;
  2842. BOOL EV_AssociationStatus;
  2843. };
  2844. /****SessionStopRequest****/
  2845. struct SessionStopRequest_DIN70121
  2846. {
  2847. //No member in standard
  2848. };
  2849. struct SessionStopRequest_ISO15118_2014
  2850. {
  2851. enum ChargingSessionType ChargingSession;
  2852. };
  2853. struct SessionStopRequest_ISO15118_2018
  2854. {
  2855. enum ChargingSessionType ChargingSession;
  2856. };
  2857. /****SessionStopResponse****/
  2858. struct SessionStopResponse_DIN70121
  2859. {
  2860. enum ResponseCodeType_DIN70121 ResponseCode;
  2861. };
  2862. struct SessionStopResponse_ISO15118_2014
  2863. {
  2864. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2865. };
  2866. struct SessionStopResponse_ISO15118_2018
  2867. {
  2868. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2869. struct EVSEStatusType EVSEStatus; //Optional
  2870. };
  2871. /****MeteringReceiptRequest****/
  2872. struct MeteringReceiptRequest_ISO15118_2014
  2873. {
  2874. unsigned char Id[32]; //Optional
  2875. unsigned char SessionID[8];
  2876. short SAScheduleTupleID; //Optional
  2877. struct MeterInfoType_ISO15118_2014 MeterInfo;
  2878. };
  2879. struct MeteringReceiptRequest_ISO15118_2018
  2880. {
  2881. unsigned char Id[32]; //Optional
  2882. unsigned char SessionID[8];
  2883. struct Scheduled_MRReqControlModeType Schedule_MRReqControlMode;
  2884. struct MeterInfoType_ISO15118_2018 MeterInfo;
  2885. };
  2886. /****MeteringReceiptResponse****/
  2887. struct MeteringReceiptResponse_ISO15118_2014
  2888. {
  2889. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2890. struct AC_EVSEStatusType AC_EVSEStatus;
  2891. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2892. };
  2893. struct MeteringReceiptResponse_ISO15118_2018
  2894. {
  2895. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2896. struct EVSEStatusType EVSEStatus; //Optional
  2897. };
  2898. /****ChargingStatusRequest (AC Only)****/
  2899. struct ChargingStatusRequest_ISO15118_2014
  2900. {
  2901. //No member in standard
  2902. };
  2903. struct ChargingStatusRequest_ISO15118_2018
  2904. {
  2905. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  2906. struct Dynamic_CSReqControlModeType Dynamic_CSReqControlMode;
  2907. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  2908. struct DisplayParametersType DisplayParameters;
  2909. };
  2910. /****ChargingStatusResponse (AC Only)****/
  2911. struct ChargingStatusResponse_ISO15118_2014
  2912. {
  2913. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2914. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2915. short SAScheduleTupleID;
  2916. struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent; //Optional
  2917. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  2918. BOOL ReceiptRequired; //Optional
  2919. struct AC_EVSEStatusType AC_EVSEStatus;
  2920. };
  2921. struct ChargingStatusResponse_ISO15118_2018
  2922. {
  2923. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2924. struct EVSEStatusType EVSEStatus; //Optional
  2925. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  2926. struct PhysicalValueType_ISO15118_2018 EVSETargetFrequency; //Optional
  2927. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  2928. struct Dynamic_CSResControlModeType Dynamic_CSResControlMode;
  2929. struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
  2930. };
  2931. /****CableCheckRequest (DC Only)****/
  2932. struct CableCheckRequest_DIN70121
  2933. {
  2934. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2935. };
  2936. struct CableCheckRequest_ISO15118_2014
  2937. {
  2938. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2939. };
  2940. struct CableCheckRequest_ISO15118_2018
  2941. {
  2942. //No member in standard
  2943. };
  2944. /****CableCheckResponse (DC Only)****/
  2945. struct CableCheckResponse_DIN70121
  2946. {
  2947. enum ResponseCodeType_DIN70121 ResponseCode;
  2948. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2949. enum EVSEProcessingType_DIN70121 EVSEProcessing;
  2950. };
  2951. struct CableCheckResponse_ISO15118_2014
  2952. {
  2953. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2954. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2955. enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
  2956. };
  2957. struct CableCheckResponse_ISO15118_2018
  2958. {
  2959. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2960. struct EVSEStatusType EVSEStatus; //Optional
  2961. enum ProcessingType EVSEProcessing;
  2962. };
  2963. /****PreChargeRequest (DC Only)****/
  2964. struct PreChargeRequest_DIN70121
  2965. {
  2966. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  2967. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  2968. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  2969. };
  2970. struct PreChargeRequest_ISO15118_2014
  2971. {
  2972. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  2973. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  2974. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  2975. };
  2976. struct PreChargeRequest_ISO15118_2018
  2977. {
  2978. struct PhysicalValueType_ISO15118_2018 EVTargetVoltage;
  2979. struct PhysicalValueType_ISO15118_2018 EVTargetCurrent;
  2980. };
  2981. /****PreChargeResponse (DC Only)****/
  2982. struct PreChargeResponse_DIN70121
  2983. {
  2984. enum ResponseCodeType_DIN70121 ResponseCode;
  2985. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  2986. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  2987. };
  2988. struct PreChargeResponse_ISO15118_2014
  2989. {
  2990. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  2991. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  2992. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  2993. };
  2994. struct PreChargeResponse_ISO15118_2018
  2995. {
  2996. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  2997. struct EVSEStatusType EVSEStatus; //Optional
  2998. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  2999. };
  3000. /****CurrentDemandRequest (DC Only)****/
  3001. struct CurrentDemandRequest_DIN70121
  3002. {
  3003. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  3004. struct PhysicalValueType_DIN70121 EVTargetCurrent;
  3005. struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit; //Optional
  3006. struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit; //Optional
  3007. struct PhysicalValueType_DIN70121 EVMaximumPowerLimit; //Optional
  3008. BOOL BulkChargingComplete; //Optional
  3009. BOOL ChargingComplete;
  3010. struct PhysicalValueType_DIN70121 RemainingTimeToFullSoC; //Optional
  3011. struct PhysicalValueType_DIN70121 RemainingTimeToBulkSoC; //Optional
  3012. struct PhysicalValueType_DIN70121 EVTargetVoltage;
  3013. };
  3014. struct CurrentDemandRequest_ISO15118_2014
  3015. {
  3016. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  3017. struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
  3018. struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit; //Optional
  3019. struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit; //Optional
  3020. struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit; //Optional
  3021. BOOL BulkChargingComplete; //Optional
  3022. BOOL ChargingComplete;
  3023. struct PhysicalValueType_ISO15118_2014 RemainingTimeToFullSoC; //Optional
  3024. struct PhysicalValueType_ISO15118_2014 RemainingTimeToBulkSoC; //Optional
  3025. struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
  3026. };
  3027. struct CurrentDemandRequest_ISO15118_2018
  3028. {
  3029. struct DisplayParametersType DisplayParameters; //Optional
  3030. struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
  3031. struct Dynamic_CSReqControlModeType Dynamic_CDReqControlMode;
  3032. struct Scheduled_CSReqControlModeType Scheduled_CDReqControlMode;
  3033. };
  3034. /****CurrentDemandResponse (DC Only)****/
  3035. struct CurrentDemandResponse_DIN70121
  3036. {
  3037. enum ResponseCodeType_DIN70121 ResponseCode;
  3038. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3039. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  3040. struct PhysicalValueType_DIN70121 EVSEPresentCurrent;
  3041. BOOL EVSECurrentLimitAchieved;
  3042. BOOL EVSEVoltageLimitAchieved;
  3043. BOOL EVSEPowerLimitAchieved;
  3044. struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit; //Optional
  3045. struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit; //Optional
  3046. struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit; //Optional
  3047. };
  3048. struct CurrentDemandResponse_ISO15118_2014
  3049. {
  3050. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3051. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3052. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  3053. struct PhysicalValueType_ISO15118_2014 EVSEPresentCurrent;
  3054. BOOL EVSECurrentLimitAchieved;
  3055. BOOL EVSEVoltageLimitAchieved;
  3056. BOOL EVSEPowerLimitAchieved;
  3057. struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit; //Optional
  3058. struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit; //Optional
  3059. struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit; //Optional
  3060. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3061. short SAScheduleTupleID;
  3062. struct MeterInfoType_ISO15118_2014 MeterInfo; //Optional
  3063. BOOL ReceiptRequired; //Optional
  3064. };
  3065. struct CurrentDemandResponse_ISO15118_2018
  3066. {
  3067. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3068. struct EVSEStatusType EVSEStatus; //Optional
  3069. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  3070. struct PhysicalValueType_ISO15118_2018 EVSEPresentCurrent;
  3071. BOOL EVSECurrentLimitAchieved;
  3072. BOOL EVSEVoltageLimitAchieved;
  3073. BOOL EVSEPowerLimitAchieved;
  3074. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeVoltage; //Optional
  3075. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent; //Optional
  3076. struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower; //Optional
  3077. unsigned char EVSEID[40]; //DIN70121=>Max length:32, ISO15118=>min length:7, max length:37
  3078. struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
  3079. struct Scheduled_CDResControlModeType Scheduled_CDResControlMode;
  3080. };
  3081. /****WeldingDetectionRequest (DC Only)*****/
  3082. struct WeldingDetectionRequest_DIN70121
  3083. {
  3084. struct DC_EVStatusType_DIN70121 DC_EVStatus;
  3085. };
  3086. struct WeldingDetectionRequest_ISO15118_2014
  3087. {
  3088. struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
  3089. };
  3090. struct WeldingDetectionRequest_ISO15118_2018
  3091. {
  3092. //No member in Standard
  3093. };
  3094. /****WeldingDetectionResponse (DC Only)****/
  3095. struct WeldingDetectionResponse_DIN70121
  3096. {
  3097. enum ResponseCodeType_DIN70121 ResponseCode;
  3098. struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
  3099. struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
  3100. };
  3101. struct WeldingDetectionResponse_ISO15118_2014
  3102. {
  3103. enum ResponseCodeType_ISO15118_2014 ResponseCode;
  3104. struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
  3105. struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
  3106. };
  3107. struct WeldingDetectionResponse_ISO15118_2018
  3108. {
  3109. enum ResponseCodeType_ISO15118_2018 ResponseCode;
  3110. struct EVSEStatusType EVSEStatus; //Optional
  3111. struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
  3112. };
  3113. /****FinePositioningSetupRequest (WPT Only)****/
  3114. struct FinePositioningSetupRequest_ISO15118_2018
  3115. {
  3116. struct LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters; //Optional
  3117. };
  3118. /****FinePositioningSetupResponse (WPT Only)****/
  3119. struct FinePositioningSetupResponse_ISO15118_2018
  3120. {
  3121. //NOT complete yet, to be continue.....
  3122. };
  3123. struct V2GMessageType_DIN70121
  3124. {
  3125. unsigned char SelfTest_Comp;
  3126. unsigned char version[16];
  3127. unsigned char PresentMsgFlowStatus;
  3128. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  3129. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  3130. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  3131. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  3132. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  3133. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  3134. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  3135. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  3136. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  3137. 28: AuthorizationRequest, 29: AuthorizationResponse,
  3138. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  3139. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  3140. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  3141. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  3142. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  3143. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  3144. 52: SessionStopRequest, 53: SessionStopResponse
  3145. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  3146. */
  3147. struct SupportedAppProtocolRequest_DIN70121 SupportedAppProtocolRequest;
  3148. struct SupportedAppProtocolResponse_DIN70121 SupportedAppProtocolResponse;
  3149. struct SessionSetupRequest_DIN70121 SessionSetupRequest;
  3150. struct SessionSetupResponse_DIN70121 SessionSetupResponse;
  3151. struct ServiceDiscoveryRequest_DIN70121 ServiceDiscoveryRequest;
  3152. struct ServiceDiscoveryResponse_DIN70121 ServiceDiscoveryResponse;
  3153. struct ServiceAndPaymentSelectionRequest_DIN70121 ServiceAndPaymentSelectionRequest;
  3154. struct ServiceAndPaymentSelectionResponse_DIN70121 ServiceAndPaymentSelectionResponse;
  3155. struct ContractAuthenticationRequest_DIN70121 ContractAuthenticationRequest;
  3156. struct ContractAuthenticationResponse_DIN70121 ContractAuthenticationResponse;
  3157. struct ChargeParameterDiscoveryRequest_DIN70121 ChargeParameterDiscoveryRequest;
  3158. struct ChargeParameterDiscoveryResponse_DIN70121 ChargeParameterDiscoveryResponse;
  3159. struct CableCheckRequest_DIN70121 CableCheckRequest;
  3160. struct CableCheckResponse_DIN70121 CableCheckResponse;
  3161. struct PreChargeRequest_DIN70121 PreChargeRequest;
  3162. struct PreChargeResponse_DIN70121 PreChargeResponse;
  3163. struct PowerDeliveryRequest_DIN70121 PowerDeliveryRequest;
  3164. struct PowerDeliveryResponse_DIN70121 PowerDeliveryResponse;
  3165. struct CurrentDemandRequest_DIN70121 CurrentDemandRequest;
  3166. struct CurrentDemandResponse_DIN70121 CurrentDemandResponse;
  3167. struct WeldingDetectionRequest_DIN70121 WeldingDetectionRequest;
  3168. struct WeldingDetectionResponse_DIN70121 WeldingDetectionResponse;
  3169. struct SessionStopRequest_DIN70121 SessionStopRequest;
  3170. struct SessionStopResponse_DIN70121 SessionStopResponse;
  3171. };
  3172. struct V2GMessageType_ISO15118_2014
  3173. {
  3174. unsigned char PresentMsgFlowStatus;
  3175. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  3176. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  3177. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  3178. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  3179. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  3180. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  3181. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  3182. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  3183. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  3184. 28: AuthorizationRequest, 29: AuthorizationResponse,
  3185. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  3186. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  3187. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  3188. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  3189. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  3190. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  3191. 52: SessionStopRequest, 53: SessionStopResponse
  3192. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  3193. */
  3194. struct SupportedAppProtocolRequest_ISO15118_2014 SupportedAppProtocolRequest;
  3195. struct SupportedAppProtocolResponse_ISO15118_2014 SupportedAppProtocolResponse;
  3196. struct SessionSetupRequest_ISO15118_2014 SessionSetupRequest;
  3197. struct SessionSetupResponse_ISO15118_2014 SessionSetupResponse;
  3198. struct ServiceDiscoveryRequest_ISO15118_2014 ServiceDiscoveryRequest;
  3199. struct ServiceDiscoveryResponse_ISO15118_2014 ServiceDiscoveryResponse;
  3200. struct ServiceDetailRequest_ISO15118_2014 ServiceDetailRequest;
  3201. struct ServiceDetailResponse_ISO15118_2014 ServiceDetailResponse;
  3202. struct ServiceAndPaymentSelectionRequest_ISO15118_2014 ServiceAndPaymentSelectionRequest;
  3203. struct ServiceAndPaymentSelectionResponse_ISO15118_2014 ServiceAndPaymentSelectionResponse;
  3204. struct PaymentDetailsRequest_ISO15118_2014 PaymentDetailsRequest;
  3205. struct PaymentDetailsResponse_ISO15118_2014 PaymentDetailsResponse;
  3206. struct AuthorizationRequest_ISO15118_2014 AuthorizationRequest;
  3207. struct AuthorizationResponse_ISO15118_2014 AuthorizationResponse;
  3208. struct CertificateUpdateRequest_ISO15118_2014 CertificateUpdateRequest;
  3209. struct CertificateUpdateResponse_ISO15118_2014 CertificateUpdateResponse;
  3210. struct CertificateInstallationRequest_ISO15118_2014 CertificateInstallationRequest;
  3211. struct CertificateInstallationResponse_ISO15118_2014 CertificateInstallationResponse;
  3212. struct ChargeParameterDiscoveryRequest_ISO15118_2014 ChargeParameterDiscoveryRequest;
  3213. struct ChargeParameterDiscoveryResponse_ISO15118_2014 ChargeParameterDiscoveryResponse;
  3214. struct CableCheckRequest_ISO15118_2014 CableCheckRequest;
  3215. struct CableCheckResponse_ISO15118_2014 CableCheckResponse;
  3216. struct PreChargeRequest_ISO15118_2014 PreChargeRequest;
  3217. struct PreChargeResponse_ISO15118_2014 PreChargeResponse;
  3218. struct PowerDeliveryRequest_ISO15118_2014 PowerDeliveryRequest;
  3219. struct PowerDeliveryResponse_ISO15118_2014 PowerDeliveryResponse;
  3220. struct ChargingStatusRequest_ISO15118_2014 ChargingStatusRequest;
  3221. struct ChargingStatusResponse_ISO15118_2014 ChargingStatusResponse;
  3222. struct CurrentDemandRequest_ISO15118_2014 CurrentDemandRequest;
  3223. struct CurrentDemandResponse_ISO15118_2014 CurrentDemandResponse;
  3224. struct MeteringReceiptRequest_ISO15118_2014 MeteringReceiptRequest;
  3225. struct MeteringReceiptResponse_ISO15118_2014 MeteringReceiptResponse;
  3226. struct WeldingDetectionRequest_ISO15118_2014 WeldingDetectionRequest;
  3227. struct WeldingDetectionResponse_ISO15118_2014 WeldingDetectionResponse;
  3228. struct SessionStopRequest_ISO15118_2014 SessionStopRequest;
  3229. struct SessionStopResponse_ISO15118_2014 SessionStopResponse;
  3230. };
  3231. struct V2GMessageType_ISO15118_2018
  3232. {
  3233. unsigned char PresentMsgFlowStatus;
  3234. /* 0: Idle(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
  3235. 4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
  3236. 8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
  3237. 12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
  3238. 16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
  3239. 19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
  3240. 22: ServiceDetailRequest, 23: ServiceDetailResponse
  3241. 24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
  3242. 26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
  3243. 28: AuthorizationRequest, 29: AuthorizationResponse,
  3244. 30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
  3245. 34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
  3246. 36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
  3247. 40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
  3248. 44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
  3249. 48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
  3250. 52: SessionStopRequest, 53: SessionStopResponse
  3251. 253: Performance Timeout, 254: Sequence Timeout, 255: Fault
  3252. */
  3253. struct SupportedAppProtocolRequest_ISO15118_2018 SupportedAppProtocolRequest;
  3254. struct SupportedAppProtocolResponse_ISO15118_2018 SupportedAppProtocolResponse;
  3255. struct SessionSetupRequest_ISO15118_2018 SessionSetupRequest;
  3256. struct SessionSetupResponse_ISO15118_2018 SessionSetupResponse;
  3257. struct ServiceDiscoveryRequest_ISO15118_2018 ServiceDiscoveryRequest;
  3258. struct ServiceDiscoveryResponse_ISO15118_2018 ServiceDiscoveryResponse;
  3259. struct ServiceDetailRequest_ISO15118_2018 ServiceDetailRequest;
  3260. struct ServiceDetailResponse_ISO15118_2018 ServiceDetailResponse;
  3261. struct ServiceSelectionRequest_ISO15118_2018 ServiceSelectionRequest;
  3262. struct ServiceSelectionResponse_ISO15118_2018 ServiceSelectionResponse;
  3263. struct IdentificationDetailsRequest_ISO15118_2018 IdentificationDetailsRequest;
  3264. struct IdentificationDetailsResponse_ISO15118_2018 IdentificationDetailsResponse;
  3265. struct AuthorizationRequest_ISO15118_2018 AuthorizationRequest;
  3266. struct AuthorizationResponse_ISO15118_2018 AuthorizationResponse;
  3267. struct CertificateInstallationRequest_ISO15118_2018 CertificateInstallationRequest;
  3268. struct CertificateInstallationResponse_ISO15118_2018 CertificateInstallationResponse;
  3269. struct ChargeParameterDiscoveryRequest_ISO15118_2018 ChargeParameterDiscoveryRequest;
  3270. struct ChargeParameterDiscoveryResponse_ISO15118_2018 ChargeParameterDiscoveryResponse;
  3271. struct CableCheckRequest_ISO15118_2018 CableCheckRequest;
  3272. struct CableCheckResponse_ISO15118_2018 CableCheckResponse;
  3273. struct PreChargeRequest_ISO15118_2018 PreChargeRequest;
  3274. struct PreChargeResponse_ISO15118_2018 PreChargeResponse;
  3275. struct PowerDeliveryRequest_ISO15118_2018 PowerDeliveryRequest;
  3276. struct PowerDeliveryResponse_ISO15118_2018 PowerDeliveryResponse;
  3277. struct ChargingStatusRequest_ISO15118_2018 ChargingStatusRequest;
  3278. struct ChargingStatusResponse_ISO15118_2018 ChargingStatusResponse;
  3279. struct CurrentDemandRequest_ISO15118_2018 CurrentDemandRequest;
  3280. struct CurrentDemandResponse_ISO15118_2018 CurrentDemandResponse;
  3281. struct MeteringReceiptRequest_ISO15118_2018 MeteringReceiptRequest;
  3282. struct MeteringReceiptResponse_ISO15118_2018 MeteringReceiptResponse;
  3283. struct WeldingDetectionRequest_ISO15118_2018 WeldingDetectionRequest;
  3284. struct WeldingDetectionResponse_ISO15118_2018 WeldingDetectionResponse;
  3285. struct SessionStopRequest_ISO15118_2018 SessionStopRequest;
  3286. struct SessionStopResponse_ISO15118_2018 SessionStopResponse;
  3287. };
  3288. struct CcsData
  3289. {
  3290. unsigned char CommProtocol; // 1: V2GMessage_DIN70121, 2:V2GMessage_ISO15118_2014, 3:V2GMessage_ISO15118_2018
  3291. struct V2GMessageType_DIN70121 V2GMessage_DIN70121[CCS_QUANTITY];
  3292. struct V2GMessageType_ISO15118_2014 V2GMessage_ISO15118_2014[CCS_QUANTITY];
  3293. struct V2GMessageType_ISO15118_2018 V2GMessage_ISO15118_2018[CCS_QUANTITY];
  3294. };
  3295. /**************************************************************************************/
  3296. /***************STM32F407 Communication Share memory**************************/
  3297. /**************************************************************************************/
  3298. struct PrimaryMcuData
  3299. {
  3300. unsigned char SelfTest_Comp;
  3301. unsigned char version[16]; //STM32F407 firmware version
  3302. unsigned int InputVoltage; //value comes from external meter
  3303. unsigned int InputCurrent; //value comes from external meter
  3304. union
  3305. {
  3306. unsigned char OutputDrvValue[1];
  3307. struct
  3308. {
  3309. //OutputDrvValue[0]
  3310. unsigned char AcContactorDrv:1; //bit 0, H: ON, L:OFF
  3311. unsigned char Button1LedDrv:1; //bit 1, H: ON, L:OFF
  3312. unsigned char Button2LedDrv:1; //bit 2, H: ON, L:OFF
  3313. unsigned char SystemLed1Drv:1; //bit 3, H: ON, L:OFF
  3314. unsigned char SystemLed2Drv:1; //bit 4, H: ON, L:OFF
  3315. unsigned char SystemLed3Drv:1; //bit 5, H: ON, L:OFF
  3316. unsigned char SystemLed4Drv:1; //bit 6, H: ON, L:OFF
  3317. unsigned char:1; //bit 7 reserved
  3318. }bits;
  3319. }OutputDrv;
  3320. union
  3321. {
  3322. unsigned char InputDetValue[2];
  3323. struct
  3324. {
  3325. //InputDetValue[0]
  3326. unsigned char AcContactorDetec:1; //bit 0, H: ON, L:OFF
  3327. unsigned char AcMainBreakerDetec:1; //bit 1, H: ON, L:OFF
  3328. unsigned char SpdDetec:1; //bit 2, H: ON, L:OFF
  3329. unsigned char DoorOpen:1; //bit 3, H: Open, L:Close
  3330. unsigned char Gfd1:1; //bit 4, H: Trigger, L:Normal
  3331. unsigned char Gfd2:1; //bit 5, H: Trigger, L:Normal
  3332. unsigned char Button1:1; //bit 6 , H: Push, L:Release
  3333. unsigned char Button2:1; //bit 7, H: Push, L:Release
  3334. //InputDetValue[1]
  3335. unsigned char EmergencyButton:1; //bit 0, H: Push, L:Release
  3336. unsigned char :7; //bit 1~7, Reserved
  3337. }bits;
  3338. }InputDet;
  3339. };
  3340. /**************************************************************************************/
  3341. /*************Fan power module Communication Share memory******************/
  3342. /**************************************************************************************/
  3343. struct FanModuleData
  3344. {
  3345. unsigned char SelfTest_Comp;
  3346. unsigned char version[16]; //fan power module firmware version
  3347. unsigned short PresentFan1Speed; //RPM
  3348. unsigned short PresentFan2Speed; //RPM
  3349. unsigned short PresentFan3Speed; //RPM
  3350. unsigned short PresentFan4Speed; //RPM
  3351. unsigned short SetFan1Speed; //RPM
  3352. unsigned short SetFan2Speed; //RPM
  3353. unsigned short SetFan3Speed; //RPM
  3354. unsigned short SetFan4Speed; //RPM
  3355. unsigned short TestFanSpeed; //RPM
  3356. unsigned char DiffOfAirPressure; //pa
  3357. unsigned char UpdateFW; //1:do update
  3358. };
  3359. /**************************************************************************************/
  3360. /***********Relay control module Communication Share memory******************/
  3361. /**************************************************************************************/
  3362. struct RelayModuleData
  3363. {
  3364. unsigned char SelfTest_Comp;
  3365. unsigned char version[16]; //relay module firmware version
  3366. unsigned short InputL1Volt; //XXXXX.x volt
  3367. unsigned short InputL2Volt; //XXXXX.x volt
  3368. unsigned short InputL3Volt; //XXXXX.x volt
  3369. unsigned short Gun1FuseOutputVolt; //XXXXX.x volt
  3370. unsigned short Gun2FuseOutputVolt; //XXXXX.x volt
  3371. unsigned short Gun1RelayOutputVolt; //XXXXX.x volt
  3372. unsigned short Gun2RelayOutputVolt; //XXXXX.x volt
  3373. unsigned short Gun1OutputCurrent; //XXXXX.x amp
  3374. unsigned short Gun2OutputCurrent; //XXXXX.x amp
  3375. unsigned char UpdateFW; //1:do update
  3376. };
  3377. /**************************************************************************************/
  3378. /***********Led control module Communication Share memory******************/
  3379. /**************************************************************************************/
  3380. struct LedModuleData
  3381. {
  3382. unsigned char SelfTest_Comp;
  3383. unsigned char version[16]; //led module firmware version
  3384. unsigned short Connect_1_Status; // Idle : 0, Charging : 1, Alarm : 2
  3385. unsigned short Connect_2_Status; // Idle : 0, Charging : 1, Alarm : 2
  3386. unsigned short EnableFunc; // reserved
  3387. };
  3388. /**************************************************************************************/
  3389. /************************OCPP Share memory***************************************/
  3390. /**************************************************************************************/
  3391. struct StructIdTagInfo
  3392. {
  3393. unsigned char ExpiryDate[28];
  3394. unsigned char ParentIdTag[20];
  3395. unsigned char Status[16]; //Accepted, Blocked, Expired, Invalid, ConcurrentTx
  3396. };
  3397. struct StructLocalAuthorizationList
  3398. {
  3399. unsigned char IdTag[20];
  3400. struct StructIdTagInfo IdTagInfo;
  3401. };
  3402. struct StructSampledValue
  3403. {
  3404. unsigned char Value[128];
  3405. unsigned char Context[30];//Interruption.Begin, Interruption.End, Sample.Clock, Sample.Periodic, Transaction.Begin, Transaction.End, Trigger, Other
  3406. unsigned char Format[16];//Raw,SignedData
  3407. unsigned char Measurand[40];/* "Energy.Active.Export.Register",
  3408. "Energy.Active.Import.Register",
  3409. "Energy.Reactive.Export.Register",
  3410. "Energy.Reactive.Import.Register",
  3411. "Energy.Active.Export.Interval",
  3412. "Energy.Active.Import.Interval",
  3413. "Energy.Reactive.Export.Interval",
  3414. "Energy.Reactive.Import.Interval",
  3415. "Power.Active.Export",
  3416. "Power.Active.Import",
  3417. "Power.Offered",
  3418. "Power.Reactive.Export",
  3419. "Power.Reactive.Import",
  3420. "Power.Factor",
  3421. "Current.Import",
  3422. "Current.Export",
  3423. "Current.Offered",
  3424. "Voltage",
  3425. "Frequency",
  3426. "Temperature",
  3427. "SoC",
  3428. "RPM"
  3429. */
  3430. unsigned char Phase[10]; /* "L1",
  3431. "L2",
  3432. "L3",
  3433. "N",
  3434. "L1-N",
  3435. "L2-N",
  3436. "L3-N",
  3437. "L1-L2",
  3438. "L2-L3",
  3439. "L3-L1"
  3440. */
  3441. unsigned char Location[10]; //Cable,EV,Inlet,Outlet,Body
  3442. unsigned char Unit[20]; /* "Wh",
  3443. "kWh",
  3444. "varh",
  3445. "kvarh",
  3446. "W",
  3447. "kW",
  3448. "VA",
  3449. "kVA",
  3450. "var",
  3451. "kvar",
  3452. "A",
  3453. "V",
  3454. "K",
  3455. "Celcius",
  3456. "Fahrenheit",
  3457. "Percent"
  3458. */
  3459. };
  3460. struct StructMeterValue
  3461. {
  3462. unsigned char TimeStamp[28];
  3463. struct StructSampledValue SampledValue[10];
  3464. };
  3465. struct StructConfigurationKeyItems
  3466. {
  3467. unsigned char Item[50];
  3468. };
  3469. struct StructConfigurationKey
  3470. {
  3471. unsigned char Key[50];
  3472. unsigned char ReadOnly[8]; //boolean
  3473. unsigned char Value[500];
  3474. };
  3475. struct StructChargingSchedulePeriod
  3476. {
  3477. int StartPeriod;
  3478. float Limit;//0.1;
  3479. int NumberPhases;
  3480. };
  3481. struct StructChargingSchedule
  3482. {
  3483. int Duration;
  3484. unsigned char StartSchedule[28];
  3485. unsigned char ChargingRateUnit[4]; //A, W
  3486. struct StructChargingSchedulePeriod ChargingSchedulePeriod[10];
  3487. float MinChargingRate; //0.1;
  3488. };
  3489. struct StructChargingProfile
  3490. {
  3491. int ChargingProfileId;
  3492. int TransactionId;
  3493. int StackLevel;
  3494. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  3495. unsigned char ChargingProfileKind[12]; //Absolute, Recurring, Relative
  3496. unsigned char RecurrencyKind[8]; //Daily, Weekly
  3497. unsigned char ValidFrom[28];
  3498. unsigned char ValidTo[28];
  3499. struct StructChargingSchedule ChargingSchedule;
  3500. };
  3501. struct StructBootNotification
  3502. {
  3503. unsigned char CpVendor[20]; //chargePointVendor //mandatory
  3504. unsigned char CpModel[20]; //chargePointModel //mandatory
  3505. unsigned char CpSN[25]; //chargePointSerialNumber
  3506. unsigned char CbSN[25]; //chargeBoxSerialNumber
  3507. unsigned char CpFwVersion[50]; //firmwareVersion
  3508. unsigned char CpIccid[22]; //iccid
  3509. unsigned char CpImsi[20]; //imsi
  3510. unsigned char CpMeterType[25]; //meterType
  3511. unsigned char CpMeterSerialNumber[25]; //meterSerialNumber
  3512. unsigned char ResponseStatus[16]; //Accepted, Pending, Rejected
  3513. unsigned char ResponseCurrentTime[28]; //currentTime //mandatory
  3514. int ResponseHeartbeatInterval; //interval //mandatory
  3515. };
  3516. struct StructHeartbeat
  3517. {
  3518. unsigned char ResponseCurrentTime[28];
  3519. };
  3520. struct StructAuthorize
  3521. {
  3522. unsigned char IdTag[20];
  3523. struct StructIdTagInfo ResponseIdTagInfo;
  3524. };
  3525. struct StructStartTransaction
  3526. {
  3527. int ConnectorId;
  3528. unsigned char IdTag[20];
  3529. int MeterStart;
  3530. int ReservationId;
  3531. unsigned char Timestamp[28];
  3532. struct StructIdTagInfo ResponseIdTagInfo;
  3533. int ResponseTransactionId;
  3534. };
  3535. struct StructStopTransaction
  3536. {
  3537. unsigned char IdTag[20];
  3538. int MeterStop;
  3539. unsigned char Timestamp[28];
  3540. int TransactionId;
  3541. unsigned char StopReason[20]; /* "EmergencyStop",
  3542. "EVDisconnected",
  3543. "HardReset",
  3544. "Local",
  3545. "Other",
  3546. "PowerLoss",
  3547. "Reboot",
  3548. "Remote",
  3549. "SoftReset",
  3550. "UnlockCommand",
  3551. "DeAuthorized"
  3552. */
  3553. struct StructMeterValue TransactionData[1];
  3554. struct StructIdTagInfo ResponseIdTagInfo;
  3555. };
  3556. struct StructStatusNotification
  3557. {
  3558. int ConnectorId;
  3559. unsigned char ErrorCode[25]; /* "ConnectorLockFailure",
  3560. "EVCommunicationError",
  3561. "GroundFailure",
  3562. "HighTemperature",
  3563. "InternalError",
  3564. "LocalListConflict",
  3565. "NoError",
  3566. "OtherError",
  3567. "OverCurrentFailure",
  3568. "PowerMeterFailure",
  3569. "PowerSwitchFailure",
  3570. "ReaderFailure",
  3571. "ResetFailure",
  3572. "UnderVoltage",
  3573. "OverVoltage",
  3574. "WeakSignal"
  3575. */
  3576. unsigned char Info[50];
  3577. unsigned char Status[20]; /* "Available",
  3578. "Preparing",
  3579. "Charging",
  3580. "SuspendedEVSE",
  3581. "SuspendedEV",
  3582. "Finishing",
  3583. "Reserved",
  3584. "Unavailable",
  3585. "Faulted"
  3586. */
  3587. unsigned char Timestamp[28];
  3588. unsigned char VendorId[256];
  3589. unsigned char VendorErrorCode[50];
  3590. };
  3591. struct StructCancelReservation
  3592. {
  3593. int ReservationId;
  3594. unsigned char ResponseStatus[16]; //Accepted, Rejected
  3595. unsigned char guid[37];
  3596. };
  3597. struct StructChangeAvailability
  3598. {
  3599. int ConnectorId;
  3600. unsigned char Type[16]; //Inoperative, Operative
  3601. unsigned char ResponseStatus[16]; //Accepted, Rejected, Scheduled
  3602. unsigned char guid[37];
  3603. };
  3604. struct StructChangeConfiguration
  3605. {
  3606. unsigned char Key[50];
  3607. unsigned char Value[500];
  3608. unsigned char ResponseStatus[16]; //Accepted, Rejected, RebootRequired, NotSupported
  3609. };
  3610. struct StructClearCache
  3611. {
  3612. unsigned char ResponseStatus[16]; //Accepted, Rejected
  3613. };
  3614. struct StructClearChargingProfile
  3615. {
  3616. int Id;
  3617. int ConnectorId;
  3618. unsigned char ChargingProfilePurpose[24]; //ChargePointMaxProfile, TxDefaultProfile, TxProfile
  3619. int StackLevel;
  3620. unsigned char ResponseStatus[16]; //Accepted, Unknown
  3621. };
  3622. struct StructDataTransfer
  3623. {
  3624. unsigned char VendorId[256];
  3625. unsigned char MessageId[52];
  3626. unsigned char Data[512];
  3627. unsigned char ResponseStatus[18]; //Accepted, Rejected,UnknownMessageId,UnknownVendorId
  3628. unsigned char ResponseData[256];
  3629. };
  3630. struct StructDiagnosticsStatusNotification
  3631. {
  3632. unsigned char Status[16]; //Idle,Uploaded,UploadFailed,Uploading
  3633. };
  3634. struct StructFirmwareStatusNotification
  3635. {
  3636. unsigned char Status[20]; //Downloaded,DownloadFailed,Downloading,Idle,InstallationFailed,Installing,Installed
  3637. };
  3638. struct StructGetCompositeSchedule
  3639. {
  3640. int ConnectorId;
  3641. int Duration;
  3642. unsigned char ChargingRateUnit[4]; //A,W
  3643. unsigned char ResponseStatus[12]; //Accepted,Rejected
  3644. int ResponseConnectorId;
  3645. unsigned char ResponseScheduleStart[28];
  3646. struct StructChargingSchedule ResponseChargingSchedule;
  3647. };
  3648. struct StructGetConfiguration
  3649. {
  3650. struct StructConfigurationKeyItems *Key;
  3651. struct StructConfigurationKey *ResponseConfigurationKey;
  3652. struct StructConfigurationKeyItems *ResponseUnknownKey;
  3653. };
  3654. struct StructGetDiagnostics
  3655. {
  3656. unsigned char Location[256];
  3657. int Retries;
  3658. int RetryInterval;
  3659. unsigned char StartTime[28];
  3660. unsigned char StopTime[28];
  3661. unsigned char ResponseFileName[256];
  3662. };
  3663. struct StructGetLocalListVersion
  3664. {
  3665. int ResponseListVersion;
  3666. };
  3667. struct StructMeterValues
  3668. {
  3669. int ConnectorId;
  3670. int TransactionId;
  3671. struct StructMeterValue MeterValue[0];
  3672. };
  3673. struct StructRemoteStartTransaction
  3674. {
  3675. int ConnectorId;
  3676. unsigned char IdTag[20];
  3677. struct StructChargingProfile ChargingProfile;
  3678. unsigned char ResponseStatus[10]; //Accepted, Rejected
  3679. unsigned char guid[37];
  3680. };
  3681. struct StructRemoteStopTransaction
  3682. {
  3683. int TransactionId;
  3684. unsigned char ResponseStatus[10]; //Accepted, Rejected
  3685. };
  3686. struct StructReserveNow
  3687. {
  3688. int ConnectorId;
  3689. unsigned char ExpiryDate[28];
  3690. unsigned char IdTag[20];
  3691. unsigned char ParentIdTag[20];
  3692. int ReservationId;
  3693. unsigned char ResponseStatus[12]; //Accepted, Faulted, Occupied, Rejected, Unavailable
  3694. unsigned char guid[37]; //OCPP Server request message uuid
  3695. };
  3696. struct StructReset
  3697. {
  3698. unsigned char Type[8]; //Hard, Soft
  3699. unsigned char ResponseStatus[10]; //Accepted, Rejected
  3700. unsigned char guid[37]; //OCPP Server request message uuid
  3701. };
  3702. struct StructSendLocalList
  3703. {
  3704. int ListVersion;
  3705. unsigned char UpdateType[16]; //Differential, Full
  3706. struct StructLocalAuthorizationList *LocalAuthorizationList;
  3707. unsigned char ResponseStatus[16]; //Accepted, Failed, NotSupported, VersionMismatch
  3708. };
  3709. struct StructSetChargingProfile
  3710. {
  3711. int ConnectorId;
  3712. struct StructChargingProfile ChargingProfile;
  3713. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotSupported
  3714. };
  3715. struct StructTriggerMessage
  3716. {
  3717. unsigned char RequestedMessage[32]; /*
  3718. "BootNotification",
  3719. "DiagnosticsStatusNotification",
  3720. "FirmwareStatusNotification",
  3721. "Heartbeat",
  3722. "MeterValues",
  3723. "StatusNotification"
  3724. */
  3725. int ConnectorId;
  3726. unsigned char ResponseStatus[16]; //Accepted, Rejected, NotImplemented
  3727. };
  3728. struct StructUnlockConnector
  3729. {
  3730. int ConnectorId;
  3731. unsigned char ResponseStatus[16]; //Unlocked, UnlockFailed, NotSupported
  3732. unsigned char guid[37]; //OCPP Server request message uuid
  3733. };
  3734. struct StructUpdateFirmware
  3735. {
  3736. unsigned char Location[256];
  3737. int Retries;
  3738. unsigned char RetrieveDate[28];
  3739. int RetryInterval;
  3740. };
  3741. struct OCPP16ConfigurationItem
  3742. {
  3743. unsigned char ItemName[64];
  3744. unsigned char ItemAccessibility;//0:RO, 1:RW
  3745. unsigned char ItemData[128];
  3746. };
  3747. struct OCPP16ConfigurationTable
  3748. {
  3749. //please refer to OCPP 1.6 chapter 9
  3750. struct OCPP16ConfigurationItem CoreProfile[35];
  3751. struct OCPP16ConfigurationItem LocalAuthListManagementProfile[3];
  3752. struct OCPP16ConfigurationItem ReservationProfile[1];
  3753. struct OCPP16ConfigurationItem SmartChargingProfile[5];
  3754. };
  3755. struct OCPP16Data
  3756. {
  3757. 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"
  3758. unsigned char ChargeBoxId[128];
  3759. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  3760. unsigned int Timeout_Secs;
  3761. unsigned short Ping_Pong_Interval;
  3762. union
  3763. {
  3764. //Operations Initiated by Charge Point
  3765. unsigned char CpMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3766. struct
  3767. {
  3768. //CpMsgValue[0]
  3769. unsigned char DataTransferReq:1; //bit 0,
  3770. unsigned char DataTransferConf:1; //bit 1,
  3771. unsigned char StartTransactionReq:1; //bit 2,
  3772. unsigned char StartTransactionConf:1; //bit 3,
  3773. unsigned char StopTransactionReq:1; //bit 4,
  3774. unsigned char StopTransactionConf:1; //bit 5,
  3775. unsigned char :2; //bit 6,7 , reserved
  3776. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3777. }CpMsg;
  3778. union
  3779. {
  3780. //Operations Initiated by Sequence Point
  3781. unsigned char SpMsgValue[1];
  3782. struct
  3783. {
  3784. //SpMsgValue[0]
  3785. unsigned char BootNotificationReq :1; //bit 0,
  3786. unsigned char BootNotificationConf :1; //bit 1,
  3787. unsigned char AuthorizeReq :1; //bit 2,
  3788. unsigned char AuthorizeConf :1; //bit 3,
  3789. unsigned char DiagnosticsStatusNotificationReq :1; //bit 4,
  3790. unsigned char DiagnosticsStatusNotificationConf :1; //bit 5,
  3791. unsigned char FirmwareStatusNotificationReq :1; //bit 6,
  3792. unsigned char FirmwareStatusNotificationConf :1; //bit 7,
  3793. } bits;
  3794. } SpMsg;
  3795. union
  3796. {
  3797. //Operations Initiated by Central System
  3798. unsigned char CsMsgValue[3 * (CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY)];
  3799. struct
  3800. {
  3801. //CsMsgValue[0]
  3802. unsigned char CancelReservationReq :1; //bit 0,
  3803. unsigned char CancelReservationConf :1; //bit 1,
  3804. unsigned char ChangeAvailabilityReq :1; //bit 2,
  3805. unsigned char ChangeAvailabilityConf :1; //bit 3,
  3806. unsigned char ReserveNowReq :1; //bit 4,
  3807. unsigned char ReserveNowConf :1; //bit 5,
  3808. unsigned char SetChargingProfileReq :1; //bit 6,
  3809. unsigned char SetChargingProfileConf :1; //bit 7,
  3810. //CsMsgValue[1]
  3811. unsigned char TriggerMessageReq :1; //bit 0,
  3812. unsigned char TriggerMessageConf :1; //bit 1,
  3813. unsigned char UnlockConnectorReq :1; //bit 2,
  3814. unsigned char UnlockConnectorConf :1; //bit 3,
  3815. unsigned char RemoteStartTransactionReq :1; //bit 4,
  3816. unsigned char RemoteStartTransactionConf :1; //bit 5,
  3817. unsigned char RemoteStopTransactionReq :1; //bit 6,
  3818. unsigned char RemoteStopTransactionConf :1; //bit 7,
  3819. //CsMsgValue[2]
  3820. unsigned char ClearChargingProfileReq :1; //bit 0,
  3821. unsigned char ClearChargingProfileConf :1; //bit 1,
  3822. unsigned char DataTransferReq :1; //bit 2,
  3823. unsigned char DataTransferConf :1; //bit 3,
  3824. unsigned char GetCompositeScheduleReq :1; //bit 4,
  3825. unsigned char GetCompositeScheduleConf :1; //bit 5,
  3826. unsigned char :2; //bit 6,7
  3827. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3828. }CsMsg;
  3829. union
  3830. {
  3831. //Operations Initiated by Main System
  3832. unsigned char MsMsgValue[2];
  3833. struct
  3834. {
  3835. //CsMsgValue[0]
  3836. unsigned char ChangeConfigurationReq :1; //bit 0,
  3837. unsigned char ChangeConfigurationConf :1; //bit 1,
  3838. unsigned char ClearCacheReq :1; //bit 2,
  3839. unsigned char ClearCacheConf :1; //bit 3,
  3840. unsigned char GetConfigurationReq :1; //bit 4,
  3841. unsigned char GetConfigurationConf :1; //bit 5,
  3842. unsigned char UpdateFirmwareReq :1; //bit 6,
  3843. unsigned char UpdateFirmwareConf :1; //bit 7,
  3844. //CsMsgValue[1]
  3845. unsigned char GetDiagnosticsReq :1; //bit 0,
  3846. unsigned char GetDiagnosticsConf :1; //bit 1,
  3847. unsigned char GetLocalListVersionReq :1; //bit 2,
  3848. unsigned char GetLocalListVersionConf :1; //bit 3,
  3849. unsigned char ResetReq :1; //bit 4,
  3850. unsigned char ResetConf :1; //bit 5,
  3851. unsigned char SendLocalListReq :1; //bit 6,
  3852. unsigned char SendLocalListConf :1; //bit 7,
  3853. } bits;
  3854. } MsMsg;
  3855. union
  3856. {
  3857. //Operations triggered by CSU
  3858. unsigned char CSUMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3859. struct
  3860. {
  3861. //CSUMsgValue[0]
  3862. unsigned char ChargingProfileReq:1; //bit 0,
  3863. unsigned char ChargingProfileConf:1; //bit 0,
  3864. unsigned char :6; //bit 1,2,3,4,5,6,7 , reserved
  3865. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3866. }CSUMsg;
  3867. struct StructBootNotification BootNotification;
  3868. struct StructHeartbeat Heartbeat;
  3869. struct StructAuthorize Authorize;
  3870. struct StructStartTransaction StartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3871. struct StructStopTransaction StopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3872. struct StructStatusNotification StatusNotification[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3873. struct StructCancelReservation CancelReservation[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3874. struct StructChangeAvailability ChangeAvailability[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3875. struct StructChangeConfiguration ChangeConfiguration;
  3876. struct StructClearCache ClearCache;
  3877. struct StructClearChargingProfile ClearChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3878. struct StructDataTransfer DataTransfer[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3879. struct StructDiagnosticsStatusNotification DiagnosticsStatusNotification;
  3880. struct StructFirmwareStatusNotification FirmwareStatusNotification;
  3881. struct StructGetCompositeSchedule GetCompositeSchedule[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3882. struct StructGetConfiguration GetConfiguration;
  3883. struct StructGetDiagnostics GetDiagnostics;
  3884. struct StructGetLocalListVersion GetLocalListVersion;
  3885. struct StructMeterValues MeterValues[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3886. struct StructRemoteStartTransaction RemoteStartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3887. struct StructRemoteStopTransaction RemoteStopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3888. struct StructReserveNow ReserveNow[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3889. struct StructReset Reset;
  3890. struct StructSendLocalList SendLocalList;
  3891. struct StructSetChargingProfile SetChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3892. struct StructTriggerMessage TriggerMessage[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3893. struct StructUnlockConnector UnlockConnector[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3894. struct StructUpdateFirmware UpdateFirmware;
  3895. struct OCPP16ConfigurationTable ConfigurationTable;
  3896. struct StructChargingProfile SmartChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  3897. };
  3898. /**************************************************************************************/
  3899. /************************* OCPP 2.0 Share memory **************************************/
  3900. /**************************************************************************************/
  3901. /*
  3902. * =============== Common class ===============
  3903. */
  3904. struct ACChargingParametersType
  3905. {
  3906. int energyAmount; // Required, Amount of energy requested (in Wh). This includes energy required for preconditioning.
  3907. int evMinCurrent; // Required. Minimum current (amps) supported by the electric vehicle (per phase).
  3908. int evMaxCurrent; // Required. Maximum current (amps) supported by the electric vehicle (per phase). Includes cable capacity.
  3909. int evMaxVoltage; // Required. Maximum voltage supported by the electric vehicle
  3910. };
  3911. struct DCChargingParametersType
  3912. {
  3913. int evMaxCurrent; // Required. Maximum current (amps) supported by the electric vehicle. Includes cable capacity.
  3914. int evMaxVoltage; // Required. Maximum voltage supported by the electric vehicle
  3915. int energyAmount; // Optional. Amount of energy requested (in Wh). This inludes energy required for preconditioning.
  3916. int evMaxPower; // Optional. Maximum power (in W) supported by the electric vehicle. Required for DC charging.
  3917. unsigned char stateOfCharge; // Optional. Energy available in the battery (in percent of the battery capacity)
  3918. int evEnergyCapacity; // Optional. Capacity of the electric vehicle battery (in Wh)
  3919. unsigned char fullSoC; // Optional. Percentage of SoC at which the EV considers the battery fully charged. (possible values: 0 - 100)
  3920. unsigned char bulkSoC; // Optional. Percentage of SoC at which the EV considers a fast charging process to end. (possible values: 0 - 100)
  3921. };
  3922. struct AdditionalInfoType
  3923. {
  3924. unsigned char additionalIdToken[36]; // Required. This field specifies the additional IdToken.
  3925. unsigned char type[50]; // Required. This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.
  3926. };
  3927. struct APNType
  3928. {
  3929. unsigned char apn[512]; // Required. The Access Point Name as an URL.
  3930. unsigned char apnUserName[20]; // Optional. APN user name.
  3931. unsigned char apnPassword[20]; // Optional. APN Password.
  3932. short int simPin; // Optional. SIM card pin code.
  3933. unsigned char preferredNetwork[6]; // Optional. Preferred network, written as MCC and MNC concatenated. See note.
  3934. unsigned char useOnlyPreferredNetwork; // Optional. Default: false. Use only the preferred Network, do not dial in when not available. See Note.
  3935. short int apnAuthentication[8]; // Required. Authentication method.
  3936. };
  3937. struct VPNType
  3938. {
  3939. unsigned char server[512]; // Required. VPN Server Address
  3940. unsigned char user[20]; // Required. VPN User
  3941. unsigned char group[20]; // Optional. VPN group.
  3942. unsigned char password[20]; // Required. VPN Password.
  3943. unsigned char key[255]; // Required. VPN shared secret.
  3944. unsigned char type[8]; // Required. Type of VPN
  3945. };
  3946. struct GroupIdTokenType
  3947. {
  3948. unsigned char idToken[36]; // Required. IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
  3949. unsigned char type[16]; // Required. Enumeration of possible idToken types.
  3950. };
  3951. struct MessageContentType
  3952. {
  3953. unsigned char format[8]; // Required. Format of the message.
  3954. unsigned char language[8]; // Optional. Message language identifier. Contains a language code as defined in [RFC5646].
  3955. unsigned char content[512]; // Required. Message contents.
  3956. };
  3957. struct IdTokenInfoType
  3958. {
  3959. unsigned char status[32]; // Required. Current status of the ID Token.
  3960. unsigned char cacheExpiryDateTime[28]; // Optional. Date and Time after which the token must be considered invalid.
  3961. short int chargingPriority; // Optional. Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority.
  3962. unsigned char language1[8]; // Optional. Preferred user interface language of identifier user. Contains a language code as defined in [RFC5646].
  3963. unsigned int evseId[100]; // Optional. Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
  3964. unsigned char language2[8]; // Optional. Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1.
  3965. struct GroupIdTokenType groupIdToken; // Optional. This contains the group identifier.
  3966. struct MessageContentType personalMessage; // Optional. Personal message that can be shown to the EV Driver and can be used for tariff information, user greetings etc.
  3967. };
  3968. struct IdTokenType
  3969. {
  3970. unsigned char idToken[36]; // Required. IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
  3971. unsigned char type[16]; // Required. Enumeration of possible idToken types.
  3972. struct AdditionalInfoType additionalInfo[10]; // Optional. AdditionalInfo can be used to send extra information which can be validated by the CSMS in addition to the regular authorization with IdToken.
  3973. };
  3974. struct AuthorizationData
  3975. {
  3976. struct IdTokenInfoType idTokenInfo; // Optional. Required when UpdateType is Full. This contains information about authorization status, expiry and group id.
  3977. struct IdTokenType idToken; // Required. This contains the identifier which needs to be stored for authorization.
  3978. };
  3979. struct CertificateHashDataType
  3980. {
  3981. unsigned char hashAlgorithm[8]; // Required. Used algorithms for the hashes provided.
  3982. unsigned char issuerNameHash[128]; // Required. hashed value of the IssuerName.
  3983. unsigned char issuerKeyHash[128]; // Required. Hashed value of the issuers public key
  3984. unsigned char serialNumber[40]; // Required. The serial number of the certificate.
  3985. };
  3986. struct CertificateHashDataChainType
  3987. {
  3988. unsigned char certificateType[32]; // Required. Indicates the type of the requested certificate(s).
  3989. struct CertificateHashDataType certificateHashData; // Required. Information to identify a certificate.
  3990. struct CertificateHashDataType childCertificateHashData[4]; // Optional. Information to identify the child certificate(s).
  3991. };
  3992. struct ChargingLimitType
  3993. {
  3994. unsigned char chargingLimitSource[8]; // Required. Represents the source of the charging limit.
  3995. unsigned char isGridCritical; // Optional. Indicates whether the charging limit is critical for the grid.
  3996. };
  3997. struct ChargingNeedsType
  3998. {
  3999. unsigned char requestedEnergyTransfer[32]; // Required. Mode of energy transfer requested by the EV.
  4000. unsigned char departureTime[28]; // Optional. Estimated departure time of the EV.
  4001. struct ACChargingParametersType acChargingParameters; // Optional. EV AC charging parameters.
  4002. struct DCChargingParametersType dcChargingParameters; // Optional. EV DC charging parameters
  4003. };
  4004. struct ChargingProfileCriterionType
  4005. {
  4006. unsigned char chargingProfilePurpose[36]; // Optional. Defines the purpose of the schedule transferred by this profile
  4007. unsigned short int stackLevel; // Optional. Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
  4008. unsigned short int chargingProfileId[10]; // Optional. List of all the chargingProfileIds requested. Any ChargingProfile that matches one of these profiles will be reported.
  4009. unsigned char chargingLimitSource[4][8]; // Optional. For which charging limit sources, charging profiles SHALL be reported. If omitted, the Charging Station SHALL not filter on chargingLimitSource.
  4010. };
  4011. struct RelativeTimeIntervalTypeOCPP
  4012. {
  4013. unsigned int start; // Required. Start of the interval, in seconds from NOW.
  4014. unsigned int duration; // Optional. Duration of the interval, in seconds.
  4015. };
  4016. struct CostTypeOCPP
  4017. {
  4018. unsigned char costKind[36]; // Required. The kind of cost referred to in the message element amount
  4019. int amount; // Required. The estimated or actual cost per kWh
  4020. };
  4021. struct ConsumptionCostTypeOCPP
  4022. {
  4023. float startValue; // Required. The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval.
  4024. struct CostTypeOCPP cost[3]; // Required. This field contains the cost details.
  4025. };
  4026. struct SalesTariffEntryTypeOCPP
  4027. {
  4028. unsigned short int ePriceLevel; // Optional. Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry.
  4029. struct RelativeTimeIntervalTypeOCPP relativeTimeInterval; // Required. Defines the time interval the SalesTariffEntry is valid for, based upon relative times.
  4030. struct ConsumptionCostTypeOCPP consumptionCost[3]; // Optional. Defines additional means for further relative price information and/or alternative costs.
  4031. };
  4032. struct SalesTariffTypeOCPP
  4033. {
  4034. unsigned short int id; // Required. SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
  4035. unsigned char salesTariffDescription[32]; // Optional. A human readable title/short description of the sales tariff e.g. for HMI display purposes.
  4036. unsigned short int numEPriceLevels; // Optional. Defines the overall number of distinct price levels used across all provided SalesTariff elements.
  4037. struct SalesTariffEntryTypeOCPP salesTariffEntry[1024]; // Required. Encapsulating element describing all relevant details for one time interval of the SalesTariff. The number of SalesTariffEntry elements is limited by the parameter maxScheduleTuples.
  4038. };
  4039. struct ChargingSchedulePeriodType
  4040. {
  4041. int startPeriod; // Required. Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period.
  4042. float limit; // Required. Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1).
  4043. unsigned char numberPhases; // Optional. The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given.
  4044. unsigned char phaseToUse; // Optional. Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to theEV, i.e. ACPhaseSwitchingSupported is defined and true.
  4045. };
  4046. struct ChargingScheduleType
  4047. {
  4048. unsigned char startSchedule[28]; // Optional. Starting point of an absolute schedule. If absent the schedule will be relative to start of charging.
  4049. unsigned int duration; // Optional. Duration of the charging schedule in seconds.
  4050. unsigned char chargingRateUnit[8]; // Required. The unit of measure Limit is expressed in.
  4051. float minChargingRate; // Optional. Minimum charging rate supported by the EV.
  4052. unsigned short int id; // Required. Identifies the ChargingSchedule.
  4053. struct ChargingSchedulePeriodType chargingSchedulePeriod[1024]; // Required. List of ChargingSchedulePeriod elements defining maximum power or current usage over time.
  4054. struct SalesTariffType salesTariff; // Optional. Sales tariff associated with this charging schedule.
  4055. };
  4056. struct ChargingProfileType
  4057. {
  4058. unsigned short int id; // Required. Id of ChargingProfile.
  4059. unsigned short int stackLevel; // Required. Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
  4060. unsigned char chargingProfilePurpose[36]; // Required. Defines the purpose of the schedule transferred by this profile
  4061. unsigned char chargingProfileKind[16]; // Required. Indicates the kind of schedule.
  4062. unsigned char recurrencyKind[8]; // Optional. Indicates the start point of a recurrence.
  4063. unsigned char validFrom[28]; // Optional. Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station.
  4064. unsigned char validTo[28]; // Optional. Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile.
  4065. unsigned char transactionId[36]; // Optional. SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction.
  4066. struct ChargingScheduleType chargingSchedule[3]; // Required. Schedule that contains limits for the available power or current over time. In order to support ISO 15118 schedule negotiation, it supports at most three schedules with associated tariff to choose from.
  4067. };
  4068. struct ModemType
  4069. {
  4070. unsigned char iccid[20]; // Optional. This contains the ICCID of the modem’s SIM card.
  4071. unsigned char imsi[20]; // Optional. This contains the IMSI of the modem’s SIM card.
  4072. };
  4073. struct ChargingStationType
  4074. {
  4075. unsigned char serialNumber[25]; // Optional. Vendor-specific device identifier.
  4076. unsigned char model[20]; // Required. Defines the model of the device.
  4077. unsigned char vendorName[50]; // Required. Identifies the vendor (not necessarily in a unique manner).
  4078. unsigned char firmwareVersion[50]; // Optional. This contains the firmware version of the Charging Station.
  4079. struct ModemType modem; // Optional. Defines the functional parameters of a communication link.
  4080. };
  4081. struct ClearChargingProfileType
  4082. {
  4083. unsigned int evseId; // Optional. Specifies the id of the EVSE for which to clear charging profiles.
  4084. unsigned char chargingProfilePurpose[36]; // Optional. Specifies to purpose of the charging profiles that will be cleared, if they meet the other criteria in the request.
  4085. unsigned short int stackLevel; // Optional. Specifies the stackLevel for which charging profiles will be cleared, if they meet the other criteria in the request.
  4086. };
  4087. struct ClearMonitoringResultType
  4088. {
  4089. unsigned short int id; // Required. Id of the monitor of which a clear was requested.
  4090. unsigned char status[16]; // Required. Result of the clear request for this monitor, identified by its Id.
  4091. };
  4092. struct EVSEType
  4093. {
  4094. unsigned int id; // Required. EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station.
  4095. unsigned char connectorId; // Optional. An id to designate a specific connector (on an EVSE) by connector index number.
  4096. };
  4097. struct VariableType
  4098. {
  4099. unsigned char name[50]; // Required. Name of the variable.
  4100. unsigned char instance[50]; // Optional. Name of instance in case the variable exists as multiple instances.
  4101. };
  4102. struct VariableAttributeType
  4103. {
  4104. unsigned char type[8]; // Optional. Attribute: Actual, MinSet, MaxSet, etc. Defaults to Actual if absent.
  4105. unsigned char value[2500]; // Optional. Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'.
  4106. unsigned char mutability[16]; // Optional. Defines the mutability of this attribute. Default is ReadWrite when omitted.
  4107. unsigned char persistent; // Optional. If true, value will be persistent across system reboots or power down. Default when omitted is false.
  4108. unsigned char constant; // Optional. If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false.
  4109. };
  4110. struct VariableCharacteristicsType
  4111. {
  4112. unsigned char unit[16]; // Optional. Unit of the variable. When the transmitted value has a unit, this field SHALL be included.
  4113. unsigned char dataType[16]; // Required. Data type of this variable.
  4114. float minLimit; // Optional. Minimum possible value of this variable.
  4115. float maxLimit; // Optional. Maximum possible value of this variable.
  4116. unsigned char valuesList[1000]; // Optional. Allowed values when variable is Option/Member/SequenceList.
  4117. unsigned char supportsMonitoring; // Required. Flag indicating if this variable supports monitoring.
  4118. };
  4119. struct ComponentType
  4120. {
  4121. unsigned char name[50]; // Required. Name of the component.
  4122. unsigned char instance[50]; // Optional. Name of instance in case the component exist as multiple instances.
  4123. struct EVSEType evse; // Optional. Specifies the EVSE when component is located at EVSE level, also specifies the connector when component is located at Connector level.
  4124. };
  4125. struct ComponentVariableType
  4126. {
  4127. struct ComponentType component; // Required. Component for which a report of Variable is requested.
  4128. struct VariableType variable; // Optional. Variable(s) for which the report is requested.
  4129. };
  4130. struct CompositeScheduleType
  4131. {
  4132. unsigned char startDateTime[28]; // Required. Date and time at which the schedule becomes active.
  4133. struct ChargingScheduleType chargingSchedule; // Required. Charging schedule structure defines a list of charging periods.
  4134. };
  4135. struct EventDataType
  4136. {
  4137. unsigned int eventId; // Required. Identifies the event. This field can be referred to as a cause by other events.
  4138. unsigned char timestamp[28]; // Required. Timestamp of the moment the report was generated.
  4139. unsigned char trigger[16]; // Required. Type of monitor that triggered this event, e.g. exceeding a threshold value.
  4140. unsigned int cause; // Optional. Refers to the Id of an event that is considered to be the cause for this event.
  4141. unsigned char actualValue[2500]; // Required. Actual value (attributeType Actual) of the variable.
  4142. unsigned char techcode[50]; // Optional. Technical (error) code as reported by component.
  4143. unsigned char techInfo[500]; // Optional. Technical detail information as reported by component.
  4144. unsigned char cleared; // Optional. Cleared is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'.
  4145. unsigned char transactionId[36]; // Optional. If an event notification is linked to a specific transaction, this field can be used to specify its transactionId.
  4146. unsigned int variableMonitoringId; // Optional. Identifies the VariableMonitoring which triggered the event.
  4147. unsigned char eventNotificationType[32]; // Required. Specifies the event notification type of the message.
  4148. struct ComponentType component; // Required. Component for which event is notified.
  4149. struct VariableType variable; // Required. Variable for which event is notified.
  4150. };
  4151. struct FirmwareType
  4152. {
  4153. unsigned char location[512]; // Required. URI defining the origin of the firmware.
  4154. unsigned char retrieveDateTime[28]; // Required. Date and time at which the firmware shall be retrieved.
  4155. unsigned char installDateTime[28]; // Optional. Date and time at which the firmware shall be installed.
  4156. unsigned char signingCertificate[5500]; // Optional. Certificate with which the firmware was signed. X.509 certificate, first DER encoded into binary, and then Base64 encoded.
  4157. unsigned char signature[800]; // Optional. Base64 encoded firmware signature.
  4158. };
  4159. struct GetVariableDataType
  4160. {
  4161. unsigned char attributeType[8]; // Optional. Attribute type for which value is requested. When absent, default Actual is assumed.
  4162. struct ComponentType component; // Required. Component for which the Variable is requested.
  4163. struct VariableType variable; // Required. Variable for which the attribute value is requested.
  4164. };
  4165. struct GetVariableResultType
  4166. {
  4167. unsigned char attributeStatus[32]; // Required. Result status of getting the variable.
  4168. unsigned char attributeType[8]; // Optional. Attribute type for which value is requested. When absent, default Actual is assumed.
  4169. unsigned char attributeValue[2500]; // Optional. Value of requested attribute type of component- variable.
  4170. struct ComponentType component; // Required. Component for which the Variable is requested.
  4171. struct VariableType variable; // Required. Variable for which the attribute value is requested.
  4172. };
  4173. struct LogParametersType
  4174. {
  4175. unsigned char remoteLocation[512]; // Required. The URL of the location at the remote system where the log should be stored.
  4176. unsigned char oldestTimestamp[28]; // Optional. This contains the date and time of the oldest logging information to include in the diagnostics.
  4177. unsigned char latestTimestamp[28]; // Optional. This contains the date and time of the latest logging information to include in the diagnostics.
  4178. };
  4179. struct MessageInfoType
  4180. {
  4181. unsigned int id; // Required. Master resource identifier, unique within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
  4182. unsigned char priority[16]; // Required. With what priority should this message be shown
  4183. unsigned char state[16]; // Optional. During what state should this message be shown. When omitted this message should be shown in any state of the Charging Station.
  4184. unsigned char startDateTime[28]; // Optional. From what date-time should this message be shown. If omitted: directly.
  4185. unsigned char endDateTime[28]; // Optional. Until what date-time should this message be shown, after this date/time this message SHALL be removed.
  4186. unsigned char transactionId[36]; // Optional. During which transaction shall this message be shown. Message SHALL be removed by the Charging Station after transaction has ended.
  4187. struct MessageContentType message; // Required. Contains message details for the message to be displayed on a Charging Station.
  4188. struct ComponentType display; // Optional. When a Charging Station has multiple Displays, this field can be used to define to which Display this message belongs.
  4189. };
  4190. struct SignedMeterValueType
  4191. {
  4192. unsigned char signedMeterData[2500]; // Required. Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc.
  4193. unsigned char signingMethod[50]; // Required. Method used to create the digital signature.
  4194. unsigned char encodingMethod[50]; // Required. Method used to encode the meter values before applying the digital signature algorithm.
  4195. unsigned char publicKey[2500]; // Required. Base64 encoded, sending depends on configuration variable PublicKeyWithSignedMeterValue.
  4196. };
  4197. struct UnitOfMeasureType
  4198. {
  4199. unsigned char uint[20]; // Optional. Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type.
  4200. unsigned short int multiplier; // Optional. Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0.
  4201. };
  4202. struct SampledValueType
  4203. {
  4204. float value; // Required. Indicates the measured value.
  4205. unsigned char context[32]; // Optional. Type of detail value: start, end or sample. Default = "Sample.Periodic"
  4206. unsigned char measurand[32]; // Optional. Type of measurement. Default = "Energy.Active.Import.Register"
  4207. unsigned char phase[8]; // Optional. Indicates how the measured value is to be interpreted.
  4208. unsigned char location[8]; // Optional. Indicates where the measured value has been sampled. Default = "Outlet"
  4209. struct SignedMeterValueType signedMeterValue; // Optional. Contains the MeterValueSignature with sign/encoding method information.
  4210. struct UnitOfMeasureType unitOfMeasure; // Optional. Represents a UnitOfMeasure including a multiplier
  4211. };
  4212. struct MeterValueType
  4213. {
  4214. unsigned char timestamp[28]; // Required. Timestamp for measured value(s).
  4215. struct SampledValueType meterValue[10]; // Required. One or more measured values
  4216. };
  4217. struct VariableMonitoringType
  4218. {
  4219. unsigned int id; // Required. Identifies the monitor.
  4220. float value; // Required. Value for threshold or delta monitoring. For Periodic or PeriodicClockAligned this is the interval in seconds.
  4221. unsigned char type[32]; // Required. The type of this monitor, e.g. a threshold, delta or periodic monitor.
  4222. unsigned char severity; // Required. The severity that will be assigned to an event that is triggered by this monitor.
  4223. unsigned char transaction; // Required. Monitor only active when a transaction is ongoing on a component relevant to this transaction.
  4224. };
  4225. struct MonitoringDataType
  4226. {
  4227. struct ComponentType component; // Required. Component for which monitoring report was requested.
  4228. struct VariableType variable; // Required. Variable for which monitoring report was requested.
  4229. struct VariableMonitoringType variableMonitoring[10]; // Required. List of monitors for this Component-Variable pair.
  4230. };
  4231. struct NetworkConnectionProfileType
  4232. {
  4233. unsigned char ocppVersion[8]; // Required. Defines the OCPP version used for this communication function.
  4234. unsigned char ocppTransport[8]; // Required. Defines the transport protocol (e.g. SOAP or JSON). Note: SOAP is not supported in OCPP 2.0, but is supported by other versions of OCPP.
  4235. unsigned char ocppCsmsUrl[512]; // Required. URL of the CSMS(s) that this Charging Station communicates with.
  4236. unsigned int messageTimeout; // Required. Duration in seconds before a message send by the Charging Station via this network connection times- out. The best setting depends on the underlying network and response times of the CSMS. If you are looking for a some guideline: use 30 seconds as a starting point.
  4237. unsigned char ocppInterface[16]; // Required. Applicable Network Interface.
  4238. struct VPNType vpn; // Optional. Settings to be used to set up the VPN connection
  4239. struct APNType apn; // Optional. Collection of configuration data needed to make a data-connection over a cellular network.
  4240. };
  4241. struct OCSPRequestDataType
  4242. {
  4243. unsigned char hashAlgorithm[8]; // Required. Used algorithms for the hashes provided.
  4244. unsigned char issuerNameHash[128]; // Required. hashed value of the IssuerName.
  4245. unsigned char issuerKeyHash[128]; // Required. Hashed value of the issuers public key
  4246. unsigned char serialNumber[40]; // Required. The serial number of the certificate.
  4247. unsigned char responderURL[512]; // Required. This contains the responder URL (Case insensitive).
  4248. };
  4249. struct ReportDataType
  4250. {
  4251. struct ComponentType component; // Required. Component for which a report of Variable is requested.
  4252. struct VariableType variable; // Required. Variable for which report is requested.
  4253. struct VariableAttributeType variableAttribute[4]; // Required. Attribute data of a variable.
  4254. struct VariableCharacteristicsType variableCharacteristics; // Optional. Fixed read-only parameters of a variable.
  4255. };
  4256. struct SetMonitoringDataType
  4257. {
  4258. unsigned int id; // Optional. An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id’s for new monitors.
  4259. float value; // Required. Value for threshold or delta monitoring. For Periodic or PeriodicClockAligned this is the interval in seconds.
  4260. unsigned char type[32]; // Required. The type of this monitor, e.g. a threshold, delta or periodic monitor.
  4261. unsigned char severity; // Required. The severity that will be assigned to an event that is triggered by this monitor.
  4262. unsigned char transaction; // Optional. Monitor only active when a transaction is ongoing on a component relevant to this transaction. Default = false.
  4263. struct ComponentType component; // Required. Component for which monitor is set.
  4264. struct VariableType variable; // Required. Variable for which monitor is set.
  4265. };
  4266. struct SetMonitoringResultType
  4267. {
  4268. unsigned int id; // Optional. Id given to the VariableMonitor by the Charging Station.
  4269. unsigned char type[32]; // Required. The type of this monitor, e.g. a threshold, delta or periodic monitor.
  4270. unsigned char severity; // Required. The severity that will be assigned to an event that is triggered by this monitor.
  4271. unsigned char status[32]; // Required. Status is OK if a value could be returned.
  4272. struct ComponentType component; // Required. Component for which status is returned.
  4273. struct VariableType variable; // Required. Variable for which status is returned.
  4274. };
  4275. struct SetVariableDataType
  4276. {
  4277. unsigned char attributeType[8]; // Optional. Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted.
  4278. unsigned char attributeValue[1000]; // Required. Value to be assigned to attribute of variable.
  4279. struct ComponentType component; // Required. The component for which the variable data is set.
  4280. struct VariableType variable; // Required. Specifies the that needs to be set.
  4281. };
  4282. struct SetVariableResultType
  4283. {
  4284. unsigned char attributeType[8]; // Optional. Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted.
  4285. unsigned char attributeStatus[32]; // Required. Result status of setting the variable.
  4286. struct ComponentType component; // Required. The component for which result is returned.
  4287. struct VariableType variable; // Required. The variable for which the result is returned.
  4288. };
  4289. struct TransactionType
  4290. {
  4291. unsigned char transactionId[36]; // Required. This contains the Id of the transaction.
  4292. unsigned char chargingState[16]; // Optional. Current charging state, is required when state has changed. Omitted when there is no communication between EVSE and EV, because no cable is plugged in.
  4293. unsigned int timeSpentCharging; // Optional. Contains the total time that energy flowed from EVSE to EV during the transaction (in seconds). Note that timeSpentCharging is smaller or equal to the duration of the transaction.
  4294. unsigned char stoppedReason[20]; // Optional. This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local".
  4295. unsigned int remoteStartId; // Optional. The ID given to remote start request (RequestStartTransactionRequest.
  4296. };
  4297. /*
  4298. * =============== Message ===============
  4299. */
  4300. struct Authorize_20
  4301. {
  4302. struct IdTokenType idToken; // Required. This contains the identifier that needs to be authorized.
  4303. struct OCSPRequestDataType iso15118CertificateHashData[4]; // Optional. Contains the information needed to verify the EV Contract Certificate via OCSP.
  4304. unsigned char Response_certificateStatus[32]; // Optional. Certificate status information. - if all certificates are valid: return 'Accepted'. - if one of the certificates was revoked, return 'CertificateRevoked'.
  4305. struct IdTokenInfoType Response_idTokenInfo; // Required. This contains information about authorization status, expiry and group id.
  4306. };
  4307. struct BootNotification_20
  4308. {
  4309. unsigned char reason[20]; // Required. This contains the reason for sending this message to the CSMS.
  4310. struct ChargingStationType chargingStation; // Required. Identifies the Charging Station
  4311. unsigned char Response_currentTime[28]; // Required. This contains the CSMS’s current time.
  4312. unsigned int Response_interval; // Required. When Status is Accepted, this contains the heartbeat interval in seconds. If the CSMS returns something other than Accepted, the value of the interval field indicates the minimum wait time before sending a next BootNotification request.
  4313. unsigned char Response_status[16]; // Required. This contains whether the Charging Station has been registered within the CSMS.
  4314. };
  4315. struct CancelReservation_20
  4316. {
  4317. int reservationId; // Required. Id of the reservation to cancel.
  4318. unsigned char Response_status[16]; // Required. This indicates the success or failure of the canceling of a reservation by CSMS.
  4319. };
  4320. struct CertificateSigned_20
  4321. {
  4322. unsigned char certificate[10][5500]; // Required. The signed X.509 certificate, first DER encoded into binary, and then Base64 encoded. This can also contain the necessary sub CA certificates. In that case, the order should follow the certificate chain, starting from the leaf certificate.
  4323. unsigned char certificateType[32]; // Optional. Indicates the type of the signed certificate that is returned.
  4324. unsigned char Response_status[16]; // Required. Returns whether certificate signing has been accepted, otherwise rejected.
  4325. };
  4326. struct ChangeAvailability_20
  4327. {
  4328. unsigned char operationalStatus[16]; // Required. This contains the type of availability change that the Charging Station should perform.
  4329. struct EVSEType evse; // Optional. Contains Id’s to designate a specific EVSE/connector by index numbers. When omitted, the message refers to the Charging Station as a whole.
  4330. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station is able to perform the availability change.
  4331. };
  4332. struct ClearCache_20
  4333. {
  4334. unsigned char Response_status[16]; // Required. Accepted if the Charging Station has executed the request, otherwise rejected.
  4335. };
  4336. struct ClearChargingProfile_20
  4337. {
  4338. unsigned int chargingProfileId; // Optional. The Id of the charging profile to clear.
  4339. struct ClearChargingProfileType chargingProfileCriteria; // Optional. Specifies the charging profile.
  4340. unsigned char Response_status[16]; // Required. Indicates if the Charging Station was able to execute the request.
  4341. };
  4342. struct ClearDisplayMessage_20
  4343. {
  4344. unsigned int id; // Required. Id of the message that SHALL be removed from the Charging Station.
  4345. unsigned char Response_status[16]; // Required. Returns whether the Charging Station has been able to remove the message.
  4346. };
  4347. struct ClearedChargingLimit_20
  4348. {
  4349. unsigned char chargingLimitSource[8]; // Required. Source of the charging limit.
  4350. unsigned int evseId; // Optional. EVSE Identifier.
  4351. };
  4352. struct ClearVariableMonitoring_20
  4353. {
  4354. unsigned int id[10]; // Required. List of the monitors to be cleared, identified by there Id.
  4355. struct ClearMonitoringResultType Response_clearMonitoringResult[10];// Required. List of result statuses per monitor.
  4356. };
  4357. struct CostUpdated_20
  4358. {
  4359. float totalCost; // Required. Current total cost, based on the information known by the CSMS, of the transaction including taxes. In the currency configured with the configuration Variable: [Currency]
  4360. unsigned char transactionId[36]; // Required. Transaction Id of the transaction the current cost are asked for.
  4361. };
  4362. struct CustomerInformation_20
  4363. {
  4364. unsigned int requestId; // Required. The Id of the request.
  4365. unsigned char report; // Required. Flag indicating whether the Charging Station should return NotifyCustomerInformationRequest messages containing information about the customer referred to.
  4366. unsigned char clear; // Required. Flag indicating whether the Charging Station should clear all information about the customer referred to.
  4367. unsigned char customerIdentifier[64]; // Optional. A (e.g. vendor specific) identifier of the customer this request refers to. This field contains a custom identifier other than IdToken and Certificate. One of the possible identifiers (customerIdentifier, customerIdToken or customerCertificate) should be in the request message.
  4368. struct IdTokenType idToken; // Optional. The IdToken of the customer this request refers to. One of the possible identifiers (customerIdentifier, customerIdToken or customerCertificate) should be in the request message.
  4369. struct CertificateHashDataType customerCertificate; // Optional. The Certificate of the customer this request refers to. One of the possible identifiers (customerIdentifier, customerIdToken or customerCertificate) should be in the request message.
  4370. unsigned char Response_status[16]; // Required. Indicates whether the request was accepted.
  4371. };
  4372. struct DataTransfer_20
  4373. {
  4374. unsigned char messageId[50]; // Optional. May be used to indicate a specific message or implementation.
  4375. unsigned char data[512]; // Optional. Data without specified length or format. This needs to be decided by both parties (Open to implementation).
  4376. unsigned char vendorId[255]; // Required. This identifies the Vendor specific implementation
  4377. unsigned char Response_status[20]; // Required. This indicates the success or failure of the data transfer.
  4378. unsigned char Response_data[512]; // Optional. Data without specified length or format, in response to request.
  4379. };
  4380. struct DeleteCertificate_20
  4381. {
  4382. struct CertificateHashDataType certificateHashData; // Required. Indicates the certificate of which deletion is requested.
  4383. unsigned char Response_status[16]; // Required. Charging Station indicates if it can process the request.
  4384. };
  4385. struct FirmwareStatusNotification_20
  4386. {
  4387. unsigned char status[32]; // Required. This contains the progress status of the firmware installation.
  4388. unsigned int requestId; // Optional. The request id that was provided in the UpdateFirmwareRequest that started this firmware update. This field is mandatory, unless the message was triggered by a TriggerMessageRequest AND there is no firmware update ongoing.
  4389. };
  4390. struct Get15118EVCertificate_20
  4391. {
  4392. unsigned char iso15118SchemaVersion[50]; // Required. Schema version currently used for the 15118 session between EV and Charging Station. Needed for parsing of the EXI stream by the CSMS.
  4393. unsigned char action[16]; // Required. Defines whether certificate needs to be installed or updated.
  4394. unsigned char exiRequest[5600]; // Required. Raw CertificateInstallationReq request from EV, Base64 encoded.
  4395. unsigned char Response_status[16]; // Required. Indicates whether the message was processed properly.
  4396. unsigned char Response_exiResponse[5600]; // Required. Raw CertificateInstallationRes response for the EV, Base64 encoded.
  4397. };
  4398. struct GetBaseReport_20
  4399. {
  4400. unsigned int requestId; // Required. The Id of the request.
  4401. unsigned char reportBase[32]; // Required. This field specifies the report base.
  4402. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station is able to accept this request.
  4403. };
  4404. struct GetCertificateStatus_20
  4405. {
  4406. struct OCSPRequestDataType ocspRequestData; // Required. Indicates the certificate of which the status is requested.
  4407. unsigned char Response_status[16]; // Required. This indicates whether the charging station was able to retrieve the OCSP certificate status.
  4408. unsigned char Response_ocspResult[5500]; // Optional. OCSPResponse class as defined in IETF RFC 6960. DER encoded (as defined in IETF RFC 6960), and then base64 encoded. MAY only be omitted when status is not Accepted.
  4409. };
  4410. struct GetChargingProfiles_20
  4411. {
  4412. unsigned int requestId; // Required. Reference identification that is to be used by the Charging Station in the ReportChargingProfilesRequest when provided.
  4413. unsigned int evseId; // Optional. For which EVSE installed charging profiles SHALL be reported. If 0, only charging profiles installed on the Charging Station itself (the grid connection) SHALL be reported. If omitted, all installed charging profiles SHALL be reported.
  4414. struct ChargingProfileCriterionType chargingProfile; // Required. Specifies the charging profile.
  4415. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station is able to process this request and will send ReportChargingProfilesRequest messages.
  4416. };
  4417. struct GetCompositeSchedule_20
  4418. {
  4419. unsigned int duration; // Required. Length of the requested schedule in seconds.
  4420. unsigned char chargingRateUnit[8]; // Optional. Can be used to force a power or current profile.
  4421. unsigned int evseId; // Required. The ID of the EVSE for which the schedule is requested. When evseid=0, the Charging Station will calculate the expected consumption for the grid connection.
  4422. unsigned char Response_status[16]; // Required. The Charging Station will indicate if it was able to process the request
  4423. struct CompositeScheduleType Response_schedule; // Optional. This field contains the calculated composite schedule. It may only be omitted when this message contains status Rejected.
  4424. };
  4425. struct GetDisplayMessages_20
  4426. {
  4427. unsigned int id[10]; // Optional. If provided the Charging Station shall return Display Messages of the given ids. This field SHALL NOT contain more ids than set in NumberOfDisplayMessages.maxLimit
  4428. unsigned int requestId; // Required. The Id of this request.
  4429. unsigned char priority[16]; // Optional. If provided the Charging Station shall return Display Messages with the given priority only.
  4430. unsigned char state[16]; // Optional. If provided the Charging Station shall return Display Messages with the given state only.
  4431. unsigned char Response_status[16]; // Required. Indicates if the Charging Station has Display Messages that match the request criteria in the GetDisplayMessagesRequest
  4432. };
  4433. struct GetInstalledCertificateIds_20
  4434. {
  4435. unsigned char certificateType[10][32]; // Optional. Indicates the type of certificates requested. When omitted, all certificate types are requested.
  4436. unsigned char Response_status[16]; // Required. Charging Station indicates if it can process the request.
  4437. struct CertificateHashDataChainType Response_certificateHashDataChain[10]; // Optional. The Charging Station includes the Certificate information for each available certificate.
  4438. };
  4439. struct GetLocalListVersion_20
  4440. {
  4441. int Response_versionNumber; // Required. This contains the current version number of the local authorization list in the Charging Station.
  4442. };
  4443. struct GetLog_20
  4444. {
  4445. unsigned char logType[16]; // Required. This contains the type of log file that the Charging Station should send.
  4446. unsigned int requestId; // Required. The Id of this request
  4447. unsigned char retries; // Optional. This specifies how many times the Charging Station must try to upload the log before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry.
  4448. unsigned int retryInterval; // Optional. The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts.
  4449. struct LogParametersType log; // Required. This field specifies the requested log and the location to which the log should be sent.
  4450. unsigned char Response_status[20]; // Required. This field indicates whether the Charging Station was able to accept the request.
  4451. unsigned char Response_filename[255]; // Optional. This contains the name of the log file that will be uploaded. This field is not present when no logging information is available.
  4452. };
  4453. struct GetMonitoringReport_20
  4454. {
  4455. unsigned int requestId; // Required. The Id of the request.
  4456. unsigned char monitoringCriteria[3][32]; // Optional. This field contains criteria for components for which a monitoring report is requested
  4457. struct ComponentVariableType componentVariable[10]; // Optional. This field specifies the components and variables for which a monitoring report is requested.
  4458. unsigned char Response_status[20]; // Required. This field indicates whether the Charging Station was able to accept the request.
  4459. };
  4460. struct GetReport_20
  4461. {
  4462. unsigned int requestId; // Required. The Id of the request.
  4463. unsigned char componentCriteria[4][16]; // Optional. This field contains criteria for components for which a report is requested
  4464. struct ComponentVariableType componentVariable[10]; // Optional. This field specifies the components and variables for which a report is requested.
  4465. unsigned char Response_status[20]; // Required. This field indicates whether the Charging Station was able to accept the request.
  4466. };
  4467. struct GetTransactionStatus_20
  4468. {
  4469. unsigned char transactionId[36]; // Optional. The Id of the transaction for which the status is requested.
  4470. unsigned char Response_ongoingIndicator; // Optional. Whether the transaction is still ongoing.
  4471. unsigned char Response_messagesInQueue; // Required. Whether there are still message to be delivered.
  4472. };
  4473. struct GetVariables_20
  4474. {
  4475. struct GetVariableDataType getVariableData[10]; // Required. List of requested variables.
  4476. struct GetVariableResultType Response_getVariableResult[10]; // Required. List of requested variables and their values.
  4477. };
  4478. struct Heartbeat_20
  4479. {
  4480. unsigned char Response_currentTime[28]; // Required. Contains the current time of the CSMS.
  4481. };
  4482. struct InstallCertificate_20
  4483. {
  4484. unsigned char certificateType[32]; // Required. Indicates the certificate type that is sent.
  4485. unsigned char certificate[5500]; // Required. A X.509 certificate, first DER encoded into binary, and then Base64 encoded.
  4486. unsigned char Response_status[16]; // Required. Charging Station indicates if installation was successful.
  4487. };
  4488. struct LogStatusNotification_20
  4489. {
  4490. unsigned char status[32]; // Required. This contains the status of the log upload.
  4491. unsigned int requestId; // Optional. The request id that was provided in GetLogRequest that started this log upload. This field is mandatory, unless the message was triggered by a TriggerMessageRequest AND there is no log upload ongoing.
  4492. };
  4493. struct MeterValues_20
  4494. {
  4495. unsigned int evseId; // Required. This contains a number (>0) designating an EVSE of the Charging Station. ‘0’ (zero) is used to designate the main power meter.
  4496. struct MeterValueType meterValue[10]; // Required. The sampled meter values with timestamps.
  4497. };
  4498. struct NotifyChargingLimit_20
  4499. {
  4500. unsigned int evseId; // Optional. The charging schedule contained in this notification applies to an EVSE. evseId must be > 0.
  4501. struct ChargingLimitType chargingLimit; // Required. This contains the source of the charging limit and whether it is grid critical.
  4502. struct ChargingScheduleType chargingSchedule[10]; // Optional. Contains limits for the available power or current over time, as set by the external source.
  4503. };
  4504. struct NotifyCustomerInformation_20
  4505. {
  4506. unsigned char data[512]; // Required. (Part of) the requested data. No format specified in which the data is returned. Should be human readable.
  4507. unsigned char tbc; // Optional. “to be continued” indicator. Indicates whether another part of the monitoringData follows in an upcoming notifyMonitoringReportRequest message. Default value when omitted is false.
  4508. unsigned int seqNo; // Required. Sequence number of this message. First message starts at 0.
  4509. unsigned char generatedAt[28]; // Required. Timestamp of the moment this message was generated at the Charging Station.
  4510. unsigned int requestId; // Required. The Id of the request.
  4511. };
  4512. struct NotifyDisplayMessages_20
  4513. {
  4514. unsigned int NotifyDisplayMessages; // Required. The id of the GetDisplayMessagesRequest that requested this message.
  4515. unsigned char tbc; // Optional. "to be continued" indicator. Indicates whether another part of the report follows in an upcoming NotifyDisplayMessagesRequest message. Default value when omitted is false.
  4516. struct MessageInfoType messageInfo[10]; // Optional. The requested display message as configured in the Charging Station.
  4517. };
  4518. struct NotifyEVChargingNeeds_20
  4519. {
  4520. unsigned int maxScheduleTuples; // Optional. Contains the maximum schedule tuples the car supports per SASchedule (both Pmax and Tariff).
  4521. unsigned int evseId; // Required. Defines the EVSE and connector to which the EV is connected. EvseId may not be 0.
  4522. struct ChargingNeedsType chargingNeeds; // Required. The characteristics of the energy delivery required.
  4523. unsigned char Response_status[16]; // Required. Returns whether the CSMS has been able to process the message successfully. It does not imply that the evChargingNeeds can be met with the current charging profile.
  4524. };
  4525. struct NotifyEVChargingSchedule_20
  4526. {
  4527. unsigned char timeBase[28]; // Required. Periods contained in the charging profile are relative to this point in time.
  4528. unsigned int evseId; // Required. The charging schedule contained in this notification applies to an EVSE. EvseId must be > 0.
  4529. struct ChargingScheduleType chargingSchedule; // Required. Planned energy consumption of the EV over time. Always relative to timeBase.
  4530. unsigned char Response_status[16]; // Required. Returns whether the CSMS has been able to process the message successfully. It does not imply any approval of the charging schedule.
  4531. };
  4532. struct NotifyEvent_20
  4533. {
  4534. unsigned char generatedAt[28]; // Required. Timestamp of the moment this message was generated at the Charging Station.
  4535. unsigned char tbc; // Optional. “to be continued” indicator. Indicates whether another part of the report follows in an upcoming notifyEventRequest message. Default value when omitted is false.
  4536. unsigned int seqNo; // Required. Sequence number of this message. First message starts at 0.
  4537. struct EventDataType eventData[10]; // Required. List of EventData.
  4538. };
  4539. struct NotifyMonitoringReport_20
  4540. {
  4541. unsigned int requestId; // Required. The id of the GetMonitoringRequest that requested this report.
  4542. unsigned char tbc; // Optional. “to be continued” indicator.
  4543. unsigned int seqNo; // Required. Sequence number of this message. First message starts at 0.
  4544. unsigned char generatedAt[28]; // Required. Timestamp of the moment this message was generated at the Charging Station.
  4545. struct MonitoringDataType monitor[10]; // Optional. List of MonitoringData containing monitoring settings.
  4546. };
  4547. struct NotifyReport_20
  4548. {
  4549. unsigned int requestId; // Required. The id of the GetReportRequest or GetBaseReportRequest that requested this report
  4550. unsigned char generatedAt[28]; // Required. Timestamp of the moment this message was generated at the Charging Station.
  4551. unsigned char tbc; // Optional. “to be continued” indicator.
  4552. unsigned int seqNo; // Required. Sequence number of this message. First message starts at 0.
  4553. struct ReportDataType reportData[10]; // Optional. List of ReportData.
  4554. };
  4555. struct PublishFirmware_20
  4556. {
  4557. unsigned char location[512]; // Required. This contains a string containing a URI pointing to a location from which to retrieve the firmware.
  4558. unsigned char retries; // Optional. This specifies how many times Charging Station must try to download the firmware before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry.
  4559. unsigned char checksum[32]; // Required. The MD5 checksum over the entire firmware file as a hexadecimal string of length 32.
  4560. unsigned int requestId; // Required. The Id of the request.
  4561. unsigned int retryInterval; // Optional. The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts.
  4562. unsigned char status[16]; // Required. Indicates whether the request was accepted.
  4563. };
  4564. struct PublishFirmwareStatusNotification_20
  4565. {
  4566. unsigned char status[32]; // Required. This contains the progress status of the publishfirmware installation.
  4567. unsigned char location[512]; // Optional. Required if status is Published. Can be multiple URI’s, if the Local Controller supports e.g. HTTP, HTTPS, and FTP.
  4568. unsigned int requestId; // Optional. The request id that was provided in the PublishFirmwareRequest which triggered this action.
  4569. };
  4570. struct ReportChargingProfiles_20
  4571. {
  4572. unsigned int requestId; // Required. Id used to match the GetChargingProfilesRequest message with the resulting ReportChargingProfilesRequest messages
  4573. unsigned char chargingLimitSource[8]; // Required. Source that has installed this charging profile.
  4574. unsigned char tbc; // Optional. To Be Continued. Default value when omitted: false. false indicates that there are no further messages as part of this report.
  4575. unsigned int evseId; // Required. The evse to which the charging profile applies. If evseId = 0, the message contains an overall limit for the Charging Station.
  4576. struct ChargingProfileType chargingProfile[10]; // Required. The charging profile as configured in the Charging Station.
  4577. };
  4578. struct RequestStartTransaction_20
  4579. {
  4580. unsigned int evseId; // Optional. Number of the EVSE on which to start the transaction. EvseId SHALL be > 0
  4581. unsigned int remoteStartId; // Required. Id given by the server to this start request.
  4582. struct IdTokenType idToken; // Required. The identifier that the Charging Station must use to start a transaction.
  4583. struct ChargingProfileType chargingProfile; // Optional. Charging Profile to be used by the Charging Station for the requested transaction.
  4584. struct IdTokenType groupIdToken; // Optional. The group identifier that the Charging Station must use to start a transaction.
  4585. unsigned char Response_status[16]; // Required. Status indicating whether the Charging Station accepts the request to start a transaction.
  4586. unsigned char Response_transactionId[36]; // Optional. When the transaction was already started by the Charging Station before the RequestStartTransactionRequest was received, for example: cable plugged in first. This contains the transactionId of the already started transaction.
  4587. };
  4588. struct RequestStopTransaction_20
  4589. {
  4590. unsigned char transactionId[36]; // Required. The identifier of the transaction which the Charging Station is requested to stop.
  4591. unsigned char Response_status[16]; // Required. Status indicating whether Charging Station accepts the request to stop a transaction.
  4592. };
  4593. struct ReservationStatusUpdate_20
  4594. {
  4595. int reservationId; // Required. The ID of the reservation.
  4596. unsigned char reservationUpdateStatus[8]; // Required. The updated reservation status.
  4597. };
  4598. struct ReserveNow_20
  4599. {
  4600. unsigned int id; // Required. Id of reservation.
  4601. unsigned char expiryDateTime[28]; // Required. Date and time at which the reservation expires.
  4602. unsigned char connectorType[16]; // Optional. This field specifies the connector type.
  4603. unsigned int evseId; // Optional. This contains ID of the evse to be reserved.
  4604. struct IdTokenType idToken; // Required. The identifier for which the reservation is made.
  4605. struct IdTokenType groupIdToken; // Optional. The group identifier for which the reservation is made.
  4606. unsigned char Response_status[16]; // Required. This indicates the success or failure of the reservation.
  4607. };
  4608. struct Reset_20
  4609. {
  4610. unsigned char type[16]; // Required. This contains the type of reset that the Charging Station or EVSE should perform.
  4611. unsigned int evseId; // Optional. This contains the ID of a specific EVSE that needs to be reset, instead of the entire Charging Station.
  4612. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station is able to perform the reset.
  4613. };
  4614. struct SecurityEventNotification_20
  4615. {
  4616. unsigned char type[50]; // Required. Type of the security event. This value should be taken from the Security events list.
  4617. unsigned char timestamp[28]; // Required. Date and time at which the event occurred.
  4618. unsigned char techinfo[255]; // Optional. Additional information about the occurred security event.
  4619. };
  4620. struct SendLocalList_20
  4621. {
  4622. unsigned int versionNumber; // Required. In case of a full update this is the versio number of the full list. In case of a differential update it i the version number of the list after the update has bee applied.
  4623. unsigned char updateType[32]; // Required. This contains the type of update (full or differential) of this request.
  4624. struct AuthorizationData localAuthorizationList[500]; // Optional. This contains the Local Authorization List entries.
  4625. unsigned char Response_status[16]; // Required. This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
  4626. };
  4627. struct SetChargingProfile_20
  4628. {
  4629. unsigned int evseId; // Required. The EVSE to which the charging profile applies. If evseId = 0, the message contains an overall limit for the Charging Station.
  4630. struct ChargingProfileType chargingProfile; // Required. The charging profile to be set at the Charging Station.
  4631. unsigned char Response_status[16]; // Required. Returns whether the Charging Station has been able to process the message successfully. This does not guarantee the schedule will be followed to the letter. There might be other constraints the Charging Station may need to take into account.
  4632. };
  4633. struct SetDisplayMessage_20
  4634. {
  4635. struct MessageInfoType message; // Required. Message to be configured in the Charging Station, to be displayed.
  4636. unsigned char Response_status[32]; // Required. This indicates whether the Charging Station is able to display the message.
  4637. };
  4638. struct SetMonitoringBase_20
  4639. {
  4640. unsigned char monitoringBase[16]; // Required. Specify which monitoring base will be set
  4641. unsigned char Response_status[16]; // Required. Indicates whether the Charging Station was able to accept the request.
  4642. };
  4643. struct SetMonitoringLevel_20
  4644. {
  4645. unsigned int severity; // Required. The Charging Station SHALL only report events with a severity number lower than or equal to this severity.
  4646. unsigned char Response_status[16]; // Required. Indicates whether the Charging Station was able to accept the request.
  4647. };
  4648. struct SetNetworkProfile_20
  4649. {
  4650. unsigned int configurationSlot; // Required. Slot in which the configuration should be stored.
  4651. struct NetworkConnectionProfileType connectionData; // Required. Connection details.
  4652. unsigned char Response_status[16]; // Required. Result of operation.
  4653. };
  4654. struct SetVariableMonitoring_20
  4655. {
  4656. struct SetMonitoringDataType setMonitoringData[10]; // Required. List of MonitoringData containing monitoring settings.
  4657. struct SetMonitoringResultType Response_setMonitoringResult[10];// Required. List of result statuses per monitor.
  4658. };
  4659. struct SetVariables_20
  4660. {
  4661. struct SetVariableDataType setVariableData[10]; // Required. List of Component-Variable pairs and attribute values to set.
  4662. struct SetVariableResultType Response_setVariableResult[10]; // Required. List of result statuses per Component-Variable.
  4663. };
  4664. struct SignCertificate_20
  4665. {
  4666. unsigned char csr[5500]; // Required. The Charging Station SHALL send the public key in form of a Certificate Signing Request (CSR) as described in RFC 2986 [22] using the SignCertificateRequest message.
  4667. unsigned char certificateType[32]; // Optional. Indicates the type of certificate that is to be signed. When omitted the certificate is to be used for both the 15118 connection (if implemented) and the Charging Station to CSMS connection.
  4668. unsigned char Response_status[16]; // Required. Specifies whether the CSMS can process the request.
  4669. };
  4670. struct StatusNotification_20
  4671. {
  4672. unsigned char timestamp[28]; // Required. The time for which the status is reported. If absent time of receipt of the message will be assumed.
  4673. unsigned char connectorStatus[16]; // Required. This contains the current status of the Connector.
  4674. unsigned int evseId; // Required. The id of the EVSE to which the connector belongs for which the the status is reported.
  4675. unsigned char connectorId; // Required. The id of the connector within the EVSE for which the status is reported.
  4676. };
  4677. struct TransactionEvent_20
  4678. {
  4679. unsigned char eventType[16]; // Required. This contains the type of this event. The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated"
  4680. unsigned char timestamp[28]; // Required. The date and time at which this transaction event occurred.
  4681. unsigned char triggerReason[32]; // Required. Reason the Charging Station sends this message to the CSMS
  4682. unsigned int seqNo; // Required. Incremental sequence number, helps with determining if all messages of a transaction have been received.
  4683. unsigned char offline; // Optional. Indication that this transaction event happened when the Charging Station was offline. Default = false, meaning: the event occurred when the Charging Station was online.
  4684. unsigned char numberOfPhasesUsed; // Optional. If the Charging Station is able to report the number of phases used, then it SHALL provide it. When omitted the CSMS may be able to determine the number of phases used via device management.
  4685. float cableMaxCurrent; // Optional. The maximum current of the connected cable in Ampere (A).
  4686. int reservationId; // Optional. This contains the Id of the reservation that terminates as a result of this transaction.
  4687. struct TransactionType transactionInfo; // Required. Contains transaction specific information.
  4688. struct IdTokenType idToken; // Optional. This contains the identifier for which a transaction has to be/was started.
  4689. struct EVSEType evse; // Optional. This identifies which evse (and connector) of the Charging Station is used.
  4690. struct MeterValueType meterValue[10]; // Optional. This contains the relevant meter values.
  4691. float Response_totalCost; // Optional. SHALL only be sent when charging has ended. Final total cost of this transaction, including taxes.
  4692. int Response_chargingPriority; // Optional. Priority from a business point of view. Default priority is 0,
  4693. struct IdTokenInfoType Response_idTokenInfo; // Optional. This contains information about authorization status, expiry and group id. Is required when the transactionEventRequest contained an idToken.
  4694. struct MessageContentType Response_updatedPersonalMessage; // Optional. This can contain updated personal message that can be shown to the EV Driver. This can be used to provide updated tariff information
  4695. };
  4696. struct TriggerMessage_20
  4697. {
  4698. unsigned char requestedMessage[32]; // Required. Type of message to be triggered.
  4699. struct EVSEType evse; // Optional. Can be used to specifiy the EVSE and Connector if required for the message which needs to be sent.
  4700. unsigned char Response_status[16]; // Required. Indicates whether the Charging Station will send the requested notification or not.
  4701. };
  4702. struct UnlockConnector_20
  4703. {
  4704. unsigned int evseId; // Required. This contains the identifier of the EVSE for which a connector needs to be unlocked.
  4705. unsigned char connectorId; // Required. This contains the identifier of the connector that needs to be unlocked.
  4706. unsigned char Response_status[32]; // Required. This indicates whether the Charging Station has unlocked the connector.
  4707. };
  4708. struct UnpublishFirmware_20
  4709. {
  4710. unsigned char checksum[32]; // Required. The MD5 checksum over the entire firmware file as a hexadecimal string of length 32.
  4711. unsigned char Response_status[16]; // Required. Indicates whether the Local Controller succeeded in unpublishing the firmware.
  4712. };
  4713. struct UpdateFirmware_20
  4714. {
  4715. unsigned char retries; // Optional. This specifies how many times Charging Station must try to download the firmware before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry.
  4716. unsigned int retryInterval; // Optional. The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts.
  4717. unsigned int requestId; // Required. The Id of this request
  4718. struct FirmwareType firmware; // Required. Specifies the firmware to be updated on the Charging Station.
  4719. unsigned char Response_status[32]; // Required. This field indicates whether the Charging Station was able to accept the request.
  4720. };
  4721. /*
  4722. * =============== Controller component ===============
  4723. */
  4724. enum OCPPCommCtrlrVariable
  4725. {
  4726. OCPPCommCtrlr_ActiveNetworkProfile=0,
  4727. OCPPCommCtrlr_MessageTimeout,
  4728. OCPPCommCtrlr_FileTransferProtocols,
  4729. OCPPCommCtrlr_HeartbeatInterval,
  4730. OCPPCommCtrlr_NetworkConfigurationPriority,
  4731. OCPPCommCtrlr_NetworkProfileConnectionAttempts,
  4732. OCPPCommCtrlr_OfflineThreshold,
  4733. OCPPCommCtrlr_QueueAllMessages,
  4734. OCPPCommCtrlr_MessageAttempts,
  4735. OCPPCommCtrlr_MessageAttemptInterval,
  4736. OCPPCommCtrlr_UnlockOnEVSideDisconnect,
  4737. OCPPCommCtrlr_WebSocketPingInterval,
  4738. OCPPCommCtrlr_ResetRetries,
  4739. OCPPCommCtrlr_PublicKeyWithSignedMeterValue
  4740. };
  4741. enum DeviceDataCtrlrVariable
  4742. {
  4743. DeviceDataCtrlr_GetReport_ItemsPerMessage=0,
  4744. DeviceDataCtrlr_GetVariables_ItemsPerMessage,
  4745. DeviceDataCtrlr_GetReport_BytesPerMessage,
  4746. DeviceDataCtrlr_GetVariables_BytesPerMessage,
  4747. DeviceDataCtrlr_ConfigurationValueSize,
  4748. DeviceDataCtrlr_ReportingValueSize,
  4749. DeviceDataCtrlr_SetVariables_ItemsPerMessage,
  4750. DeviceDataCtrlr_SetVariables_BytesPerMessage
  4751. };
  4752. enum ClockCtrlrVariable
  4753. {
  4754. ClockCtrlr_DateTime=0,
  4755. ClockCtrlr_NtpSource,
  4756. ClockCtrlr_NtpServerUri,
  4757. ClockCtrlr_TimeOffset,
  4758. ClockCtrlr_NextTimeOffsetTransitionDateTime,
  4759. ClockCtrlr_NextTransition_TimeOffset,
  4760. ClockCtrlr_TimeSource,
  4761. ClockCtrlr_TimeZone
  4762. };
  4763. enum SecurityCtrlrVariable
  4764. {
  4765. SecurityCtrlr_BasicAuthPassword=0,
  4766. SecurityCtrlr_Identity,
  4767. SecurityCtrlr_OrganizationName,
  4768. SecurityCtrlr_CertificateEntries,
  4769. SecurityCtrlr_SecurityProfile,
  4770. SecurityCtrlr_AdditionalRootCertificateCheck
  4771. };
  4772. enum AuthCtrlrVariable
  4773. {
  4774. AuthCtrlr_Enabled=0,
  4775. AuthCtrlr_AdditionalInfoItemsPerMessage,
  4776. AuthCtrlr_OfflineTxForUnknownIdEnabled,
  4777. AuthCtrlr_AuthorizeRemoteStart,
  4778. AuthCtrlr_LocalAuthorizeOffline,
  4779. AuthCtrlr_LocalPreAuthorize,
  4780. AuthCtrlr_MasterPassGroupId
  4781. };
  4782. enum AuthCacheCtrlrVariable
  4783. {
  4784. AuthCacheCtrlr_Enabled=0,
  4785. AuthCacheCtrlr_Available,
  4786. AuthCacheCtrlr_LifeTime,
  4787. AuthCacheCtrlr_Storage,
  4788. AuthCacheCtrlr_Policy
  4789. };
  4790. enum LocalAuthListCtrlrVariable
  4791. {
  4792. LocalAuthListCtrlr_Enabled=0,
  4793. LocalAuthListCtrlr_Entries,
  4794. LocalAuthListCtrlr_Available,
  4795. LocalAuthListCtrlr_ItemsPerMessage,
  4796. LocalAuthListCtrlr_BytesPerMessage,
  4797. LocalAuthListCtrlr_Storage
  4798. };
  4799. enum TxCtrlrVariable
  4800. {
  4801. TxCtrlr_ChargingBeforeAcceptedEnabled=0,
  4802. TxCtrlr_EVConnectionTimeOut,
  4803. TxCtrlr_StopTxOnEVSideDisconnect,
  4804. TxCtrlr_TxBeforeAcceptedEnabled,
  4805. TxCtrlr_TxStartPoint,
  4806. TxCtrlr_TxStopPoint,
  4807. TxCtrlr_MaxEnergyOnInvalidId,
  4808. TxCtrlr_StopTxOnInvalidId
  4809. };
  4810. enum SampledDataCtrlrVariable
  4811. {
  4812. SampledDataCtrlr_Enabled=0,
  4813. SampledDataCtrlr_Available,
  4814. SampledDataCtrlr_SignReadings,
  4815. SampledDataCtrlr_TxEndedMeasurands,
  4816. SampledDataCtrlr_TxEndedInterval,
  4817. SampledDataCtrlr_TxStartedMeasurands,
  4818. SampledDataCtrlr_TxUpdatedMeasurands,
  4819. SampledDataCtrlr_TxUpdatedInterval
  4820. };
  4821. enum AlignedDataCtrlrVariable
  4822. {
  4823. AlignedDataCtrlr_Enabled=0,
  4824. AlignedDataCtrlr_Available,
  4825. AlignedDataCtrlr_Measurands,
  4826. AlignedDataCtrlr_Interval,
  4827. AlignedDataCtrlr_SendDuringIdle,
  4828. AlignedDataCtrlr_SignReadings,
  4829. AlignedDataCtrlr_TxEndedMeasurands,
  4830. AlignedDataCtrlr_TxEndedInterval
  4831. };
  4832. enum ReservationCtrlrVariable
  4833. {
  4834. ReservationCtrlr_Enabled=0,
  4835. ReservationCtrlr_Available,
  4836. ReservationCtrlr_NonEvseSpecific
  4837. };
  4838. enum SmartChargingCtrlrVariable
  4839. {
  4840. SmartChargingCtrlr_Enabled=0,
  4841. SmartChargingCtrlr_Available,
  4842. SmartChargingCtrlr_ACPhaseSwitchingSupported,
  4843. SmartChargingCtrlr_ProfileStackLevel,
  4844. SmartChargingCtrlr_RateUnit,
  4845. SmartChargingCtrlr_PeriodsPerSchedule,
  4846. SmartChargingCtrlr_ExternalControlSignalsEnabled,
  4847. SmartChargingCtrlr_NotifyChargingLimitWithSchedules,
  4848. SmartChargingCtrlr_Phases3to1,
  4849. SmartChargingCtrlr_Entries,
  4850. SmartChargingCtrlr_LimitChangeSignificance
  4851. };
  4852. enum TariffCostCtrlrVariable
  4853. {
  4854. Tariff_Enabled=0,
  4855. Tariff_Available,
  4856. Tariff_TariffFallbackMessage,
  4857. Cost_Enabled,
  4858. Cost_Available,
  4859. Cost_TotalCostFallbackMessage,
  4860. Cost_Currency
  4861. };
  4862. enum MonitoringCtrlrVariable
  4863. {
  4864. MonitoringCtrlr_Enabled=0,
  4865. MonitoringCtrlr_Available,
  4866. MonitoringCtrlr_ClearVariableMonitoring_ItemsPerMessage,
  4867. MonitoringCtrlr_SetVariableMonitoring_ItemsPerMessage,
  4868. MonitoringCtrlr_ClearVariableMonitoring_BytesPerMessage,
  4869. MonitoringCtrlr_SetVariableMonitoring_BytesPerMessage,
  4870. MonitoringCtrlr_OfflineQueuingSeverity
  4871. };
  4872. enum DisplayMessageCtrlrVariable
  4873. {
  4874. DisplayMessageCtrlr_Enabled=0,
  4875. DisplayMessageCtrlr_Available,
  4876. DisplayMessageCtrlr_DisplayMessages,
  4877. DisplayMessageCtrlr_SupportedFormats,
  4878. DisplayMessageCtrlr_SupportedPriorities
  4879. };
  4880. enum CustomizationCtrlrVariable
  4881. {
  4882. CustomizationCtrlr_CustomImplementationEnabled=0
  4883. };
  4884. enum ChargingStationVariable
  4885. {
  4886. ChargingStation_Available=0,
  4887. ChargingStation_AvailabilityState,
  4888. ChargingStation_SupplyPhases
  4889. };
  4890. enum EVSEVariable
  4891. {
  4892. EVSE_Available=0,
  4893. EVSE_AvailabilityState,
  4894. EVSE_SupplyPhases,
  4895. EVSE_Power
  4896. };
  4897. enum ConnectorVariable
  4898. {
  4899. Connector_Available=0,
  4900. Connector_ConnectorType,
  4901. Connector_SupplyPhases
  4902. };
  4903. struct OCPP20ControllerConponent
  4904. {
  4905. struct ReportDataType OCPPCommCtrlr[14];
  4906. struct ReportDataType DeviceDataCtrlr[6];
  4907. struct ReportDataType ClockCtrlr[8];
  4908. struct ReportDataType SecurityCtrlr[6];
  4909. struct ReportDataType AuthCtrlr[7];
  4910. struct ReportDataType AuthCacheCtrlr[5];
  4911. struct ReportDataType LocalAuthListCtrlr[6];
  4912. struct ReportDataType TxCtrlr[8];
  4913. struct ReportDataType SampledDataCtrlr[8];
  4914. struct ReportDataType AlignedDataCtrlr[8];
  4915. struct ReportDataType ReservationCtrlr[3];
  4916. struct ReportDataType SmartChargingCtrlr[11];
  4917. struct ReportDataType TariffCostCtrlr[7];
  4918. struct ReportDataType MonitoringCtrlr[7];
  4919. struct ReportDataType DisplayMessageCtrlr[5];
  4920. struct ReportDataType CustomizationCtrlr[1];
  4921. struct ReportDataType ChargingStation[3];
  4922. struct ReportDataType EVSE[4];
  4923. struct ReportDataType Connector[4];
  4924. };
  4925. struct OCPP20Data
  4926. {
  4927. 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"
  4928. unsigned char ChargeBoxId[128];
  4929. unsigned char OcppConnStatus; //0: disconnected, 1: connected
  4930. unsigned int Timeout_Secs;
  4931. unsigned short Ping_Pong_Interval;
  4932. struct OCPP20ControllerConponent ControllerComponent;
  4933. union
  4934. {
  4935. //Operations Initiated by Charge Point
  4936. unsigned char CpMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4937. struct
  4938. {
  4939. unsigned char DataTransferReq:1;
  4940. unsigned char DataTransferConf:1;
  4941. unsigned char ReservationStatusUpdateReq :1;
  4942. unsigned char ReservationStatusUpdateConf :1;
  4943. unsigned char TransactionEventReq :1;
  4944. unsigned char TransactionEventConf :1;
  4945. unsigned char :2; //bit 6,7 , reserved
  4946. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  4947. }CpMsg;
  4948. union
  4949. {
  4950. //Operations Initiated by Sequence Point
  4951. unsigned char SpMsgValue[4];
  4952. struct
  4953. {
  4954. unsigned char BootNotificationReq :1; //bit 0,
  4955. unsigned char BootNotificationConf :1; //bit 1,
  4956. unsigned char AuthorizeReq :1; //bit 2,
  4957. unsigned char AuthorizeConf :1; //bit 3,
  4958. unsigned char FirmwareStatusNotificationReq :1; //bit 6,
  4959. unsigned char FirmwareStatusNotificationConf :1; //bit 7,
  4960. unsigned char Get15118EVCertificateReq :1;
  4961. unsigned char Get15118EVCertificateConf :1;
  4962. unsigned char GetCertificateStatusReq :1;
  4963. unsigned char GetCertificateStatusConf :1;
  4964. unsigned char LogStatusNotificationReq :1;
  4965. unsigned char LogStatusNotificationConf :1;
  4966. unsigned char NotifyChargingLimitReq :1;
  4967. unsigned char NotifyChargingLimitConf :1;
  4968. unsigned char NotifyDisplayMessagesReq :1;
  4969. unsigned char NotifyDisplayMessagesConf :1;
  4970. unsigned char NotifyEVChargingNeedsReq :1;
  4971. unsigned char NotifyEVChargingNeedsConf :1;
  4972. unsigned char NotifyEVChargingScheduleReq :1;
  4973. unsigned char NotifyEVChargingScheduleConf :1;
  4974. unsigned char NotifyEventReq :1;
  4975. unsigned char NotifyEventConf :1;
  4976. unsigned char NotifyMonitoringReportReq :1;
  4977. unsigned char NotifyMonitoringReportConf :1;
  4978. unsigned char NotifyReportReq :1;
  4979. unsigned char NotifyReportConf :1;
  4980. unsigned char ReportChargingProfilesReq :1;
  4981. unsigned char ReportChargingProfilesConf :1;
  4982. unsigned char SecurityEventNotificationReq :1;
  4983. unsigned char SecurityEventNotificationConf :1;
  4984. unsigned char SignCertificateReq :1;
  4985. unsigned char SignCertificateConf :1;
  4986. } bits;
  4987. } SpMsg;
  4988. union
  4989. {
  4990. //Operations Initiated by Central System
  4991. unsigned char CsMsgValue[3 * (CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY)];
  4992. struct
  4993. {
  4994. unsigned char CancelReservationReq :1; //bit 0,
  4995. unsigned char CancelReservationConf :1; //bit 1,
  4996. unsigned char ChangeAvailabilityReq :1; //bit 2,
  4997. unsigned char ChangeAvailabilityConf :1; //bit 3,
  4998. unsigned char ClearChargingProfileReq :1; //bit 0,
  4999. unsigned char ClearChargingProfileConf :1; //bit 1,
  5000. unsigned char DataTransferReq :1; //bit 2,
  5001. unsigned char DataTransferConf :1; //bit 3,
  5002. unsigned char PublishFirmwareStatusNotificationReq :1;
  5003. unsigned char PublishFirmwareStatusNotificationConf :1;
  5004. unsigned char RequestStartTransactionReq :1;
  5005. unsigned char RequestStartTransactionConf :1;
  5006. unsigned char RequestStopTransactionReq :1;
  5007. unsigned char RequestStopTransactionConf :1;
  5008. unsigned char ReserveNowReq :1; //bit 4,
  5009. unsigned char ReserveNowConf :1; //bit 5,
  5010. unsigned char TriggerMessageReq :1; //bit 0,
  5011. unsigned char TriggerMessageConf :1; //bit 1,
  5012. unsigned char UnlockConnectorReq :1; //bit 2,
  5013. unsigned char UnlockConnectorConf :1; //bit 3,
  5014. unsigned char :4; //bit 6,7 , reserved
  5015. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5016. }CsMsg;
  5017. union
  5018. {
  5019. //Operations Initiated by Main System
  5020. unsigned char MsMsgValue[8];
  5021. struct
  5022. {
  5023. //CsMsgValue[0]
  5024. unsigned char CertificateSignedReq :1;
  5025. unsigned char CertificateSignedConf :1;
  5026. unsigned char ClearCacheReq :1; //bit 2,
  5027. unsigned char ClearCacheConf :1; //bit 3,
  5028. unsigned char ClearDisplayMessageReq :1;
  5029. unsigned char ClearDisplayMessageConf :1;
  5030. unsigned char ClearedChargingLimitReq :1;
  5031. unsigned char ClearedChargingLimitConf :1;
  5032. unsigned char ClearVariableMonitoringReq :1;
  5033. unsigned char ClearVariableMonitoringConf :1;
  5034. unsigned char CostUpdatedReq :1;
  5035. unsigned char CostUpdatedConf :1;
  5036. unsigned char CustomerInformationReq :1;
  5037. unsigned char CustomerInformationConf :1;
  5038. unsigned char DeleteCertificateReq :1;
  5039. unsigned char DeleteCertificateConf :1;
  5040. unsigned char GetBaseReportReq :1;
  5041. unsigned char GetBaseReportConf :1;
  5042. unsigned char GetChargingProfilesReq :1;
  5043. unsigned char GetChargingProfilesConf :1;
  5044. unsigned char GetCompositeScheduleReq :1; //bit 4,
  5045. unsigned char GetCompositeScheduleConf :1; //bit 5,
  5046. unsigned char GetDisplayMessagesReq :1;
  5047. unsigned char GetDisplayMessagesConf :1;
  5048. unsigned char GetInstalledCertificateIdsReq :1;
  5049. unsigned char GetInstalledCertificateIdsConf :1;
  5050. unsigned char GetLocalListVersionReq :1; //bit 2,
  5051. unsigned char GetLocalListVersionConf :1; //bit 3,
  5052. unsigned char GetLogReq :1;
  5053. unsigned char GetLogConf :1;
  5054. unsigned char GetMonitoringReportReq :1;
  5055. unsigned char GetMonitoringReportConf :1;
  5056. unsigned char GetReportReq :1;
  5057. unsigned char GetReportConf :1;
  5058. unsigned char GetTransactionStatusReq :1;
  5059. unsigned char GetTransactionStatusConf :1;
  5060. unsigned char GetVariablesReq :1;
  5061. unsigned char GetVariablesConf :1;
  5062. unsigned char InstallCertificateReq :1;
  5063. unsigned char InstallCertificateConf :1;
  5064. unsigned char PublishFirmwareReq :1;
  5065. unsigned char PublishFirmwareConf :1;
  5066. unsigned char ResetReq :1; //bit 4,
  5067. unsigned char ResetConf :1; //bit 5,
  5068. unsigned char SendLocalListReq :1; //bit 6,
  5069. unsigned char SendLocalListConf :1; //bit 7,
  5070. unsigned char SetChargingProfileReq :1; //bit 6,
  5071. unsigned char SetChargingProfileConf :1; //bit 7,
  5072. unsigned char SetDisplayMessageReq :1;
  5073. unsigned char SetDisplayMessageConf :1;
  5074. unsigned char SetMonitoringBaseReq :1;
  5075. unsigned char SetMonitoringBaseConf :1;
  5076. unsigned char SetMonitoringLevelReq :1;
  5077. unsigned char SetMonitoringLevelConf :1;
  5078. unsigned char SetNetworkProfileReq :1;
  5079. unsigned char SetNetworkProfileConf :1;
  5080. unsigned char SetVariableMonitoringReq :1;
  5081. unsigned char SetVariableMonitoringConf :1;
  5082. unsigned char SetVariablesReq :1;
  5083. unsigned char SetVariablesConf :1;
  5084. unsigned char UnpublishFirmwareReq :1;
  5085. unsigned char UnpublishFirmwareConf :1;
  5086. unsigned char UpdateFirmwareReq :1; //bit 6,
  5087. unsigned char UpdateFirmwareConf :1; //bit 7,
  5088. } bits;
  5089. } MsMsg;
  5090. union
  5091. {
  5092. //Operations triggered by CSU
  5093. unsigned char CSUMsgValue[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5094. struct
  5095. {
  5096. //CSUMsgValue[0]
  5097. unsigned char ChargingProfileReq:1; //bit 0,
  5098. unsigned char ChargingProfileConf:1; //bit 0,
  5099. unsigned char :6; //bit 1,2,3,4,5,6,7 , reserved
  5100. } bits[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5101. }CSUMsg;
  5102. struct Authorize_20 Authorize;
  5103. struct BootNotification_20 BootNotification;
  5104. struct CancelReservation_20 CancelReservation[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5105. struct CertificateSigned_20 CertificateSigned;
  5106. struct ChangeAvailability_20 ChangeAvailability[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5107. struct ClearCache_20 ClearCache;
  5108. struct ClearChargingProfile_20 ClearChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5109. struct ClearDisplayMessage_20 ClearDisplayMessage;
  5110. struct ClearedChargingLimit_20 ClearedChargingLimit[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5111. struct ClearVariableMonitoring_20 ClearVariableMonitoring;
  5112. struct CostUpdated_20 CostUpdated;
  5113. struct CustomerInformation_20 CustomerInformation;
  5114. struct DataTransfer_20 DataTransfer[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5115. struct DeleteCertificate_20 DeleteCertificate;
  5116. struct FirmwareStatusNotification_20 FirmwareStatusNotification;
  5117. struct Get15118EVCertificate_20 Get15118EVCertificate;
  5118. struct GetBaseReport_20 GetBaseReport;
  5119. struct GetCertificateStatus_20 GetCertificateStatus;
  5120. struct GetChargingProfiles_20 GetChargingProfiles[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5121. struct GetCompositeSchedule_20 GetCompositeSchedule[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5122. struct GetDisplayMessages_20 GetDisplayMessages;
  5123. struct GetInstalledCertificateIds_20 GetInstalledCertificateIds;
  5124. struct GetLocalListVersion_20 GetLocalListVersion;
  5125. struct GetLog_20 GetLog;
  5126. struct GetMonitoringReport_20 GetMonitoringReport;
  5127. struct GetReport_20 GetReport;
  5128. struct GetTransactionStatus_20 GetTransactionStatus[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5129. struct GetVariables_20 GetVariables;
  5130. struct Heartbeat_20 Heartbeat;
  5131. struct InstallCertificate_20 InstallCertificate;
  5132. struct LogStatusNotification_20 LogStatusNotification;
  5133. struct MeterValues_20 MeterValues[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5134. struct NotifyChargingLimit_20 NotifyChargingLimit[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5135. struct NotifyCustomerInformation_20 NotifyCustomerInformation;
  5136. struct NotifyDisplayMessages_20 NotifyDisplayMessages;
  5137. struct NotifyEVChargingNeeds_20 NotifyEVChargingNeeds[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5138. struct NotifyEVChargingSchedule_20 NotifyEVChargingSchedule[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5139. struct NotifyEvent_20 NotifyEvent;
  5140. struct NotifyMonitoringReport_20 NotifyMonitoringReport;
  5141. struct NotifyReport_20 NotifyReport;
  5142. struct PublishFirmware_20 PublishFirmware;
  5143. struct PublishFirmwareStatusNotification_20 PublishFirmwareStatusNotificatio;
  5144. struct ReportChargingProfiles_20 ReportChargingProfiles[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5145. struct RequestStartTransaction_20 RequestStartTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5146. struct RequestStopTransaction_20 RequestStopTransaction[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5147. struct ReservationStatusUpdate_20 ReservationStatusUpdate[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5148. struct ReserveNow_20 ReserveNow[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5149. struct Reset_20 Reset;
  5150. struct SecurityEventNotification_20 SecurityEventNotification;
  5151. struct SendLocalList_20 SendLocalList;
  5152. struct SetChargingProfile_20 SetChargingProfile[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5153. struct SetDisplayMessage_20 SetDisplayMessage;
  5154. struct SetMonitoringBase_20 SetMonitoringBase;
  5155. struct SetMonitoringLevel_20 SetMonitoringLevel;
  5156. struct SetNetworkProfile_20 SetNetworkProfile;
  5157. struct SetVariableMonitoring_20 SetVariableMonitoring;
  5158. struct SetVariables_20 SetVariables;
  5159. struct SignCertificate_20 SignCertificate;
  5160. struct StatusNotification_20 StatusNotification[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5161. struct TransactionEvent_20 TransactionEvent[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5162. struct TriggerMessage_20 TriggerMessage;
  5163. struct UnlockConnector_20 UnlockConnector[CHAdeMO_QUANTITY+ CCS_QUANTITY + GB_QUANTITY + AC_QUANTITY];
  5164. struct UnpublishFirmware_20 UnpublishFirmware;
  5165. struct UpdateFirmware_20 UpdateFirmware;
  5166. };
  5167. #endif // DEFINE_H_